summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-09-19 09:47:08 +0200
committerSergei Golubchik <serg@mariadb.org>2016-09-19 09:47:08 +0200
commitf9bdc7c01af52c04a05b5d0e890f86c77323d3b0 (patch)
tree09779236c1d7061fb1706524c2e3b357369eae8e
parentf7be8cf2854fc0c2871c1537e60b1d7cb1931a61 (diff)
parentf566a4f83c8c255e0192afa525fdeb0897927167 (diff)
downloadmariadb-git-f9bdc7c01af52c04a05b5d0e890f86c77323d3b0.tar.gz
Merge branch '10.2' into bb-10.2-jan
-rw-r--r--.gitignore1
-rw-r--r--.travis.yml56
-rwxr-xr-xBUILD/autorun.sh2
-rw-r--r--CMakeLists.txt7
-rw-r--r--CREDITS34
-rw-r--r--README.md (renamed from README)17
-rw-r--r--client/mysqlcheck.c67
-rw-r--r--client/mysqlimport.c58
-rw-r--r--client/mysqltest.cc14
-rw-r--r--cmake/crc32-vpmsum.cmake5
-rw-r--r--cmake/wsrep.cmake2
-rw-r--r--config.h.cmake2
-rw-r--r--configure.cmake2
-rwxr-xr-xdebian/autobake-deb.sh14
-rw-r--r--debian/mariadb-client-10.2.docs2
-rwxr-xr-xdebian/rules19
-rw-r--r--extra/CMakeLists.txt7
-rw-r--r--extra/crc32-vpmsum/CMakeLists.txt2
-rw-r--r--extra/crc32-vpmsum/crc32.iS (renamed from storage/xtradb/ut/crc32_power8/crc32.S)59
-rw-r--r--extra/crc32-vpmsum/crc32_wrapper.ic (renamed from storage/innobase/ut/crc32_power8/crc32_wrapper.c)22
-rw-r--r--extra/crc32-vpmsum/crc32c.S14
-rw-r--r--extra/crc32-vpmsum/crc32c_constants.h (renamed from storage/innobase/ut/crc32_power8/crc32_constants.h)80
-rw-r--r--extra/crc32-vpmsum/crc32c_wrapper.c78
-rw-r--r--extra/crc32-vpmsum/crc32ieee.S14
-rw-r--r--extra/crc32-vpmsum/crc32ieee_constants.h835
-rw-r--r--extra/crc32-vpmsum/crc32ieee_wrapper.c75
-rw-r--r--extra/crc32-vpmsum/ppc-opcode.h (renamed from storage/innobase/ut/crc32_power8/ppc-opcode.h)0
-rw-r--r--extra/perror.c2
-rw-r--r--include/m_ctype.h70
-rw-r--r--include/my_stacktrace.h2
-rw-r--r--include/mysql.h1
-rw-r--r--include/mysql.h.pp17
-rw-r--r--include/mysql_com.h54
-rw-r--r--libmysql/CMakeLists.txt2
-rw-r--r--libmysqld/CMakeLists.txt1
-rw-r--r--libmysqld/lib_sql.cc8
-rw-r--r--mysql-test/include/ctype_pad.inc79
-rw-r--r--mysql-test/include/ctype_pad_all_engines.inc7
-rw-r--r--mysql-test/include/default_mysqld.cnf2
-rw-r--r--mysql-test/include/report-features.test12
-rw-r--r--mysql-test/include/wait_until_connected_again.inc2
-rw-r--r--mysql-test/include/wait_until_disconnected.inc2
-rw-r--r--mysql-test/lib/My/SafeProcess.pm2
-rw-r--r--mysql-test/lib/mtr_cases.pm23
-rwxr-xr-xmysql-test/mysql-test-run.pl88
-rw-r--r--mysql-test/r/alter_table.result25
-rw-r--r--mysql-test/r/alter_table_mdev539_maria.result16
-rw-r--r--mysql-test/r/alter_table_mdev539_myisam.result16
-rw-r--r--mysql-test/r/bug46760.result2
-rw-r--r--mysql-test/r/check_constraint.result8
-rw-r--r--mysql-test/r/comment_column2.result4
-rw-r--r--mysql-test/r/contributors.result17
-rw-r--r--mysql-test/r/create-uca.result4
-rw-r--r--mysql-test/r/create.result55
-rw-r--r--mysql-test/r/cte_nonrecursive.result148
-rw-r--r--mysql-test/r/cte_recursive.result1634
-rw-r--r--mysql-test/r/ctype_big5.result564
-rw-r--r--mysql-test/r/ctype_cp932.result564
-rw-r--r--mysql-test/r/ctype_eucjpms.result560
-rw-r--r--mysql-test/r/ctype_euckr.result564
-rw-r--r--mysql-test/r/ctype_gb2312.result564
-rw-r--r--mysql-test/r/ctype_gbk.result558
-rw-r--r--mysql-test/r/ctype_latin1.result564
-rw-r--r--mysql-test/r/ctype_ldml.result112
-rw-r--r--mysql-test/r/ctype_nopad_8bit.result12771
-rw-r--r--mysql-test/r/ctype_sjis.result558
-rw-r--r--mysql-test/r/ctype_swe7.result564
-rw-r--r--mysql-test/r/ctype_tis620.result564
-rw-r--r--mysql-test/r/ctype_ucs.result564
-rw-r--r--mysql-test/r/ctype_ujis.result560
-rw-r--r--mysql-test/r/ctype_utf16.result564
-rw-r--r--mysql-test/r/ctype_utf16le.result564
-rw-r--r--mysql-test/r/ctype_utf32.result564
-rw-r--r--mysql-test/r/ctype_utf8.result559
-rw-r--r--mysql-test/r/ctype_utf8mb4.result559
-rw-r--r--mysql-test/r/ctype_utf8mb4_innodb.result2
-rw-r--r--mysql-test/r/ctype_utf8mb4_myisam.result2
-rw-r--r--mysql-test/r/default.result108
-rw-r--r--mysql-test/r/default_session.result94
-rw-r--r--mysql-test/r/derived.result4
-rw-r--r--mysql-test/r/derived_cond_pushdown.result7034
-rw-r--r--mysql-test/r/derived_view.result356
-rw-r--r--mysql-test/r/distinct.result2
-rw-r--r--mysql-test/r/empty_table.result8
-rw-r--r--mysql-test/r/explain_json.result1
-rw-r--r--mysql-test/r/features.result7
-rw-r--r--mysql-test/r/func_default.result4
-rw-r--r--mysql-test/r/func_group.result92
-rw-r--r--mysql-test/r/func_math.result16
-rw-r--r--mysql-test/r/func_misc.result7
-rw-r--r--mysql-test/r/func_time.result329
-rw-r--r--mysql-test/r/function_defaults.result16
-rw-r--r--mysql-test/r/function_defaults_innodb.result16
-rw-r--r--mysql-test/r/gis.result14
-rw-r--r--mysql-test/r/grant2.result2
-rw-r--r--mysql-test/r/group_by.result34
-rw-r--r--mysql-test/r/group_by_innodb.result35
-rw-r--r--mysql-test/r/group_min_max.result8
-rw-r--r--mysql-test/r/handler_read_last.result4
-rw-r--r--mysql-test/r/index_merge_myisam.result2
-rw-r--r--mysql-test/r/information_schema.result16
-rw-r--r--mysql-test/r/information_schema_parameters.result2
-rw-r--r--mysql-test/r/information_schema_stats.result4
-rw-r--r--mysql-test/r/innodb_ext_key.result93
-rw-r--r--mysql-test/r/insert_select.result1
-rw-r--r--mysql-test/r/join.result4
-rw-r--r--mysql-test/r/join_outer.result3
-rw-r--r--mysql-test/r/join_outer_jcl6.result3
-rw-r--r--mysql-test/r/limit_rows_examined.result2
-rw-r--r--mysql-test/r/loaddata.result33
-rw-r--r--mysql-test/r/myisam_enable_keys-10506.result114
-rw-r--r--mysql-test/r/mysql5613mysql.result18
-rw-r--r--mysql-test/r/mysqlcheck.result82
-rw-r--r--mysql-test/r/mysqld--help,win.rdiff41
-rw-r--r--mysql-test/r/mysqld--help.result44
-rw-r--r--mysql-test/r/named_pipe.result1
-rw-r--r--mysql-test/r/null_key.result1
-rw-r--r--mysql-test/r/openssl_1.result10
-rw-r--r--mysql-test/r/order_by.result4
-rw-r--r--mysql-test/r/parser.result41
-rw-r--r--mysql-test/r/partition.result10
-rw-r--r--mysql-test/r/partition_cache_innodb.result4
-rw-r--r--mysql-test/r/partition_cache_myisam.result4
-rw-r--r--mysql-test/r/partition_default.result1235
-rw-r--r--mysql-test/r/partition_explicit_prune.result190
-rw-r--r--mysql-test/r/plugin_auth.result2
-rw-r--r--mysql-test/r/ps.result4
-rw-r--r--mysql-test/r/ps_1general.result2
-rw-r--r--mysql-test/r/range.result31
-rw-r--r--mysql-test/r/range_mrr_icp.result31
-rw-r--r--mysql-test/r/range_vs_index_merge.result3
-rw-r--r--mysql-test/r/range_vs_index_merge_innodb.result3
-rw-r--r--mysql-test/r/reopen_temp_table.result24
-rw-r--r--mysql-test/r/select.result1
-rw-r--r--mysql-test/r/select_jcl6.result1
-rw-r--r--mysql-test/r/select_pkeycache.result1
-rw-r--r--mysql-test/r/show_check.result2
-rw-r--r--mysql-test/r/single_delete_update.result42
-rw-r--r--mysql-test/r/sp-prelocking.result20
-rw-r--r--mysql-test/r/sp.result2
-rw-r--r--mysql-test/r/sql_mode.result6
-rw-r--r--mysql-test/r/ssl.result12
-rw-r--r--mysql-test/r/ssl_ca.result16
-rw-r--r--mysql-test/r/ssl_compress.result12
-rw-r--r--mysql-test/r/ssl_timeout.result6
-rw-r--r--mysql-test/r/stat_tables_innodb_debug.result25
-rw-r--r--mysql-test/r/stat_tables_myisam_debug.result24
-rw-r--r--mysql-test/r/status.result4
-rw-r--r--mysql-test/r/strict.result2
-rw-r--r--mysql-test/r/subselect.result30
-rw-r--r--mysql-test/r/subselect3.result2
-rw-r--r--mysql-test/r/subselect3_jcl6.result2
-rw-r--r--mysql-test/r/subselect_cache.result30
-rw-r--r--mysql-test/r/subselect_extra_no_semijoin.result4
-rw-r--r--mysql-test/r/subselect_mat.result15
-rw-r--r--mysql-test/r/subselect_no_exists_to_in.result30
-rw-r--r--mysql-test/r/subselect_no_mat.result30
-rw-r--r--mysql-test/r/subselect_no_opts.result30
-rw-r--r--mysql-test/r/subselect_no_scache.result30
-rw-r--r--mysql-test/r/subselect_no_semijoin.result30
-rw-r--r--mysql-test/r/subselect_sj_mat.result15
-rw-r--r--mysql-test/r/system_mysql_db.result14
-rw-r--r--mysql-test/r/system_mysql_db_fix40123.result14
-rw-r--r--mysql-test/r/system_mysql_db_fix50030.result14
-rw-r--r--mysql-test/r/system_mysql_db_fix50117.result14
-rw-r--r--mysql-test/r/temp_table.result48
-rw-r--r--mysql-test/r/type_date.result2
-rw-r--r--mysql-test/r/type_enum.result2
-rw-r--r--mysql-test/r/type_newdecimal.result16
-rw-r--r--mysql-test/r/type_timestamp_hires.result67
-rw-r--r--mysql-test/r/union.result6
-rw-r--r--mysql-test/r/update.result11
-rw-r--r--mysql-test/r/userstat.result1
-rw-r--r--mysql-test/r/variables.result6
-rw-r--r--mysql-test/r/view.result42
-rw-r--r--mysql-test/r/win.result68
-rw-r--r--mysql-test/r/win_min_max.result97
-rw-r--r--mysql-test/r/xtradb_mrr.result4
-rw-r--r--mysql-test/std_data/bug20683959loaddata.txt1
-rw-r--r--mysql-test/std_data/ldml/Index.xml (renamed from mysql-test/std_data/Index.xml)38
-rw-r--r--mysql-test/std_data/ldml/ascii2.xml127
-rw-r--r--mysql-test/std_data/ldml/latin1.xml (renamed from mysql-test/std_data/latin1.xml)23
-rw-r--r--mysql-test/suite/archive/archive.result4
-rw-r--r--mysql-test/suite/binlog/r/binlog_dmls_on_tmp_tables_readonly.result59
-rw-r--r--mysql-test/suite/binlog/t/binlog_dmls_on_tmp_tables_readonly.test92
-rw-r--r--mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result10
-rw-r--r--mysql-test/suite/engines/funcs/r/comment_column2.result4
-rw-r--r--mysql-test/suite/engines/funcs/r/db_alter_collate_ascii.result78
-rw-r--r--mysql-test/suite/engines/funcs/r/db_alter_collate_utf8.result78
-rw-r--r--mysql-test/suite/engines/funcs/r/ta_set_drop_default.result44
-rw-r--r--mysql-test/suite/engines/funcs/r/tc_column_default_decimal.result32
-rw-r--r--mysql-test/suite/engines/funcs/r/tc_column_default_number.result24
-rw-r--r--mysql-test/suite/engines/funcs/r/tc_multicolumn_different.result3840
-rw-r--r--mysql-test/suite/engines/rr_trx/r/init_innodb.result8
-rw-r--r--mysql-test/suite/federated/assisted_discovery.result4
-rw-r--r--mysql-test/suite/funcs_1/datadict/processlist_priv.inc2
-rw-r--r--mysql-test/suite/funcs_1/r/is_character_sets.result2
-rw-r--r--mysql-test/suite/funcs_1/r/is_collations.result4
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns.result2
-rw-r--r--mysql-test/suite/funcs_1/r/is_events.result2
-rw-r--r--mysql-test/suite/funcs_1/r/is_key_column_usage.result2
-rw-r--r--mysql-test/suite/funcs_1/r/is_statistics.result4
-rw-r--r--mysql-test/suite/funcs_1/r/is_triggers.result2
-rw-r--r--mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result40
-rw-r--r--mysql-test/suite/funcs_1/r/processlist_priv_ps.result40
-rw-r--r--mysql-test/suite/funcs_1/r/processlist_val_no_prot.result20
-rw-r--r--mysql-test/suite/funcs_1/r/processlist_val_ps.result20
-rw-r--r--mysql-test/suite/galera/disabled.def2
-rw-r--r--mysql-test/suite/galera/galera_2nodes.cnf4
-rw-r--r--mysql-test/suite/galera/include/auto_increment_offset_restore.inc35
-rw-r--r--mysql-test/suite/galera/include/auto_increment_offset_save.inc37
-rw-r--r--mysql-test/suite/galera/r/GAL-382.result6
-rw-r--r--mysql-test/suite/galera/r/MW-252.result7
-rw-r--r--mysql-test/suite/galera/r/MW-258.result34
-rw-r--r--mysql-test/suite/galera/r/MW-259.result12
-rw-r--r--mysql-test/suite/galera/r/MW-284.result10
-rw-r--r--mysql-test/suite/galera/r/MW-285.result19
-rw-r--r--mysql-test/suite/galera/r/MW-286.result13
-rw-r--r--mysql-test/suite/galera/r/MW-292.result30
-rw-r--r--mysql-test/suite/galera/r/MW-44.result14
-rw-r--r--mysql-test/suite/galera/r/galera#414.result5
-rw-r--r--mysql-test/suite/galera/r/galera_as_master.result1
-rw-r--r--mysql-test/suite/galera/r/galera_as_slave_autoinc.result82
-rw-r--r--mysql-test/suite/galera/r/galera_as_slave_nonprim.result2
-rw-r--r--mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result7
-rw-r--r--mysql-test/suite/galera/r/galera_defaults.result9
-rw-r--r--mysql-test/suite/galera/r/galera_ftwrl_drain.result12
-rw-r--r--mysql-test/suite/galera/r/galera_gcs_fc_limit.result2
-rw-r--r--mysql-test/suite/galera/r/galera_ist_recv_bind.result13
-rw-r--r--mysql-test/suite/galera/r/galera_ist_restart_joiner.result11
-rw-r--r--mysql-test/suite/galera/r/galera_kill_ddl.result2
-rw-r--r--mysql-test/suite/galera/r/galera_log_output_csv.result3
-rw-r--r--mysql-test/suite/galera/r/galera_parallel_simple.result7
-rw-r--r--mysql-test/suite/galera/r/galera_repl_max_ws_size.result4
-rw-r--r--mysql-test/suite/galera/r/galera_roles.result41
-rw-r--r--mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result7
-rw-r--r--mysql-test/suite/galera/r/galera_ssl_upgrade.result9
-rw-r--r--mysql-test/suite/galera/r/galera_transaction_replay.result36
-rw-r--r--mysql-test/suite/galera/r/galera_var_desync_on.result2
-rw-r--r--mysql-test/suite/galera/r/galera_var_max_ws_rows.result115
-rw-r--r--mysql-test/suite/galera/r/galera_var_max_ws_size.result9
-rw-r--r--mysql-test/suite/galera/r/galera_var_sst_auth.result12
-rw-r--r--mysql-test/suite/galera/r/mdev_10518.result74
-rw-r--r--mysql-test/suite/galera/t/GAL-382.test16
-rw-r--r--mysql-test/suite/galera/t/MW-252.test42
-rw-r--r--mysql-test/suite/galera/t/MW-258.test41
-rw-r--r--mysql-test/suite/galera/t/MW-259.test42
-rw-r--r--mysql-test/suite/galera/t/MW-284.test1
-rw-r--r--mysql-test/suite/galera/t/MW-285.test31
-rw-r--r--mysql-test/suite/galera/t/MW-286.test32
-rw-r--r--mysql-test/suite/galera/t/MW-292.test79
-rw-r--r--mysql-test/suite/galera/t/MW-44-master.opt1
-rw-r--r--mysql-test/suite/galera/t/MW-44.test25
-rw-r--r--mysql-test/suite/galera/t/galera#414.cnf8
-rw-r--r--mysql-test/suite/galera/t/galera#414.test32
-rw-r--r--mysql-test/suite/galera/t/galera_as_master.test3
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave_autoinc.cnf1
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave_autoinc.test83
-rw-r--r--mysql-test/suite/galera/t/galera_as_slave_nonprim.test2
-rw-r--r--mysql-test/suite/galera/t/galera_bf_abort_flush_for_export.test5
-rw-r--r--mysql-test/suite/galera/t/galera_defaults.test2
-rw-r--r--mysql-test/suite/galera/t/galera_gcs_fc_limit.test2
-rw-r--r--mysql-test/suite/galera/t/galera_ist_recv_bind.cnf8
-rw-r--r--mysql-test/suite/galera/t/galera_ist_recv_bind.test54
-rw-r--r--mysql-test/suite/galera/t/galera_ist_restart_joiner.test11
-rw-r--r--mysql-test/suite/galera/t/galera_kill_ddl.test7
-rw-r--r--mysql-test/suite/galera/t/galera_log_output_csv.test3
-rw-r--r--mysql-test/suite/galera/t/galera_parallel_simple.test13
-rw-r--r--mysql-test/suite/galera/t/galera_pc_ignore_sb.test17
-rw-r--r--mysql-test/suite/galera/t/galera_repl_max_ws_size.test4
-rw-r--r--mysql-test/suite/galera/t/galera_restart_nochanges.test21
-rw-r--r--mysql-test/suite/galera/t/galera_roles.test32
-rw-r--r--mysql-test/suite/galera/t/galera_rsu_wsrep_desync.test26
-rw-r--r--mysql-test/suite/galera/t/galera_split_brain.test21
-rw-r--r--mysql-test/suite/galera/t/galera_ssl_upgrade.test9
-rw-r--r--mysql-test/suite/galera/t/galera_suspend_slave.test15
-rw-r--r--mysql-test/suite/galera/t/galera_transaction_replay.test55
-rw-r--r--mysql-test/suite/galera/t/galera_var_desync_on.test4
-rw-r--r--mysql-test/suite/galera/t/galera_var_dirty_reads.test16
-rw-r--r--mysql-test/suite/galera/t/galera_var_max_ws_rows.test155
-rw-r--r--mysql-test/suite/galera/t/galera_var_max_ws_size.test23
-rw-r--r--mysql-test/suite/galera/t/galera_var_sst_auth.opt1
-rw-r--r--mysql-test/suite/galera/t/galera_var_sst_auth.test12
-rw-r--r--mysql-test/suite/galera/t/mdev_10518.cnf17
-rw-r--r--mysql-test/suite/galera/t/mdev_10518.test53
-rw-r--r--mysql-test/suite/galera/t/mysql-wsrep#31.test14
-rw-r--r--mysql-test/suite/galera_3nodes/galera_3nodes.cnf6
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result3
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_pc_weight.result2
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_certification_ccc.test21
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test6
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test2
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.cnf5
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test3
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf5
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_pc_weight.test7
-rw-r--r--mysql-test/suite/innodb/r/innodb-alter-table.result52
-rw-r--r--mysql-test/suite/innodb/r/innodb-alter-tempfile.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb-autoinc.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb-fk-warnings.result14
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522,xtradb.rdiff-disabled56
-rw-r--r--mysql-test/suite/innodb/r/innodb_ctype_big5.result285
-rw-r--r--mysql-test/suite/innodb/r/innodb_ctype_latin1.result285
-rw-r--r--mysql-test/suite/innodb/r/innodb_ctype_ldml.result13
-rw-r--r--mysql-test/suite/innodb/r/innodb_ctype_utf8.result285
-rw-r--r--mysql-test/suite/innodb/t/innodb-alter-table.test33
-rw-r--r--mysql-test/suite/innodb/t/innodb-alter-tempfile.test7
-rw-r--r--mysql-test/suite/innodb/t/innodb-fk-warnings.test20
-rw-r--r--mysql-test/suite/innodb/t/innodb_ctype_big5.test25
-rw-r--r--mysql-test/suite/innodb/t/innodb_ctype_latin1.test25
-rw-r--r--mysql-test/suite/innodb/t/innodb_ctype_ldml-master.opt2
-rw-r--r--mysql-test/suite/innodb/t/innodb_ctype_utf8.test25
-rw-r--r--mysql-test/suite/innodb_fts/r/innodb_fts_misc.result6
-rw-r--r--mysql-test/suite/maria/encrypt-wrong-key.test2
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result224
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result64
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_1_innodb.result128
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_1_myisam.result64
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_2_innodb.result320
-rw-r--r--mysql-test/suite/parts/r/partition_alter1_2_myisam.result128
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_1_1_innodb.result80
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_1_maria.result48
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_1_myisam.result48
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_2_1_innodb.result80
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_2_maria.result48
-rw-r--r--mysql-test/suite/parts/r/partition_alter2_2_myisam.result48
-rw-r--r--mysql-test/suite/parts/r/partition_alter3_innodb.result52
-rw-r--r--mysql-test/suite/parts/r/partition_alter3_myisam.result52
-rw-r--r--mysql-test/suite/parts/r/partition_alter4_innodb.result768
-rw-r--r--mysql-test/suite/parts/r/partition_alter4_myisam.result768
-rw-r--r--mysql-test/suite/parts/r/partition_basic_innodb.result256
-rw-r--r--mysql-test/suite/parts/r/partition_basic_myisam.result128
-rw-r--r--mysql-test/suite/parts/r/partition_basic_symlink_myisam.result156
-rw-r--r--mysql-test/suite/parts/r/partition_engine_innodb.result44
-rw-r--r--mysql-test/suite/parts/r/partition_engine_myisam.result44
-rw-r--r--mysql-test/suite/parts/r/partition_syntax_innodb.result44
-rw-r--r--mysql-test/suite/parts/r/partition_syntax_myisam.result44
-rw-r--r--mysql-test/suite/perfschema/r/nesting.result134
-rw-r--r--mysql-test/suite/perfschema/r/threads_mysql.result11
-rw-r--r--mysql-test/suite/perfschema/t/privilege_table_io.test3
-rw-r--r--mysql-test/suite/plugins/r/cracklib_password_check.result2
-rw-r--r--mysql-test/suite/plugins/r/pam_cleartext.result5
-rw-r--r--mysql-test/suite/plugins/r/simple_password_check.result6
-rw-r--r--mysql-test/suite/plugins/t/pam.test3
-rw-r--r--mysql-test/suite/plugins/t/pam_cleartext.test19
-rw-r--r--mysql-test/suite/roles/definer.result21
-rw-r--r--mysql-test/suite/roles/definer.test2
-rw-r--r--mysql-test/suite/rpl/r/parallel_conflicts.result312
-rw-r--r--mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_multi_engine.result48
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel.result341
-rw-r--r--mysql-test/suite/rpl/r/rpl_parallel_conflicts.result333
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_basic_8partition.result72
-rw-r--r--mysql-test/suite/rpl/r/rpl_temporary.result58
-rw-r--r--mysql-test/suite/rpl/t/rpl_mdev6020.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel.test267
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_conflicts-slave.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_parallel_conflicts.test261
-rw-r--r--mysql-test/suite/rpl/t/rpl_temporary.test56
-rw-r--r--mysql-test/suite/sys_vars/r/general_log_file_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/optimizer_switch_basic.result36
-rw-r--r--mysql-test/suite/sys_vars/r/server_id_basic.result18
-rw-r--r--mysql-test/suite/sys_vars/r/session_track_system_variables_basic.result164
-rw-r--r--mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_aria.result6
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb,32bit,xtradb.rdiff-disabled32
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff-disabled30
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_innodb.result130
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff183
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_embedded.result62
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.rdiff17
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result118
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_wsrep.result16
-rw-r--r--mysql-test/suite/sys_vars/r/wsrep_desync_basic.result4
-rw-r--r--mysql-test/suite/sys_vars/r/wsrep_max_ws_rows_basic.result6
-rw-r--r--mysql-test/suite/sys_vars/r/wsrep_max_ws_size_basic.result27
-rw-r--r--mysql-test/suite/sys_vars/r/wsrep_provider_options_basic.result1
-rw-r--r--mysql-test/suite/sys_vars/t/general_log_file_basic.test14
-rw-r--r--mysql-test/suite/sys_vars/t/server_id_basic.test2
-rw-r--r--mysql-test/suite/sys_vars/t/session_track_system_variables_basic.test129
-rw-r--r--mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test14
-rw-r--r--mysql-test/suite/sys_vars/t/sysvars_wsrep.test4
-rw-r--r--mysql-test/suite/sys_vars/t/wsrep_max_ws_size_basic.test13
-rw-r--r--mysql-test/suite/sys_vars/t/wsrep_provider_options_basic.test2
-rw-r--r--mysql-test/suite/vcol/r/charsets.result31
-rw-r--r--mysql-test/suite/vcol/r/not_supported.result6
-rw-r--r--mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result21
-rw-r--r--mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result75
-rw-r--r--mysql-test/suite/vcol/t/charsets.test19
-rw-r--r--mysql-test/suite/vcol/t/not_supported.test6
-rw-r--r--mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_main.inc25
-rw-r--r--mysql-test/suite/vcol/t/vcol_supported_sql_funcs_main.inc30
-rw-r--r--mysql-test/suite/wsrep/r/variables.result4
-rw-r--r--mysql-test/suite/wsrep/t/mdev_10186.test1
-rw-r--r--mysql-test/suite/wsrep/t/variables.test2
-rw-r--r--mysql-test/t/alter_table.test14
-rw-r--r--mysql-test/t/cte_nonrecursive.test129
-rw-r--r--mysql-test/t/cte_recursive.test1196
-rw-r--r--mysql-test/t/ctype_big5.test20
-rw-r--r--mysql-test/t/ctype_cp932.test20
-rw-r--r--mysql-test/t/ctype_eucjpms.test14
-rw-r--r--mysql-test/t/ctype_euckr.test20
-rw-r--r--mysql-test/t/ctype_gb2312.test20
-rw-r--r--mysql-test/t/ctype_gbk.test11
-rw-r--r--mysql-test/t/ctype_latin1.test20
-rw-r--r--mysql-test/t/ctype_ldml-master.opt2
-rw-r--r--mysql-test/t/ctype_ldml.test73
-rw-r--r--mysql-test/t/ctype_nopad_8bit.test239
-rw-r--r--mysql-test/t/ctype_sjis.test11
-rw-r--r--mysql-test/t/ctype_swe7.test21
-rw-r--r--mysql-test/t/ctype_tis620.test20
-rw-r--r--mysql-test/t/ctype_ucs.test20
-rw-r--r--mysql-test/t/ctype_ujis.test14
-rw-r--r--mysql-test/t/ctype_utf16.test20
-rw-r--r--mysql-test/t/ctype_utf16le.test20
-rw-r--r--mysql-test/t/ctype_utf32.test20
-rw-r--r--mysql-test/t/ctype_utf8.test12
-rw-r--r--mysql-test/t/ctype_utf8mb4.test11
-rw-r--r--mysql-test/t/default.test47
-rw-r--r--mysql-test/t/default_session.test82
-rw-r--r--mysql-test/t/derived_cond_pushdown.test925
-rw-r--r--mysql-test/t/derived_view.test18
-rw-r--r--mysql-test/t/empty_table.test9
-rw-r--r--mysql-test/t/features.test8
-rw-r--r--mysql-test/t/func_group.test63
-rw-r--r--mysql-test/t/func_math.test14
-rw-r--r--mysql-test/t/func_misc.test10
-rw-r--r--mysql-test/t/func_time.test74
-rw-r--r--mysql-test/t/group_by.test36
-rw-r--r--mysql-test/t/group_by_innodb.test30
-rw-r--r--mysql-test/t/information_schema_stats.test2
-rw-r--r--mysql-test/t/init_file.opt2
-rw-r--r--mysql-test/t/innodb_ext_key.test85
-rw-r--r--mysql-test/t/loaddata.test26
-rw-r--r--mysql-test/t/myisam_enable_keys-10506.test117
-rw-r--r--mysql-test/t/mysqlcheck.test47
-rw-r--r--mysql-test/t/named_pipe.test9
-rw-r--r--mysql-test/t/openssl_1.test6
-rw-r--r--mysql-test/t/parser.test48
-rw-r--r--mysql-test/t/partition_default.test522
-rw-r--r--mysql-test/t/ps_1general.test7
-rw-r--r--mysql-test/t/range.test29
-rw-r--r--mysql-test/t/reopen_temp_table.test21
-rw-r--r--mysql-test/t/sp-prelocking.test26
-rw-r--r--mysql-test/t/ssl.test6
-rw-r--r--mysql-test/t/ssl_ca.test14
-rw-r--r--mysql-test/t/ssl_compress.test6
-rw-r--r--mysql-test/t/ssl_timeout.test3
-rw-r--r--mysql-test/t/stat_tables_innodb_debug.test36
-rw-r--r--mysql-test/t/stat_tables_myisam_debug.test33
-rw-r--r--mysql-test/t/subselect.test17
-rw-r--r--mysql-test/t/subselect_sj_mat.test12
-rw-r--r--mysql-test/t/temp_table.test48
-rw-r--r--mysql-test/t/type_date.test15
-rw-r--r--mysql-test/t/type_timestamp_hires.test32
-rw-r--r--mysql-test/t/view.test35
-rw-r--r--mysql-test/t/win.test41
-rw-r--r--mysql-test/t/win_min_max.test49
-rw-r--r--mysql-test/t/xtradb_mrr.test4
-rw-r--r--mysql-test/unstable-tests355
-rw-r--r--mysql-test/valgrind.supp110
-rw-r--r--mysys/CMakeLists.txt2
-rw-r--r--mysys/charset-def.c32
-rw-r--r--mysys/charset.c132
-rw-r--r--mysys/checksum.c6
-rw-r--r--mysys/my_context.c17
-rw-r--r--mysys/my_crc32.c23
-rw-r--r--mysys/stacktrace.c30
-rw-r--r--plugin/auth_pam/auth_pam.c30
-rw-r--r--plugin/aws_key_management/aws_key_management_plugin.cc2
-rw-r--r--plugin/cracklib_password_check/cracklib_password_check.c2
-rw-r--r--plugin/file_key_management/file_key_management_plugin.cc2
-rw-r--r--plugin/query_response_time/mysql-test/query_response_time/basic.result4
-rw-r--r--plugin/query_response_time/plugin.cc2
-rw-r--r--plugin/simple_password_check/simple_password_check.c24
-rw-r--r--plugin/userstat/userstat.cc4
-rw-r--r--plugin/wsrep_info/plugin.cc4
-rw-r--r--scripts/CMakeLists.txt13
-rw-r--r--scripts/galera_recovery.sh3
-rw-r--r--scripts/mysql_secure_installation.pl.in2
-rw-r--r--scripts/mysql_secure_installation.sh2
-rw-r--r--scripts/wsrep_sst_common.sh2
-rw-r--r--scripts/wsrep_sst_rsync.sh3
-rw-r--r--scripts/wsrep_sst_xtrabackup-v2.sh6
-rw-r--r--scripts/wsrep_sst_xtrabackup.sh6
-rw-r--r--sql-bench/server-cfg.sh5
-rwxr-xr-xsql-bench/test-table-elimination.sh1
-rw-r--r--sql-common/client.c6
-rw-r--r--sql-common/my_time.c4
-rw-r--r--sql-common/mysql_async.c6
-rw-r--r--sql-common/pack.c22
-rw-r--r--sql/CMakeLists.txt4
-rw-r--r--sql/contributors.h21
-rw-r--r--sql/field.cc127
-rw-r--r--sql/field.h72
-rw-r--r--sql/handler.cc47
-rw-r--r--sql/handler.h1
-rw-r--r--sql/item.cc331
-rw-r--r--sql/item.h128
-rw-r--r--sql/item_cmpfunc.cc37
-rw-r--r--sql/item_cmpfunc.h104
-rw-r--r--sql/item_func.cc21
-rw-r--r--sql/item_func.h169
-rw-r--r--sql/item_geofunc.h69
-rw-r--r--sql/item_inetfunc.h16
-rw-r--r--sql/item_row.cc18
-rw-r--r--sql/item_row.h3
-rw-r--r--sql/item_strfunc.cc91
-rw-r--r--sql/item_strfunc.h193
-rw-r--r--sql/item_subselect.cc55
-rw-r--r--sql/item_subselect.h17
-rw-r--r--sql/item_sum.cc46
-rw-r--r--sql/item_sum.h61
-rw-r--r--sql/item_timefunc.cc40
-rw-r--r--sql/item_timefunc.h148
-rw-r--r--sql/item_windowfunc.cc43
-rw-r--r--sql/item_windowfunc.h112
-rw-r--r--sql/item_xmlfunc.cc34
-rw-r--r--sql/item_xmlfunc.h4
-rw-r--r--sql/lock.cc95
-rw-r--r--sql/log.cc57
-rw-r--r--sql/log.h1
-rw-r--r--sql/log_event.cc1
-rw-r--r--sql/mdl.cc141
-rw-r--r--sql/multi_range_read.cc2
-rw-r--r--sql/my_json_writer.cc2
-rw-r--r--sql/mysqld.cc173
-rw-r--r--sql/mysqld.h20
-rw-r--r--sql/net_serv.cc98
-rw-r--r--sql/opt_range.cc69
-rw-r--r--sql/opt_range_mrr.cc6
-rw-r--r--sql/opt_subselect.cc9
-rw-r--r--sql/partition_element.h2
-rw-r--r--sql/partition_info.cc158
-rw-r--r--sql/partition_info.h10
-rw-r--r--sql/procedure.h1
-rw-r--r--sql/protocol.cc134
-rw-r--r--sql/rpl_mi.cc7
-rw-r--r--sql/rpl_parallel.cc43
-rw-r--r--sql/rpl_rli.cc6
-rw-r--r--sql/rpl_rli.h7
-rw-r--r--sql/session_tracker.cc1710
-rw-r--r--sql/session_tracker.h304
-rw-r--r--sql/set_var.cc62
-rw-r--r--sql/set_var.h7
-rw-r--r--sql/share/charsets/Index.xml139
-rw-r--r--sql/share/errmsg-utf8.txt56
-rw-r--r--sql/signal_handler.cc24
-rw-r--r--sql/slave.cc168
-rw-r--r--sql/slave.h1
-rw-r--r--sql/sp_head.cc17
-rw-r--r--sql/sql_acl.cc17
-rw-r--r--sql/sql_admin.cc299
-rw-r--r--sql/sql_alter.h2
-rw-r--r--sql/sql_base.cc74
-rw-r--r--sql/sql_cache.cc29
-rw-r--r--sql/sql_class.cc104
-rw-r--r--sql/sql_class.h65
-rw-r--r--sql/sql_cte.cc952
-rw-r--r--sql/sql_cte.h334
-rw-r--r--sql/sql_db.cc14
-rw-r--r--sql/sql_delete.cc4
-rw-r--r--sql/sql_derived.cc316
-rw-r--r--sql/sql_derived.h8
-rw-r--r--sql/sql_explain.cc7
-rw-r--r--sql/sql_explain.h2
-rw-r--r--sql/sql_insert.cc6
-rw-r--r--sql/sql_lex.cc242
-rw-r--r--sql/sql_lex.h70
-rw-r--r--sql/sql_parse.cc130
-rw-r--r--sql/sql_partition.cc139
-rw-r--r--sql/sql_partition.h4
-rw-r--r--sql/sql_plugin.cc177
-rw-r--r--sql/sql_plugin.h8
-rw-r--r--sql/sql_prepare.cc4
-rw-r--r--sql/sql_priv.h4
-rw-r--r--sql/sql_reload.cc6
-rw-r--r--sql/sql_rename.cc34
-rw-r--r--sql/sql_repl.cc12
-rw-r--r--sql/sql_repl.h1
-rw-r--r--sql/sql_select.cc190
-rw-r--r--sql/sql_select.h16
-rw-r--r--sql/sql_show.cc282
-rw-r--r--sql/sql_show.h6
-rw-r--r--sql/sql_string.cc16
-rw-r--r--sql/sql_string.h12
-rw-r--r--sql/sql_table.cc375
-rw-r--r--sql/sql_table.h3
-rw-r--r--sql/sql_union.cc316
-rw-r--r--sql/sql_update.cc8
-rw-r--r--sql/sql_view.cc21
-rw-r--r--sql/sql_window.cc1440
-rw-r--r--sql/sql_window.h37
-rw-r--r--sql/sql_yacc.yy104
-rw-r--r--sql/sys_vars.cc170
-rw-r--r--sql/sys_vars.ic169
-rw-r--r--sql/table.cc572
-rw-r--r--sql/table.h35
-rw-r--r--sql/table_cache.cc374
-rw-r--r--sql/table_cache.h22
-rw-r--r--sql/threadpool_common.cc3
-rw-r--r--sql/transaction.cc95
-rw-r--r--sql/transaction.h2
-rw-r--r--sql/unireg.cc11
-rw-r--r--sql/wsrep_applier.cc10
-rw-r--r--sql/wsrep_binlog.h2
-rw-r--r--sql/wsrep_check_opts.cc2
-rw-r--r--sql/wsrep_hton.cc11
-rw-r--r--sql/wsrep_mysqld.cc248
-rw-r--r--sql/wsrep_mysqld.h10
-rw-r--r--sql/wsrep_notify.cc1
-rw-r--r--sql/wsrep_sst.cc37
-rw-r--r--sql/wsrep_sst.h5
-rw-r--r--sql/wsrep_thd.cc14
-rw-r--r--sql/wsrep_var.cc123
-rw-r--r--sql/wsrep_var.h5
-rw-r--r--storage/connect/ApacheInterface.java58
-rw-r--r--storage/connect/CMakeLists.txt28
-rw-r--r--storage/connect/Client.java183
-rw-r--r--storage/connect/JdbcApacheInterface.classbin15357 -> 0 bytes
-rw-r--r--storage/connect/JdbcApacheInterface.java709
-rw-r--r--storage/connect/JdbcDSInterface.classbin16175 -> 0 bytes
-rw-r--r--storage/connect/JdbcDSInterface.java743
-rw-r--r--storage/connect/JdbcInterface.classbin15215 -> 0 bytes
-rw-r--r--storage/connect/JdbcInterface.java124
-rw-r--r--storage/connect/MariadbInterface.java69
-rw-r--r--storage/connect/MysqlInterface.java69
-rw-r--r--storage/connect/OracleInterface.java69
-rw-r--r--storage/connect/PostgresqlInterface.java69
-rw-r--r--storage/connect/connect.h4
-rw-r--r--storage/connect/csort.cpp17
-rw-r--r--storage/connect/ha_connect.cc47
-rw-r--r--storage/connect/jdbconn.cpp192
-rw-r--r--storage/connect/jdbconn.h7
-rw-r--r--storage/connect/json.cpp4
-rw-r--r--storage/connect/jsonudf.cpp12
-rw-r--r--storage/connect/mysql-test/connect/r/bin.result4
-rw-r--r--storage/connect/mysql-test/connect/r/jdbc.result20
-rw-r--r--storage/connect/mysql-test/connect/r/jdbc_new.result21
-rw-r--r--storage/connect/mysql-test/connect/r/mysql_discovery.result4
-rw-r--r--storage/connect/mysql-test/connect/std_data/JdbcMariaDB.jarbin0 -> 5993273 bytes
-rw-r--r--storage/connect/mysql-test/connect/t/jdbc.test12
-rw-r--r--storage/connect/mysql-test/connect/t/jdbc_new.test5
-rw-r--r--storage/connect/mysql-test/connect/t/jdbconn.inc13
-rw-r--r--storage/connect/mysql-test/connect/t/jdbconn_cleanup.inc2
-rw-r--r--storage/connect/odbconn.cpp13
-rw-r--r--storage/connect/odbconn.h2
-rw-r--r--storage/connect/tabjdbc.cpp20
-rw-r--r--storage/connect/tabjdbc.h2
-rw-r--r--storage/connect/tabodbc.cpp18
-rwxr-xr-xstorage/connect/xindex.cpp11
-rw-r--r--storage/innobase/CMakeLists.txt10
-rw-r--r--storage/innobase/buf/buf0buf.cc6
-rw-r--r--storage/innobase/handler/ha_innodb.cc4
-rw-r--r--storage/innobase/handler/handler0alter.cc8
-rw-r--r--storage/innobase/handler/i_s.cc66
-rw-r--r--storage/innobase/lock/lock0lock.cc5
-rw-r--r--storage/innobase/page/page0cur.cc20
-rw-r--r--storage/innobase/row/row0upd.cc4
-rw-r--r--storage/innobase/ut/crc32_power8/crc32.S775
-rw-r--r--storage/innobase/ut/ut0crc32.cc26
-rw-r--r--storage/maria/ma_extra.c1
-rw-r--r--storage/mroonga/mysql-test/mroonga/include/mroonga/skip_solaris10.inc3
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_before_unix_epoch.test1
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_64bit_equal.test1
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_asc.test1
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_desc.test1
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_index_read.test1
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_asc.test1
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_desc.test1
-rw-r--r--storage/myisam/ha_myisam.cc3
-rw-r--r--storage/myisam/mi_extra.c1
-rw-r--r--storage/perfschema/ha_perfschema.cc2
-rw-r--r--storage/perfschema/table_events_statements.cc16
-rw-r--r--storage/test_sql_discovery/mysql-test/sql_discovery/simple.result2
-rw-r--r--storage/tokudb/CMakeLists.txt6
-rw-r--r--storage/tokudb/PerconaFT/buildheader/make_tdb.cc2
-rw-r--r--storage/tokudb/PerconaFT/src/ydb-internal.h1
-rw-r--r--storage/tokudb/PerconaFT/src/ydb.cc152
-rw-r--r--storage/tokudb/hatoku_defines.h4
-rw-r--r--storage/tokudb/hatoku_hton.cc4
-rw-r--r--storage/tokudb/mysql-test/rpl/r/rpl_extra_col_slave_tokudb.result2
-rw-r--r--storage/tokudb/mysql-test/rpl/t/suite.opt2
-rw-r--r--storage/tokudb/mysql-test/tokudb/bulk-fetch-gen.py1
-rw-r--r--storage/tokudb/mysql-test/tokudb/locks-blocking-row-locks-testgen.py1
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/background_job_manager.result2
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/change_column_int_default.result40
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/ext_key_1_innodb.result8
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/ext_key_1_tokudb.result8
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/ext_key_2_innodb.result4
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/ext_key_2_tokudb.result4
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/type_enum.result2
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/type_newdecimal.result4
-rw-r--r--storage/tokudb/mysql-test/tokudb/replace-ignore-gen.py1
-rwxr-xr-x[-rw-r--r--]storage/tokudb/mysql-test/tokudb/t/change_column_bin.py1
-rwxr-xr-x[-rw-r--r--]storage/tokudb/mysql-test/tokudb/t/change_column_bin_rename.py1
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/change_column_blob.py1
-rwxr-xr-x[-rw-r--r--]storage/tokudb/mysql-test/tokudb/t/change_column_char.py1
-rwxr-xr-x[-rw-r--r--]storage/tokudb/mysql-test/tokudb/t/change_column_char_binary.py1
-rwxr-xr-x[-rw-r--r--]storage/tokudb/mysql-test/tokudb/t/change_column_char_charbinary.py1
-rwxr-xr-x[-rw-r--r--]storage/tokudb/mysql-test/tokudb/t/change_column_char_rename.py1
-rwxr-xr-x[-rw-r--r--]storage/tokudb/mysql-test/tokudb/t/change_column_int.py1
-rwxr-xr-x[-rw-r--r--]storage/tokudb/mysql-test/tokudb/t/change_column_int_key.py1
-rwxr-xr-x[-rw-r--r--]storage/tokudb/mysql-test/tokudb/t/change_column_int_not_supported.py1
-rwxr-xr-x[-rw-r--r--]storage/tokudb/mysql-test/tokudb/t/change_column_int_rename.py1
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/change_column_multiple_columns.py1
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/change_column_text.py1
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_lock_waits_released.test3
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_locks_released.test3
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/suite.opt2
-rw-r--r--storage/tokudb/mysql-test/tokudb_add_index/t/suite.opt2
-rw-r--r--storage/tokudb/mysql-test/tokudb_alter_table/r/alter_column_default.result6
-rw-r--r--storage/tokudb/mysql-test/tokudb_alter_table/t/suite.opt2
-rw-r--r--storage/tokudb/mysql-test/tokudb_backup/t/suite.opt2
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/t/suite.opt2
-rw-r--r--storage/tokudb/mysql-test/tokudb_mariadb/r/alter.result10
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_1_2_tokudb.result224
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_1_tokudb.result128
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_2_tokudb.result320
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_1_1_tokudb.result80
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_2_1_tokudb.result80
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/r/partition_alter3_tokudb.result52
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/r/partition_alter4_tokudb.result960
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/r/partition_basic_tokudb.result256
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/r/partition_engine_tokudb.result44
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/r/partition_syntax_tokudb.result44
-rw-r--r--storage/tokudb/mysql-test/tokudb_parts/t/suite.opt2
-rw-r--r--storage/tokudb/mysql-test/tokudb_rpl/t/rpl_rfr_disable_on_expl_pk_absence-slave.opt2
-rw-r--r--storage/tokudb/mysql-test/tokudb_sys_vars/t/suite.opt2
-rw-r--r--storage/tokudb/tokudb_sysvars.cc19
-rw-r--r--storage/tokudb/tokudb_sysvars.h4
-rw-r--r--storage/xtradb/CMakeLists.txt10
-rw-r--r--storage/xtradb/btr/btr0btr.cc16
-rw-r--r--storage/xtradb/btr/btr0cur.cc16
-rw-r--r--storage/xtradb/btr/btr0sea.cc4
-rw-r--r--storage/xtradb/buf/buf0buddy.cc6
-rw-r--r--storage/xtradb/buf/buf0buf.cc107
-rw-r--r--storage/xtradb/buf/buf0dump.cc8
-rw-r--r--storage/xtradb/buf/buf0flu.cc22
-rw-r--r--storage/xtradb/buf/buf0lru.cc18
-rw-r--r--storage/xtradb/data/data0data.cc7
-rw-r--r--storage/xtradb/dict/dict0crea.cc12
-rw-r--r--storage/xtradb/dict/dict0dict.cc14
-rw-r--r--storage/xtradb/dict/dict0load.cc26
-rw-r--r--storage/xtradb/dict/dict0mem.cc4
-rw-r--r--storage/xtradb/dict/dict0stats_bg.cc12
-rw-r--r--storage/xtradb/fil/fil0fil.cc28
-rw-r--r--storage/xtradb/fsp/fsp0fsp.cc39
-rw-r--r--storage/xtradb/fts/fts0blex.cc26
-rw-r--r--storage/xtradb/fts/fts0fts.cc62
-rw-r--r--storage/xtradb/fts/fts0opt.cc52
-rw-r--r--storage/xtradb/fts/fts0que.cc28
-rw-r--r--storage/xtradb/fts/fts0tlex.cc26
-rwxr-xr-xstorage/xtradb/fts/make_parser.sh28
-rw-r--r--storage/xtradb/handler/ha_innodb.cc79
-rw-r--r--storage/xtradb/handler/ha_innodb.h18
-rw-r--r--storage/xtradb/handler/handler0alter.cc86
-rw-r--r--storage/xtradb/handler/i_s.cc68
-rw-r--r--storage/xtradb/handler/xtradb_i_s.cc6
-rw-r--r--storage/xtradb/ibuf/ibuf0ibuf.cc141
-rw-r--r--storage/xtradb/include/api0api.h4
-rw-r--r--storage/xtradb/include/btr0btr.h78
-rw-r--r--storage/xtradb/include/btr0btr.ic20
-rw-r--r--storage/xtradb/include/btr0cur.h38
-rw-r--r--storage/xtradb/include/btr0pcur.h4
-rw-r--r--storage/xtradb/include/btr0sea.h16
-rw-r--r--storage/xtradb/include/btr0types.h18
-rw-r--r--storage/xtradb/include/buf0buddy.h6
-rw-r--r--storage/xtradb/include/buf0buddy.ic6
-rw-r--r--storage/xtradb/include/buf0buf.h76
-rw-r--r--storage/xtradb/include/buf0flu.h8
-rw-r--r--storage/xtradb/include/buf0lru.h10
-rw-r--r--storage/xtradb/include/data0data.h84
-rw-r--r--storage/xtradb/include/data0data.ic8
-rw-r--r--storage/xtradb/include/dict0boot.h8
-rw-r--r--storage/xtradb/include/dict0crea.h8
-rw-r--r--storage/xtradb/include/dict0crea.ic4
-rw-r--r--storage/xtradb/include/dict0dict.h248
-rw-r--r--storage/xtradb/include/dict0dict.ic9
-rw-r--r--storage/xtradb/include/dict0load.h4
-rw-r--r--storage/xtradb/include/dict0mem.h18
-rw-r--r--storage/xtradb/include/dict0stats.h10
-rw-r--r--storage/xtradb/include/dict0stats_bg.h4
-rw-r--r--storage/xtradb/include/dyn0dyn.h22
-rw-r--r--storage/xtradb/include/dyn0dyn.ic4
-rw-r--r--storage/xtradb/include/fil0fil.h20
-rw-r--r--storage/xtradb/include/fsp0fsp.h18
-rw-r--r--storage/xtradb/include/fts0ast.h10
-rw-r--r--storage/xtradb/include/fts0fts.h46
-rw-r--r--storage/xtradb/include/fts0priv.h88
-rw-r--r--storage/xtradb/include/fts0priv.ic4
-rw-r--r--storage/xtradb/include/ha_prototypes.h22
-rw-r--r--storage/xtradb/include/handler0alter.h10
-rw-r--r--storage/xtradb/include/ibuf0ibuf.h44
-rw-r--r--storage/xtradb/include/lock0lock.h36
-rw-r--r--storage/xtradb/include/lock0priv.h4
-rw-r--r--storage/xtradb/include/log0online.h4
-rw-r--r--storage/xtradb/include/log0recv.h4
-rw-r--r--storage/xtradb/include/mach0data.h38
-rw-r--r--storage/xtradb/include/mem0mem.h4
-rw-r--r--storage/xtradb/include/mem0mem.ic6
-rw-r--r--storage/xtradb/include/mtr0mtr.h10
-rw-r--r--storage/xtradb/include/mtr0mtr.ic4
-rw-r--r--storage/xtradb/include/os0file.h12
-rw-r--r--storage/xtradb/include/os0sync.h21
-rw-r--r--storage/xtradb/include/os0thread.h4
-rw-r--r--storage/xtradb/include/page0cur.h8
-rw-r--r--storage/xtradb/include/page0page.h56
-rw-r--r--storage/xtradb/include/page0types.h10
-rw-r--r--storage/xtradb/include/page0zip.h50
-rw-r--r--storage/xtradb/include/pars0pars.h6
-rw-r--r--storage/xtradb/include/read0read.h4
-rw-r--r--storage/xtradb/include/rem0cmp.h6
-rw-r--r--storage/xtradb/include/rem0rec.h152
-rw-r--r--storage/xtradb/include/rem0rec.ic5
-rw-r--r--storage/xtradb/include/row0ftsort.h8
-rw-r--r--storage/xtradb/include/row0import.h8
-rw-r--r--storage/xtradb/include/row0ins.h14
-rw-r--r--storage/xtradb/include/row0log.h32
-rw-r--r--storage/xtradb/include/row0merge.h34
-rw-r--r--storage/xtradb/include/row0mysql.h42
-rw-r--r--storage/xtradb/include/row0purge.h8
-rw-r--r--storage/xtradb/include/row0quiesce.h8
-rw-r--r--storage/xtradb/include/row0row.h30
-rw-r--r--storage/xtradb/include/row0sel.h6
-rw-r--r--storage/xtradb/include/row0uins.h4
-rw-r--r--storage/xtradb/include/row0umod.h4
-rw-r--r--storage/xtradb/include/row0upd.h18
-rw-r--r--storage/xtradb/include/row0vers.h6
-rw-r--r--storage/xtradb/include/srv0srv.h8
-rw-r--r--storage/xtradb/include/srv0start.h6
-rw-r--r--storage/xtradb/include/sync0arr.h4
-rw-r--r--storage/xtradb/include/sync0rw.h8
-rw-r--r--storage/xtradb/include/sync0rw.ic4
-rw-r--r--storage/xtradb/include/sync0sync.h12
-rw-r--r--storage/xtradb/include/sync0sync.ic5
-rw-r--r--storage/xtradb/include/trx0rec.h14
-rw-r--r--storage/xtradb/include/trx0roll.h16
-rw-r--r--storage/xtradb/include/trx0sys.h6
-rw-r--r--storage/xtradb/include/trx0trx.h28
-rw-r--r--storage/xtradb/include/trx0trx.ic2
-rw-r--r--storage/xtradb/include/trx0undo.h14
-rw-r--r--storage/xtradb/include/univ.i13
-rw-r--r--storage/xtradb/include/ut0byte.h8
-rw-r--r--storage/xtradb/include/ut0dbg.h4
-rw-r--r--storage/xtradb/include/ut0mem.h4
-rw-r--r--storage/xtradb/include/ut0rnd.h12
-rw-r--r--storage/xtradb/include/ut0ut.h8
-rw-r--r--storage/xtradb/lock/lock0lock.cc45
-rw-r--r--storage/xtradb/lock/lock0wait.cc4
-rw-r--r--storage/xtradb/log/log0log.cc4
-rw-r--r--storage/xtradb/log/log0online.cc4
-rw-r--r--storage/xtradb/log/log0recv.cc52
-rw-r--r--storage/xtradb/mem/mem0dbg.cc6
-rw-r--r--storage/xtradb/mtr/mtr0mtr.cc8
-rw-r--r--storage/xtradb/os/os0file.cc18
-rw-r--r--storage/xtradb/os/os0sync.cc2
-rw-r--r--storage/xtradb/page/page0cur.cc20
-rw-r--r--storage/xtradb/page/page0page.cc4
-rw-r--r--storage/xtradb/page/page0zip.cc11
-rw-r--r--storage/xtradb/pars/lexyy.cc10
-rwxr-xr-xstorage/xtradb/pars/make_flex.sh12
-rw-r--r--storage/xtradb/pars/pars0pars.cc8
-rw-r--r--storage/xtradb/rem/rem0cmp.cc19
-rw-r--r--storage/xtradb/rem/rem0rec.cc12
-rw-r--r--storage/xtradb/row/row0ftsort.cc18
-rw-r--r--storage/xtradb/row/row0import.cc37
-rw-r--r--storage/xtradb/row/row0ins.cc30
-rw-r--r--storage/xtradb/row/row0log.cc34
-rw-r--r--storage/xtradb/row/row0merge.cc20
-rw-r--r--storage/xtradb/row/row0mysql.cc23
-rw-r--r--storage/xtradb/row/row0purge.cc24
-rw-r--r--storage/xtradb/row/row0quiesce.cc16
-rw-r--r--storage/xtradb/row/row0row.cc18
-rw-r--r--storage/xtradb/row/row0sel.cc20
-rw-r--r--storage/xtradb/row/row0uins.cc10
-rw-r--r--storage/xtradb/row/row0umod.cc27
-rw-r--r--storage/xtradb/row/row0undo.cc7
-rw-r--r--storage/xtradb/row/row0upd.cc29
-rw-r--r--storage/xtradb/srv/srv0srv.cc24
-rw-r--r--storage/xtradb/srv/srv0start.cc10
-rw-r--r--storage/xtradb/sync/sync0sync.cc6
-rw-r--r--storage/xtradb/trx/trx0purge.cc4
-rw-r--r--storage/xtradb/trx/trx0rec.cc10
-rw-r--r--storage/xtradb/trx/trx0roll.cc6
-rw-r--r--storage/xtradb/trx/trx0trx.cc14
-rw-r--r--storage/xtradb/trx/trx0undo.cc14
-rw-r--r--storage/xtradb/ut/crc32_power8/crc32_constants.h911
-rw-r--r--storage/xtradb/ut/crc32_power8/crc32_wrapper.c68
-rw-r--r--storage/xtradb/ut/crc32_power8/ppc-opcode.h23
-rw-r--r--storage/xtradb/ut/ut0crc32.cc32
-rw-r--r--strings/conf_to_src.c222
-rw-r--r--strings/ctype-big5.c114
-rw-r--r--strings/ctype-bin.c74
-rw-r--r--strings/ctype-cp932.c113
-rw-r--r--strings/ctype-euc_kr.c112
-rw-r--r--strings/ctype-eucjpms.c118
-rw-r--r--strings/ctype-extra.c5156
-rw-r--r--strings/ctype-gb2312.c111
-rw-r--r--strings/ctype-gbk.c109
-rw-r--r--strings/ctype-latin1.c66
-rw-r--r--strings/ctype-mb.c70
-rw-r--r--strings/ctype-simple.c185
-rw-r--r--strings/ctype-sjis.c113
-rw-r--r--strings/ctype-tis620.c113
-rw-r--r--strings/ctype-ucs2.c560
-rw-r--r--strings/ctype-ujis.c118
-rw-r--r--strings/ctype-utf8.c443
-rw-r--r--strings/ctype.c52
-rw-r--r--strings/strcoll.ic28
-rw-r--r--strings/strings_def.h7
-rw-r--r--support-files/mariadb.service.in20
-rw-r--r--support-files/mariadb@.service.in26
-rw-r--r--tests/mysql_client_test.c3
-rw-r--r--vio/viosocket.c26
-rw-r--r--wsrep/wsrep_dummy.c11
-rw-r--r--wsrep/wsrep_loader.c37
919 files changed, 70079 insertions, 18930 deletions
diff --git a/.gitignore b/.gitignore
index 279d3f59dc5..ef26322a19d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -198,6 +198,7 @@ storage/tokudb/PerconaFT/tools/tokudb_load
storage/tokudb/PerconaFT/tools/tokuftdump
storage/tokudb/PerconaFT/tools/tokuft_logprint
storage/tokudb/PerconaFT/xz/
+strings/conf_to_src
support-files/MySQL-shared-compat.spec
support-files/binary-configure
support-files/config.huge.ini
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00000000000..b09c348dfab
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,56 @@
+# vim ft=yaml
+# travis-ci.org definition
+
+# non-container builds don't have enough RAM to reliably compile
+sudo: required
+dist: trusty
+
+language: cpp
+compiler:
+ - gcc
+# - clang # See commit f38808 if you want to re-enable clang builds
+cache:
+ apt:
+ ccache:
+
+# Timing on build an test needs to be < 50 minutes. The compile is ~4-5minutes
+# so here we group the tests such that this happens.
+
+addons:
+ apt:
+ packages: # make sure these match debian/control contents
+ - bison
+ - chrpath
+ - cmake
+ - debhelper
+ - dh-apparmor
+ - dpatch
+ - libaio-dev
+ - libboost-dev
+ - libjudy-dev
+ - libncurses5-dev
+ - libpam0g-dev
+ - libreadline-gplv2-dev
+ - libssl-dev
+ - lsb-release
+ - perl
+ - po-debconf
+ - psmisc
+ - zlib1g-dev
+ - libcrack2-dev # no effect as the package is disallowed on Travis-CI
+ - libjemalloc-dev
+ - devscripts # implicit for any build on Ubuntu
+
+script:
+ - ${CC} --version ; ${CXX} --version
+ - cd "${TRAVIS_BUILD_DIR}"
+ - env DEB_BUILD_OPTIONS="parallel=4" debian/autobake-deb.sh;
+
+notifications:
+ irc:
+ channels:
+ - "chat.freenode.net#maria"
+ on_success: never # [always|never|change]
+ on_failure: never
+ template:
+ - "%{repository}/%{branch} (%{commit} - %{author}): %{build_url}: %{message}"
diff --git a/BUILD/autorun.sh b/BUILD/autorun.sh
index 1d7cf5561ad..39346270af9 100755
--- a/BUILD/autorun.sh
+++ b/BUILD/autorun.sh
@@ -19,8 +19,6 @@
# Create MySQL cmake configure wrapper
-die() { echo "$@"; exit 1; }
-
# Use a configure script that will call CMake.
path=`dirname $0`
cp $path/cmake_configure.sh $path/../configure
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5f8ae5b2d9c..a04181fd6ea 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -153,6 +153,7 @@ INCLUDE(plugin)
INCLUDE(install_macros)
INCLUDE(systemd)
INCLUDE(mysql_add_executable)
+INCLUDE(crc32-vpmsum)
# Handle options
OPTION(DISABLE_SHARED
@@ -176,12 +177,16 @@ IF (WITH_ASAN)
# gcc 4.8.1 and new versions of clang
MY_CHECK_AND_SET_COMPILER_FLAG("-fsanitize=address -O1 -Wno-error -fPIC"
DEBUG RELWITHDEBINFO)
+ SET(HAVE_C_FSANITIZE ${HAVE_C__fsanitize_address__O1__Wno_error__fPIC})
+ SET(HAVE_CXX_FSANITIZE ${HAVE_CXX__fsanitize_address__O1__Wno_error__fPIC})
IF(HAVE_C_FSANITIZE AND HAVE_CXX_FSANITIZE)
SET(WITH_ASAN_OK 1)
ELSE()
# older versions of clang
MY_CHECK_AND_SET_COMPILER_FLAG("-faddress-sanitizer -O1 -fPIC"
DEBUG RELWITHDEBINFO)
+ SET(HAVE_C_FADDRESS ${HAVE_C__faddress_sanitizer__O1__fPIC})
+ SET(HAVE_CXX_FADDRESS ${HAVE_CXX__faddress_sanitizer__O1__fPIC})
IF(HAVE_C_FADDRESS AND HAVE_CXX_FADDRESS)
SET(WITH_ASAN_OK 1)
ENDIF()
@@ -442,7 +447,7 @@ ADD_CUSTOM_TARGET(INFO_BIN ALL
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
-INSTALL_DOCUMENTATION(README CREDITS COPYING COPYING.LESSER COPYING.thirdparty
+INSTALL_DOCUMENTATION(README.md CREDITS COPYING COPYING.LESSER COPYING.thirdparty
EXCEPTIONS-CLIENT COMPONENT Readme)
# MDEV-6526 these files are not installed anymore
#INSTALL_DOCUMENTATION(${CMAKE_BINARY_DIR}/Docs/INFO_SRC
diff --git a/CREDITS b/CREDITS
index 1f071e4fb44..f0e6de7f08f 100644
--- a/CREDITS
+++ b/CREDITS
@@ -1,24 +1,26 @@
MariaDB is brought to you by the MariaDB Foundation, a non profit
organization registered in the USA.
-The current main members and sponsors of the MariaDB Foundation are:
-
-MariaDB Corporation http://www.mariadb.com (2013 - 2016)
-Booking.com http://www.booking.com (2013 - 2016)
-Parallels http://www.parallels.com/products/plesk (2013 - 2016)
-Automattic http://automattic.com (2014 - 2016)
-Verkkokauppa.com http://verkkokauppa.com (2015 - 2016)
-Visma http://visma.com/ (2015 - 2016)
-Webyog http://webyog.com (2015 - 2016)
-Wikimedia Foundation http://wikimedia.org (2015 - 2016)
-Acronis http://acronis.com (2016)
-
-For a full list of supporters and sponsors see
+The current main sponsors of the MariaDB Foundation are:
+
+Booking.com http://www.booking.com (2013 - 2016)
+Development Bank of Singapore http://dbs.com (2016)
+MariaDB Corporation https://www.mariadb.com (2013 - 2016)
+Visma http://visma.com (2015 - 2016)
+Acronis http://acronis.com (2016)
+Nexedi https://www.nexedi.com (2016)
+Automattic https://automattic.com (2014 - 2016)
+Verkkokauppa.com https://www.verkkokauppa.com (2015 - 2016)
+Virtuozzo https://virtuozzo.com (2016)
+
+For a full list of sponsors, see
https://mariadb.org/about/supporters/
+and for individual contributors, see
+https://mariadb.org/donate/individual-sponsors/
-You can also do this by running SHOW CONTRIBUTORS.
+You can also get the list of sponsors by running SHOW CONTRIBUTORS.
-For all corporate memberships and sponsorships please contact the
+For all corporate sponsorships please contact the
MariaDB Foundation Board via foundation@mariadb.org.
The MariaDB Foundation is responsible for the MariaDB source
@@ -38,7 +40,7 @@ following services to the MariaDB community:
To be able to do the above we need help from corporations and individuals!
You can help support MariaDB by becoming a MariaDB developer or a
-member or sponsor of the MariaDB Foundation. To donate or sponsor,
+sponsor of the MariaDB Foundation. To donate or sponsor,
go to https://mariadb.org/donate/
You can get a list of all the main authors of MariaDB / MySQL by running
diff --git a/README b/README.md
index a9413f16b04..f34e6a43b71 100644
--- a/README
+++ b/README.md
@@ -1,3 +1,5 @@
+## MariaDB: drop-in replacement for MySQL
+
MariaDB is designed as a drop-in replacement of MySQL(R) with more
features, new storage engines, fewer bugs, and better performance.
@@ -24,10 +26,17 @@ https://mariadb.com/kb/en/mariadb-versus-mysql-compatibility/
As MariaDB is a full replacement of MySQL, the MySQL manual at
http://dev.mysql.com/doc is generally applicable.
+Help:
+-----
+
More help is available from the Maria Discuss mailing list
https://launchpad.net/~maria-discuss
and the #maria IRC channel on Freenode.
+
+License:
+--------
+
***************************************************************************
NOTE:
@@ -42,7 +51,8 @@ and COPYING.thirdparty files.
***************************************************************************
-IMPORTANT:
+Bug Reports:
+------------
Bug and/or error reports regarding MariaDB should be submitted at
http://mariadb.org/jira
@@ -53,3 +63,8 @@ The code for MariaDB, including all revision history, can be found at:
https://github.com/MariaDB/server
***************************************************************************
+
+Code status:
+------------
+
+* [![tests status](https://secure.travis-ci.org/MariaDB/server.png?branch=10.2)](https://travis-ci.org/MariaDB/server) travis-ci.org (10.2 branch)
diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c
index 3e821b183bd..3a6f5462ced 100644
--- a/client/mysqlcheck.c
+++ b/client/mysqlcheck.c
@@ -240,7 +240,7 @@ static int process_selected_tables(char *db, char **table_names, int tables);
static int process_all_tables_in_db(char *database);
static int process_one_db(char *database);
static int use_db(char *database);
-static int handle_request_for_tables(char *tables, size_t length, my_bool view);
+static int handle_request_for_tables(char *, size_t, my_bool, my_bool);
static int dbConnect(char *host, char *user,char *passwd);
static void dbDisconnect(char *host);
static void DBerror(MYSQL *mysql, const char *when);
@@ -577,7 +577,7 @@ static int process_selected_tables(char *db, char **table_names, int tables)
}
*--end = 0;
handle_request_for_tables(table_names_comma_sep + 1, tot_length - 1,
- opt_do_views != 0);
+ opt_do_views != 0, opt_all_in_1);
my_free(table_names_comma_sep);
}
else
@@ -588,7 +588,7 @@ static int process_selected_tables(char *db, char **table_names, int tables)
view= is_view(table);
if (view < 0)
continue;
- handle_request_for_tables(table, table_len, (view == 1));
+ handle_request_for_tables(table, table_len, view == 1, opt_all_in_1);
}
DBUG_RETURN(0);
} /* process_selected_tables */
@@ -616,13 +616,9 @@ static char *fix_table_name(char *dest, char *src)
*dest++= '`';
for (; *src; src++)
{
- switch (*src) {
- case '`': /* escape backtick character */
+ if (*src == '`')
*dest++= '`';
- /* fall through */
- default:
- *dest++= *src;
- }
+ *dest++= *src;
}
*dest++= '`';
@@ -711,9 +707,9 @@ static int process_all_tables_in_db(char *database)
*--end = 0;
*--views_end = 0;
if (tot_length)
- handle_request_for_tables(tables + 1, tot_length - 1, FALSE);
+ handle_request_for_tables(tables + 1, tot_length - 1, FALSE, opt_all_in_1);
if (tot_views_length)
- handle_request_for_tables(views + 1, tot_views_length - 1, TRUE);
+ handle_request_for_tables(views + 1, tot_views_length - 1, TRUE, opt_all_in_1);
my_free(tables);
my_free(views);
}
@@ -739,7 +735,7 @@ static int process_all_tables_in_db(char *database)
!strcmp(row[0], "slow_log")))
continue; /* Skip logging tables */
- handle_request_for_tables(row[0], fixed_name_length(row[0]), view);
+ handle_request_for_tables(row[0], fixed_name_length(row[0]), view, opt_all_in_1);
}
}
mysql_free_result(res);
@@ -800,13 +796,11 @@ static int rebuild_table(char *name)
int rc= 0;
DBUG_ENTER("rebuild_table");
- query= (char*)my_malloc(sizeof(char) * (12 + fixed_name_length(name) + 6 + 1),
+ query= (char*)my_malloc(sizeof(char) * (12 + strlen(name) + 6 + 1),
MYF(MY_WME));
if (!query)
DBUG_RETURN(1);
- ptr= strmov(query, "ALTER TABLE ");
- ptr= fix_table_name(ptr, name);
- ptr= strxmov(ptr, " FORCE", NullS);
+ ptr= strxmov(query, "ALTER TABLE ", name, " FORCE", NullS);
if (verbose >= 3)
puts(query);
if (mysql_real_query(sock, query, (ulong)(ptr - query)))
@@ -870,7 +864,8 @@ static int disable_binlog()
return run_query("SET SQL_LOG_BIN=0", 0);
}
-static int handle_request_for_tables(char *tables, size_t length, my_bool view)
+static int handle_request_for_tables(char *tables, size_t length,
+ my_bool view, my_bool dont_quote)
{
char *query, *end, options[100], message[100];
char table_name_buff[NAME_CHAR_LEN*2*2+1], *table_name;
@@ -929,7 +924,7 @@ static int handle_request_for_tables(char *tables, size_t length, my_bool view)
if (!(query =(char *) my_malloc(query_size, MYF(MY_WME))))
DBUG_RETURN(1);
- if (opt_all_in_1)
+ if (dont_quote)
{
DBUG_ASSERT(strlen(op)+strlen(tables)+strlen(options)+8+1 <= query_size);
@@ -974,6 +969,13 @@ static int handle_request_for_tables(char *tables, size_t length, my_bool view)
DBUG_RETURN(0);
}
+static void insert_table_name(DYNAMIC_ARRAY *arr, char *in, size_t dblen)
+{
+ char buf[NAME_LEN*2+2];
+ in[dblen]= 0;
+ my_snprintf(buf, sizeof(buf), "%`s.%`s", in, in + dblen + 1);
+ insert_dynamic(arr, (uchar*) buf);
+}
static void print_result()
{
@@ -981,16 +983,13 @@ static void print_result()
MYSQL_ROW row;
char prev[(NAME_LEN+9)*3+2];
char prev_alter[MAX_ALTER_STR_SIZE];
- char *db_name;
- uint length_of_db;
+ size_t length_of_db= strlen(sock->db);
uint i;
my_bool found_error=0, table_rebuild=0;
DYNAMIC_ARRAY *array4repair= &tables4repair;
DBUG_ENTER("print_result");
res = mysql_use_result(sock);
- db_name= sock->db;
- length_of_db= strlen(db_name);
prev[0] = '\0';
prev_alter[0]= 0;
@@ -1014,16 +1013,10 @@ static void print_result()
if (prev_alter[0])
insert_dynamic(&alter_table_cmds, (uchar*) prev_alter);
else
- {
- char *table_name= prev + (length_of_db+1);
- insert_dynamic(&tables4rebuild, (uchar*) table_name);
- }
+ insert_table_name(&tables4rebuild, prev, length_of_db);
}
else
- {
- char *table_name= prev + (length_of_db+1);
- insert_dynamic(array4repair, table_name);
- }
+ insert_table_name(array4repair, prev, length_of_db);
}
array4repair= &tables4repair;
found_error=0;
@@ -1068,16 +1061,10 @@ static void print_result()
if (prev_alter[0])
insert_dynamic(&alter_table_cmds, prev_alter);
else
- {
- char *table_name= prev + (length_of_db+1);
- insert_dynamic(&tables4rebuild, table_name);
- }
+ insert_table_name(&tables4rebuild, prev, length_of_db);
}
else
- {
- char *table_name= prev + (length_of_db+1);
- insert_dynamic(array4repair, table_name);
- }
+ insert_table_name(array4repair, prev, length_of_db);
}
mysql_free_result(res);
DBUG_VOID_RETURN;
@@ -1222,7 +1209,7 @@ int main(int argc, char **argv)
for (i = 0; i < tables4repair.elements ; i++)
{
char *name= (char*) dynamic_array_ptr(&tables4repair, i);
- handle_request_for_tables(name, fixed_name_length(name), FALSE);
+ handle_request_for_tables(name, fixed_name_length(name), FALSE, TRUE);
}
for (i = 0; i < tables4rebuild.elements ; i++)
rebuild_table((char*) dynamic_array_ptr(&tables4rebuild, i));
@@ -1233,7 +1220,7 @@ int main(int argc, char **argv)
for (i = 0; i < views4repair.elements ; i++)
{
char *name= (char*) dynamic_array_ptr(&views4repair, i);
- handle_request_for_tables(name, fixed_name_length(name), TRUE);
+ handle_request_for_tables(name, fixed_name_length(name), TRUE, TRUE);
}
}
ret= MY_TEST(first_error);
diff --git a/client/mysqlimport.c b/client/mysqlimport.c
index 5b15155e039..aee445d387d 100644
--- a/client/mysqlimport.c
+++ b/client/mysqlimport.c
@@ -37,6 +37,7 @@
/* Global Thread counter */
uint counter= 0;
+pthread_mutex_t init_mutex;
pthread_mutex_t counter_mutex;
pthread_cond_t count_threshhold;
@@ -421,8 +422,19 @@ static MYSQL *db_connect(char *host, char *database,
MYSQL *mysql;
if (verbose)
fprintf(stdout, "Connecting to %s\n", host ? host : "localhost");
- if (!(mysql= mysql_init(NULL)))
- return 0;
+ if (opt_use_threads && !lock_tables)
+ {
+ pthread_mutex_lock(&init_mutex);
+ if (!(mysql= mysql_init(NULL)))
+ {
+ pthread_mutex_unlock(&init_mutex);
+ return 0;
+ }
+ pthread_mutex_unlock(&init_mutex);
+ }
+ else
+ if (!(mysql= mysql_init(NULL)))
+ return 0;
if (opt_compress)
mysql_options(mysql,MYSQL_OPT_COMPRESS,NullS);
if (opt_local_file)
@@ -614,7 +626,7 @@ error:
pthread_cond_signal(&count_threshhold);
pthread_mutex_unlock(&counter_mutex);
mysql_thread_end();
-
+ pthread_exit(0);
return 0;
}
@@ -638,15 +650,31 @@ int main(int argc, char **argv)
if (opt_use_threads && !lock_tables)
{
- pthread_t mainthread; /* Thread descriptor */
- pthread_attr_t attr; /* Thread attributes */
+ char **save_argv;
+ uint worker_thread_count= 0, table_count= 0, i= 0;
+ pthread_t *worker_threads; /* Thread descriptor */
+ pthread_attr_t attr; /* Thread attributes */
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr,
- PTHREAD_CREATE_DETACHED);
+ PTHREAD_CREATE_JOINABLE);
+ pthread_mutex_init(&init_mutex, NULL);
pthread_mutex_init(&counter_mutex, NULL);
pthread_cond_init(&count_threshhold, NULL);
+ /* Count the number of tables. This number denotes the total number
+ of threads spawn.
+ */
+ save_argv= argv;
+ for (table_count= 0; *argv != NULL; argv++)
+ table_count++;
+ argv= save_argv;
+
+ if (!(worker_threads= (pthread_t*) my_malloc(table_count *
+ sizeof(*worker_threads),
+ MYF(0))))
+ return -2;
+
for (counter= 0; *argv != NULL; argv++) /* Loop through tables */
{
pthread_mutex_lock(&counter_mutex);
@@ -661,15 +689,16 @@ int main(int argc, char **argv)
counter++;
pthread_mutex_unlock(&counter_mutex);
/* now create the thread */
- if (pthread_create(&mainthread, &attr, worker_thread,
- (void *)*argv) != 0)
+ if (pthread_create(&worker_threads[worker_thread_count], &attr,
+ worker_thread, (void *)*argv) != 0)
{
pthread_mutex_lock(&counter_mutex);
counter--;
pthread_mutex_unlock(&counter_mutex);
- fprintf(stderr,"%s: Could not create thread\n",
- my_progname);
+ fprintf(stderr,"%s: Could not create thread\n", my_progname);
+ continue;
}
+ worker_thread_count++;
}
/*
@@ -684,9 +713,18 @@ int main(int argc, char **argv)
pthread_cond_timedwait(&count_threshhold, &counter_mutex, &abstime);
}
pthread_mutex_unlock(&counter_mutex);
+ pthread_mutex_destroy(&init_mutex);
pthread_mutex_destroy(&counter_mutex);
pthread_cond_destroy(&count_threshhold);
pthread_attr_destroy(&attr);
+
+ for(i= 0; i < worker_thread_count; i++)
+ {
+ if (pthread_join(worker_threads[i], NULL))
+ fprintf(stderr,"%s: Could not join worker thread.\n", my_progname);
+ }
+
+ my_free(worker_threads);
}
else
{
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index 4ff408bfa9d..b802642a02c 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -121,7 +121,7 @@ static my_bool tty_password= 0;
static my_bool opt_mark_progress= 0;
static my_bool ps_protocol= 0, ps_protocol_enabled= 0;
static my_bool sp_protocol= 0, sp_protocol_enabled= 0;
-static my_bool view_protocol= 0, view_protocol_enabled= 0, wait_longer= 0;
+static my_bool view_protocol= 0, view_protocol_enabled= 0;
static my_bool cursor_protocol= 0, cursor_protocol_enabled= 0;
static my_bool parsing_disabled= 0;
static my_bool display_result_vertically= FALSE, display_result_lower= FALSE,
@@ -181,6 +181,7 @@ static uint my_end_arg= 0;
static uint opt_tail_lines= 0;
static uint opt_connect_timeout= 0;
+static uint opt_wait_for_pos_timeout= 0;
static char delimiter[MAX_DELIMITER_LENGTH]= ";";
static uint delimiter_length= 1;
@@ -4657,7 +4658,7 @@ void do_sync_with_master2(struct st_command *command, long offset,
MYSQL_ROW row;
MYSQL *mysql= cur_con->mysql;
char query_buf[FN_REFLEN+128];
- int timeout= wait_longer ? 1500 : 300; /* seconds */
+ int timeout= opt_wait_for_pos_timeout;
if (!master_pos.file[0])
die("Calling 'sync_with_master' without calling 'save_master_pos'");
@@ -5012,7 +5013,7 @@ static int my_kill(int pid, int sig)
void do_shutdown_server(struct st_command *command)
{
- long timeout= wait_longer ? 60*5 : 60;
+ long timeout= opt_wait_for_pos_timeout ? opt_wait_for_pos_timeout / 5 : 300;
int pid;
DYNAMIC_STRING ds_pidfile_name;
MYSQL* mysql = cur_con->mysql;
@@ -6951,9 +6952,10 @@ static struct my_option my_long_options[] =
"Number of seconds before connection timeout.",
&opt_connect_timeout, &opt_connect_timeout, 0, GET_UINT, REQUIRED_ARG,
120, 0, 3600 * 12, 0, 0, 0},
- {"wait-longer-for-timeouts", 0,
- "Wait longer for timeouts. Useful when running under valgrind",
- &wait_longer, &wait_longer, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"wait_for_pos_timeout", 0,
+ "Number of seconds to wait for master_pos_wait",
+ &opt_wait_for_pos_timeout, &opt_wait_for_pos_timeout, 0, GET_UINT,
+ REQUIRED_ARG, 300, 0, 3600 * 12, 0, 0, 0},
{"plugin_dir", 0, "Directory for client-side plugins.",
&opt_plugin_dir, &opt_plugin_dir, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
diff --git a/cmake/crc32-vpmsum.cmake b/cmake/crc32-vpmsum.cmake
new file mode 100644
index 00000000000..c1a2dee56e2
--- /dev/null
+++ b/cmake/crc32-vpmsum.cmake
@@ -0,0 +1,5 @@
+IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le")
+ SET(HAVE_CRC32_VPMSUM 1)
+ SET(CRC32_VPMSUM_LIBRARY crc32-vpmsum)
+ ADD_SUBDIRECTORY(extra/crc32-vpmsum)
+ENDIF()
diff --git a/cmake/wsrep.cmake b/cmake/wsrep.cmake
index de7fb5eb946..067a9f128a2 100644
--- a/cmake/wsrep.cmake
+++ b/cmake/wsrep.cmake
@@ -26,7 +26,7 @@ ENDIF()
OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" ${with_wsrep_default})
# Set the patch version
-SET(WSREP_PATCH_VERSION "13")
+SET(WSREP_PATCH_VERSION "16")
# Obtain wsrep API version
FILE(STRINGS "${MySQL_SOURCE_DIR}/wsrep/wsrep_api.h" WSREP_API_VERSION
diff --git a/config.h.cmake b/config.h.cmake
index f35e33ebe1a..00aa03483ee 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -105,6 +105,8 @@
/* Libraries */
#cmakedefine HAVE_LIBWRAP 1
#cmakedefine HAVE_SYSTEMD 1
+#cmakedefine HAVE_CRC32_VPMSUM 1
+
/* Does "struct timespec" have a "sec" and "nsec" field? */
#cmakedefine HAVE_TIMESPEC_TS_SEC 1
diff --git a/configure.cmake b/configure.cmake
index 8dffb7efd09..8dbc3aa18b5 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -1018,7 +1018,7 @@ CHECK_STRUCT_HAS_MEMBER("struct timespec" tv_sec "time.h" STRUCT_TIMESPEC_HAS_TV
CHECK_STRUCT_HAS_MEMBER("struct timespec" tv_nsec "time.h" STRUCT_TIMESPEC_HAS_TV_NSEC)
IF(NOT MSVC)
- CHECK_C_SOURCE_RUNS(
+ CHECK_C_SOURCE_COMPILES(
"
#define _GNU_SOURCE
#include <fcntl.h>
diff --git a/debian/autobake-deb.sh b/debian/autobake-deb.sh
index 6f4109515e6..b597ec036b3 100755
--- a/debian/autobake-deb.sh
+++ b/debian/autobake-deb.sh
@@ -10,10 +10,16 @@ set -e
# Debug script and command lines
#set -x
-# Don't run the mysql-test-run test suite as part of build.
+# On Buildbot, don't run the mysql-test-run test suite as part of build.
# It takes a lot of time, and we will do a better test anyway in
# Buildbot, running the test suite from installed .debs on a clean VM.
-export DEB_BUILD_OPTIONS="nocheck"
+# On Travis-CI we want to simulate the full build, including tests.
+# Also on Travis-CI it is useful not to override the DEB_BUILD_OPTIONS
+# at this stage at all.
+if [[ ! $TRAVIS ]]
+then
+ export DEB_BUILD_OPTIONS="nocheck"
+fi
export MARIADB_OPTIONAL_DEBS=""
@@ -32,8 +38,8 @@ LOGSTRING="MariaDB build"
CODENAME="$(lsb_release -sc)"
# add libcrack2 (>= 2.9.0) as a build dependency
-# but only where the distribution can possibly satisfy it
-if apt-cache madison cracklib2|grep 'cracklib2 *| *2\.[0-8]\.' >/dev/null 2>&1
+# but only where the distribution can possibly satisfy it and if not on Travis-CI
+if $TRAVIS || apt-cache madison cracklib2|grep 'cracklib2 *| *2\.[0-8]\.' >/dev/null 2>&1
then
# Anything in MARIADB_OPTIONAL_DEBS is omitted from the resulting
# packages by snipped in rules file
diff --git a/debian/mariadb-client-10.2.docs b/debian/mariadb-client-10.2.docs
index 21446855f51..8117d689011 100644
--- a/debian/mariadb-client-10.2.docs
+++ b/debian/mariadb-client-10.2.docs
@@ -1,2 +1,2 @@
debian/additions/innotop/changelog.innotop
-README
+README.md
diff --git a/debian/rules b/debian/rules
index 7f134af24a8..2591e0070a4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -29,20 +29,15 @@ ifeq (${MAKE_J}, -j0)
MAKE_J = -j1
endif
-MAKE_TEST_TARGET=test-force
-ifneq ($(findstring fulltest,$(DEB_BUILD_OPTIONS)),)
-# make test-bt is the testsuite run by the MySQL build team
-# before a release, but it is long
- MAKE_TEST_TARGET=test-bt
+# Parallel build support as advised
+# at https://www.debian.org/doc/debian-policy/ch-source.html#s-debianrules-options
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+ NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+ MAKEFLAGS += -j $(NUMJOBS)
endif
-USE_ASSEMBLER=--enable-assembler
-ifneq (,$(filter $(ARCH), amd64 i386 ia64 s390))
- TESTSUITE_FAIL_CMD=exit 1
-else
- TESTSUITE_FAIL_CMD=true
-endif
+USE_ASSEMBLER=--enable-assembler
BUILDDIR = builddir
builddir = $(BUILDDIR)
@@ -88,7 +83,7 @@ build-stamp: configure
ifeq ($(findstring nocheck,$(DEB_BUILD_OPTIONS)),)
if [ ! -f testsuite-stamp ] ; then \
- cd $(builddir) && $(MAKE) $(MAKE_TEST_TARGET) || $(TESTSUITE_FAIL_CMD) ; \
+ cd $(builddir)/mysql-test && ./mtr --force --parallel=$(NUMJOBS) --skip-rpl --suite=main; \
fi
endif
diff --git a/extra/CMakeLists.txt b/extra/CMakeLists.txt
index 12f3343cf69..ee696c156f9 100644
--- a/extra/CMakeLists.txt
+++ b/extra/CMakeLists.txt
@@ -82,13 +82,6 @@ IF(WITH_INNOBASE_STORAGE_ENGINE OR WITH_XTRADB_STORAGE_ENGINE)
../storage/innobase/os/os0file.cc
)
- IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le")
- enable_language(ASM)
- LIST(APPEND INNOBASE_SOURCES
- ../storage/innobase/ut/crc32_power8/crc32.S
- ../storage/innobase/ut/crc32_power8/crc32_wrapper.c
- )
- ENDIF()
MYSQL_ADD_EXECUTABLE(innochecksum innochecksum.cc ${INNOBASE_SOURCES})
TARGET_LINK_LIBRARIES(innochecksum mysys mysys_ssl)
diff --git a/extra/crc32-vpmsum/CMakeLists.txt b/extra/crc32-vpmsum/CMakeLists.txt
new file mode 100644
index 00000000000..0bb254bea6a
--- /dev/null
+++ b/extra/crc32-vpmsum/CMakeLists.txt
@@ -0,0 +1,2 @@
+ENABLE_LANGUAGE(ASM)
+ADD_CONVENIENCE_LIBRARY(${CRC32_VPMSUM_LIBRARY} crc32c.S crc32c_wrapper.c crc32ieee.S crc32ieee_wrapper.c)
diff --git a/storage/xtradb/ut/crc32_power8/crc32.S b/extra/crc32-vpmsum/crc32.iS
index b064ce3dc96..4e7c18922da 100644
--- a/storage/xtradb/ut/crc32_power8/crc32.S
+++ b/extra/crc32-vpmsum/crc32.iS
@@ -46,19 +46,8 @@
/* byte reverse permute constant */
.octa 0x0F0E0D0C0B0A09080706050403020100
-#define __ASSEMBLY__
-#include "crc32_constants.h"
-
.text
-#if defined(__BIG_ENDIAN__) && defined(REFLECT)
-#define BYTESWAP_DATA
-#elif defined(__LITTLE_ENDIAN__) && !defined(REFLECT)
-#define BYTESWAP_DATA
-#else
-#undef BYTESWAP_DATA
-#endif
-
#define off16 r25
#define off32 r26
#define off48 r27
@@ -82,7 +71,7 @@
#endif
/* unsigned int __crc32_vpmsum(unsigned int crc, void *p, unsigned long len) */
-FUNC_START(__crc32_vpmsum)
+FUNC_START(__F)
std r31,-8(r1)
std r30,-16(r1)
std r29,-24(r1)
@@ -126,19 +115,14 @@ FUNC_START(__crc32_vpmsum)
/* Get the initial value into v8 */
vxor v8,v8,v8
MTVRD(v8, r3)
-#ifdef REFLECT
+
vsldoi v8,zeroes,v8,8 /* shift into bottom 32 bits */
-#else
- vsldoi v8,v8,zeroes,4 /* shift into top 32 bits */
-#endif
-#ifdef BYTESWAP_DATA
addis r3,r2,.byteswap_constant@toc@ha
addi r3,r3,.byteswap_constant@toc@l
lvx byteswap,0,r3
addi r3,r3,16
-#endif
cmpdi r5,256
blt .Lshort
@@ -170,8 +154,8 @@ FUNC_START(__crc32_vpmsum)
addi r7,r7,-1
mtctr r7
- addis r3,r2,.constants@toc@ha
- addi r3,r3,.constants@toc@l
+ addis r3,r2,CONSTANTS@toc@ha
+ addi r3,r3,CONSTANTS@toc@l
/* Find the start of our constants */
add r3,r3,r8
@@ -376,7 +360,6 @@ FUNC_START(__crc32_vpmsum)
vxor v6,v6,v14
vxor v7,v7,v15
-#ifdef REFLECT
/*
* vpmsumd produces a 96 bit result in the least significant bits
* of the register. Since we are bit reflected we have to shift it
@@ -391,7 +374,6 @@ FUNC_START(__crc32_vpmsum)
vsldoi v5,v5,zeroes,4
vsldoi v6,v6,zeroes,4
vsldoi v7,v7,zeroes,4
-#endif
/* xor with last 1024 bits */
lvx v8,0,r4
@@ -526,8 +508,8 @@ FUNC_START(__crc32_vpmsum)
.Lbarrett_reduction:
/* Barrett constants */
- addis r3,r2,.barrett_constants@toc@ha
- addi r3,r3,.barrett_constants@toc@l
+ addis r3,r2,BARRETT_CONSTANTS@toc@ha
+ addi r3,r3,BARRETT_CONSTANTS@toc@l
lvx const1,0,r3
lvx const2,off16,r3
@@ -535,33 +517,12 @@ FUNC_START(__crc32_vpmsum)
vsldoi v1,v0,v0,8
vxor v0,v0,v1 /* xor two 64 bit results together */
-#ifdef REFLECT
/* shift left one bit */
vspltisb v1,1
vsl v0,v0,v1
-#endif
vand v0,v0,mask_64bit
-#ifndef REFLECT
- /*
- * Now for the Barrett reduction algorithm. The idea is to calculate q,
- * the multiple of our polynomial that we need to subtract. By
- * doing the computation 2x bits higher (ie 64 bits) and shifting the
- * result back down 2x bits, we round down to the nearest multiple.
- */
- VPMSUMD(v1,v0,const1) /* ma */
- vsldoi v1,zeroes,v1,8 /* q = floor(ma/(2^64)) */
- VPMSUMD(v1,v1,const2) /* qn */
- vxor v0,v0,v1 /* a - qn, subtraction is xor in GF(2) */
-
- /*
- * Get the result into r3. We need to shift it left 8 bytes:
- * V0 [ 0 1 2 X ]
- * V0 [ 0 X 2 3 ]
- */
- vsldoi v0,v0,zeroes,8 /* shift result into top 64 bits */
-#else
/*
* The reflected version of Barrett reduction. Instead of bit
* reflecting our data (which is expensive to do), we bit reflect our
@@ -582,7 +543,6 @@ FUNC_START(__crc32_vpmsum)
* V0 [ 0 X 2 3 ]
*/
vsldoi v0,v0,zeroes,4 /* shift result into top 64 bits of */
-#endif
.Lout:
subi r6,r1,56+10*16
@@ -631,8 +591,8 @@ FUNC_START(__crc32_vpmsum)
cmpdi r5,0
beq .Lzero
- addis r3,r2,.short_constants@toc@ha
- addi r3,r3,.short_constants@toc@l
+ addis r3,r2,SHORT_CONSTANTS@toc@ha
+ addi r3,r3,SHORT_CONSTANTS@toc@l
/* Calculate where in the constant table we need to start */
subfic r6,r5,256
@@ -767,9 +727,8 @@ FUNC_START(__crc32_vpmsum)
.Lzero:
mr r3,r10
- blr
b .Lout
-FUNC_END(__crc32_vpmsum)
+FUNC_END(__F)
#endif /* __powerpc__ */
diff --git a/storage/innobase/ut/crc32_power8/crc32_wrapper.c b/extra/crc32-vpmsum/crc32_wrapper.ic
index d4c91371fa1..750e971f83e 100644
--- a/storage/innobase/ut/crc32_power8/crc32_wrapper.c
+++ b/extra/crc32-vpmsum/crc32_wrapper.ic
@@ -1,12 +1,9 @@
#ifdef __powerpc__
-#define CRC_TABLE
-#include "crc32_constants.h"
#define VMX_ALIGN 16
#define VMX_ALIGN_MASK (VMX_ALIGN-1)
-#ifdef REFLECT
static unsigned int crc32_align(unsigned int crc, unsigned char *p,
unsigned long len)
{
@@ -14,28 +11,17 @@ static unsigned int crc32_align(unsigned int crc, unsigned char *p,
crc = crc_table[(crc ^ *p++) & 0xff] ^ (crc >> 8);
return crc;
}
-#else
-static unsigned int crc32_align(unsigned int crc, unsigned char *p,
- unsigned long len)
-{
- while (len--)
- crc = crc_table[((crc >> 24) ^ *p++) & 0xff] ^ (crc << 8);
- return crc;
-}
-#endif
-unsigned int __crc32_vpmsum(unsigned int crc, unsigned char *p,
+unsigned int __F(unsigned int crc, unsigned char *p,
unsigned long len);
-unsigned int crc32_vpmsum(unsigned int crc, unsigned char *p,
+unsigned int F(unsigned int crc, unsigned char *p,
unsigned long len)
{
unsigned int prealign;
unsigned int tail;
-#ifdef CRC_XOR
crc ^= 0xffffffff;
-#endif
if (len < VMX_ALIGN + VMX_ALIGN_MASK) {
crc = crc32_align(crc, p, len);
@@ -49,7 +35,7 @@ unsigned int crc32_vpmsum(unsigned int crc, unsigned char *p,
p += prealign;
}
- crc = __crc32_vpmsum(crc, p, len & ~VMX_ALIGN_MASK);
+ crc = __F(crc, p, len & ~VMX_ALIGN_MASK);
tail = len & VMX_ALIGN_MASK;
if (tail) {
@@ -58,9 +44,7 @@ unsigned int crc32_vpmsum(unsigned int crc, unsigned char *p,
}
out:
-#ifdef CRC_XOR
crc ^= 0xffffffff;
-#endif
return crc;
}
diff --git a/extra/crc32-vpmsum/crc32c.S b/extra/crc32-vpmsum/crc32c.S
new file mode 100644
index 00000000000..390c4bf0660
--- /dev/null
+++ b/extra/crc32-vpmsum/crc32c.S
@@ -0,0 +1,14 @@
+#ifdef __powerpc__
+
+#define CONSTANTS .crc32c_constants
+#define SHORT_CONSTANTS .crc32c_short_constants
+#define BARRETT_CONSTANTS .crc32c_barrett_constants
+
+#include "crc32c_constants.h"
+
+#define __F __crc32c_vpmsum
+
+#include "crc32.iS"
+
+#endif
+
diff --git a/storage/innobase/ut/crc32_power8/crc32_constants.h b/extra/crc32-vpmsum/crc32c_constants.h
index ba2592b829c..555b785ce9f 100644
--- a/storage/innobase/ut/crc32_power8/crc32_constants.h
+++ b/extra/crc32-vpmsum/crc32c_constants.h
@@ -3,83 +3,10 @@
#ifdef __powerpc__
-
#define CRC 0x1edc6f41
-#define CRC_XOR
-#define REFLECT
-
-#ifndef __ASSEMBLY__
-#ifdef CRC_TABLE
-static const unsigned int crc_table[] = {
- 0x00000000, 0xf26b8303, 0xe13b70f7, 0x1350f3f4,
- 0xc79a971f, 0x35f1141c, 0x26a1e7e8, 0xd4ca64eb,
- 0x8ad958cf, 0x78b2dbcc, 0x6be22838, 0x9989ab3b,
- 0x4d43cfd0, 0xbf284cd3, 0xac78bf27, 0x5e133c24,
- 0x105ec76f, 0xe235446c, 0xf165b798, 0x030e349b,
- 0xd7c45070, 0x25afd373, 0x36ff2087, 0xc494a384,
- 0x9a879fa0, 0x68ec1ca3, 0x7bbcef57, 0x89d76c54,
- 0x5d1d08bf, 0xaf768bbc, 0xbc267848, 0x4e4dfb4b,
- 0x20bd8ede, 0xd2d60ddd, 0xc186fe29, 0x33ed7d2a,
- 0xe72719c1, 0x154c9ac2, 0x061c6936, 0xf477ea35,
- 0xaa64d611, 0x580f5512, 0x4b5fa6e6, 0xb93425e5,
- 0x6dfe410e, 0x9f95c20d, 0x8cc531f9, 0x7eaeb2fa,
- 0x30e349b1, 0xc288cab2, 0xd1d83946, 0x23b3ba45,
- 0xf779deae, 0x05125dad, 0x1642ae59, 0xe4292d5a,
- 0xba3a117e, 0x4851927d, 0x5b016189, 0xa96ae28a,
- 0x7da08661, 0x8fcb0562, 0x9c9bf696, 0x6ef07595,
- 0x417b1dbc, 0xb3109ebf, 0xa0406d4b, 0x522bee48,
- 0x86e18aa3, 0x748a09a0, 0x67dafa54, 0x95b17957,
- 0xcba24573, 0x39c9c670, 0x2a993584, 0xd8f2b687,
- 0x0c38d26c, 0xfe53516f, 0xed03a29b, 0x1f682198,
- 0x5125dad3, 0xa34e59d0, 0xb01eaa24, 0x42752927,
- 0x96bf4dcc, 0x64d4cecf, 0x77843d3b, 0x85efbe38,
- 0xdbfc821c, 0x2997011f, 0x3ac7f2eb, 0xc8ac71e8,
- 0x1c661503, 0xee0d9600, 0xfd5d65f4, 0x0f36e6f7,
- 0x61c69362, 0x93ad1061, 0x80fde395, 0x72966096,
- 0xa65c047d, 0x5437877e, 0x4767748a, 0xb50cf789,
- 0xeb1fcbad, 0x197448ae, 0x0a24bb5a, 0xf84f3859,
- 0x2c855cb2, 0xdeeedfb1, 0xcdbe2c45, 0x3fd5af46,
- 0x7198540d, 0x83f3d70e, 0x90a324fa, 0x62c8a7f9,
- 0xb602c312, 0x44694011, 0x5739b3e5, 0xa55230e6,
- 0xfb410cc2, 0x092a8fc1, 0x1a7a7c35, 0xe811ff36,
- 0x3cdb9bdd, 0xceb018de, 0xdde0eb2a, 0x2f8b6829,
- 0x82f63b78, 0x709db87b, 0x63cd4b8f, 0x91a6c88c,
- 0x456cac67, 0xb7072f64, 0xa457dc90, 0x563c5f93,
- 0x082f63b7, 0xfa44e0b4, 0xe9141340, 0x1b7f9043,
- 0xcfb5f4a8, 0x3dde77ab, 0x2e8e845f, 0xdce5075c,
- 0x92a8fc17, 0x60c37f14, 0x73938ce0, 0x81f80fe3,
- 0x55326b08, 0xa759e80b, 0xb4091bff, 0x466298fc,
- 0x1871a4d8, 0xea1a27db, 0xf94ad42f, 0x0b21572c,
- 0xdfeb33c7, 0x2d80b0c4, 0x3ed04330, 0xccbbc033,
- 0xa24bb5a6, 0x502036a5, 0x4370c551, 0xb11b4652,
- 0x65d122b9, 0x97baa1ba, 0x84ea524e, 0x7681d14d,
- 0x2892ed69, 0xdaf96e6a, 0xc9a99d9e, 0x3bc21e9d,
- 0xef087a76, 0x1d63f975, 0x0e330a81, 0xfc588982,
- 0xb21572c9, 0x407ef1ca, 0x532e023e, 0xa145813d,
- 0x758fe5d6, 0x87e466d5, 0x94b49521, 0x66df1622,
- 0x38cc2a06, 0xcaa7a905, 0xd9f75af1, 0x2b9cd9f2,
- 0xff56bd19, 0x0d3d3e1a, 0x1e6dcdee, 0xec064eed,
- 0xc38d26c4, 0x31e6a5c7, 0x22b65633, 0xd0ddd530,
- 0x0417b1db, 0xf67c32d8, 0xe52cc12c, 0x1747422f,
- 0x49547e0b, 0xbb3ffd08, 0xa86f0efc, 0x5a048dff,
- 0x8ecee914, 0x7ca56a17, 0x6ff599e3, 0x9d9e1ae0,
- 0xd3d3e1ab, 0x21b862a8, 0x32e8915c, 0xc083125f,
- 0x144976b4, 0xe622f5b7, 0xf5720643, 0x07198540,
- 0x590ab964, 0xab613a67, 0xb831c993, 0x4a5a4a90,
- 0x9e902e7b, 0x6cfbad78, 0x7fab5e8c, 0x8dc0dd8f,
- 0xe330a81a, 0x115b2b19, 0x020bd8ed, 0xf0605bee,
- 0x24aa3f05, 0xd6c1bc06, 0xc5914ff2, 0x37faccf1,
- 0x69e9f0d5, 0x9b8273d6, 0x88d28022, 0x7ab90321,
- 0xae7367ca, 0x5c18e4c9, 0x4f48173d, 0xbd23943e,
- 0xf36e6f75, 0x0105ec76, 0x12551f82, 0xe03e9c81,
- 0x34f4f86a, 0xc69f7b69, 0xd5cf889d, 0x27a40b9e,
- 0x79b737ba, 0x8bdcb4b9, 0x988c474d, 0x6ae7c44e,
- 0xbe2da0a5, 0x4c4623a6, 0x5f16d052, 0xad7d5351,};
-#endif
-#else
#define MAX_SIZE 32768
-.constants:
+CONSTANTS:
/* Reduce 262144 kbits to 1024 bits */
/* x^261120 mod p(x)` << 1, x^261184 mod p(x)` << 1 */
@@ -847,7 +774,7 @@ static const unsigned int crc_table[] = {
/* x^1024 mod p(x)` << 1, x^1088 mod p(x)` << 1 */
.octa 0x0000000171fb63ce00000001609bc4b4
-.short_constants:
+SHORT_CONSTANTS:
/* Reduce final 1024-2048 bits to 64 bits, shifting 32 bits to include the trailing 32 bits of zeros */
/* x^1952 mod p(x)`, x^1984 mod p(x)`, x^2016 mod p(x)`, x^2048 mod p(x)` */
@@ -899,12 +826,11 @@ static const unsigned int crc_table[] = {
.octa 0x82f63b786ea2d55ca66805eb18b8ea18
-.barrett_constants:
+BARRETT_CONSTANTS:
/* 33 bit reflected Barrett constant m - (4^32)/n */
.octa 0x000000000000000000000000dea713f1 /* x^64 div p(x)` */
/* 33 bit reflected Barrett constant n */
.octa 0x00000000000000000000000105ec76f1
-#endif
#endif /* __powerpc__ */
diff --git a/extra/crc32-vpmsum/crc32c_wrapper.c b/extra/crc32-vpmsum/crc32c_wrapper.c
new file mode 100644
index 00000000000..b121d3e8c41
--- /dev/null
+++ b/extra/crc32-vpmsum/crc32c_wrapper.c
@@ -0,0 +1,78 @@
+#ifdef __powerpc__
+
+#define F crc32c_vpmsum
+#define __F __crc32c_vpmsum
+
+#define CRC 0x1edc6f41
+
+static const unsigned int crc_table[] = {
+ 0x00000000, 0xf26b8303, 0xe13b70f7, 0x1350f3f4,
+ 0xc79a971f, 0x35f1141c, 0x26a1e7e8, 0xd4ca64eb,
+ 0x8ad958cf, 0x78b2dbcc, 0x6be22838, 0x9989ab3b,
+ 0x4d43cfd0, 0xbf284cd3, 0xac78bf27, 0x5e133c24,
+ 0x105ec76f, 0xe235446c, 0xf165b798, 0x030e349b,
+ 0xd7c45070, 0x25afd373, 0x36ff2087, 0xc494a384,
+ 0x9a879fa0, 0x68ec1ca3, 0x7bbcef57, 0x89d76c54,
+ 0x5d1d08bf, 0xaf768bbc, 0xbc267848, 0x4e4dfb4b,
+ 0x20bd8ede, 0xd2d60ddd, 0xc186fe29, 0x33ed7d2a,
+ 0xe72719c1, 0x154c9ac2, 0x061c6936, 0xf477ea35,
+ 0xaa64d611, 0x580f5512, 0x4b5fa6e6, 0xb93425e5,
+ 0x6dfe410e, 0x9f95c20d, 0x8cc531f9, 0x7eaeb2fa,
+ 0x30e349b1, 0xc288cab2, 0xd1d83946, 0x23b3ba45,
+ 0xf779deae, 0x05125dad, 0x1642ae59, 0xe4292d5a,
+ 0xba3a117e, 0x4851927d, 0x5b016189, 0xa96ae28a,
+ 0x7da08661, 0x8fcb0562, 0x9c9bf696, 0x6ef07595,
+ 0x417b1dbc, 0xb3109ebf, 0xa0406d4b, 0x522bee48,
+ 0x86e18aa3, 0x748a09a0, 0x67dafa54, 0x95b17957,
+ 0xcba24573, 0x39c9c670, 0x2a993584, 0xd8f2b687,
+ 0x0c38d26c, 0xfe53516f, 0xed03a29b, 0x1f682198,
+ 0x5125dad3, 0xa34e59d0, 0xb01eaa24, 0x42752927,
+ 0x96bf4dcc, 0x64d4cecf, 0x77843d3b, 0x85efbe38,
+ 0xdbfc821c, 0x2997011f, 0x3ac7f2eb, 0xc8ac71e8,
+ 0x1c661503, 0xee0d9600, 0xfd5d65f4, 0x0f36e6f7,
+ 0x61c69362, 0x93ad1061, 0x80fde395, 0x72966096,
+ 0xa65c047d, 0x5437877e, 0x4767748a, 0xb50cf789,
+ 0xeb1fcbad, 0x197448ae, 0x0a24bb5a, 0xf84f3859,
+ 0x2c855cb2, 0xdeeedfb1, 0xcdbe2c45, 0x3fd5af46,
+ 0x7198540d, 0x83f3d70e, 0x90a324fa, 0x62c8a7f9,
+ 0xb602c312, 0x44694011, 0x5739b3e5, 0xa55230e6,
+ 0xfb410cc2, 0x092a8fc1, 0x1a7a7c35, 0xe811ff36,
+ 0x3cdb9bdd, 0xceb018de, 0xdde0eb2a, 0x2f8b6829,
+ 0x82f63b78, 0x709db87b, 0x63cd4b8f, 0x91a6c88c,
+ 0x456cac67, 0xb7072f64, 0xa457dc90, 0x563c5f93,
+ 0x082f63b7, 0xfa44e0b4, 0xe9141340, 0x1b7f9043,
+ 0xcfb5f4a8, 0x3dde77ab, 0x2e8e845f, 0xdce5075c,
+ 0x92a8fc17, 0x60c37f14, 0x73938ce0, 0x81f80fe3,
+ 0x55326b08, 0xa759e80b, 0xb4091bff, 0x466298fc,
+ 0x1871a4d8, 0xea1a27db, 0xf94ad42f, 0x0b21572c,
+ 0xdfeb33c7, 0x2d80b0c4, 0x3ed04330, 0xccbbc033,
+ 0xa24bb5a6, 0x502036a5, 0x4370c551, 0xb11b4652,
+ 0x65d122b9, 0x97baa1ba, 0x84ea524e, 0x7681d14d,
+ 0x2892ed69, 0xdaf96e6a, 0xc9a99d9e, 0x3bc21e9d,
+ 0xef087a76, 0x1d63f975, 0x0e330a81, 0xfc588982,
+ 0xb21572c9, 0x407ef1ca, 0x532e023e, 0xa145813d,
+ 0x758fe5d6, 0x87e466d5, 0x94b49521, 0x66df1622,
+ 0x38cc2a06, 0xcaa7a905, 0xd9f75af1, 0x2b9cd9f2,
+ 0xff56bd19, 0x0d3d3e1a, 0x1e6dcdee, 0xec064eed,
+ 0xc38d26c4, 0x31e6a5c7, 0x22b65633, 0xd0ddd530,
+ 0x0417b1db, 0xf67c32d8, 0xe52cc12c, 0x1747422f,
+ 0x49547e0b, 0xbb3ffd08, 0xa86f0efc, 0x5a048dff,
+ 0x8ecee914, 0x7ca56a17, 0x6ff599e3, 0x9d9e1ae0,
+ 0xd3d3e1ab, 0x21b862a8, 0x32e8915c, 0xc083125f,
+ 0x144976b4, 0xe622f5b7, 0xf5720643, 0x07198540,
+ 0x590ab964, 0xab613a67, 0xb831c993, 0x4a5a4a90,
+ 0x9e902e7b, 0x6cfbad78, 0x7fab5e8c, 0x8dc0dd8f,
+ 0xe330a81a, 0x115b2b19, 0x020bd8ed, 0xf0605bee,
+ 0x24aa3f05, 0xd6c1bc06, 0xc5914ff2, 0x37faccf1,
+ 0x69e9f0d5, 0x9b8273d6, 0x88d28022, 0x7ab90321,
+ 0xae7367ca, 0x5c18e4c9, 0x4f48173d, 0xbd23943e,
+ 0xf36e6f75, 0x0105ec76, 0x12551f82, 0xe03e9c81,
+ 0x34f4f86a, 0xc69f7b69, 0xd5cf889d, 0x27a40b9e,
+ 0x79b737ba, 0x8bdcb4b9, 0x988c474d, 0x6ae7c44e,
+ 0xbe2da0a5, 0x4c4623a6, 0x5f16d052, 0xad7d5351,};
+
+
+#include "crc32_wrapper.ic"
+
+#endif
+
diff --git a/extra/crc32-vpmsum/crc32ieee.S b/extra/crc32-vpmsum/crc32ieee.S
new file mode 100644
index 00000000000..42c4f77630f
--- /dev/null
+++ b/extra/crc32-vpmsum/crc32ieee.S
@@ -0,0 +1,14 @@
+#ifdef __powerpc__
+
+#define CONSTANTS .crc32_constants
+#define SHORT_CONSTANTS .crc32_short_constants
+#define BARRETT_CONSTANTS .crc32_barrett_constants
+
+#include "crc32ieee_constants.h"
+
+#define __F __crc32ieee_vpmsum
+
+#include "crc32.iS"
+
+#endif
+
diff --git a/extra/crc32-vpmsum/crc32ieee_constants.h b/extra/crc32-vpmsum/crc32ieee_constants.h
new file mode 100644
index 00000000000..a99b1c0d859
--- /dev/null
+++ b/extra/crc32-vpmsum/crc32ieee_constants.h
@@ -0,0 +1,835 @@
+#ifndef CRC32_CONSTANTS_H
+#define CRC32_CONSTANTS_H
+
+#ifdef __powerpc__
+
+#define MAX_SIZE 32768
+CONSTANTS:
+
+ /* Reduce 262144 kbits to 1024 bits */
+ /* x^261120 mod p(x)` << 1, x^261184 mod p(x)` << 1 */
+ .octa 0x00000001651797d20000000099ea94a8
+
+ /* x^260096 mod p(x)` << 1, x^260160 mod p(x)` << 1 */
+ .octa 0x0000000021e0d56c00000000945a8420
+
+ /* x^259072 mod p(x)` << 1, x^259136 mod p(x)` << 1 */
+ .octa 0x000000000f95ecaa0000000030762706
+
+ /* x^258048 mod p(x)` << 1, x^258112 mod p(x)` << 1 */
+ .octa 0x00000001ebd224ac00000001a52fc582
+
+ /* x^257024 mod p(x)` << 1, x^257088 mod p(x)` << 1 */
+ .octa 0x000000000ccb97ca00000001a4a7167a
+
+ /* x^256000 mod p(x)` << 1, x^256064 mod p(x)` << 1 */
+ .octa 0x00000001006ec8a8000000000c18249a
+
+ /* x^254976 mod p(x)` << 1, x^255040 mod p(x)` << 1 */
+ .octa 0x000000014f58f19600000000a924ae7c
+
+ /* x^253952 mod p(x)` << 1, x^254016 mod p(x)` << 1 */
+ .octa 0x00000001a7192ca600000001e12ccc12
+
+ /* x^252928 mod p(x)` << 1, x^252992 mod p(x)` << 1 */
+ .octa 0x000000019a64bab200000000a0b9d4ac
+
+ /* x^251904 mod p(x)` << 1, x^251968 mod p(x)` << 1 */
+ .octa 0x0000000014f4ed2e0000000095e8ddfe
+
+ /* x^250880 mod p(x)` << 1, x^250944 mod p(x)` << 1 */
+ .octa 0x000000011092b6a200000000233fddc4
+
+ /* x^249856 mod p(x)` << 1, x^249920 mod p(x)` << 1 */
+ .octa 0x00000000c8a1629c00000001b4529b62
+
+ /* x^248832 mod p(x)` << 1, x^248896 mod p(x)` << 1 */
+ .octa 0x000000017bf32e8e00000001a7fa0e64
+
+ /* x^247808 mod p(x)` << 1, x^247872 mod p(x)` << 1 */
+ .octa 0x00000001f8cc658200000001b5334592
+
+ /* x^246784 mod p(x)` << 1, x^246848 mod p(x)` << 1 */
+ .octa 0x000000008631ddf0000000011f8ee1b4
+
+ /* x^245760 mod p(x)` << 1, x^245824 mod p(x)` << 1 */
+ .octa 0x000000007e5a76d0000000006252e632
+
+ /* x^244736 mod p(x)` << 1, x^244800 mod p(x)` << 1 */
+ .octa 0x000000002b09b31c00000000ab973e84
+
+ /* x^243712 mod p(x)` << 1, x^243776 mod p(x)` << 1 */
+ .octa 0x00000001b2df1f84000000007734f5ec
+
+ /* x^242688 mod p(x)` << 1, x^242752 mod p(x)` << 1 */
+ .octa 0x00000001d6f56afc000000007c547798
+
+ /* x^241664 mod p(x)` << 1, x^241728 mod p(x)` << 1 */
+ .octa 0x00000001b9b5e70c000000007ec40210
+
+ /* x^240640 mod p(x)` << 1, x^240704 mod p(x)` << 1 */
+ .octa 0x0000000034b626d200000001ab1695a8
+
+ /* x^239616 mod p(x)` << 1, x^239680 mod p(x)` << 1 */
+ .octa 0x000000014c53479a0000000090494bba
+
+ /* x^238592 mod p(x)` << 1, x^238656 mod p(x)` << 1 */
+ .octa 0x00000001a6d179a400000001123fb816
+
+ /* x^237568 mod p(x)` << 1, x^237632 mod p(x)` << 1 */
+ .octa 0x000000015abd16b400000001e188c74c
+
+ /* x^236544 mod p(x)` << 1, x^236608 mod p(x)` << 1 */
+ .octa 0x00000000018f985200000001c2d3451c
+
+ /* x^235520 mod p(x)` << 1, x^235584 mod p(x)` << 1 */
+ .octa 0x000000001fb3084a00000000f55cf1ca
+
+ /* x^234496 mod p(x)` << 1, x^234560 mod p(x)` << 1 */
+ .octa 0x00000000c53dfb0400000001a0531540
+
+ /* x^233472 mod p(x)` << 1, x^233536 mod p(x)` << 1 */
+ .octa 0x00000000e10c9ad60000000132cd7ebc
+
+ /* x^232448 mod p(x)` << 1, x^232512 mod p(x)` << 1 */
+ .octa 0x0000000025aa994a0000000073ab7f36
+
+ /* x^231424 mod p(x)` << 1, x^231488 mod p(x)` << 1 */
+ .octa 0x00000000fa3a74c40000000041aed1c2
+
+ /* x^230400 mod p(x)` << 1, x^230464 mod p(x)` << 1 */
+ .octa 0x0000000033eb3f400000000136c53800
+
+ /* x^229376 mod p(x)` << 1, x^229440 mod p(x)` << 1 */
+ .octa 0x000000017193f2960000000126835a30
+
+ /* x^228352 mod p(x)` << 1, x^228416 mod p(x)` << 1 */
+ .octa 0x0000000043f6c86a000000006241b502
+
+ /* x^227328 mod p(x)` << 1, x^227392 mod p(x)` << 1 */
+ .octa 0x000000016b513ec600000000d5196ad4
+
+ /* x^226304 mod p(x)` << 1, x^226368 mod p(x)` << 1 */
+ .octa 0x00000000c8f25b4e000000009cfa769a
+
+ /* x^225280 mod p(x)` << 1, x^225344 mod p(x)` << 1 */
+ .octa 0x00000001a45048ec00000000920e5df4
+
+ /* x^224256 mod p(x)` << 1, x^224320 mod p(x)` << 1 */
+ .octa 0x000000000c4410040000000169dc310e
+
+ /* x^223232 mod p(x)` << 1, x^223296 mod p(x)` << 1 */
+ .octa 0x000000000e17cad60000000009fc331c
+
+ /* x^222208 mod p(x)` << 1, x^222272 mod p(x)` << 1 */
+ .octa 0x00000001253ae964000000010d94a81e
+
+ /* x^221184 mod p(x)` << 1, x^221248 mod p(x)` << 1 */
+ .octa 0x00000001d7c88ebc0000000027a20ab2
+
+ /* x^220160 mod p(x)` << 1, x^220224 mod p(x)` << 1 */
+ .octa 0x00000001e7ca913a0000000114f87504
+
+ /* x^219136 mod p(x)` << 1, x^219200 mod p(x)` << 1 */
+ .octa 0x0000000033ed078a000000004b076d96
+
+ /* x^218112 mod p(x)` << 1, x^218176 mod p(x)` << 1 */
+ .octa 0x00000000e1839c7800000000da4d1e74
+
+ /* x^217088 mod p(x)` << 1, x^217152 mod p(x)` << 1 */
+ .octa 0x00000001322b267e000000001b81f672
+
+ /* x^216064 mod p(x)` << 1, x^216128 mod p(x)` << 1 */
+ .octa 0x00000000638231b6000000009367c988
+
+ /* x^215040 mod p(x)` << 1, x^215104 mod p(x)` << 1 */
+ .octa 0x00000001ee7f16f400000001717214ca
+
+ /* x^214016 mod p(x)` << 1, x^214080 mod p(x)` << 1 */
+ .octa 0x0000000117d9924a000000009f47d820
+
+ /* x^212992 mod p(x)` << 1, x^213056 mod p(x)` << 1 */
+ .octa 0x00000000e1a9e0c4000000010d9a47d2
+
+ /* x^211968 mod p(x)` << 1, x^212032 mod p(x)` << 1 */
+ .octa 0x00000001403731dc00000000a696c58c
+
+ /* x^210944 mod p(x)` << 1, x^211008 mod p(x)` << 1 */
+ .octa 0x00000001a5ea9682000000002aa28ec6
+
+ /* x^209920 mod p(x)` << 1, x^209984 mod p(x)` << 1 */
+ .octa 0x0000000101c5c57800000001fe18fd9a
+
+ /* x^208896 mod p(x)` << 1, x^208960 mod p(x)` << 1 */
+ .octa 0x00000000dddf6494000000019d4fc1ae
+
+ /* x^207872 mod p(x)` << 1, x^207936 mod p(x)` << 1 */
+ .octa 0x00000000f1c3db2800000001ba0e3dea
+
+ /* x^206848 mod p(x)` << 1, x^206912 mod p(x)` << 1 */
+ .octa 0x000000013112fb9c0000000074b59a5e
+
+ /* x^205824 mod p(x)` << 1, x^205888 mod p(x)` << 1 */
+ .octa 0x00000000b680b90600000000f2b5ea98
+
+ /* x^204800 mod p(x)` << 1, x^204864 mod p(x)` << 1 */
+ .octa 0x000000001a2829320000000187132676
+
+ /* x^203776 mod p(x)` << 1, x^203840 mod p(x)` << 1 */
+ .octa 0x0000000089406e7e000000010a8c6ad4
+
+ /* x^202752 mod p(x)` << 1, x^202816 mod p(x)` << 1 */
+ .octa 0x00000001def6be8c00000001e21dfe70
+
+ /* x^201728 mod p(x)` << 1, x^201792 mod p(x)` << 1 */
+ .octa 0x000000007525872800000001da0050e4
+
+ /* x^200704 mod p(x)` << 1, x^200768 mod p(x)` << 1 */
+ .octa 0x000000019536090a00000000772172ae
+
+ /* x^199680 mod p(x)` << 1, x^199744 mod p(x)` << 1 */
+ .octa 0x00000000f2455bfc00000000e47724aa
+
+ /* x^198656 mod p(x)` << 1, x^198720 mod p(x)` << 1 */
+ .octa 0x000000018c40baf4000000003cd63ac4
+
+ /* x^197632 mod p(x)` << 1, x^197696 mod p(x)` << 1 */
+ .octa 0x000000004cd390d400000001bf47d352
+
+ /* x^196608 mod p(x)` << 1, x^196672 mod p(x)` << 1 */
+ .octa 0x00000001e4ece95a000000018dc1d708
+
+ /* x^195584 mod p(x)` << 1, x^195648 mod p(x)` << 1 */
+ .octa 0x000000001a3ee918000000002d4620a4
+
+ /* x^194560 mod p(x)` << 1, x^194624 mod p(x)` << 1 */
+ .octa 0x000000007c652fb80000000058fd1740
+
+ /* x^193536 mod p(x)` << 1, x^193600 mod p(x)` << 1 */
+ .octa 0x000000011c67842c00000000dadd9bfc
+
+ /* x^192512 mod p(x)` << 1, x^192576 mod p(x)` << 1 */
+ .octa 0x00000000254f759c00000001ea2140be
+
+ /* x^191488 mod p(x)` << 1, x^191552 mod p(x)` << 1 */
+ .octa 0x000000007ece94ca000000009de128ba
+
+ /* x^190464 mod p(x)` << 1, x^190528 mod p(x)` << 1 */
+ .octa 0x0000000038f258c2000000013ac3aa8e
+
+ /* x^189440 mod p(x)` << 1, x^189504 mod p(x)` << 1 */
+ .octa 0x00000001cdf17b000000000099980562
+
+ /* x^188416 mod p(x)` << 1, x^188480 mod p(x)` << 1 */
+ .octa 0x000000011f882c1600000001c1579c86
+
+ /* x^187392 mod p(x)` << 1, x^187456 mod p(x)` << 1 */
+ .octa 0x0000000100093fc80000000068dbbf94
+
+ /* x^186368 mod p(x)` << 1, x^186432 mod p(x)` << 1 */
+ .octa 0x00000001cd684f16000000004509fb04
+
+ /* x^185344 mod p(x)` << 1, x^185408 mod p(x)` << 1 */
+ .octa 0x000000004bc6a70a00000001202f6398
+
+ /* x^184320 mod p(x)` << 1, x^184384 mod p(x)` << 1 */
+ .octa 0x000000004fc7e8e4000000013aea243e
+
+ /* x^183296 mod p(x)` << 1, x^183360 mod p(x)` << 1 */
+ .octa 0x0000000130103f1c00000001b4052ae6
+
+ /* x^182272 mod p(x)` << 1, x^182336 mod p(x)` << 1 */
+ .octa 0x0000000111b0024c00000001cd2a0ae8
+
+ /* x^181248 mod p(x)` << 1, x^181312 mod p(x)` << 1 */
+ .octa 0x000000010b3079da00000001fe4aa8b4
+
+ /* x^180224 mod p(x)` << 1, x^180288 mod p(x)` << 1 */
+ .octa 0x000000010192bcc200000001d1559a42
+
+ /* x^179200 mod p(x)` << 1, x^179264 mod p(x)` << 1 */
+ .octa 0x0000000074838d5000000001f3e05ecc
+
+ /* x^178176 mod p(x)` << 1, x^178240 mod p(x)` << 1 */
+ .octa 0x000000001b20f5200000000104ddd2cc
+
+ /* x^177152 mod p(x)` << 1, x^177216 mod p(x)` << 1 */
+ .octa 0x0000000050c3590a000000015393153c
+
+ /* x^176128 mod p(x)` << 1, x^176192 mod p(x)` << 1 */
+ .octa 0x00000000b41cac8e0000000057e942c6
+
+ /* x^175104 mod p(x)` << 1, x^175168 mod p(x)` << 1 */
+ .octa 0x000000000c72cc78000000012c633850
+
+ /* x^174080 mod p(x)` << 1, x^174144 mod p(x)` << 1 */
+ .octa 0x0000000030cdb03200000000ebcaae4c
+
+ /* x^173056 mod p(x)` << 1, x^173120 mod p(x)` << 1 */
+ .octa 0x000000013e09fc32000000013ee532a6
+
+ /* x^172032 mod p(x)` << 1, x^172096 mod p(x)` << 1 */
+ .octa 0x000000001ed624d200000001bf0cbc7e
+
+ /* x^171008 mod p(x)` << 1, x^171072 mod p(x)` << 1 */
+ .octa 0x00000000781aee1a00000000d50b7a5a
+
+ /* x^169984 mod p(x)` << 1, x^170048 mod p(x)` << 1 */
+ .octa 0x00000001c4d8348c0000000002fca6e8
+
+ /* x^168960 mod p(x)` << 1, x^169024 mod p(x)` << 1 */
+ .octa 0x0000000057a40336000000007af40044
+
+ /* x^167936 mod p(x)` << 1, x^168000 mod p(x)` << 1 */
+ .octa 0x00000000855449400000000016178744
+
+ /* x^166912 mod p(x)` << 1, x^166976 mod p(x)` << 1 */
+ .octa 0x000000019cd21e80000000014c177458
+
+ /* x^165888 mod p(x)` << 1, x^165952 mod p(x)` << 1 */
+ .octa 0x000000013eb95bc0000000011b6ddf04
+
+ /* x^164864 mod p(x)` << 1, x^164928 mod p(x)` << 1 */
+ .octa 0x00000001dfc9fdfc00000001f3e29ccc
+
+ /* x^163840 mod p(x)` << 1, x^163904 mod p(x)` << 1 */
+ .octa 0x00000000cd028bc20000000135ae7562
+
+ /* x^162816 mod p(x)` << 1, x^162880 mod p(x)` << 1 */
+ .octa 0x0000000090db8c440000000190ef812c
+
+ /* x^161792 mod p(x)` << 1, x^161856 mod p(x)` << 1 */
+ .octa 0x000000010010a4ce0000000067a2c786
+
+ /* x^160768 mod p(x)` << 1, x^160832 mod p(x)` << 1 */
+ .octa 0x00000001c8f4c72c0000000048b9496c
+
+ /* x^159744 mod p(x)` << 1, x^159808 mod p(x)` << 1 */
+ .octa 0x000000001c26170c000000015a422de6
+
+ /* x^158720 mod p(x)` << 1, x^158784 mod p(x)` << 1 */
+ .octa 0x00000000e3fccf6800000001ef0e3640
+
+ /* x^157696 mod p(x)` << 1, x^157760 mod p(x)` << 1 */
+ .octa 0x00000000d513ed2400000001006d2d26
+
+ /* x^156672 mod p(x)` << 1, x^156736 mod p(x)` << 1 */
+ .octa 0x00000000141beada00000001170d56d6
+
+ /* x^155648 mod p(x)` << 1, x^155712 mod p(x)` << 1 */
+ .octa 0x000000011071aea000000000a5fb613c
+
+ /* x^154624 mod p(x)` << 1, x^154688 mod p(x)` << 1 */
+ .octa 0x000000012e19080a0000000040bbf7fc
+
+ /* x^153600 mod p(x)` << 1, x^153664 mod p(x)` << 1 */
+ .octa 0x0000000100ecf826000000016ac3a5b2
+
+ /* x^152576 mod p(x)` << 1, x^152640 mod p(x)` << 1 */
+ .octa 0x0000000069b0941200000000abf16230
+
+ /* x^151552 mod p(x)` << 1, x^151616 mod p(x)` << 1 */
+ .octa 0x0000000122297bac00000001ebe23fac
+
+ /* x^150528 mod p(x)` << 1, x^150592 mod p(x)` << 1 */
+ .octa 0x00000000e9e4b068000000008b6a0894
+
+ /* x^149504 mod p(x)` << 1, x^149568 mod p(x)` << 1 */
+ .octa 0x000000004b38651a00000001288ea478
+
+ /* x^148480 mod p(x)` << 1, x^148544 mod p(x)` << 1 */
+ .octa 0x00000001468360e2000000016619c442
+
+ /* x^147456 mod p(x)` << 1, x^147520 mod p(x)` << 1 */
+ .octa 0x00000000121c24080000000086230038
+
+ /* x^146432 mod p(x)` << 1, x^146496 mod p(x)` << 1 */
+ .octa 0x00000000da7e7d08000000017746a756
+
+ /* x^145408 mod p(x)` << 1, x^145472 mod p(x)` << 1 */
+ .octa 0x00000001058d76520000000191b8f8f8
+
+ /* x^144384 mod p(x)` << 1, x^144448 mod p(x)` << 1 */
+ .octa 0x000000014a098a90000000008e167708
+
+ /* x^143360 mod p(x)` << 1, x^143424 mod p(x)` << 1 */
+ .octa 0x0000000020dbe72e0000000148b22d54
+
+ /* x^142336 mod p(x)` << 1, x^142400 mod p(x)` << 1 */
+ .octa 0x000000011e7323e80000000044ba2c3c
+
+ /* x^141312 mod p(x)` << 1, x^141376 mod p(x)` << 1 */
+ .octa 0x00000000d5d4bf9400000000b54d2b52
+
+ /* x^140288 mod p(x)` << 1, x^140352 mod p(x)` << 1 */
+ .octa 0x0000000199d8746c0000000005a4fd8a
+
+ /* x^139264 mod p(x)` << 1, x^139328 mod p(x)` << 1 */
+ .octa 0x00000000ce9ca8a00000000139f9fc46
+
+ /* x^138240 mod p(x)` << 1, x^138304 mod p(x)` << 1 */
+ .octa 0x00000000136edece000000015a1fa824
+
+ /* x^137216 mod p(x)` << 1, x^137280 mod p(x)` << 1 */
+ .octa 0x000000019b92a068000000000a61ae4c
+
+ /* x^136192 mod p(x)` << 1, x^136256 mod p(x)` << 1 */
+ .octa 0x0000000071d622060000000145e9113e
+
+ /* x^135168 mod p(x)` << 1, x^135232 mod p(x)` << 1 */
+ .octa 0x00000000dfc50158000000006a348448
+
+ /* x^134144 mod p(x)` << 1, x^134208 mod p(x)` << 1 */
+ .octa 0x00000001517626bc000000004d80a08c
+
+ /* x^133120 mod p(x)` << 1, x^133184 mod p(x)` << 1 */
+ .octa 0x0000000148d1e4fa000000014b6837a0
+
+ /* x^132096 mod p(x)` << 1, x^132160 mod p(x)` << 1 */
+ .octa 0x0000000094d8266e000000016896a7fc
+
+ /* x^131072 mod p(x)` << 1, x^131136 mod p(x)` << 1 */
+ .octa 0x00000000606c5e34000000014f187140
+
+ /* x^130048 mod p(x)` << 1, x^130112 mod p(x)` << 1 */
+ .octa 0x000000019766beaa000000019581b9da
+
+ /* x^129024 mod p(x)` << 1, x^129088 mod p(x)` << 1 */
+ .octa 0x00000001d80c506c00000001091bc984
+
+ /* x^128000 mod p(x)` << 1, x^128064 mod p(x)` << 1 */
+ .octa 0x000000001e73837c000000001067223c
+
+ /* x^126976 mod p(x)` << 1, x^127040 mod p(x)` << 1 */
+ .octa 0x0000000064d587de00000001ab16ea02
+
+ /* x^125952 mod p(x)` << 1, x^126016 mod p(x)` << 1 */
+ .octa 0x00000000f4a507b0000000013c4598a8
+
+ /* x^124928 mod p(x)` << 1, x^124992 mod p(x)` << 1 */
+ .octa 0x0000000040e342fc00000000b3735430
+
+ /* x^123904 mod p(x)` << 1, x^123968 mod p(x)` << 1 */
+ .octa 0x00000001d5ad9c3a00000001bb3fc0c0
+
+ /* x^122880 mod p(x)` << 1, x^122944 mod p(x)` << 1 */
+ .octa 0x0000000094a691a400000001570ae19c
+
+ /* x^121856 mod p(x)` << 1, x^121920 mod p(x)` << 1 */
+ .octa 0x00000001271ecdfa00000001ea910712
+
+ /* x^120832 mod p(x)` << 1, x^120896 mod p(x)` << 1 */
+ .octa 0x000000009e54475a0000000167127128
+
+ /* x^119808 mod p(x)` << 1, x^119872 mod p(x)` << 1 */
+ .octa 0x00000000c9c099ee0000000019e790a2
+
+ /* x^118784 mod p(x)` << 1, x^118848 mod p(x)` << 1 */
+ .octa 0x000000009a2f736c000000003788f710
+
+ /* x^117760 mod p(x)` << 1, x^117824 mod p(x)` << 1 */
+ .octa 0x00000000bb9f499600000001682a160e
+
+ /* x^116736 mod p(x)` << 1, x^116800 mod p(x)` << 1 */
+ .octa 0x00000001db688050000000007f0ebd2e
+
+ /* x^115712 mod p(x)` << 1, x^115776 mod p(x)` << 1 */
+ .octa 0x00000000e9b10af4000000002b032080
+
+ /* x^114688 mod p(x)` << 1, x^114752 mod p(x)` << 1 */
+ .octa 0x000000012d4545e400000000cfd1664a
+
+ /* x^113664 mod p(x)` << 1, x^113728 mod p(x)` << 1 */
+ .octa 0x000000000361139c00000000aa1181c2
+
+ /* x^112640 mod p(x)` << 1, x^112704 mod p(x)` << 1 */
+ .octa 0x00000001a5a1a3a800000000ddd08002
+
+ /* x^111616 mod p(x)` << 1, x^111680 mod p(x)` << 1 */
+ .octa 0x000000006844e0b000000000e8dd0446
+
+ /* x^110592 mod p(x)` << 1, x^110656 mod p(x)` << 1 */
+ .octa 0x00000000c3762f2800000001bbd94a00
+
+ /* x^109568 mod p(x)` << 1, x^109632 mod p(x)` << 1 */
+ .octa 0x00000001d26287a200000000ab6cd180
+
+ /* x^108544 mod p(x)` << 1, x^108608 mod p(x)` << 1 */
+ .octa 0x00000001f6f0bba80000000031803ce2
+
+ /* x^107520 mod p(x)` << 1, x^107584 mod p(x)` << 1 */
+ .octa 0x000000002ffabd620000000024f40b0c
+
+ /* x^106496 mod p(x)` << 1, x^106560 mod p(x)` << 1 */
+ .octa 0x00000000fb4516b800000001ba1d9834
+
+ /* x^105472 mod p(x)` << 1, x^105536 mod p(x)` << 1 */
+ .octa 0x000000018cfa961c0000000104de61aa
+
+ /* x^104448 mod p(x)` << 1, x^104512 mod p(x)` << 1 */
+ .octa 0x000000019e588d520000000113e40d46
+
+ /* x^103424 mod p(x)` << 1, x^103488 mod p(x)` << 1 */
+ .octa 0x00000001180f0bbc00000001415598a0
+
+ /* x^102400 mod p(x)` << 1, x^102464 mod p(x)` << 1 */
+ .octa 0x00000000e1d9177a00000000bf6c8c90
+
+ /* x^101376 mod p(x)` << 1, x^101440 mod p(x)` << 1 */
+ .octa 0x0000000105abc27c00000001788b0504
+
+ /* x^100352 mod p(x)` << 1, x^100416 mod p(x)` << 1 */
+ .octa 0x00000000972e4a580000000038385d02
+
+ /* x^99328 mod p(x)` << 1, x^99392 mod p(x)` << 1 */
+ .octa 0x0000000183499a5e00000001b6c83844
+
+ /* x^98304 mod p(x)` << 1, x^98368 mod p(x)` << 1 */
+ .octa 0x00000001c96a8cca0000000051061a8a
+
+ /* x^97280 mod p(x)` << 1, x^97344 mod p(x)` << 1 */
+ .octa 0x00000001a1a5b60c000000017351388a
+
+ /* x^96256 mod p(x)` << 1, x^96320 mod p(x)` << 1 */
+ .octa 0x00000000e4b6ac9c0000000132928f92
+
+ /* x^95232 mod p(x)` << 1, x^95296 mod p(x)` << 1 */
+ .octa 0x00000001807e7f5a00000000e6b4f48a
+
+ /* x^94208 mod p(x)` << 1, x^94272 mod p(x)` << 1 */
+ .octa 0x000000017a7e3bc80000000039d15e90
+
+ /* x^93184 mod p(x)` << 1, x^93248 mod p(x)` << 1 */
+ .octa 0x00000000d73975da00000000312d6074
+
+ /* x^92160 mod p(x)` << 1, x^92224 mod p(x)` << 1 */
+ .octa 0x000000017375d038000000017bbb2cc4
+
+ /* x^91136 mod p(x)` << 1, x^91200 mod p(x)` << 1 */
+ .octa 0x00000000193680bc000000016ded3e18
+
+ /* x^90112 mod p(x)` << 1, x^90176 mod p(x)` << 1 */
+ .octa 0x00000000999b06f600000000f1638b16
+
+ /* x^89088 mod p(x)` << 1, x^89152 mod p(x)` << 1 */
+ .octa 0x00000001f685d2b800000001d38b9ecc
+
+ /* x^88064 mod p(x)` << 1, x^88128 mod p(x)` << 1 */
+ .octa 0x00000001f4ecbed2000000018b8d09dc
+
+ /* x^87040 mod p(x)` << 1, x^87104 mod p(x)` << 1 */
+ .octa 0x00000000ba16f1a000000000e7bc27d2
+
+ /* x^86016 mod p(x)` << 1, x^86080 mod p(x)` << 1 */
+ .octa 0x0000000115aceac400000000275e1e96
+
+ /* x^84992 mod p(x)` << 1, x^85056 mod p(x)` << 1 */
+ .octa 0x00000001aeff629200000000e2e3031e
+
+ /* x^83968 mod p(x)` << 1, x^84032 mod p(x)` << 1 */
+ .octa 0x000000009640124c00000001041c84d8
+
+ /* x^82944 mod p(x)` << 1, x^83008 mod p(x)` << 1 */
+ .octa 0x0000000114f41f0200000000706ce672
+
+ /* x^81920 mod p(x)` << 1, x^81984 mod p(x)` << 1 */
+ .octa 0x000000009c5f3586000000015d5070da
+
+ /* x^80896 mod p(x)` << 1, x^80960 mod p(x)` << 1 */
+ .octa 0x00000001878275fa0000000038f9493a
+
+ /* x^79872 mod p(x)` << 1, x^79936 mod p(x)` << 1 */
+ .octa 0x00000000ddc42ce800000000a3348a76
+
+ /* x^78848 mod p(x)` << 1, x^78912 mod p(x)` << 1 */
+ .octa 0x0000000181d2c73a00000001ad0aab92
+
+ /* x^77824 mod p(x)` << 1, x^77888 mod p(x)` << 1 */
+ .octa 0x0000000141c9320a000000019e85f712
+
+ /* x^76800 mod p(x)` << 1, x^76864 mod p(x)` << 1 */
+ .octa 0x000000015235719a000000005a871e76
+
+ /* x^75776 mod p(x)` << 1, x^75840 mod p(x)` << 1 */
+ .octa 0x00000000be27d804000000017249c662
+
+ /* x^74752 mod p(x)` << 1, x^74816 mod p(x)` << 1 */
+ .octa 0x000000006242d45a000000003a084712
+
+ /* x^73728 mod p(x)` << 1, x^73792 mod p(x)` << 1 */
+ .octa 0x000000009a53638e00000000ed438478
+
+ /* x^72704 mod p(x)` << 1, x^72768 mod p(x)` << 1 */
+ .octa 0x00000001001ecfb600000000abac34cc
+
+ /* x^71680 mod p(x)` << 1, x^71744 mod p(x)` << 1 */
+ .octa 0x000000016d7c2d64000000005f35ef3e
+
+ /* x^70656 mod p(x)` << 1, x^70720 mod p(x)` << 1 */
+ .octa 0x00000001d0ce46c00000000047d6608c
+
+ /* x^69632 mod p(x)` << 1, x^69696 mod p(x)` << 1 */
+ .octa 0x0000000124c907b4000000002d01470e
+
+ /* x^68608 mod p(x)` << 1, x^68672 mod p(x)` << 1 */
+ .octa 0x0000000018a555ca0000000158bbc7b0
+
+ /* x^67584 mod p(x)` << 1, x^67648 mod p(x)` << 1 */
+ .octa 0x000000006b0980bc00000000c0a23e8e
+
+ /* x^66560 mod p(x)` << 1, x^66624 mod p(x)` << 1 */
+ .octa 0x000000008bbba96400000001ebd85c88
+
+ /* x^65536 mod p(x)` << 1, x^65600 mod p(x)` << 1 */
+ .octa 0x00000001070a5a1e000000019ee20bb2
+
+ /* x^64512 mod p(x)` << 1, x^64576 mod p(x)` << 1 */
+ .octa 0x000000002204322a00000001acabf2d6
+
+ /* x^63488 mod p(x)` << 1, x^63552 mod p(x)` << 1 */
+ .octa 0x00000000a27524d000000001b7963d56
+
+ /* x^62464 mod p(x)` << 1, x^62528 mod p(x)` << 1 */
+ .octa 0x0000000020b1e4ba000000017bffa1fe
+
+ /* x^61440 mod p(x)` << 1, x^61504 mod p(x)` << 1 */
+ .octa 0x0000000032cc27fc000000001f15333e
+
+ /* x^60416 mod p(x)` << 1, x^60480 mod p(x)` << 1 */
+ .octa 0x0000000044dd22b8000000018593129e
+
+ /* x^59392 mod p(x)` << 1, x^59456 mod p(x)` << 1 */
+ .octa 0x00000000dffc9e0a000000019cb32602
+
+ /* x^58368 mod p(x)` << 1, x^58432 mod p(x)` << 1 */
+ .octa 0x00000001b7a0ed140000000142b05cc8
+
+ /* x^57344 mod p(x)` << 1, x^57408 mod p(x)` << 1 */
+ .octa 0x00000000c784248800000001be49e7a4
+
+ /* x^56320 mod p(x)` << 1, x^56384 mod p(x)` << 1 */
+ .octa 0x00000001c02a4fee0000000108f69d6c
+
+ /* x^55296 mod p(x)` << 1, x^55360 mod p(x)` << 1 */
+ .octa 0x000000003c273778000000006c0971f0
+
+ /* x^54272 mod p(x)` << 1, x^54336 mod p(x)` << 1 */
+ .octa 0x00000001d63f8894000000005b16467a
+
+ /* x^53248 mod p(x)` << 1, x^53312 mod p(x)` << 1 */
+ .octa 0x000000006be557d600000001551a628e
+
+ /* x^52224 mod p(x)` << 1, x^52288 mod p(x)` << 1 */
+ .octa 0x000000006a7806ea000000019e42ea92
+
+ /* x^51200 mod p(x)` << 1, x^51264 mod p(x)` << 1 */
+ .octa 0x000000016155aa0c000000012fa83ff2
+
+ /* x^50176 mod p(x)` << 1, x^50240 mod p(x)` << 1 */
+ .octa 0x00000000908650ac000000011ca9cde0
+
+ /* x^49152 mod p(x)` << 1, x^49216 mod p(x)` << 1 */
+ .octa 0x00000000aa5a808400000000c8e5cd74
+
+ /* x^48128 mod p(x)` << 1, x^48192 mod p(x)` << 1 */
+ .octa 0x0000000191bb500a0000000096c27f0c
+
+ /* x^47104 mod p(x)` << 1, x^47168 mod p(x)` << 1 */
+ .octa 0x0000000064e9bed0000000002baed926
+
+ /* x^46080 mod p(x)` << 1, x^46144 mod p(x)` << 1 */
+ .octa 0x000000009444f302000000017c8de8d2
+
+ /* x^45056 mod p(x)` << 1, x^45120 mod p(x)` << 1 */
+ .octa 0x000000019db07d3c00000000d43d6068
+
+ /* x^44032 mod p(x)` << 1, x^44096 mod p(x)` << 1 */
+ .octa 0x00000001359e3e6e00000000cb2c4b26
+
+ /* x^43008 mod p(x)` << 1, x^43072 mod p(x)` << 1 */
+ .octa 0x00000001e4f10dd20000000145b8da26
+
+ /* x^41984 mod p(x)` << 1, x^42048 mod p(x)` << 1 */
+ .octa 0x0000000124f5735e000000018fff4b08
+
+ /* x^40960 mod p(x)` << 1, x^41024 mod p(x)` << 1 */
+ .octa 0x0000000124760a4c0000000150b58ed0
+
+ /* x^39936 mod p(x)` << 1, x^40000 mod p(x)` << 1 */
+ .octa 0x000000000f1fc18600000001549f39bc
+
+ /* x^38912 mod p(x)` << 1, x^38976 mod p(x)` << 1 */
+ .octa 0x00000000150e4cc400000000ef4d2f42
+
+ /* x^37888 mod p(x)` << 1, x^37952 mod p(x)` << 1 */
+ .octa 0x000000002a6204e800000001b1468572
+
+ /* x^36864 mod p(x)` << 1, x^36928 mod p(x)` << 1 */
+ .octa 0x00000000beb1d432000000013d7403b2
+
+ /* x^35840 mod p(x)` << 1, x^35904 mod p(x)` << 1 */
+ .octa 0x0000000135f3f1f000000001a4681842
+
+ /* x^34816 mod p(x)` << 1, x^34880 mod p(x)` << 1 */
+ .octa 0x0000000074fe22320000000167714492
+
+ /* x^33792 mod p(x)` << 1, x^33856 mod p(x)` << 1 */
+ .octa 0x000000001ac6e2ba00000001e599099a
+
+ /* x^32768 mod p(x)` << 1, x^32832 mod p(x)` << 1 */
+ .octa 0x0000000013fca91e00000000fe128194
+
+ /* x^31744 mod p(x)` << 1, x^31808 mod p(x)` << 1 */
+ .octa 0x0000000183f4931e0000000077e8b990
+
+ /* x^30720 mod p(x)` << 1, x^30784 mod p(x)` << 1 */
+ .octa 0x00000000b6d9b4e400000001a267f63a
+
+ /* x^29696 mod p(x)` << 1, x^29760 mod p(x)` << 1 */
+ .octa 0x00000000b518865600000001945c245a
+
+ /* x^28672 mod p(x)` << 1, x^28736 mod p(x)` << 1 */
+ .octa 0x0000000027a81a840000000149002e76
+
+ /* x^27648 mod p(x)` << 1, x^27712 mod p(x)` << 1 */
+ .octa 0x000000012569925800000001bb8310a4
+
+ /* x^26624 mod p(x)` << 1, x^26688 mod p(x)` << 1 */
+ .octa 0x00000001b23de796000000019ec60bcc
+
+ /* x^25600 mod p(x)` << 1, x^25664 mod p(x)` << 1 */
+ .octa 0x00000000fe4365dc000000012d8590ae
+
+ /* x^24576 mod p(x)` << 1, x^24640 mod p(x)` << 1 */
+ .octa 0x00000000c68f497a0000000065b00684
+
+ /* x^23552 mod p(x)` << 1, x^23616 mod p(x)` << 1 */
+ .octa 0x00000000fbf521ee000000015e5aeadc
+
+ /* x^22528 mod p(x)` << 1, x^22592 mod p(x)` << 1 */
+ .octa 0x000000015eac337800000000b77ff2b0
+
+ /* x^21504 mod p(x)` << 1, x^21568 mod p(x)` << 1 */
+ .octa 0x0000000134914b900000000188da2ff6
+
+ /* x^20480 mod p(x)` << 1, x^20544 mod p(x)` << 1 */
+ .octa 0x0000000016335cfe0000000063da929a
+
+ /* x^19456 mod p(x)` << 1, x^19520 mod p(x)` << 1 */
+ .octa 0x000000010372d10c00000001389caa80
+
+ /* x^18432 mod p(x)` << 1, x^18496 mod p(x)` << 1 */
+ .octa 0x000000015097b908000000013db599d2
+
+ /* x^17408 mod p(x)` << 1, x^17472 mod p(x)` << 1 */
+ .octa 0x00000001227a75720000000122505a86
+
+ /* x^16384 mod p(x)` << 1, x^16448 mod p(x)` << 1 */
+ .octa 0x000000009a8f75c0000000016bd72746
+
+ /* x^15360 mod p(x)` << 1, x^15424 mod p(x)` << 1 */
+ .octa 0x00000000682c77a200000001c3faf1d4
+
+ /* x^14336 mod p(x)` << 1, x^14400 mod p(x)` << 1 */
+ .octa 0x00000000231f091c00000001111c826c
+
+ /* x^13312 mod p(x)` << 1, x^13376 mod p(x)` << 1 */
+ .octa 0x000000007d4439f200000000153e9fb2
+
+ /* x^12288 mod p(x)` << 1, x^12352 mod p(x)` << 1 */
+ .octa 0x000000017e221efc000000002b1f7b60
+
+ /* x^11264 mod p(x)` << 1, x^11328 mod p(x)` << 1 */
+ .octa 0x0000000167457c3800000000b1dba570
+
+ /* x^10240 mod p(x)` << 1, x^10304 mod p(x)` << 1 */
+ .octa 0x00000000bdf081c400000001f6397b76
+
+ /* x^9216 mod p(x)` << 1, x^9280 mod p(x)` << 1 */
+ .octa 0x000000016286d6b00000000156335214
+
+ /* x^8192 mod p(x)` << 1, x^8256 mod p(x)` << 1 */
+ .octa 0x00000000c84f001c00000001d70e3986
+
+ /* x^7168 mod p(x)` << 1, x^7232 mod p(x)` << 1 */
+ .octa 0x0000000064efe7c0000000003701a774
+
+ /* x^6144 mod p(x)` << 1, x^6208 mod p(x)` << 1 */
+ .octa 0x000000000ac2d90400000000ac81ef72
+
+ /* x^5120 mod p(x)` << 1, x^5184 mod p(x)` << 1 */
+ .octa 0x00000000fd226d140000000133212464
+
+ /* x^4096 mod p(x)` << 1, x^4160 mod p(x)` << 1 */
+ .octa 0x000000011cfd42e000000000e4e45610
+
+ /* x^3072 mod p(x)` << 1, x^3136 mod p(x)` << 1 */
+ .octa 0x000000016e5a5678000000000c1bd370
+
+ /* x^2048 mod p(x)` << 1, x^2112 mod p(x)` << 1 */
+ .octa 0x00000001d888fe2200000001a7b9e7a6
+
+ /* x^1024 mod p(x)` << 1, x^1088 mod p(x)` << 1 */
+ .octa 0x00000001af77fcd4000000007d657a10
+
+SHORT_CONSTANTS:
+
+ /* Reduce final 1024-2048 bits to 64 bits, shifting 32 bits to include the trailing 32 bits of zeros */
+ /* x^1952 mod p(x)`, x^1984 mod p(x)`, x^2016 mod p(x)`, x^2048 mod p(x)` */
+ .octa 0xed837b2613e8221e99168a18ec447f11
+
+ /* x^1824 mod p(x)`, x^1856 mod p(x)`, x^1888 mod p(x)`, x^1920 mod p(x)` */
+ .octa 0xc8acdd8147b9ce5ae23e954e8fd2cd3c
+
+ /* x^1696 mod p(x)`, x^1728 mod p(x)`, x^1760 mod p(x)`, x^1792 mod p(x)` */
+ .octa 0xd9ad6d87d4277e2592f8befe6b1d2b53
+
+ /* x^1568 mod p(x)`, x^1600 mod p(x)`, x^1632 mod p(x)`, x^1664 mod p(x)` */
+ .octa 0xc10ec5e033fbca3bf38a3556291ea462
+
+ /* x^1440 mod p(x)`, x^1472 mod p(x)`, x^1504 mod p(x)`, x^1536 mod p(x)` */
+ .octa 0xc0b55b0e82e02e2f974ac56262b6ca4b
+
+ /* x^1312 mod p(x)`, x^1344 mod p(x)`, x^1376 mod p(x)`, x^1408 mod p(x)` */
+ .octa 0x71aa1df0e172334d855712b3784d2a56
+
+ /* x^1184 mod p(x)`, x^1216 mod p(x)`, x^1248 mod p(x)`, x^1280 mod p(x)` */
+ .octa 0xfee3053e3969324da5abe9f80eaee722
+
+ /* x^1056 mod p(x)`, x^1088 mod p(x)`, x^1120 mod p(x)`, x^1152 mod p(x)` */
+ .octa 0xf44779b93eb2bd081fa0943ddb54814c
+
+ /* x^928 mod p(x)`, x^960 mod p(x)`, x^992 mod p(x)`, x^1024 mod p(x)` */
+ .octa 0xf5449b3f00cc3374a53ff440d7bbfe6a
+
+ /* x^800 mod p(x)`, x^832 mod p(x)`, x^864 mod p(x)`, x^896 mod p(x)` */
+ .octa 0x6f8346e1d777606eebe7e3566325605c
+
+ /* x^672 mod p(x)`, x^704 mod p(x)`, x^736 mod p(x)`, x^768 mod p(x)` */
+ .octa 0xe3ab4f2ac0b95347c65a272ce5b592b8
+
+ /* x^544 mod p(x)`, x^576 mod p(x)`, x^608 mod p(x)`, x^640 mod p(x)` */
+ .octa 0xaa2215ea329ecc115705a9ca4721589f
+
+ /* x^416 mod p(x)`, x^448 mod p(x)`, x^480 mod p(x)`, x^512 mod p(x)` */
+ .octa 0x1ed8f66ed95efd26e3720acb88d14467
+
+ /* x^288 mod p(x)`, x^320 mod p(x)`, x^352 mod p(x)`, x^384 mod p(x)` */
+ .octa 0x78ed02d5a700e96aba1aca0315141c31
+
+ /* x^160 mod p(x)`, x^192 mod p(x)`, x^224 mod p(x)`, x^256 mod p(x)` */
+ .octa 0xba8ccbe832b39da3ad2a31b3ed627dae
+
+ /* x^32 mod p(x)`, x^64 mod p(x)`, x^96 mod p(x)`, x^128 mod p(x)` */
+ .octa 0xedb88320b1e6b0926655004fa06a2517
+
+
+BARRETT_CONSTANTS:
+ /* 33 bit reflected Barrett constant m - (4^32)/n */
+ .octa 0x000000000000000000000001f7011641 /* x^64 div p(x)` */
+ /* 33 bit reflected Barrett constant n */
+ .octa 0x000000000000000000000001db710641
+
+#endif /* __powerpc__ */
+
+#endif
diff --git a/extra/crc32-vpmsum/crc32ieee_wrapper.c b/extra/crc32-vpmsum/crc32ieee_wrapper.c
new file mode 100644
index 00000000000..41c1f980097
--- /dev/null
+++ b/extra/crc32-vpmsum/crc32ieee_wrapper.c
@@ -0,0 +1,75 @@
+#ifdef __powerpc__
+
+#define F crc32ieee_vpmsum
+#define __F __crc32ieee_vpmsum
+
+static const unsigned int crc_table[] = {
+ 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba,
+ 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
+ 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
+ 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91,
+ 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
+ 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
+ 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec,
+ 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5,
+ 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
+ 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
+ 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940,
+ 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
+ 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116,
+ 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f,
+ 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
+ 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d,
+ 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a,
+ 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
+ 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818,
+ 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
+ 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
+ 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457,
+ 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c,
+ 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
+ 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
+ 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb,
+ 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
+ 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9,
+ 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086,
+ 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
+ 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4,
+ 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad,
+ 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
+ 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683,
+ 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
+ 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
+ 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe,
+ 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7,
+ 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
+ 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
+ 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252,
+ 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
+ 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60,
+ 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79,
+ 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
+ 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f,
+ 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04,
+ 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
+ 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a,
+ 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
+ 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
+ 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21,
+ 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e,
+ 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
+ 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
+ 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45,
+ 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
+ 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db,
+ 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0,
+ 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
+ 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6,
+ 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf,
+ 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
+ 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d,};
+
+#include "crc32_wrapper.ic"
+
+#endif
+
diff --git a/storage/innobase/ut/crc32_power8/ppc-opcode.h b/extra/crc32-vpmsum/ppc-opcode.h
index 5942bd4923a..5942bd4923a 100644
--- a/storage/innobase/ut/crc32_power8/ppc-opcode.h
+++ b/extra/crc32-vpmsum/ppc-opcode.h
diff --git a/extra/perror.c b/extra/perror.c
index 11a703c8666..e96002cbb7b 100644
--- a/extra/perror.c
+++ b/extra/perror.c
@@ -222,7 +222,7 @@ static my_bool print_win_error_msg(DWORD error, my_bool verbose)
will ignore calls to register already registered error numbers.
*/
-static const char **get_handler_error_messages()
+static const char **get_handler_error_messages(int e __attribute__((unused)))
{
return handler_error_messages;
}
diff --git a/include/m_ctype.h b/include/m_ctype.h
index 7a688f76acb..9812e9fa2eb 100644
--- a/include/m_ctype.h
+++ b/include/m_ctype.h
@@ -362,6 +362,8 @@ struct my_collation_handler_st
extern MY_COLLATION_HANDLER my_collation_8bit_bin_handler;
extern MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler;
+extern MY_COLLATION_HANDLER my_collation_8bit_nopad_bin_handler;
+extern MY_COLLATION_HANDLER my_collation_8bit_simple_nopad_ci_handler;
extern MY_COLLATION_HANDLER my_collation_ucs2_uca_handler;
/* Some typedef to make it easy for C++ to make function pointers */
@@ -585,49 +587,81 @@ struct charset_info_st
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_bin;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_latin1;
+extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_latin1_nopad;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_filename;
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_utf8_general_ci;
extern struct charset_info_st my_charset_big5_bin;
extern struct charset_info_st my_charset_big5_chinese_ci;
+extern struct charset_info_st my_charset_big5_nopad_bin;
+extern struct charset_info_st my_charset_big5_chinese_nopad_ci;
extern struct charset_info_st my_charset_cp1250_czech_ci;
extern struct charset_info_st my_charset_cp932_bin;
extern struct charset_info_st my_charset_cp932_japanese_ci;
+extern struct charset_info_st my_charset_cp932_nopad_bin;
+extern struct charset_info_st my_charset_cp932_japanese_nopad_ci;
extern struct charset_info_st my_charset_eucjpms_bin;
extern struct charset_info_st my_charset_eucjpms_japanese_ci;
+extern struct charset_info_st my_charset_eucjpms_nopad_bin;
+extern struct charset_info_st my_charset_eucjpms_japanese_nopad_ci;
extern struct charset_info_st my_charset_euckr_bin;
extern struct charset_info_st my_charset_euckr_korean_ci;
+extern struct charset_info_st my_charset_euckr_nopad_bin;
+extern struct charset_info_st my_charset_euckr_korean_nopad_ci;
extern struct charset_info_st my_charset_gb2312_bin;
extern struct charset_info_st my_charset_gb2312_chinese_ci;
+extern struct charset_info_st my_charset_gb2312_nopad_bin;
+extern struct charset_info_st my_charset_gb2312_chinese_nopad_ci;
extern struct charset_info_st my_charset_gbk_bin;
extern struct charset_info_st my_charset_gbk_chinese_ci;
+extern struct charset_info_st my_charset_gbk_nopad_bin;
+extern struct charset_info_st my_charset_gbk_chinese_nopad_ci;
extern struct charset_info_st my_charset_latin1_bin;
+extern struct charset_info_st my_charset_latin1_nopad_bin;
extern struct charset_info_st my_charset_latin1_german2_ci;
extern struct charset_info_st my_charset_latin2_czech_ci;
extern struct charset_info_st my_charset_sjis_bin;
extern struct charset_info_st my_charset_sjis_japanese_ci;
+extern struct charset_info_st my_charset_sjis_nopad_bin;
+extern struct charset_info_st my_charset_sjis_japanese_nopad_ci;
extern struct charset_info_st my_charset_tis620_bin;
extern struct charset_info_st my_charset_tis620_thai_ci;
+extern struct charset_info_st my_charset_tis620_nopad_bin;
+extern struct charset_info_st my_charset_tis620_thai_nopad_ci;
extern struct charset_info_st my_charset_ucs2_bin;
extern struct charset_info_st my_charset_ucs2_general_ci;
+extern struct charset_info_st my_charset_ucs2_nopad_bin;
+extern struct charset_info_st my_charset_ucs2_general_nopad_ci;
extern struct charset_info_st my_charset_ucs2_general_mysql500_ci;
extern struct charset_info_st my_charset_ucs2_unicode_ci;
extern struct charset_info_st my_charset_ucs2_general_mysql500_ci;
extern struct charset_info_st my_charset_ujis_bin;
extern struct charset_info_st my_charset_ujis_japanese_ci;
+extern struct charset_info_st my_charset_ujis_nopad_bin;
+extern struct charset_info_st my_charset_ujis_japanese_nopad_ci;
extern struct charset_info_st my_charset_utf16_bin;
extern struct charset_info_st my_charset_utf16_general_ci;
extern struct charset_info_st my_charset_utf16_unicode_ci;
extern struct charset_info_st my_charset_utf16le_bin;
extern struct charset_info_st my_charset_utf16le_general_ci;
+extern struct charset_info_st my_charset_utf16_general_nopad_ci;
+extern struct charset_info_st my_charset_utf16_nopad_bin;
+extern struct charset_info_st my_charset_utf16le_nopad_bin;
+extern struct charset_info_st my_charset_utf16le_general_nopad_ci;
extern struct charset_info_st my_charset_utf32_bin;
extern struct charset_info_st my_charset_utf32_general_ci;
extern struct charset_info_st my_charset_utf32_unicode_ci;
+extern struct charset_info_st my_charset_utf32_nopad_bin;
+extern struct charset_info_st my_charset_utf32_general_nopad_ci;
extern struct charset_info_st my_charset_utf8_bin;
+extern struct charset_info_st my_charset_utf8_nopad_bin;
+extern struct charset_info_st my_charset_utf8_general_nopad_ci;
extern struct charset_info_st my_charset_utf8_general_mysql500_ci;
extern struct charset_info_st my_charset_utf8_unicode_ci;
extern struct charset_info_st my_charset_utf8mb4_bin;
extern struct charset_info_st my_charset_utf8mb4_general_ci;
+extern struct charset_info_st my_charset_utf8mb4_nopad_bin;
+extern struct charset_info_st my_charset_utf8mb4_general_nopad_ci;
extern struct charset_info_st my_charset_utf8mb4_unicode_ci;
#define MY_UTF8MB3 "utf8"
@@ -653,6 +687,11 @@ extern int my_strnncollsp_simple(CHARSET_INFO *, const uchar *, size_t,
extern void my_hash_sort_simple(CHARSET_INFO *cs,
const uchar *key, size_t len,
ulong *nr1, ulong *nr2);
+
+extern void my_hash_sort_simple_nopad(CHARSET_INFO *cs,
+ const uchar *key, size_t len,
+ ulong *nr1, ulong *nr2);
+
extern void my_hash_sort_bin(CHARSET_INFO *cs,
const uchar *key, size_t len, ulong *nr1,
ulong *nr2);
@@ -824,18 +863,38 @@ int my_strcasecmp_mb_bin(CHARSET_INFO * cs __attribute__((unused)),
void my_hash_sort_mb_bin(CHARSET_INFO *cs __attribute__((unused)),
const uchar *key, size_t len,ulong *nr1, ulong *nr2);
+void my_hash_sort_mb_nopad_bin(CHARSET_INFO *cs __attribute__((unused)),
+ const uchar *key, size_t len,
+ ulong *nr1, ulong *nr2);
+
size_t my_strnxfrm_mb(CHARSET_INFO *,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags);
+size_t my_strnxfrm_mb_nopad(CHARSET_INFO *,
+ uchar *dst, size_t dstlen, uint nweights,
+ const uchar *src, size_t srclen, uint flags);
+
size_t my_strnxfrm_unicode(CHARSET_INFO *,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags);
+
+size_t my_strnxfrm_unicode_nopad(CHARSET_INFO *,
+ uchar *dst, size_t dstlen, uint nweights,
+ const uchar *src, size_t srclen, uint flags);
+
size_t my_strnxfrmlen_unicode(CHARSET_INFO *, size_t);
size_t my_strnxfrm_unicode_full_bin(CHARSET_INFO *,
- uchar *dst, size_t dstlen, uint nweights,
- const uchar *src, size_t srclen, uint flags);
+ uchar *dst, size_t dstlen,
+ uint nweights, const uchar *src,
+ size_t srclen, uint flags);
+
+size_t my_strnxfrm_unicode_full_nopad_bin(CHARSET_INFO *,
+ uchar *dst, size_t dstlen,
+ uint nweights, const uchar *src,
+ size_t srclen, uint flags);
+
size_t my_strnxfrmlen_unicode_full_bin(CHARSET_INFO *, size_t);
int my_wildcmp_unicode(CHARSET_INFO *cs,
@@ -865,7 +924,6 @@ void my_string_metadata_get(MY_STRING_METADATA *metadata,
CHARSET_INFO *cs, const char *str, size_t len);
uint my_string_repertoire(CHARSET_INFO *cs, const char *str, ulong len);
my_bool my_charset_is_ascii_based(CHARSET_INFO *cs);
-my_bool my_charset_is_8bit_pure_ascii(CHARSET_INFO *cs);
uint my_charset_repertoire(CHARSET_INFO *cs);
uint my_strxfrm_flag_normalize(uint flags, uint nlevels);
@@ -874,8 +932,10 @@ void my_strxfrm_desc_and_reverse(uchar *str, uchar *strend,
size_t my_strxfrm_pad_desc_and_reverse(CHARSET_INFO *cs,
uchar *str, uchar *frmend, uchar *strend,
uint nweights, uint flags, uint level);
-
-my_bool my_charset_is_ascii_compatible(CHARSET_INFO *cs);
+size_t my_strxfrm_pad_desc_and_reverse_nopad(CHARSET_INFO *cs,
+ uchar *str, uchar *frmend,
+ uchar *strend, uint nweights,
+ uint flags, uint level);
const MY_CONTRACTIONS *my_charset_get_contractions(CHARSET_INFO *cs,
int level);
diff --git a/include/my_stacktrace.h b/include/my_stacktrace.h
index fb2525e3a12..fad6e532de9 100644
--- a/include/my_stacktrace.h
+++ b/include/my_stacktrace.h
@@ -45,7 +45,7 @@ C_MODE_START
#if defined(HAVE_STACKTRACE) || defined(HAVE_BACKTRACE)
void my_init_stacktrace();
void my_print_stacktrace(uchar* stack_bottom, ulong thread_stack);
-void my_safe_print_str(const char* val, int max_len);
+int my_safe_print_str(const char* val, int max_len);
void my_write_core(int sig);
#if BACKTRACE_DEMANGLE
char *my_demangle(const char *mangled_name, int *status);
diff --git a/include/mysql.h b/include/mysql.h
index 19099b4f404..eab859270f7 100644
--- a/include/mysql.h
+++ b/include/mysql.h
@@ -137,6 +137,7 @@ typedef unsigned long long my_ulonglong;
/* backward compatibility define - to be removed eventually */
#define ER_WARN_DATA_TRUNCATED WARN_DATA_TRUNCATED
#define WARN_PLUGIN_DELETE_BUILTIN ER_PLUGIN_DELETE_BUILTIN
+#define ER_FK_DUP_NAME ER_DUP_CONSTRAINT_NAME
typedef struct st_mysql_rows {
struct st_mysql_rows *next; /* list of rows */
diff --git a/include/mysql.h.pp b/include/mysql.h.pp
index 0c06141df6c..857f5b99a90 100644
--- a/include/mysql.h.pp
+++ b/include/mysql.h.pp
@@ -10,7 +10,10 @@ enum enum_server_command
COM_STMT_PREPARE, COM_STMT_EXECUTE, COM_STMT_SEND_LONG_DATA, COM_STMT_CLOSE,
COM_STMT_RESET, COM_SET_OPTION, COM_STMT_FETCH, COM_DAEMON,
COM_MDB_GAP_BEG,
- COM_MDB_GAP_END=253,
+ COM_MDB_GAP_END=250,
+ COM_SLAVE_WORKER,
+ COM_SLAVE_IO,
+ COM_SLAVE_SQL,
COM_MULTI,
COM_END
};
@@ -30,7 +33,7 @@ typedef struct st_net {
char save_char;
char net_skip_rest_factor;
my_bool thread_specific_malloc;
- my_bool compress;
+ unsigned char compress;
my_bool unused3;
void *thd;
unsigned int last_errno;
@@ -84,6 +87,16 @@ enum enum_mysql_set_option
MYSQL_OPTION_MULTI_STATEMENTS_ON,
MYSQL_OPTION_MULTI_STATEMENTS_OFF
};
+enum enum_session_state_type
+{
+ SESSION_TRACK_SYSTEM_VARIABLES,
+ SESSION_TRACK_SCHEMA,
+ SESSION_TRACK_STATE_CHANGE,
+ SESSION_TRACK_GTIDS,
+ SESSION_TRACK_TRANSACTION_CHARACTERISTICS,
+ SESSION_TRACK_TRANSACTION_STATE,
+ SESSION_TRACK_always_at_the_end
+};
my_bool my_net_init(NET *net, Vio* vio, void *thd, unsigned int my_flags);
void my_net_local_init(NET *net);
void net_end(NET *net);
diff --git a/include/mysql_com.h b/include/mysql_com.h
index c65c5de7f66..96b872ace37 100644
--- a/include/mysql_com.h
+++ b/include/mysql_com.h
@@ -73,6 +73,14 @@
#define TABLE_PARTITION_COMMENT_MAXLEN 1024
/*
+ Maximum length of protocol packet.
+ OK packet length limit also restricted to this value as any length greater
+ than this value will have first byte of OK packet to be 254 thus does not
+ provide a means to identify if this is OK or EOF packet.
+*/
+#define MAX_PACKET_LENGTH (256L*256L*256L-1)
+
+/*
USER_HOST_BUFF_SIZE -- length of string buffer, that is enough to contain
username and hostname parts of the user identifier with trailing zero in
MySQL standard format:
@@ -105,7 +113,10 @@ enum enum_server_command
COM_STMT_RESET, COM_SET_OPTION, COM_STMT_FETCH, COM_DAEMON,
/* don't forget to update const char *command_name[] in sql_parse.cc */
COM_MDB_GAP_BEG,
- COM_MDB_GAP_END=253,
+ COM_MDB_GAP_END=250,
+ COM_SLAVE_WORKER,
+ COM_SLAVE_IO,
+ COM_SLAVE_SQL,
COM_MULTI,
/* Must be last */
COM_END
@@ -218,6 +229,14 @@ enum enum_server_command
/* Don't close the connection for a connection with expired password. */
#define CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS (1UL << 22)
+/**
+ Capable of handling server state change information. Its a hint to the
+ server to include the state change information in Ok packet.
+*/
+#define CLIENT_SESSION_TRACK (1UL << 23)
+/* Client no longer needs EOF packet */
+#define CLIENT_DEPRECATE_EOF (1UL << 24)
+
#define CLIENT_PROGRESS_OBSOLETE (1UL << 29)
#define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30)
/*
@@ -273,6 +292,8 @@ enum enum_server_command
MARIADB_CLIENT_PROGRESS | \
CLIENT_PLUGIN_AUTH | \
CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA | \
+ CLIENT_SESSION_TRACK |\
+ CLIENT_DEPRECATE_EOF |\
CLIENT_CONNECT_ATTRS |\
MARIADB_CLIENT_COM_MULTI)
@@ -337,6 +358,11 @@ enum enum_server_command
*/
#define SERVER_STATUS_IN_TRANS_READONLY 8192
+/**
+ This status flag, when on, implies that one of the state information has
+ changed on the server because of the execution of the last statement.
+*/
+#define SERVER_SESSION_STATE_CHANGED (1UL << 14)
/**
Server status flags that must be cleared when starting
@@ -353,7 +379,8 @@ enum enum_server_command
SERVER_QUERY_WAS_SLOW |\
SERVER_STATUS_DB_DROPPED |\
SERVER_STATUS_CURSOR_EXISTS|\
- SERVER_STATUS_LAST_ROW_SENT)
+ SERVER_STATUS_LAST_ROW_SENT|\
+ SERVER_SESSION_STATE_CHANGED)
#define MYSQL_ERRMSG_SIZE 512
#define NET_READ_TIMEOUT 30 /* Timeout on read */
@@ -391,7 +418,7 @@ typedef struct st_net {
char save_char;
char net_skip_rest_factor;
my_bool thread_specific_malloc;
- my_bool compress;
+ unsigned char compress;
my_bool unused3; /* Please remove with the next incompatible ABI change. */
/*
Pointer to query object in query cache, do not equal NULL (0) for
@@ -520,6 +547,26 @@ enum enum_mysql_set_option
MYSQL_OPTION_MULTI_STATEMENTS_OFF
};
+/*
+ Type of state change information that the server can include in the Ok
+ packet.
+*/
+enum enum_session_state_type
+{
+ SESSION_TRACK_SYSTEM_VARIABLES, /* Session system variables */
+ SESSION_TRACK_SCHEMA, /* Current schema */
+ SESSION_TRACK_STATE_CHANGE, /* track session state changes */
+ SESSION_TRACK_GTIDS,
+ SESSION_TRACK_TRANSACTION_CHARACTERISTICS, /* Transaction chistics */
+ SESSION_TRACK_TRANSACTION_STATE, /* Transaction state */
+ SESSION_TRACK_always_at_the_end /* must be last */
+};
+
+#define SESSION_TRACK_BEGIN SESSION_TRACK_SYSTEM_VARIABLES
+
+#define IS_SESSION_STATE_TYPE(T) \
+ (((int)(T) >= SESSION_TRACK_BEGIN) && ((T) < SESSION_TRACK_always_at_the_end))
+
#define net_new_transaction(net) ((net)->pkt_nr=0)
#ifdef __cplusplus
@@ -638,6 +685,7 @@ my_ulonglong net_field_length_ll(uchar **packet);
my_ulonglong safe_net_field_length_ll(uchar **packet, size_t packet_len);
uchar *net_store_length(uchar *pkg, ulonglong length);
uchar *safe_net_store_length(uchar *pkg, size_t pkg_len, ulonglong length);
+unsigned int net_length_size(ulonglong num);
#endif
#ifdef __cplusplus
diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt
index 417f91c7879..5eb89c19f45 100644
--- a/libmysql/CMakeLists.txt
+++ b/libmysql/CMakeLists.txt
@@ -444,7 +444,7 @@ ADD_CONVENIENCE_LIBRARY(clientlib ${CLIENT_SOURCES})
DTRACE_INSTRUMENT(clientlib)
ADD_DEPENDENCIES(clientlib GenError)
-SET(LIBS clientlib dbug strings vio mysys mysys_ssl ${ZLIB_LIBRARY} ${SSL_LIBRARIES} ${LIBDL})
+SET(LIBS clientlib dbug strings vio mysys mysys_ssl ${ZLIB_LIBRARY} ${SSL_LIBRARIES} ${LIBDL} ${CRC32_VPMSUM_LIBRARY})
# Merge several convenience libraries into one big mysqlclient
# and link them together into shared library.
diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt
index 368f30f8317..4518329a3dd 100644
--- a/libmysqld/CMakeLists.txt
+++ b/libmysqld/CMakeLists.txt
@@ -112,6 +112,7 @@ SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
../sql/item_windowfunc.cc ../sql/sql_window.cc
../sql/sql_cte.cc
../sql/temporary_tables.cc
+ ../sql/session_tracker.cc
${GEN_SOURCES}
${MYSYS_LIBWRAP_SOURCE}
)
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index 4a84e63f222..555eadc9425 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -334,6 +334,12 @@ static int emb_stmt_execute(MYSQL_STMT *stmt)
THD *thd;
my_bool res;
+ if (stmt->param_count && !stmt->bind_param_done)
+ {
+ set_stmt_error(stmt, CR_PARAMS_NOT_BOUND, unknown_sqlstate, NULL);
+ DBUG_RETURN(1);
+ }
+
int4store(header, stmt->stmt_id);
header[4]= (uchar) stmt->flags;
thd= (THD*)stmt->mysql->thd;
@@ -1172,7 +1178,7 @@ bool
net_send_ok(THD *thd,
uint server_status, uint statement_warn_count,
ulonglong affected_rows, ulonglong id, const char *message,
- bool unused __attribute__((unused)))
+ bool, bool)
{
DBUG_ENTER("emb_net_send_ok");
MYSQL_DATA *data;
diff --git a/mysql-test/include/ctype_pad.inc b/mysql-test/include/ctype_pad.inc
new file mode 100644
index 00000000000..4cefc575cdd
--- /dev/null
+++ b/mysql-test/include/ctype_pad.inc
@@ -0,0 +1,79 @@
+--echo #
+--echo # Start of ctype_pad.inc
+--echo #
+
+--echo #
+--echo # Unique indexes
+--echo #
+
+eval CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE $coll;
+SHOW CREATE TABLE t1;
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+
+--echo #
+--echo # UNION
+--echo #
+
+eval CREATE TABLE t2 (a VARCHAR(10)) COLLATE $coll;
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+DROP TABLE t1;
+DROP TABLE t2;
+
+--echo #
+--echo # DISTINCT, COUNT, MAX
+--echo #
+
+eval CREATE TABLE t1 (a VARCHAR(10)) COLLATE $coll;
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+
+--echo #
+--echo # GROUP BY
+--echo #
+
+eval CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE $coll;
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+DROP TABLE t2;
+
+--echo #
+--echo # Weights
+--echo #
+
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # IF, CASE, LEAST
+--echo #
+
+eval SELECT IF('abc' COLLATE $coll = 'abc ', 'pad', 'nopad');
+eval SELECT CASE 'abc' COLLATE $coll WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+eval SELECT CASE WHEN 'abc' COLLATE $coll = 'abc ' THEN 'pad' ELSE 'nopad' END;
+eval SELECT HEX(LEAST('abc ' COLLATE $coll, 'abc '));
+eval SELECT HEX(GREATEST('abc ' COLLATE $coll, 'abc '));
+
+--echo #
+--echo # Collation mix
+--echo #
+
+eval CREATE TABLE t1 (a VARCHAR(10)) COLLATE $coll_pad;
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+eval SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE $coll_pad;
+eval SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE $coll;
+eval ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE $coll;
+SELECT COUNT(*) FROM t1 WHERE a='a';
+eval SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE $coll_pad;
+eval SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE $coll;
+DROP TABLE t1;
+
+--echo #
+--echo # End of ctype_pad.inc
+--echo #
diff --git a/mysql-test/include/ctype_pad_all_engines.inc b/mysql-test/include/ctype_pad_all_engines.inc
new file mode 100644
index 00000000000..29371676a19
--- /dev/null
+++ b/mysql-test/include/ctype_pad_all_engines.inc
@@ -0,0 +1,7 @@
+SET STORAGE_ENGINE=MyISAM;
+--source include/ctype_pad.inc
+
+SET STORAGE_ENGINE=HEAP;
+--source include/ctype_pad.inc
+
+SET STORAGE_ENGINE=Default;
diff --git a/mysql-test/include/default_mysqld.cnf b/mysql-test/include/default_mysqld.cnf
index 17b2fd5b2bc..b5b16461781 100644
--- a/mysql-test/include/default_mysqld.cnf
+++ b/mysql-test/include/default_mysqld.cnf
@@ -45,6 +45,8 @@ loose-feedback-debug-startup-interval=20
loose-feedback-debug-first-interval=60
loose-feedback-debug-interval=60
+loose-pam-debug
+
loose-innodb_data_file_path= ibdata1:12M:autoextend
loose-innodb_buffer_pool_size= 8M
loose-innodb_lru_scan_depth= 100
diff --git a/mysql-test/include/report-features.test b/mysql-test/include/report-features.test
deleted file mode 100644
index 75879f67165..00000000000
--- a/mysql-test/include/report-features.test
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# show server variables
-#
-
---disable_query_log
---echo ===== ENGINES =====
-show engines;
---echo ===== VARIABLES =====
-show variables;
---echo ===== STOP =====
---enable_query_log
-exit;
diff --git a/mysql-test/include/wait_until_connected_again.inc b/mysql-test/include/wait_until_connected_again.inc
index 96240e36db7..6f64ef45440 100644
--- a/mysql-test/include/wait_until_connected_again.inc
+++ b/mysql-test/include/wait_until_connected_again.inc
@@ -14,7 +14,7 @@ while ($mysql_errno)
# Strangely enough, the server might return "Too many connections"
# while being shutdown, thus 1040 is an "allowed" error
# See BUG#36228
- --error 0,1040,1053,2002,2003,2005,2006,2013
+ --error 0,1040,1053,2002,2003,2005,2006,2013,1927
show status;
dec $counter;
diff --git a/mysql-test/include/wait_until_disconnected.inc b/mysql-test/include/wait_until_disconnected.inc
index 71361682442..658bf0be739 100644
--- a/mysql-test/include/wait_until_disconnected.inc
+++ b/mysql-test/include/wait_until_disconnected.inc
@@ -12,7 +12,7 @@ while (!$mysql_errno)
# Strangely enough, the server might return "Too many connections"
# while being shutdown, thus 1040 is an "allowed" error.
# See BUG#36228.
- --error 0,1040,1053,2002,2003,2005,2006,2013
+ --error 0,1040,1053,2002,2003,2005,2006,2013,1927
show status;
dec $counter;
diff --git a/mysql-test/lib/My/SafeProcess.pm b/mysql-test/lib/My/SafeProcess.pm
index a9b4f9a4ecc..f3ee772cca3 100644
--- a/mysql-test/lib/My/SafeProcess.pm
+++ b/mysql-test/lib/My/SafeProcess.pm
@@ -338,7 +338,7 @@ sub dump_core {
my ($self)= @_;
return if IS_WINDOWS;
my $pid= $self->{SAFE_PID};
- die "Can't cet core from not started process" unless defined $pid;
+ die "Can't get core from not started process" unless defined $pid;
_verbose("Sending ABRT to $self");
kill ("ABRT", $pid);
return 1;
diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm
index 8c2b67c2fda..2be903abf42 100644
--- a/mysql-test/lib/mtr_cases.pm
+++ b/mysql-test/lib/mtr_cases.pm
@@ -311,6 +311,7 @@ sub combinations_from_file($$)
}
our %disabled;
+our %disabled_wildcards;
sub parse_disabled {
my ($filename, $suitename) = @_;
@@ -319,10 +320,18 @@ sub parse_disabled {
chomp;
next if /^\s*#/ or /^\s*$/;
mtr_error("Syntax error in $filename line $.")
- unless /^\s*(?:([-0-9A-Za-z_\/]+)\.)?([-0-9A-Za-z_#]+)\s*:\s*(.*?)\s*$/;
- mtr_error("Wrong suite name in $filename line $.")
+ unless /^\s*(?:([-0-9A-Za-z_\/]+)\.)?([-0-9A-Za-z_#\*]+)\s*:\s*(.*?)\s*$/;
+ mtr_error("Wrong suite name in $filename line $.: suitename = $suitename but the file says $1")
if defined $1 and defined $suitename and $1 ne $suitename;
- $disabled{($1 || $suitename || '') . ".$2"} = $3;
+ my ($sname, $casename, $text)= (($1 || $suitename || ''), $2, $3);
+
+ if ($casename =~ /\*/) {
+ # Wildcard
+ $disabled_wildcards{$sname . ".$casename"}= $text;
+ }
+ else {
+ $disabled{$sname . ".$casename"}= $text;
+ }
}
close DISABLED;
}
@@ -720,6 +729,14 @@ sub collect_one_test_case {
# Check for disabled tests
# ----------------------------------------------------------------------
my $disable = $disabled{".$tname"} || $disabled{$name};
+ if (not $disable) {
+ foreach my $w (keys %disabled_wildcards) {
+ if ($name =~ /^$w/) {
+ $disable= $disabled_wildcards{$w};
+ last;
+ }
+ }
+ }
if (not defined $disable and $suite->{parent}) {
$disable = $disabled{$suite->{parent}->{name} . ".$tname"};
}
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index cf54d9e7a3f..6dfc36fcfb0 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -284,7 +284,6 @@ my $opt_port_base= $ENV{'MTR_PORT_BASE'} || "auto";
my $build_thread= 0;
my $opt_record;
-my $opt_report_features;
our $opt_resfile= $ENV{'MTR_RESULT_FILE'} || 0;
@@ -317,7 +316,6 @@ our $opt_user = "root";
our $opt_valgrind= 0;
my $opt_valgrind_mysqld= 0;
my $opt_valgrind_mysqltest= 0;
-my @default_valgrind_args= ("--show-reachable=yes");
my @valgrind_args;
my $opt_strace= 0;
my $opt_strace_client;
@@ -352,6 +350,7 @@ my $source_dist= -d "../sql";
my $opt_max_save_core= env_or_val(MTR_MAX_SAVE_CORE => 5);
my $opt_max_save_datadir= env_or_val(MTR_MAX_SAVE_DATADIR => 20);
my $opt_max_test_fail= env_or_val(MTR_MAX_TEST_FAIL => 10);
+my $opt_core_on_failure= 0;
my $opt_parallel= $ENV{MTR_PARALLEL} || 1;
my $opt_port_group_size = $ENV{MTR_PORT_GROUP_SIZE} || 20;
@@ -429,21 +428,6 @@ sub main {
exit 0;
}
- if ( $opt_report_features ) {
- # Put "report features" as the first test to run
- my $tinfo = My::Test->new
- (
- name => 'report_features',
- # No result_file => Prints result
- path => 'include/report-features.test',
- template_path => "include/default_my.cnf",
- master_opt => [],
- slave_opt => [],
- suite => 'main',
- );
- unshift(@$tests, $tinfo);
- }
-
#######################################################################
my $num_tests= @$tests;
if ( $opt_parallel eq "auto" ) {
@@ -1157,6 +1141,7 @@ sub command_line_setup {
'max-save-core=i' => \$opt_max_save_core,
'max-save-datadir=i' => \$opt_max_save_datadir,
'max-test-fail=i' => \$opt_max_test_fail,
+ 'core-on-failure' => \$opt_core_on_failure,
# Coverage, profiling etc
'gcov' => \$opt_gcov,
@@ -1190,7 +1175,6 @@ sub command_line_setup {
'client-libdir=s' => \$path_client_libdir,
# Misc
- 'report-features' => \$opt_report_features,
'comment=s' => \$opt_comment,
'fast' => \$opt_fast,
'force-restart' => \$opt_force_restart,
@@ -1722,17 +1706,27 @@ sub command_line_setup {
# Set special valgrind options unless options passed on command line
push(@valgrind_args, "--trace-children=yes")
unless @valgrind_args;
+ unshift(@valgrind_args, "--tool=callgrind");
}
- if ( $opt_valgrind )
+ # default to --tool=memcheck
+ if ($opt_valgrind && ! grep(/^--tool=/i, @valgrind_args))
{
- # Set valgrind_options to default unless already defined
- push(@valgrind_args, @default_valgrind_args)
+ # Set valgrind_option unless already defined
+ push(@valgrind_args, ("--show-reachable=yes", "--leak-check=yes",
+ "--num-callers=16"))
unless @valgrind_args;
+ unshift(@valgrind_args, "--tool=memcheck");
+ }
+ if ( $opt_valgrind )
+ {
# Make valgrind run in quiet mode so it only print errors
push(@valgrind_args, "--quiet" );
+ push(@valgrind_args, "--suppressions=${glob_mysql_test_dir}/valgrind.supp")
+ if -f "$glob_mysql_test_dir/valgrind.supp";
+
mtr_report("Running valgrind with options \"",
join(" ", @valgrind_args), "\"");
}
@@ -3770,6 +3764,7 @@ sub run_testcase ($$) {
my $print_freq=20;
mtr_verbose("Running test:", $tinfo->{name});
+ $ENV{'MTR_TEST_NAME'} = $tinfo->{name};
resfile_report_test($tinfo) if $opt_resfile;
# Allow only alpanumerics pluss _ - + . in combination names,
@@ -4157,7 +4152,7 @@ sub run_testcase ($$) {
}
# Try to dump core for mysqltest and all servers
- foreach my $proc ($test, started(all_servers()))
+ foreach my $proc ($test, started(all_servers()))
{
mtr_print("Trying to dump core for $proc");
if ($proc->dump_core())
@@ -4848,7 +4843,9 @@ sub after_failure ($) {
sub report_failure_and_restart ($) {
my $tinfo= shift;
- if ($opt_valgrind_mysqld && ($tinfo->{'warnings'} || $tinfo->{'timeout'})) {
+ if ($opt_valgrind_mysqld && ($tinfo->{'warnings'} || $tinfo->{'timeout'}) &&
+ $opt_core_on_failure == 0)
+ {
# In these cases we may want valgrind report from normal termination
$tinfo->{'dont_kill_server'}= 1;
}
@@ -5496,6 +5493,13 @@ sub start_mysqltest ($) {
mtr_add_arg($args, "--sleep=%d", $opt_sleep);
}
+ if ( $opt_valgrind )
+ {
+ # We are running server under valgrind, which causes some replication
+ # test to be much slower, notable rpl_mdev6020. Increase timeout.
+ mtr_add_arg($args, "--wait-for-pos-timeout=1500");
+ }
+
if ( $opt_ssl )
{
# Turn on SSL for _all_ test cases if option --ssl was used
@@ -5506,12 +5510,6 @@ sub start_mysqltest ($) {
mtr_add_arg($args, "--max-connections=%d", $opt_max_connections);
}
- if ( $opt_valgrind )
- {
- # Longer timeouts when running with valgrind
- mtr_add_arg($args, "--wait-longer-for-timeouts");
- }
-
if ( $opt_embedded_server )
{
@@ -5831,29 +5829,15 @@ sub valgrind_arguments {
my $args= shift;
my $exe= shift;
- if ( $opt_callgrind)
- {
- mtr_add_arg($args, "--tool=callgrind");
- mtr_add_arg($args, "--base=$opt_vardir/log");
- }
- else
+ # Ensure the jemalloc works with mysqld
+ if ($$exe =~ /mysqld/)
{
- mtr_add_arg($args, "--tool=memcheck"); # From >= 2.1.2 needs this option
- mtr_add_arg($args, "--leak-check=yes");
- mtr_add_arg($args, "--num-callers=16");
- mtr_add_arg($args, "--suppressions=%s/valgrind.supp", $glob_mysql_test_dir)
- if -f "$glob_mysql_test_dir/valgrind.supp";
-
- # Ensure the jemalloc works with mysqld
- if ($$exe =~ /mysqld/)
- {
- my %somalloc=(
- 'system jemalloc' => 'libjemalloc*',
- 'bundled jemalloc' => 'NONE'
- );
- my ($syn) = $somalloc{$mysqld_variables{'version-malloc-library'}};
- mtr_add_arg($args, '--soname-synonyms=somalloc=%s', $syn) if $syn;
- }
+ my %somalloc=(
+ 'system jemalloc' => 'libjemalloc*',
+ 'bundled jemalloc' => 'NONE'
+ );
+ my ($syn) = $somalloc{$mysqld_variables{'version-malloc-library'}};
+ mtr_add_arg($args, '--soname-synonyms=somalloc=%s', $syn) if $syn;
}
# Add valgrind options, can be overridden by user
@@ -6145,6 +6129,7 @@ Options for debugging the product
the current test run. Defaults to
$opt_max_test_fail, set to 0 for no limit. Set
it's default with MTR_MAX_TEST_FAIL
+ core-in-failure Generate a core even if run server is run with valgrind
Options for valgrind
@@ -6228,7 +6213,6 @@ Misc options
gprof Collect profiling information using gprof.
experimental=<file> Refer to list of tests considered experimental;
failures will be marked exp-fail instead of fail.
- report-features First run a "test" that reports mysql features
timestamp Print timestamp before each test report line
timediff With --timestamp, also print time passed since
*previous* test started
diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result
index d8e17419342..522d8ab45f9 100644
--- a/mysql-test/r/alter_table.result
+++ b/mysql-test/r/alter_table.result
@@ -1504,7 +1504,7 @@ ALTER TABLE t1 DROP KEY IF EXISTS transaction_id, ADD PRIMARY KEY IF NOT EXISTS
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `transaction_id` int(11) NOT NULL DEFAULT '0',
+ `transaction_id` int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (`transaction_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
@@ -2057,3 +2057,26 @@ t1 CREATE TABLE `t1` (
KEY `i1` (`a`) COMMENT 'comment2'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
+#
+# MDEV-10421 duplicate CHECK CONSTRAINTs
+#
+CREATE TABLE t1 (a INT, b INT) engine=myisam;
+ALTER TABLE t1 ADD CONSTRAINT IF NOT EXISTS `min` CHECK (a+b > 100);
+ALTER TABLE t1 ADD CONSTRAINT `min` CHECK (a+b > 100);
+ERROR HY000: Duplicate CHECK constraint name 'min'
+ALTER TABLE t1 ADD CONSTRAINT IF NOT EXISTS `min` CHECK (a+b > 100);
+Warnings:
+Note 1826 Duplicate CHECK constraint name 'min'
+ALTER TABLE t1 ADD CONSTRAINT `mini` CHECK (a+b > 100);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL,
+ CONSTRAINT `min` CHECK (a+b > 100),
+ CONSTRAINT `mini` CHECK (a+b > 100)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1(a INT, b INT, CONSTRAINT min check (a>5),
+CONSTRAINT min check (b>5));
+ERROR HY000: Duplicate CHECK constraint name 'min'
diff --git a/mysql-test/r/alter_table_mdev539_maria.result b/mysql-test/r/alter_table_mdev539_maria.result
index 703908825d2..769c8b11b00 100644
--- a/mysql-test/r/alter_table_mdev539_maria.result
+++ b/mysql-test/r/alter_table_mdev539_maria.result
@@ -10,10 +10,10 @@ drop index `primary` on lineitem;
show create table lineitem;
Table Create Table
lineitem CREATE TABLE `lineitem` (
- `l_orderkey` int(11) NOT NULL DEFAULT '0',
+ `l_orderkey` int(11) NOT NULL DEFAULT 0,
`l_partkey` int(11) DEFAULT NULL,
`l_suppkey` int(11) DEFAULT NULL,
- `l_linenumber` int(11) NOT NULL DEFAULT '0',
+ `l_linenumber` int(11) NOT NULL DEFAULT 0,
`l_quantity` double DEFAULT NULL,
`l_extendedprice` double DEFAULT NULL,
`l_discount` double DEFAULT NULL,
@@ -39,10 +39,10 @@ alter table lineitem add primary key (l_orderkey, l_linenumber);
show create table lineitem;
Table Create Table
lineitem CREATE TABLE `lineitem` (
- `l_orderkey` int(11) NOT NULL DEFAULT '0',
+ `l_orderkey` int(11) NOT NULL DEFAULT 0,
`l_partkey` int(11) DEFAULT NULL,
`l_suppkey` int(11) DEFAULT NULL,
- `l_linenumber` int(11) NOT NULL DEFAULT '0',
+ `l_linenumber` int(11) NOT NULL DEFAULT 0,
`l_quantity` double DEFAULT NULL,
`l_extendedprice` double DEFAULT NULL,
`l_discount` double DEFAULT NULL,
@@ -80,10 +80,10 @@ ERROR 23000: Duplicate entry '1-2' for key 'PRIMARY'
show create table lineitem;
Table Create Table
lineitem CREATE TABLE `lineitem` (
- `l_orderkey` int(11) NOT NULL DEFAULT '0',
+ `l_orderkey` int(11) NOT NULL DEFAULT 0,
`l_partkey` int(11) DEFAULT NULL,
`l_suppkey` int(11) DEFAULT NULL,
- `l_linenumber` int(11) NOT NULL DEFAULT '0',
+ `l_linenumber` int(11) NOT NULL DEFAULT 0,
`l_quantity` double DEFAULT NULL,
`l_extendedprice` double DEFAULT NULL,
`l_discount` double DEFAULT NULL,
@@ -114,10 +114,10 @@ alter table lineitem add primary key (l_orderkey, l_linenumber);
show create table lineitem;
Table Create Table
lineitem CREATE TABLE `lineitem` (
- `l_orderkey` int(11) NOT NULL DEFAULT '0',
+ `l_orderkey` int(11) NOT NULL DEFAULT 0,
`l_partkey` int(11) DEFAULT NULL,
`l_suppkey` int(11) DEFAULT NULL,
- `l_linenumber` int(11) NOT NULL DEFAULT '0',
+ `l_linenumber` int(11) NOT NULL DEFAULT 0,
`l_quantity` double DEFAULT NULL,
`l_extendedprice` double DEFAULT NULL,
`l_discount` double DEFAULT NULL,
diff --git a/mysql-test/r/alter_table_mdev539_myisam.result b/mysql-test/r/alter_table_mdev539_myisam.result
index 7140c544836..bf2a3f49203 100644
--- a/mysql-test/r/alter_table_mdev539_myisam.result
+++ b/mysql-test/r/alter_table_mdev539_myisam.result
@@ -10,10 +10,10 @@ drop index `primary` on lineitem;
show create table lineitem;
Table Create Table
lineitem CREATE TABLE `lineitem` (
- `l_orderkey` int(11) NOT NULL DEFAULT '0',
+ `l_orderkey` int(11) NOT NULL DEFAULT 0,
`l_partkey` int(11) DEFAULT NULL,
`l_suppkey` int(11) DEFAULT NULL,
- `l_linenumber` int(11) NOT NULL DEFAULT '0',
+ `l_linenumber` int(11) NOT NULL DEFAULT 0,
`l_quantity` double DEFAULT NULL,
`l_extendedprice` double DEFAULT NULL,
`l_discount` double DEFAULT NULL,
@@ -39,10 +39,10 @@ alter table lineitem add primary key (l_orderkey, l_linenumber);
show create table lineitem;
Table Create Table
lineitem CREATE TABLE `lineitem` (
- `l_orderkey` int(11) NOT NULL DEFAULT '0',
+ `l_orderkey` int(11) NOT NULL DEFAULT 0,
`l_partkey` int(11) DEFAULT NULL,
`l_suppkey` int(11) DEFAULT NULL,
- `l_linenumber` int(11) NOT NULL DEFAULT '0',
+ `l_linenumber` int(11) NOT NULL DEFAULT 0,
`l_quantity` double DEFAULT NULL,
`l_extendedprice` double DEFAULT NULL,
`l_discount` double DEFAULT NULL,
@@ -80,10 +80,10 @@ ERROR 23000: Duplicate entry '1-2' for key 'PRIMARY'
show create table lineitem;
Table Create Table
lineitem CREATE TABLE `lineitem` (
- `l_orderkey` int(11) NOT NULL DEFAULT '0',
+ `l_orderkey` int(11) NOT NULL DEFAULT 0,
`l_partkey` int(11) DEFAULT NULL,
`l_suppkey` int(11) DEFAULT NULL,
- `l_linenumber` int(11) NOT NULL DEFAULT '0',
+ `l_linenumber` int(11) NOT NULL DEFAULT 0,
`l_quantity` double DEFAULT NULL,
`l_extendedprice` double DEFAULT NULL,
`l_discount` double DEFAULT NULL,
@@ -114,10 +114,10 @@ alter table lineitem add primary key (l_orderkey, l_linenumber);
show create table lineitem;
Table Create Table
lineitem CREATE TABLE `lineitem` (
- `l_orderkey` int(11) NOT NULL DEFAULT '0',
+ `l_orderkey` int(11) NOT NULL DEFAULT 0,
`l_partkey` int(11) DEFAULT NULL,
`l_suppkey` int(11) DEFAULT NULL,
- `l_linenumber` int(11) NOT NULL DEFAULT '0',
+ `l_linenumber` int(11) NOT NULL DEFAULT 0,
`l_quantity` double DEFAULT NULL,
`l_extendedprice` double DEFAULT NULL,
`l_discount` double DEFAULT NULL,
diff --git a/mysql-test/r/bug46760.result b/mysql-test/r/bug46760.result
index 46b8c23b95c..f05d6c5ef99 100644
--- a/mysql-test/r/bug46760.result
+++ b/mysql-test/r/bug46760.result
@@ -18,7 +18,7 @@ info: Records: 0 Duplicates: 0 Warnings: 0
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT '10'
+ `a` int(11) DEFAULT 10
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
#
diff --git a/mysql-test/r/check_constraint.result b/mysql-test/r/check_constraint.result
index babb42d93b8..f3c1fda1eee 100644
--- a/mysql-test/r/check_constraint.result
+++ b/mysql-test/r/check_constraint.result
@@ -27,7 +27,7 @@ a b
truncate table t1;
insert ignore into t1 values (101,101),(102,102),(600,600),(103,103);
Warnings:
-Warning 4022 CONSTRAINT `max` failed for `test`.`t1`
+Warning 4025 CONSTRAINT `max` failed for `test`.`t1`
select * from t1;
a b
101 101
@@ -54,7 +54,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL CHECK (a>10),
`b` int(11) DEFAULT NULL CHECK (b > 20),
- `c` int(11) DEFAULT '0' CHECK (c < 10),
+ `c` int(11) DEFAULT 0 CHECK (c < 10),
CONSTRAINT `min` CHECK (a+b > 100),
CONSTRAINT `max` CHECK (a+b <500),
CONSTRAINT `CONSTRAINT_1` CHECK (a+b+c < 500)
@@ -77,7 +77,7 @@ Table Create Table
t2 CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL CHECK (a>10),
`b` int(11) DEFAULT NULL CHECK (b > 20),
- `c` int(11) DEFAULT '0' CHECK (c < 10),
+ `c` int(11) DEFAULT 0 CHECK (c < 10),
CONSTRAINT `min` CHECK (a+b > 100),
CONSTRAINT `max` CHECK (a+b <500),
CONSTRAINT `CONSTRAINT_1` CHECK (a+b+c < 500)
@@ -93,7 +93,7 @@ Table Create Table
t2 CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL CHECK (a>10),
`b` int(11) DEFAULT NULL CHECK (b > 20),
- `c` int(11) DEFAULT '0' CHECK (c < 10),
+ `c` int(11) DEFAULT 0 CHECK (c < 10),
CONSTRAINT `max` CHECK (a+b <500),
CONSTRAINT `CONSTRAINT_1` CHECK (a+b+c < 500)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
diff --git a/mysql-test/r/comment_column2.result b/mysql-test/r/comment_column2.result
index 6fa5d73b70a..99402e7f5b4 100644
--- a/mysql-test/r/comment_column2.result
+++ b/mysql-test/r/comment_column2.result
@@ -249,7 +249,7 @@ abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
comment index_comment char_length(index_comment)
ALTER TABLE t1 ADD COLUMN c64 INTEGER COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij';
-ERROR HY000: Too many columns
+ERROR HY000: Table definition is too large
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
table_comment char_length(table_comment)
0
@@ -388,7 +388,7 @@ c63 INTEGER COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghi
c64 INTEGER COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij',
c65 INTEGER COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij')
;
-ERROR HY000: Too many columns
+ERROR HY000: Table definition is too large
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
table_comment char_length(table_comment)
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
diff --git a/mysql-test/r/contributors.result b/mysql-test/r/contributors.result
index 1e01ca81990..918ceaa496f 100644
--- a/mysql-test/r/contributors.result
+++ b/mysql-test/r/contributors.result
@@ -1,13 +1,14 @@
SHOW CONTRIBUTORS;
Name Location Comment
-Booking.com http://www.booking.com Founding member of the MariaDB Foundation
-MariaDB Corporation https://mariadb.com Founding member of the MariaDB Foundation
-Auttomattic http://automattic.com Member of the MariaDB Foundation
-Visma http://visma.com Member of the MariaDB Foundation
-Nexedi http://www.nexedi.com Member of the MariaDB Foundation
-Acronis http://www.acronis.com Member of the MariaDB Foundation
-Verkkokauppa.com Finland Sponsor of the MariaDB Foundation
-Virtuozzo https://virtuozzo.com/ Sponsor of the MariaDB Foundation
+Booking.com http://www.booking.com Founding member, Platinum Sponsor of the MariaDB Foundation
+MariaDB Corporation https://mariadb.com Founding member, Gold Sponsor of the MariaDB Foundation
+Visma http://visma.com Gold Sponsor of the MariaDB Foundation
+DBS http://dbs.com Gold Sponsor of the MariaDB Foundation
+Nexedi https://www.nexedi.com Silver Sponsor of the MariaDB Foundation
+Acronis http://www.acronis.com Silver Sponsor of the MariaDB Foundation
+Auttomattic https://automattic.com Bronze Sponsor of the MariaDB Foundation
+Verkkokauppa.com https://virtuozzo.com Bronze Sponsor of the MariaDB Foundation
+Virtuozzo https://virtuozzo.com/ Bronze Sponsor of the MariaDB Foundation
Google USA Sponsoring encryption, parallel replication and GTID
Facebook USA Sponsoring non-blocking API, LIMIT ROWS EXAMINED etc
Ronald Bradford Brisbane, Australia EFF contribution for UC2006 Auction
diff --git a/mysql-test/r/create-uca.result b/mysql-test/r/create-uca.result
index 2d2522a36a3..f405cb72b40 100644
--- a/mysql-test/r/create-uca.result
+++ b/mysql-test/r/create-uca.result
@@ -10,7 +10,7 @@ COLLATE latin1_bin;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` int(11) DEFAULT '12' COMMENT 'column1',
+ `c1` int(11) DEFAULT 12 COMMENT 'column1',
`c2` int(11) DEFAULT NULL COMMENT 'column2',
`c3` int(11) NOT NULL COMMENT 'column3',
`c4` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
@@ -21,7 +21,7 @@ CREATE TABLE t2 AS SELECT * FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `c1` int(11) DEFAULT '12' COMMENT 'column1',
+ `c1` int(11) DEFAULT 12 COMMENT 'column1',
`c2` int(11) DEFAULT NULL COMMENT 'column2',
`c3` int(11) NOT NULL COMMENT 'column3',
`c4` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT 'a',
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index 782c7c7f5bd..36a192c2609 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -803,8 +803,8 @@ select a1,a2 from t1;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `a` int(11) DEFAULT '3',
- `b` int(11) DEFAULT '3',
+ `a` int(11) DEFAULT 3,
+ `b` int(11) DEFAULT 3,
`a1` int(11) DEFAULT NULL,
`a2` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -943,6 +943,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 7
@@ -1133,46 +1134,46 @@ create table t1 like information_schema.processlist;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `ID` bigint(4) NOT NULL DEFAULT '0',
+ `ID` bigint(4) NOT NULL DEFAULT 0,
`USER` varchar(128) NOT NULL DEFAULT '',
`HOST` varchar(64) NOT NULL DEFAULT '',
`DB` varchar(64) DEFAULT NULL,
`COMMAND` varchar(16) NOT NULL DEFAULT '',
- `TIME` int(7) NOT NULL DEFAULT '0',
+ `TIME` int(7) NOT NULL DEFAULT 0,
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext DEFAULT NULL,
- `TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000',
- `STAGE` tinyint(2) NOT NULL DEFAULT '0',
- `MAX_STAGE` tinyint(2) NOT NULL DEFAULT '0',
- `PROGRESS` decimal(7,3) NOT NULL DEFAULT '0.000',
- `MEMORY_USED` bigint(7) NOT NULL DEFAULT '0',
- `EXAMINED_ROWS` int(7) NOT NULL DEFAULT '0',
- `QUERY_ID` bigint(4) NOT NULL DEFAULT '0',
+ `TIME_MS` decimal(22,3) NOT NULL DEFAULT 0.000,
+ `STAGE` tinyint(2) NOT NULL DEFAULT 0,
+ `MAX_STAGE` tinyint(2) NOT NULL DEFAULT 0,
+ `PROGRESS` decimal(7,3) NOT NULL DEFAULT 0.000,
+ `MEMORY_USED` bigint(7) NOT NULL DEFAULT 0,
+ `EXAMINED_ROWS` int(7) NOT NULL DEFAULT 0,
+ `QUERY_ID` bigint(4) NOT NULL DEFAULT 0,
`INFO_BINARY` blob DEFAULT NULL,
- `TID` bigint(4) NOT NULL DEFAULT '0'
+ `TID` bigint(4) NOT NULL DEFAULT 0
) DEFAULT CHARSET=utf8
drop table t1;
create temporary table t1 like information_schema.processlist;
show create table t1;
Table Create Table
t1 CREATE TEMPORARY TABLE `t1` (
- `ID` bigint(4) NOT NULL DEFAULT '0',
+ `ID` bigint(4) NOT NULL DEFAULT 0,
`USER` varchar(128) NOT NULL DEFAULT '',
`HOST` varchar(64) NOT NULL DEFAULT '',
`DB` varchar(64) DEFAULT NULL,
`COMMAND` varchar(16) NOT NULL DEFAULT '',
- `TIME` int(7) NOT NULL DEFAULT '0',
+ `TIME` int(7) NOT NULL DEFAULT 0,
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext DEFAULT NULL,
- `TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000',
- `STAGE` tinyint(2) NOT NULL DEFAULT '0',
- `MAX_STAGE` tinyint(2) NOT NULL DEFAULT '0',
- `PROGRESS` decimal(7,3) NOT NULL DEFAULT '0.000',
- `MEMORY_USED` bigint(7) NOT NULL DEFAULT '0',
- `EXAMINED_ROWS` int(7) NOT NULL DEFAULT '0',
- `QUERY_ID` bigint(4) NOT NULL DEFAULT '0',
+ `TIME_MS` decimal(22,3) NOT NULL DEFAULT 0.000,
+ `STAGE` tinyint(2) NOT NULL DEFAULT 0,
+ `MAX_STAGE` tinyint(2) NOT NULL DEFAULT 0,
+ `PROGRESS` decimal(7,3) NOT NULL DEFAULT 0.000,
+ `MEMORY_USED` bigint(7) NOT NULL DEFAULT 0,
+ `EXAMINED_ROWS` int(7) NOT NULL DEFAULT 0,
+ `QUERY_ID` bigint(4) NOT NULL DEFAULT 0,
`INFO_BINARY` blob DEFAULT NULL,
- `TID` bigint(4) NOT NULL DEFAULT '0'
+ `TID` bigint(4) NOT NULL DEFAULT 0
) DEFAULT CHARSET=utf8
drop table t1;
create table t1 like information_schema.character_sets;
@@ -1182,7 +1183,7 @@ t1 CREATE TABLE `t1` (
`CHARACTER_SET_NAME` varchar(32) NOT NULL DEFAULT '',
`DEFAULT_COLLATE_NAME` varchar(32) NOT NULL DEFAULT '',
`DESCRIPTION` varchar(60) NOT NULL DEFAULT '',
- `MAXLEN` bigint(3) NOT NULL DEFAULT '0'
+ `MAXLEN` bigint(3) NOT NULL DEFAULT 0
) ENGINE=MEMORY DEFAULT CHARSET=utf8
drop table t1;
@@ -1241,8 +1242,8 @@ CREATE TABLE t1(c1 YEAR DEFAULT 2008, c2 YEAR DEFAULT 0);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` year(4) DEFAULT '2008',
- `c2` year(4) DEFAULT '0000'
+ `c1` year(4) DEFAULT 2008,
+ `c2` year(4) DEFAULT 0000
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES();
@@ -1256,8 +1257,8 @@ ALTER TABLE t1 MODIFY c1 YEAR DEFAULT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` year(4) DEFAULT '0000',
- `c2` year(4) DEFAULT '0000'
+ `c1` year(4) DEFAULT 0000,
+ `c2` year(4) DEFAULT 0000
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES();
diff --git a/mysql-test/r/cte_nonrecursive.result b/mysql-test/r/cte_nonrecursive.result
index dbfcf4ed7c9..7c758c3a4a8 100644
--- a/mysql-test/r/cte_nonrecursive.result
+++ b/mysql-test/r/cte_nonrecursive.result
@@ -309,6 +309,41 @@ c c
1 1
4 4
4 4
+# t two references of t used in different parts of a union
+with t as (select a from t1 where b >= 'c')
+select * from t where a < 2
+union
+select * from t where a >= 4;
+a
+1
+4
+select * from (select a from t1 where b >= 'c') as t
+where t.a < 2
+union
+select * from (select a from t1 where b >= 'c') as t
+where t.a >= 4;
+a
+1
+4
+explain
+with t as (select a from t1 where b >= 'c')
+select * from t where a < 2
+union
+select * from t where a >= 4;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 8 Using where
+3 UNION t1 ALL NULL NULL NULL NULL 8 Using where
+NULL UNION RESULT <union1,3> ALL NULL NULL NULL NULL NULL
+explain
+select * from (select a from t1 where b >= 'c') as t
+where t.a < 2
+union
+select * from (select a from t1 where b >= 'c') as t
+where t.a >= 4;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 8 Using where
+3 UNION t1 ALL NULL NULL NULL NULL 8 Using where
+NULL UNION RESULT <union1,3> ALL NULL NULL NULL NULL NULL
# specification of t contains union
with t as (select a from t1 where b >= 'f'
union
@@ -534,7 +569,7 @@ with t as (select a from t1 where b >= 'c')
select * from t2,t where t2.c=t.a;
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 AS (select `t1`.`a` AS `a` from `t1` where (`t1`.`b` >= 'c'))select `t2`.`c` AS `c`,`t`.`a` AS `a` from (`t2` join `t`) where (`t2`.`c` = `t`.`a`) latin1 latin1_swedish_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as (select `t1`.`a` AS `a` from `t1` where (`t1`.`b` >= 'c'))select `t2`.`c` AS `c`,`t`.`a` AS `a` from (`t2` join `t`) where (`t2`.`c` = `t`.`a`) latin1 latin1_swedish_ci
select * from v1;
c a
4 4
@@ -551,7 +586,7 @@ with t as (select a, count(*) from t1 where b >= 'c' group by a)
select * from t2,t where t2.c=t.a;
show create view v2;
View Create View character_set_client collation_connection
-v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS WITH t AS (select `t1`.`a` AS `a`,count(0) AS `count(*)` from `t1` where (`t1`.`b` >= 'c') group by `t1`.`a`)select `t2`.`c` AS `c`,`t`.`a` AS `a`,`t`.`count(*)` AS `count(*)` from (`t2` join `t`) where (`t2`.`c` = `t`.`a`) latin1 latin1_swedish_ci
+v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS with t as (select `t1`.`a` AS `a`,count(0) AS `count(*)` from `t1` where (`t1`.`b` >= 'c') group by `t1`.`a`)select `t2`.`c` AS `c`,`t`.`a` AS `a`,`t`.`count(*)` AS `count(*)` from (`t2` join `t`) where (`t2`.`c` = `t`.`a`) latin1 latin1_swedish_ci
select * from v2;
c a count(*)
4 4 2
@@ -569,7 +604,7 @@ with t(c) as (select a from t1 where b >= 'c')
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 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
@@ -581,7 +616,7 @@ with t(c) as (select a from t1 where b >= 'c')
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 `t1`.`a` AS `c` from `t1` where (`t1`.`b` >= 'c'))select `r1`.`c` AS `c`,`r2`.`c` AS `d` from (`t` `r1` join `t` `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 as (select `t1`.`a` AS `c` from `t1` where (`t1`.`b` >= 'c'))select `r1`.`c` AS `c`,`r2`.`c` AS `d` from (`t` `r1` join `t` `r2`) where ((`r1`.`c` = `r2`.`c`) and (`r2`.`c` = 4)) latin1 latin1_swedish_ci
select * from v4;
c d
4 4
@@ -672,7 +707,7 @@ ERROR HY000: Duplicate query name in WITH clause
with t as (select a from s where a<5),
s as (select a from t1 where b>='d')
select * from t,s where t.a=s.a;
-ERROR HY000: The definition of the table 't' refers to the table 's' defined later in a non-recursive WITH clause
+ERROR 42S02: Table 'test.s' doesn't exist
with recursive
t as (select a from s where a<5),
s as (select a from t1 where b>='d')
@@ -688,24 +723,28 @@ with recursive t as (select * from s where a>2),
s as (select a from t1,r where t1.a>r.c),
r as (select c from t,t2 where t.a=t2.c)
select * from r where r.c<7;
-ERROR HY000: Recursive queries in WITH clause are not supported yet
-with t as (select * from s where a>2),
+ERROR HY000: No anchors for recursive WITH element 't'
+with recursive
+t as (select * from s where a>2),
s as (select a from t1,r where t1.a>r.c),
r as (select c from t,t2 where t.a=t2.c)
select * from r where r.c<7;
-ERROR HY000: Recursive queries in WITH clause are not supported yet
-with t as (select * from t1
+ERROR HY000: No anchors for recursive WITH element 't'
+with recursive
+t as (select * from t1
where a in (select c from s where b<='ccc') and b>'b'),
s as (select * from t1,t2
where t1.a=t2.c and t1.c in (select a from t where a<5))
select * from s where s.b>'aaa';
-ERROR HY000: Recursive queries in WITH clause are not supported yet
-with t as (select * from t1 where b>'aaa' and b <='d')
+ERROR HY000: No anchors for recursive WITH element 't'
+with recursive
+t as (select * from t1 where b>'aaa' and b <='d')
select t.b from t,t2
where t.a=t2.c and
-t2.c in (with s as (select t1.a from s,t1 where t1.a=s.a and t1.b<'c')
+t2.c in (with recursive
+s as (select t1.a from s,t1 where t1.a=s.a and t1.b<'c')
select * from s);
-ERROR HY000: Recursive queries in WITH clause are not supported yet
+ERROR HY000: No anchors for recursive WITH element 's'
#erroneous definition of unreferenced with table t
with t as (select count(*) from t1 where d>='f' group by a)
select t1.b from t2,t1 where t1.a = t2.c;
@@ -742,6 +781,22 @@ ERROR HY000: WITH column list and SELECT field list have different column counts
with t(f1,f1) as (select * from t1 where b >= 'c')
select t1.b from t2,t1 where t1.a = t2.c;
ERROR 42S21: Duplicate column name 'f1'
+# explain for query with unreferenced with table
+explain
+with t as (select a from t1 where b >= 'c')
+select t1.b from t2,t1 where t1.a = t2.c;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 4
+1 PRIMARY t1 ALL NULL NULL NULL NULL 8 Using where; Using join buffer (flat, BNL join)
+explain
+with t as (select a, count(*) from t1 where b >= 'c' group by a)
+select t1.b from t2,t1 where t1.a = t2.c;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 4
+1 PRIMARY t1 ALL NULL NULL NULL NULL 8 Using where; Using join buffer (flat, BNL join)
+# too many with elements in with clause
+with s65 as (select * from t1), s64 as (select * from t1) , s63 as (select * from t1) , s62 as (select * from t1) , s61 as (select * from t1) , s60 as (select * from t1) , s59 as (select * from t1) , s58 as (select * from t1) , s57 as (select * from t1) , s56 as (select * from t1) , s55 as (select * from t1) , s54 as (select * from t1) , s53 as (select * from t1) , s52 as (select * from t1) , s51 as (select * from t1) , s50 as (select * from t1) , s49 as (select * from t1) , s48 as (select * from t1) , s47 as (select * from t1) , s46 as (select * from t1) , s45 as (select * from t1) , s44 as (select * from t1) , s43 as (select * from t1) , s42 as (select * from t1) , s41 as (select * from t1) , s40 as (select * from t1) , s39 as (select * from t1) , s38 as (select * from t1) , s37 as (select * from t1) , s36 as (select * from t1) , s35 as (select * from t1) , s34 as (select * from t1) , s33 as (select * from t1) , s32 as (select * from t1) , s31 as (select * from t1) , s30 as (select * from t1) , s29 as (select * from t1) , s28 as (select * from t1) , s27 as (select * from t1) , s26 as (select * from t1) , s25 as (select * from t1) , s24 as (select * from t1) , s23 as (select * from t1) , s22 as (select * from t1) , s21 as (select * from t1) , s20 as (select * from t1) , s19 as (select * from t1) , s18 as (select * from t1) , s17 as (select * from t1) , s16 as (select * from t1) , s15 as (select * from t1) , s14 as (select * from t1) , s13 as (select * from t1) , s12 as (select * from t1) , s11 as (select * from t1) , s10 as (select * from t1) , s9 as (select * from t1) , s8 as (select * from t1) , s7 as (select * from t1) , s6 as (select * from t1) , s5 as (select * from t1) , s4 as (select * from t1) , s3 as (select * from t1) , s2 as (select * from t1) , s1 as (select * from t1) select * from s65;
+ERROR HY000: Too many WITH elements in WITH clause
drop table t1,t2;
#
# Bug mdev-9937: View used in the specification of with table
@@ -773,3 +828,70 @@ a
2
3
DROP TABLE t1,t2,t3;
+#
+# Bug mdev-10344: the WITH clause of the query refers to a view that uses
+# a base table with the same name as a CTE table from the clause
+#
+create table ten(a int primary key);
+insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table one_k(a int primary key);
+insert into one_k select A.a + B.a* 10 + C.a * 100 from ten A, ten B, ten C;
+create view v1 as select * from ten;
+select * from v1;
+a
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+drop view v1;
+drop table ten, one_k;
+#
+# MDEV-10057 : Crash with EXPLAIN + WITH + constant query
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+SELECT * FROM (WITH a AS (SELECT * FROM t1) SELECT 1) AS t1;
+1
+1
+EXPLAIN SELECT * FROM (WITH a AS (SELECT * FROM t1) SELECT 1) AS t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived2> system NULL NULL NULL NULL 1
+2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used
+DROP TABLE t1;
+#
+# MDEV-10058: Suspicious EXPLAIN output for a derived table + WITH + joined table
+#
+CREATE TABLE t1 (a INT);
+CREATE TABLE t2 (a INT);
+CREATE TABLE t3 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+INSERT INTO t2 VALUES (1),(2),(3);
+INSERT INTO t3 VALUES (1),(2),(3);
+EXPLAIN SELECT * FROM (WITH a AS (SELECT * FROM t1) (t2 NATURAL JOIN t3));
+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 't2 NATURAL JOIN t3))' at line 1
+explain SELECT * FROM (WITH a AS (SELECT * FROM t1) SELECT * FROM t2 NATURAL JOIN t3) AS d1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 3
+1 PRIMARY t3 ALL NULL NULL NULL NULL 3 Using where; Using join buffer (flat, BNL join)
+DROP TABLE t1,t2,t3;
+#
+# MDEV-10729: Server crashes in st_select_lex::set_explain_type
+#
+CREATE TABLE t1 (i1 INT, KEY(i1)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (4),(8);
+CREATE TABLE t2 (a2 INT, b2 INT, KEY(b2)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (8,7);
+CREATE TABLE t3 (i3 INT) ENGINE=MyISAM;
+INSERT INTO t3 VALUES (2),(6);
+SELECT * FROM t1, t2 WHERE a2 = i1 and b2 >= i1 AND i1 IN ( SELECT i3 FROM t3 )
+UNION
+SELECT * FROM t1, t2 WHERE a2 = i1 and b2 >= i1 AND i1 IN ( SELECT i3 FROM t3 )
+;
+i1 a2 b2
+DROP TABLE t1,t2,t3;
diff --git a/mysql-test/r/cte_recursive.result b/mysql-test/r/cte_recursive.result
new file mode 100644
index 00000000000..b37a32a8ae7
--- /dev/null
+++ b/mysql-test/r/cte_recursive.result
@@ -0,0 +1,1634 @@
+create table t1 (a int, b varchar(32));
+insert into t1 values
+(4,'aaaa' ), (7,'bb'), (1,'ccc'), (4,'dd');
+insert into t1 values
+(3,'eee'), (7,'bb'), (1,'fff'), (4,'ggg');
+with recursive
+t as
+(
+select * from t1 where t1.b >= 'c'
+ union
+select * from r
+),
+r as
+(
+select * from t
+union
+select t1.* from t1,r where r.a+1 = t1.a
+)
+select * from r;
+ERROR HY000: Unacceptable mutual recursion with anchored table 't'
+with recursive
+a1(a,b) as
+(select * from t1 where t1.a>3
+union
+select * from b1 where b1.a >3
+union
+select * from c1 where c1.a>3),
+b1(a,b) as
+(select * from a1 where a1.b > 'ccc'
+union
+select * from c1 where c1.b > 'ddd'),
+c1(a,b) as
+(select * from a1 where a1.a<6 and a1.b< 'zz'
+union
+select * from b1 where b1.b > 'auu')
+select * from c1;
+ERROR HY000: Unacceptable mutual recursion with anchored table 'a1'
+drop table t1;
+# WITH RECURSIVE vs just WITH
+create table t1 (a int);
+insert into t1 values
+(0), (1), (2), (3), (4);
+create table t2 (a int);
+insert into t2 values
+(1), (2), (3), (4), (5);
+# just WITH : s refers to t defined after s
+with
+s(a) as (select t.a + 10 from t),
+t(a) as (select t1.a from t1)
+select * from s;
+ERROR 42S02: Table 'test.t' doesn't exist
+# WITH RECURSIVE: s refers to t defined after s
+with recursive
+s(a) as (select t.a + 10 from t),
+t(a) as (select t1.a from t1)
+select * from s;
+a
+10
+11
+12
+13
+14
+# just WITH : defined t1 is non-recursive and uses base tables t1,t2
+with
+t1 as
+(
+select a from t2 where t2.a=3
+union
+select t2.a from t1,t2 where t1.a+1=t2.a
+)
+select * from t1;
+a
+3
+1
+2
+4
+5
+explain
+with
+t1 as
+(
+select a from t2 where t2.a=3
+union
+select t2.a from t1,t2 where t1.a+1=t2.a
+)
+select * from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 30
+2 SUBQUERY t2 ALL NULL NULL NULL NULL 5 Using where
+3 UNION t1 ALL NULL NULL NULL NULL 5
+3 UNION t2 ALL NULL NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join)
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
+#WITH RECURSIVE : defined t1 is recursive and uses only base table t2
+with recursive
+t1 as
+(
+select a from t2 where t2.a=3
+union
+select t2.a from t1,t2 where t1.a+1=t2.a
+)
+select * from t1;
+a
+3
+4
+5
+explain
+with recursive
+t1 as
+(
+select a from t2 where t2.a=3
+union
+select t2.a from t1,t2 where t1.a+1=t2.a
+)
+select * from t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 5
+2 SUBQUERY t2 ALL NULL NULL NULL NULL 5 Using where
+3 RECURSIVE UNION <derived2> ALL NULL NULL NULL NULL 5
+3 RECURSIVE UNION t2 ALL NULL NULL NULL NULL 5 Using where; Using join buffer (flat, BNL join)
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
+# just WITH : types of t1 columns are determined by all parts of union
+create view v1 as
+with
+t1 as
+(
+select a from t2 where t2.a=3
+union
+select t2.a+1 from t1,t2 where t1.a=t2.a
+)
+select * from t1;
+show columns from v1;
+Field Type Null Key Default Extra
+a bigint(20) YES NULL
+# WITH RECURSIVE : types of t1 columns are determined by anchor parts
+create view v2 as
+with recursive
+t1 as
+(
+select a from t2 where t2.a=3
+union
+select t2.a+1 from t1,t2 where t1.a=t2.a
+)
+select * from t1;
+show columns from v2;
+Field Type Null Key Default Extra
+a int(11) YES NULL
+drop view v1,v2;
+drop table t1,t2;
+create table folks(id int, name char(32), dob date, father int, mother int);
+insert into folks values
+(100, 'Me', '2000-01-01', 20, 30),
+(20, 'Dad', '1970-02-02', 10, 9),
+(30, 'Mom', '1975-03-03', 8, 7),
+(10, 'Grandpa Bill', '1940-04-05', null, null),
+(9, 'Grandma Ann', '1941-10-15', null, null),
+(25, 'Uncle Jim', '1968-11-18', 8, 7),
+(98, 'Sister Amy', '2001-06-20', 20, 30),
+(7, 'Grandma Sally', '1943-08-23', null, 6),
+(8, 'Grandpa Ben', '1940-10-21', null, null),
+(6, 'Grandgrandma Martha', '1923-05-17', null, null),
+(67, 'Cousin Eddie', '1992-02-28', 25, 27),
+(27, 'Auntie Melinda', '1971-03-29', null, null);
+# simple recursion with one anchor and one recursive select
+# the anchor is the first select in the specification
+with recursive
+ancestors
+as
+(
+select *
+from folks
+where name = 'Me' and dob = '2000-01-01'
+ union
+select p.id, p.name, p.dob, p.father, p.mother
+from folks as p, ancestors AS a
+where p.id = a.father or p.id = a.mother
+)
+select * from ancestors;
+id name dob father mother
+100 Me 2000-01-01 20 30
+20 Dad 1970-02-02 10 9
+30 Mom 1975-03-03 8 7
+10 Grandpa Bill 1940-04-05 NULL NULL
+9 Grandma Ann 1941-10-15 NULL NULL
+7 Grandma Sally 1943-08-23 NULL 6
+8 Grandpa Ben 1940-10-21 NULL NULL
+6 Grandgrandma Martha 1923-05-17 NULL NULL
+# simple recursion with one anchor and one recursive select
+# the anchor is the last select in the specification
+with recursive
+ancestors
+as
+(
+select p.*
+from folks as p, ancestors AS a
+where p.id = a.father or p.id = a.mother
+union
+select *
+from folks
+where name = 'Me' and dob = '2000-01-01'
+)
+select * from ancestors;
+id name dob father mother
+100 Me 2000-01-01 20 30
+20 Dad 1970-02-02 10 9
+30 Mom 1975-03-03 8 7
+10 Grandpa Bill 1940-04-05 NULL NULL
+9 Grandma Ann 1941-10-15 NULL NULL
+7 Grandma Sally 1943-08-23 NULL 6
+8 Grandpa Ben 1940-10-21 NULL NULL
+6 Grandgrandma Martha 1923-05-17 NULL NULL
+# simple recursion with one anchor and one recursive select
+# the anchor is the first select in the specification
+with recursive
+ancestors
+as
+(
+select *
+from folks
+where name = 'Cousin Eddie'
+ union
+select p.*
+from folks as p, ancestors as a
+where p.id = a.father or p.id = a.mother
+)
+select * from ancestors;
+id name dob father mother
+67 Cousin Eddie 1992-02-28 25 27
+25 Uncle Jim 1968-11-18 8 7
+27 Auntie Melinda 1971-03-29 NULL NULL
+7 Grandma Sally 1943-08-23 NULL 6
+8 Grandpa Ben 1940-10-21 NULL NULL
+6 Grandgrandma Martha 1923-05-17 NULL NULL
+# simple recursion with or in anchor and or in recursive part
+with recursive
+ancestors
+as
+(
+select *
+from folks
+where name = 'Me' or name='Sister Amy'
+ union
+select p.*
+from folks as p, ancestors as a
+where p.id = a.father or p.id = a.mother
+)
+select * from ancestors;
+id name dob father mother
+100 Me 2000-01-01 20 30
+98 Sister Amy 2001-06-20 20 30
+20 Dad 1970-02-02 10 9
+30 Mom 1975-03-03 8 7
+10 Grandpa Bill 1940-04-05 NULL NULL
+9 Grandma Ann 1941-10-15 NULL NULL
+7 Grandma Sally 1943-08-23 NULL 6
+8 Grandpa Ben 1940-10-21 NULL NULL
+6 Grandgrandma Martha 1923-05-17 NULL NULL
+# two recursive definition, one uses another
+with recursive
+prev_gen
+as
+(
+select folks.*
+from folks, prev_gen
+where folks.id=prev_gen.father or folks.id=prev_gen.mother
+union
+select *
+from folks
+where name='Me'
+),
+ancestors
+as
+(
+select *
+from folks
+where name='Me'
+ union
+select *
+from ancestors
+union
+select *
+from prev_gen
+)
+select ancestors.name, ancestors.dob from ancestors;
+name dob
+Me 2000-01-01
+Dad 1970-02-02
+Mom 1975-03-03
+Grandpa Bill 1940-04-05
+Grandma Ann 1941-10-15
+Grandma Sally 1943-08-23
+Grandpa Ben 1940-10-21
+Grandgrandma Martha 1923-05-17
+# recursive definition with two attached non-recursive
+with recursive
+ancestors(id,name,dob)
+as
+(
+with
+father(child_id,id,name,dob)
+as
+(
+select folks.id, f.id, f.name, f.dob
+from folks, folks f
+where folks.father=f.id
+),
+mother(child_id,id,name,dob)
+as
+(
+select folks.id, m.id, m.name, m.dob
+from folks, folks m
+where folks.mother=m.id
+)
+select folks.id, folks.name, folks.dob
+from folks
+where name='Me'
+ union
+select f.id, f.name, f.dob
+from ancestors a, father f
+where f.child_id=a.id
+union
+select m.id, m.name, m.dob
+from ancestors a, mother m
+where m.child_id=a.id
+)
+select ancestors.name, ancestors.dob from ancestors;
+name dob
+Me 2000-01-01
+Dad 1970-02-02
+Mom 1975-03-03
+Grandpa Bill 1940-04-05
+Grandpa Ben 1940-10-21
+Grandma Ann 1941-10-15
+Grandma Sally 1943-08-23
+Grandgrandma Martha 1923-05-17
+# simple recursion with one anchor and one recursive select
+# the anchor is the first select in the specification
+with recursive
+descendants
+as
+(
+select *
+from folks
+where name = 'Grandpa Bill'
+ union
+select folks.*
+from folks, descendants as d
+where d.id=folks.father or d.id=folks.mother
+)
+select * from descendants;
+id name dob father mother
+10 Grandpa Bill 1940-04-05 NULL NULL
+20 Dad 1970-02-02 10 9
+100 Me 2000-01-01 20 30
+98 Sister Amy 2001-06-20 20 30
+# simple recursion with one anchor and one recursive select
+# the anchor is the first select in the specification
+with recursive
+descendants
+as
+(
+select *
+from folks
+where name = 'Grandma Sally'
+ union
+select folks.*
+from folks, descendants as d
+where d.id=folks.father or d.id=folks.mother
+)
+select * from descendants;
+id name dob father mother
+7 Grandma Sally 1943-08-23 NULL 6
+30 Mom 1975-03-03 8 7
+25 Uncle Jim 1968-11-18 8 7
+100 Me 2000-01-01 20 30
+98 Sister Amy 2001-06-20 20 30
+67 Cousin Eddie 1992-02-28 25 27
+# simple recursive table used three times in the main query
+with recursive
+ancestors
+as
+(
+select *
+from folks
+where name = 'Me' and dob = '2000-01-01'
+ union
+select p.*
+from folks as p, ancestors AS a
+where p.id = a.father OR p.id = a.mother
+)
+select *
+from ancestors t1, ancestors t2
+where exists (select * from ancestors a
+where a.father=t1.id AND a.mother=t2.id);
+id name dob father mother id name dob father mother
+20 Dad 1970-02-02 10 9 30 Mom 1975-03-03 8 7
+10 Grandpa Bill 1940-04-05 NULL NULL 9 Grandma Ann 1941-10-15 NULL NULL
+8 Grandpa Ben 1940-10-21 NULL NULL 7 Grandma Sally 1943-08-23 NULL 6
+# simple recursive table used three times in the main query
+with
+ancestor_couples(husband, h_dob, wife, w_dob)
+as
+(
+with recursive
+ancestors
+as
+(
+select *
+from folks
+where name = 'Me'
+ union
+select p.*
+from folks as p, ancestors AS a
+where p.id = a.father OR p.id = a.mother
+)
+select t1.name, t1.dob, t2.name, t2.dob
+from ancestors t1, ancestors t2
+where exists (select * from ancestors a
+where a.father=t1.id AND a.mother=t2.id)
+)
+select * from ancestor_couples;
+husband h_dob wife w_dob
+Dad 1970-02-02 Mom 1975-03-03
+Grandpa Bill 1940-04-05 Grandma Ann 1941-10-15
+Grandpa Ben 1940-10-21 Grandma Sally 1943-08-23
+# simple recursion with two selects in recursive part
+with recursive
+ancestors
+as
+(
+select *
+from folks
+where name = 'Me'
+ union
+select p.*
+from folks as p, ancestors as fa
+where p.id = fa.father
+union
+select p.*
+from folks as p, ancestors as ma
+where p.id = ma.mother
+)
+select * from ancestors;
+id name dob father mother
+100 Me 2000-01-01 20 30
+20 Dad 1970-02-02 10 9
+30 Mom 1975-03-03 8 7
+10 Grandpa Bill 1940-04-05 NULL NULL
+8 Grandpa Ben 1940-10-21 NULL NULL
+9 Grandma Ann 1941-10-15 NULL NULL
+7 Grandma Sally 1943-08-23 NULL 6
+6 Grandgrandma Martha 1923-05-17 NULL NULL
+# mutual recursion with renaming
+with recursive
+ancestor_couples(h_id, h_name, h_dob, h_father, h_mother,
+w_id, w_name, w_dob, w_father, w_mother)
+as
+(
+select h.*, w.*
+from folks h, folks w, coupled_ancestors a
+where a.father = h.id AND a.mother = w.id
+union
+select h.*, w.*
+from folks v, folks h, folks w
+where v.name = 'Me' and
+(v.father = h.id AND v.mother= w.id)
+),
+coupled_ancestors (id, name, dob, father, mother)
+as
+(
+select h_id, h_name, h_dob, h_father, h_mother
+from ancestor_couples
+union
+select w_id, w_name, w_dob, w_father, w_mother
+from ancestor_couples
+)
+select h_name, h_dob, w_name, w_dob
+from ancestor_couples;
+h_name h_dob w_name w_dob
+Dad 1970-02-02 Mom 1975-03-03
+Grandpa Bill 1940-04-05 Grandma Ann 1941-10-15
+Grandpa Ben 1940-10-21 Grandma Sally 1943-08-23
+# mutual recursion with union all
+with recursive
+ancestor_couples(h_id, h_name, h_dob, h_father, h_mother,
+w_id, w_name, w_dob, w_father, w_mother)
+as
+(
+select h.*, w.*
+from folks h, folks w, coupled_ancestors a
+where a.father = h.id AND a.mother = w.id
+union
+select h.*, w.*
+from folks v, folks h, folks w
+where v.name = 'Me' and
+(v.father = h.id AND v.mother= w.id)
+),
+coupled_ancestors (id, name, dob, father, mother)
+as
+(
+select h_id, h_name, h_dob, h_father, h_mother
+from ancestor_couples
+union all
+select w_id, w_name, w_dob, w_father, w_mother
+from ancestor_couples
+)
+select h_name, h_dob, w_name, w_dob
+from ancestor_couples;
+h_name h_dob w_name w_dob
+Dad 1970-02-02 Mom 1975-03-03
+Grandpa Bill 1940-04-05 Grandma Ann 1941-10-15
+Grandpa Ben 1940-10-21 Grandma Sally 1943-08-23
+# mutual recursion with renaming
+with recursive
+ancestor_couples(h_id, h_name, h_dob, h_father, h_mother,
+w_id, w_name, w_dob, w_father, w_mother)
+as
+(
+select h.*, w.*
+from folks h, folks w, coupled_ancestors a
+where a.father = h.id AND a.mother = w.id
+union
+select h.*, w.*
+from folks v, folks h, folks w
+where v.name = 'Me' and
+(v.father = h.id AND v.mother= w.id)
+),
+coupled_ancestors (id, name, dob, father, mother)
+as
+(
+select h_id, h_name, h_dob, h_father, h_mother
+from ancestor_couples
+union
+select w_id, w_name, w_dob, w_father, w_mother
+from ancestor_couples
+)
+select h_name, h_dob, w_name, w_dob
+from ancestor_couples;
+h_name h_dob w_name w_dob
+Dad 1970-02-02 Mom 1975-03-03
+Grandpa Bill 1940-04-05 Grandma Ann 1941-10-15
+Grandpa Ben 1940-10-21 Grandma Sally 1943-08-23
+# mutual recursion with union all
+with recursive
+ancestor_couples(h_id, h_name, h_dob, h_father, h_mother,
+w_id, w_name, w_dob, w_father, w_mother)
+as
+(
+select h.*, w.*
+from folks h, folks w, coupled_ancestors a
+where a.father = h.id AND a.mother = w.id
+),
+coupled_ancestors (id, name, dob, father, mother)
+as
+(
+select *
+from folks
+where name = 'Me'
+ union all
+select h_id, h_name, h_dob, h_father, h_mother
+from ancestor_couples
+union all
+select w_id, w_name, w_dob, w_father, w_mother
+from ancestor_couples
+)
+select h_name, h_dob, w_name, w_dob
+from ancestor_couples;
+h_name h_dob w_name w_dob
+Dad 1970-02-02 Mom 1975-03-03
+Grandpa Bill 1940-04-05 Grandma Ann 1941-10-15
+Grandpa Ben 1940-10-21 Grandma Sally 1943-08-23
+# mutual recursion with one select in the first definition
+with recursive
+ancestor_couple_ids(h_id, w_id)
+as
+(
+select a.father, a.mother
+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 *
+from folks
+where name = 'Me'
+ union all
+select p.*
+from folks p, ancestor_couple_ids fa
+where p.id = fa.h_id
+union all
+select p.*
+from folks p, ancestor_couple_ids ma
+where p.id = ma.w_id
+)
+select *
+from ancestor_couple_ids;
+h_id w_id
+20 30
+10 9
+8 7
+# join of a mutually recursive table with base tables
+with recursive
+ancestor_couple_ids(h_id, w_id)
+as
+(
+select a.father, a.mother
+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 *
+from folks
+where name = 'Me'
+ union all
+select p.*
+from folks p, ancestor_couple_ids fa
+where p.id = fa.h_id
+union all
+select p.*
+from folks p, ancestor_couple_ids ma
+where p.id = ma.w_id
+)
+select h.name, h.dob, w.name, w.dob
+from ancestor_couple_ids c, folks h, folks w
+where c.h_id = h.id and c.w_id= w.id;
+name dob name dob
+Dad 1970-02-02 Mom 1975-03-03
+Grandpa Bill 1940-04-05 Grandma Ann 1941-10-15
+Grandpa Ben 1940-10-21 Grandma Sally 1943-08-23
+# join of two mutually recursive tables
+with recursive
+ancestor_couple_ids(h_id, w_id)
+as
+(
+select a.father, a.mother
+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 *
+from folks
+where name = 'Me'
+ union all
+select p.*
+from folks p, ancestor_couple_ids fa
+where p.id = fa.h_id
+union all
+select p.*
+from folks p, ancestor_couple_ids ma
+where p.id = ma.w_id
+)
+select h.name, h.dob, w.name, w.dob
+from ancestor_couple_ids c, coupled_ancestors h, coupled_ancestors w
+where c.h_id = h.id and c.w_id= w.id;
+name dob name dob
+Dad 1970-02-02 Mom 1975-03-03
+Grandpa Bill 1940-04-05 Grandma Ann 1941-10-15
+Grandpa Ben 1940-10-21 Grandma Sally 1943-08-23
+explain extended
+with recursive
+ancestor_couple_ids(h_id, w_id)
+as
+(
+select a.father, a.mother
+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 *
+from folks
+where name = 'Me'
+ union all
+select p.*
+from folks p, ancestor_couple_ids fa
+where p.id = fa.h_id
+union all
+select p.*
+from folks p, ancestor_couple_ids ma
+where p.id = ma.w_id
+)
+select h.name, h.dob, w.name, w.dob
+from ancestor_couple_ids c, coupled_ancestors h, coupled_ancestors w
+where c.h_id = h.id and c.w_id= w.id;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 100.00 Using where
+1 PRIMARY <derived3> ref key0 key0 5 c.h_id 2 100.00
+1 PRIMARY <derived3> ref key0 key0 5 c.w_id 2 100.00
+3 SUBQUERY folks ALL NULL NULL NULL NULL 12 100.00 Using where
+4 RECURSIVE UNION <derived2> ALL NULL NULL NULL NULL 2 100.00
+4 RECURSIVE UNION p ALL NULL NULL NULL NULL 12 100.00 Using where; Using join buffer (flat, BNL join)
+5 RECURSIVE UNION <derived2> ALL NULL NULL NULL NULL 2 100.00
+5 RECURSIVE UNION p ALL NULL NULL NULL NULL 12 100.00 Using where; Using join buffer (flat, BNL join)
+NULL UNION RESULT <union3,4,5> ALL NULL NULL NULL NULL NULL NULL
+2 UNCACHEABLE SUBQUERY <derived3> ALL NULL NULL NULL NULL 12 100.00 Using where
+Warnings:
+Note 1003 with recursive ancestor_couple_ids as (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 `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 `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 `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 `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)
+as
+(
+select a.father, a.mother
+from coupled_ancestors a
+),
+coupled_ancestors (id, name, dob, father, mother)
+as
+(
+select *
+from folks
+where name = 'Me'
+ union all
+select p.*
+from folks p, ancestor_couple_ids fa
+where p.id = fa.h_id
+union all
+select p.*
+from folks p, ancestor_couple_ids ma
+where p.id = ma.w_id
+)
+select *
+from ancestor_couple_ids;
+h_id w_id
+20 30
+10 9
+8 7
+NULL NULL
+NULL NULL
+NULL NULL
+NULL 6
+NULL NULL
+# join of two mutually recursive tables
+with recursive
+ancestor_couple_ids(h_id, w_id)
+as
+(
+select a.father, a.mother
+from coupled_ancestors a
+),
+coupled_ancestors (id, name, dob, father, mother)
+as
+(
+select *
+from folks
+where name = 'Me'
+ union all
+select p.*
+from folks p, ancestor_couple_ids fa
+where p.id = fa.h_id
+union all
+select p.*
+from folks p, ancestor_couple_ids ma
+where p.id = ma.w_id
+)
+select h.name, h.dob, w.name, w.dob
+from ancestor_couple_ids c, coupled_ancestors h, coupled_ancestors w
+where c.h_id = h.id and c.w_id= w.id;
+name dob name dob
+Dad 1970-02-02 Mom 1975-03-03
+Grandpa Bill 1940-04-05 Grandma Ann 1941-10-15
+Grandpa Ben 1940-10-21 Grandma Sally 1943-08-23
+# execution of prepared query using a recursive table
+prepare stmt1 from "
+with recursive
+ancestors
+as
+(
+ select *
+ from folks
+ where name = 'Me' and dob = '2000-01-01'
+ union
+ select p.id, p.name, p.dob, p.father, p.mother
+ from folks as p, ancestors AS a
+ where p.id = a.father or p.id = a.mother
+)
+select * from ancestors;
+";
+execute stmt1;
+id name dob father mother
+100 Me 2000-01-01 20 30
+20 Dad 1970-02-02 10 9
+30 Mom 1975-03-03 8 7
+10 Grandpa Bill 1940-04-05 NULL NULL
+9 Grandma Ann 1941-10-15 NULL NULL
+7 Grandma Sally 1943-08-23 NULL 6
+8 Grandpa Ben 1940-10-21 NULL NULL
+6 Grandgrandma Martha 1923-05-17 NULL NULL
+execute stmt1;
+id name dob father mother
+100 Me 2000-01-01 20 30
+20 Dad 1970-02-02 10 9
+30 Mom 1975-03-03 8 7
+10 Grandpa Bill 1940-04-05 NULL NULL
+9 Grandma Ann 1941-10-15 NULL NULL
+7 Grandma Sally 1943-08-23 NULL 6
+8 Grandpa Ben 1940-10-21 NULL NULL
+6 Grandgrandma Martha 1923-05-17 NULL NULL
+deallocate prepare stmt1;
+# view using a recursive table
+create view v1 as
+with recursive
+ancestors
+as
+(
+select *
+from folks
+where name = 'Me' and dob = '2000-01-01'
+ union
+select p.id, p.name, p.dob, p.father, p.mother
+from folks as p, ancestors AS a
+where p.id = a.father or p.id = a.mother
+)
+select * from ancestors;
+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 recursive ancestors as (select `folks`.`id` AS `id`,`folks`.`name` AS `name`,`folks`.`dob` AS `dob`,`folks`.`father` AS `father`,`folks`.`mother` AS `mother` from `folks` where ((`folks`.`name` = 'Me') and (`folks`.`dob` = '2000-01-01')) union select `p`.`id` AS `id`,`p`.`name` AS `name`,`p`.`dob` AS `dob`,`p`.`father` AS `father`,`p`.`mother` AS `mother` from (`folks` `p` join `ancestors` `a`) where ((`p`.`id` = `a`.`father`) or (`p`.`id` = `a`.`mother`)))select `ancestors`.`id` AS `id`,`ancestors`.`name` AS `name`,`ancestors`.`dob` AS `dob`,`ancestors`.`father` AS `father`,`ancestors`.`mother` AS `mother` from `ancestors` latin1 latin1_swedish_ci
+select * from v1;
+id name dob father mother
+100 Me 2000-01-01 20 30
+20 Dad 1970-02-02 10 9
+30 Mom 1975-03-03 8 7
+10 Grandpa Bill 1940-04-05 NULL NULL
+9 Grandma Ann 1941-10-15 NULL NULL
+7 Grandma Sally 1943-08-23 NULL 6
+8 Grandpa Ben 1940-10-21 NULL NULL
+6 Grandgrandma Martha 1923-05-17 NULL NULL
+create view v2 as
+with recursive
+ancestors
+as
+(
+select *
+from folks
+where name = 'Me'
+ union
+select p.*
+from folks as p, ancestors as fa
+where p.id = fa.father
+union
+select p.*
+from folks as p, ancestors as ma
+where p.id = ma.mother
+)
+select * from ancestors;
+show create view v2;
+View Create View character_set_client collation_connection
+v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS with recursive ancestors as (select `folks`.`id` AS `id`,`folks`.`name` AS `name`,`folks`.`dob` AS `dob`,`folks`.`father` AS `father`,`folks`.`mother` AS `mother` from `folks` where (`folks`.`name` = 'Me') union select `p`.`id` AS `id`,`p`.`name` AS `name`,`p`.`dob` AS `dob`,`p`.`father` AS `father`,`p`.`mother` AS `mother` from (`folks` `p` join `ancestors` `fa`) where (`p`.`id` = `fa`.`father`) union select `p`.`id` AS `id`,`p`.`name` AS `name`,`p`.`dob` AS `dob`,`p`.`father` AS `father`,`p`.`mother` AS `mother` from (`folks` `p` join `ancestors` `ma`) where (`p`.`id` = `ma`.`mother`))select `ancestors`.`id` AS `id`,`ancestors`.`name` AS `name`,`ancestors`.`dob` AS `dob`,`ancestors`.`father` AS `father`,`ancestors`.`mother` AS `mother` from `ancestors` latin1 latin1_swedish_ci
+select * from v2;
+id name dob father mother
+100 Me 2000-01-01 20 30
+20 Dad 1970-02-02 10 9
+30 Mom 1975-03-03 8 7
+10 Grandpa Bill 1940-04-05 NULL NULL
+8 Grandpa Ben 1940-10-21 NULL NULL
+9 Grandma Ann 1941-10-15 NULL NULL
+7 Grandma Sally 1943-08-23 NULL 6
+6 Grandgrandma Martha 1923-05-17 NULL NULL
+drop view v1,v2;
+explain extended
+with recursive
+ancestors
+as
+(
+select *
+from folks
+where name = 'Me' and dob = '2000-01-01'
+ union
+select p.id, p.name, p.dob, p.father, p.mother
+from folks as p, ancestors AS a
+where p.id = a.father or p.id = a.mother
+)
+select * from ancestors;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 12 100.00
+2 SUBQUERY folks ALL NULL NULL NULL NULL 12 100.00 Using where
+3 RECURSIVE UNION p ALL NULL NULL NULL NULL 12 100.00
+3 RECURSIVE UNION <derived2> ALL NULL NULL NULL NULL 12 100.00 Using where; Using join buffer (flat, BNL join)
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1003 with recursive ancestors as (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') and (`test`.`folks`.`dob` = DATE'2000-01-01')) union select `p`.`id` AS `id`,`p`.`name` AS `name`,`p`.`dob` AS `dob`,`p`.`father` AS `father`,`p`.`mother` AS `mother` from `test`.`folks` `p` join `ancestors` `a` where ((`a`.`father` = `p`.`id`) or (`a`.`mother` = `p`.`id`)))select `ancestors`.`id` AS `id`,`ancestors`.`name` AS `name`,`ancestors`.`dob` AS `dob`,`ancestors`.`father` AS `father`,`ancestors`.`mother` AS `mother` from `ancestors`
+# recursive spec with two anchor selects and two recursive ones
+with recursive
+ancestor_ids (id)
+as
+(
+select father from folks where name = 'Me'
+ union
+select mother from folks where name = 'Me'
+ union
+select father from folks, ancestor_ids a where folks.id = a.id
+union
+select mother from folks, ancestor_ids a where folks.id = a.id
+),
+ancestors
+as
+(
+select p.* from folks as p, ancestor_ids as a
+where p.id = a.id
+)
+select * from ancestors;
+id name dob father mother
+20 Dad 1970-02-02 10 9
+30 Mom 1975-03-03 8 7
+10 Grandpa Bill 1940-04-05 NULL NULL
+9 Grandma Ann 1941-10-15 NULL NULL
+7 Grandma Sally 1943-08-23 NULL 6
+8 Grandpa Ben 1940-10-21 NULL NULL
+6 Grandgrandma Martha 1923-05-17 NULL NULL
+# recursive spec using union all
+with recursive
+ancestors
+as
+(
+select *
+from folks
+where name = 'Me'
+ union all
+select p.*
+from folks as p, ancestors as fa
+where p.id = fa.father
+union all
+select p.*
+from folks as p, ancestors as ma
+where p.id = ma.mother
+)
+select * from ancestors;
+id name dob father mother
+100 Me 2000-01-01 20 30
+20 Dad 1970-02-02 10 9
+30 Mom 1975-03-03 8 7
+10 Grandpa Bill 1940-04-05 NULL NULL
+8 Grandpa Ben 1940-10-21 NULL NULL
+9 Grandma Ann 1941-10-15 NULL NULL
+7 Grandma Sally 1943-08-23 NULL 6
+6 Grandgrandma Martha 1923-05-17 NULL NULL
+with recursive
+ancestor_ids (id, generation)
+as
+(
+select father, 1 from folks where name = 'Me' and father is not null
+union all
+select mother, 1 from folks where name = 'Me' and mother is not null
+union all
+select father, fa.generation+1 from folks, ancestor_ids fa
+where folks.id = fa.id and (father not in (select id from ancestor_ids))
+union all
+select mother, ma.generation+1 from folks, ancestor_ids ma
+where folks.id = ma.id and (mother not in (select id from ancestor_ids))
+)
+select generation, name from ancestor_ids a, folks
+where a.id = folks.id;
+ERROR HY000: Restrictions imposed on recursive definitions are violated for table 'ancestor_ids'
+set standards_compliant_cte=0;
+with recursive
+ancestor_ids (id, generation)
+as
+(
+select father from folks where name = 'Me' and father is not null
+union all
+select mother from folks where name = 'Me' and mother is not null
+union all
+select father, fa.generation+1 from folks, ancestor_ids fa
+where folks.id = fa.id and (father not in (select id from ancestor_ids))
+union all
+select mother, ma.generation+1 from folks, ancestor_ids ma
+where folks.id = ma.id and (mother not in (select id from ancestor_ids))
+)
+select generation, name from ancestor_ids a, folks
+where a.id = folks.id;
+ERROR HY000: WITH column list and SELECT field list have different column counts
+with recursive
+ancestor_ids (id, generation)
+as
+(
+select father, 1 from folks where name = 'Me' and father is not null
+union all
+select mother, 1 from folks where name = 'Me' and mother is not null
+union all
+select father, fa.generation+1 from folks, ancestor_ids fa
+where folks.id = fa.id and father is not null and
+(father not in (select id from ancestor_ids))
+union all
+select mother, ma.generation+1 from folks, ancestor_ids ma
+where folks.id = ma.id and mother is not null and
+(mother not in (select id from ancestor_ids))
+)
+select generation, name from ancestor_ids a, folks
+where a.id = folks.id;
+generation name
+1 Dad
+1 Mom
+2 Grandpa Bill
+2 Grandma Ann
+2 Grandma Sally
+2 Grandpa Ben
+3 Grandgrandma Martha
+set standards_compliant_cte=1;
+with recursive
+coupled_ancestor_ids (id)
+as
+(
+select father from folks where name = 'Me' and father is not null
+union
+select mother from folks where name = 'Me' and mother is not null
+union
+select n.father
+from folks, coupled_ancestor_ids fa, coupled_ancestor_ids ma, folks n
+where folks.father = fa.id and folks.mother = ma.id and
+(fa.id = n.id or ma.id = n.id) and
+n.father is not null and n.mother is not null
+union
+select n.mother
+from folks, coupled_ancestor_ids fa, coupled_ancestor_ids ma, folks n
+where folks.father = fa.id and folks.mother = ma.id and
+(fa.id = n.id or ma.id = n.id) and
+n.father is not null and n.mother is not null
+)
+select p.* from coupled_ancestor_ids a, folks p
+where a.id = p.id;
+ERROR HY000: Restrictions imposed on recursive definitions are violated for table 'coupled_ancestor_ids'
+set statement standards_compliant_cte=0 for
+with recursive
+coupled_ancestor_ids (id)
+as
+(
+select father from folks where name = 'Me' and father is not null
+union
+select mother from folks where name = 'Me' and mother is not null
+union
+select n.father
+from folks, coupled_ancestor_ids fa, coupled_ancestor_ids ma, folks n
+where folks.father = fa.id and folks.mother = ma.id and
+(fa.id = n.id or ma.id = n.id) and
+n.father is not null and n.mother is not null
+union
+select n.mother
+from folks, coupled_ancestor_ids fa, coupled_ancestor_ids ma, folks n
+where folks.father = fa.id and folks.mother = ma.id and
+(fa.id = n.id or ma.id = n.id) and
+n.father is not null and n.mother is not null
+)
+select p.* from coupled_ancestor_ids a, folks p
+where a.id = p.id;
+id name dob father mother
+20 Dad 1970-02-02 10 9
+30 Mom 1975-03-03 8 7
+10 Grandpa Bill 1940-04-05 NULL NULL
+9 Grandma Ann 1941-10-15 NULL NULL
+7 Grandma Sally 1943-08-23 NULL 6
+8 Grandpa Ben 1940-10-21 NULL NULL
+with recursive
+ancestor_ids (id)
+as
+(
+select father from folks where name = 'Me'
+ union
+select mother from folks where name = 'Me'
+ union
+select father from folks left join ancestor_ids a on folks.id = a.id
+union
+select mother from folks left join ancestor_ids a on folks.id = a.id
+),
+ancestors
+as
+(
+select p.* from folks as p, ancestor_ids as a
+where p.id = a.id
+)
+select * from ancestors;
+ERROR HY000: Restrictions imposed on recursive definitions are violated for table 'ancestor_ids'
+set statement standards_compliant_cte=0 for
+with recursive
+ancestor_ids (id)
+as
+(
+select father from folks where name = 'Me'
+ union
+select mother from folks where name = 'Me'
+ union
+select father from folks left join ancestor_ids a on folks.id = a.id
+union
+select mother from folks left join ancestor_ids a on folks.id = a.id
+),
+ancestors
+as
+(
+select p.* from folks as p, ancestor_ids as a
+where p.id = a.id
+)
+select * from ancestors;
+id name dob father mother
+20 Dad 1970-02-02 10 9
+30 Mom 1975-03-03 8 7
+10 Grandpa Bill 1940-04-05 NULL NULL
+9 Grandma Ann 1941-10-15 NULL NULL
+25 Uncle Jim 1968-11-18 8 7
+7 Grandma Sally 1943-08-23 NULL 6
+8 Grandpa Ben 1940-10-21 NULL NULL
+6 Grandgrandma Martha 1923-05-17 NULL NULL
+27 Auntie Melinda 1971-03-29 NULL NULL
+with recursive
+ancestor_ids (id, generation)
+as
+(
+select father, 1 from folks where name = 'Me'
+ union
+select mother, 1 from folks where name = 'Me'
+ union
+select father, a.generation+1 from folks, ancestor_ids a
+where folks.id = a.id
+union
+select mother, a.generation+1 from folks, ancestor_ids a
+where folks.id = a.id
+),
+ancestors
+as
+(
+select generation, name from folks as p, ancestor_ids as a
+where p.id = a.id
+)
+select * from ancestors;
+generation name
+1 Dad
+1 Mom
+2 Grandpa Bill
+2 Grandma Ann
+2 Grandma Sally
+2 Grandpa Ben
+3 Grandgrandma Martha
+with recursive
+ancestor_ids (id, generation)
+as
+(
+select father, 1 from folks where name = 'Me'
+ union
+select mother, 1 from folks where name = 'Me'
+ union
+select max(father), max(a.generation)+1 from folks, ancestor_ids a
+where folks.id = a.id
+group by a.generation
+union
+select max(mother), max(a.generation)+1 from folks, ancestor_ids a
+where folks.id = a.id
+group by a.generation
+),
+ancestors
+as
+(
+select generation, name from folks as p, ancestor_ids as a
+where p.id = a.id
+)
+select * from ancestors;
+ERROR HY000: Restrictions imposed on recursive definitions are violated for table 'ancestor_ids'
+set statement standards_compliant_cte=0 for
+with recursive
+ancestor_ids (id, generation)
+as
+(
+select father, 1 from folks where name = 'Me'
+ union
+select mother, 1 from folks where name = 'Me'
+ union
+select max(father), a.generation+1 from folks, ancestor_ids a
+where folks.id = a.id
+group by a.generation
+union
+select max(mother), a.generation+1 from folks, ancestor_ids a
+where folks.id = a.id
+group by a.generation
+),
+ancestors
+as
+(
+select generation, name from folks as p, ancestor_ids as a
+where p.id = a.id
+)
+select * from ancestors;
+generation name
+1 Dad
+1 Mom
+2 Grandpa Bill
+2 Grandma Ann
+set statement max_recursive_iterations=1 for
+with recursive
+ancestor_ids (id, generation)
+as
+(
+select father, 1 from folks where name = 'Me'
+ union
+select mother, 1 from folks where name = 'Me'
+ union
+select father, a.generation+1 from folks, ancestor_ids a
+where folks.id = a.id
+union
+select mother, a.generation+1 from folks, ancestor_ids a
+where folks.id = a.id
+),
+ancestors
+as
+(
+select generation, name from folks as p, ancestor_ids as a
+where p.id = a.id
+)
+select * from ancestors;
+generation name
+1 Dad
+1 Mom
+2 Grandpa Bill
+2 Grandma Ann
+2 Grandma Sally
+2 Grandpa Ben
+# query with recursive tables using key access
+alter table folks add primary key (id);
+explain
+with recursive
+ancestors
+as
+(
+select *
+from folks
+where name = 'Me'
+ union
+select p.*
+from folks as p, ancestors as fa
+where p.id = fa.father
+union
+select p.*
+from folks as p, ancestors as ma
+where p.id = ma.mother
+)
+select * from ancestors;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 12
+2 SUBQUERY folks ALL NULL NULL NULL NULL 12 Using where
+3 RECURSIVE UNION p ALL PRIMARY NULL NULL NULL 12
+3 RECURSIVE UNION <derived2> ref key0 key0 5 test.p.id 2
+4 RECURSIVE UNION p ALL PRIMARY NULL NULL NULL 12
+4 RECURSIVE UNION <derived2> ref key0 key0 5 test.p.id 2
+NULL UNION RESULT <union2,3,4> ALL NULL NULL NULL NULL NULL
+with recursive
+ancestors
+as
+(
+select *
+from folks
+where name = 'Me'
+ union
+select p.*
+from folks as p, ancestors as fa
+where p.id = fa.father
+union
+select p.*
+from folks as p, ancestors as ma
+where p.id = ma.mother
+)
+select * from ancestors;
+id name dob father mother
+100 Me 2000-01-01 20 30
+20 Dad 1970-02-02 10 9
+30 Mom 1975-03-03 8 7
+10 Grandpa Bill 1940-04-05 NULL NULL
+8 Grandpa Ben 1940-10-21 NULL NULL
+9 Grandma Ann 1941-10-15 NULL NULL
+7 Grandma Sally 1943-08-23 NULL 6
+6 Grandgrandma Martha 1923-05-17 NULL NULL
+#
+# EXPLAIN FORMAT=JSON on a query where one recursive CTE uses another:
+#
+explain
+with recursive
+prev_gen
+as
+(
+select folks.*
+from folks, prev_gen
+where folks.id=prev_gen.father or folks.id=prev_gen.mother
+union
+select *
+from folks
+where name='Me'
+),
+ancestors
+as
+(
+select *
+from folks
+where name='Me'
+ union
+select *
+from ancestors
+union
+select *
+from prev_gen
+)
+select ancestors.name, ancestors.dob from ancestors;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived4> ALL NULL NULL NULL NULL 24
+4 SUBQUERY folks ALL NULL NULL NULL NULL 12 Using where
+6 RECURSIVE UNION <derived3> ALL NULL NULL NULL NULL 12
+5 RECURSIVE UNION <derived4> ALL NULL NULL NULL NULL 24
+NULL UNION RESULT <union4,6,5> ALL NULL NULL NULL NULL NULL
+3 SUBQUERY folks ALL NULL NULL NULL NULL 12 Using where
+2 RECURSIVE UNION folks ALL PRIMARY NULL NULL NULL 12
+2 RECURSIVE UNION <derived3> ALL NULL NULL NULL NULL 12 Using where; Using join buffer (flat, BNL join)
+NULL UNION RESULT <union3,2> ALL NULL NULL NULL NULL NULL
+explain FORMAT=JSON
+with recursive
+prev_gen
+as
+(
+select folks.*
+from folks, prev_gen
+where folks.id=prev_gen.father or folks.id=prev_gen.mother
+union
+select *
+from folks
+where name='Me'
+),
+ancestors
+as
+(
+select *
+from folks
+where name='Me2'
+ union
+select *
+from ancestors where id < 234
+union
+select *
+from prev_gen where id < 345
+)
+select ancestors.name, ancestors.dob from ancestors;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "<derived4>",
+ "access_type": "ALL",
+ "rows": 24,
+ "filtered": 100,
+ "materialized": {
+ "query_block": {
+ "recursive_union": {
+ "table_name": "<union4,6,5>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 4,
+ "table": {
+ "table_name": "folks",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "(folks.`name` = 'Me2')"
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 6,
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "(prev_gen.`id` < 345)",
+ "materialized": {
+ "query_block": {
+ "recursive_union": {
+ "table_name": "<union3,2>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 3,
+ "table": {
+ "table_name": "folks",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "(folks.`name` = 'Me')"
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 2,
+ "table": {
+ "table_name": "folks",
+ "access_type": "ALL",
+ "possible_keys": ["PRIMARY"],
+ "rows": 12,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "((prev_gen.father = folks.`id`) or (prev_gen.mother = folks.`id`))"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 5,
+ "table": {
+ "table_name": "<derived4>",
+ "access_type": "ALL",
+ "rows": 24,
+ "filtered": 100,
+ "attached_condition": "(ancestors.`id` < 234)"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
+#
+explain format=json
+with recursive
+ancestor_couples(h_id, h_name, h_dob, h_father, h_mother,
+w_id, w_name, w_dob, w_father, w_mother)
+as
+(
+select h.*, w.*
+from folks h, folks w, coupled_ancestors a
+where a.father = h.id AND a.mother = w.id
+union
+select h.*, w.*
+from folks v, folks h, folks w
+where v.name = 'Me' and
+(v.father = h.id AND v.mother= w.id)
+),
+coupled_ancestors (id, name, dob, father, mother)
+as
+(
+select h_id, h_name, h_dob, h_father, h_mother
+from ancestor_couples
+union all
+select w_id, w_name, w_dob, w_father, w_mother
+from ancestor_couples
+)
+select h_name, h_dob, w_name, w_dob
+from ancestor_couples;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "materialized": {
+ "query_block": {
+ "recursive_union": {
+ "table_name": "<union3,2>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 3,
+ "table": {
+ "table_name": "v",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "((v.`name` = 'Me') and (v.father is not null) and (v.mother is not null))"
+ },
+ "table": {
+ "table_name": "h",
+ "access_type": "eq_ref",
+ "possible_keys": ["PRIMARY"],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["id"],
+ "ref": ["test.v.father"],
+ "rows": 1,
+ "filtered": 100
+ },
+ "table": {
+ "table_name": "w",
+ "access_type": "eq_ref",
+ "possible_keys": ["PRIMARY"],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["id"],
+ "ref": ["test.v.mother"],
+ "rows": 1,
+ "filtered": 100
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 2,
+ "table": {
+ "table_name": "<derived4>",
+ "access_type": "ALL",
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "((a.father is not null) and (a.mother is not null))"
+ },
+ "table": {
+ "table_name": "h",
+ "access_type": "eq_ref",
+ "possible_keys": ["PRIMARY"],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["id"],
+ "ref": ["a.father"],
+ "rows": 1,
+ "filtered": 100
+ },
+ "table": {
+ "table_name": "w",
+ "access_type": "eq_ref",
+ "possible_keys": ["PRIMARY"],
+ "key": "PRIMARY",
+ "key_length": "4",
+ "used_key_parts": ["id"],
+ "ref": ["a.mother"],
+ "rows": 1,
+ "filtered": 100
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
+drop table folks;
+#
+# MDEV-10372: [bb-10.2-mdev9864 tree] EXPLAIN with recursive CTE enters endless recursion
+#
+create table t1(a int);
+insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+explain format=json
+with recursive t as (select a from t1 union select a+10 from t where a < 1000)
+select * from t;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 10,
+ "filtered": 100,
+ "materialized": {
+ "query_block": {
+ "recursive_union": {
+ "table_name": "<union2,3>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 2,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 10,
+ "filtered": 100
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 3,
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 10,
+ "filtered": 100,
+ "attached_condition": "(t.a < 1000)"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
+drop table t1;
+#
+# MDEV-10737: recursive union with several anchors at the end
+#
+WITH RECURSIVE cte(n) AS
+( SELECT n+1 FROM cte WHERE n < 5 UNION SELECT 1 UNION SELECT 1 )
+SELECT * FROM cte;
+n
+1
+2
+3
+4
+5
+#
+# MDEV-10736: recursive definition with anchor over a table with blob
+#
+CREATE TABLE t1 (f VARCHAR(1024));
+WITH RECURSIVE cte(f) AS
+(SELECT t1.f FROM t1 UNION ALL SELECT cte.f FROM cte)
+SELECT * FROM cte as t;
+f
+DROP TABLE t1;
diff --git a/mysql-test/r/ctype_big5.result b/mysql-test/r/ctype_big5.result
index ff6b17f5b4d..43cac266bf3 100644
--- a/mysql-test/r/ctype_big5.result
+++ b/mysql-test/r/ctype_big5.result
@@ -4830,3 +4830,567 @@ DROP TABLE t1;
#
# End of 10.0 tests
#
+#
+# Start of 10.2 tests
+#
+#
+# MDEV-9711 NO PAD Collatons
+#
+SET character_set_connection=big5;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'big5_chinese_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE big5_chinese_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=big5 COLLATE=big5_chinese_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'big5_chinese_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'big5_chinese_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'big5_chinese_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'big5_chinese_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'big5_chinese_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'big5_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'big5_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'big5_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'big5_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'big5_chinese_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'big5_chinese_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'big5_chinese_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'big5_chinese_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'big5_chinese_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'big5_chinese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'big5_chinese_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'big5_chinese_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'big5_chinese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'big5_chinese_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'big5_chinese_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE big5_chinese_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=big5 COLLATE=big5_chinese_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'big5_chinese_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'big5_chinese_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'big5_chinese_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'big5_chinese_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'big5_chinese_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'big5_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'big5_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'big5_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'big5_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'big5_chinese_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'big5_chinese_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'big5_chinese_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'big5_chinese_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'big5_chinese_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'big5_chinese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'big5_chinese_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'big5_chinese_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'big5_chinese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'big5_chinese_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'big5_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE big5_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=big5 COLLATE=big5_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'big5_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'big5_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'big5_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'big5_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'big5_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'big5_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'big5_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'big5_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'big5_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'big5_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'big5_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'big5_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'big5_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'big5_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'big5_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'big5_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'big5_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'big5_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'big5_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'big5_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE big5_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=big5 COLLATE=big5_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'big5_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'big5_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'big5_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'big5_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'big5_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'big5_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'big5_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'big5_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'big5_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'big5_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'big5_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'big5_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'big5_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'big5_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'big5_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'big5_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'big5_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'big5_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'big5_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+#
+# End of 10.2 tests
+#
diff --git a/mysql-test/r/ctype_cp932.result b/mysql-test/r/ctype_cp932.result
index 4b170ee4c9b..eb714e9f8d7 100644
--- a/mysql-test/r/ctype_cp932.result
+++ b/mysql-test/r/ctype_cp932.result
@@ -33,3 +33,567 @@ DROP TABLE t1;
SET @@character_set_client= @old_character_set_client;
SET @@character_set_connection= @old_character_set_connection;
SET @@character_set_results= @old_character_set_results;
+#
+# Start of 10.2 tests
+#
+#
+# MDEV-9711 NO PAD Collatons
+#
+SET character_set_connection=cp932;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp932_japanese_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp932_japanese_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=cp932 COLLATE=cp932_japanese_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp932_japanese_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp932_japanese_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp932_japanese_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp932_japanese_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp932_japanese_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp932_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp932_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp932_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp932_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp932_japanese_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp932_japanese_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp932_japanese_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp932_japanese_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp932_japanese_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp932_japanese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp932_japanese_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp932_japanese_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp932_japanese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp932_japanese_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp932_japanese_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp932_japanese_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=cp932 COLLATE=cp932_japanese_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp932_japanese_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp932_japanese_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp932_japanese_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp932_japanese_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp932_japanese_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp932_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp932_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp932_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp932_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp932_japanese_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp932_japanese_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp932_japanese_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp932_japanese_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp932_japanese_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp932_japanese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp932_japanese_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp932_japanese_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp932_japanese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp932_japanese_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp932_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp932_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=cp932 COLLATE=cp932_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp932_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp932_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp932_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp932_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp932_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp932_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp932_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp932_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp932_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp932_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp932_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp932_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp932_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp932_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp932_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp932_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp932_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp932_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp932_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp932_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp932_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=cp932 COLLATE=cp932_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp932_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp932_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp932_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp932_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp932_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp932_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp932_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp932_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp932_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp932_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp932_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp932_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp932_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp932_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp932_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp932_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp932_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp932_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp932_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+#
+# End of 10.2 tests
+#
diff --git a/mysql-test/r/ctype_eucjpms.result b/mysql-test/r/ctype_eucjpms.result
index 8d4d8f6d5f9..b40787992bf 100644
--- a/mysql-test/r/ctype_eucjpms.result
+++ b/mysql-test/r/ctype_eucjpms.result
@@ -33914,7 +33914,7 @@ DROP TABLE t1;
# End of 10.1 tests
#
#
-# End of 10.2 tests
+# Start of 10.2 tests
#
#
# MDEV-9842 LOAD DATA INFILE does not work well with a TEXT column when using sjis
@@ -33932,5 +33932,563 @@ HEX(a)
3F3F
DROP TABLE t1;
#
+# MDEV-9711 NO PAD Collatons
+#
+SET character_set_connection=eucjpms;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'eucjpms_japanese_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE eucjpms_japanese_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=eucjpms COLLATE=eucjpms_japanese_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'eucjpms_japanese_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'eucjpms_japanese_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'eucjpms_japanese_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'eucjpms_japanese_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'eucjpms_japanese_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'eucjpms_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'eucjpms_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'eucjpms_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'eucjpms_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'eucjpms_japanese_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'eucjpms_japanese_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'eucjpms_japanese_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'eucjpms_japanese_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'eucjpms_japanese_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'eucjpms_japanese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'eucjpms_japanese_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'eucjpms_japanese_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'eucjpms_japanese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'eucjpms_japanese_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'eucjpms_japanese_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE eucjpms_japanese_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=eucjpms COLLATE=eucjpms_japanese_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'eucjpms_japanese_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'eucjpms_japanese_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'eucjpms_japanese_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'eucjpms_japanese_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'eucjpms_japanese_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'eucjpms_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'eucjpms_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'eucjpms_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'eucjpms_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'eucjpms_japanese_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'eucjpms_japanese_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'eucjpms_japanese_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'eucjpms_japanese_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'eucjpms_japanese_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'eucjpms_japanese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'eucjpms_japanese_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'eucjpms_japanese_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'eucjpms_japanese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'eucjpms_japanese_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'eucjpms_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE eucjpms_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=eucjpms COLLATE=eucjpms_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'eucjpms_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'eucjpms_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'eucjpms_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'eucjpms_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'eucjpms_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'eucjpms_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'eucjpms_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'eucjpms_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'eucjpms_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'eucjpms_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'eucjpms_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'eucjpms_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'eucjpms_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'eucjpms_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'eucjpms_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'eucjpms_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'eucjpms_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'eucjpms_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'eucjpms_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'eucjpms_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE eucjpms_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=eucjpms COLLATE=eucjpms_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'eucjpms_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'eucjpms_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'eucjpms_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'eucjpms_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'eucjpms_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'eucjpms_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'eucjpms_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'eucjpms_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'eucjpms_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'eucjpms_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'eucjpms_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'eucjpms_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'eucjpms_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'eucjpms_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'eucjpms_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'eucjpms_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'eucjpms_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'eucjpms_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'eucjpms_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+#
# End of 10.2 tests
#
diff --git a/mysql-test/r/ctype_euckr.result b/mysql-test/r/ctype_euckr.result
index 90353c6af2a..359984d1e51 100644
--- a/mysql-test/r/ctype_euckr.result
+++ b/mysql-test/r/ctype_euckr.result
@@ -25428,3 +25428,567 @@ A1A1A1A1A1A120202020202020202020202020202020202020
#
# End of 5.6 tests
#
+#
+# Start of 10.2 tests
+#
+#
+# MDEV-9711 NO PAD Collatons
+#
+SET character_set_connection=euckr;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'euckr_korean_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE euckr_korean_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=euckr COLLATE=euckr_korean_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'euckr_korean_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'euckr_korean_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'euckr_korean_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'euckr_korean_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'euckr_korean_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'euckr_korean_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'euckr_korean_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'euckr_korean_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'euckr_korean_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'euckr_korean_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'euckr_korean_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'euckr_korean_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'euckr_korean_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'euckr_korean_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'euckr_korean_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'euckr_korean_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'euckr_korean_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'euckr_korean_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'euckr_korean_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'euckr_korean_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE euckr_korean_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=euckr COLLATE=euckr_korean_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'euckr_korean_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'euckr_korean_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'euckr_korean_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'euckr_korean_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'euckr_korean_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'euckr_korean_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'euckr_korean_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'euckr_korean_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'euckr_korean_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'euckr_korean_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'euckr_korean_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'euckr_korean_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'euckr_korean_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'euckr_korean_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'euckr_korean_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'euckr_korean_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'euckr_korean_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'euckr_korean_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'euckr_korean_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'euckr_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE euckr_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=euckr COLLATE=euckr_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'euckr_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'euckr_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'euckr_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'euckr_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'euckr_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'euckr_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'euckr_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'euckr_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'euckr_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'euckr_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'euckr_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'euckr_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'euckr_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'euckr_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'euckr_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'euckr_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'euckr_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'euckr_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'euckr_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'euckr_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE euckr_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=euckr COLLATE=euckr_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'euckr_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'euckr_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'euckr_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'euckr_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'euckr_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'euckr_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'euckr_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'euckr_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'euckr_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'euckr_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'euckr_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'euckr_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'euckr_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'euckr_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'euckr_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'euckr_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'euckr_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'euckr_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'euckr_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+#
+# End of 10.2 tests
+#
diff --git a/mysql-test/r/ctype_gb2312.result b/mysql-test/r/ctype_gb2312.result
index f9f37c00a79..4702eac6b6b 100644
--- a/mysql-test/r/ctype_gb2312.result
+++ b/mysql-test/r/ctype_gb2312.result
@@ -4525,3 +4525,567 @@ DROP TABLE allbytes;
#
# End of 10.0 tests
#
+#
+# Start of 10.2 tests
+#
+#
+# MDEV-9711 NO PAD Collatons
+#
+SET character_set_connection=gb2312;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'gb2312_chinese_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE gb2312_chinese_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=gb2312 COLLATE=gb2312_chinese_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'gb2312_chinese_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'gb2312_chinese_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'gb2312_chinese_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'gb2312_chinese_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'gb2312_chinese_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'gb2312_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'gb2312_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'gb2312_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'gb2312_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'gb2312_chinese_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'gb2312_chinese_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'gb2312_chinese_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'gb2312_chinese_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'gb2312_chinese_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gb2312_chinese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gb2312_chinese_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'gb2312_chinese_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gb2312_chinese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gb2312_chinese_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'gb2312_chinese_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE gb2312_chinese_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=gb2312 COLLATE=gb2312_chinese_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'gb2312_chinese_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'gb2312_chinese_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'gb2312_chinese_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'gb2312_chinese_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'gb2312_chinese_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'gb2312_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'gb2312_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'gb2312_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'gb2312_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'gb2312_chinese_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'gb2312_chinese_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'gb2312_chinese_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'gb2312_chinese_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'gb2312_chinese_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gb2312_chinese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gb2312_chinese_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'gb2312_chinese_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gb2312_chinese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gb2312_chinese_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'gb2312_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE gb2312_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=gb2312 COLLATE=gb2312_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'gb2312_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'gb2312_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'gb2312_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'gb2312_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'gb2312_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'gb2312_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'gb2312_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'gb2312_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'gb2312_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'gb2312_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'gb2312_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'gb2312_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'gb2312_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'gb2312_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gb2312_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gb2312_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'gb2312_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gb2312_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gb2312_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'gb2312_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE gb2312_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=gb2312 COLLATE=gb2312_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'gb2312_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'gb2312_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'gb2312_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'gb2312_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'gb2312_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'gb2312_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'gb2312_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'gb2312_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'gb2312_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'gb2312_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'gb2312_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'gb2312_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'gb2312_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'gb2312_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gb2312_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gb2312_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'gb2312_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gb2312_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gb2312_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+#
+# End of 10.2 tests
+#
diff --git a/mysql-test/r/ctype_gbk.result b/mysql-test/r/ctype_gbk.result
index e454347592c..34c3f6c7486 100644
--- a/mysql-test/r/ctype_gbk.result
+++ b/mysql-test/r/ctype_gbk.result
@@ -5945,5 +5945,563 @@ HEX(a)
B042
DROP TABLE t1;
#
+# MDEV-9711 NO PAD Collatons
+#
+SET character_set_connection=gbk;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'gbk_chinese_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE gbk_chinese_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=gbk COLLATE=gbk_chinese_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'gbk_chinese_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'gbk_chinese_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'gbk_chinese_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'gbk_chinese_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'gbk_chinese_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'gbk_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'gbk_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'gbk_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'gbk_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'gbk_chinese_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'gbk_chinese_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'gbk_chinese_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'gbk_chinese_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'gbk_chinese_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gbk_chinese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gbk_chinese_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'gbk_chinese_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gbk_chinese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gbk_chinese_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'gbk_chinese_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE gbk_chinese_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=gbk COLLATE=gbk_chinese_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'gbk_chinese_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'gbk_chinese_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'gbk_chinese_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'gbk_chinese_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'gbk_chinese_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'gbk_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'gbk_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'gbk_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'gbk_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'gbk_chinese_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'gbk_chinese_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'gbk_chinese_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'gbk_chinese_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'gbk_chinese_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gbk_chinese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gbk_chinese_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'gbk_chinese_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gbk_chinese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gbk_chinese_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'gbk_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE gbk_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=gbk COLLATE=gbk_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'gbk_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'gbk_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'gbk_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'gbk_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'gbk_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'gbk_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'gbk_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'gbk_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'gbk_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'gbk_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'gbk_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'gbk_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'gbk_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'gbk_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gbk_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gbk_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'gbk_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gbk_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gbk_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'gbk_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE gbk_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=gbk COLLATE=gbk_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'gbk_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'gbk_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'gbk_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'gbk_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'gbk_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'gbk_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'gbk_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'gbk_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'gbk_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'gbk_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'gbk_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'gbk_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'gbk_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'gbk_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gbk_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gbk_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'gbk_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gbk_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'gbk_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+#
# End of 10.2 tests
#
diff --git a/mysql-test/r/ctype_latin1.result b/mysql-test/r/ctype_latin1.result
index b0bcc5d7bd2..5ed8e9e8868 100644
--- a/mysql-test/r/ctype_latin1.result
+++ b/mysql-test/r/ctype_latin1.result
@@ -8222,3 +8222,567 @@ DROP TABLE t1;
#
# End of 10.1 tests
#
+#
+# Start of 10.2 tests
+#
+#
+# MDEV-9711 NO PAD Collatons
+#
+SET character_set_connection=latin1;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'latin1_swedish_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE latin1_swedish_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'latin1_swedish_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin1_swedish_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'latin1_swedish_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'latin1_swedish_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'latin1_swedish_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'latin1_swedish_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'latin1_swedish_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'latin1_swedish_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'latin1_swedish_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'latin1_swedish_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'latin1_swedish_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'latin1_swedish_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'latin1_swedish_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin1_swedish_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin1_swedish_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin1_swedish_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'latin1_swedish_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin1_swedish_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin1_swedish_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'latin1_swedish_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE latin1_swedish_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'latin1_swedish_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin1_swedish_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'latin1_swedish_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'latin1_swedish_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'latin1_swedish_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'latin1_swedish_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'latin1_swedish_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'latin1_swedish_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'latin1_swedish_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'latin1_swedish_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'latin1_swedish_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'latin1_swedish_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'latin1_swedish_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin1_swedish_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin1_swedish_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin1_swedish_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'latin1_swedish_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin1_swedish_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin1_swedish_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'latin1_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE latin1_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'latin1_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin1_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'latin1_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'latin1_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'latin1_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'latin1_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'latin1_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'latin1_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'latin1_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'latin1_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'latin1_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'latin1_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'latin1_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin1_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin1_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin1_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'latin1_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin1_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin1_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'latin1_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE latin1_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=latin1 COLLATE=latin1_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'latin1_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin1_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'latin1_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'latin1_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'latin1_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'latin1_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'latin1_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'latin1_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'latin1_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'latin1_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'latin1_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'latin1_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'latin1_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin1_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin1_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin1_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'latin1_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin1_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin1_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+#
+# End of 10.2 tests
+#
diff --git a/mysql-test/r/ctype_ldml.result b/mysql-test/r/ctype_ldml.result
index d333c03143b..12a03a872e0 100644
--- a/mysql-test/r/ctype_ldml.result
+++ b/mysql-test/r/ctype_ldml.result
@@ -5,7 +5,7 @@ with all Unicode character sets
set names utf8;
show variables like 'character_sets_dir%';
Variable_name Value
-character_sets_dir MYSQL_TEST_DIR/std_data/
+character_sets_dir MYSQL_TEST_DIR/std_data/ldml/
show collation like 'utf8_phone_ci';
Collation Charset Id Default Compiled Sortlen
utf8_phone_ci utf8 352 8
@@ -454,10 +454,20 @@ select "foo" = "foo " collate latin1_test;
The following tests check that two-byte collation IDs work
select * from information_schema.collations where id>256 and is_compiled<>'Yes' order by id;
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
+ascii2_general_nopad_ci ascii2 318 1
+ascii2_bin2 ascii2 319 1
+ascii2_general_ci ascii2 320 Yes 1
+ascii2_bin ascii2 321 1
+ascii2_general_inherited_ci ascii2 322 1
+ascii2_general_inherited2_ci ascii2 323 1
+ascii2_badly_inherited_ci ascii2 324 1
+ascii2_nopad_bin ascii2 325 1
utf8mb4_test_ci utf8mb4 326 8
utf16_test_ci utf16 327 8
utf8mb4_test_400_ci utf8mb4 328 8
latin1_test2 latin1 332 1
+latin1_test2_cs latin1 333 1
+latin1_swedish_nopad2_ci latin1 334 1
utf8_bengali_standard_ci utf8 336 8
utf8_bengali_traditional_ci utf8 337 8
utf8_implicit_weights_ci utf8 338 8
@@ -478,6 +488,7 @@ show collation like '%test%';
Collation Charset Id Default Compiled Sortlen
latin1_test latin1 99 Yes 1
latin1_test2 latin1 332 1
+latin1_test2_cs latin1 333 1
utf8_test_ci utf8 353 8
ucs2_test_ci ucs2 358 8
utf8mb4_test_ci utf8mb4 326 8
@@ -1179,3 +1190,102 @@ ch w ducet
3700 FB80B700 FB80B700
3701 FB80B700 FB80B701
DROP TABLE t1;
+#
+# Testing that the MY_CS_PUREASCII flag is set properly
+# Comparison between ascii2 and latin1 should not give "illegal collation error"
+#
+CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET ascii2, b VARCHAR(10) CHARACTER SET latin1);
+INSERT INTO t1 VALUES ('a','a'),('b','b');
+SELECT * FROM t1 WHERE a=b;
+a b
+a a
+b b
+ALTER TABLE t1 MODIFY a VARCHAR(10) CHARACTER SET ascii2 COLLATE ascii2_bin2;
+SELECT * FROM t1 WHERE a=b;
+a b
+a a
+b b
+ALTER TABLE t1 MODIFY a VARCHAR(10) CHARACTER SET ascii2 COLLATE ascii2_bin;
+SELECT * FROM t1 WHERE a=b;
+a b
+a a
+b b
+ALTER TABLE t1 MODIFY a VARCHAR(10) CHARACTER SET ascii2 COLLATE ascii2_general_inherited_ci;
+SELECT * FROM t1 WHERE a=b;
+a b
+a a
+b b
+ALTER TABLE t1 MODIFY a VARCHAR(10) CHARACTER SET ascii2 COLLATE ascii2_general_inherited2_ci;
+SELECT * FROM t1 WHERE a=b;
+a b
+a a
+b b
+DROP TABLE t1;
+#
+# Testing that in case of two binary collations
+# "BINARY" in a column definition uses the collation with the least id
+#
+CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET ascii2 BINARY);
+INSERT INTO t1 VALUES ('test');
+SELECT COLLATION(a) FROM t1;
+COLLATION(a)
+ascii2_bin2
+DROP TABLE t1;
+#
+# Testing mixing of two binary collations of the same character set
+#
+CREATE TABLE t1 (
+a VARCHAR(10) CHARACTER SET ascii2 COLLATE ascii2_bin,
+b VARCHAR(10) CHARACTER SET ascii2 COLLATE ascii2_bin2
+);
+INSERT INTO t1 VALUES ('a','a');
+SELECT * FROM t1 WHERE a=b;
+ERROR HY000: Illegal mix of collations (ascii2_bin,IMPLICIT) and (ascii2_bin2,IMPLICIT) for operation '='
+DROP TABLE t1;
+#
+# Testing bad collation inheritance
+#
+CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET ascii2 COLLATE ascii2_badly_inherited_ci);
+ERROR HY000: Unknown collation: 'ascii2_badly_inherited_ci'
+#
+# Testing that the MY_CS_CSSORT flag is set properly
+#
+CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET latin1 COLLATE latin1_test);
+INSERT INTO t1 VALUES ('a'),('A');
+SELECT * FROM t1 WHERE a RLIKE 'a';
+a
+a
+A
+DROP TABLE t1;
+CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET latin1 COLLATE latin1_test2_cs);
+INSERT INTO t1 VALUES ('a'),('A');
+SELECT * FROM t1 WHERE a RLIKE 'a';
+a
+a
+DROP TABLE t1;
+#
+# MDEV-9711 NO PAD collations
+#
+CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET ascii2 COLLATE ascii2_general_nopad_ci);
+INSERT INTO t1 VALUES ('a'),('a '),('A'),('A ');
+SELECT a, a='a', a='a ', HEX(a), LOWER(a), UPPER(a), CONVERT(a USING utf8) FROM t1;
+a a='a' a='a ' HEX(a) LOWER(a) UPPER(a) CONVERT(a USING utf8)
+a 1 0 61 a A a
+a 0 1 6120 a A a
+A 1 0 41 a A A
+A 0 1 4120 a A A
+ALTER TABLE t1 MODIFY a VARCHAR(10) CHARACTER SET ascii2 COLLATE ascii2_nopad_bin;
+SELECT a, a='a', a='a ', HEX(a), LOWER(a), UPPER(a), CONVERT(a USING utf8) FROM t1;
+a a='a' a='a ' HEX(a) LOWER(a) UPPER(a) CONVERT(a USING utf8)
+a 1 0 61 a A a
+a 0 1 6120 a A a
+A 0 0 41 a A A
+A 0 0 4120 a A A
+ALTER TABLE t1 MODIFY a VARCHAR(10) CHARACTER SET latin1 COLLATE latin1_swedish_nopad2_ci;
+SELECT a, a='a', a='a ', HEX(a), LOWER(a), UPPER(a), CONVERT(a USING utf8) FROM t1;
+a a='a' a='a ' HEX(a) LOWER(a) UPPER(a) CONVERT(a USING utf8)
+a 1 0 61 a A a
+a 0 1 6120 a A a
+A 1 0 41 a A A
+A 0 1 4120 a A A
+DROP TABLE t1;
diff --git a/mysql-test/r/ctype_nopad_8bit.result b/mysql-test/r/ctype_nopad_8bit.result
new file mode 100644
index 00000000000..b5dadc2f5da
--- /dev/null
+++ b/mysql-test/r/ctype_nopad_8bit.result
@@ -0,0 +1,12771 @@
+#
+# MDEV-9711 NO PAD Collatons
+#
+SET character_set_connection=dec8;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'dec8_swedish_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE dec8_swedish_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=dec8 COLLATE=dec8_swedish_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'dec8_swedish_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'dec8_swedish_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'dec8_swedish_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'dec8_swedish_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'dec8_swedish_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'dec8_swedish_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'dec8_swedish_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'dec8_swedish_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'dec8_swedish_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'dec8_swedish_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'dec8_swedish_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'dec8_swedish_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'dec8_swedish_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'dec8_swedish_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'dec8_swedish_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'dec8_swedish_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'dec8_swedish_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'dec8_swedish_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'dec8_swedish_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'dec8_swedish_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE dec8_swedish_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=dec8 COLLATE=dec8_swedish_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'dec8_swedish_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'dec8_swedish_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'dec8_swedish_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'dec8_swedish_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'dec8_swedish_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'dec8_swedish_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'dec8_swedish_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'dec8_swedish_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'dec8_swedish_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'dec8_swedish_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'dec8_swedish_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'dec8_swedish_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'dec8_swedish_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'dec8_swedish_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'dec8_swedish_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'dec8_swedish_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'dec8_swedish_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'dec8_swedish_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'dec8_swedish_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'dec8_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE dec8_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=dec8 COLLATE=dec8_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'dec8_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'dec8_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'dec8_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'dec8_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'dec8_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'dec8_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'dec8_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'dec8_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'dec8_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'dec8_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'dec8_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'dec8_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'dec8_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'dec8_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'dec8_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'dec8_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'dec8_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'dec8_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'dec8_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'dec8_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE dec8_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=dec8 COLLATE=dec8_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'dec8_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'dec8_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'dec8_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'dec8_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'dec8_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'dec8_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'dec8_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'dec8_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'dec8_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'dec8_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'dec8_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'dec8_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'dec8_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'dec8_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'dec8_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'dec8_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'dec8_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'dec8_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'dec8_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET character_set_connection=cp850;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp850_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp850_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=cp850 COLLATE=cp850_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp850_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp850_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp850_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp850_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp850_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp850_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp850_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp850_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp850_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp850_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp850_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp850_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp850_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp850_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp850_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp850_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp850_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp850_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp850_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp850_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp850_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=cp850 COLLATE=cp850_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp850_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp850_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp850_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp850_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp850_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp850_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp850_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp850_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp850_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp850_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp850_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp850_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp850_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp850_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp850_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp850_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp850_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp850_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp850_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp850_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp850_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=cp850 COLLATE=cp850_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp850_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp850_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp850_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp850_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp850_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp850_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp850_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp850_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp850_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp850_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp850_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp850_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp850_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp850_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp850_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp850_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp850_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp850_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp850_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp850_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp850_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=cp850 COLLATE=cp850_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp850_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp850_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp850_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp850_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp850_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp850_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp850_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp850_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp850_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp850_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp850_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp850_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp850_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp850_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp850_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp850_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp850_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp850_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp850_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET character_set_connection=hp8;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'hp8_english_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE hp8_english_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=hp8 COLLATE=hp8_english_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'hp8_english_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'hp8_english_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'hp8_english_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'hp8_english_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'hp8_english_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'hp8_english_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'hp8_english_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'hp8_english_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'hp8_english_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'hp8_english_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'hp8_english_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'hp8_english_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'hp8_english_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'hp8_english_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hp8_english_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hp8_english_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'hp8_english_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hp8_english_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hp8_english_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'hp8_english_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE hp8_english_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=hp8 COLLATE=hp8_english_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'hp8_english_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'hp8_english_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'hp8_english_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'hp8_english_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'hp8_english_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'hp8_english_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'hp8_english_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'hp8_english_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'hp8_english_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'hp8_english_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'hp8_english_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'hp8_english_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'hp8_english_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'hp8_english_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hp8_english_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hp8_english_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'hp8_english_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hp8_english_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hp8_english_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'hp8_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE hp8_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=hp8 COLLATE=hp8_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'hp8_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'hp8_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'hp8_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'hp8_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'hp8_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'hp8_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'hp8_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'hp8_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'hp8_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'hp8_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'hp8_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'hp8_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'hp8_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'hp8_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hp8_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hp8_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'hp8_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hp8_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hp8_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'hp8_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE hp8_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=hp8 COLLATE=hp8_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'hp8_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'hp8_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'hp8_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'hp8_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'hp8_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'hp8_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'hp8_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'hp8_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'hp8_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'hp8_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'hp8_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'hp8_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'hp8_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'hp8_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hp8_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hp8_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'hp8_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hp8_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hp8_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET character_set_connection=koi8r;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'koi8r_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE koi8r_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=koi8r COLLATE=koi8r_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'koi8r_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'koi8r_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'koi8r_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'koi8r_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'koi8r_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'koi8r_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'koi8r_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'koi8r_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'koi8r_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'koi8r_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'koi8r_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'koi8r_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'koi8r_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'koi8r_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8r_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8r_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'koi8r_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8r_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8r_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'koi8r_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE koi8r_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=koi8r COLLATE=koi8r_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'koi8r_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'koi8r_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'koi8r_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'koi8r_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'koi8r_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'koi8r_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'koi8r_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'koi8r_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'koi8r_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'koi8r_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'koi8r_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'koi8r_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'koi8r_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'koi8r_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8r_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8r_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'koi8r_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8r_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8r_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'koi8r_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE koi8r_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=koi8r COLLATE=koi8r_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'koi8r_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'koi8r_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'koi8r_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'koi8r_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'koi8r_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'koi8r_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'koi8r_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'koi8r_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'koi8r_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'koi8r_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'koi8r_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'koi8r_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'koi8r_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'koi8r_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8r_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8r_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'koi8r_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8r_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8r_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'koi8r_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE koi8r_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=koi8r COLLATE=koi8r_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'koi8r_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'koi8r_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'koi8r_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'koi8r_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'koi8r_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'koi8r_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'koi8r_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'koi8r_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'koi8r_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'koi8r_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'koi8r_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'koi8r_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'koi8r_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'koi8r_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8r_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8r_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'koi8r_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8r_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8r_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET character_set_connection=latin2;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'latin2_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE latin2_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin2 COLLATE=latin2_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'latin2_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin2_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'latin2_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'latin2_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'latin2_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'latin2_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'latin2_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'latin2_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'latin2_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'latin2_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'latin2_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'latin2_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'latin2_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin2_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin2_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin2_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'latin2_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin2_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin2_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'latin2_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE latin2_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=latin2 COLLATE=latin2_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'latin2_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin2_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'latin2_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'latin2_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'latin2_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'latin2_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'latin2_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'latin2_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'latin2_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'latin2_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'latin2_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'latin2_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'latin2_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin2_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin2_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin2_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'latin2_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin2_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin2_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'latin2_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE latin2_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin2 COLLATE=latin2_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'latin2_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin2_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'latin2_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'latin2_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'latin2_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'latin2_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'latin2_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'latin2_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'latin2_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'latin2_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'latin2_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'latin2_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'latin2_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin2_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin2_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin2_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'latin2_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin2_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin2_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'latin2_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE latin2_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=latin2 COLLATE=latin2_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'latin2_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin2_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'latin2_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'latin2_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'latin2_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'latin2_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'latin2_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'latin2_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'latin2_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'latin2_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'latin2_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'latin2_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'latin2_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin2_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin2_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin2_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'latin2_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin2_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin2_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET character_set_connection=swe7;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'swe7_swedish_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE swe7_swedish_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=swe7 COLLATE=swe7_swedish_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'swe7_swedish_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'swe7_swedish_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'swe7_swedish_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'swe7_swedish_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'swe7_swedish_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'swe7_swedish_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'swe7_swedish_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'swe7_swedish_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'swe7_swedish_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'swe7_swedish_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'swe7_swedish_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'swe7_swedish_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'swe7_swedish_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'swe7_swedish_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_swedish_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_swedish_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'swe7_swedish_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_swedish_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_swedish_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'swe7_swedish_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE swe7_swedish_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=swe7 COLLATE=swe7_swedish_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'swe7_swedish_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'swe7_swedish_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'swe7_swedish_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'swe7_swedish_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'swe7_swedish_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'swe7_swedish_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'swe7_swedish_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'swe7_swedish_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'swe7_swedish_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'swe7_swedish_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'swe7_swedish_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'swe7_swedish_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'swe7_swedish_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'swe7_swedish_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_swedish_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_swedish_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'swe7_swedish_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_swedish_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_swedish_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'swe7_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE swe7_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=swe7 COLLATE=swe7_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'swe7_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'swe7_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'swe7_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'swe7_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'swe7_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'swe7_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'swe7_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'swe7_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'swe7_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'swe7_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'swe7_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'swe7_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'swe7_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'swe7_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'swe7_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'swe7_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE swe7_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=swe7 COLLATE=swe7_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'swe7_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'swe7_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'swe7_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'swe7_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'swe7_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'swe7_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'swe7_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'swe7_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'swe7_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'swe7_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'swe7_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'swe7_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'swe7_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'swe7_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'swe7_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET character_set_connection=ascii;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'ascii_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE ascii_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=ascii COLLATE=ascii_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'ascii_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'ascii_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'ascii_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'ascii_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'ascii_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'ascii_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'ascii_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'ascii_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'ascii_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'ascii_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'ascii_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'ascii_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'ascii_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'ascii_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ascii_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ascii_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'ascii_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ascii_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ascii_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'ascii_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE ascii_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=ascii COLLATE=ascii_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'ascii_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'ascii_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'ascii_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'ascii_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'ascii_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'ascii_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'ascii_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'ascii_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'ascii_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'ascii_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'ascii_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'ascii_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'ascii_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'ascii_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ascii_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ascii_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'ascii_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ascii_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ascii_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'ascii_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE ascii_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=ascii COLLATE=ascii_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'ascii_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'ascii_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'ascii_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'ascii_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'ascii_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'ascii_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'ascii_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'ascii_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'ascii_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'ascii_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'ascii_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'ascii_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'ascii_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'ascii_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ascii_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ascii_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'ascii_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ascii_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ascii_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'ascii_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE ascii_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=ascii COLLATE=ascii_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'ascii_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'ascii_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'ascii_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'ascii_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'ascii_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'ascii_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'ascii_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'ascii_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'ascii_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'ascii_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'ascii_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'ascii_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'ascii_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'ascii_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ascii_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ascii_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'ascii_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ascii_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ascii_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET character_set_connection=hebrew;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'hebrew_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE hebrew_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=hebrew COLLATE=hebrew_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'hebrew_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'hebrew_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'hebrew_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'hebrew_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'hebrew_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'hebrew_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'hebrew_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'hebrew_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'hebrew_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'hebrew_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'hebrew_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'hebrew_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'hebrew_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'hebrew_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hebrew_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hebrew_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'hebrew_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hebrew_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hebrew_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'hebrew_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE hebrew_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=hebrew COLLATE=hebrew_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'hebrew_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'hebrew_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'hebrew_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'hebrew_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'hebrew_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'hebrew_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'hebrew_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'hebrew_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'hebrew_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'hebrew_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'hebrew_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'hebrew_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'hebrew_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'hebrew_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hebrew_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hebrew_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'hebrew_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hebrew_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hebrew_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'hebrew_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE hebrew_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=hebrew COLLATE=hebrew_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'hebrew_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'hebrew_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'hebrew_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'hebrew_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'hebrew_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'hebrew_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'hebrew_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'hebrew_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'hebrew_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'hebrew_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'hebrew_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'hebrew_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'hebrew_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'hebrew_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hebrew_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hebrew_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'hebrew_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hebrew_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hebrew_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'hebrew_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE hebrew_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=hebrew COLLATE=hebrew_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'hebrew_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'hebrew_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'hebrew_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'hebrew_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'hebrew_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'hebrew_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'hebrew_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'hebrew_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'hebrew_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'hebrew_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'hebrew_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'hebrew_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'hebrew_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'hebrew_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hebrew_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hebrew_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'hebrew_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hebrew_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'hebrew_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET character_set_connection=koi8u;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'koi8u_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE koi8u_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=koi8u COLLATE=koi8u_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'koi8u_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'koi8u_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'koi8u_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'koi8u_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'koi8u_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'koi8u_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'koi8u_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'koi8u_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'koi8u_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'koi8u_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'koi8u_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'koi8u_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'koi8u_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'koi8u_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8u_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8u_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'koi8u_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8u_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8u_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'koi8u_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE koi8u_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=koi8u COLLATE=koi8u_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'koi8u_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'koi8u_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'koi8u_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'koi8u_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'koi8u_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'koi8u_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'koi8u_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'koi8u_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'koi8u_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'koi8u_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'koi8u_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'koi8u_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'koi8u_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'koi8u_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8u_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8u_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'koi8u_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8u_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8u_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'koi8u_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE koi8u_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=koi8u COLLATE=koi8u_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'koi8u_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'koi8u_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'koi8u_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'koi8u_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'koi8u_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'koi8u_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'koi8u_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'koi8u_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'koi8u_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'koi8u_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'koi8u_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'koi8u_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'koi8u_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'koi8u_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8u_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8u_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'koi8u_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8u_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8u_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'koi8u_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE koi8u_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=koi8u COLLATE=koi8u_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'koi8u_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'koi8u_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'koi8u_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'koi8u_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'koi8u_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'koi8u_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'koi8u_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'koi8u_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'koi8u_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'koi8u_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'koi8u_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'koi8u_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'koi8u_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'koi8u_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8u_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8u_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'koi8u_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8u_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'koi8u_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET character_set_connection=greek;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'greek_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE greek_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=greek COLLATE=greek_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'greek_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'greek_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'greek_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'greek_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'greek_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'greek_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'greek_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'greek_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'greek_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'greek_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'greek_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'greek_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'greek_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'greek_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'greek_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'greek_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'greek_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'greek_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'greek_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'greek_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE greek_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=greek COLLATE=greek_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'greek_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'greek_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'greek_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'greek_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'greek_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'greek_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'greek_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'greek_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'greek_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'greek_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'greek_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'greek_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'greek_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'greek_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'greek_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'greek_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'greek_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'greek_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'greek_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'greek_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE greek_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=greek COLLATE=greek_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'greek_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'greek_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'greek_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'greek_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'greek_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'greek_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'greek_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'greek_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'greek_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'greek_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'greek_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'greek_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'greek_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'greek_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'greek_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'greek_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'greek_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'greek_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'greek_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'greek_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE greek_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=greek COLLATE=greek_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'greek_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'greek_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'greek_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'greek_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'greek_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'greek_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'greek_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'greek_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'greek_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'greek_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'greek_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'greek_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'greek_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'greek_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'greek_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'greek_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'greek_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'greek_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'greek_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET character_set_connection=cp1250;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp1250_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp1250_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=cp1250 COLLATE=cp1250_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp1250_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1250_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp1250_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp1250_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp1250_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp1250_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp1250_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp1250_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp1250_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp1250_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp1250_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp1250_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp1250_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1250_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1250_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1250_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp1250_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1250_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1250_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp1250_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp1250_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=cp1250 COLLATE=cp1250_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp1250_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1250_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp1250_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp1250_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp1250_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp1250_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp1250_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp1250_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp1250_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp1250_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp1250_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp1250_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp1250_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1250_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1250_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1250_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp1250_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1250_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1250_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp1250_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp1250_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=cp1250 COLLATE=cp1250_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp1250_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1250_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp1250_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp1250_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp1250_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp1250_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp1250_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp1250_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp1250_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp1250_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp1250_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp1250_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp1250_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1250_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1250_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1250_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp1250_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1250_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1250_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp1250_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp1250_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=cp1250 COLLATE=cp1250_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp1250_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1250_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp1250_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp1250_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp1250_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp1250_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp1250_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp1250_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp1250_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp1250_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp1250_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp1250_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp1250_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1250_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1250_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1250_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp1250_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1250_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1250_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET character_set_connection=cp1257;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp1257_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp1257_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=cp1257 COLLATE=cp1257_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp1257_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1257_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp1257_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp1257_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp1257_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp1257_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp1257_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp1257_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp1257_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp1257_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp1257_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp1257_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp1257_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1257_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1257_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1257_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp1257_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1257_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1257_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp1257_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp1257_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=cp1257 COLLATE=cp1257_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp1257_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1257_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp1257_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp1257_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp1257_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp1257_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp1257_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp1257_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp1257_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp1257_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp1257_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp1257_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp1257_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1257_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1257_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1257_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp1257_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1257_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1257_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp1257_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp1257_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=cp1257 COLLATE=cp1257_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp1257_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1257_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp1257_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp1257_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp1257_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp1257_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp1257_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp1257_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp1257_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp1257_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp1257_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp1257_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp1257_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1257_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1257_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1257_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp1257_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1257_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1257_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp1257_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp1257_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=cp1257 COLLATE=cp1257_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp1257_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1257_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp1257_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp1257_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp1257_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp1257_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp1257_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp1257_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp1257_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp1257_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp1257_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp1257_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp1257_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1257_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1257_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1257_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp1257_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1257_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1257_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET character_set_connection=latin5;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'latin5_turkish_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE latin5_turkish_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin5 COLLATE=latin5_turkish_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'latin5_turkish_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin5_turkish_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'latin5_turkish_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'latin5_turkish_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'latin5_turkish_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'latin5_turkish_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'latin5_turkish_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'latin5_turkish_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'latin5_turkish_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'latin5_turkish_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'latin5_turkish_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'latin5_turkish_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'latin5_turkish_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin5_turkish_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin5_turkish_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin5_turkish_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'latin5_turkish_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin5_turkish_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin5_turkish_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'latin5_turkish_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE latin5_turkish_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=latin5 COLLATE=latin5_turkish_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'latin5_turkish_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin5_turkish_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'latin5_turkish_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'latin5_turkish_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'latin5_turkish_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'latin5_turkish_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'latin5_turkish_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'latin5_turkish_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'latin5_turkish_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'latin5_turkish_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'latin5_turkish_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'latin5_turkish_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'latin5_turkish_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin5_turkish_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin5_turkish_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin5_turkish_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'latin5_turkish_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin5_turkish_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin5_turkish_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'latin5_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE latin5_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin5 COLLATE=latin5_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'latin5_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin5_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'latin5_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'latin5_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'latin5_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'latin5_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'latin5_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'latin5_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'latin5_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'latin5_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'latin5_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'latin5_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'latin5_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin5_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin5_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin5_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'latin5_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin5_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin5_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'latin5_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE latin5_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=latin5 COLLATE=latin5_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'latin5_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin5_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'latin5_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'latin5_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'latin5_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'latin5_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'latin5_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'latin5_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'latin5_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'latin5_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'latin5_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'latin5_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'latin5_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin5_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin5_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin5_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'latin5_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin5_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin5_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET character_set_connection=armscii8;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'armscii8_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE armscii8_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=armscii8 COLLATE=armscii8_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'armscii8_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'armscii8_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'armscii8_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'armscii8_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'armscii8_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'armscii8_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'armscii8_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'armscii8_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'armscii8_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'armscii8_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'armscii8_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'armscii8_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'armscii8_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'armscii8_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'armscii8_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'armscii8_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'armscii8_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'armscii8_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'armscii8_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'armscii8_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE armscii8_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=armscii8 COLLATE=armscii8_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'armscii8_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'armscii8_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'armscii8_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'armscii8_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'armscii8_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'armscii8_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'armscii8_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'armscii8_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'armscii8_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'armscii8_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'armscii8_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'armscii8_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'armscii8_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'armscii8_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'armscii8_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'armscii8_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'armscii8_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'armscii8_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'armscii8_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'armscii8_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE armscii8_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=armscii8 COLLATE=armscii8_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'armscii8_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'armscii8_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'armscii8_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'armscii8_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'armscii8_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'armscii8_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'armscii8_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'armscii8_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'armscii8_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'armscii8_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'armscii8_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'armscii8_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'armscii8_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'armscii8_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'armscii8_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'armscii8_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'armscii8_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'armscii8_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'armscii8_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'armscii8_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE armscii8_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=armscii8 COLLATE=armscii8_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'armscii8_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'armscii8_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'armscii8_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'armscii8_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'armscii8_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'armscii8_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'armscii8_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'armscii8_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'armscii8_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'armscii8_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'armscii8_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'armscii8_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'armscii8_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'armscii8_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'armscii8_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'armscii8_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'armscii8_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'armscii8_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'armscii8_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET character_set_connection=cp866;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp866_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp866_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=cp866 COLLATE=cp866_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp866_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp866_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp866_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp866_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp866_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp866_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp866_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp866_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp866_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp866_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp866_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp866_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp866_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp866_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp866_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp866_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp866_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp866_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp866_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp866_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp866_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=cp866 COLLATE=cp866_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp866_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp866_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp866_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp866_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp866_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp866_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp866_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp866_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp866_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp866_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp866_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp866_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp866_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp866_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp866_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp866_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp866_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp866_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp866_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp866_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp866_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=cp866 COLLATE=cp866_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp866_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp866_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp866_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp866_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp866_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp866_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp866_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp866_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp866_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp866_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp866_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp866_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp866_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp866_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp866_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp866_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp866_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp866_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp866_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp866_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp866_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=cp866 COLLATE=cp866_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp866_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp866_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp866_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp866_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp866_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp866_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp866_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp866_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp866_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp866_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp866_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp866_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp866_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp866_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp866_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp866_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp866_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp866_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp866_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET character_set_connection=keybcs2;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'keybcs2_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE keybcs2_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=keybcs2 COLLATE=keybcs2_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'keybcs2_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'keybcs2_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'keybcs2_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'keybcs2_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'keybcs2_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'keybcs2_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'keybcs2_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'keybcs2_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'keybcs2_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'keybcs2_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'keybcs2_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'keybcs2_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'keybcs2_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'keybcs2_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'keybcs2_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'keybcs2_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'keybcs2_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'keybcs2_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'keybcs2_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'keybcs2_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE keybcs2_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=keybcs2 COLLATE=keybcs2_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'keybcs2_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'keybcs2_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'keybcs2_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'keybcs2_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'keybcs2_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'keybcs2_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'keybcs2_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'keybcs2_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'keybcs2_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'keybcs2_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'keybcs2_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'keybcs2_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'keybcs2_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'keybcs2_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'keybcs2_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'keybcs2_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'keybcs2_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'keybcs2_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'keybcs2_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'keybcs2_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE keybcs2_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=keybcs2 COLLATE=keybcs2_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'keybcs2_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'keybcs2_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'keybcs2_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'keybcs2_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'keybcs2_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'keybcs2_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'keybcs2_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'keybcs2_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'keybcs2_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'keybcs2_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'keybcs2_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'keybcs2_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'keybcs2_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'keybcs2_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'keybcs2_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'keybcs2_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'keybcs2_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'keybcs2_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'keybcs2_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'keybcs2_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE keybcs2_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=keybcs2 COLLATE=keybcs2_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'keybcs2_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'keybcs2_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'keybcs2_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'keybcs2_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'keybcs2_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'keybcs2_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'keybcs2_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'keybcs2_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'keybcs2_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'keybcs2_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'keybcs2_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'keybcs2_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'keybcs2_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'keybcs2_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'keybcs2_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'keybcs2_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'keybcs2_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'keybcs2_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'keybcs2_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET character_set_connection=macce;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'macce_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE macce_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=macce COLLATE=macce_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'macce_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'macce_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'macce_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'macce_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'macce_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'macce_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'macce_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'macce_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'macce_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'macce_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'macce_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'macce_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'macce_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'macce_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macce_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macce_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'macce_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macce_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macce_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'macce_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE macce_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=macce COLLATE=macce_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'macce_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'macce_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'macce_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'macce_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'macce_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'macce_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'macce_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'macce_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'macce_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'macce_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'macce_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'macce_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'macce_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'macce_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macce_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macce_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'macce_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macce_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macce_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'macce_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE macce_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=macce COLLATE=macce_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'macce_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'macce_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'macce_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'macce_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'macce_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'macce_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'macce_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'macce_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'macce_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'macce_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'macce_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'macce_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'macce_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'macce_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macce_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macce_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'macce_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macce_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macce_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'macce_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE macce_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=macce COLLATE=macce_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'macce_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'macce_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'macce_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'macce_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'macce_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'macce_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'macce_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'macce_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'macce_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'macce_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'macce_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'macce_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'macce_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'macce_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macce_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macce_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'macce_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macce_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macce_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET character_set_connection=macroman;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'macroman_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE macroman_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=macroman COLLATE=macroman_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'macroman_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'macroman_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'macroman_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'macroman_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'macroman_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'macroman_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'macroman_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'macroman_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'macroman_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'macroman_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'macroman_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'macroman_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'macroman_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'macroman_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macroman_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macroman_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'macroman_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macroman_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macroman_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'macroman_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE macroman_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=macroman COLLATE=macroman_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'macroman_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'macroman_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'macroman_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'macroman_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'macroman_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'macroman_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'macroman_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'macroman_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'macroman_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'macroman_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'macroman_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'macroman_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'macroman_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'macroman_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macroman_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macroman_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'macroman_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macroman_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macroman_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'macroman_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE macroman_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=macroman COLLATE=macroman_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'macroman_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'macroman_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'macroman_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'macroman_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'macroman_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'macroman_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'macroman_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'macroman_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'macroman_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'macroman_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'macroman_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'macroman_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'macroman_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'macroman_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macroman_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macroman_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'macroman_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macroman_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macroman_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'macroman_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE macroman_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=macroman COLLATE=macroman_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'macroman_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'macroman_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'macroman_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'macroman_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'macroman_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'macroman_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'macroman_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'macroman_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'macroman_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'macroman_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'macroman_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'macroman_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'macroman_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'macroman_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macroman_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macroman_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'macroman_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macroman_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'macroman_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET character_set_connection=cp852;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp852_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp852_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=cp852 COLLATE=cp852_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp852_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp852_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp852_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp852_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp852_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp852_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp852_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp852_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp852_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp852_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp852_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp852_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp852_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp852_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp852_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp852_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp852_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp852_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp852_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp852_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp852_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=cp852 COLLATE=cp852_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp852_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp852_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp852_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp852_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp852_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp852_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp852_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp852_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp852_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp852_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp852_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp852_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp852_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp852_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp852_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp852_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp852_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp852_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp852_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp852_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp852_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=cp852 COLLATE=cp852_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp852_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp852_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp852_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp852_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp852_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp852_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp852_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp852_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp852_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp852_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp852_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp852_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp852_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp852_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp852_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp852_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp852_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp852_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp852_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp852_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp852_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=cp852 COLLATE=cp852_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp852_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp852_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp852_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp852_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp852_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp852_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp852_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp852_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp852_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp852_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp852_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp852_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp852_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp852_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp852_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp852_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp852_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp852_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp852_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET character_set_connection=latin7;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'latin7_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE latin7_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin7 COLLATE=latin7_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'latin7_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin7_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'latin7_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+86000000000000000000
+86303000000000000000
+30860000000000000000
+30863000000000000000
+86303030000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'latin7_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'latin7_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'latin7_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'latin7_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'latin7_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'latin7_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'latin7_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'latin7_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'latin7_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'latin7_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin7_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin7_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin7_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'latin7_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin7_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin7_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'latin7_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE latin7_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=latin7 COLLATE=latin7_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'latin7_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin7_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'latin7_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+86000000000000000000
+86303000000000000000
+30860000000000000000
+30863000000000000000
+86303030000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'latin7_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'latin7_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'latin7_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'latin7_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'latin7_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'latin7_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'latin7_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'latin7_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'latin7_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'latin7_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin7_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin7_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin7_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'latin7_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin7_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin7_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'latin7_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE latin7_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin7 COLLATE=latin7_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'latin7_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin7_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'latin7_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'latin7_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'latin7_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'latin7_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'latin7_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'latin7_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'latin7_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'latin7_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'latin7_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'latin7_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'latin7_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin7_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin7_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin7_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'latin7_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin7_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin7_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'latin7_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE latin7_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=latin7 COLLATE=latin7_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'latin7_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin7_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'latin7_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'latin7_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'latin7_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'latin7_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'latin7_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'latin7_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'latin7_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'latin7_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'latin7_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'latin7_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'latin7_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin7_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin7_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin7_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'latin7_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin7_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin7_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET character_set_connection=cp1251;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp1251_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp1251_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=cp1251 COLLATE=cp1251_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp1251_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1251_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp1251_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp1251_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp1251_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp1251_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp1251_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp1251_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp1251_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp1251_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp1251_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp1251_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp1251_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1251_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1251_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1251_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp1251_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1251_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1251_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp1251_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp1251_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=cp1251 COLLATE=cp1251_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp1251_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1251_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp1251_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp1251_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp1251_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp1251_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp1251_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp1251_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp1251_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp1251_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp1251_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp1251_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp1251_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1251_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1251_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1251_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp1251_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1251_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1251_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp1251_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp1251_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=cp1251 COLLATE=cp1251_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp1251_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1251_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp1251_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp1251_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp1251_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp1251_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp1251_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp1251_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp1251_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp1251_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp1251_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp1251_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp1251_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1251_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1251_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1251_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp1251_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1251_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1251_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp1251_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp1251_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=cp1251 COLLATE=cp1251_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp1251_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1251_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp1251_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp1251_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp1251_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp1251_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp1251_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp1251_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp1251_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp1251_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp1251_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp1251_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp1251_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1251_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1251_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1251_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp1251_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1251_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1251_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET character_set_connection=cp1256;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp1256_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp1256_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=cp1256 COLLATE=cp1256_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp1256_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1256_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp1256_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp1256_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp1256_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp1256_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp1256_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp1256_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp1256_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp1256_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp1256_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp1256_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp1256_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1256_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1256_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1256_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp1256_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1256_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1256_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp1256_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp1256_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=cp1256 COLLATE=cp1256_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp1256_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1256_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp1256_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp1256_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp1256_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp1256_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp1256_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp1256_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp1256_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp1256_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp1256_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp1256_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp1256_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1256_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1256_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1256_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp1256_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1256_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1256_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp1256_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp1256_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=cp1256 COLLATE=cp1256_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp1256_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1256_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp1256_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp1256_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp1256_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp1256_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp1256_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp1256_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp1256_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp1256_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp1256_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp1256_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp1256_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1256_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1256_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1256_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp1256_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1256_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1256_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'cp1256_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE cp1256_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=cp1256 COLLATE=cp1256_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'cp1256_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1256_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'cp1256_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'cp1256_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'cp1256_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'cp1256_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'cp1256_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'cp1256_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'cp1256_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'cp1256_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'cp1256_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'cp1256_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'cp1256_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'cp1256_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1256_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1256_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'cp1256_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1256_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'cp1256_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET character_set_connection=geostd8;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'geostd8_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE geostd8_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=geostd8 COLLATE=geostd8_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'geostd8_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'geostd8_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'geostd8_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'geostd8_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'geostd8_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'geostd8_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'geostd8_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'geostd8_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'geostd8_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'geostd8_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'geostd8_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'geostd8_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'geostd8_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'geostd8_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'geostd8_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'geostd8_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'geostd8_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'geostd8_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'geostd8_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'geostd8_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE geostd8_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=geostd8 COLLATE=geostd8_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'geostd8_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'geostd8_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'geostd8_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'geostd8_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'geostd8_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'geostd8_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'geostd8_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'geostd8_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'geostd8_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'geostd8_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'geostd8_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'geostd8_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'geostd8_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'geostd8_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'geostd8_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'geostd8_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'geostd8_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'geostd8_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'geostd8_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'geostd8_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE geostd8_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=geostd8 COLLATE=geostd8_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'geostd8_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'geostd8_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'geostd8_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'geostd8_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'geostd8_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'geostd8_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'geostd8_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'geostd8_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'geostd8_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'geostd8_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'geostd8_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'geostd8_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'geostd8_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'geostd8_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'geostd8_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'geostd8_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'geostd8_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'geostd8_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'geostd8_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'geostd8_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE geostd8_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=geostd8 COLLATE=geostd8_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'geostd8_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'geostd8_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'geostd8_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'geostd8_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'geostd8_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'geostd8_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'geostd8_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'geostd8_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'geostd8_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'geostd8_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'geostd8_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'geostd8_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'geostd8_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'geostd8_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'geostd8_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'geostd8_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'geostd8_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'geostd8_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'geostd8_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+#
+# End of 10.2 tests
+#
diff --git a/mysql-test/r/ctype_sjis.result b/mysql-test/r/ctype_sjis.result
index e96a54211dc..50938fada63 100644
--- a/mysql-test/r/ctype_sjis.result
+++ b/mysql-test/r/ctype_sjis.result
@@ -18746,5 +18746,563 @@ a=CONCAT('x', REPEAT(_sjis 0x835C, 200))
1
DROP TABLE t1;
#
+# MDEV-9711 NO PAD Collatons
+#
+SET character_set_connection=sjis;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'sjis_japanese_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE sjis_japanese_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=sjis COLLATE=sjis_japanese_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'sjis_japanese_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'sjis_japanese_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'sjis_japanese_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'sjis_japanese_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'sjis_japanese_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'sjis_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'sjis_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'sjis_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'sjis_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'sjis_japanese_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'sjis_japanese_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'sjis_japanese_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'sjis_japanese_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'sjis_japanese_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'sjis_japanese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'sjis_japanese_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'sjis_japanese_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'sjis_japanese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'sjis_japanese_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'sjis_japanese_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE sjis_japanese_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=sjis COLLATE=sjis_japanese_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'sjis_japanese_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'sjis_japanese_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'sjis_japanese_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'sjis_japanese_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'sjis_japanese_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'sjis_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'sjis_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'sjis_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'sjis_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'sjis_japanese_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'sjis_japanese_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'sjis_japanese_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'sjis_japanese_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'sjis_japanese_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'sjis_japanese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'sjis_japanese_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'sjis_japanese_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'sjis_japanese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'sjis_japanese_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'sjis_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE sjis_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=sjis COLLATE=sjis_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'sjis_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'sjis_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'sjis_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'sjis_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'sjis_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'sjis_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'sjis_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'sjis_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'sjis_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'sjis_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'sjis_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'sjis_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'sjis_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'sjis_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'sjis_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'sjis_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'sjis_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'sjis_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'sjis_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'sjis_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE sjis_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=sjis COLLATE=sjis_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'sjis_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'sjis_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'sjis_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'sjis_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'sjis_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'sjis_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'sjis_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'sjis_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'sjis_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'sjis_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'sjis_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'sjis_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'sjis_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'sjis_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'sjis_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'sjis_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'sjis_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'sjis_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'sjis_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+#
# End of 10.2 tests
#
diff --git a/mysql-test/r/ctype_swe7.result b/mysql-test/r/ctype_swe7.result
index ccab77c21d1..8aeb05eaa3b 100644
--- a/mysql-test/r/ctype_swe7.result
+++ b/mysql-test/r/ctype_swe7.result
@@ -3069,3 +3069,567 @@ DROP TABLE allbytes;
#
# End of 10.0 tests
#
+#
+# Start of 10.2 tests
+#
+#
+# MDEV-9711 NO PAD Collatons
+#
+SET character_set_connection=swe7;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'swe7_swedish_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE ?t1? (
+ ?a? varchar(10) COLLATE swe7_swedish_nopad_ci NOT NULL,
+ PRIMARY KEY (?a?)
+) ENGINE=MyISAM DEFAULT CHARSET=swe7 COLLATE=swe7_swedish_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'swe7_swedish_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'swe7_swedish_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'swe7_swedish_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'swe7_swedish_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'swe7_swedish_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'swe7_swedish_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'swe7_swedish_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'swe7_swedish_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'swe7_swedish_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'swe7_swedish_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'swe7_swedish_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'swe7_swedish_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'swe7_swedish_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'swe7_swedish_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_swedish_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_swedish_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'swe7_swedish_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_swedish_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_swedish_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'swe7_swedish_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE ?t1? (
+ ?a? varchar(10) COLLATE swe7_swedish_nopad_ci NOT NULL,
+ PRIMARY KEY (?a?)
+) ENGINE=MEMORY DEFAULT CHARSET=swe7 COLLATE=swe7_swedish_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'swe7_swedish_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'swe7_swedish_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'swe7_swedish_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'swe7_swedish_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'swe7_swedish_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'swe7_swedish_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'swe7_swedish_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'swe7_swedish_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'swe7_swedish_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'swe7_swedish_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'swe7_swedish_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'swe7_swedish_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'swe7_swedish_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'swe7_swedish_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_swedish_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_swedish_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'swe7_swedish_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_swedish_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_swedish_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'swe7_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE ?t1? (
+ ?a? varchar(10) COLLATE swe7_nopad_bin NOT NULL,
+ PRIMARY KEY (?a?)
+) ENGINE=MyISAM DEFAULT CHARSET=swe7 COLLATE=swe7_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'swe7_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'swe7_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'swe7_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'swe7_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'swe7_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'swe7_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'swe7_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'swe7_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'swe7_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'swe7_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'swe7_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'swe7_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'swe7_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'swe7_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'swe7_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'swe7_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE ?t1? (
+ ?a? varchar(10) COLLATE swe7_nopad_bin NOT NULL,
+ PRIMARY KEY (?a?)
+) ENGINE=MEMORY DEFAULT CHARSET=swe7 COLLATE=swe7_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'swe7_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'swe7_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'swe7_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'swe7_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'swe7_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'swe7_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'swe7_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'swe7_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'swe7_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'swe7_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'swe7_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'swe7_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'swe7_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'swe7_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'swe7_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'swe7_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+#
+# End of 10.2 tests
+#
diff --git a/mysql-test/r/ctype_tis620.result b/mysql-test/r/ctype_tis620.result
index f148902953a..fd934600689 100644
--- a/mysql-test/r/ctype_tis620.result
+++ b/mysql-test/r/ctype_tis620.result
@@ -3847,3 +3847,567 @@ E0
#
# End of 5.6 tests
#
+#
+# Start of 10.2 tests
+#
+#
+# MDEV-9711 NO PAD Collatons
+#
+SET character_set_connection=tis620;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'tis620_thai_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE tis620_thai_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=tis620 COLLATE=tis620_thai_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'tis620_thai_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'tis620_thai_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'tis620_thai_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'tis620_thai_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'tis620_thai_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'tis620_thai_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'tis620_thai_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'tis620_thai_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'tis620_thai_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'tis620_thai_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'tis620_thai_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'tis620_thai_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'tis620_thai_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'tis620_thai_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'tis620_thai_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'tis620_thai_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'tis620_thai_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'tis620_thai_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'tis620_thai_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'tis620_thai_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE tis620_thai_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=tis620 COLLATE=tis620_thai_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'tis620_thai_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'tis620_thai_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'tis620_thai_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'tis620_thai_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'tis620_thai_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'tis620_thai_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'tis620_thai_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'tis620_thai_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'tis620_thai_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'tis620_thai_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'tis620_thai_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'tis620_thai_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'tis620_thai_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'tis620_thai_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'tis620_thai_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'tis620_thai_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'tis620_thai_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'tis620_thai_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'tis620_thai_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'tis620_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE tis620_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=tis620 COLLATE=tis620_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'tis620_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'tis620_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'tis620_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'tis620_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'tis620_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'tis620_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'tis620_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'tis620_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'tis620_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'tis620_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'tis620_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'tis620_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'tis620_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'tis620_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'tis620_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'tis620_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'tis620_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'tis620_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'tis620_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'tis620_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE tis620_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=tis620 COLLATE=tis620_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'tis620_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'tis620_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'tis620_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'tis620_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'tis620_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'tis620_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'tis620_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'tis620_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'tis620_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'tis620_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'tis620_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'tis620_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'tis620_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'tis620_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'tis620_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'tis620_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'tis620_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'tis620_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'tis620_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+#
+# End of 10.2 tests
+#
diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result
index 4a6d5fa1b41..0a75b11e064 100644
--- a/mysql-test/r/ctype_ucs.result
+++ b/mysql-test/r/ctype_ucs.result
@@ -5660,3 +5660,567 @@ Warning 1292 Truncated incorrect INTEGER value: '1IJ3'
#
# End of 10.1 tests
#
+#
+# Start of 10.2 tests
+#
+#
+# MDEV-9711 NO PAD Collatons
+#
+SET character_set_connection=ucs2;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'ucs2_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE ucs2_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=ucs2 COLLATE=ucs2_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+00200061 a
+002000610020 a
+0061002000200020 a
+006100620063 abc
+00610062006300200020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+00200061 a
+002000610020 a
+0061002000200020 a
+006100620063 abc
+00610062006300200020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+00610062006300200020 abc
+006100620063 abc
+0061002000200020 a
+002000610020 a
+00200061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'ucs2_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+00200061 a
+002000610020 a
+00610020 a
+0061002000200020 a
+006100620063 abc
+0061006200630020 abc
+00610062006300200020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'ucs2_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+00200061 a
+002000610020 a
+0061 a
+006100200020 a
+0061002000200020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+0061002000200020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'ucs2_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+00610061 1
+0061006100200020 1
+00610062 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+0041000000000000000000000000000000000000
+0041002000200000000000000000000000000000
+0020004100000000000000000000000000000000
+0020004100200000000000000000000000000000
+0041002000200020000000000000000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'ucs2_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'ucs2_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'ucs2_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'ucs2_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'ucs2_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'ucs2_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'ucs2_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'ucs2_general_nopad_ci', 'abc '))
+0061006200630020
+SELECT HEX(GREATEST('abc ' COLLATE 'ucs2_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'ucs2_general_nopad_ci', 'abc '))
+00610062006300200020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'ucs2_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ucs2_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ucs2_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'ucs2_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ucs2_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ucs2_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'ucs2_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE ucs2_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=ucs2 COLLATE=ucs2_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+00200061 a
+002000610020 a
+0061002000200020 a
+006100620063 abc
+00610062006300200020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+00200061 a
+002000610020 a
+0061002000200020 a
+006100620063 abc
+00610062006300200020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+00610062006300200020 abc
+006100620063 abc
+0061002000200020 a
+002000610020 a
+00200061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'ucs2_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+00200061 a
+002000610020 a
+00610020 a
+0061002000200020 a
+006100620063 abc
+0061006200630020 abc
+00610062006300200020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'ucs2_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+00200061 a
+002000610020 a
+0061 a
+006100200020 a
+0061002000200020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+0061002000200020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'ucs2_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+00610061 1
+0061006100200020 1
+00610062 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+0041000000000000000000000000000000000000
+0041002000200000000000000000000000000000
+0020004100000000000000000000000000000000
+0020004100200000000000000000000000000000
+0041002000200020000000000000000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'ucs2_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'ucs2_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'ucs2_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'ucs2_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'ucs2_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'ucs2_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'ucs2_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'ucs2_general_nopad_ci', 'abc '))
+0061006200630020
+SELECT HEX(GREATEST('abc ' COLLATE 'ucs2_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'ucs2_general_nopad_ci', 'abc '))
+00610062006300200020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'ucs2_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ucs2_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ucs2_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'ucs2_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ucs2_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ucs2_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'ucs2_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE ucs2_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=ucs2 COLLATE=ucs2_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+00200061 a
+002000610020 a
+0061002000200020 a
+006100620063 abc
+00610062006300200020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+00200061 a
+002000610020 a
+0061002000200020 a
+006100620063 abc
+00610062006300200020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+00610062006300200020 abc
+006100620063 abc
+0061002000200020 a
+002000610020 a
+00200061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'ucs2_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+00200061 a
+002000610020 a
+00610020 a
+0061002000200020 a
+006100620063 abc
+0061006200630020 abc
+00610062006300200020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'ucs2_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+00200061 a
+002000610020 a
+0061 a
+006100200020 a
+0061002000200020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+0061002000200020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'ucs2_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+00610061 1
+0061006100200020 1
+00610062 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+0061000000000000000000000000000000000000
+0061002000200000000000000000000000000000
+0020006100000000000000000000000000000000
+0020006100200000000000000000000000000000
+0061002000200020000000000000000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'ucs2_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'ucs2_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'ucs2_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'ucs2_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'ucs2_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'ucs2_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'ucs2_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'ucs2_nopad_bin', 'abc '))
+0061006200630020
+SELECT HEX(GREATEST('abc ' COLLATE 'ucs2_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'ucs2_nopad_bin', 'abc '))
+00610062006300200020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'ucs2_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ucs2_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ucs2_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'ucs2_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ucs2_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ucs2_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'ucs2_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE ucs2_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=ucs2 COLLATE=ucs2_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+00200061 a
+002000610020 a
+0061002000200020 a
+006100620063 abc
+00610062006300200020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+00200061 a
+002000610020 a
+0061002000200020 a
+006100620063 abc
+00610062006300200020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+00610062006300200020 abc
+006100620063 abc
+0061002000200020 a
+002000610020 a
+00200061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'ucs2_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+00200061 a
+002000610020 a
+00610020 a
+0061002000200020 a
+006100620063 abc
+0061006200630020 abc
+00610062006300200020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'ucs2_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+00200061 a
+002000610020 a
+0061 a
+006100200020 a
+0061002000200020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+0061002000200020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'ucs2_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+00610061 1
+0061006100200020 1
+00610062 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+0061000000000000000000000000000000000000
+0061002000200000000000000000000000000000
+0020006100000000000000000000000000000000
+0020006100200000000000000000000000000000
+0061002000200020000000000000000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'ucs2_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'ucs2_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'ucs2_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'ucs2_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'ucs2_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'ucs2_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'ucs2_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'ucs2_nopad_bin', 'abc '))
+0061006200630020
+SELECT HEX(GREATEST('abc ' COLLATE 'ucs2_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'ucs2_nopad_bin', 'abc '))
+00610062006300200020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'ucs2_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ucs2_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ucs2_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'ucs2_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ucs2_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ucs2_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+#
+# End of 10.2 tests
+#
diff --git a/mysql-test/r/ctype_ujis.result b/mysql-test/r/ctype_ujis.result
index 5eb9a3e1db5..90db3474cef 100644
--- a/mysql-test/r/ctype_ujis.result
+++ b/mysql-test/r/ctype_ujis.result
@@ -26219,7 +26219,7 @@ DROP TABLE t1;
# End of 10.1 tests
#
#
-# End of 10.2 tests
+# Start of 10.2 tests
#
#
# MDEV-9842 LOAD DATA INFILE does not work well with a TEXT column when using sjis
@@ -26237,5 +26237,563 @@ HEX(a)
3F3F
DROP TABLE t1;
#
+# MDEV-9711 NO PAD Collatons
+#
+SET character_set_connection=ujis;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'ujis_japanese_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE ujis_japanese_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=ujis COLLATE=ujis_japanese_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'ujis_japanese_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'ujis_japanese_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'ujis_japanese_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'ujis_japanese_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'ujis_japanese_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'ujis_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'ujis_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'ujis_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'ujis_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'ujis_japanese_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'ujis_japanese_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'ujis_japanese_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'ujis_japanese_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'ujis_japanese_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ujis_japanese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ujis_japanese_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'ujis_japanese_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ujis_japanese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ujis_japanese_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'ujis_japanese_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE ujis_japanese_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=ujis COLLATE=ujis_japanese_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'ujis_japanese_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'ujis_japanese_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'ujis_japanese_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'ujis_japanese_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'ujis_japanese_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'ujis_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'ujis_japanese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'ujis_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'ujis_japanese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'ujis_japanese_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'ujis_japanese_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'ujis_japanese_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'ujis_japanese_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'ujis_japanese_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ujis_japanese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ujis_japanese_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'ujis_japanese_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ujis_japanese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ujis_japanese_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'ujis_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE ujis_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=ujis COLLATE=ujis_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'ujis_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'ujis_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'ujis_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'ujis_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'ujis_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'ujis_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'ujis_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'ujis_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'ujis_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'ujis_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'ujis_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'ujis_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'ujis_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'ujis_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ujis_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ujis_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'ujis_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ujis_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ujis_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'ujis_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE ujis_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=ujis COLLATE=ujis_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'ujis_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'ujis_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'ujis_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'ujis_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'ujis_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'ujis_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'ujis_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'ujis_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'ujis_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'ujis_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'ujis_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'ujis_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'ujis_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'ujis_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ujis_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ujis_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'ujis_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ujis_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'ujis_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+#
# End of 10.2 tests
#
diff --git a/mysql-test/r/ctype_utf16.result b/mysql-test/r/ctype_utf16.result
index 74e264c375d..09ba94bd12d 100644
--- a/mysql-test/r/ctype_utf16.result
+++ b/mysql-test/r/ctype_utf16.result
@@ -2201,3 +2201,567 @@ Warning 1292 Truncated incorrect INTEGER value: '1IJ3'
#
# End of 10.1 tests
#
+#
+# Start of 10.2 tests
+#
+#
+# MDEV-9711 NO PAD Collatons
+#
+SET character_set_connection=utf16;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'utf16_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE utf16_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf16 COLLATE=utf16_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+00200061 a
+002000610020 a
+0061002000200020 a
+006100620063 abc
+00610062006300200020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+00200061 a
+002000610020 a
+0061002000200020 a
+006100620063 abc
+00610062006300200020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+00610062006300200020 abc
+006100620063 abc
+0061002000200020 a
+002000610020 a
+00200061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'utf16_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+00200061 a
+002000610020 a
+00610020 a
+0061002000200020 a
+006100620063 abc
+0061006200630020 abc
+00610062006300200020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf16_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+00200061 a
+002000610020 a
+0061 a
+006100200020 a
+0061002000200020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+0061002000200020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'utf16_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+00610061 1
+0061006100200020 1
+00610062 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+0041000000000000000000000000000000000000
+0041002000200000000000000000000000000000
+0020004100000000000000000000000000000000
+0020004100200000000000000000000000000000
+0041002000200020000000000000000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'utf16_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'utf16_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'utf16_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'utf16_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'utf16_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'utf16_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'utf16_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'utf16_general_nopad_ci', 'abc '))
+0061006200630020
+SELECT HEX(GREATEST('abc ' COLLATE 'utf16_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'utf16_general_nopad_ci', 'abc '))
+00610062006300200020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf16_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'utf16_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'utf16_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE utf16_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=utf16 COLLATE=utf16_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+00200061 a
+002000610020 a
+0061002000200020 a
+006100620063 abc
+00610062006300200020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+00200061 a
+002000610020 a
+0061002000200020 a
+006100620063 abc
+00610062006300200020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+00610062006300200020 abc
+006100620063 abc
+0061002000200020 a
+002000610020 a
+00200061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'utf16_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+00200061 a
+002000610020 a
+00610020 a
+0061002000200020 a
+006100620063 abc
+0061006200630020 abc
+00610062006300200020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf16_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+00200061 a
+002000610020 a
+0061 a
+006100200020 a
+0061002000200020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+0061002000200020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'utf16_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+00610061 1
+0061006100200020 1
+00610062 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+0041000000000000000000000000000000000000
+0041002000200000000000000000000000000000
+0020004100000000000000000000000000000000
+0020004100200000000000000000000000000000
+0041002000200020000000000000000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'utf16_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'utf16_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'utf16_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'utf16_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'utf16_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'utf16_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'utf16_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'utf16_general_nopad_ci', 'abc '))
+0061006200630020
+SELECT HEX(GREATEST('abc ' COLLATE 'utf16_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'utf16_general_nopad_ci', 'abc '))
+00610062006300200020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf16_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'utf16_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'utf16_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE utf16_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf16 COLLATE=utf16_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+00200061 a
+002000610020 a
+0061002000200020 a
+006100620063 abc
+00610062006300200020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+00200061 a
+002000610020 a
+0061002000200020 a
+006100620063 abc
+00610062006300200020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+00610062006300200020 abc
+006100620063 abc
+0061002000200020 a
+002000610020 a
+00200061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'utf16_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+00200061 a
+002000610020 a
+00610020 a
+0061002000200020 a
+006100620063 abc
+0061006200630020 abc
+00610062006300200020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf16_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+00200061 a
+002000610020 a
+0061 a
+006100200020 a
+0061002000200020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+0061002000200020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'utf16_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+00610061 1
+0061006100200020 1
+00610062 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+000061000000000000000000000000000000000000000000000000000000
+000061000020000020000000000000000000000000000000000000000000
+000020000061000000000000000000000000000000000000000000000000
+000020000061000020000000000000000000000000000000000000000000
+000061000020000020000020000000000000000000000000000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'utf16_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'utf16_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'utf16_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'utf16_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'utf16_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'utf16_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'utf16_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'utf16_nopad_bin', 'abc '))
+0061006200630020
+SELECT HEX(GREATEST('abc ' COLLATE 'utf16_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'utf16_nopad_bin', 'abc '))
+00610062006300200020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf16_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'utf16_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'utf16_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE utf16_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=utf16 COLLATE=utf16_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+00200061 a
+002000610020 a
+0061002000200020 a
+006100620063 abc
+00610062006300200020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+00200061 a
+002000610020 a
+0061002000200020 a
+006100620063 abc
+00610062006300200020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+00610062006300200020 abc
+006100620063 abc
+0061002000200020 a
+002000610020 a
+00200061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'utf16_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+00200061 a
+002000610020 a
+00610020 a
+0061002000200020 a
+006100620063 abc
+0061006200630020 abc
+00610062006300200020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf16_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+00200061 a
+002000610020 a
+0061 a
+006100200020 a
+0061002000200020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+0061002000200020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'utf16_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+00610061 1
+0061006100200020 1
+00610062 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+000061000000000000000000000000000000000000000000000000000000
+000061000020000020000000000000000000000000000000000000000000
+000020000061000000000000000000000000000000000000000000000000
+000020000061000020000000000000000000000000000000000000000000
+000061000020000020000020000000000000000000000000000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'utf16_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'utf16_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'utf16_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'utf16_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'utf16_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'utf16_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'utf16_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'utf16_nopad_bin', 'abc '))
+0061006200630020
+SELECT HEX(GREATEST('abc ' COLLATE 'utf16_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'utf16_nopad_bin', 'abc '))
+00610062006300200020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf16_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'utf16_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+#
+# End of 10.2 tests
+#
diff --git a/mysql-test/r/ctype_utf16le.result b/mysql-test/r/ctype_utf16le.result
index b93f67b5f6c..1ba2cf600a4 100644
--- a/mysql-test/r/ctype_utf16le.result
+++ b/mysql-test/r/ctype_utf16le.result
@@ -2393,3 +2393,567 @@ Warning 1292 Truncated incorrect INTEGER value: '1IJ3'
#
# End of 10.1 tests
#
+#
+# Start of 10.2 tests
+#
+#
+# MDEV-9711 NO PAD Collatons
+#
+SET character_set_connection=utf16le;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'utf16le_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE utf16le_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf16le COLLATE=utf16le_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+20006100 a
+200061002000 a
+6100200020002000 a
+610062006300 abc
+61006200630020002000 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+20006100 a
+200061002000 a
+6100200020002000 a
+610062006300 abc
+61006200630020002000 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+61006200630020002000 abc
+610062006300 abc
+6100200020002000 a
+200061002000 a
+20006100 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'utf16le_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+20006100 a
+200061002000 a
+61002000 a
+6100200020002000 a
+610062006300 abc
+6100620063002000 abc
+61006200630020002000 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf16le_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+20006100 a
+200061002000 a
+6100 a
+610020002000 a
+6100200020002000 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+6100200020002000 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'utf16le_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+61006100 1
+6100610020002000 1
+61006200 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+0041000000000000000000000000000000000000
+0041002000200000000000000000000000000000
+0020004100000000000000000000000000000000
+0020004100200000000000000000000000000000
+0041002000200020000000000000000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'utf16le_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'utf16le_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'utf16le_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'utf16le_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'utf16le_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'utf16le_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'utf16le_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'utf16le_general_nopad_ci', 'abc '))
+6100620063002000
+SELECT HEX(GREATEST('abc ' COLLATE 'utf16le_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'utf16le_general_nopad_ci', 'abc '))
+61006200630020002000
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf16le_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16le_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16le_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'utf16le_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16le_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16le_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'utf16le_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE utf16le_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=utf16le COLLATE=utf16le_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+20006100 a
+200061002000 a
+6100200020002000 a
+610062006300 abc
+61006200630020002000 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+20006100 a
+200061002000 a
+6100200020002000 a
+610062006300 abc
+61006200630020002000 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+61006200630020002000 abc
+610062006300 abc
+6100200020002000 a
+200061002000 a
+20006100 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'utf16le_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+20006100 a
+200061002000 a
+61002000 a
+6100200020002000 a
+610062006300 abc
+6100620063002000 abc
+61006200630020002000 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf16le_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+20006100 a
+200061002000 a
+6100 a
+610020002000 a
+6100200020002000 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+6100200020002000 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'utf16le_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+61006100 1
+6100610020002000 1
+61006200 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+0041000000000000000000000000000000000000
+0041002000200000000000000000000000000000
+0020004100000000000000000000000000000000
+0020004100200000000000000000000000000000
+0041002000200020000000000000000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'utf16le_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'utf16le_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'utf16le_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'utf16le_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'utf16le_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'utf16le_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'utf16le_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'utf16le_general_nopad_ci', 'abc '))
+6100620063002000
+SELECT HEX(GREATEST('abc ' COLLATE 'utf16le_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'utf16le_general_nopad_ci', 'abc '))
+61006200630020002000
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf16le_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16le_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16le_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'utf16le_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16le_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16le_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'utf16le_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE utf16le_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf16le COLLATE=utf16le_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+20006100 a
+200061002000 a
+6100200020002000 a
+610062006300 abc
+61006200630020002000 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+20006100 a
+200061002000 a
+6100200020002000 a
+610062006300 abc
+61006200630020002000 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+61006200630020002000 abc
+610062006300 abc
+6100200020002000 a
+200061002000 a
+20006100 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'utf16le_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+20006100 a
+200061002000 a
+61002000 a
+6100200020002000 a
+610062006300 abc
+6100620063002000 abc
+61006200630020002000 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf16le_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+20006100 a
+200061002000 a
+6100 a
+610020002000 a
+6100200020002000 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+6100200020002000 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'utf16le_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+61006100 1
+6100610020002000 1
+61006200 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+000061000000000000000000000000000000000000000000000000000000
+000061000020000020000000000000000000000000000000000000000000
+000020000061000000000000000000000000000000000000000000000000
+000020000061000020000000000000000000000000000000000000000000
+000061000020000020000020000000000000000000000000000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'utf16le_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'utf16le_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'utf16le_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'utf16le_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'utf16le_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'utf16le_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'utf16le_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'utf16le_nopad_bin', 'abc '))
+6100620063002000
+SELECT HEX(GREATEST('abc ' COLLATE 'utf16le_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'utf16le_nopad_bin', 'abc '))
+61006200630020002000
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf16le_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16le_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16le_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'utf16le_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16le_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16le_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'utf16le_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE utf16le_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=utf16le COLLATE=utf16le_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+20006100 a
+200061002000 a
+6100200020002000 a
+610062006300 abc
+61006200630020002000 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+20006100 a
+200061002000 a
+6100200020002000 a
+610062006300 abc
+61006200630020002000 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+61006200630020002000 abc
+610062006300 abc
+6100200020002000 a
+200061002000 a
+20006100 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'utf16le_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+20006100 a
+200061002000 a
+61002000 a
+6100200020002000 a
+610062006300 abc
+6100620063002000 abc
+61006200630020002000 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf16le_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+20006100 a
+200061002000 a
+6100 a
+610020002000 a
+6100200020002000 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+6100200020002000 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'utf16le_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+61006100 1
+6100610020002000 1
+61006200 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+000061000000000000000000000000000000000000000000000000000000
+000061000020000020000000000000000000000000000000000000000000
+000020000061000000000000000000000000000000000000000000000000
+000020000061000020000000000000000000000000000000000000000000
+000061000020000020000020000000000000000000000000000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'utf16le_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'utf16le_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'utf16le_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'utf16le_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'utf16le_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'utf16le_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'utf16le_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'utf16le_nopad_bin', 'abc '))
+6100620063002000
+SELECT HEX(GREATEST('abc ' COLLATE 'utf16le_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'utf16le_nopad_bin', 'abc '))
+61006200630020002000
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf16le_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16le_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16le_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'utf16le_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16le_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf16le_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+#
+# End of 10.2 tests
+#
diff --git a/mysql-test/r/ctype_utf32.result b/mysql-test/r/ctype_utf32.result
index 261209b2eec..9d96fa026e6 100644
--- a/mysql-test/r/ctype_utf32.result
+++ b/mysql-test/r/ctype_utf32.result
@@ -2237,3 +2237,567 @@ Warning 1292 Truncated incorrect INTEGER value: '1IJ3'
#
# End of 10.1 tests
#
+#
+# Start of 10.2 tests
+#
+#
+# MDEV-9711 NO PAD Collatons
+#
+SET character_set_connection=utf32;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'utf32_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE utf32_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf32 COLLATE=utf32_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+0000002000000061 a
+000000200000006100000020 a
+00000061000000200000002000000020 a
+000000610000006200000063 abc
+0000006100000062000000630000002000000020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+0000002000000061 a
+000000200000006100000020 a
+00000061000000200000002000000020 a
+000000610000006200000063 abc
+0000006100000062000000630000002000000020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+0000006100000062000000630000002000000020 abc
+000000610000006200000063 abc
+00000061000000200000002000000020 a
+000000200000006100000020 a
+0000002000000061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'utf32_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+0000002000000061 a
+000000200000006100000020 a
+0000006100000020 a
+00000061000000200000002000000020 a
+000000610000006200000063 abc
+00000061000000620000006300000020 abc
+0000006100000062000000630000002000000020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf32_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+0000002000000061 a
+000000200000006100000020 a
+00000061 a
+000000610000002000000020 a
+00000061000000200000002000000020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+00000061000000200000002000000020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'utf32_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+0000006100000061 1
+00000061000000610000002000000020 1
+0000006100000062 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+0041000000000000000000000000000000000000
+0041002000200000000000000000000000000000
+0020004100000000000000000000000000000000
+0020004100200000000000000000000000000000
+0041002000200020000000000000000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'utf32_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'utf32_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'utf32_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'utf32_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'utf32_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'utf32_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'utf32_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'utf32_general_nopad_ci', 'abc '))
+00000061000000620000006300000020
+SELECT HEX(GREATEST('abc ' COLLATE 'utf32_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'utf32_general_nopad_ci', 'abc '))
+0000006100000062000000630000002000000020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf32_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf32_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf32_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'utf32_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf32_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf32_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'utf32_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE utf32_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=utf32 COLLATE=utf32_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+0000002000000061 a
+000000200000006100000020 a
+00000061000000200000002000000020 a
+000000610000006200000063 abc
+0000006100000062000000630000002000000020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+0000002000000061 a
+000000200000006100000020 a
+00000061000000200000002000000020 a
+000000610000006200000063 abc
+0000006100000062000000630000002000000020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+0000006100000062000000630000002000000020 abc
+000000610000006200000063 abc
+00000061000000200000002000000020 a
+000000200000006100000020 a
+0000002000000061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'utf32_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+0000002000000061 a
+000000200000006100000020 a
+0000006100000020 a
+00000061000000200000002000000020 a
+000000610000006200000063 abc
+00000061000000620000006300000020 abc
+0000006100000062000000630000002000000020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf32_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+0000002000000061 a
+000000200000006100000020 a
+00000061 a
+000000610000002000000020 a
+00000061000000200000002000000020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+00000061000000200000002000000020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'utf32_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+0000006100000061 1
+00000061000000610000002000000020 1
+0000006100000062 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+0041000000000000000000000000000000000000
+0041002000200000000000000000000000000000
+0020004100000000000000000000000000000000
+0020004100200000000000000000000000000000
+0041002000200020000000000000000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'utf32_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'utf32_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'utf32_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'utf32_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'utf32_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'utf32_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'utf32_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'utf32_general_nopad_ci', 'abc '))
+00000061000000620000006300000020
+SELECT HEX(GREATEST('abc ' COLLATE 'utf32_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'utf32_general_nopad_ci', 'abc '))
+0000006100000062000000630000002000000020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf32_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf32_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf32_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'utf32_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf32_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf32_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'utf32_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE utf32_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf32 COLLATE=utf32_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+0000002000000061 a
+000000200000006100000020 a
+00000061000000200000002000000020 a
+000000610000006200000063 abc
+0000006100000062000000630000002000000020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+0000002000000061 a
+000000200000006100000020 a
+00000061000000200000002000000020 a
+000000610000006200000063 abc
+0000006100000062000000630000002000000020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+0000006100000062000000630000002000000020 abc
+000000610000006200000063 abc
+00000061000000200000002000000020 a
+000000200000006100000020 a
+0000002000000061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'utf32_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+0000002000000061 a
+000000200000006100000020 a
+0000006100000020 a
+00000061000000200000002000000020 a
+000000610000006200000063 abc
+00000061000000620000006300000020 abc
+0000006100000062000000630000002000000020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf32_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+0000002000000061 a
+000000200000006100000020 a
+00000061 a
+000000610000002000000020 a
+00000061000000200000002000000020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+00000061000000200000002000000020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'utf32_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+0000006100000061 1
+00000061000000610000002000000020 1
+0000006100000062 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+000061000000000000000000000000000000000000000000000000000000
+000061000020000020000000000000000000000000000000000000000000
+000020000061000000000000000000000000000000000000000000000000
+000020000061000020000000000000000000000000000000000000000000
+000061000020000020000020000000000000000000000000000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'utf32_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'utf32_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'utf32_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'utf32_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'utf32_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'utf32_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'utf32_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'utf32_nopad_bin', 'abc '))
+00000061000000620000006300000020
+SELECT HEX(GREATEST('abc ' COLLATE 'utf32_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'utf32_nopad_bin', 'abc '))
+0000006100000062000000630000002000000020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf32_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf32_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf32_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'utf32_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf32_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf32_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'utf32_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE utf32_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=utf32 COLLATE=utf32_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+0000002000000061 a
+000000200000006100000020 a
+00000061000000200000002000000020 a
+000000610000006200000063 abc
+0000006100000062000000630000002000000020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+0000002000000061 a
+000000200000006100000020 a
+00000061000000200000002000000020 a
+000000610000006200000063 abc
+0000006100000062000000630000002000000020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+0000006100000062000000630000002000000020 abc
+000000610000006200000063 abc
+00000061000000200000002000000020 a
+000000200000006100000020 a
+0000002000000061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'utf32_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+0000002000000061 a
+000000200000006100000020 a
+0000006100000020 a
+00000061000000200000002000000020 a
+000000610000006200000063 abc
+00000061000000620000006300000020 abc
+0000006100000062000000630000002000000020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf32_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+0000002000000061 a
+000000200000006100000020 a
+00000061 a
+000000610000002000000020 a
+00000061000000200000002000000020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+00000061000000200000002000000020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'utf32_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+0000006100000061 1
+00000061000000610000002000000020 1
+0000006100000062 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+000061000000000000000000000000000000000000000000000000000000
+000061000020000020000000000000000000000000000000000000000000
+000020000061000000000000000000000000000000000000000000000000
+000020000061000020000000000000000000000000000000000000000000
+000061000020000020000020000000000000000000000000000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'utf32_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'utf32_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'utf32_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'utf32_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'utf32_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'utf32_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'utf32_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'utf32_nopad_bin', 'abc '))
+00000061000000620000006300000020
+SELECT HEX(GREATEST('abc ' COLLATE 'utf32_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'utf32_nopad_bin', 'abc '))
+0000006100000062000000630000002000000020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf32_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf32_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf32_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'utf32_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf32_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf32_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+#
+# End of 10.2 tests
+#
diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result
index bd40b82fa6e..5e76aa2c203 100644
--- a/mysql-test/r/ctype_utf8.result
+++ b/mysql-test/r/ctype_utf8.result
@@ -2275,7 +2275,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`clipid` int(11) NOT NULL,
- `mos` tinyint(4) DEFAULT '0',
+ `mos` tinyint(4) DEFAULT 0,
`Tape` tinytext DEFAULT NULL,
PRIMARY KEY (`clipid`),
KEY `tape` (`Tape`(255))
@@ -10583,5 +10583,562 @@ HEX(a)
C39F
DROP TABLE t1;
#
+# MDEV-9711 NO PAD Collatons
+#
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'utf8_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE utf8_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'utf8_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf8_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'utf8_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+0041000000000000000000000000000000000000
+0041002000200000000000000000000000000000
+0020004100000000000000000000000000000000
+0020004100200000000000000000000000000000
+0041002000200020000000000000000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'utf8_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'utf8_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'utf8_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'utf8_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'utf8_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'utf8_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'utf8_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'utf8_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'utf8_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'utf8_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf8_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'utf8_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'utf8_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE utf8_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=utf8 COLLATE=utf8_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'utf8_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf8_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'utf8_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+0041000000000000000000000000000000000000
+0041002000200000000000000000000000000000
+0020004100000000000000000000000000000000
+0020004100200000000000000000000000000000
+0041002000200020000000000000000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'utf8_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'utf8_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'utf8_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'utf8_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'utf8_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'utf8_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'utf8_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'utf8_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'utf8_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'utf8_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf8_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'utf8_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'utf8_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE utf8_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'utf8_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf8_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'utf8_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+0061000000000000000000000000000000000000
+0061002000200000000000000000000000000000
+0020006100000000000000000000000000000000
+0020006100200000000000000000000000000000
+0061002000200020000000000000000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'utf8_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'utf8_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'utf8_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'utf8_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'utf8_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'utf8_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'utf8_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'utf8_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'utf8_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'utf8_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf8_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'utf8_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'utf8_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE utf8_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=utf8 COLLATE=utf8_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'utf8_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf8_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'utf8_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+0061000000000000000000000000000000000000
+0061002000200000000000000000000000000000
+0020006100000000000000000000000000000000
+0020006100200000000000000000000000000000
+0061002000200020000000000000000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'utf8_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'utf8_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'utf8_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'utf8_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'utf8_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'utf8_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'utf8_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'utf8_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'utf8_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'utf8_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf8_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'utf8_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+#
# End of 10.2 tests
#
diff --git a/mysql-test/r/ctype_utf8mb4.result b/mysql-test/r/ctype_utf8mb4.result
index 32fa9bd74c0..c75b76964a2 100644
--- a/mysql-test/r/ctype_utf8mb4.result
+++ b/mysql-test/r/ctype_utf8mb4.result
@@ -2387,7 +2387,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`clipid` int(11) NOT NULL,
- `mos` tinyint(4) DEFAULT '0',
+ `mos` tinyint(4) DEFAULT 0,
`Tape` tinytext DEFAULT NULL,
PRIMARY KEY (`clipid`),
KEY `tape` (`Tape`(250))
@@ -3457,5 +3457,562 @@ F09F988E
3F3F3F
DROP TABLE t1;
#
+# MDEV-9711 NO PAD Collatons
+#
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'utf8mb4_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE utf8mb4_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'utf8mb4_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf8mb4_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'utf8mb4_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+0041000000000000000000000000000000000000
+0041002000200000000000000000000000000000
+0020004100000000000000000000000000000000
+0020004100200000000000000000000000000000
+0041002000200020000000000000000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'utf8mb4_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'utf8mb4_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'utf8mb4_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'utf8mb4_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'utf8mb4_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'utf8mb4_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'utf8mb4_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'utf8mb4_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'utf8mb4_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'utf8mb4_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf8mb4_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8mb4_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8mb4_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'utf8mb4_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8mb4_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8mb4_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'utf8mb4_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE utf8mb4_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'utf8mb4_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf8mb4_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'utf8mb4_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+0041000000000000000000000000000000000000
+0041002000200000000000000000000000000000
+0020004100000000000000000000000000000000
+0020004100200000000000000000000000000000
+0041002000200020000000000000000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'utf8mb4_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'utf8mb4_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'utf8mb4_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'utf8mb4_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'utf8mb4_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'utf8mb4_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'utf8mb4_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'utf8mb4_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'utf8mb4_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'utf8mb4_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf8mb4_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8mb4_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8mb4_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'utf8mb4_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8mb4_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8mb4_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+SET STORAGE_ENGINE=MyISAM;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'utf8mb4_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE utf8mb4_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'utf8mb4_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf8mb4_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'utf8mb4_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+000061000000000000000000000000000000000000000000000000000000
+000061000020000020000000000000000000000000000000000000000000
+000020000061000000000000000000000000000000000000000000000000
+000020000061000020000000000000000000000000000000000000000000
+000061000020000020000020000000000000000000000000000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'utf8mb4_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'utf8mb4_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'utf8mb4_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'utf8mb4_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'utf8mb4_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'utf8mb4_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'utf8mb4_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'utf8mb4_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'utf8mb4_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'utf8mb4_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf8mb4_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8mb4_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8mb4_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'utf8mb4_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8mb4_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8mb4_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=HEAP;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'utf8mb4_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE utf8mb4_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=MEMORY DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'utf8mb4_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf8mb4_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'utf8mb4_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+000061000000000000000000000000000000000000000000000000000000
+000061000020000020000000000000000000000000000000000000000000
+000020000061000000000000000000000000000000000000000000000000
+000020000061000020000000000000000000000000000000000000000000
+000061000020000020000020000000000000000000000000000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'utf8mb4_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'utf8mb4_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'utf8mb4_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'utf8mb4_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'utf8mb4_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'utf8mb4_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'utf8mb4_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'utf8mb4_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'utf8mb4_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'utf8mb4_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf8mb4_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8mb4_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8mb4_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'utf8mb4_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8mb4_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8mb4_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+SET STORAGE_ENGINE=Default;
+#
# End of 10.2 tests
#
diff --git a/mysql-test/r/ctype_utf8mb4_innodb.result b/mysql-test/r/ctype_utf8mb4_innodb.result
index d0fc581498d..28b566c19eb 100644
--- a/mysql-test/r/ctype_utf8mb4_innodb.result
+++ b/mysql-test/r/ctype_utf8mb4_innodb.result
@@ -2347,7 +2347,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`clipid` int(11) NOT NULL,
- `mos` tinyint(4) DEFAULT '0',
+ `mos` tinyint(4) DEFAULT 0,
`Tape` tinytext DEFAULT NULL,
PRIMARY KEY (`clipid`),
KEY `tape` (`Tape`(191))
diff --git a/mysql-test/r/ctype_utf8mb4_myisam.result b/mysql-test/r/ctype_utf8mb4_myisam.result
index 2eb8d56b888..34145417966 100644
--- a/mysql-test/r/ctype_utf8mb4_myisam.result
+++ b/mysql-test/r/ctype_utf8mb4_myisam.result
@@ -2347,7 +2347,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`clipid` int(11) NOT NULL,
- `mos` tinyint(4) DEFAULT '0',
+ `mos` tinyint(4) DEFAULT 0,
`Tape` tinytext DEFAULT NULL,
PRIMARY KEY (`clipid`),
KEY `tape` (`Tape`(250))
diff --git a/mysql-test/r/default.result b/mysql-test/r/default.result
index 7817016606f..386837a84bb 100644
--- a/mysql-test/r/default.result
+++ b/mysql-test/r/default.result
@@ -253,7 +253,7 @@ CREATE or replace TABLE t1 (event_time TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIM
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6)
+ `event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(2) ON UPDATE CURRENT_TIMESTAMP(6)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE or replace TABLE t1 (event_time TIMESTAMP(6) NOT NULL DEFAULT SYSDATE(2) ON UPDATE CURRENT_TIMESTAMP);
SHOW CREATE TABLE t1;
@@ -269,7 +269,7 @@ create or replace table t1 (a int default 1, b int default (a+1), c int default
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT '1',
+ `a` int(11) DEFAULT 1,
`b` int(11) DEFAULT (a+1),
`c` int(11) DEFAULT (a+b)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -343,8 +343,8 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
- `b` int(11) DEFAULT '1',
- `c` int(11) DEFAULT '-1',
+ `b` int(11) DEFAULT 1,
+ `c` int(11) DEFAULT -1,
`d` int(11) DEFAULT (1+1),
`e` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`f` int(11) DEFAULT (1+1+1),
@@ -356,8 +356,8 @@ show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL,
- `b` int(11) DEFAULT '1',
- `c` int(11) DEFAULT '-1',
+ `b` int(11) DEFAULT 1,
+ `c` int(11) DEFAULT -1,
`d` int(11) DEFAULT (1+1),
`e` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`f` int(11) DEFAULT (1+1+1),
@@ -374,9 +374,9 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT (1----1),
- `b` int(11) DEFAULT '-1',
- `c` int(11) DEFAULT '1',
- `e` int(11) DEFAULT '1'
+ `b` int(11) DEFAULT -1,
+ `c` int(11) DEFAULT 1,
+ `e` int(11) DEFAULT 1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values();
insert into t1 values();
@@ -409,7 +409,6 @@ create or replace table t1 (a int not null, b int default (a+1));
create or replace table t1 (a int default a);
ERROR 01000: Expression for field `a` is refering to uninitialized field `a`
create or replace table t1 (a int default b, b int default (1+1));
-ERROR 01000: Expression for field `a` is refering to uninitialized field `b`
create or replace table t1 (a int default 1, b int as (c), c int as (a+1));
ERROR 01000: Expression for field `b` is refering to uninitialized field `c`
CREATE TABLE t1 (a INT DEFAULT (DEFAULT(a)));
@@ -520,7 +519,7 @@ execute stmt using @a;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT '1'
+ `a` int(11) DEFAULT 1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
set @a=-1;
@@ -528,7 +527,7 @@ execute stmt using @a;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT '-1'
+ `a` int(11) DEFAULT -1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
DEALLOCATE PREPARE stmt;
@@ -538,8 +537,8 @@ execute stmt using @a,@b;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT '1',
- `b` int(11) DEFAULT '2'
+ `a` int(11) DEFAULT 1,
+ `b` int(11) DEFAULT 2
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
DEALLOCATE PREPARE stmt;
@@ -570,12 +569,12 @@ d03 DATETIME DEFAULT (((TIMESTAMP'2001-01-01 10:20:30')))
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `i01` int(11) DEFAULT '1',
- `i02` int(11) DEFAULT '14649',
- `i03` int(11) DEFAULT '1',
- `i04` int(11) DEFAULT '1',
+ `i01` int(11) DEFAULT 1,
+ `i02` int(11) DEFAULT 14649,
+ `i03` int(11) DEFAULT 1,
+ `i04` int(11) DEFAULT 1,
`i05` int(11) DEFAULT NULL,
- `f01` double DEFAULT '3.141592653589793',
+ `f01` double DEFAULT 3.141592653589793,
`s01` varchar(10) DEFAULT 'test',
`s02` varchar(10) DEFAULT 'test',
`s03` varchar(10) DEFAULT '@',
@@ -672,7 +671,7 @@ CREATE TABLE t1 (a INT DEFAULT 1 NOT NULL);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) NOT NULL DEFAULT '1'
+ `a` int(11) NOT NULL DEFAULT 1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (DEFAULT);
SELECT * FROM t1;
@@ -697,7 +696,7 @@ CREATE TABLE t1 (a INT DEFAULT '1' NOT NULL);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) NOT NULL DEFAULT '1'
+ `a` int(11) NOT NULL DEFAULT 1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (DEFAULT);
SELECT * FROM t1;
@@ -755,7 +754,7 @@ Note 1265 Data truncated for column 'a' at row 1
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT '1'
+ `a` int(11) DEFAULT 1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (DEFAULT);
SELECT * FROM t1;
@@ -799,7 +798,7 @@ CREATE TABLE t1 (a INT DEFAULT 0x61 NOT NULL);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) NOT NULL DEFAULT '97'
+ `a` int(11) NOT NULL DEFAULT 97
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (DEFAULT);
SELECT * FROM t1;
@@ -923,7 +922,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT DEFAULT(b),
- `b` int(11) DEFAULT '1'
+ `b` int(11) DEFAULT 1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (DEFAULT, DEFAULT);
SELECT * FROM t1;
@@ -934,7 +933,7 @@ CREATE TABLE t1 (a INT DEFAULT 1, b INT DEFAULT(DEFAULT(a)));
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT '1',
+ `a` int(11) DEFAULT 1,
`b` int(11) DEFAULT DEFAULT(a)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (DEFAULT, DEFAULT);
@@ -1084,33 +1083,6 @@ a b
20010101102030 2001
DROP TABLE t1;
#
-# Miscelaneous SQL standard <default option> variants
-#
-CREATE TABLE t1 (a VARCHAR(30) DEFAULT CURRENT_USER);
-ERROR HY000: Function or expression 'current_user()' cannot be used in the DEFAULT clause of `a`
-CREATE TABLE t1 (a VARCHAR(30) DEFAULT CURRENT_ROLE);
-ERROR HY000: Function or expression 'current_role()' cannot be used in the DEFAULT clause of `a`
-#
-# Other Item_func_sysconst derived functions
-#
-CREATE TABLE t1 (a VARCHAR(30) DEFAULT DATABASE());
-SHOW CREATE TABLE t1;
-Table Create Table
-t1 CREATE TABLE `t1` (
- `a` varchar(30) DEFAULT DATABASE()
-) ENGINE=MyISAM DEFAULT CHARSET=latin1
-INSERT INTO t1 VALUES ();
-USE INFORMATION_SCHEMA;
-INSERT INTO test.t1 VALUES ();
-USE test;
-INSERT INTO t1 VALUES ();
-SELECT * FROM t1;
-a
-test
-information_schema
-test
-DROP TABLE t1;
-#
# Check DEFAULT() function
#
CREATE TABLE `t1` (`a` int(11) DEFAULT (3+3),`b` int(11) DEFAULT '1000');
@@ -1118,7 +1090,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT (3+3),
- `b` int(11) DEFAULT '1000'
+ `b` int(11) DEFAULT 1000
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,1),(2,2);
insert into t1 values (default,default);
@@ -1400,8 +1372,6 @@ SELECT * FROM t1;
a b c
01,5,2013 %d,%m,%Y 2013-05-01
DROP TABLE t1;
-CREATE TABLE t1 (a VARCHAR(30), b VARCHAR(30) DEFAULT DATE_FORMAT(a,'%W %M %Y'));
-ERROR HY000: Function or expression 'date_format()' cannot be used in the DEFAULT clause of `b`
# Item_datefunc
SET time_zone='-10:00';
SET timestamp=UNIX_TIMESTAMP('2001-01-01 23:59:59');
@@ -1835,10 +1805,6 @@ SELECT * FROM t1;
a b
2008-04-01 2
DROP TABLE t1;
-CREATE TABLE t1 (a DATE, b VARCHAR(30) DEFAULT DAYNAME(a));
-ERROR HY000: Function or expression 'dayname()' cannot be used in the DEFAULT clause of `b`
-CREATE TABLE t1 (a DATE, b VARCHAR(30) DEFAULT MONTHNAME(a));
-ERROR HY000: Function or expression 'monthname()' cannot be used in the DEFAULT clause of `b`
CREATE TABLE t1 (a DATE, b INT DEFAULT EXTRACT(YEAR FROM a));
SHOW CREATE TABLE t1;
Table Create Table
@@ -3068,7 +3034,7 @@ t1 CREATE TABLE `t1` (
`a` char(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT concat('A')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
-create table t1 (a int default 1, b int default (1+1), c int);
+create table t1 (a int default 1, b int default (rand()*0+2), c int);
insert t1 (c) values (a);
insert t1 (c) values (b);
select * from t1;
@@ -3080,7 +3046,7 @@ create table t1 (a int default 1, b int default (1+1), c int);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT '1',
+ `a` int(11) DEFAULT 1,
`b` int(11) DEFAULT (1+1),
`c` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -3092,7 +3058,25 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT (2+3),
- `b` int(11) DEFAULT '4',
+ `b` int(11) DEFAULT 4,
`c` int(11) DEFAULT (-a)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
+create table t1 (a int default 5 check (a>10), b int default (5+5), c int as (a+b));
+create table t2 as select a, b, c from t1;
+create table t3 as select max(a), max(b), max(c) from t1;
+show create table t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` int(11) DEFAULT 5 CHECK (a>10),
+ `b` int(11) DEFAULT (5+5),
+ `c` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show create table t3;
+Table Create Table
+t3 CREATE TABLE `t3` (
+ `max(a)` int(11) DEFAULT NULL,
+ `max(b)` int(11) DEFAULT NULL,
+ `max(c)` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1, t2, t3;
diff --git a/mysql-test/r/default_session.result b/mysql-test/r/default_session.result
new file mode 100644
index 00000000000..b00bf27dcf3
--- /dev/null
+++ b/mysql-test/r/default_session.result
@@ -0,0 +1,94 @@
+create database mysqltest1;
+create user ''@localhost;
+create user foo@localhost;
+create role bar;
+grant select on *.* to ''@localhost;
+grant select,insert on *.* to foo@localhost;
+grant select,insert on *.* to bar;
+grant bar to ''@localhost;
+create table t1 (n varchar(100),
+u varchar(100) default user(),
+cu varchar(100) default current_user(),
+cr varchar(100) default current_role(),
+d varchar(100) default database());
+create definer=foo@localhost view mysqltest1.v1 as select * from t1;
+create definer=bar view v2 as select * from t1;
+create view v3 as select * from v2;
+create definer=foo@localhost view mysqltest1.v4 as select default(n),default(u),default(cu),default(cr), default(d) from t1;
+create definer=bar view v5 as select default(n),default(u),default(cu),default(cr), default(d) from t1;
+create view v6 as select * from v5;
+insert t1 (n) values ('t1');
+insert mysqltest1.v1 (n) values ('v1');
+insert v2 (n) values ('v2');
+insert v3 (n) values ('v3');
+select default(n),default(u),default(cu),default(cr), default(d) from t1 limit 1;
+default(n) default(u) default(cu) default(cr) default(d)
+NULL root@localhost root@localhost NULL test
+select * from mysqltest1.v4 limit 1;
+default(n) default(u) default(cu) default(cr) default(d)
+NULL root@localhost foo@localhost NULL test
+select * from v5 limit 1;
+default(n) default(u) default(cu) default(cr) default(d)
+NULL root@localhost @ bar test
+select * from v6 limit 1;
+default(n) default(u) default(cu) default(cr) default(d)
+NULL root@localhost @ bar test
+connect conn,localhost,conn,,mysqltest1;
+set role bar;
+insert test.t1 (n) values ('t1');
+insert v1 (n) values ('v1');
+insert test.v2 (n) values ('v2');
+insert test.v3 (n) values ('v3');
+select default(n),default(u),default(cu),default(cr), default(d) from test.t1 limit 1;
+default(n) default(u) default(cu) default(cr) default(d)
+NULL conn@localhost @localhost bar mysqltest1
+select * from v4 limit 1;
+default(n) default(u) default(cu) default(cr) default(d)
+NULL conn@localhost foo@localhost NULL mysqltest1
+select * from test.v5 limit 1;
+default(n) default(u) default(cu) default(cr) default(d)
+NULL conn@localhost @ bar mysqltest1
+select * from test.v6 limit 1;
+default(n) default(u) default(cu) default(cr) default(d)
+NULL conn@localhost @ bar mysqltest1
+connection default;
+disconnect conn;
+select * from t1;
+n u cu cr d
+t1 root@localhost root@localhost NULL test
+v1 root@localhost foo@localhost NULL test
+v2 root@localhost @ bar test
+v3 root@localhost @ bar test
+t1 conn@localhost @localhost bar mysqltest1
+v1 conn@localhost foo@localhost NULL mysqltest1
+v2 conn@localhost @ bar mysqltest1
+v3 conn@localhost @ bar mysqltest1
+drop database mysqltest1;
+drop view v2, v3, v5, v6;
+drop table t1;
+drop user ''@localhost;
+drop user foo@localhost;
+drop role bar;
+create table t1 (a date,
+mn varchar(100) default monthname(a),
+dn varchar(100) default dayname(a),
+df varchar(100) default date_format(a, "%a, %b"));
+insert t1 (a) values ('2010-12-2');
+set lc_time_names=de_DE;
+insert t1 (a) values ('2010-12-2');
+set lc_time_names=default;
+select * from t1;
+a mn dn df
+2010-12-02 December Thursday Thu, Dec
+2010-12-02 Dezember Donnerstag Do, Dez
+drop table t1;
+create table t1 (a varchar(100) default @@sql_mode);
+insert t1 () values ();
+set sql_mode=ansi;
+insert t1 () values ();
+set sql_mode=default;
+select * from t1;
+a
+NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI
+drop table t1;
diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result
index d3c0aae91db..04cb8c4c3ad 100644
--- a/mysql-test/r/derived.result
+++ b/mysql-test/r/derived.result
@@ -626,13 +626,13 @@ SELECT f3 FROM t2 HAVING f3 >= 8
);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY <derived2> system NULL NULL NULL NULL 1 100.00
-1 PRIMARY <subquery4> eq_ref distinct_key distinct_key 4 sq.f2 1 100.00
+1 PRIMARY <subquery4> eq_ref distinct_key distinct_key 4 const 1 100.00
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 Using where; FirstMatch(<subquery4>); Using join buffer (flat, BNL join)
4 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 100.00
2 DERIVED t1 system NULL NULL NULL NULL 1 100.00
Warnings:
Note 1276 Field or reference 'sq.f2' of SELECT #3 was resolved in SELECT #1
-Note 1003 select 6 AS `f1` from <materialize> (select `test`.`t2`.`f3` from `test`.`t2` having (`test`.`t2`.`f3` >= 8)) semi join (`test`.`t2`) where ((`test`.`t2`.`f3` = 6) and (9 = `<subquery4>`.`f3`))
+Note 1003 select 6 AS `f1` from <materialize> (select `test`.`t2`.`f3` from `test`.`t2` having (`test`.`t2`.`f3` >= 8)) semi join (`test`.`t2`) where ((`test`.`t2`.`f3` = 6) and (`<subquery4>`.`f3` = 9))
DROP TABLE t2,t1;
#
# MDEV-9462: Out of memory using explain on 2 empty tables
diff --git a/mysql-test/r/derived_cond_pushdown.result b/mysql-test/r/derived_cond_pushdown.result
new file mode 100644
index 00000000000..91c6e629821
--- /dev/null
+++ b/mysql-test/r/derived_cond_pushdown.result
@@ -0,0 +1,7034 @@
+create table t1 (a int, b int, c int);
+create table t2 (a int, b int, c int, d decimal);
+insert into t1 values
+(1,21,345), (1,33,7), (8,33,114), (1,21,500), (1,19,107), (5,14,787),
+(8,33,123), (9,10,211), (5,16,207), (1,33,988), (5,27,132), (1,21,104),
+(6,20,309), (6,20,315), (1,21,101), (8,33,404), (9,10,800), (1,21,123),
+(7,11,708), (6,20,214);
+insert into t2 values
+(2,3,207,207.0000), (1,21,909,12.0000), (7,13,312,406.0000),
+(8,64,248,107.0000), (6,20,315,279.3333), (1,19,203,107.0000),
+(8,80,800,314.0000), (3,12,231,190.0000), (6,23,303,909.0000);
+Warnings:
+Note 1265 Data truncated for column 'd' at row 5
+create table t1_double(a int, b double, c double);
+insert into t1_double values
+(1,23.4,14.3333), (1,12.5,18.9), (3,12.5,18.9),
+(4,33.4,14.3333), (4,14.3333,13.65), (5,17.89,7.22),
+(6,33.4,14.3), (10,33.4,13.65), (11,33.4,13.65);
+create table t2_double(a int, b double, c double);
+insert into t2_double values
+(1,22.4,14.3333), (1,12.5,18.9), (2,22.4,18.9),
+(4,33.4,14.3333), (5,22.4,13.65), (7,17.89,18.9),
+(6,33.4,14.3333), (10,31.4,13.65), (12,33.4,13.65);
+create table t1_char(a char, b char(8), c int);
+insert into t1_char values
+('a','Ivan',1), ('b','Vika',2), ('b','Inga',6), ('c','Vika',7),
+('b','Ivan',7), ('a','Alex',6), ('b','Inga',5), ('d','Ron',9),
+('d','Harry',2), ('d','Hermione',3), ('c','Ivan',3), ('c','Harry',4);
+create table t2_char(a char, b char(8), c int);
+insert into t2_char values
+('b','Ivan',1), ('c','Vinny',3), ('c','Inga',9), ('a','Vika',1),
+('c','Ivan',2), ('b','Ali',6), ('c','Inga',2), ('a','Ron',9),
+('d','Harry',1), ('b','Hermes',3), ('b','Ivan',11), ('b','Harry',4);
+create table t1_decimal (a decimal(3,1), b decimal(3,1), c int);
+insert into t1_decimal values
+(1,1,23),(2,2,11),(3,3,16),
+(1,1,12),(1,1,14),(2,3,15),
+(2,1,13),(2,3,11),(3,3,16);
+create table t2_decimal (a decimal(3,1), b decimal(3,1), c int);
+insert into t2_decimal values
+(2,1,13),(2,2,11),(3,3,16),
+(1,3,22),(1,3,14),(2,2,15),
+(2,1,43),(2,3,11),(2,3,16);
+create view v1 as select a, b, max(c) as max_c, avg(c) as avg_c from t1
+group by a,b having max_c < 707;
+create view v2 as select a, b, max(c) as max_c, avg(c) as avg_c from t1
+where t1.a>5 group by a,b having max_c < 707;
+create view v3 as select a, b, min(c) as min_c from t1
+where t1.a<10 group by a,b having min_c > 109;
+create view v4 as
+select a, b, min(max_c) as min_c from v1
+where (v1.a<15) group by a,b;
+create view v_union as
+select a, b, min(c) as c from t1
+where t1.a<10 group by a,b having c > 109
+union
+select a, b, max(c) as c from t1
+where t1.b>10 group by a,b having c < 300;
+create view v2_union as
+select a, b, min(c) as c from t1
+where t1.a<10 group by a,b having c > 109
+union
+select a, b, max(c) as c from t1
+where t1.b>10 group by a,b having c < 300
+union
+select a, b, avg(c) as c from t1
+where t1.c>300 group by a,b having c < 707;
+create view v3_union as
+select a, b, (a+1) as c from t1
+where t1.a<10
+union
+select a, b, c from t1
+where t1.b>10 and t1.c>100;
+create view v4_union as
+select a, b, max(c)-100 as c from t1
+where t1.a<10 group by a,b having c > 109
+union
+select a, b, (c+100) as c from t1
+where t1.b>10;
+create view v_double as
+select a, avg(a/4) as avg_a, b, c from t1_double
+where (b>12.2) group by b,c having (avg_a<22.333);
+create view v_char as
+select a, b, max(c) as max_c from t1_char
+group by a,b having max_c < 9;
+create view v_decimal as
+select a, b, avg(c) as avg_c from t1_decimal
+group by a,b having (avg_c>12);
+# conjunctive subformula : pushing into HAVING
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where (v1.max_c>214) and (t2.a>v1.a);
+a b max_c avg_c a b c d
+1 21 500 234.6000 2 3 207 207
+1 21 500 234.6000 7 13 312 406
+1 21 500 234.6000 8 64 248 107
+1 21 500 234.6000 6 20 315 279
+1 21 500 234.6000 8 80 800 314
+1 21 500 234.6000 3 12 231 190
+1 21 500 234.6000 6 23 303 909
+6 20 315 279.3333 7 13 312 406
+6 20 315 279.3333 8 64 248 107
+6 20 315 279.3333 8 80 800 314
+select * from v1,t2 where (v1.max_c>214) and (t2.a>v1.a);
+a b max_c avg_c a b c d
+1 21 500 234.6000 2 3 207 207
+1 21 500 234.6000 7 13 312 406
+1 21 500 234.6000 8 64 248 107
+1 21 500 234.6000 6 20 315 279
+1 21 500 234.6000 8 80 800 314
+1 21 500 234.6000 3 12 231 190
+1 21 500 234.6000 6 23 303 909
+6 20 315 279.3333 7 13 312 406
+6 20 315 279.3333 8 64 248 107
+6 20 315 279.3333 8 80 800 314
+explain select * from v1,t2 where (v1.max_c>214) and (t2.a>v1.a);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort
+explain format=json select * from v1,t2 where (v1.max_c>214) and (t2.a>v1.a);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(v1.max_c > 214)"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "(t2.a > v1.a)",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((max_c < 707) and (max_c > 214))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from
+(select a, b, max(c) as max_c, avg(c) as avg_c from t1
+group by a,b having max_c < 707) v1,
+t2 where (v1.a=t2.a) and (v1.max_c>300);
+a b max_c avg_c a b c d
+1 21 500 234.6000 1 21 909 12
+8 33 404 213.6667 8 64 248 107
+6 20 315 279.3333 6 20 315 279
+1 21 500 234.6000 1 19 203 107
+8 33 404 213.6667 8 80 800 314
+6 20 315 279.3333 6 23 303 909
+select * from
+(select a, b, max(c) as max_c, avg(c) as avg_c from t1
+group by a,b having max_c < 707) v1,
+t2 where (v1.a=t2.a) and (v1.max_c>300);
+a b max_c avg_c a b c d
+1 21 500 234.6000 1 21 909 12
+8 33 404 213.6667 8 64 248 107
+6 20 315 279.3333 6 20 315 279
+1 21 500 234.6000 1 19 203 107
+8 33 404 213.6667 8 80 800 314
+6 20 315 279.3333 6 23 303 909
+explain select * from
+(select a, b, max(c) as max_c, avg(c) as avg_c from t1
+group by a,b having max_c < 707) v1,
+t2 where (v1.a=t2.a) and (v1.max_c>300);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key0 key0 5 test.t2.a 2 Using where
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort
+explain format=json select * from
+(select a, b, max(c) as max_c, avg(c) as avg_c from t1
+group by a,b having max_c < 707) v1,
+t2 where (v1.a=t2.a) and (v1.max_c>300);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "(t2.a is not null)"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t2.a"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "(v1.max_c > 300)",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((max_c < 707) and (max_c > 300))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# extracted or formula : pushing into HAVING
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where
+((v1.max_c>400) and (t2.a>v1.a)) or ((v1.max_c<135) and (t2.a<v1.a));
+a b max_c avg_c a b c d
+1 21 500 234.6000 2 3 207 207
+1 21 500 234.6000 7 13 312 406
+1 21 500 234.6000 8 64 248 107
+1 21 500 234.6000 6 20 315 279
+1 21 500 234.6000 8 80 800 314
+1 21 500 234.6000 3 12 231 190
+1 21 500 234.6000 6 23 303 909
+5 27 132 132.0000 2 3 207 207
+5 27 132 132.0000 1 21 909 12
+5 27 132 132.0000 1 19 203 107
+5 27 132 132.0000 3 12 231 190
+select * from v1,t2 where
+((v1.max_c>400) and (t2.a>v1.a)) or ((v1.max_c<135) and (t2.a<v1.a));
+a b max_c avg_c a b c d
+1 21 500 234.6000 2 3 207 207
+1 21 500 234.6000 7 13 312 406
+1 21 500 234.6000 8 64 248 107
+1 21 500 234.6000 6 20 315 279
+1 21 500 234.6000 8 80 800 314
+1 21 500 234.6000 3 12 231 190
+1 21 500 234.6000 6 23 303 909
+5 27 132 132.0000 2 3 207 207
+5 27 132 132.0000 1 21 909 12
+5 27 132 132.0000 1 19 203 107
+5 27 132 132.0000 3 12 231 190
+explain select * from v1,t2 where
+((v1.max_c>400) and (t2.a>v1.a)) or ((v1.max_c<135) and (t2.a<v1.a));
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort
+explain format=json select * from v1,t2 where
+((v1.max_c>400) and (t2.a>v1.a)) or ((v1.max_c<135) and (t2.a<v1.a));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v1.max_c > 400) or (v1.max_c < 135))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "(((v1.max_c > 400) and (t2.a > v1.a)) or ((v1.max_c < 135) and (t2.a < v1.a)))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((max_c < 707) and ((max_c > 400) or (max_c < 135)))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where
+((v1.max_c>300) and (v1.avg_c>t2.d) and (v1.b=t2.b)) or
+((v1.max_c<135) and (v1.max_c<t2.c) and (v1.a=t2.a));
+a b max_c avg_c a b c d
+1 19 107 107.0000 1 21 909 12
+1 19 107 107.0000 1 19 203 107
+1 21 500 234.6000 1 21 909 12
+6 20 315 279.3333 6 20 315 279
+select * from v1,t2 where
+((v1.max_c>300) and (v1.avg_c>t2.d) and (v1.b=t2.b)) or
+((v1.max_c<135) and (v1.max_c<t2.c) and (v1.a=t2.a));
+a b max_c avg_c a b c d
+1 19 107 107.0000 1 21 909 12
+1 19 107 107.0000 1 19 203 107
+1 21 500 234.6000 1 21 909 12
+6 20 315 279.3333 6 20 315 279
+explain select * from v1,t2 where
+((v1.max_c>300) and (v1.avg_c>t2.d) and (v1.b=t2.b)) or
+((v1.max_c<135) and (v1.max_c<t2.c) and (v1.a=t2.a));
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort
+explain format=json select * from v1,t2 where
+((v1.max_c>300) and (v1.avg_c>t2.d) and (v1.b=t2.b)) or
+((v1.max_c<135) and (v1.max_c<t2.c) and (v1.a=t2.a));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v1.max_c > 300) or (v1.max_c < 135))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "(((v1.b = t2.b) and (v1.max_c > 300) and (v1.avg_c > t2.d)) or ((v1.a = t2.a) and (v1.max_c < 135) and (v1.max_c < t2.c)))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((max_c < 707) and ((max_c > 300) or (max_c < 135)))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula : pushing into WHERE
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where (v1.a>6) and (t2.b>v1.b);
+a b max_c avg_c a b c d
+8 33 404 213.6667 8 64 248 107
+8 33 404 213.6667 8 80 800 314
+select * from v1,t2 where (v1.a>6) and (t2.b>v1.b);
+a b max_c avg_c a b c d
+8 33 404 213.6667 8 64 248 107
+8 33 404 213.6667 8 80 800 314
+explain select * from v1,t2 where (v1.a>6) and (t2.b>v1.b);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from v1,t2 where (v1.a>6) and (t2.b>v1.b);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(v1.a > 6)"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "(t2.b > v1.b)",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.a > 6)"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v2,t2 where (v2.b>25) and (t2.a<v2.a);
+a b max_c avg_c a b c d
+8 33 404 213.6667 2 3 207 207
+8 33 404 213.6667 1 21 909 12
+8 33 404 213.6667 7 13 312 406
+8 33 404 213.6667 6 20 315 279
+8 33 404 213.6667 1 19 203 107
+8 33 404 213.6667 3 12 231 190
+8 33 404 213.6667 6 23 303 909
+select * from v2,t2 where (v2.b>25) and (t2.a<v2.a);
+a b max_c avg_c a b c d
+8 33 404 213.6667 2 3 207 207
+8 33 404 213.6667 1 21 909 12
+8 33 404 213.6667 7 13 312 406
+8 33 404 213.6667 6 20 315 279
+8 33 404 213.6667 1 19 203 107
+8 33 404 213.6667 3 12 231 190
+8 33 404 213.6667 6 23 303 909
+explain select * from v2,t2 where (v2.b>25) and (t2.a<v2.a);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from v2,t2 where (v2.b>25) and (t2.a<v2.a);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(v2.b > 25)"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "(t2.a < v2.a)",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a > 5) and (t1.b > 25))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# extracted or formula : pushing into WHERE
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where
+((v1.a>7) and (t2.c<v1.max_c)) or ((v1.a<2) and (t2.b<v1.b));
+a b max_c avg_c a b c d
+1 19 107 107.0000 2 3 207 207
+1 19 107 107.0000 7 13 312 406
+1 19 107 107.0000 3 12 231 190
+1 21 500 234.6000 2 3 207 207
+1 21 500 234.6000 7 13 312 406
+1 21 500 234.6000 6 20 315 279
+1 21 500 234.6000 1 19 203 107
+1 21 500 234.6000 3 12 231 190
+8 33 404 213.6667 2 3 207 207
+8 33 404 213.6667 7 13 312 406
+8 33 404 213.6667 8 64 248 107
+8 33 404 213.6667 6 20 315 279
+8 33 404 213.6667 1 19 203 107
+8 33 404 213.6667 3 12 231 190
+8 33 404 213.6667 6 23 303 909
+select * from v1,t2 where
+((v1.a>7) and (t2.c<v1.max_c)) or ((v1.a<2) and (t2.b<v1.b));
+a b max_c avg_c a b c d
+1 19 107 107.0000 2 3 207 207
+1 19 107 107.0000 7 13 312 406
+1 19 107 107.0000 3 12 231 190
+1 21 500 234.6000 2 3 207 207
+1 21 500 234.6000 7 13 312 406
+1 21 500 234.6000 6 20 315 279
+1 21 500 234.6000 1 19 203 107
+1 21 500 234.6000 3 12 231 190
+8 33 404 213.6667 2 3 207 207
+8 33 404 213.6667 7 13 312 406
+8 33 404 213.6667 8 64 248 107
+8 33 404 213.6667 6 20 315 279
+8 33 404 213.6667 1 19 203 107
+8 33 404 213.6667 3 12 231 190
+8 33 404 213.6667 6 23 303 909
+explain select * from v1,t2 where
+((v1.a>7) and (t2.c<v1.max_c)) or ((v1.a<2) and (t2.b<v1.b));
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from v1,t2 where
+((v1.a>7) and (t2.c<v1.max_c)) or ((v1.a<2) and (t2.b<v1.b));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v1.a > 7) or (v1.a < 2))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "(((v1.a > 7) and (t2.c < v1.max_c)) or ((v1.a < 2) and (t2.b < v1.b)))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a > 7) or (t1.a < 2))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v2,t2 where
+((v2.a>7) and (t2.c<v2.max_c)) or ((v2.a>5) and (t2.b<v2.b));
+a b max_c avg_c a b c d
+6 20 315 279.3333 2 3 207 207
+6 20 315 279.3333 7 13 312 406
+6 20 315 279.3333 1 19 203 107
+6 20 315 279.3333 3 12 231 190
+8 33 404 213.6667 2 3 207 207
+8 33 404 213.6667 1 21 909 12
+8 33 404 213.6667 7 13 312 406
+8 33 404 213.6667 8 64 248 107
+8 33 404 213.6667 6 20 315 279
+8 33 404 213.6667 1 19 203 107
+8 33 404 213.6667 3 12 231 190
+8 33 404 213.6667 6 23 303 909
+select * from v2,t2 where
+((v2.a>7) and (t2.c<v2.max_c)) or ((v2.a>5) and (t2.b<v2.b));
+a b max_c avg_c a b c d
+6 20 315 279.3333 2 3 207 207
+6 20 315 279.3333 7 13 312 406
+6 20 315 279.3333 1 19 203 107
+6 20 315 279.3333 3 12 231 190
+8 33 404 213.6667 2 3 207 207
+8 33 404 213.6667 1 21 909 12
+8 33 404 213.6667 7 13 312 406
+8 33 404 213.6667 8 64 248 107
+8 33 404 213.6667 6 20 315 279
+8 33 404 213.6667 1 19 203 107
+8 33 404 213.6667 3 12 231 190
+8 33 404 213.6667 6 23 303 909
+explain select * from v2,t2 where
+((v2.a>7) and (t2.c<v2.max_c)) or ((v2.a>5) and (t2.b<v2.b));
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from v2,t2 where
+((v2.a>7) and (t2.c<v2.max_c)) or ((v2.a>5) and (t2.b<v2.b));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v2.a > 7) or (v2.a > 5))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "(((v2.a > 7) and (t2.c < v2.max_c)) or ((v2.a > 5) and (t2.b < v2.b)))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a > 5) and ((t1.a > 7) or (t1.a > 5)))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where
+((v1.a>4) and (v1.b>t2.b) and (v1.max_c=t2.d)) or
+((v1.a<2) and (v1.max_c<t2.c) and (v1.max_c=t2.d));
+a b max_c avg_c a b c d
+1 19 107 107.0000 8 64 248 107
+1 19 107 107.0000 1 19 203 107
+5 16 207 207.0000 2 3 207 207
+select * from v1,t2 where
+((v1.a>4) and (v1.b>t2.b) and (v1.max_c=t2.d)) or
+((v1.a<2) and (v1.max_c<t2.c) and (v1.max_c=t2.d));
+a b max_c avg_c a b c d
+1 19 107 107.0000 8 64 248 107
+1 19 107 107.0000 1 19 203 107
+5 16 207 207.0000 2 3 207 207
+explain select * from v1,t2 where
+((v1.a>4) and (v1.b>t2.b) and (v1.max_c=t2.d)) or
+((v1.a<2) and (v1.max_c<t2.c) and (v1.max_c=t2.d));
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from v1,t2 where
+((v1.a>4) and (v1.b>t2.b) and (v1.max_c=t2.d)) or
+((v1.a<2) and (v1.max_c<t2.c) and (v1.max_c=t2.d));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v1.a > 4) or (v1.a < 2))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "(((v1.a > 4) and (v1.b > t2.b) and (v1.max_c = t2.d)) or ((v1.a < 2) and (v1.max_c < t2.c) and (v1.max_c = t2.d)))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a > 4) or (t1.a < 2))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformulas : pushing into HAVING and WHERE
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where (v1.a<2) and (v1.max_c>400) and (t2.b>v1.b);
+a b max_c avg_c a b c d
+1 21 500 234.6000 8 64 248 107
+1 21 500 234.6000 8 80 800 314
+1 21 500 234.6000 6 23 303 909
+select * from v1,t2 where (v1.a<2) and (v1.max_c>400) and (t2.b>v1.b);
+a b max_c avg_c a b c d
+1 21 500 234.6000 8 64 248 107
+1 21 500 234.6000 8 80 800 314
+1 21 500 234.6000 6 23 303 909
+explain select * from v1,t2 where (v1.a<2) and (v1.max_c>400) and (t2.b>v1.b);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from v1,t2 where (v1.a<2) and (v1.max_c>400) and (t2.b>v1.b);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v1.a < 2) and (v1.max_c > 400))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "(t2.b > v1.b)",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((max_c < 707) and (max_c > 400))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.a < 2)"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v_double as v,t2_double as t where
+(v.a=t.a) and (v.avg_a>0.45) and (v.b>10);
+a avg_a b c a b c
+1 0.50000000 12.5 18.9 1 22.4 14.3333
+1 0.50000000 12.5 18.9 1 12.5 18.9
+4 1.00000000 33.4 14.3333 4 33.4 14.3333
+4 1.00000000 14.3333 13.65 4 33.4 14.3333
+5 1.25000000 17.89 7.22 5 22.4 13.65
+6 1.50000000 33.4 14.3 6 33.4 14.3333
+10 2.62500000 33.4 13.65 10 31.4 13.65
+select * from v_double as v,t2_double as t where
+(v.a=t.a) and (v.avg_a>0.45) and (v.b>10);
+a avg_a b c a b c
+1 0.50000000 12.5 18.9 1 22.4 14.3333
+1 0.50000000 12.5 18.9 1 12.5 18.9
+4 1.00000000 33.4 14.3333 4 33.4 14.3333
+4 1.00000000 14.3333 13.65 4 33.4 14.3333
+5 1.25000000 17.89 7.22 5 22.4 13.65
+6 1.50000000 33.4 14.3 6 33.4 14.3333
+10 2.62500000 33.4 13.65 10 31.4 13.65
+explain select * from v_double as v,t2_double as t where
+(v.a=t.a) and (v.avg_a>0.45) and (v.b>10);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key0 key0 5 test.t.a 2 Using where
+2 DERIVED t1_double ALL NULL NULL NULL NULL 9 Using where; Using temporary; Using filesort
+explain format=json select * from v_double as v,t2_double as t where
+(v.a=t.a) and (v.avg_a>0.45) and (v.b>10);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "(t.a is not null)"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t.a"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "((v.avg_a > 0.45) and (v.b > 10))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((avg_a < 22.333) and (avg_a > 0.45))",
+ "filesort": {
+ "sort_key": "t1_double.b, t1_double.c",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1_double",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "((t1_double.b > 12.2) and (t1_double.b > 10))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v_decimal as v,t2_decimal as t where
+(v.a=t.a) and (v.avg_c>15) and (v.b>1);
+a b avg_c a b c
+3.0 3.0 16.0000 3.0 3.0 16
+select * from v_decimal as v,t2_decimal as t where
+(v.a=t.a) and (v.avg_c>15) and (v.b>1);
+a b avg_c a b c
+3.0 3.0 16.0000 3.0 3.0 16
+explain select * from v_decimal as v,t2_decimal as t where
+(v.a=t.a) and (v.avg_c>15) and (v.b>1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key0 key0 3 test.t.a 2 Using where
+2 DERIVED t1_decimal ALL NULL NULL NULL NULL 9 Using where; Using temporary; Using filesort
+explain format=json select * from v_decimal as v,t2_decimal as t where
+(v.a=t.a) and (v.avg_c>15) and (v.b>1);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "(t.a is not null)"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "3",
+ "used_key_parts": ["a"],
+ "ref": ["test.t.a"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "((v.avg_c > 15) and (v.b > 1))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((avg_c > 12) and (avg_c > 15))",
+ "filesort": {
+ "sort_key": "t1_decimal.a, t1_decimal.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1_decimal",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "(t1_decimal.b > 1)"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# extracted or formula : pushing into HAVING and WHERE
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where
+((v1.a>7) and (v1.max_c>300) and (t2.c<v1.max_c)) or
+((v1.a<4) and (v1.max_c<500) and (t2.b<v1.b));
+a b max_c avg_c a b c d
+1 19 107 107.0000 2 3 207 207
+1 19 107 107.0000 7 13 312 406
+1 19 107 107.0000 3 12 231 190
+8 33 404 213.6667 2 3 207 207
+8 33 404 213.6667 7 13 312 406
+8 33 404 213.6667 8 64 248 107
+8 33 404 213.6667 6 20 315 279
+8 33 404 213.6667 1 19 203 107
+8 33 404 213.6667 3 12 231 190
+8 33 404 213.6667 6 23 303 909
+select * from v1,t2 where
+((v1.a>7) and (v1.max_c>300) and (t2.c<v1.max_c)) or
+((v1.a<4) and (v1.max_c<500) and (t2.b<v1.b));
+a b max_c avg_c a b c d
+1 19 107 107.0000 2 3 207 207
+1 19 107 107.0000 7 13 312 406
+1 19 107 107.0000 3 12 231 190
+8 33 404 213.6667 2 3 207 207
+8 33 404 213.6667 7 13 312 406
+8 33 404 213.6667 8 64 248 107
+8 33 404 213.6667 6 20 315 279
+8 33 404 213.6667 1 19 203 107
+8 33 404 213.6667 3 12 231 190
+8 33 404 213.6667 6 23 303 909
+explain select * from v1,t2 where
+((v1.a>7) and (v1.max_c>300) and (t2.c<v1.max_c)) or
+((v1.a<4) and (v1.max_c<500) and (t2.b<v1.b));
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from v1,t2 where
+((v1.a>7) and (v1.max_c>300) and (t2.c<v1.max_c)) or
+((v1.a<4) and (v1.max_c<500) and (t2.b<v1.b));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(((v1.a > 7) and (v1.max_c > 300)) or ((v1.a < 4) and (v1.max_c < 500)))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "(((v1.a > 7) and (v1.max_c > 300) and (t2.c < v1.max_c)) or ((v1.a < 4) and (v1.max_c < 500) and (t2.b < v1.b)))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((max_c < 707) and (((t1.a > 7) and (max_c > 300)) or ((t1.a < 4) and (max_c < 500))))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a > 7) or (t1.a < 4))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where ((v1.a<2) and (v1.max_c>120)) or (v1.a>7);
+a b max_c avg_c a b c d
+1 21 500 234.6000 2 3 207 207
+1 21 500 234.6000 1 21 909 12
+1 21 500 234.6000 7 13 312 406
+1 21 500 234.6000 8 64 248 107
+1 21 500 234.6000 6 20 315 279
+1 21 500 234.6000 1 19 203 107
+1 21 500 234.6000 8 80 800 314
+1 21 500 234.6000 3 12 231 190
+1 21 500 234.6000 6 23 303 909
+8 33 404 213.6667 2 3 207 207
+8 33 404 213.6667 1 21 909 12
+8 33 404 213.6667 7 13 312 406
+8 33 404 213.6667 8 64 248 107
+8 33 404 213.6667 6 20 315 279
+8 33 404 213.6667 1 19 203 107
+8 33 404 213.6667 8 80 800 314
+8 33 404 213.6667 3 12 231 190
+8 33 404 213.6667 6 23 303 909
+select * from v1,t2 where ((v1.a<2) and (v1.max_c>120)) or (v1.a>7);
+a b max_c avg_c a b c d
+1 21 500 234.6000 2 3 207 207
+1 21 500 234.6000 1 21 909 12
+1 21 500 234.6000 7 13 312 406
+1 21 500 234.6000 8 64 248 107
+1 21 500 234.6000 6 20 315 279
+1 21 500 234.6000 1 19 203 107
+1 21 500 234.6000 8 80 800 314
+1 21 500 234.6000 3 12 231 190
+1 21 500 234.6000 6 23 303 909
+8 33 404 213.6667 2 3 207 207
+8 33 404 213.6667 1 21 909 12
+8 33 404 213.6667 7 13 312 406
+8 33 404 213.6667 8 64 248 107
+8 33 404 213.6667 6 20 315 279
+8 33 404 213.6667 1 19 203 107
+8 33 404 213.6667 8 80 800 314
+8 33 404 213.6667 3 12 231 190
+8 33 404 213.6667 6 23 303 909
+explain select * from v1,t2 where ((v1.a<2) and (v1.max_c>120)) or (v1.a>7);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from v1,t2 where ((v1.a<2) and (v1.max_c>120)) or (v1.a>7);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(((v1.a < 2) and (v1.max_c > 120)) or (v1.a > 7))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "(((v1.a < 2) and (v1.max_c > 120)) or (v1.a > 7))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((max_c < 707) and (((t1.a < 2) and (max_c > 120)) or (t1.a > 7)))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a < 2) or (t1.a > 7))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# extracted or formulas : pushing into WHERE and HAVING
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where
+((v1.a<2) and (v1.max_c>120) and (v1.b=t2.b)) or (v1.a>7);
+a b max_c avg_c a b c d
+1 21 500 234.6000 1 21 909 12
+8 33 404 213.6667 2 3 207 207
+8 33 404 213.6667 1 21 909 12
+8 33 404 213.6667 7 13 312 406
+8 33 404 213.6667 8 64 248 107
+8 33 404 213.6667 6 20 315 279
+8 33 404 213.6667 1 19 203 107
+8 33 404 213.6667 8 80 800 314
+8 33 404 213.6667 3 12 231 190
+8 33 404 213.6667 6 23 303 909
+select * from v1,t2 where
+((v1.a<2) and (v1.max_c>120) and (v1.b=t2.b)) or (v1.a>7);
+a b max_c avg_c a b c d
+1 21 500 234.6000 1 21 909 12
+8 33 404 213.6667 2 3 207 207
+8 33 404 213.6667 1 21 909 12
+8 33 404 213.6667 7 13 312 406
+8 33 404 213.6667 8 64 248 107
+8 33 404 213.6667 6 20 315 279
+8 33 404 213.6667 1 19 203 107
+8 33 404 213.6667 8 80 800 314
+8 33 404 213.6667 3 12 231 190
+8 33 404 213.6667 6 23 303 909
+explain select * from v1,t2 where
+((v1.a<2) and (v1.max_c>120) and (v1.b=t2.b)) or (v1.a>7);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from v1,t2 where
+((v1.a<2) and (v1.max_c>120) and (v1.b=t2.b)) or (v1.a>7);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(((v1.a < 2) and (v1.max_c > 120)) or (v1.a > 7))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "(((v1.b = t2.b) and (v1.a < 2) and (v1.max_c > 120)) or (v1.a > 7))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((max_c < 707) and (((t1.a < 2) and (max_c > 120)) or (t1.a > 7)))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a < 2) or (t1.a > 7))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where
+((v1.a<2) and (v1.max_c<200) and (t2.c>v1.max_c) and (v1.max_c=t2.d)) or
+((v1.a>4) and (v1.max_c<500) and (t2.b<v1.b) and (v1.max_c=t2.c));
+a b max_c avg_c a b c d
+1 19 107 107.0000 8 64 248 107
+1 19 107 107.0000 1 19 203 107
+5 16 207 207.0000 2 3 207 207
+select * from v1,t2 where
+((v1.a<2) and (v1.max_c<200) and (t2.c>v1.max_c) and (v1.max_c=t2.d)) or
+((v1.a>4) and (v1.max_c<500) and (t2.b<v1.b) and (v1.max_c=t2.c));
+a b max_c avg_c a b c d
+1 19 107 107.0000 8 64 248 107
+1 19 107 107.0000 1 19 203 107
+5 16 207 207.0000 2 3 207 207
+explain select * from v1,t2 where
+((v1.a<2) and (v1.max_c<200) and (t2.c>v1.max_c) and (v1.max_c=t2.d)) or
+((v1.a>4) and (v1.max_c<500) and (t2.b<v1.b) and (v1.max_c=t2.c));
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from v1,t2 where
+((v1.a<2) and (v1.max_c<200) and (t2.c>v1.max_c) and (v1.max_c=t2.d)) or
+((v1.a>4) and (v1.max_c<500) and (t2.b<v1.b) and (v1.max_c=t2.c));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(((v1.a < 2) and (v1.max_c < 200)) or (v1.a > 4))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "(((v1.a < 2) and (v1.max_c < 200) and (t2.c > v1.max_c) and (v1.max_c = t2.d)) or ((v1.max_c = t2.c) and (v1.a > 4) and (t2.c < 500) and (t2.b < v1.b)))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((max_c < 707) and (((t1.a < 2) and (max_c < 200)) or ((t1.a > 4) and (max_c < 500))))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a < 2) or (t1.a > 4))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# prepare of a query containing extracted or formula
+prepare stmt from "select * from v1,t2 where
+ ((v1.max_c>400) and (t2.a>v1.a)) or ((v1.max_c<135) and (t2.a<v1.a));";
+execute stmt;
+a b max_c avg_c a b c d
+1 21 500 234.6000 2 3 207 207
+1 21 500 234.6000 7 13 312 406
+1 21 500 234.6000 8 64 248 107
+1 21 500 234.6000 6 20 315 279
+1 21 500 234.6000 8 80 800 314
+1 21 500 234.6000 3 12 231 190
+1 21 500 234.6000 6 23 303 909
+5 27 132 132.0000 2 3 207 207
+5 27 132 132.0000 1 21 909 12
+5 27 132 132.0000 1 19 203 107
+5 27 132 132.0000 3 12 231 190
+execute stmt;
+a b max_c avg_c a b c d
+1 21 500 234.6000 2 3 207 207
+5 27 132 132.0000 2 3 207 207
+5 27 132 132.0000 1 21 909 12
+1 21 500 234.6000 7 13 312 406
+1 21 500 234.6000 8 64 248 107
+1 21 500 234.6000 6 20 315 279
+5 27 132 132.0000 1 19 203 107
+1 21 500 234.6000 8 80 800 314
+1 21 500 234.6000 3 12 231 190
+5 27 132 132.0000 3 12 231 190
+1 21 500 234.6000 6 23 303 909
+deallocate prepare stmt;
+prepare stmt from
+"explain format=json select * from v1,t2 where
+ ((v1.max_c>400) and (t2.a>v1.a)) or ((v1.max_c<135) and (t2.a<v1.a));";
+execute stmt;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v1.max_c > 400) or (v1.max_c < 135))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "(((v1.max_c > 400) and (t2.a > v1.a)) or ((v1.max_c < 135) and (t2.a < v1.a)))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((max_c < 707) and ((max_c > 400) or (max_c < 135)))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+execute stmt;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v1.max_c > 400) or (v1.max_c < 135))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "(((v1.max_c > 400) and (t2.a > v1.a)) or ((v1.max_c < 135) and (t2.a < v1.a)))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((max_c < 707) and ((max_c > 400) or (max_c < 135)))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+deallocate prepare stmt;
+# conjunctive subformula : pushing into WHERE
+# pushing equalities
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where (t2.a=v1.a) and (v1.b=t2.b) and (v1.a=1);
+a b max_c avg_c a b c d
+1 21 500 234.6000 1 21 909 12
+1 19 107 107.0000 1 19 203 107
+select * from v1,t2 where (t2.a=v1.a) and (v1.b=t2.b) and (v1.a=1);
+a b max_c avg_c a b c d
+1 21 500 234.6000 1 21 909 12
+1 19 107 107.0000 1 19 203 107
+explain select * from v1,t2 where (t2.a=v1.a) and (v1.b=t2.b) and (v1.a=1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key0 key0 5 test.t2.b 2 Using where
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from v1,t2 where (t2.a=v1.a) and (v1.b=t2.b) and (v1.a=1);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "((t2.a = 1) and (t2.b is not null))"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["b"],
+ "ref": ["test.t2.b"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "(v1.a = 1)",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.a = 1)"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where (v1.a=5) and (v1.max_c=t2.d);
+a b max_c avg_c a b c d
+5 16 207 207.0000 2 3 207 207
+select * from v1,t2 where (v1.a=5) and (v1.max_c=t2.d);
+a b max_c avg_c a b c d
+5 16 207 207.0000 2 3 207 207
+explain select * from v1,t2 where (v1.a=5) and (v1.max_c=t2.d);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key0 key0 5 test.t2.d 2 Using where
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from v1,t2 where (v1.a=5) and (v1.max_c=t2.d);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "(t2.d is not null)"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["max_c"],
+ "ref": ["test.t2.d"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "((v1.a = 5) and (v1.max_c = t2.d))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.a = 5)"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula : pushing into WHERE using equalities
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where (t2.a<5) and (v1.a=t2.a);
+a b max_c avg_c a b c d
+1 21 500 234.6000 1 21 909 12
+1 19 107 107.0000 1 21 909 12
+1 21 500 234.6000 1 19 203 107
+1 19 107 107.0000 1 19 203 107
+select * from v1,t2 where (t2.a<5) and (v1.a=t2.a);
+a b max_c avg_c a b c d
+1 21 500 234.6000 1 21 909 12
+1 19 107 107.0000 1 21 909 12
+1 21 500 234.6000 1 19 203 107
+1 19 107 107.0000 1 19 203 107
+explain select * from v1,t2 where (t2.a<5) and (v1.a=t2.a);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key0 key0 5 test.t2.a 2
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from v1,t2 where (t2.a<5) and (v1.a=t2.a);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "((t2.a < 5) and (t2.a is not null))"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t2.a"],
+ "rows": 2,
+ "filtered": 100,
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.a < 5)"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where (v1.a=v1.b) and (v1.a=t2.a);
+a b max_c avg_c a b c d
+select * from v1,t2 where (v1.a=v1.b) and (v1.a=t2.a);
+a b max_c avg_c a b c d
+explain select * from v1,t2 where (v1.a=v1.b) and (v1.a=t2.a);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key0 key0 10 test.t2.a,test.t2.a 2
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from v1,t2 where (v1.a=v1.b) and (v1.a=t2.a);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "((t2.a is not null) and (t2.a is not null))"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "10",
+ "used_key_parts": ["a", "b"],
+ "ref": ["test.t2.a", "test.t2.a"],
+ "rows": 2,
+ "filtered": 100,
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.b = t1.a)"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula : pushing into HAVING using equalities
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where (t2.c>150) and (v1.max_c=t2.c);
+a b max_c avg_c a b c d
+5 16 207 207.0000 2 3 207 207
+6 20 315 279.3333 6 20 315 279
+select * from v1,t2 where (t2.c>150) and (v1.max_c=t2.c);
+a b max_c avg_c a b c d
+5 16 207 207.0000 2 3 207 207
+6 20 315 279.3333 6 20 315 279
+explain select * from v1,t2 where (t2.c>150) and (v1.max_c=t2.c);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key0 key0 5 test.t2.c 2
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort
+explain format=json select * from v1,t2 where (t2.c>150) and (v1.max_c=t2.c);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "((t2.c > 150) and (t2.c is not null))"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["max_c"],
+ "ref": ["test.t2.c"],
+ "rows": 2,
+ "filtered": 100,
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((max_c < 707) and (max_c > 150))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# extracted and formula : pushing into WHERE
+# pushing equalities
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where (v1.a=v1.b) and (v1.a=t2.a) and (v1.a=3);
+a b max_c avg_c a b c d
+select * from v1,t2 where (v1.a=v1.b) and (v1.a=t2.a) and (v1.a=3);
+a b max_c avg_c a b c d
+explain select * from v1,t2 where (v1.a=v1.b) and (v1.a=t2.a) and (v1.a=3);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where
+explain format=json select * from v1,t2 where (v1.a=v1.b) and (v1.a=t2.a) and (v1.a=3);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "(t2.a = 3)"
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v1.a = 3) and (v1.b = 3))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(max_c < 707)",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a = 3) and (t1.b = 3))"
+ }
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where (v1.a=1) and (v1.b=21) and (t2.a=2);
+a b max_c avg_c a b c d
+1 21 500 234.6000 2 3 207 207
+select * from v1,t2 where (v1.a=1) and (v1.b=21) and (t2.a=2);
+a b max_c avg_c a b c d
+1 21 500 234.6000 2 3 207 207
+explain select * from v1,t2 where (v1.a=1) and (v1.b=21) and (t2.a=2);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where
+explain format=json select * from v1,t2 where (v1.a=1) and (v1.b=21) and (t2.a=2);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "(t2.a = 2)"
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v1.a = 1) and (v1.b = 21))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(max_c < 707)",
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a = 1) and (t1.b = 21))"
+ }
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v_char as v,t2_char as t where
+(v.a='c') and (v.b<'Hermes') and ((v.b=t.b) or (v.max_c>20));
+a b max_c a b c
+c Harry 4 d Harry 1
+c Harry 4 b Harry 4
+select * from v_char as v,t2_char as t where
+(v.a='c') and (v.b<'Hermes') and ((v.b=t.b) or (v.max_c>20));
+a b max_c a b c
+c Harry 4 d Harry 1
+c Harry 4 b Harry 4
+explain select * from v_char as v,t2_char as t where
+(v.a='c') and (v.b<'Hermes') and ((v.b=t.b) or (v.max_c>20));
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 12 Using where
+1 PRIMARY t ALL NULL NULL NULL NULL 12 Using where; Using join buffer (flat, BNL join)
+2 DERIVED t1_char ALL NULL NULL NULL NULL 12 Using where; Using temporary; Using filesort
+explain format=json select * from v_char as v,t2_char as t where
+(v.a='c') and (v.b<'Hermes') and ((v.b=t.b) or (v.max_c>20));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "((v.a = 'c') and (v.b < 'Hermes'))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(max_c < 9)",
+ "filesort": {
+ "sort_key": "t1_char.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1_char",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "((t1_char.a = 'c') and (t1_char.b < 'Hermes'))"
+ }
+ }
+ }
+ }
+ }
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "t",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "((t.b = v.b) or (v.max_c > 20))"
+ }
+ }
+}
+# extracted and formula : pushing into WHERE using equalities
+# pushing equalities
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v_decimal as v,t2_decimal as t where
+(v.a=v.b) and (v.b=t.b) and ((t.b>1) or (v.a=1));
+a b avg_c a b c
+1.0 1.0 16.3333 2.0 1.0 13
+3.0 3.0 16.0000 3.0 3.0 16
+3.0 3.0 16.0000 1.0 3.0 22
+3.0 3.0 16.0000 1.0 3.0 14
+1.0 1.0 16.3333 2.0 1.0 43
+3.0 3.0 16.0000 2.0 3.0 11
+3.0 3.0 16.0000 2.0 3.0 16
+select * from v_decimal as v,t2_decimal as t where
+(v.a=v.b) and (v.b=t.b) and ((t.b>1) or (v.a=1));
+a b avg_c a b c
+1.0 1.0 16.3333 2.0 1.0 13
+3.0 3.0 16.0000 3.0 3.0 16
+3.0 3.0 16.0000 1.0 3.0 22
+3.0 3.0 16.0000 1.0 3.0 14
+1.0 1.0 16.3333 2.0 1.0 43
+3.0 3.0 16.0000 2.0 3.0 11
+3.0 3.0 16.0000 2.0 3.0 16
+explain select * from v_decimal as v,t2_decimal as t where
+(v.a=v.b) and (v.b=t.b) and ((t.b>1) or (v.a=1));
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key0 key0 6 test.t.b,test.t.b 2
+2 DERIVED t1_decimal ALL NULL NULL NULL NULL 9 Using where; Using temporary; Using filesort
+explain format=json select * from v_decimal as v,t2_decimal as t where
+(v.a=v.b) and (v.b=t.b) and ((t.b>1) or (v.a=1));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "(((t.b > 1) or (t.b = 1)) and (t.b is not null) and (t.b is not null))"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "6",
+ "used_key_parts": ["a", "b"],
+ "ref": ["test.t.b", "test.t.b"],
+ "rows": 2,
+ "filtered": 100,
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(avg_c > 12)",
+ "filesort": {
+ "sort_key": "t1_decimal.a, t1_decimal.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1_decimal",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "((t1_decimal.b = t1_decimal.a) and ((t1_decimal.a > 1) or (t1_decimal.a = 1)))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# extracted or formula : pushing into HAVING using equalities
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2
+where ((t2.a<4) and (v1.a=t2.a)) or ((t2.c>150) and (v1.max_c=t2.c));
+a b max_c avg_c a b c d
+1 19 107 107.0000 1 21 909 12
+1 19 107 107.0000 1 19 203 107
+1 21 500 234.6000 1 21 909 12
+1 21 500 234.6000 1 19 203 107
+5 16 207 207.0000 2 3 207 207
+6 20 315 279.3333 6 20 315 279
+select * from v1,t2
+where ((t2.a<4) and (v1.a=t2.a)) or ((t2.c>150) and (v1.max_c=t2.c));
+a b max_c avg_c a b c d
+1 19 107 107.0000 1 21 909 12
+1 19 107 107.0000 1 19 203 107
+1 21 500 234.6000 1 21 909 12
+1 21 500 234.6000 1 19 203 107
+5 16 207 207.0000 2 3 207 207
+6 20 315 279.3333 6 20 315 279
+explain select * from v1,t2
+where ((t2.a<4) and (v1.a=t2.a)) or ((t2.c>150) and (v1.max_c=t2.c));
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort
+explain format=json select * from v1,t2
+where ((t2.a<4) and (v1.a=t2.a)) or ((t2.c>150) and (v1.max_c=t2.c));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "((t2.a < 4) or (t2.c > 150))"
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "(((v1.a = t2.a) and (t2.a < 4)) or ((v1.max_c = t2.c) and (t2.c > 150)))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((max_c < 707) and ((t1.a < 4) or (max_c > 150)))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformulas : pushing into WHERE and HAVING using equalities
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2
+where ((t2.a>5) and (v1.a=t2.a)) and ((t2.c>250) and (v1.max_c=t2.c));
+a b max_c avg_c a b c d
+6 20 315 279.3333 6 20 315 279
+select * from v1,t2
+where ((t2.a>5) and (v1.a=t2.a)) and ((t2.c>250) and (v1.max_c=t2.c));
+a b max_c avg_c a b c d
+6 20 315 279.3333 6 20 315 279
+explain select * from v1,t2
+where ((t2.a>5) and (v1.a=t2.a)) and ((t2.c>250) and (v1.max_c=t2.c));
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key0 key0 10 test.t2.a,test.t2.c 2
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from v1,t2
+where ((t2.a>5) and (v1.a=t2.a)) and ((t2.c>250) and (v1.max_c=t2.c));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "((t2.a > 5) and (t2.c > 250) and (t2.a is not null) and (t2.c is not null))"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "10",
+ "used_key_parts": ["a", "max_c"],
+ "ref": ["test.t2.a", "test.t2.c"],
+ "rows": 2,
+ "filtered": 100,
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((max_c < 707) and (max_c > 250))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.a > 5)"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformulas : pushing into WHERE and HAVING
+# pushing equalities
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from
+(select a, b, max(c) as max_c, avg(c) as avg_c from t1
+group by a,b having max_c < 707) v1,
+t2 where (v1.a=8) and (v1.a=t2.a) and (v1.max_c=404);
+a b max_c avg_c a b c d
+8 33 404 213.6667 8 64 248 107
+8 33 404 213.6667 8 80 800 314
+select * from
+(select a, b, max(c) as max_c, avg(c) as avg_c from t1
+group by a,b having max_c < 707) v1,
+t2 where (v1.a=8) and (v1.a=t2.a) and (v1.max_c=404);
+a b max_c avg_c a b c d
+8 33 404 213.6667 8 64 248 107
+8 33 404 213.6667 8 80 800 314
+explain select * from
+(select a, b, max(c) as max_c, avg(c) as avg_c from t1
+group by a,b having max_c < 707) v1,
+t2 where (v1.a=8) and (v1.a=t2.a) and (v1.max_c=404);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from
+(select a, b, max(c) as max_c, avg(c) as avg_c from t1
+group by a,b having max_c < 707) v1,
+t2 where (v1.a=8) and (v1.a=t2.a) and (v1.max_c=404);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "(t2.a = 8)"
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v1.a = 8) and (v1.max_c = 404))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(max_c = 404)",
+ "filesort": {
+ "sort_key": "t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.a = 8)"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformulas : pushing into WHERE and HAVING
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where
+(v1.a>3) and (v1.max_c>200) and (t2.b<v1.b) and (t2.d=v1.max_c);
+a b max_c avg_c a b c d
+5 16 207 207.0000 2 3 207 207
+select * from v1,t2 where
+(v1.a>3) and (v1.max_c>200) and (t2.b<v1.b) and (t2.d=v1.max_c);
+a b max_c avg_c a b c d
+5 16 207 207.0000 2 3 207 207
+explain select * from v1,t2 where
+(v1.a>3) and (v1.max_c>200) and (t2.b<v1.b) and (t2.d=v1.max_c);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key0 key0 5 test.t2.d 2 Using where
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from v1,t2 where
+(v1.a>3) and (v1.max_c>200) and (t2.b<v1.b) and (t2.d=v1.max_c);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "(t2.d is not null)"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["max_c"],
+ "ref": ["test.t2.d"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "((v1.a > 3) and (v1.max_c > 200) and (t2.b < v1.b) and (t2.d = v1.max_c))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((max_c < 707) and (max_c > 200))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.a > 3)"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula : pushing into WHERE
+# extracted or formula : pushing into HAVING using equalities
+# pushing equalities
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v_double as v,t2_double as t where
+(v.b=v.c) and (v.c=t.c) and ((t.c>10) or (v.a=1));
+a avg_a b c a b c
+select * from v_double as v,t2_double as t where
+(v.b=v.c) and (v.c=t.c) and ((t.c>10) or (v.a=1));
+a avg_a b c a b c
+explain select * from v_double as v,t2_double as t where
+(v.b=v.c) and (v.c=t.c) and ((t.c>10) or (v.a=1));
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key0 key0 18 test.t.c,test.t.c 2 Using where
+2 DERIVED t1_double ALL NULL NULL NULL NULL 9 Using where; Using temporary; Using filesort
+explain format=json select * from v_double as v,t2_double as t where
+(v.b=v.c) and (v.c=t.c) and ((t.c>10) or (v.a=1));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "((t.c is not null) and (t.c is not null))"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "18",
+ "used_key_parts": ["b", "c"],
+ "ref": ["test.t.c", "test.t.c"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "((t.c > 10) or (v.a = 1))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((avg_a < 22.333) and ((t1_double.b > 10) or (t1_double.a = 1)))",
+ "filesort": {
+ "sort_key": "t1_double.b, t1_double.c",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1_double",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "((t1_double.c = t1_double.b) and (t1_double.b > 12.2))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# conjunctive subformula : pushing into WHERE
+# extracted or formula : pushing into HAVING using equalities
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v_double as v,t2_double as t where
+(((v.a>0.2) or (v.b<17)) or (t.c>17)) and (t.c=v.c) and (v.c>18);
+a avg_a b c a b c
+1 0.50000000 12.5 18.9 1 12.5 18.9
+1 0.50000000 12.5 18.9 2 22.4 18.9
+1 0.50000000 12.5 18.9 7 17.89 18.9
+select * from v_double as v,t2_double as t where
+(((v.a>0.2) or (v.b<17)) or (t.c>17)) and (t.c=v.c) and (v.c>18);
+a avg_a b c a b c
+1 0.50000000 12.5 18.9 1 12.5 18.9
+1 0.50000000 12.5 18.9 2 22.4 18.9
+1 0.50000000 12.5 18.9 7 17.89 18.9
+explain select * from v_double as v,t2_double as t where
+(((v.a>0.2) or (v.b<17)) or (t.c>17)) and (t.c=v.c) and (v.c>18);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key0 key0 9 test.t.c 2 Using where
+2 DERIVED t1_double ALL NULL NULL NULL NULL 9 Using where; Using temporary; Using filesort
+explain format=json select * from v_double as v,t2_double as t where
+(((v.a>0.2) or (v.b<17)) or (t.c>17)) and (t.c=v.c) and (v.c>18);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "((t.c > 18) and (t.c is not null))"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "9",
+ "used_key_parts": ["c"],
+ "ref": ["test.t.c"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "((v.a > 0.2) or (v.b < 17) or (t.c > 17))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((avg_a < 22.333) and ((t1_double.a > 0.2) or (t1_double.b < 17) or (t1_double.c > 17)))",
+ "filesort": {
+ "sort_key": "t1_double.b, t1_double.c",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1_double",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "((t1_double.b > 12.2) and (t1_double.c > 18))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# extracted or formula : pushing into WHERE
+# conjunctive subformula : pushing into HAVING
+# pushing equalities
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v_decimal as v,t2_decimal as t where
+(((v.a>4) or (v.a=2)) or (v.b>3)) and (v.avg_c=13);
+a b avg_c a b c
+2.0 1.0 13.0000 2.0 1.0 13
+2.0 3.0 13.0000 2.0 1.0 13
+2.0 1.0 13.0000 2.0 2.0 11
+2.0 3.0 13.0000 2.0 2.0 11
+2.0 1.0 13.0000 3.0 3.0 16
+2.0 3.0 13.0000 3.0 3.0 16
+2.0 1.0 13.0000 1.0 3.0 22
+2.0 3.0 13.0000 1.0 3.0 22
+2.0 1.0 13.0000 1.0 3.0 14
+2.0 3.0 13.0000 1.0 3.0 14
+2.0 1.0 13.0000 2.0 2.0 15
+2.0 3.0 13.0000 2.0 2.0 15
+2.0 1.0 13.0000 2.0 1.0 43
+2.0 3.0 13.0000 2.0 1.0 43
+2.0 1.0 13.0000 2.0 3.0 11
+2.0 3.0 13.0000 2.0 3.0 11
+2.0 1.0 13.0000 2.0 3.0 16
+2.0 3.0 13.0000 2.0 3.0 16
+select * from v_decimal as v,t2_decimal as t where
+(((v.a>4) or (v.a=2)) or (v.b>3)) and (v.avg_c=13);
+a b avg_c a b c
+2.0 1.0 13.0000 2.0 1.0 13
+2.0 3.0 13.0000 2.0 1.0 13
+2.0 1.0 13.0000 2.0 2.0 11
+2.0 3.0 13.0000 2.0 2.0 11
+2.0 1.0 13.0000 3.0 3.0 16
+2.0 3.0 13.0000 3.0 3.0 16
+2.0 1.0 13.0000 1.0 3.0 22
+2.0 3.0 13.0000 1.0 3.0 22
+2.0 1.0 13.0000 1.0 3.0 14
+2.0 3.0 13.0000 1.0 3.0 14
+2.0 1.0 13.0000 2.0 2.0 15
+2.0 3.0 13.0000 2.0 2.0 15
+2.0 1.0 13.0000 2.0 1.0 43
+2.0 3.0 13.0000 2.0 1.0 43
+2.0 1.0 13.0000 2.0 3.0 11
+2.0 3.0 13.0000 2.0 3.0 11
+2.0 1.0 13.0000 2.0 3.0 16
+2.0 3.0 13.0000 2.0 3.0 16
+explain select * from v_decimal as v,t2_decimal as t where
+(((v.a>4) or (v.a=2)) or (v.b>3)) and (v.avg_c=13);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY t ALL NULL NULL NULL NULL 9 Using join buffer (flat, BNL join)
+2 DERIVED t1_decimal ALL NULL NULL NULL NULL 9 Using where; Using temporary; Using filesort
+explain format=json select * from v_decimal as v,t2_decimal as t where
+(((v.a>4) or (v.a=2)) or (v.b>3)) and (v.avg_c=13);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "(((v.a > 4) or (v.a = 2) or (v.b > 3)) and (v.avg_c = 13))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((avg_c > 12) and (avg_c = 13))",
+ "filesort": {
+ "sort_key": "t1_decimal.a, t1_decimal.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1_decimal",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "((t1_decimal.a > 4) or (t1_decimal.a = 2) or (t1_decimal.b > 3))"
+ }
+ }
+ }
+ }
+ }
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "t",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL"
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from
+(select a, b, max(c) as max_c, avg(c) as avg_c from t1
+where t1.a>5 group by a,b having max_c < 707) v1,
+t2 where (v1.a=t2.a) and (v1.max_c>300) and (v1.a=v1.b);
+a b max_c avg_c a b c d
+select * from
+(select a, b, max(c) as max_c, avg(c) as avg_c from t1
+where t1.a>5 group by a,b having max_c < 707) v1,
+t2 where (v1.a=t2.a) and (v1.max_c>300) and (v1.a=v1.b);
+a b max_c avg_c a b c d
+explain select * from
+(select a, b, max(c) as max_c, avg(c) as avg_c from t1
+where t1.a>5 group by a,b having max_c < 707) v1,
+t2 where (v1.a=t2.a) and (v1.max_c>300) and (v1.a=v1.b);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key0 key0 10 test.t2.a,test.t2.a 2 Using where
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from
+(select a, b, max(c) as max_c, avg(c) as avg_c from t1
+where t1.a>5 group by a,b having max_c < 707) v1,
+t2 where (v1.a=t2.a) and (v1.max_c>300) and (v1.a=v1.b);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "((t2.a is not null) and (t2.a is not null))"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "10",
+ "used_key_parts": ["a", "b"],
+ "ref": ["test.t2.a", "test.t2.a"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "(v1.max_c > 300)",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((max_c < 707) and (max_c > 300))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.b = t1.a) and (t1.a > 5))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# nothing to push
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where (t2.a<2) and (t2.c>900);
+a b max_c avg_c a b c d
+1 19 107 107.0000 1 21 909 12
+1 21 500 234.6000 1 21 909 12
+5 16 207 207.0000 1 21 909 12
+5 27 132 132.0000 1 21 909 12
+6 20 315 279.3333 1 21 909 12
+8 33 404 213.6667 1 21 909 12
+select * from v1,t2 where (t2.a<2) and (t2.c>900);
+a b max_c avg_c a b c d
+1 19 107 107.0000 1 21 909 12
+1 21 500 234.6000 1 21 909 12
+5 16 207 207.0000 1 21 909 12
+5 27 132 132.0000 1 21 909 12
+6 20 315 279.3333 1 21 909 12
+8 33 404 213.6667 1 21 909 12
+explain select * from v1,t2 where (t2.a<2) and (t2.c>900);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using join buffer (flat, BNL join)
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort
+explain format=json select * from v1,t2 where (t2.a<2) and (t2.c>900);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "((t2.a < 2) and (t2.c > 900))"
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where (v1.a=t2.a) and (v1.b=t2.b);
+a b max_c avg_c a b c d
+1 21 500 234.6000 1 21 909 12
+6 20 315 279.3333 6 20 315 279
+1 19 107 107.0000 1 19 203 107
+select * from v1,t2 where (v1.a=t2.a) and (v1.b=t2.b);
+a b max_c avg_c a b c d
+1 21 500 234.6000 1 21 909 12
+6 20 315 279.3333 6 20 315 279
+1 19 107 107.0000 1 19 203 107
+explain select * from v1,t2 where (v1.a=t2.a) and (v1.b=t2.b);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key0 key0 10 test.t2.a,test.t2.b 2
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort
+explain format=json select * from v1,t2 where (v1.a=t2.a) and (v1.b=t2.b);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "((t2.a is not null) and (t2.b is not null))"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "10",
+ "used_key_parts": ["a", "b"],
+ "ref": ["test.t2.a", "test.t2.b"],
+ "rows": 2,
+ "filtered": 100,
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where
+(t2.a=v1.a) or (v1.b=t2.b) and ((v1.a=1) or (v1.a=6));
+a b max_c avg_c a b c d
+1 19 107 107.0000 1 21 909 12
+1 19 107 107.0000 1 19 203 107
+1 21 500 234.6000 1 21 909 12
+1 21 500 234.6000 1 19 203 107
+6 20 315 279.3333 6 20 315 279
+6 20 315 279.3333 6 23 303 909
+8 33 404 213.6667 8 64 248 107
+8 33 404 213.6667 8 80 800 314
+select * from v1,t2 where
+(t2.a=v1.a) or (v1.b=t2.b) and ((v1.a=1) or (v1.a=6));
+a b max_c avg_c a b c d
+1 19 107 107.0000 1 21 909 12
+1 19 107 107.0000 1 19 203 107
+1 21 500 234.6000 1 21 909 12
+1 21 500 234.6000 1 19 203 107
+6 20 315 279.3333 6 20 315 279
+6 20 315 279.3333 6 23 303 909
+8 33 404 213.6667 8 64 248 107
+8 33 404 213.6667 8 80 800 314
+explain select * from v1,t2 where
+(t2.a=v1.a) or (v1.b=t2.b) and ((v1.a=1) or (v1.a=6));
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort
+explain format=json select * from v1,t2 where
+(t2.a=v1.a) or (v1.b=t2.b) and ((v1.a=1) or (v1.a=6));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "((v1.a = t2.a) or ((v1.b = t2.b) and ((v1.a = 1) or (v1.a = 6))))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where (v1.a=1) or (v1.b=21) or (t2.a=2);
+a b max_c avg_c a b c d
+1 19 107 107.0000 2 3 207 207
+1 19 107 107.0000 1 21 909 12
+1 19 107 107.0000 7 13 312 406
+1 19 107 107.0000 8 64 248 107
+1 19 107 107.0000 6 20 315 279
+1 19 107 107.0000 1 19 203 107
+1 19 107 107.0000 8 80 800 314
+1 19 107 107.0000 3 12 231 190
+1 19 107 107.0000 6 23 303 909
+1 21 500 234.6000 2 3 207 207
+1 21 500 234.6000 1 21 909 12
+1 21 500 234.6000 7 13 312 406
+1 21 500 234.6000 8 64 248 107
+1 21 500 234.6000 6 20 315 279
+1 21 500 234.6000 1 19 203 107
+1 21 500 234.6000 8 80 800 314
+1 21 500 234.6000 3 12 231 190
+1 21 500 234.6000 6 23 303 909
+5 16 207 207.0000 2 3 207 207
+5 27 132 132.0000 2 3 207 207
+6 20 315 279.3333 2 3 207 207
+8 33 404 213.6667 2 3 207 207
+select * from v1,t2 where (v1.a=1) or (v1.b=21) or (t2.a=2);
+a b max_c avg_c a b c d
+1 19 107 107.0000 2 3 207 207
+1 19 107 107.0000 1 21 909 12
+1 19 107 107.0000 7 13 312 406
+1 19 107 107.0000 8 64 248 107
+1 19 107 107.0000 6 20 315 279
+1 19 107 107.0000 1 19 203 107
+1 19 107 107.0000 8 80 800 314
+1 19 107 107.0000 3 12 231 190
+1 19 107 107.0000 6 23 303 909
+1 21 500 234.6000 2 3 207 207
+1 21 500 234.6000 1 21 909 12
+1 21 500 234.6000 7 13 312 406
+1 21 500 234.6000 8 64 248 107
+1 21 500 234.6000 6 20 315 279
+1 21 500 234.6000 1 19 203 107
+1 21 500 234.6000 8 80 800 314
+1 21 500 234.6000 3 12 231 190
+1 21 500 234.6000 6 23 303 909
+5 16 207 207.0000 2 3 207 207
+5 27 132 132.0000 2 3 207 207
+6 20 315 279.3333 2 3 207 207
+8 33 404 213.6667 2 3 207 207
+explain select * from v1,t2 where (v1.a=1) or (v1.b=21) or (t2.a=2);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort
+explain format=json select * from v1,t2 where (v1.a=1) or (v1.b=21) or (t2.a=2);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "((v1.a = 1) or (v1.b = 21) or (t2.a = 2))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where
+(t2.a<2) and (t2.c>900) and ((v1.a<t2.a) or (t2.a<11));
+a b max_c avg_c a b c d
+1 19 107 107.0000 1 21 909 12
+1 21 500 234.6000 1 21 909 12
+5 16 207 207.0000 1 21 909 12
+5 27 132 132.0000 1 21 909 12
+6 20 315 279.3333 1 21 909 12
+8 33 404 213.6667 1 21 909 12
+select * from v1,t2 where
+(t2.a<2) and (t2.c>900) and ((v1.a<t2.a) or (t2.a<11));
+a b max_c avg_c a b c d
+1 19 107 107.0000 1 21 909 12
+1 21 500 234.6000 1 21 909 12
+5 16 207 207.0000 1 21 909 12
+5 27 132 132.0000 1 21 909 12
+6 20 315 279.3333 1 21 909 12
+8 33 404 213.6667 1 21 909 12
+explain select * from v1,t2 where
+(t2.a<2) and (t2.c>900) and ((v1.a<t2.a) or (t2.a<11));
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort
+explain format=json select * from v1,t2 where
+(t2.a<2) and (t2.c>900) and ((v1.a<t2.a) or (t2.a<11));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "((t2.a < 2) and (t2.c > 900))"
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "((v1.a < t2.a) or (t2.a < 11))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# using several derived tables : nothing to push
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,v2,t2 where
+(v1.a=v2.a) and (v1.a=t2.a) and (v2.b<50);
+a b max_c avg_c a b max_c avg_c a b c d
+8 33 404 213.6667 8 33 404 213.6667 8 64 248 107
+6 20 315 279.3333 6 20 315 279.3333 6 20 315 279
+8 33 404 213.6667 8 33 404 213.6667 8 80 800 314
+6 20 315 279.3333 6 20 315 279.3333 6 23 303 909
+select * from v1,v2,t2 where
+(v1.a=v2.a) and (v1.a=t2.a) and (v2.b<50);
+a b max_c avg_c a b max_c avg_c a b c d
+8 33 404 213.6667 8 33 404 213.6667 8 64 248 107
+6 20 315 279.3333 6 20 315 279.3333 6 20 315 279
+8 33 404 213.6667 8 33 404 213.6667 8 80 800 314
+6 20 315 279.3333 6 20 315 279.3333 6 23 303 909
+explain select * from v1,v2,t2 where
+(v1.a=v2.a) and (v1.a=t2.a) and (v2.b<50);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key1 key1 5 test.t2.a 2
+1 PRIMARY <derived3> ref key0 key0 5 test.t2.a 2 Using where
+3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort
+explain format=json select * from v1,v2,t2 where
+(v1.a=v2.a) and (v1.a=t2.a) and (v2.b<50);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "((t2.a is not null) and (t2.a is not null))"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key1"],
+ "key": "key1",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t2.a"],
+ "rows": 2,
+ "filtered": 100,
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+ },
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t2.a"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "(v2.b < 50)",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a > 5) and (t1.b < 50))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,v2,t2 where
+((v1.a=v2.a) or (v1.a=t2.a)) and (t2.b<50) and (v1.b=v2.b);
+a b max_c avg_c a b max_c avg_c a b c d
+6 20 315 279.3333 6 20 315 279.3333 2 3 207 207
+6 20 315 279.3333 6 20 315 279.3333 1 21 909 12
+6 20 315 279.3333 6 20 315 279.3333 7 13 312 406
+6 20 315 279.3333 6 20 315 279.3333 6 20 315 279
+6 20 315 279.3333 6 20 315 279.3333 1 19 203 107
+6 20 315 279.3333 6 20 315 279.3333 3 12 231 190
+6 20 315 279.3333 6 20 315 279.3333 6 23 303 909
+8 33 404 213.6667 8 33 404 213.6667 2 3 207 207
+8 33 404 213.6667 8 33 404 213.6667 1 21 909 12
+8 33 404 213.6667 8 33 404 213.6667 7 13 312 406
+8 33 404 213.6667 8 33 404 213.6667 6 20 315 279
+8 33 404 213.6667 8 33 404 213.6667 1 19 203 107
+8 33 404 213.6667 8 33 404 213.6667 3 12 231 190
+8 33 404 213.6667 8 33 404 213.6667 6 23 303 909
+select * from v1,v2,t2 where
+((v1.a=v2.a) or (v1.a=t2.a)) and (t2.b<50) and (v1.b=v2.b);
+a b max_c avg_c a b max_c avg_c a b c d
+6 20 315 279.3333 6 20 315 279.3333 2 3 207 207
+6 20 315 279.3333 6 20 315 279.3333 1 21 909 12
+6 20 315 279.3333 6 20 315 279.3333 7 13 312 406
+6 20 315 279.3333 6 20 315 279.3333 6 20 315 279
+6 20 315 279.3333 6 20 315 279.3333 1 19 203 107
+6 20 315 279.3333 6 20 315 279.3333 3 12 231 190
+6 20 315 279.3333 6 20 315 279.3333 6 23 303 909
+8 33 404 213.6667 8 33 404 213.6667 2 3 207 207
+8 33 404 213.6667 8 33 404 213.6667 1 21 909 12
+8 33 404 213.6667 8 33 404 213.6667 7 13 312 406
+8 33 404 213.6667 8 33 404 213.6667 6 20 315 279
+8 33 404 213.6667 8 33 404 213.6667 1 19 203 107
+8 33 404 213.6667 8 33 404 213.6667 3 12 231 190
+8 33 404 213.6667 8 33 404 213.6667 6 23 303 909
+explain select * from v1,v2,t2 where
+((v1.a=v2.a) or (v1.a=t2.a)) and (t2.b<50) and (v1.b=v2.b);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY <derived3> ref key0 key0 5 v1.b 2 Using where
+3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort
+explain format=json select * from v1,v2,t2 where
+((v1.a=v2.a) or (v1.a=t2.a)) and (t2.b<50) and (v1.b=v2.b);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "(t2.b < 50)"
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "(v1.b is not null)",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+ },
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["b"],
+ "ref": ["v1.b"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "((v2.a = v1.a) or (v1.a = t2.a))",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.a > 5)"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,v2,t2 where
+((v1.a=v2.a) and (v1.a=t2.a)) or ((v2.b>13) and (t2.c<115));
+a b max_c avg_c a b max_c avg_c a b c d
+6 20 315 279.3333 6 20 315 279.3333 6 20 315 279
+6 20 315 279.3333 6 20 315 279.3333 6 23 303 909
+8 33 404 213.6667 8 33 404 213.6667 8 64 248 107
+8 33 404 213.6667 8 33 404 213.6667 8 80 800 314
+select * from v1,v2,t2 where
+((v1.a=v2.a) and (v1.a=t2.a)) or ((v2.b>13) and (t2.c<115));
+a b max_c avg_c a b max_c avg_c a b c d
+6 20 315 279.3333 6 20 315 279.3333 6 20 315 279
+6 20 315 279.3333 6 20 315 279.3333 6 23 303 909
+8 33 404 213.6667 8 33 404 213.6667 8 64 248 107
+8 33 404 213.6667 8 33 404 213.6667 8 80 800 314
+explain select * from v1,v2,t2 where
+((v1.a=v2.a) and (v1.a=t2.a)) or ((v2.b>13) and (t2.c<115));
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY <derived3> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (incremental, BNL join)
+3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort
+explain format=json select * from v1,v2,t2 where
+((v1.a=v2.a) and (v1.a=t2.a)) or ((v2.b>13) and (t2.c<115));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "((v1.a = t2.a) or (t2.c < 115))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ },
+ "buffer_type": "incremental",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "(((v1.a = t2.a) and (v2.a = t2.a)) or ((v2.b > 13) and (t2.c < 115)))",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.a > 5)"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# using several derived tables : pushing in all tables
+# conjunctive subformula : pushing into HAVING
+# extracted or formula : pushing into WHERE
+# pushing equalities
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,v2,t2 where ((v1.a=v2.a) or (v1.a=t2.a)) and
+((v2.b<50) or (v2.b=19)) and (v1.max_c<300);
+a b max_c avg_c a b max_c avg_c a b c d
+1 19 107 107.0000 6 20 315 279.3333 1 21 909 12
+1 19 107 107.0000 6 20 315 279.3333 1 19 203 107
+1 19 107 107.0000 8 33 404 213.6667 1 21 909 12
+1 19 107 107.0000 8 33 404 213.6667 1 19 203 107
+select * from v1,v2,t2 where ((v1.a=v2.a) or (v1.a=t2.a)) and
+((v2.b<50) or (v2.b=19)) and (v1.max_c<300);
+a b max_c avg_c a b max_c avg_c a b c d
+1 19 107 107.0000 6 20 315 279.3333 1 21 909 12
+1 19 107 107.0000 6 20 315 279.3333 1 19 203 107
+1 19 107 107.0000 8 33 404 213.6667 1 21 909 12
+1 19 107 107.0000 8 33 404 213.6667 1 19 203 107
+explain select * from v1,v2,t2 where ((v1.a=v2.a) or (v1.a=t2.a)) and
+((v2.b<50) or (v2.b=19)) and (v1.max_c<300);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY <derived3> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (incremental, BNL join)
+3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort
+explain format=json select * from v1,v2,t2 where ((v1.a=v2.a) or (v1.a=t2.a)) and
+((v2.b<50) or (v2.b=19)) and (v1.max_c<300);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(v1.max_c < 300)"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((max_c < 707) and (max_c < 300))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v2.b < 50) or (v2.b = 19))"
+ },
+ "buffer_type": "incremental",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "(((v2.a = v1.a) or (v1.a = t2.a)) and ((v2.b < 50) or (v2.b = 19)))",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a > 5) and ((t1.b < 50) or (t1.b = 19)))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# using several derived tables : pushing only in one table
+# conjunctive subformula : pushing into WHERE
+# pushing equalities
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,v2,t2 where
+(v1.a=t2.a) and (v1.a=v1.b) and (v1.a=v2.a) and (v2.max_c<300);
+a b max_c avg_c a b max_c avg_c a b c d
+select * from v1,v2,t2 where
+(v1.a=t2.a) and (v1.a=v1.b) and (v1.a=v2.a) and (v2.max_c<300);
+a b max_c avg_c a b max_c avg_c a b c d
+explain select * from v1,v2,t2 where
+(v1.a=t2.a) and (v1.a=v1.b) and (v1.a=v2.a) and (v2.max_c<300);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key1 key1 10 test.t2.a,test.t2.a 2
+1 PRIMARY <derived3> ref key0 key0 5 test.t2.a 2 Using where
+3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from v1,v2,t2 where
+(v1.a=t2.a) and (v1.a=v1.b) and (v1.a=v2.a) and (v2.max_c<300);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "((t2.a is not null) and (t2.a is not null) and (t2.a is not null))"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key1"],
+ "key": "key1",
+ "key_length": "10",
+ "used_key_parts": ["a", "b"],
+ "ref": ["test.t2.a", "test.t2.a"],
+ "rows": 2,
+ "filtered": 100,
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.b = t1.a)"
+ }
+ }
+ }
+ }
+ }
+ },
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t2.a"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "(v2.max_c < 300)",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "((max_c < 707) and (max_c < 300))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.a > 5)"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# using several derived tables : pushing only in one table
+# extracted and formula : pushing into WHERE
+# conjunctive subformula : pushing into WHERE using equalities
+# pushing equalities
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,v2,t2 where (v1.a=1) and (v1.b>10) and (v1.b=v2.b);
+a b max_c avg_c a b max_c avg_c a b c d
+select * from v1,v2,t2 where (v1.a=1) and (v1.b>10) and (v1.b=v2.b);
+a b max_c avg_c a b max_c avg_c a b c d
+explain select * from v1,v2,t2 where (v1.a=1) and (v1.b>10) and (v1.b=v2.b);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY <derived3> ref key0 key0 5 v1.b 2
+3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from v1,v2,t2 where (v1.a=1) and (v1.b>10) and (v1.b=v2.b);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v1.a = 1) and (v1.b > 10))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "(v1.b is not null)",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a = 1) and (t1.b > 10))"
+ }
+ }
+ }
+ }
+ }
+ },
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["b"],
+ "ref": ["v1.b"],
+ "rows": 2,
+ "filtered": 100,
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a > 5) and (t1.b > 10))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# extracted or formula : pushing into WHERE
+# conjunctive subformula : pushing into WHERE using equalities
+# pushing equalities
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v_char as v,t2_char as t where
+(v.a=t.a) and (t.a='b') and ((v.b='Vika') or (v.b='Ali'));
+a b max_c a b c
+b Vika 2 b Ivan 1
+b Vika 2 b Ali 6
+b Vika 2 b Hermes 3
+b Vika 2 b Ivan 11
+b Vika 2 b Harry 4
+select * from v_char as v,t2_char as t where
+(v.a=t.a) and (t.a='b') and ((v.b='Vika') or (v.b='Ali'));
+a b max_c a b c
+b Vika 2 b Ivan 1
+b Vika 2 b Ali 6
+b Vika 2 b Hermes 3
+b Vika 2 b Ivan 11
+b Vika 2 b Harry 4
+explain select * from v_char as v,t2_char as t where
+(v.a=t.a) and (t.a='b') and ((v.b='Vika') or (v.b='Ali'));
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 12 Using where
+1 PRIMARY t ALL NULL NULL NULL NULL 12 Using where; Using join buffer (flat, BNL join)
+2 DERIVED t1_char ALL NULL NULL NULL NULL 12 Using where; Using temporary; Using filesort
+explain format=json select * from v_char as v,t2_char as t where
+(v.a=t.a) and (t.a='b') and ((v.b='Vika') or (v.b='Ali'));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "((v.a = 'b') and ((v.b = 'Vika') or (v.b = 'Ali')))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(max_c < 9)",
+ "filesort": {
+ "sort_key": "t1_char.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1_char",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "((t1_char.a = 'b') and ((t1_char.b = 'Vika') or (t1_char.b = 'Ali')))"
+ }
+ }
+ }
+ }
+ }
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "t",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "(t.a = 'b')"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL"
+ }
+ }
+}
+# using several derived tables : pushing in all tables
+# extracted or formula : pushing into WHERE
+# conjunctive subformulas : pushing into HAVING
+# pushing equalities
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,v2,v3,t2 where
+((v1.a=v2.a) or (v1.a=t2.a)) and ((v3.b<50) or (v3.b=33))
+and (v1.max_c<500) and (v3.a=t2.a) and (v2.max_c>300);
+a b max_c avg_c a b max_c avg_c a b min_c a b c d
+6 20 315 279.3333 6 20 315 279.3333 7 11 708 7 13 312 406
+6 20 315 279.3333 6 20 315 279.3333 8 33 114 8 64 248 107
+6 20 315 279.3333 6 20 315 279.3333 6 20 214 6 20 315 279
+6 20 315 279.3333 6 20 315 279.3333 8 33 114 8 80 800 314
+6 20 315 279.3333 6 20 315 279.3333 6 20 214 6 23 303 909
+6 20 315 279.3333 8 33 404 213.6667 6 20 214 6 20 315 279
+6 20 315 279.3333 8 33 404 213.6667 6 20 214 6 23 303 909
+8 33 404 213.6667 6 20 315 279.3333 8 33 114 8 64 248 107
+8 33 404 213.6667 6 20 315 279.3333 8 33 114 8 80 800 314
+8 33 404 213.6667 8 33 404 213.6667 7 11 708 7 13 312 406
+8 33 404 213.6667 8 33 404 213.6667 8 33 114 8 64 248 107
+8 33 404 213.6667 8 33 404 213.6667 6 20 214 6 20 315 279
+8 33 404 213.6667 8 33 404 213.6667 8 33 114 8 80 800 314
+8 33 404 213.6667 8 33 404 213.6667 6 20 214 6 23 303 909
+select * from v1,v2,v3,t2 where
+((v1.a=v2.a) or (v1.a=t2.a)) and ((v3.b<50) or (v3.b=33))
+and (v1.max_c<500) and (v3.a=t2.a) and (v2.max_c>300);
+a b max_c avg_c a b max_c avg_c a b min_c a b c d
+6 20 315 279.3333 6 20 315 279.3333 7 11 708 7 13 312 406
+6 20 315 279.3333 6 20 315 279.3333 8 33 114 8 64 248 107
+6 20 315 279.3333 6 20 315 279.3333 6 20 214 6 20 315 279
+6 20 315 279.3333 6 20 315 279.3333 8 33 114 8 80 800 314
+6 20 315 279.3333 6 20 315 279.3333 6 20 214 6 23 303 909
+6 20 315 279.3333 8 33 404 213.6667 6 20 214 6 20 315 279
+6 20 315 279.3333 8 33 404 213.6667 6 20 214 6 23 303 909
+8 33 404 213.6667 6 20 315 279.3333 8 33 114 8 64 248 107
+8 33 404 213.6667 6 20 315 279.3333 8 33 114 8 80 800 314
+8 33 404 213.6667 8 33 404 213.6667 7 11 708 7 13 312 406
+8 33 404 213.6667 8 33 404 213.6667 8 33 114 8 64 248 107
+8 33 404 213.6667 8 33 404 213.6667 6 20 214 6 20 315 279
+8 33 404 213.6667 8 33 404 213.6667 8 33 114 8 80 800 314
+8 33 404 213.6667 8 33 404 213.6667 6 20 214 6 23 303 909
+explain select * from v1,v2,v3,t2 where
+((v1.a=v2.a) or (v1.a=t2.a)) and ((v3.b<50) or (v3.b=33))
+and (v1.max_c<500) and (v3.a=t2.a) and (v2.max_c>300);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived4> ref key0 key0 5 test.t2.a 2 Using where
+1 PRIMARY <derived3> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (incremental, BNL join)
+4 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort
+explain format=json select * from v1,v2,v3,t2 where
+((v1.a=v2.a) or (v1.a=t2.a)) and ((v3.b<50) or (v3.b=33))
+and (v1.max_c<500) and (v3.a=t2.a) and (v2.max_c>300);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "(t2.a is not null)"
+ },
+ "table": {
+ "table_name": "<derived4>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t2.a"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "((v3.b < 50) or (v3.b = 33))",
+ "materialized": {
+ "query_block": {
+ "select_id": 4,
+ "having_condition": "(min_c > 109)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a < 10) and ((t1.b < 50) or (t1.b = 33)))"
+ }
+ }
+ }
+ }
+ }
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(v2.max_c > 300)"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "((max_c < 707) and (max_c > 300))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.a > 5)"
+ }
+ }
+ }
+ }
+ }
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(v1.max_c < 500)"
+ },
+ "buffer_type": "incremental",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "((v1.a = v2.a) or (v1.a = t2.a))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((max_c < 707) and (max_c < 500))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# using several derived tables : pushing in all tables
+# conjunctive subformulas : pushing into HAVING
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from
+(select a, b, max(c) as max_c, avg(c) as avg_c from t1
+where t1.a>5 group by a,b having max_c < 707) v1,
+(select a, b, min(c) as min_c from t1
+where t1.a>5 group by a,b having min_c < 707) v2,
+t2 where (v1.a=v2.a) and (v1.b=t2.b) and (v1.max_c>130) and (v2.min_c<130);
+a b max_c avg_c a b min_c a b c d
+select * from
+(select a, b, max(c) as max_c, avg(c) as avg_c from t1
+where t1.a>5 group by a,b having max_c < 707) v1,
+(select a, b, min(c) as min_c from t1
+where t1.a>5 group by a,b having min_c < 707) v2,
+t2 where (v1.a=v2.a) and (v1.b=t2.b) and (v1.max_c>130) and (v2.min_c<130);
+a b max_c avg_c a b min_c a b c d
+explain select * from
+(select a, b, max(c) as max_c, avg(c) as avg_c from t1
+where t1.a>5 group by a,b having max_c < 707) v1,
+(select a, b, min(c) as min_c from t1
+where t1.a>5 group by a,b having min_c < 707) v2,
+t2 where (v1.a=v2.a) and (v1.b=t2.b) and (v1.max_c>130) and (v2.min_c<130);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key1 key1 5 test.t2.b 2 Using where
+1 PRIMARY <derived3> ref key0 key0 5 v1.a 2 Using where
+3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from
+(select a, b, max(c) as max_c, avg(c) as avg_c from t1
+where t1.a>5 group by a,b having max_c < 707) v1,
+(select a, b, min(c) as min_c from t1
+where t1.a>5 group by a,b having min_c < 707) v2,
+t2 where (v1.a=v2.a) and (v1.b=t2.b) and (v1.max_c>130) and (v2.min_c<130);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "(t2.b is not null)"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key1"],
+ "key": "key1",
+ "key_length": "5",
+ "used_key_parts": ["b"],
+ "ref": ["test.t2.b"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "((v1.max_c > 130) and (v1.a is not null))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((max_c < 707) and (max_c > 130))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.a > 5)"
+ }
+ }
+ }
+ }
+ }
+ },
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["v1.a"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "(v2.min_c < 130)",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "((min_c < 707) and (min_c < 130))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.a > 5)"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# using several derived tables : pushing in all tables
+# extracted or formulas : pushing into HAVING
+# conjunctive subformula : pushing into HAVING
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from
+(select a, b, max(c) as max_c, avg(c) as avg_c from t1
+where t1.a>5 group by a,b having max_c < 707) v1,
+(select a, b, min(c) as min_c from t1
+where t1.a>5 group by a,b having min_c < 707) v2,
+(select a, b, avg(c) as avg_c from t1
+where t1.a<8 group by a,b) v3,
+t2 where (v1.a=v2.a) and (v1.b=v3.b) and ((v3.avg_c>170) or (v3.a<5))
+and ((v1.avg_c<400) or (v1.a>1)) and (v2.min_c<200);
+a b max_c avg_c a b min_c a b avg_c a b c d
+8 33 404 213.6667 8 33 114 1 33 497.5000 2 3 207 207
+8 33 404 213.6667 8 33 114 1 33 497.5000 1 21 909 12
+8 33 404 213.6667 8 33 114 1 33 497.5000 7 13 312 406
+8 33 404 213.6667 8 33 114 1 33 497.5000 8 64 248 107
+8 33 404 213.6667 8 33 114 1 33 497.5000 6 20 315 279
+8 33 404 213.6667 8 33 114 1 33 497.5000 1 19 203 107
+8 33 404 213.6667 8 33 114 1 33 497.5000 8 80 800 314
+8 33 404 213.6667 8 33 114 1 33 497.5000 3 12 231 190
+8 33 404 213.6667 8 33 114 1 33 497.5000 6 23 303 909
+select * from
+(select a, b, max(c) as max_c, avg(c) as avg_c from t1
+where t1.a>5 group by a,b having max_c < 707) v1,
+(select a, b, min(c) as min_c from t1
+where t1.a>5 group by a,b having min_c < 707) v2,
+(select a, b, avg(c) as avg_c from t1
+where t1.a<8 group by a,b) v3,
+t2 where (v1.a=v2.a) and (v1.b=v3.b) and ((v3.avg_c>170) or (v3.a<5))
+and ((v1.avg_c<400) or (v1.a>1)) and (v2.min_c<200);
+a b max_c avg_c a b min_c a b avg_c a b c d
+8 33 404 213.6667 8 33 114 1 33 497.5000 2 3 207 207
+8 33 404 213.6667 8 33 114 1 33 497.5000 1 21 909 12
+8 33 404 213.6667 8 33 114 1 33 497.5000 7 13 312 406
+8 33 404 213.6667 8 33 114 1 33 497.5000 8 64 248 107
+8 33 404 213.6667 8 33 114 1 33 497.5000 6 20 315 279
+8 33 404 213.6667 8 33 114 1 33 497.5000 1 19 203 107
+8 33 404 213.6667 8 33 114 1 33 497.5000 8 80 800 314
+8 33 404 213.6667 8 33 114 1 33 497.5000 3 12 231 190
+8 33 404 213.6667 8 33 114 1 33 497.5000 6 23 303 909
+explain select * from
+(select a, b, max(c) as max_c, avg(c) as avg_c from t1
+where t1.a>5 group by a,b having max_c < 707) v1,
+(select a, b, min(c) as min_c from t1
+where t1.a>5 group by a,b having min_c < 707) v2,
+(select a, b, avg(c) as avg_c from t1
+where t1.a<8 group by a,b) v3,
+t2 where (v1.a=v2.a) and (v1.b=v3.b) and ((v3.avg_c>170) or (v3.a<5))
+and ((v1.avg_c<400) or (v1.a>1)) and (v2.min_c<200);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY <derived3> ref key0 key0 5 v1.a 2 Using where
+1 PRIMARY <derived4> ref key0 key0 5 v1.b 2 Using where
+4 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from
+(select a, b, max(c) as max_c, avg(c) as avg_c from t1
+where t1.a>5 group by a,b having max_c < 707) v1,
+(select a, b, min(c) as min_c from t1
+where t1.a>5 group by a,b having min_c < 707) v2,
+(select a, b, avg(c) as avg_c from t1
+where t1.a<8 group by a,b) v3,
+t2 where (v1.a=v2.a) and (v1.b=v3.b) and ((v3.avg_c>170) or (v3.a<5))
+and ((v1.avg_c<400) or (v1.a>1)) and (v2.min_c<200);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v1.avg_c < 400) or (v1.a > 1))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "(((v1.avg_c < 400) or (v1.a > 1)) and (v1.a is not null) and (v1.b is not null))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((max_c < 707) and ((avg_c < 400) or (t1.a > 1)))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.a > 5)"
+ }
+ }
+ }
+ }
+ }
+ },
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["v1.a"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "(v2.min_c < 200)",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "((min_c < 707) and (min_c < 200))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.a > 5)"
+ }
+ }
+ }
+ }
+ }
+ },
+ "table": {
+ "table_name": "<derived4>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["b"],
+ "ref": ["v1.b"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "((v3.avg_c > 170) or (v3.a < 5))",
+ "materialized": {
+ "query_block": {
+ "select_id": 4,
+ "having_condition": "((avg_c > 170) or (t1.a < 5))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.a < 8)"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# extracted or formula : pushing into HAVING
+# conjunctive subformula : pushing into WHERE
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from
+(select a, b, max(c) as max_c, avg(c) as avg_c from t1
+group by a,b having max_c < 707) v1,
+t2 where ((v1.a=1) or (v1.max_c<300)) and (v1.b>25);
+a b max_c avg_c a b c d
+5 27 132 132.0000 2 3 207 207
+5 27 132 132.0000 1 21 909 12
+5 27 132 132.0000 7 13 312 406
+5 27 132 132.0000 8 64 248 107
+5 27 132 132.0000 6 20 315 279
+5 27 132 132.0000 1 19 203 107
+5 27 132 132.0000 8 80 800 314
+5 27 132 132.0000 3 12 231 190
+5 27 132 132.0000 6 23 303 909
+select * from
+(select a, b, max(c) as max_c, avg(c) as avg_c from t1
+group by a,b having max_c < 707) v1,
+t2 where ((v1.a=1) or (v1.max_c<300)) and (v1.b>25);
+a b max_c avg_c a b c d
+5 27 132 132.0000 2 3 207 207
+5 27 132 132.0000 1 21 909 12
+5 27 132 132.0000 7 13 312 406
+5 27 132 132.0000 8 64 248 107
+5 27 132 132.0000 6 20 315 279
+5 27 132 132.0000 1 19 203 107
+5 27 132 132.0000 8 80 800 314
+5 27 132 132.0000 3 12 231 190
+5 27 132 132.0000 6 23 303 909
+explain select * from
+(select a, b, max(c) as max_c, avg(c) as avg_c from t1
+group by a,b having max_c < 707) v1,
+t2 where ((v1.a=1) or (v1.max_c<300)) and (v1.b>25);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from
+(select a, b, max(c) as max_c, avg(c) as avg_c from t1
+group by a,b having max_c < 707) v1,
+t2 where ((v1.a=1) or (v1.max_c<300)) and (v1.b>25);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(((v1.a = 1) or (v1.max_c < 300)) and (v1.b > 25))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "((v1.a = 1) or (v1.max_c < 300))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((max_c < 707) and ((t1.a = 1) or (max_c < 300)))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.b > 25)"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# extracted and formula : pushing into WHERE
+# conjunctive subformula : pushing into HAVING
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from
+(select a, b, max(c) as max_c, avg(c) as avg_c from t1
+where t1.a>5 group by a,b having max_c < 707) v1,
+t2 where (v1.a=t2.a) and (v1.max_c>300) and (v1.b<30);
+a b max_c avg_c a b c d
+6 20 315 279.3333 6 20 315 279
+6 20 315 279.3333 6 23 303 909
+select * from
+(select a, b, max(c) as max_c, avg(c) as avg_c from t1
+where t1.a>5 group by a,b having max_c < 707) v1,
+t2 where (v1.a=t2.a) and (v1.max_c>300) and (v1.b<30);
+a b max_c avg_c a b c d
+6 20 315 279.3333 6 20 315 279
+6 20 315 279.3333 6 23 303 909
+explain select * from
+(select a, b, max(c) as max_c, avg(c) as avg_c from t1
+where t1.a>5 group by a,b having max_c < 707) v1,
+t2 where (v1.a=t2.a) and (v1.max_c>300) and (v1.b<30);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key0 key0 5 test.t2.a 2 Using where
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from
+(select a, b, max(c) as max_c, avg(c) as avg_c from t1
+where t1.a>5 group by a,b having max_c < 707) v1,
+t2 where (v1.a=t2.a) and (v1.max_c>300) and (v1.b<30);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "(t2.a is not null)"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t2.a"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "((v1.max_c > 300) and (v1.b < 30))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((max_c < 707) and (max_c > 300))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a > 5) and (t1.b < 30))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# using query with union
+# conjunctive subformula : pushing into WHERE
+# conjunctive subformulas : pushing into HAVING and WHERE
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where (v1.a<5) and (v1.b=t2.b) and (t2.c>800)
+union
+select * from v1,t2 where (v1.max_c>100) and (v1.a>7) and (t2.d>800);
+a b max_c avg_c a b c d
+1 21 500 234.6000 1 21 909 12
+8 33 404 213.6667 6 23 303 909
+select * from v1,t2 where (v1.a<5) and (v1.b=t2.b) and (t2.c>800)
+union
+select * from v1,t2 where (v1.max_c>100) and (v1.a>7) and (t2.d>800);
+a b max_c avg_c a b c d
+1 21 500 234.6000 1 21 909 12
+8 33 404 213.6667 6 23 303 909
+explain select * from v1,t2 where (v1.a<5) and (v1.b=t2.b) and (t2.c>800)
+union
+select * from v1,t2 where (v1.max_c>100) and (v1.a>7) and (t2.d>800);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived3> ref key0 key0 5 test.t2.b 2 Using where
+3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+2 UNION t2 ALL NULL NULL NULL NULL 9 Using where
+2 UNION <derived4> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+4 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL
+explain format=json select * from v1,t2 where (v1.a<5) and (v1.b=t2.b) and (t2.c>800)
+union
+select * from v1,t2 where (v1.max_c>100) and (v1.a>7) and (t2.d>800);
+EXPLAIN
+{
+ "query_block": {
+ "union_result": {
+ "table_name": "<union1,2>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "((t2.c > 800) and (t2.b is not null))"
+ },
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["b"],
+ "ref": ["test.t2.b"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "(v1.a < 5)",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.a < 5)"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 2,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "(t2.d > 800)"
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived4>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v1.max_c > 100) and (v1.a > 7))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "materialized": {
+ "query_block": {
+ "select_id": 4,
+ "having_condition": "((max_c < 707) and (max_c > 100))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.a > 7)"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
+# using query with union
+# extracted and formula : pushing into WHERE
+# extracted or formula : pushing into HAVING
+# pushing equalities
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where (v1.a<5) and (v1.b=t2.b) and (v1.b=19)
+union
+select * from v1,t2 where ((v1.max_c>400) or (v1.avg_c>270)) and (v1.a<t2.a);
+a b max_c avg_c a b c d
+1 19 107 107.0000 1 19 203 107
+1 21 500 234.6000 2 3 207 207
+1 21 500 234.6000 7 13 312 406
+1 21 500 234.6000 8 64 248 107
+1 21 500 234.6000 6 20 315 279
+1 21 500 234.6000 8 80 800 314
+1 21 500 234.6000 3 12 231 190
+1 21 500 234.6000 6 23 303 909
+6 20 315 279.3333 7 13 312 406
+6 20 315 279.3333 8 64 248 107
+6 20 315 279.3333 8 80 800 314
+select * from v1,t2 where (v1.a<5) and (v1.b=t2.b) and (v1.b=19)
+union
+select * from v1,t2 where ((v1.max_c>400) or (v1.avg_c>270)) and (v1.a<t2.a);
+a b max_c avg_c a b c d
+1 19 107 107.0000 1 19 203 107
+1 21 500 234.6000 2 3 207 207
+1 21 500 234.6000 7 13 312 406
+1 21 500 234.6000 8 64 248 107
+1 21 500 234.6000 6 20 315 279
+1 21 500 234.6000 8 80 800 314
+1 21 500 234.6000 3 12 231 190
+1 21 500 234.6000 6 23 303 909
+6 20 315 279.3333 7 13 312 406
+6 20 315 279.3333 8 64 248 107
+6 20 315 279.3333 8 80 800 314
+explain select * from v1,t2 where (v1.a<5) and (v1.b=t2.b) and (v1.b=19)
+union
+select * from v1,t2 where ((v1.max_c>400) or (v1.avg_c>270)) and (v1.a<t2.a);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived3> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+2 UNION t2 ALL NULL NULL NULL NULL 9
+2 UNION <derived4> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+4 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort
+NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL
+explain format=json select * from v1,t2 where (v1.a<5) and (v1.b=t2.b) and (v1.b=19)
+union
+select * from v1,t2 where ((v1.max_c>400) or (v1.avg_c>270)) and (v1.a<t2.a);
+EXPLAIN
+{
+ "query_block": {
+ "union_result": {
+ "table_name": "<union1,2>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "(t2.b = 19)"
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v1.b = 19) and (v1.a < 5))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.b = 19) and (t1.a < 5))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 2,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived4>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v1.max_c > 400) or (v1.avg_c > 270))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "(((v1.max_c > 400) or (v1.avg_c > 270)) and (v1.a < t2.a))",
+ "materialized": {
+ "query_block": {
+ "select_id": 4,
+ "having_condition": "((max_c < 707) and ((max_c > 400) or (avg_c > 270)))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
+# using query with union
+# extracted or formula : pushing into HAVING
+# extracted or formula : pushing into WHERE
+# pushing equalities
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where
+((t2.a=v1.a) or (v1.b=t2.b)) and ((v1.a=1) or (v1.a=6))
+union
+select * from v1,t2 where ((v1.a>3) and (v1.b>27)) or (v1.max_c>550);
+a b max_c avg_c a b c d
+1 19 107 107.0000 1 21 909 12
+1 19 107 107.0000 1 19 203 107
+1 21 500 234.6000 1 21 909 12
+1 21 500 234.6000 1 19 203 107
+6 20 315 279.3333 6 20 315 279
+6 20 315 279.3333 6 23 303 909
+8 33 404 213.6667 2 3 207 207
+8 33 404 213.6667 1 21 909 12
+8 33 404 213.6667 7 13 312 406
+8 33 404 213.6667 8 64 248 107
+8 33 404 213.6667 6 20 315 279
+8 33 404 213.6667 1 19 203 107
+8 33 404 213.6667 8 80 800 314
+8 33 404 213.6667 3 12 231 190
+8 33 404 213.6667 6 23 303 909
+select * from v1,t2 where
+((t2.a=v1.a) or (v1.b=t2.b)) and ((v1.a=1) or (v1.a=6))
+union
+select * from v1,t2 where ((v1.a>3) and (v1.b>27)) or (v1.max_c>550);
+a b max_c avg_c a b c d
+1 19 107 107.0000 1 21 909 12
+1 19 107 107.0000 1 19 203 107
+1 21 500 234.6000 1 21 909 12
+1 21 500 234.6000 1 19 203 107
+6 20 315 279.3333 6 20 315 279
+6 20 315 279.3333 6 23 303 909
+8 33 404 213.6667 2 3 207 207
+8 33 404 213.6667 1 21 909 12
+8 33 404 213.6667 7 13 312 406
+8 33 404 213.6667 8 64 248 107
+8 33 404 213.6667 6 20 315 279
+8 33 404 213.6667 1 19 203 107
+8 33 404 213.6667 8 80 800 314
+8 33 404 213.6667 3 12 231 190
+8 33 404 213.6667 6 23 303 909
+explain select * from v1,t2 where
+((t2.a=v1.a) or (v1.b=t2.b)) and ((v1.a=1) or (v1.a=6))
+union
+select * from v1,t2 where ((v1.a>3) and (v1.b>27)) or (v1.max_c>550);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9
+1 PRIMARY <derived3> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+2 UNION t2 ALL NULL NULL NULL NULL 9
+2 UNION <derived4> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+4 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort
+NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL
+explain format=json select * from v1,t2 where
+((t2.a=v1.a) or (v1.b=t2.b)) and ((v1.a=1) or (v1.a=6))
+union
+select * from v1,t2 where ((v1.a>3) and (v1.b>27)) or (v1.max_c>550);
+EXPLAIN
+{
+ "query_block": {
+ "union_result": {
+ "table_name": "<union1,2>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v1.a = 1) or (v1.a = 6))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "(((v1.a = t2.a) or (v1.b = t2.b)) and ((v1.a = 1) or (v1.a = 6)))",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a = 1) or (t1.a = 6))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 2,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived4>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(((v1.a > 3) and (v1.b > 27)) or (v1.max_c > 550))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "(((v1.a > 3) and (v1.b > 27)) or (v1.max_c > 550))",
+ "materialized": {
+ "query_block": {
+ "select_id": 4,
+ "having_condition": "((max_c < 707) and (((t1.a > 3) and (t1.b > 27)) or (max_c > 550)))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
+# using query with union
+# extracted or formula : pushing into HAVING
+# conjunctive subformulas : pushing into WHERE
+# pushing equalities
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v1,t2 where
+((v1.a=1) and (v1.a=t2.a)) and ((v1.max_c<500) or (v1.avg_c>500))
+union
+select * from v2,t2 where
+((v2.a<t2.b) or (v2.max_c>200)) and (v2.b>10) and (t2.a<2)
+union
+select * from v2,t2 where
+(v2.max_c=t2.c) and (v2.b<10);
+a b max_c avg_c a b c d
+1 19 107 107.0000 1 21 909 12
+1 19 107 107.0000 1 19 203 107
+6 20 315 279.3333 1 21 909 12
+6 20 315 279.3333 1 19 203 107
+8 33 404 213.6667 1 21 909 12
+8 33 404 213.6667 1 19 203 107
+select * from v1,t2 where
+((v1.a=1) and (v1.a=t2.a)) and ((v1.max_c<500) or (v1.avg_c>500))
+union
+select * from v2,t2 where
+((v2.a<t2.b) or (v2.max_c>200)) and (v2.b>10) and (t2.a<2)
+union
+select * from v2,t2 where
+(v2.max_c=t2.c) and (v2.b<10);
+a b max_c avg_c a b c d
+1 19 107 107.0000 1 21 909 12
+1 19 107 107.0000 1 19 203 107
+6 20 315 279.3333 1 21 909 12
+6 20 315 279.3333 1 19 203 107
+8 33 404 213.6667 1 21 909 12
+8 33 404 213.6667 1 19 203 107
+explain select * from v1,t2 where
+((v1.a=1) and (v1.a=t2.a)) and ((v1.max_c<500) or (v1.avg_c>500))
+union
+select * from v2,t2 where
+((v2.a<t2.b) or (v2.max_c>200)) and (v2.b>10) and (t2.a<2)
+union
+select * from v2,t2 where
+(v2.max_c=t2.c) and (v2.b<10);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived4> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+4 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+2 UNION t2 ALL NULL NULL NULL NULL 9 Using where
+2 UNION <derived5> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+5 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+3 UNION t2 ALL NULL NULL NULL NULL 9 Using where
+3 UNION <derived6> ref key0 key0 5 test.t2.c 2 Using where
+6 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+NULL UNION RESULT <union1,2,3> ALL NULL NULL NULL NULL NULL
+explain format=json select * from v1,t2 where
+((v1.a=1) and (v1.a=t2.a)) and ((v1.max_c<500) or (v1.avg_c>500))
+union
+select * from v2,t2 where
+((v2.a<t2.b) or (v2.max_c>200)) and (v2.b>10) and (t2.a<2)
+union
+select * from v2,t2 where
+(v2.max_c=t2.c) and (v2.b<10);
+EXPLAIN
+{
+ "query_block": {
+ "union_result": {
+ "table_name": "<union1,2,3>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "(t2.a = 1)"
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived4>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v1.a = 1) and ((v1.max_c < 500) or (v1.avg_c > 500)))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "((v1.max_c < 500) or (v1.avg_c > 500))",
+ "materialized": {
+ "query_block": {
+ "select_id": 4,
+ "having_condition": "((max_c < 707) and ((max_c < 500) or (avg_c > 500)))",
+ "filesort": {
+ "sort_key": "t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.a = 1)"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 2,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "(t2.a < 2)"
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived5>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(v2.b > 10)"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "((v2.a < t2.b) or (v2.max_c > 200))",
+ "materialized": {
+ "query_block": {
+ "select_id": 5,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a > 5) and (t1.b > 10))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 3,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "(t2.c is not null)"
+ },
+ "table": {
+ "table_name": "<derived6>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["max_c"],
+ "ref": ["test.t2.c"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "(v2.b < 10)",
+ "materialized": {
+ "query_block": {
+ "select_id": 6,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a > 5) and (t1.b < 10))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+}
+# using derived table with union
+# conjunctive subformulas : pushing into WHERE and HAVING
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v_union,t2 where (v_union.a<3) and (v_union.c>100);
+a b c a b c d
+1 19 107 2 3 207 207
+1 19 107 1 21 909 12
+1 19 107 7 13 312 406
+1 19 107 8 64 248 107
+1 19 107 6 20 315 279
+1 19 107 1 19 203 107
+1 19 107 8 80 800 314
+1 19 107 3 12 231 190
+1 19 107 6 23 303 909
+select * from v_union,t2 where (v_union.a<3) and (v_union.c>100);
+a b c a b c d
+1 19 107 2 3 207 207
+1 19 107 1 21 909 12
+1 19 107 7 13 312 406
+1 19 107 8 64 248 107
+1 19 107 6 20 315 279
+1 19 107 1 19 203 107
+1 19 107 8 80 800 314
+1 19 107 3 12 231 190
+1 19 107 6 23 303 909
+explain select * from v_union,t2 where (v_union.a<3) and (v_union.c>100);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 40 Using where; Using join buffer (flat, BNL join)
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+3 UNION t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
+explain format=json select * from v_union,t2 where (v_union.a<3) and (v_union.c>100);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 40,
+ "filtered": 100,
+ "attached_condition": "((v_union.a < 3) and (v_union.c > 100))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "materialized": {
+ "query_block": {
+ "union_result": {
+ "table_name": "<union2,3>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((c > 109) and (c > 100))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a < 10) and (t1.a < 3))"
+ }
+ }
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "((c < 300) and (c > 100))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.b > 10) and (t1.a < 3))"
+ }
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
+# using derived table with union
+# conjunctive subformula : pushing into WHERE
+# extracted or formula : pushing into HAVING
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v_union,t2 where
+((v_union.a<2) or (v_union.c>800)) and (v_union.b>12);
+a b c a b c d
+1 19 107 2 3 207 207
+1 19 107 1 21 909 12
+1 19 107 7 13 312 406
+1 19 107 8 64 248 107
+1 19 107 6 20 315 279
+1 19 107 1 19 203 107
+1 19 107 8 80 800 314
+1 19 107 3 12 231 190
+1 19 107 6 23 303 909
+select * from v_union,t2 where
+((v_union.a<2) or (v_union.c>800)) and (v_union.b>12);
+a b c a b c d
+1 19 107 2 3 207 207
+1 19 107 1 21 909 12
+1 19 107 7 13 312 406
+1 19 107 8 64 248 107
+1 19 107 6 20 315 279
+1 19 107 1 19 203 107
+1 19 107 8 80 800 314
+1 19 107 3 12 231 190
+1 19 107 6 23 303 909
+explain select * from v_union,t2 where
+((v_union.a<2) or (v_union.c>800)) and (v_union.b>12);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 40 Using where; Using join buffer (flat, BNL join)
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+3 UNION t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
+explain format=json select * from v_union,t2 where
+((v_union.a<2) or (v_union.c>800)) and (v_union.b>12);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 40,
+ "filtered": 100,
+ "attached_condition": "(((v_union.a < 2) or (v_union.c > 800)) and (v_union.b > 12))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "((v_union.a < 2) or (v_union.c > 800))",
+ "materialized": {
+ "query_block": {
+ "union_result": {
+ "table_name": "<union2,3>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((c > 109) and ((t1.a < 2) or (c > 800)))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a < 10) and (t1.b > 12))"
+ }
+ }
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "((c < 300) and ((t1.a < 2) or (c > 800)))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.b > 10) and (t1.b > 12))"
+ }
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
+# using derived table with union
+# conjunctive subformula : pushing into HAVING
+# conjunctive subformula : pushing into WHERE
+# pushing equalities
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v_union,t2 where
+(v_union.a=1) and (v_union.a=t2.a) and (v_union.c<200);
+a b c a b c d
+1 19 107 1 21 909 12
+1 19 107 1 19 203 107
+select * from v_union,t2 where
+(v_union.a=1) and (v_union.a=t2.a) and (v_union.c<200);
+a b c a b c d
+1 19 107 1 21 909 12
+1 19 107 1 19 203 107
+explain select * from v_union,t2 where
+(v_union.a=1) and (v_union.a=t2.a) and (v_union.c<200);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 40 Using where; Using join buffer (flat, BNL join)
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+3 UNION t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
+explain format=json select * from v_union,t2 where
+(v_union.a=1) and (v_union.a=t2.a) and (v_union.c<200);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "(t2.a = 1)"
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 40,
+ "filtered": 100,
+ "attached_condition": "((v_union.a = 1) and (v_union.c < 200))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "materialized": {
+ "query_block": {
+ "union_result": {
+ "table_name": "<union2,3>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((c > 109) and (c < 200))",
+ "filesort": {
+ "sort_key": "t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.a = 1)"
+ }
+ }
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "((c < 300) and (c < 200))",
+ "filesort": {
+ "sort_key": "t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a = 1) and (t1.b > 10))"
+ }
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v_char as v,t2_char as t where
+(v.a=t.a) and (v.b='Vika') and (v.max_c>2);
+a b max_c a b c
+c Vika 7 c Vinny 3
+c Vika 7 c Inga 9
+c Vika 7 c Ivan 2
+c Vika 7 c Inga 2
+select * from v_char as v,t2_char as t where
+(v.a=t.a) and (v.b='Vika') and (v.max_c>2);
+a b max_c a b c
+c Vika 7 c Vinny 3
+c Vika 7 c Inga 9
+c Vika 7 c Ivan 2
+c Vika 7 c Inga 2
+explain select * from v_char as v,t2_char as t where
+(v.a=t.a) and (v.b='Vika') and (v.max_c>2);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t ALL NULL NULL NULL NULL 12 Using where
+1 PRIMARY <derived2> ref key0 key0 2 test.t.a 2 Using where
+2 DERIVED t1_char ALL NULL NULL NULL NULL 12 Using where; Using temporary; Using filesort
+explain format=json select * from v_char as v,t2_char as t where
+(v.a=t.a) and (v.b='Vika') and (v.max_c>2);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "(t.a is not null)"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "2",
+ "used_key_parts": ["a"],
+ "ref": ["test.t.a"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "((v.b = 'Vika') and (v.max_c > 2))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((max_c < 9) and (max_c > 2))",
+ "filesort": {
+ "sort_key": "t1_char.a",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1_char",
+ "access_type": "ALL",
+ "rows": 12,
+ "filtered": 100,
+ "attached_condition": "(t1_char.b = 'Vika')"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# using derived table with union
+# using several derived tables : pushing in all tables
+# conjunctive subformula : pushing into WHERE using equalities
+# pushing equalities
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v_union,v1,t2 where
+(v_union.a=v1.a) and (v1.a=t2.a) and (t2.a=1)
+and ((v_union.c>800) or (v1.max_c>200));
+a b c a b max_c avg_c a b c d
+1 19 107 1 21 500 234.6000 1 21 909 12
+1 19 107 1 21 500 234.6000 1 19 203 107
+select * from v_union,v1,t2 where
+(v_union.a=v1.a) and (v1.a=t2.a) and (t2.a=1)
+and ((v_union.c>800) or (v1.max_c>200));
+a b c a b max_c avg_c a b c d
+1 19 107 1 21 500 234.6000 1 21 909 12
+1 19 107 1 21 500 234.6000 1 19 203 107
+explain select * from v_union,v1,t2 where
+(v_union.a=v1.a) and (v1.a=t2.a) and (t2.a=1)
+and ((v_union.c>800) or (v1.max_c>200));
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived4> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 40 Using where; Using join buffer (incremental, BNL join)
+4 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+3 UNION t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
+explain format=json select * from v_union,v1,t2 where
+(v_union.a=v1.a) and (v1.a=t2.a) and (t2.a=1)
+and ((v_union.c>800) or (v1.max_c>200));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "(t2.a = 1)"
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived4>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(v1.a = 1)"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "materialized": {
+ "query_block": {
+ "select_id": 4,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.a = 1)"
+ }
+ }
+ }
+ }
+ }
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 40,
+ "filtered": 100,
+ "attached_condition": "(v_union.a = 1)"
+ },
+ "buffer_type": "incremental",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "((v_union.c > 800) or (v1.max_c > 200))",
+ "materialized": {
+ "query_block": {
+ "union_result": {
+ "table_name": "<union2,3>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(c > 109)",
+ "filesort": {
+ "sort_key": "t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.a = 1)"
+ }
+ }
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "(c < 300)",
+ "filesort": {
+ "sort_key": "t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a = 1) and (t1.b > 10))"
+ }
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
+# using derived table with union
+# extracted or formula : pushing into WHERE
+# conjunctive subformula : pushing into HAVING
+# pushing equalities
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v2_union as v,t2 where
+((v.a=6) or (v.a=8)) and (v.c>200) and (v.a=t2.a);
+a b c a b c d
+8 33 404.0000 8 64 248 107
+6 20 312.0000 6 20 315 279
+6 20 214.0000 6 20 315 279
+8 33 404.0000 8 80 800 314
+6 20 312.0000 6 23 303 909
+6 20 214.0000 6 23 303 909
+select * from v2_union as v,t2 where
+((v.a=6) or (v.a=8)) and (v.c>200) and (v.a=t2.a);
+a b c a b c d
+8 33 404.0000 8 64 248 107
+6 20 312.0000 6 20 315 279
+6 20 214.0000 6 20 315 279
+8 33 404.0000 8 80 800 314
+6 20 312.0000 6 23 303 909
+6 20 214.0000 6 23 303 909
+explain select * from v2_union as v,t2 where
+((v.a=6) or (v.a=8)) and (v.c>200) and (v.a=t2.a);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key0 key0 5 test.t2.a 6 Using where
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+3 UNION t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+4 UNION t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+NULL UNION RESULT <union2,3,4> ALL NULL NULL NULL NULL NULL
+explain format=json select * from v2_union as v,t2 where
+((v.a=6) or (v.a=8)) and (v.c>200) and (v.a=t2.a);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "(((t2.a = 6) or (t2.a = 8)) and (t2.a is not null))"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t2.a"],
+ "rows": 6,
+ "filtered": 100,
+ "attached_condition": "(v.c > 200)",
+ "materialized": {
+ "query_block": {
+ "union_result": {
+ "table_name": "<union2,3,4>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((c > 109) and (c > 200))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a < 10) and ((t1.a = 6) or (t1.a = 8)))"
+ }
+ }
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "((c < 300) and (c > 200))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.b > 10) and ((t1.a = 6) or (t1.a = 8)))"
+ }
+ }
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 4,
+ "having_condition": "((c < 707) and (c > 200))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.c > 300) and ((t1.a = 6) or (t1.a = 8)))"
+ }
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
+# using derived table with union of selects without aggregation
+# extracted conjunctive predicate: pushing in WHERE of both selects
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v3_union as v,t2 where (v.a=t2.a) and (v.c>6);
+a b c a b c d
+1 21 123 1 21 909 12
+1 21 101 1 21 909 12
+1 21 104 1 21 909 12
+1 33 988 1 21 909 12
+1 19 107 1 21 909 12
+1 21 500 1 21 909 12
+1 21 345 1 21 909 12
+7 11 708 7 13 312 406
+7 11 8 7 13 312 406
+8 33 404 8 64 248 107
+8 33 123 8 64 248 107
+8 33 114 8 64 248 107
+8 33 9 8 64 248 107
+6 20 214 6 20 315 279
+6 20 315 6 20 315 279
+6 20 309 6 20 315 279
+6 20 7 6 20 315 279
+1 21 123 1 19 203 107
+1 21 101 1 19 203 107
+1 21 104 1 19 203 107
+1 33 988 1 19 203 107
+1 19 107 1 19 203 107
+1 21 500 1 19 203 107
+1 21 345 1 19 203 107
+8 33 404 8 80 800 314
+8 33 123 8 80 800 314
+8 33 114 8 80 800 314
+8 33 9 8 80 800 314
+6 20 214 6 23 303 909
+6 20 315 6 23 303 909
+6 20 309 6 23 303 909
+6 20 7 6 23 303 909
+select * from v3_union as v,t2 where (v.a=t2.a) and (v.c>6);
+a b c a b c d
+1 21 123 1 21 909 12
+1 21 101 1 21 909 12
+1 21 104 1 21 909 12
+1 33 988 1 21 909 12
+1 19 107 1 21 909 12
+1 21 500 1 21 909 12
+1 21 345 1 21 909 12
+7 11 708 7 13 312 406
+7 11 8 7 13 312 406
+8 33 404 8 64 248 107
+8 33 123 8 64 248 107
+8 33 114 8 64 248 107
+8 33 9 8 64 248 107
+6 20 214 6 20 315 279
+6 20 315 6 20 315 279
+6 20 309 6 20 315 279
+6 20 7 6 20 315 279
+1 21 123 1 19 203 107
+1 21 101 1 19 203 107
+1 21 104 1 19 203 107
+1 33 988 1 19 203 107
+1 19 107 1 19 203 107
+1 21 500 1 19 203 107
+1 21 345 1 19 203 107
+8 33 404 8 80 800 314
+8 33 123 8 80 800 314
+8 33 114 8 80 800 314
+8 33 9 8 80 800 314
+6 20 214 6 23 303 909
+6 20 315 6 23 303 909
+6 20 309 6 23 303 909
+6 20 7 6 23 303 909
+explain select * from v3_union as v,t2 where (v.a=t2.a) and (v.c>6);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key0 key0 5 test.t2.a 4 Using where
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where
+3 UNION t1 ALL NULL NULL NULL NULL 20 Using where
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
+explain format=json select * from v3_union as v,t2 where (v.a=t2.a) and (v.c>6);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "(t2.a is not null)"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t2.a"],
+ "rows": 4,
+ "filtered": 100,
+ "attached_condition": "(v.c > 6)",
+ "materialized": {
+ "query_block": {
+ "union_result": {
+ "table_name": "<union2,3>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 2,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a < 10) and ((t1.a + 1) > 6))"
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 3,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.b > 10) and (t1.c > 100) and (t1.c > 6))"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
+# using derived table with union of selects without aggregation
+# extracted conjunctive OR subformula: pushing in WHERE using equalities
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v3_union as v,t2 where (v.a=t2.a) and ((t2.a>1) or (v.b<20));
+a b c a b c d
+1 19 107 1 21 909 12
+1 19 2 1 21 909 12
+7 11 708 7 13 312 406
+7 11 8 7 13 312 406
+8 33 404 8 64 248 107
+8 33 123 8 64 248 107
+8 33 114 8 64 248 107
+8 33 9 8 64 248 107
+6 20 214 6 20 315 279
+6 20 315 6 20 315 279
+6 20 309 6 20 315 279
+6 20 7 6 20 315 279
+1 19 107 1 19 203 107
+1 19 2 1 19 203 107
+8 33 404 8 80 800 314
+8 33 123 8 80 800 314
+8 33 114 8 80 800 314
+8 33 9 8 80 800 314
+6 20 214 6 23 303 909
+6 20 315 6 23 303 909
+6 20 309 6 23 303 909
+6 20 7 6 23 303 909
+select * from v3_union as v,t2 where (v.a=t2.a) and ((t2.a>1) or (v.b<20));
+a b c a b c d
+1 19 107 1 21 909 12
+1 19 2 1 21 909 12
+7 11 708 7 13 312 406
+7 11 8 7 13 312 406
+8 33 404 8 64 248 107
+8 33 123 8 64 248 107
+8 33 114 8 64 248 107
+8 33 9 8 64 248 107
+6 20 214 6 20 315 279
+6 20 315 6 20 315 279
+6 20 309 6 20 315 279
+6 20 7 6 20 315 279
+1 19 107 1 19 203 107
+1 19 2 1 19 203 107
+8 33 404 8 80 800 314
+8 33 123 8 80 800 314
+8 33 114 8 80 800 314
+8 33 9 8 80 800 314
+6 20 214 6 23 303 909
+6 20 315 6 23 303 909
+6 20 309 6 23 303 909
+6 20 7 6 23 303 909
+explain select * from v3_union as v,t2 where (v.a=t2.a) and ((t2.a>1) or (v.b<20));
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key0 key0 5 test.t2.a 4 Using where
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where
+3 UNION t1 ALL NULL NULL NULL NULL 20 Using where
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
+explain format=json select * from v3_union as v,t2 where (v.a=t2.a) and ((t2.a>1) or (v.b<20));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "(t2.a is not null)"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t2.a"],
+ "rows": 4,
+ "filtered": 100,
+ "attached_condition": "((t2.a > 1) or (v.b < 20))",
+ "materialized": {
+ "query_block": {
+ "union_result": {
+ "table_name": "<union2,3>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 2,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a < 10) and ((t1.a > 1) or (t1.b < 20)))"
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 3,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.b > 10) and (t1.c > 100) and ((t1.a > 1) or (t1.b < 20)))"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
+# using derived table with union of selects without aggregation
+# extracted the whole condition: in WHERE of both selects
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v3_union as v,t2 where
+(v.a=t2.a) and ((v.b=19) or (v.b=21)) and ((v.c<3) or (v.c>600));
+a b c a b c d
+1 19 2 1 21 909 12
+1 21 2 1 21 909 12
+1 19 2 1 19 203 107
+1 21 2 1 19 203 107
+select * from v3_union as v,t2 where
+(v.a=t2.a) and ((v.b=19) or (v.b=21)) and ((v.c<3) or (v.c>600));
+a b c a b c d
+1 19 2 1 21 909 12
+1 21 2 1 21 909 12
+1 19 2 1 19 203 107
+1 21 2 1 19 203 107
+explain select * from v3_union as v,t2 where
+(v.a=t2.a) and ((v.b=19) or (v.b=21)) and ((v.c<3) or (v.c>600));
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key0 key0 5 test.t2.a 4 Using where
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where
+3 UNION t1 ALL NULL NULL NULL NULL 20 Using where
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
+explain format=json select * from v3_union as v,t2 where
+(v.a=t2.a) and ((v.b=19) or (v.b=21)) and ((v.c<3) or (v.c>600));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "(t2.a is not null)"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t2.a"],
+ "rows": 4,
+ "filtered": 100,
+ "attached_condition": "(((v.b = 19) or (v.b = 21)) and ((v.c < 3) or (v.c > 600)))",
+ "materialized": {
+ "query_block": {
+ "union_result": {
+ "table_name": "<union2,3>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 2,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a < 10) and ((t1.b = 19) or (t1.b = 21)) and (((t1.a + 1) < 3) or ((t1.a + 1) > 600)))"
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 3,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.b > 10) and (t1.c > 100) and ((t1.b = 19) or (t1.b = 21)) and ((t1.c < 3) or (t1.c > 600)))"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
+# using derived table with union of
+# a select without aggregation and a select with aggregation
+# extracted conjunctive predicate: pushing in WHERE of both selects
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v4_union as v,t2 where (v.a=t2.a) and (v.b<20);
+a b c a b c d
+1 19 207 1 21 909 12
+7 11 808 7 13 312 406
+7 11 608 7 13 312 406
+1 19 207 1 19 203 107
+select * from v4_union as v,t2 where (v.a=t2.a) and (v.b<20);
+a b c a b c d
+1 19 207 1 21 909 12
+7 11 808 7 13 312 406
+7 11 608 7 13 312 406
+1 19 207 1 19 203 107
+explain select * from v4_union as v,t2 where (v.a=t2.a) and (v.b<20);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key0 key0 5 test.t2.a 4 Using where
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+3 UNION t1 ALL NULL NULL NULL NULL 20 Using where
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
+explain format=json select * from v4_union as v,t2 where (v.a=t2.a) and (v.b<20);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "(t2.a is not null)"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t2.a"],
+ "rows": 4,
+ "filtered": 100,
+ "attached_condition": "(v.b < 20)",
+ "materialized": {
+ "query_block": {
+ "union_result": {
+ "table_name": "<union2,3>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(c > 109)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a < 10) and (t1.b < 20))"
+ }
+ }
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 3,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.b > 10) and (t1.b < 20))"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
+# using derived table with union of
+# a select without aggregation and a select with aggregation
+# extracted subformula: pushing in WHERE of one select
+# extracted subformula: pushing in HAVING of the other select
+# extracted sub-subformula: pushing in WHERE of the other select
+# using an equality in all pushdowns
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v4_union as v,t2 where
+(v.a=t2.a) and ((t2.a<3) or (v.b<40)) and (v.c>500);
+a b c a b c d
+1 33 1088 1 21 909 12
+1 21 600 1 21 909 12
+1 33 888 1 21 909 12
+7 11 808 7 13 312 406
+7 11 608 7 13 312 406
+8 33 504 8 64 248 107
+1 33 1088 1 19 203 107
+1 21 600 1 19 203 107
+1 33 888 1 19 203 107
+8 33 504 8 80 800 314
+select * from v4_union as v,t2 where
+(v.a=t2.a) and ((t2.a<3) or (v.b<40)) and (v.c>500);
+a b c a b c d
+1 33 1088 1 21 909 12
+1 21 600 1 21 909 12
+1 33 888 1 21 909 12
+7 11 808 7 13 312 406
+7 11 608 7 13 312 406
+8 33 504 8 64 248 107
+1 33 1088 1 19 203 107
+1 21 600 1 19 203 107
+1 33 888 1 19 203 107
+8 33 504 8 80 800 314
+explain select * from v4_union as v,t2 where
+(v.a=t2.a) and ((t2.a<3) or (v.b<40)) and (v.c>500);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key0 key0 5 test.t2.a 4 Using where
+2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+3 UNION t1 ALL NULL NULL NULL NULL 20 Using where
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
+explain format=json select * from v4_union as v,t2 where
+(v.a=t2.a) and ((t2.a<3) or (v.b<40)) and (v.c>500);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "(t2.a is not null)"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t2.a"],
+ "rows": 4,
+ "filtered": 100,
+ "attached_condition": "(((t2.a < 3) or (v.b < 40)) and (v.c > 500))",
+ "materialized": {
+ "query_block": {
+ "union_result": {
+ "table_name": "<union2,3>",
+ "access_type": "ALL",
+ "query_specifications": [
+ {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "((c > 109) and (c > 500))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a < 10) and ((t1.a < 3) or (t1.b < 40)))"
+ }
+ }
+ }
+ }
+ },
+ {
+ "query_block": {
+ "select_id": 3,
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.b > 10) and ((t1.a < 3) or (t1.b < 40)) and ((t1.c + 100) > 500))"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+}
+# using embedded derived table : pushing the same conditions
+# using several derived tables : pushing in all tables
+# conjunctive subformula : pushing into WHERE
+# extracted and formula : pushing into WHERE
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v4,v1 where
+(v4.a<13) and (v1.a>5) and (v1.b>12);
+a b min_c a b max_c avg_c
+1 19 107 6 20 315 279.3333
+1 21 500 6 20 315 279.3333
+5 16 207 6 20 315 279.3333
+5 27 132 6 20 315 279.3333
+6 20 315 6 20 315 279.3333
+8 33 404 6 20 315 279.3333
+1 19 107 8 33 404 213.6667
+1 21 500 8 33 404 213.6667
+5 16 207 8 33 404 213.6667
+5 27 132 8 33 404 213.6667
+6 20 315 8 33 404 213.6667
+8 33 404 8 33 404 213.6667
+select * from v4,v1 where
+(v4.a<13) and (v1.a>5) and (v1.b>12);
+a b min_c a b max_c avg_c
+1 19 107 6 20 315 279.3333
+1 21 500 6 20 315 279.3333
+5 16 207 6 20 315 279.3333
+5 27 132 6 20 315 279.3333
+6 20 315 6 20 315 279.3333
+8 33 404 6 20 315 279.3333
+1 19 107 8 33 404 213.6667
+1 21 500 8 33 404 213.6667
+5 16 207 8 33 404 213.6667
+5 27 132 8 33 404 213.6667
+6 20 315 8 33 404 213.6667
+8 33 404 8 33 404 213.6667
+explain select * from v4,v1 where
+(v4.a<13) and (v1.a>5) and (v1.b>12);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where
+1 PRIMARY <derived4> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+4 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+2 DERIVED <derived3> ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from v4,v1 where
+(v4.a<13) and (v1.a>5) and (v1.b>12);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(v4.a < 13)",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "filesort": {
+ "sort_key": "v1.a, v1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v1.a < 15) and (v1.a < 13))",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a < 15) and (t1.a < 13))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived4>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v1.a > 5) and (v1.b > 12))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "materialized": {
+ "query_block": {
+ "select_id": 4,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a > 5) and (t1.b > 12))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# using embedded view : nothing to push
+# using several derived tables : pushing only in one table
+# conjunctive subformula : pushing into WHERE
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v4,v1,t2 where
+(v4.a=t2.a) and (v4.a=v1.a) and (v1.b>30);
+a b min_c a b max_c avg_c a b c d
+8 33 404 8 33 404 213.6667 8 64 248 107
+8 33 404 8 33 404 213.6667 8 80 800 314
+select * from v4,v1,t2 where
+(v4.a=t2.a) and (v4.a=v1.a) and (v1.b>30);
+a b min_c a b max_c avg_c a b c d
+8 33 404 8 33 404 213.6667 8 64 248 107
+8 33 404 8 33 404 213.6667 8 80 800 314
+explain select * from v4,v1,t2 where
+(v4.a=t2.a) and (v4.a=v1.a) and (v1.b>30);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key1 key1 5 test.t2.a 2
+1 PRIMARY <derived4> ref key0 key0 5 test.t2.a 2 Using where
+4 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+2 DERIVED <derived3> ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from v4,v1,t2 where
+(v4.a=t2.a) and (v4.a=v1.a) and (v1.b>30);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "((t2.a is not null) and (t2.a is not null))"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key1"],
+ "key": "key1",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t2.a"],
+ "rows": 2,
+ "filtered": 100,
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "filesort": {
+ "sort_key": "v1.a, v1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(v1.a < 15)",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.a < 15)"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "table": {
+ "table_name": "<derived4>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t2.a"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "(v1.b > 30)",
+ "materialized": {
+ "query_block": {
+ "select_id": 4,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.b > 30)"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# using embedded view : pushing different conditions
+# using several derived tables : pushing in all tables
+# conjunctive subformula : pushing into WHERE using equalities
+# extracted and formula : pushing into WHERE using equalities
+# conjunctive subformula : pushing into HAVING
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v4,v1,t2 where
+(v4.a=t2.a) and (v4.a>1) and (v4.a=v1.a) and (v4.min_c>100) and (v1.b<30);
+a b min_c a b max_c avg_c a b c d
+6 20 315 6 20 315 279.3333 6 20 315 279
+6 20 315 6 20 315 279.3333 6 23 303 909
+select * from v4,v1,t2 where
+(v4.a=t2.a) and (v4.a>1) and (v4.a=v1.a) and (v4.min_c>100) and (v1.b<30);
+a b min_c a b max_c avg_c a b c d
+6 20 315 6 20 315 279.3333 6 20 315 279
+6 20 315 6 20 315 279.3333 6 23 303 909
+explain select * from v4,v1,t2 where
+(v4.a=t2.a) and (v4.a>1) and (v4.a=v1.a) and (v4.min_c>100) and (v1.b<30);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key1 key1 5 test.t2.a 2 Using where
+1 PRIMARY <derived4> ref key0 key0 5 test.t2.a 2 Using where
+4 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+2 DERIVED <derived3> ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from v4,v1,t2 where
+(v4.a=t2.a) and (v4.a>1) and (v4.a=v1.a) and (v4.min_c>100) and (v1.b<30);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "((t2.a > 1) and (t2.a is not null) and (t2.a is not null))"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key1"],
+ "key": "key1",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t2.a"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "(v4.min_c > 100)",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(min_c > 100)",
+ "filesort": {
+ "sort_key": "v1.a, v1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v1.a < 15) and (v1.a > 1))",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a < 15) and (t1.a > 1))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "table": {
+ "table_name": "<derived4>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["test.t2.a"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "(v1.b < 30)",
+ "materialized": {
+ "query_block": {
+ "select_id": 4,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a > 1) and (t1.b < 30))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# using embedded view : pushing different conditions
+# using several derived tables : pushing in all tables
+# extracted or formula : pushing into WHERE
+# conjunctive subformula : pushing into HAVING
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v4,v1,t2 where
+(((v4.b>10) and (v4.a>1)) or (v4.b<20)) and (v1.max_c>200) and (v1.a=v4.a);
+a b min_c a b max_c avg_c a b c d
+1 19 107 1 21 500 234.6000 2 3 207 207
+1 19 107 1 21 500 234.6000 1 21 909 12
+1 19 107 1 21 500 234.6000 7 13 312 406
+1 19 107 1 21 500 234.6000 8 64 248 107
+1 19 107 1 21 500 234.6000 6 20 315 279
+1 19 107 1 21 500 234.6000 1 19 203 107
+1 19 107 1 21 500 234.6000 8 80 800 314
+1 19 107 1 21 500 234.6000 3 12 231 190
+1 19 107 1 21 500 234.6000 6 23 303 909
+5 16 207 5 16 207 207.0000 2 3 207 207
+5 16 207 5 16 207 207.0000 1 21 909 12
+5 16 207 5 16 207 207.0000 7 13 312 406
+5 16 207 5 16 207 207.0000 8 64 248 107
+5 16 207 5 16 207 207.0000 6 20 315 279
+5 16 207 5 16 207 207.0000 1 19 203 107
+5 16 207 5 16 207 207.0000 8 80 800 314
+5 16 207 5 16 207 207.0000 3 12 231 190
+5 16 207 5 16 207 207.0000 6 23 303 909
+5 27 132 5 16 207 207.0000 2 3 207 207
+5 27 132 5 16 207 207.0000 1 21 909 12
+5 27 132 5 16 207 207.0000 7 13 312 406
+5 27 132 5 16 207 207.0000 8 64 248 107
+5 27 132 5 16 207 207.0000 6 20 315 279
+5 27 132 5 16 207 207.0000 1 19 203 107
+5 27 132 5 16 207 207.0000 8 80 800 314
+5 27 132 5 16 207 207.0000 3 12 231 190
+5 27 132 5 16 207 207.0000 6 23 303 909
+6 20 315 6 20 315 279.3333 2 3 207 207
+6 20 315 6 20 315 279.3333 1 21 909 12
+6 20 315 6 20 315 279.3333 7 13 312 406
+6 20 315 6 20 315 279.3333 8 64 248 107
+6 20 315 6 20 315 279.3333 6 20 315 279
+6 20 315 6 20 315 279.3333 1 19 203 107
+6 20 315 6 20 315 279.3333 8 80 800 314
+6 20 315 6 20 315 279.3333 3 12 231 190
+6 20 315 6 20 315 279.3333 6 23 303 909
+8 33 404 8 33 404 213.6667 2 3 207 207
+8 33 404 8 33 404 213.6667 1 21 909 12
+8 33 404 8 33 404 213.6667 7 13 312 406
+8 33 404 8 33 404 213.6667 8 64 248 107
+8 33 404 8 33 404 213.6667 6 20 315 279
+8 33 404 8 33 404 213.6667 1 19 203 107
+8 33 404 8 33 404 213.6667 8 80 800 314
+8 33 404 8 33 404 213.6667 3 12 231 190
+8 33 404 8 33 404 213.6667 6 23 303 909
+select * from v4,v1,t2 where
+(((v4.b>10) and (v4.a>1)) or (v4.b<20)) and (v1.max_c>200) and (v1.a=v4.a);
+a b min_c a b max_c avg_c a b c d
+1 19 107 1 21 500 234.6000 2 3 207 207
+1 19 107 1 21 500 234.6000 1 21 909 12
+1 19 107 1 21 500 234.6000 7 13 312 406
+1 19 107 1 21 500 234.6000 8 64 248 107
+1 19 107 1 21 500 234.6000 6 20 315 279
+1 19 107 1 21 500 234.6000 1 19 203 107
+1 19 107 1 21 500 234.6000 8 80 800 314
+1 19 107 1 21 500 234.6000 3 12 231 190
+1 19 107 1 21 500 234.6000 6 23 303 909
+5 16 207 5 16 207 207.0000 2 3 207 207
+5 16 207 5 16 207 207.0000 1 21 909 12
+5 16 207 5 16 207 207.0000 7 13 312 406
+5 16 207 5 16 207 207.0000 8 64 248 107
+5 16 207 5 16 207 207.0000 6 20 315 279
+5 16 207 5 16 207 207.0000 1 19 203 107
+5 16 207 5 16 207 207.0000 8 80 800 314
+5 16 207 5 16 207 207.0000 3 12 231 190
+5 16 207 5 16 207 207.0000 6 23 303 909
+5 27 132 5 16 207 207.0000 2 3 207 207
+5 27 132 5 16 207 207.0000 1 21 909 12
+5 27 132 5 16 207 207.0000 7 13 312 406
+5 27 132 5 16 207 207.0000 8 64 248 107
+5 27 132 5 16 207 207.0000 6 20 315 279
+5 27 132 5 16 207 207.0000 1 19 203 107
+5 27 132 5 16 207 207.0000 8 80 800 314
+5 27 132 5 16 207 207.0000 3 12 231 190
+5 27 132 5 16 207 207.0000 6 23 303 909
+6 20 315 6 20 315 279.3333 2 3 207 207
+6 20 315 6 20 315 279.3333 1 21 909 12
+6 20 315 6 20 315 279.3333 7 13 312 406
+6 20 315 6 20 315 279.3333 8 64 248 107
+6 20 315 6 20 315 279.3333 6 20 315 279
+6 20 315 6 20 315 279.3333 1 19 203 107
+6 20 315 6 20 315 279.3333 8 80 800 314
+6 20 315 6 20 315 279.3333 3 12 231 190
+6 20 315 6 20 315 279.3333 6 23 303 909
+8 33 404 8 33 404 213.6667 2 3 207 207
+8 33 404 8 33 404 213.6667 1 21 909 12
+8 33 404 8 33 404 213.6667 7 13 312 406
+8 33 404 8 33 404 213.6667 8 64 248 107
+8 33 404 8 33 404 213.6667 6 20 315 279
+8 33 404 8 33 404 213.6667 1 19 203 107
+8 33 404 8 33 404 213.6667 8 80 800 314
+8 33 404 8 33 404 213.6667 3 12 231 190
+8 33 404 8 33 404 213.6667 6 23 303 909
+explain select * from v4,v1,t2 where
+(((v4.b>10) and (v4.a>1)) or (v4.b<20)) and (v1.max_c>200) and (v1.a=v4.a);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY <derived4> ref key0 key0 5 v4.a 2 Using where
+4 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort
+2 DERIVED <derived3> ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from v4,v1,t2 where
+(((v4.b>10) and (v4.a>1)) or (v4.b<20)) and (v1.max_c>200) and (v1.a=v4.a);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(((v4.b > 10) and (v4.a > 1)) or (v4.b < 20))"
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "attached_condition": "((((v4.b > 10) and (v4.a > 1)) or (v4.b < 20)) and (v4.a is not null))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "filesort": {
+ "sort_key": "v1.a, v1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v1.a < 15) and (((v1.b > 10) and (v1.a > 1)) or (v1.b < 20)))",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a < 15) and (((t1.b > 10) and (t1.a > 1)) or (t1.b < 20)))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "table": {
+ "table_name": "<derived4>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["a"],
+ "ref": ["v4.a"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "(v1.max_c > 200)",
+ "materialized": {
+ "query_block": {
+ "select_id": 4,
+ "having_condition": "((max_c < 707) and (max_c > 200))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# using embedded view : pushing different conditions
+# using several derived tables : pushing only in one table
+# extracted or formula : pushing into WHERE
+# extracted or formula : pushing into HAVING
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v4,v2 where
+((v4.a>12) and (v4.min_c<300) and (v4.b>13)) or (v4.a<1);
+a b min_c a b max_c avg_c
+select * from v4,v2 where
+((v4.a>12) and (v4.min_c<300) and (v4.b>13)) or (v4.a<1);
+a b min_c a b max_c avg_c
+explain select * from v4,v2 where
+((v4.a>12) and (v4.min_c<300) and (v4.b>13)) or (v4.a<1);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where
+1 PRIMARY <derived4> ALL NULL NULL NULL NULL 20 Using join buffer (flat, BNL join)
+4 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+2 DERIVED <derived3> ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from v4,v2 where
+((v4.a>12) and (v4.min_c<300) and (v4.b>13)) or (v4.a<1);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(((v4.a > 12) and (v4.min_c < 300) and (v4.b > 13)) or (v4.a < 1))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(((v1.a > 12) and (min_c < 300) and (v1.b > 13)) or (v1.a < 1))",
+ "filesort": {
+ "sort_key": "v1.a, v1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v1.a < 15) and (((v1.a > 12) and (v1.b > 13)) or (v1.a < 1)))",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a < 15) and (((t1.a > 12) and (t1.b > 13)) or (t1.a < 1)))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived4>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "materialized": {
+ "query_block": {
+ "select_id": 4,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.a > 5)"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# using embedded view : pushing different conditions
+# using several derived tables : pushing only in one table
+# conjunctive subformula : pushing into WHERE
+# conjunctive subformula : pushing into HAVING
+# pushing equalities
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v4,v2 where
+(v4.a=v2.b) and (v4.a=v4.b) and (v4.min_c<100);
+a b min_c a b max_c avg_c
+select * from v4,v2 where
+(v4.a=v2.b) and (v4.a=v4.b) and (v4.min_c<100);
+a b min_c a b max_c avg_c
+explain select * from v4,v2 where
+(v4.a=v2.b) and (v4.a=v4.b) and (v4.min_c<100);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where
+1 PRIMARY <derived4> ref key0 key0 5 v4.a 2
+4 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+2 DERIVED <derived3> ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from v4,v2 where
+(v4.a=v2.b) and (v4.a=v4.b) and (v4.min_c<100);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v4.b = v4.a) and (v4.min_c < 100) and (v4.a is not null))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(min_c < 100)",
+ "filesort": {
+ "sort_key": "v1.a, v1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v1.b = v1.a) and (v1.a < 15))",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.b = t1.a) and (t1.a < 15))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "table": {
+ "table_name": "<derived4>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["b"],
+ "ref": ["v4.a"],
+ "rows": 2,
+ "filtered": 100,
+ "materialized": {
+ "query_block": {
+ "select_id": 4,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.a > 5)"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# using embedded view : pushing the same conditions
+# using several derived tables : pushing in all tables
+# extracted and formula : pushing into WHERE using equalities
+# conjunctive subformula : pushing into WHERE
+# pushing equalities
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v4,v2 where
+(v4.a=v2.b) and (v4.a=v4.b) and (v2.b<30);
+a b min_c a b max_c avg_c
+select * from v4,v2 where
+(v4.a=v2.b) and (v4.a=v4.b) and (v2.b<30);
+a b min_c a b max_c avg_c
+explain select * from v4,v2 where
+(v4.a=v2.b) and (v4.a=v4.b) and (v2.b<30);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where
+1 PRIMARY <derived4> ref key0 key0 5 v4.a 2
+4 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+2 DERIVED <derived3> ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from v4,v2 where
+(v4.a=v2.b) and (v4.a=v4.b) and (v2.b<30);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v4.b = v4.a) and (v4.a < 30) and (v4.a is not null))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "filesort": {
+ "sort_key": "v1.a, v1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v1.b = v1.a) and (v1.a < 15) and (v1.a < 30))",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.b = t1.a) and (t1.a < 15) and (t1.a < 30))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "table": {
+ "table_name": "<derived4>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["b"],
+ "ref": ["v4.a"],
+ "rows": 2,
+ "filtered": 100,
+ "materialized": {
+ "query_block": {
+ "select_id": 4,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a > 5) and (t1.b < 30))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# using embedded view : pushing the same conditions
+# using several derived tables : pushing in all tables
+# extracted or formula : pushing into WHERE using equalities
+# extracted and formula : pushing into WHERE using equalities
+# pushing equalities
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v4,v2 where
+(v4.a=v2.b) and (v4.a=v4.b) and ((v2.b<30) or (v4.a>2));
+a b min_c a b max_c avg_c
+select * from v4,v2 where
+(v4.a=v2.b) and (v4.a=v4.b) and ((v2.b<30) or (v4.a>2));
+a b min_c a b max_c avg_c
+explain select * from v4,v2 where
+(v4.a=v2.b) and (v4.a=v4.b) and ((v2.b<30) or (v4.a>2));
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where
+1 PRIMARY <derived4> ref key0 key0 5 v4.a 2
+4 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+2 DERIVED <derived3> ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from v4,v2 where
+(v4.a=v2.b) and (v4.a=v4.b) and ((v2.b<30) or (v4.a>2));
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v4.b = v4.a) and ((v4.a < 30) or (v4.a > 2)) and (v4.a is not null))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "filesort": {
+ "sort_key": "v1.a, v1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v1.b = v1.a) and (v1.a < 15) and ((v1.a < 30) or (v1.a > 2)))",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.b = t1.a) and (t1.a < 15) and ((t1.a < 30) or (t1.a > 2)))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "table": {
+ "table_name": "<derived4>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["b"],
+ "ref": ["v4.a"],
+ "rows": 2,
+ "filtered": 100,
+ "materialized": {
+ "query_block": {
+ "select_id": 4,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a > 5) and ((t1.b < 30) or (t1.b > 2)))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# using embedded view : pushing the same conditions
+# using several derived tables : pushing in all tables
+# extracted or formula : pushing into WHERE
+# conjunctive subformula : pushing into WHERE
+# pushing equalities
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v4,v2 where
+(((v4.a<12) and (v4.b>13)) or (v4.a>10)) and
+(v4.min_c=v2.max_c) and (v4.min_c>100);
+a b min_c a b max_c avg_c
+6 20 315 6 20 315 279.3333
+8 33 404 8 33 404 213.6667
+select * from v4,v2 where
+(((v4.a<12) and (v4.b>13)) or (v4.a>10)) and
+(v4.min_c=v2.max_c) and (v4.min_c>100);
+a b min_c a b max_c avg_c
+6 20 315 6 20 315 279.3333
+8 33 404 8 33 404 213.6667
+explain select * from v4,v2 where
+(((v4.a<12) and (v4.b>13)) or (v4.a>10)) and
+(v4.min_c=v2.max_c) and (v4.min_c>100);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where
+1 PRIMARY <derived4> ref key0 key0 5 v4.min_c 2
+4 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+2 DERIVED <derived3> ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from v4,v2 where
+(((v4.a<12) and (v4.b>13)) or (v4.a>10)) and
+(v4.min_c=v2.max_c) and (v4.min_c>100);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((((v4.a < 12) and (v4.b > 13)) or (v4.a > 10)) and (v4.min_c > 100) and (v4.min_c is not null))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(min_c > 100)",
+ "filesort": {
+ "sort_key": "v1.a, v1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v1.a < 15) and (((v1.a < 12) and (v1.b > 13)) or (v1.a > 10)))",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a < 15) and (((t1.a < 12) and (t1.b > 13)) or (t1.a > 10)))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "table": {
+ "table_name": "<derived4>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["max_c"],
+ "ref": ["v4.min_c"],
+ "rows": 2,
+ "filtered": 100,
+ "materialized": {
+ "query_block": {
+ "select_id": 4,
+ "having_condition": "((max_c < 707) and (max_c > 100))",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.a > 5)"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+# using embedded view : pushing the same conditions
+# using several derived tables : pushing only in one table
+# extracted or formula : pushing into WHERE
+set statement optimizer_switch='condition_pushdown_for_derived=off' for select * from v4,v2,t2 where
+(((v4.a<12) and (t2.b>13)) or (v4.a>10)) and
+(v4.min_c=t2.c) and (t2.c>100);
+a b min_c a b max_c avg_c a b c d
+6 20 315 6 20 315 279.3333 6 20 315 279
+6 20 315 8 33 404 213.6667 6 20 315 279
+select * from v4,v2,t2 where
+(((v4.a<12) and (t2.b>13)) or (v4.a>10)) and
+(v4.min_c=t2.c) and (t2.c>100);
+a b min_c a b max_c avg_c a b c d
+6 20 315 6 20 315 279.3333 6 20 315 279
+6 20 315 8 33 404 213.6667 6 20 315 279
+explain select * from v4,v2,t2 where
+(((v4.a<12) and (t2.b>13)) or (v4.a>10)) and
+(v4.min_c=t2.c) and (t2.c>100);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
+1 PRIMARY <derived2> ref key0 key0 5 test.t2.c 2 Using where
+1 PRIMARY <derived4> ALL NULL NULL NULL NULL 20 Using join buffer (flat, BNL join)
+4 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+2 DERIVED <derived3> ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
+explain format=json select * from v4,v2,t2 where
+(((v4.a<12) and (t2.b>13)) or (v4.a>10)) and
+(v4.min_c=t2.c) and (t2.c>100);
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 9,
+ "filtered": 100,
+ "attached_condition": "((t2.c > 100) and (t2.c is not null))"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["min_c"],
+ "ref": ["test.t2.c"],
+ "rows": 2,
+ "filtered": 100,
+ "attached_condition": "(((v4.a < 12) and (t2.b > 13)) or (v4.a > 10))",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "having_condition": "(min_c > 100)",
+ "filesort": {
+ "sort_key": "v1.a, v1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((v1.a < 15) and ((v1.a < 12) or (v1.a > 10)))",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "((t1.a < 15) and ((t1.a < 12) or (t1.a > 10)))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "block-nl-join": {
+ "table": {
+ "table_name": "<derived4>",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100
+ },
+ "buffer_type": "flat",
+ "buffer_size": "256Kb",
+ "join_type": "BNL",
+ "materialized": {
+ "query_block": {
+ "select_id": 4,
+ "having_condition": "(max_c < 707)",
+ "filesort": {
+ "sort_key": "t1.a, t1.b",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 20,
+ "filtered": 100,
+ "attached_condition": "(t1.a > 5)"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+drop view v1,v2,v3,v4;
+drop view v_union,v2_union,v3_union,v4_union;
+drop view v_double,v_char,v_decimal;
+drop table t1,t2,t1_double,t2_double,t1_char,t2_char,t1_decimal,t2_decimal;
+#
+# MDEV-10782: condition extracted from a multiple equality
+# pushed into HAVING
+#
+CREATE TABLE t1 (i int);
+INSERT INTO t1 VALUES (1),(2);
+EXPLAIN EXTENDED
+SELECT *
+FROM ( SELECT * FROM ( SELECT MIN(i) as f FROM t1 ) sq1 ) AS sq2
+WHERE f = 8;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY <derived3> ALL NULL NULL NULL NULL 2 100.00 Using where
+3 DERIVED t1 ALL NULL NULL NULL NULL 2 100.00
+Warnings:
+Note 1003 select `sq1`.`f` AS `f` from (select min(`test`.`t1`.`i`) AS `f` from `test`.`t1` having (`f` = 8)) `sq1` where (`sq1`.`f` = 8)
+SELECT *
+FROM ( SELECT * FROM ( SELECT MIN(i) as f FROM t1 ) sq1 ) AS sq2
+WHERE f = 8;
+f
+SELECT *
+FROM ( SELECT * FROM ( SELECT MIN(i) as f FROM t1 ) sq1 ) AS sq2
+WHERE f = 1;
+f
+1
+DROP TABLE t1;
+#
+# MDEV-10783: pushdown into constant view
+#
+CREATE TABLE t1 (i int) ENGINE=MyISAM;
+CREATE VIEW v AS SELECT 5;
+SELECT * FROM t1 WHERE 1 IN ( SELECT * FROM v );
+i
+DROP VIEW v;
+DROP TABLE t1;
+#
+# MDEV-10785: second execution of a query with condition
+# pushed into view
+#
+CREATE TABLE t1 (i int);
+CREATE VIEW v1 AS SELECT i FROM t1 WHERE i < 5;
+CREATE FUNCTION f (in1 int) RETURNS int RETURN in1;
+CREATE VIEW v2 AS SELECT * FROM v1 GROUP BY i;
+PREPARE stmt FROM "SELECT * FROM v2 WHERE f(0) <> 2";
+EXECUTE stmt;
+i
+EXECUTE stmt;
+i
+DROP FUNCTION f;
+DROP VIEW v2,v1;
+DROP TABLE t1;
diff --git a/mysql-test/r/derived_view.result b/mysql-test/r/derived_view.result
index 5783247b673..52df8bf0012 100644
--- a/mysql-test/r/derived_view.result
+++ b/mysql-test/r/derived_view.result
@@ -79,6 +79,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -93,6 +94,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 12
@@ -166,6 +168,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -180,6 +183,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 12
@@ -232,6 +236,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -248,6 +253,7 @@ Handler_read_key 11
Handler_read_last 0
Handler_read_next 3
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 11
Handler_read_rnd_deleted 0
Handler_read_rnd_next 36
@@ -323,6 +329,7 @@ Handler_read_key 22
Handler_read_last 0
Handler_read_next 22
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 60
@@ -340,6 +347,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -356,6 +364,7 @@ Handler_read_key 11
Handler_read_last 0
Handler_read_next 3
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 11
Handler_read_rnd_deleted 0
Handler_read_rnd_next 36
@@ -363,9 +372,51 @@ explain extended select * from v1 join v4 on f1=f2;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 11 100.00 Using where
1 PRIMARY <derived2> ref key0 key0 5 test.t2.f2 2 100.00
-2 DERIVED t1 ALL NULL NULL NULL NULL 11 100.00 Using temporary; Using filesort
+2 DERIVED t1 ALL NULL NULL NULL NULL 11 100.00 Using where; Using temporary; Using filesort
Warnings:
Note 1003 select `v1`.`f1` AS `f1`,`v1`.`f11` AS `f11`,`test`.`t2`.`f2` AS `f2`,`test`.`t2`.`f22` AS `f22` from `test`.`v1` join `test`.`t2` where ((`v1`.`f1` = `test`.`t2`.`f2`) and (`test`.`t2`.`f2` in (2,3)))
+explain format=json select * from v1 join v4 on f1=f2;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 11,
+ "filtered": 100,
+ "attached_condition": "((t2.f2 in (2,3)) and (t2.f2 is not null))"
+ },
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["f1"],
+ "ref": ["test.t2.f2"],
+ "rows": 2,
+ "filtered": 100,
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "filesort": {
+ "sort_key": "t1.f1",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 11,
+ "filtered": 100,
+ "attached_condition": "(t1.f1 in (2,3))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
select * from v1 join v4 on f1=f2;
f1 f11 f2 f22
3 3 3 3
@@ -389,7 +440,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY <derived3> ALL NULL NULL NULL NULL 11 100.00 Using where
3 DERIVED t1 ALL NULL NULL NULL NULL 11 100.00 Using where; Using temporary; Using filesort
Warnings:
-Note 1003 select `tt`.`f1` AS `f1`,`tt`.`f11` AS `f11` from (select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f11` AS `f11` from `test`.`t1` where (`test`.`t1`.`f1` < 7) group by `test`.`t1`.`f1`) `tt` where (`tt`.`f1` > 2)
+Note 1003 select `tt`.`f1` AS `f1`,`tt`.`f11` AS `f11` from (select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f11` AS `f11` from `test`.`t1` where ((`test`.`t1`.`f1` < 7) and (`test`.`t1`.`f1` > 2)) group by `test`.`t1`.`f1`) `tt` where (`tt`.`f1` > 2)
select * from (select * from
(select * from t1 where f1 < 7 group by f1) tt where f1 > 2) zz;
f1 f11
@@ -416,7 +467,55 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DERIVED <derived3> ALL NULL NULL NULL NULL 11 100.00 Using where; Using temporary; Using filesort
3 DERIVED t1 ALL NULL NULL NULL NULL 11 100.00 Using where; Using temporary; Using filesort
Warnings:
-Note 1003 select `zz`.`f1` AS `f1`,`zz`.`f11` AS `f11` from (select `tt`.`f1` AS `f1`,`tt`.`f11` AS `f11` from (select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f11` AS `f11` from `test`.`t1` where (`test`.`t1`.`f1` < 7) group by `test`.`t1`.`f1`) `tt` where (`tt`.`f1` > 2) group by `tt`.`f1`) `zz`
+Note 1003 select `zz`.`f1` AS `f1`,`zz`.`f11` AS `f11` from (select `tt`.`f1` AS `f1`,`tt`.`f11` AS `f11` from (select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f11` AS `f11` from `test`.`t1` where ((`test`.`t1`.`f1` < 7) and (`test`.`t1`.`f1` > 2)) group by `test`.`t1`.`f1`) `tt` where (`tt`.`f1` > 2) group by `tt`.`f1`) `zz`
+explain format=json select * from (select * from
+(select * from t1 where f1 < 7 group by f1) tt where f1 > 2 group by f1) zz;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 11,
+ "filtered": 100,
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "filesort": {
+ "sort_key": "tt.f1",
+ "temporary_table": {
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 11,
+ "filtered": 100,
+ "attached_condition": "(tt.f1 > 2)",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "filesort": {
+ "sort_key": "t1.f1",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 11,
+ "filtered": 100,
+ "attached_condition": "((t1.f1 < 7) and (t1.f1 > 2))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
select * from (select * from
(select * from t1 where f1 < 7 group by f1) tt where f1 > 2 group by f1) zz;
f1 f11
@@ -434,7 +533,70 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
5 DERIVED t1 ALL NULL NULL NULL NULL 11 100.00 Using where; Using temporary; Using filesort
3 DERIVED t1 ALL NULL NULL NULL NULL 11 100.00 Using where; Using temporary; Using filesort
Warnings:
-Note 1003 select `tt`.`f1` AS `f1`,`tt`.`f11` AS `f11`,`tt`.`f1` AS `f1`,`tt`.`f11` AS `f11` from (select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f11` AS `f11` from `test`.`t1` where (`test`.`t1`.`f1` < 7) group by `test`.`t1`.`f1`) `tt` join (select `t1`.`f1` AS `f1`,`t1`.`f11` AS `f11` from `test`.`t1` where (`t1`.`f1` < 7) group by `t1`.`f1`) `tt` where ((`tt`.`f1` = `tt`.`f1`) and (`tt`.`f1` > 2) and (`tt`.`f1` > 2))
+Note 1003 select `tt`.`f1` AS `f1`,`tt`.`f11` AS `f11`,`tt`.`f1` AS `f1`,`tt`.`f11` AS `f11` from (select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f11` AS `f11` from `test`.`t1` where ((`test`.`t1`.`f1` < 7) and (`test`.`t1`.`f1` > 2) and (`test`.`t1`.`f1` > 2)) group by `test`.`t1`.`f1`) `tt` join (select `t1`.`f1` AS `f1`,`t1`.`f11` AS `f11` from `test`.`t1` where ((`t1`.`f1` < 7) and (`t1`.`f1` > 2) and (`t1`.`f1` > 2)) group by `t1`.`f1`) `tt` where ((`tt`.`f1` = `tt`.`f1`) and (`tt`.`f1` > 2) and (`tt`.`f1` > 2))
+explain format=json select * from
+(select * from (select * from t1 where f1 < 7 group by f1) tt where f1 > 2) x
+join
+(select * from (select * from t1 where f1 < 7 group by f1) tt where f1 > 2) z
+on x.f1 = z.f1;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 11,
+ "filtered": 100,
+ "attached_condition": "((tt.f1 > 2) and (tt.f1 > 2) and (tt.f1 is not null))",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "filesort": {
+ "sort_key": "t1.f1",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 11,
+ "filtered": 100,
+ "attached_condition": "((t1.f1 < 7) and (t1.f1 > 2) and (t1.f1 > 2))"
+ }
+ }
+ }
+ }
+ }
+ },
+ "table": {
+ "table_name": "<derived5>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["f1"],
+ "ref": ["tt.f1"],
+ "rows": 2,
+ "filtered": 100,
+ "materialized": {
+ "query_block": {
+ "select_id": 5,
+ "filesort": {
+ "sort_key": "t1.f1",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 11,
+ "filtered": 100,
+ "attached_condition": "((t1.f1 < 7) and (t1.f1 > 2) and (t1.f1 > 2))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
flush status;
select * from
(select * from (select * from t1 where f1 < 7 group by f1) tt where f1 > 2) x
@@ -451,9 +613,10 @@ Handler_read_key 2
Handler_read_last 0
Handler_read_next 2
Handler_read_prev 0
-Handler_read_rnd 8
+Handler_read_retry 0
+Handler_read_rnd 4
Handler_read_rnd_deleted 0
-Handler_read_rnd_next 39
+Handler_read_rnd_next 33
flush status;
merged in merged derived join merged in merged derived
explain extended select * from
@@ -495,7 +658,106 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DERIVED <derived3> ALL NULL NULL NULL NULL 11 100.00 Using where; Using temporary; Using filesort
3 DERIVED t1 ALL NULL NULL NULL NULL 11 100.00 Using where; Using temporary; Using filesort
Warnings:
-Note 1003 select `x`.`f1` AS `f1`,`x`.`f11` AS `f11`,`z`.`f1` AS `f1`,`z`.`f11` AS `f11` from (select `tt`.`f1` AS `f1`,`tt`.`f11` AS `f11` from (select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f11` AS `f11` from `test`.`t1` where (`test`.`t1`.`f1` < 7) group by `test`.`t1`.`f1`) `tt` where (`tt`.`f1` > 2) group by `tt`.`f1`) `x` join (select `tt`.`f1` AS `f1`,`tt`.`f11` AS `f11` from (select `t1`.`f1` AS `f1`,`t1`.`f11` AS `f11` from `test`.`t1` where (`t1`.`f1` < 7) group by `t1`.`f1`) `tt` where (`tt`.`f1` > 2) group by `tt`.`f1`) `z` where (`z`.`f1` = `x`.`f1`)
+Note 1003 select `x`.`f1` AS `f1`,`x`.`f11` AS `f11`,`z`.`f1` AS `f1`,`z`.`f11` AS `f11` from (select `tt`.`f1` AS `f1`,`tt`.`f11` AS `f11` from (select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f11` AS `f11` from `test`.`t1` where ((`test`.`t1`.`f1` < 7) and (`test`.`t1`.`f1` > 2)) group by `test`.`t1`.`f1`) `tt` where (`tt`.`f1` > 2) group by `tt`.`f1`) `x` join (select `tt`.`f1` AS `f1`,`tt`.`f11` AS `f11` from (select `t1`.`f1` AS `f1`,`t1`.`f11` AS `f11` from `test`.`t1` where ((`t1`.`f1` < 7) and (`t1`.`f1` > 2)) group by `t1`.`f1`) `tt` where (`tt`.`f1` > 2) group by `tt`.`f1`) `z` where (`z`.`f1` = `x`.`f1`)
+explain format=json select * from
+(select * from
+(select * from t1 where f1 < 7 group by f1) tt where f1 > 2 group by f1) x
+join
+(select * from
+(select * from t1 where f1 < 7 group by f1) tt where f1 > 2 group by f1) z
+on x.f1 = z.f1;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "<derived2>",
+ "access_type": "ALL",
+ "rows": 11,
+ "filtered": 100,
+ "attached_condition": "(x.f1 is not null)",
+ "materialized": {
+ "query_block": {
+ "select_id": 2,
+ "filesort": {
+ "sort_key": "tt.f1",
+ "temporary_table": {
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 11,
+ "filtered": 100,
+ "attached_condition": "(tt.f1 > 2)",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "filesort": {
+ "sort_key": "t1.f1",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 11,
+ "filtered": 100,
+ "attached_condition": "((t1.f1 < 7) and (t1.f1 > 2))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "table": {
+ "table_name": "<derived4>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["f1"],
+ "ref": ["x.f1"],
+ "rows": 2,
+ "filtered": 100,
+ "materialized": {
+ "query_block": {
+ "select_id": 4,
+ "filesort": {
+ "sort_key": "tt.f1",
+ "temporary_table": {
+ "table": {
+ "table_name": "<derived5>",
+ "access_type": "ALL",
+ "rows": 11,
+ "filtered": 100,
+ "attached_condition": "(tt.f1 > 2)",
+ "materialized": {
+ "query_block": {
+ "select_id": 5,
+ "filesort": {
+ "sort_key": "t1.f1",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 11,
+ "filtered": 100,
+ "attached_condition": "((t1.f1 < 7) and (t1.f1 > 2))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
select * from
(select * from
(select * from t1 where f1 < 7 group by f1) tt where f1 > 2 group by f1) x
@@ -523,9 +785,41 @@ explain extended
select * from ( select * from v1 where f1 < 7) tt;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY <derived3> ALL NULL NULL NULL NULL 11 100.00 Using where
-3 DERIVED t1 ALL NULL NULL NULL NULL 11 100.00 Using temporary; Using filesort
+3 DERIVED t1 ALL NULL NULL NULL NULL 11 100.00 Using where; Using temporary; Using filesort
Warnings:
Note 1003 select `v1`.`f1` AS `f1`,`v1`.`f11` AS `f11` from `test`.`v1` where (`v1`.`f1` < 7)
+explain format=json
+select * from ( select * from v1 where f1 < 7) tt;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "<derived3>",
+ "access_type": "ALL",
+ "rows": 11,
+ "filtered": 100,
+ "attached_condition": "(v1.f1 < 7)",
+ "materialized": {
+ "query_block": {
+ "select_id": 3,
+ "filesort": {
+ "sort_key": "t1.f1",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 11,
+ "filtered": 100,
+ "attached_condition": "(t1.f1 < 7)"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
select * from ( select * from v1 where f1 < 7) tt;
f1 f11
1 1
@@ -570,9 +864,51 @@ explain extended select * from v6 join v7 on f2=f1;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 11 100.00 Using where
1 PRIMARY <derived5> ref key0 key0 5 test.t2.f2 2 100.00
-5 DERIVED t1 ALL NULL NULL NULL NULL 11 100.00 Using temporary; Using filesort
+5 DERIVED t1 ALL NULL NULL NULL NULL 11 100.00 Using where; Using temporary; Using filesort
Warnings:
Note 1003 select `test`.`t2`.`f2` AS `f2`,`test`.`t2`.`f22` AS `f22`,`v1`.`f1` AS `f1`,`v1`.`f11` AS `f11` from `test`.`t2` join `test`.`v1` where ((`v1`.`f1` = `test`.`t2`.`f2`) and (`test`.`t2`.`f2` < 7) and (`test`.`t2`.`f2` in (2,3)))
+explain format=json select * from v6 join v7 on f2=f1;
+EXPLAIN
+{
+ "query_block": {
+ "select_id": 1,
+ "table": {
+ "table_name": "t2",
+ "access_type": "ALL",
+ "rows": 11,
+ "filtered": 100,
+ "attached_condition": "((t2.f2 < 7) and (t2.f2 in (2,3)) and (t2.f2 is not null))"
+ },
+ "table": {
+ "table_name": "<derived5>",
+ "access_type": "ref",
+ "possible_keys": ["key0"],
+ "key": "key0",
+ "key_length": "5",
+ "used_key_parts": ["f1"],
+ "ref": ["test.t2.f2"],
+ "rows": 2,
+ "filtered": 100,
+ "materialized": {
+ "query_block": {
+ "select_id": 5,
+ "filesort": {
+ "sort_key": "t1.f1",
+ "temporary_table": {
+ "table": {
+ "table_name": "t1",
+ "access_type": "ALL",
+ "rows": 11,
+ "filtered": 100,
+ "attached_condition": "(t1.f1 in (2,3))"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
select * from v6 join v7 on f2=f1;
f2 f22 f1 f11
3 3 3 3
@@ -2354,7 +2690,7 @@ ON p.id = g.p_random
ORDER BY gallery_name ASC
;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 Using filesort
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 10 Using filesort
1 PRIMARY p eq_ref PRIMARY PRIMARY 4 g.p_random 1 Using where
2 DERIVED gal ALL NULL NULL NULL NULL 10
3 DEPENDENT SUBQUERY pi ref gallery_id gallery_id 4 test.gal.id 4 Using temporary; Using filesort
diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result
index e2a7c462efd..6a67b5d0baf 100644
--- a/mysql-test/r/distinct.result
+++ b/mysql-test/r/distinct.result
@@ -918,7 +918,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 96 100.00 Using where; Using temporary
1 PRIMARY <derived2> ref key0 key0 5 test.t1.i1 9 100.00 Using where
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (flat, BNL join)
-2 DERIVED t1 ALL NULL NULL NULL NULL 96 100.00
+2 DERIVED t1 ALL NULL NULL NULL NULL 96 100.00 Using where
Warnings:
Note 1003 select straight_join distinct `test`.`t1`.`id` AS `id` from `test`.`t1` join `test`.`v1` join `test`.`t2` where ((`test`.`t2`.`i` = `v1`.`id`) and (`v1`.`i1` = `test`.`t1`.`i1`) and (`v1`.`id` <> 3))
set join_buffer_size=1024;
diff --git a/mysql-test/r/empty_table.result b/mysql-test/r/empty_table.result
index cea787f4abd..2bca3e792fa 100644
--- a/mysql-test/r/empty_table.result
+++ b/mysql-test/r/empty_table.result
@@ -7,4 +7,12 @@ select * from t1;
nr b str
select * from t1 limit 0;
nr b str
+show status like "Empty_queries";
+Variable_name Value
+Empty_queries 2
drop table t1;
+select * from t2;
+ERROR 42S02: Table 'test.t2' doesn't exist
+show status like "Empty_queries";
+Variable_name Value
+Empty_queries 2
diff --git a/mysql-test/r/explain_json.result b/mysql-test/r/explain_json.result
index af5d1b800aa..ff0bc163a33 100644
--- a/mysql-test/r/explain_json.result
+++ b/mysql-test/r/explain_json.result
@@ -485,6 +485,7 @@ EXPLAIN
"materialized": {
"query_block": {
"select_id": 2,
+ "having_condition": "(cnt > 0)",
"filesort": {
"sort_key": "t1.a",
"temporary_table": {
diff --git a/mysql-test/r/features.result b/mysql-test/r/features.result
index 52650d118b3..615ab2368d9 100644
--- a/mysql-test/r/features.result
+++ b/mysql-test/r/features.result
@@ -3,6 +3,7 @@ set sql_mode="";
flush status;
show status like "feature%";
Variable_name Value
+Feature_check_constraint 0
Feature_delay_key_write 0
Feature_dynamic_columns 0
Feature_fulltext 0
@@ -158,3 +159,9 @@ drop table t1;
show status like "feature_delay_key_write";
Variable_name Value
Feature_delay_key_write 2
+create table t1 (a int check (a > 5));
+create table t2 (b int, constraint foo check (b < 10));
+drop table t1, t2;
+show status like "feature_check_constraint";
+Variable_name Value
+Feature_check_constraint 2
diff --git a/mysql-test/r/func_default.result b/mysql-test/r/func_default.result
index aac5f4942a7..535be10da86 100644
--- a/mysql-test/r/func_default.result
+++ b/mysql-test/r/func_default.result
@@ -29,6 +29,6 @@ insert t1 () values ();
insert t1 (a) values (10);
select default(a),default(b),default(c),default(d),default(e),default(f) from t1;
default(a) default(b) default(c) default(d) default(e) default(f)
-1 2 foo bar 2001-01-01 10:20:30 2001-01-01 10:20:30.123456
-1 11 foo bar 2001-01-01 10:20:30 2001-01-01 10:20:30.123456
+1 2 foo bar 2001-01-01 10:20:30 2001-01-01 10:20:30.120000
+1 11 foo bar 2001-01-01 10:20:30 2001-01-01 10:20:30.120000
drop table t1;
diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result
index 74247ae1b8e..dbeb458345e 100644
--- a/mysql-test/r/func_group.result
+++ b/mysql-test/r/func_group.result
@@ -2278,6 +2278,45 @@ EXECUTE stmt;
t2_id GROUP_CONCAT(IF (t6.b, t6.f, t5.f) ORDER BY 1)
DROP TABLE t1,t2,t3,t4,t5,t6;
#
+# MDEV-10500 CASE/IF Statement returns multiple values and shifts further result values to the next column
+#
+CREATE TABLE t1 (
+id int not null AUTO_INCREMENT,
+active bool not null,
+data1 bigint,
+data2 bigint,
+data3 bigint,
+primary key (id)
+);
+INSERT INTO t1 (active,data1,data2,data3) VALUES (1,null,100,200);
+SELECT
+CASE WHEN active THEN SUM(data1) END AS C_1,
+SUM(data2) AS C_2,
+SUM(data3) AS C_3
+FROM t1;
+C_1 C_2 C_3
+NULL 100 200
+SELECT
+IF(active, SUM(data1), 5) AS C_1,
+SUM(data2) AS C_2,
+SUM(data3) AS C_3
+FROM t1;
+C_1 C_2 C_3
+NULL 100 200
+DROP TABLE t1;
+#
+# MDEV-10468 Assertion `nr >= 0.0' failed in Item_sum_std::val_real()
+#
+SELECT STDDEV_POP(f) FROM (SELECT "1e+309" AS f UNION SELECT "-1e+309" AS f) tbl;
+STDDEV_POP(f)
+1.7976931348623157e308
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: '1e+309'
+Warning 1292 Truncated incorrect DOUBLE value: '-1e+309'
+SELECT STDDEV(f) FROM (SELECT 1.7976931348623157e+308 AS f UNION SELECT -1.7976931348623157e+308 AS f) tbl;
+STDDEV(f)
+1.7976931348623157e308
+#
# MDEV-8852 Implicit or explicit CAST from MAX(string) to INT,DOUBLE,DECIMAL does not produce warnings
#
SELECT MAX('x') << 1, CAST(MAX('x') AS DOUBLE), CAST(MAX('x') AS DECIMAL);
@@ -2344,5 +2383,58 @@ companynr AVG(fld1) avg1 avg2
37 9223372036854775805.0000 9223372036854775805 9223372036854775805
DROP TABLE t1;
#
+# case where aggregate resolved in the local SELECT
+# but outer ones are checked
+#
+create table t10 (a int , b int, c int);
+insert into t10 values (0,0,0),(1,1,1);
+create table t11 as select * from t10;
+create table t12 as select * from t10;
+explain extended select a from t10 where c<3 or a in (select c from t12 union select max(t10.b) from t11 group by t11.c);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t10 ALL NULL NULL NULL NULL 2 100.00 Using where
+2 DEPENDENT SUBQUERY t12 ALL NULL NULL NULL NULL 2 100.00 Using where
+3 DEPENDENT UNION t11 ALL NULL NULL NULL NULL 2 100.00 Using temporary
+NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
+Warnings:
+Note 1276 Field or reference 'test.t10.b' of SELECT #3 was resolved in SELECT #1
+Note 1003 select `test`.`t10`.`a` AS `a` from `test`.`t10` where ((`test`.`t10`.`c` < 3) or <expr_cache><`test`.`t10`.`a`,`test`.`t10`.`b`>(<in_optimizer>(`test`.`t10`.`a`,<exists>(select `test`.`t12`.`c` from `test`.`t12` where (<cache>(`test`.`t10`.`a`) = `test`.`t12`.`c`) union select max(`test`.`t10`.`b`) from `test`.`t11` group by `test`.`t11`.`c` having (<cache>(`test`.`t10`.`a`) = <ref_null_helper>(max(`test`.`t10`.`b`)))))))
+drop table t10,t11,t12;
+#
+# MDEV-10017: Get unexpected `Empty Set` for correlated subquery
+# with aggregate functions
+#
+create table t1(c1 int, c2 int, c3 int);
+insert into t1 values(1,1,1),(2,2,2),(3,3,3);
+select * from t1;
+c1 c2 c3
+1 1 1
+2 2 2
+3 3 3
+create table t2(c1 int, c2 int);
+insert into t2 values(2,2);
+select * from t2;
+c1 c2
+2 2
+explain extended
+select c1 from t1 having c1 >= (select t.c1 as c from t2 t order by (select min(t1.c1+c) from t2 tt));
+ERROR HY000: Invalid use of group function
+select c1 from t1 having c1 >= (select t.c1 as c from t2 t order by (select min(t1.c1+c) from t2 tt));
+ERROR HY000: Invalid use of group function
+explain extended
+select c1 from t1 having c1 >= (select t.c1 as c from t2 t order by (select min(t1.c1+tt.c1) from t2 tt));
+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
+2 DEPENDENT SUBQUERY t system NULL NULL NULL NULL 1 100.00
+3 DEPENDENT SUBQUERY tt system NULL NULL NULL NULL 1 100.00
+Warnings:
+Note 1276 Field or reference 'test.t1.c1' of SELECT #3 was resolved in SELECT #1
+Note 1003 select `test`.`t1`.`c1` AS `c1` from `test`.`t1` having (`test`.`t1`.`c1` >= <expr_cache><`test`.`t1`.`c1`>((select 2 AS `c` from dual order by (select min((`test`.`t1`.`c1` + 2)) from dual))))
+select c1 from t1 having c1 >= (select t.c1 as c from t2 t order by (select min(t1.c1+tt.c1) from t2 tt));
+c1
+2
+3
+drop table t1,t2;
+#
# End of 10.1 tests
#
diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result
index f7ca1aa3d03..bde4eca8334 100644
--- a/mysql-test/r/func_math.result
+++ b/mysql-test/r/func_math.result
@@ -787,10 +787,16 @@ select 5.9 div 2, 1.23456789e3 DIV 2, 1.23456789e9 DIV 2, 1.23456789e19 DIV 2;
5.9 div 2 1.23456789e3 DIV 2 1.23456789e9 DIV 2 1.23456789e19 DIV 2
2 617 617283945 6172839450000000000
#
-# End of 5.5 tests
+# MDEV-10467 Assertion `nr >= 0.0' failed in Item_sum_std::val_real()
#
+CREATE TABLE t1 (i INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT STDDEV_SAMP(ROUND('0', 309)) FROM t1;
+STDDEV_SAMP(ROUND('0', 309))
+0
+DROP TABLE t1;
#
-# Start of 10.0 tests
+# End of 5.5 tests
#
#
# MDEV-5781 Item_sum_std::val_real(): Assertion `nr >= 0.0' fails on query with STDDEV_POP, ROUND and variable
@@ -805,3 +811,9 @@ STDDEV_POP(ROUND(0,@A:=2009))
select 0=0, 0=-0, 0.0= -0.0, 0.0 = -(0.0), 0.0E1=-0.0E1, 0.0E1=-(0.0E1);
0=0 0=-0 0.0= -0.0 0.0 = -(0.0) 0.0E1=-0.0E1 0.0E1=-(0.0E1)
1 1 1 1 1 1
+#
+# CRC32 tests
+#
+select CRC32(NULL), CRC32(''), CRC32('MySQL'), CRC32('mysql'), CRC32('01234567'), CRC32('012345678');
+CRC32(NULL) CRC32('') CRC32('MySQL') CRC32('mysql') CRC32('01234567') CRC32('012345678')
+NULL 0 3259397556 2501908538 763378421 939184570
diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result
index 4e38754788c..f6a04c6fb79 100644
--- a/mysql-test/r/func_misc.result
+++ b/mysql-test/r/func_misc.result
@@ -577,6 +577,13 @@ AND 57813X540X1723 = 'Test';
N AVG
0 NULL
drop table t1;
+SELECT NAME_CONST('a', -(1 OR 2)) OR 1;
+ERROR HY000: Incorrect arguments to NAME_CONST
+SELECT NAME_CONST('a', -(1 AND 2)) OR 1;
+ERROR HY000: Incorrect arguments to NAME_CONST
+SELECT NAME_CONST('a', -(1)) OR 1;
+NAME_CONST('a', -(1)) OR 1
+1
#
# End of 5.5 tests
#
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result
index 9a9ab76883e..399aa978e47 100644
--- a/mysql-test/r/func_time.result
+++ b/mysql-test/r/func_time.result
@@ -2806,3 +2806,332 @@ Warning 1292 Truncated incorrect time value: '-1441:00:00'
#
# End of 10.0 tests
#
+#
+# Start of 10.1 tests
+#
+#
+# MDEV-10317 EXCTACT(MINUTE_MICROSECOND) truncates data
+#
+CREATE TABLE t1 (a DATETIME(6));
+INSERT INTO t1 VALUES ('1999-12-31 23:59:59.999999');
+SELECT
+a,
+EXTRACT(YEAR FROM a),
+EXTRACT(YEAR_MONTH FROM a),
+EXTRACT(QUARTER FROM a),
+EXTRACT(MONTH FROM a),
+EXTRACT(WEEK FROM a),
+EXTRACT(DAY FROM a),
+EXTRACT(DAY_HOUR FROM a),
+EXTRACT(DAY_MINUTE FROM a),
+EXTRACT(DAY_SECOND FROM a),
+EXTRACT(HOUR FROM a),
+EXTRACT(HOUR_MINUTE FROM a),
+EXTRACT(HOUR_SECOND FROM a),
+EXTRACT(MINUTE FROM a),
+EXTRACT(MINUTE_SECOND FROM a),
+EXTRACT(SECOND FROM a),
+EXTRACT(MICROSECOND FROM a),
+EXTRACT(DAY_MICROSECOND FROM a),
+EXTRACT(HOUR_MICROSECOND FROM a),
+EXTRACT(MINUTE_MICROSECOND FROM a),
+EXTRACT(SECOND_MICROSECOND FROM a)
+FROM t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def test t1 t1 a a 12 26 26 Y 128 6 63
+def EXTRACT(YEAR FROM a) 3 4 4 Y 32896 0 63
+def EXTRACT(YEAR_MONTH FROM a) 3 6 6 Y 32896 0 63
+def EXTRACT(QUARTER FROM a) 3 2 1 Y 32896 0 63
+def EXTRACT(MONTH FROM a) 3 2 2 Y 32896 0 63
+def EXTRACT(WEEK FROM a) 3 2 2 Y 32896 0 63
+def EXTRACT(DAY FROM a) 3 2 2 Y 32896 0 63
+def EXTRACT(DAY_HOUR FROM a) 3 5 4 Y 32896 0 63
+def EXTRACT(DAY_MINUTE FROM a) 3 7 6 Y 32896 0 63
+def EXTRACT(DAY_SECOND FROM a) 3 9 8 Y 32896 0 63
+def EXTRACT(HOUR FROM a) 3 3 2 Y 32896 0 63
+def EXTRACT(HOUR_MINUTE FROM a) 3 5 4 Y 32896 0 63
+def EXTRACT(HOUR_SECOND FROM a) 3 7 6 Y 32896 0 63
+def EXTRACT(MINUTE FROM a) 3 3 2 Y 32896 0 63
+def EXTRACT(MINUTE_SECOND FROM a) 3 5 4 Y 32896 0 63
+def EXTRACT(SECOND FROM a) 3 3 2 Y 32896 0 63
+def EXTRACT(MICROSECOND FROM a) 3 7 6 Y 32896 0 63
+def EXTRACT(DAY_MICROSECOND FROM a) 8 15 14 Y 32896 0 63
+def EXTRACT(HOUR_MICROSECOND FROM a) 8 13 12 Y 32896 0 63
+def EXTRACT(MINUTE_MICROSECOND FROM a) 8 11 10 Y 32896 0 63
+def EXTRACT(SECOND_MICROSECOND FROM a) 3 9 8 Y 32896 0 63
+a 1999-12-31 23:59:59.999999
+EXTRACT(YEAR FROM a) 1999
+EXTRACT(YEAR_MONTH FROM a) 199912
+EXTRACT(QUARTER FROM a) 4
+EXTRACT(MONTH FROM a) 12
+EXTRACT(WEEK FROM a) 52
+EXTRACT(DAY FROM a) 31
+EXTRACT(DAY_HOUR FROM a) 3123
+EXTRACT(DAY_MINUTE FROM a) 312359
+EXTRACT(DAY_SECOND FROM a) 31235959
+EXTRACT(HOUR FROM a) 23
+EXTRACT(HOUR_MINUTE FROM a) 2359
+EXTRACT(HOUR_SECOND FROM a) 235959
+EXTRACT(MINUTE FROM a) 59
+EXTRACT(MINUTE_SECOND FROM a) 5959
+EXTRACT(SECOND FROM a) 59
+EXTRACT(MICROSECOND FROM a) 999999
+EXTRACT(DAY_MICROSECOND FROM a) 31235959999999
+EXTRACT(HOUR_MICROSECOND FROM a) 235959999999
+EXTRACT(MINUTE_MICROSECOND FROM a) 5959999999
+EXTRACT(SECOND_MICROSECOND FROM a) 59999999
+CREATE TABLE t2 AS SELECT
+a,
+EXTRACT(YEAR FROM a),
+EXTRACT(YEAR_MONTH FROM a),
+EXTRACT(QUARTER FROM a),
+EXTRACT(MONTH FROM a),
+EXTRACT(WEEK FROM a),
+EXTRACT(DAY FROM a),
+EXTRACT(DAY_HOUR FROM a),
+EXTRACT(DAY_MINUTE FROM a),
+EXTRACT(DAY_SECOND FROM a),
+EXTRACT(HOUR FROM a),
+EXTRACT(HOUR_MINUTE FROM a),
+EXTRACT(HOUR_SECOND FROM a),
+EXTRACT(MINUTE FROM a),
+EXTRACT(MINUTE_SECOND FROM a),
+EXTRACT(SECOND FROM a),
+EXTRACT(MICROSECOND FROM a),
+EXTRACT(DAY_MICROSECOND FROM a),
+EXTRACT(HOUR_MICROSECOND FROM a),
+EXTRACT(MINUTE_MICROSECOND FROM a),
+EXTRACT(SECOND_MICROSECOND FROM a)
+FROM t1;
+SELECT * FROM t2;
+a 1999-12-31 23:59:59.999999
+EXTRACT(YEAR FROM a) 1999
+EXTRACT(YEAR_MONTH FROM a) 199912
+EXTRACT(QUARTER FROM a) 4
+EXTRACT(MONTH FROM a) 12
+EXTRACT(WEEK FROM a) 52
+EXTRACT(DAY FROM a) 31
+EXTRACT(DAY_HOUR FROM a) 3123
+EXTRACT(DAY_MINUTE FROM a) 312359
+EXTRACT(DAY_SECOND FROM a) 31235959
+EXTRACT(HOUR FROM a) 23
+EXTRACT(HOUR_MINUTE FROM a) 2359
+EXTRACT(HOUR_SECOND FROM a) 235959
+EXTRACT(MINUTE FROM a) 59
+EXTRACT(MINUTE_SECOND FROM a) 5959
+EXTRACT(SECOND FROM a) 59
+EXTRACT(MICROSECOND FROM a) 999999
+EXTRACT(DAY_MICROSECOND FROM a) 31235959999999
+EXTRACT(HOUR_MICROSECOND FROM a) 235959999999
+EXTRACT(MINUTE_MICROSECOND FROM a) 5959999999
+EXTRACT(SECOND_MICROSECOND FROM a) 59999999
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` datetime(6) DEFAULT NULL,
+ `EXTRACT(YEAR FROM a)` int(4) DEFAULT NULL,
+ `EXTRACT(YEAR_MONTH FROM a)` int(6) DEFAULT NULL,
+ `EXTRACT(QUARTER FROM a)` int(2) DEFAULT NULL,
+ `EXTRACT(MONTH FROM a)` int(2) DEFAULT NULL,
+ `EXTRACT(WEEK FROM a)` int(2) DEFAULT NULL,
+ `EXTRACT(DAY FROM a)` int(2) DEFAULT NULL,
+ `EXTRACT(DAY_HOUR FROM a)` int(5) DEFAULT NULL,
+ `EXTRACT(DAY_MINUTE FROM a)` int(7) DEFAULT NULL,
+ `EXTRACT(DAY_SECOND FROM a)` int(9) DEFAULT NULL,
+ `EXTRACT(HOUR FROM a)` int(3) DEFAULT NULL,
+ `EXTRACT(HOUR_MINUTE FROM a)` int(5) DEFAULT NULL,
+ `EXTRACT(HOUR_SECOND FROM a)` int(7) DEFAULT NULL,
+ `EXTRACT(MINUTE FROM a)` int(3) DEFAULT NULL,
+ `EXTRACT(MINUTE_SECOND FROM a)` int(5) DEFAULT NULL,
+ `EXTRACT(SECOND FROM a)` int(3) DEFAULT NULL,
+ `EXTRACT(MICROSECOND FROM a)` int(7) DEFAULT NULL,
+ `EXTRACT(DAY_MICROSECOND FROM a)` bigint(15) DEFAULT NULL,
+ `EXTRACT(HOUR_MICROSECOND FROM a)` bigint(13) DEFAULT NULL,
+ `EXTRACT(MINUTE_MICROSECOND FROM a)` bigint(11) DEFAULT NULL,
+ `EXTRACT(SECOND_MICROSECOND FROM a)` int(9) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+CREATE TABLE t1 (a TIME(6));
+INSERT INTO t1 VALUES ('-838:59:59.999999'),('838:59:59.999999');
+SELECT
+a,
+EXTRACT(YEAR FROM a),
+EXTRACT(YEAR_MONTH FROM a),
+EXTRACT(QUARTER FROM a),
+EXTRACT(MONTH FROM a),
+EXTRACT(WEEK FROM a),
+EXTRACT(DAY FROM a),
+EXTRACT(DAY_HOUR FROM a),
+EXTRACT(DAY_MINUTE FROM a),
+EXTRACT(DAY_SECOND FROM a),
+EXTRACT(HOUR FROM a),
+EXTRACT(HOUR_MINUTE FROM a),
+EXTRACT(HOUR_SECOND FROM a),
+EXTRACT(MINUTE FROM a),
+EXTRACT(MINUTE_SECOND FROM a),
+EXTRACT(SECOND FROM a),
+EXTRACT(MICROSECOND FROM a),
+EXTRACT(DAY_MICROSECOND FROM a),
+EXTRACT(HOUR_MICROSECOND FROM a),
+EXTRACT(MINUTE_MICROSECOND FROM a),
+EXTRACT(SECOND_MICROSECOND FROM a)
+FROM t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def test t1 t1 a a 11 17 17 Y 128 6 63
+def EXTRACT(YEAR FROM a) 3 4 1 Y 32896 0 63
+def EXTRACT(YEAR_MONTH FROM a) 3 6 1 Y 32896 0 63
+def EXTRACT(QUARTER FROM a) 3 2 1 Y 32896 0 63
+def EXTRACT(MONTH FROM a) 3 2 1 Y 32896 0 63
+def EXTRACT(WEEK FROM a) 3 2 9 Y 32896 0 63
+def EXTRACT(DAY FROM a) 3 2 2 Y 32896 0 63
+def EXTRACT(DAY_HOUR FROM a) 3 5 5 Y 32896 0 63
+def EXTRACT(DAY_MINUTE FROM a) 3 7 7 Y 32896 0 63
+def EXTRACT(DAY_SECOND FROM a) 3 9 9 Y 32896 0 63
+def EXTRACT(HOUR FROM a) 3 3 3 Y 32896 0 63
+def EXTRACT(HOUR_MINUTE FROM a) 3 5 5 Y 32896 0 63
+def EXTRACT(HOUR_SECOND FROM a) 3 7 7 Y 32896 0 63
+def EXTRACT(MINUTE FROM a) 3 3 3 Y 32896 0 63
+def EXTRACT(MINUTE_SECOND FROM a) 3 5 5 Y 32896 0 63
+def EXTRACT(SECOND FROM a) 3 3 3 Y 32896 0 63
+def EXTRACT(MICROSECOND FROM a) 3 7 7 Y 32896 0 63
+def EXTRACT(DAY_MICROSECOND FROM a) 8 15 15 Y 32896 0 63
+def EXTRACT(HOUR_MICROSECOND FROM a) 8 13 13 Y 32896 0 63
+def EXTRACT(MINUTE_MICROSECOND FROM a) 8 11 11 Y 32896 0 63
+def EXTRACT(SECOND_MICROSECOND FROM a) 3 9 9 Y 32896 0 63
+a -838:59:59.999999
+EXTRACT(YEAR FROM a) 0
+EXTRACT(YEAR_MONTH FROM a) 0
+EXTRACT(QUARTER FROM a) 0
+EXTRACT(MONTH FROM a) 0
+EXTRACT(WEEK FROM a) 613566757
+EXTRACT(DAY FROM a) 34
+EXTRACT(DAY_HOUR FROM a) -3422
+EXTRACT(DAY_MINUTE FROM a) -342259
+EXTRACT(DAY_SECOND FROM a) -34225959
+EXTRACT(HOUR FROM a) -22
+EXTRACT(HOUR_MINUTE FROM a) -2259
+EXTRACT(HOUR_SECOND FROM a) -225959
+EXTRACT(MINUTE FROM a) -59
+EXTRACT(MINUTE_SECOND FROM a) -5959
+EXTRACT(SECOND FROM a) -59
+EXTRACT(MICROSECOND FROM a) -999999
+EXTRACT(DAY_MICROSECOND FROM a) -34225959999999
+EXTRACT(HOUR_MICROSECOND FROM a) -225959999999
+EXTRACT(MINUTE_MICROSECOND FROM a) -5959999999
+EXTRACT(SECOND_MICROSECOND FROM a) -59999999
+a 838:59:59.999999
+EXTRACT(YEAR FROM a) 0
+EXTRACT(YEAR_MONTH FROM a) 0
+EXTRACT(QUARTER FROM a) 0
+EXTRACT(MONTH FROM a) 0
+EXTRACT(WEEK FROM a) 613566757
+EXTRACT(DAY FROM a) 34
+EXTRACT(DAY_HOUR FROM a) 3422
+EXTRACT(DAY_MINUTE FROM a) 342259
+EXTRACT(DAY_SECOND FROM a) 34225959
+EXTRACT(HOUR FROM a) 22
+EXTRACT(HOUR_MINUTE FROM a) 2259
+EXTRACT(HOUR_SECOND FROM a) 225959
+EXTRACT(MINUTE FROM a) 59
+EXTRACT(MINUTE_SECOND FROM a) 5959
+EXTRACT(SECOND FROM a) 59
+EXTRACT(MICROSECOND FROM a) 999999
+EXTRACT(DAY_MICROSECOND FROM a) 34225959999999
+EXTRACT(HOUR_MICROSECOND FROM a) 225959999999
+EXTRACT(MINUTE_MICROSECOND FROM a) 5959999999
+EXTRACT(SECOND_MICROSECOND FROM a) 59999999
+CREATE TABLE t2 AS SELECT
+a,
+EXTRACT(YEAR FROM a),
+EXTRACT(YEAR_MONTH FROM a),
+EXTRACT(QUARTER FROM a),
+EXTRACT(MONTH FROM a),
+EXTRACT(WEEK FROM a),
+EXTRACT(DAY FROM a),
+EXTRACT(DAY_HOUR FROM a),
+EXTRACT(DAY_MINUTE FROM a),
+EXTRACT(DAY_SECOND FROM a),
+EXTRACT(HOUR FROM a),
+EXTRACT(HOUR_MINUTE FROM a),
+EXTRACT(HOUR_SECOND FROM a),
+EXTRACT(MINUTE FROM a),
+EXTRACT(MINUTE_SECOND FROM a),
+EXTRACT(SECOND FROM a),
+EXTRACT(MICROSECOND FROM a),
+EXTRACT(DAY_MICROSECOND FROM a),
+EXTRACT(HOUR_MICROSECOND FROM a),
+EXTRACT(MINUTE_MICROSECOND FROM a),
+EXTRACT(SECOND_MICROSECOND FROM a)
+FROM t1;
+SELECT * FROM t2;
+a -838:59:59.999999
+EXTRACT(YEAR FROM a) 0
+EXTRACT(YEAR_MONTH FROM a) 0
+EXTRACT(QUARTER FROM a) 0
+EXTRACT(MONTH FROM a) 0
+EXTRACT(WEEK FROM a) 613566757
+EXTRACT(DAY FROM a) 34
+EXTRACT(DAY_HOUR FROM a) -3422
+EXTRACT(DAY_MINUTE FROM a) -342259
+EXTRACT(DAY_SECOND FROM a) -34225959
+EXTRACT(HOUR FROM a) -22
+EXTRACT(HOUR_MINUTE FROM a) -2259
+EXTRACT(HOUR_SECOND FROM a) -225959
+EXTRACT(MINUTE FROM a) -59
+EXTRACT(MINUTE_SECOND FROM a) -5959
+EXTRACT(SECOND FROM a) -59
+EXTRACT(MICROSECOND FROM a) -999999
+EXTRACT(DAY_MICROSECOND FROM a) -34225959999999
+EXTRACT(HOUR_MICROSECOND FROM a) -225959999999
+EXTRACT(MINUTE_MICROSECOND FROM a) -5959999999
+EXTRACT(SECOND_MICROSECOND FROM a) -59999999
+a 838:59:59.999999
+EXTRACT(YEAR FROM a) 0
+EXTRACT(YEAR_MONTH FROM a) 0
+EXTRACT(QUARTER FROM a) 0
+EXTRACT(MONTH FROM a) 0
+EXTRACT(WEEK FROM a) 613566757
+EXTRACT(DAY FROM a) 34
+EXTRACT(DAY_HOUR FROM a) 3422
+EXTRACT(DAY_MINUTE FROM a) 342259
+EXTRACT(DAY_SECOND FROM a) 34225959
+EXTRACT(HOUR FROM a) 22
+EXTRACT(HOUR_MINUTE FROM a) 2259
+EXTRACT(HOUR_SECOND FROM a) 225959
+EXTRACT(MINUTE FROM a) 59
+EXTRACT(MINUTE_SECOND FROM a) 5959
+EXTRACT(SECOND FROM a) 59
+EXTRACT(MICROSECOND FROM a) 999999
+EXTRACT(DAY_MICROSECOND FROM a) 34225959999999
+EXTRACT(HOUR_MICROSECOND FROM a) 225959999999
+EXTRACT(MINUTE_MICROSECOND FROM a) 5959999999
+EXTRACT(SECOND_MICROSECOND FROM a) 59999999
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `a` time(6) DEFAULT NULL,
+ `EXTRACT(YEAR FROM a)` int(4) DEFAULT NULL,
+ `EXTRACT(YEAR_MONTH FROM a)` int(6) DEFAULT NULL,
+ `EXTRACT(QUARTER FROM a)` int(2) DEFAULT NULL,
+ `EXTRACT(MONTH FROM a)` int(2) DEFAULT NULL,
+ `EXTRACT(WEEK FROM a)` int(2) DEFAULT NULL,
+ `EXTRACT(DAY FROM a)` int(2) DEFAULT NULL,
+ `EXTRACT(DAY_HOUR FROM a)` int(5) DEFAULT NULL,
+ `EXTRACT(DAY_MINUTE FROM a)` int(7) DEFAULT NULL,
+ `EXTRACT(DAY_SECOND FROM a)` int(9) DEFAULT NULL,
+ `EXTRACT(HOUR FROM a)` int(3) DEFAULT NULL,
+ `EXTRACT(HOUR_MINUTE FROM a)` int(5) DEFAULT NULL,
+ `EXTRACT(HOUR_SECOND FROM a)` int(7) DEFAULT NULL,
+ `EXTRACT(MINUTE FROM a)` int(3) DEFAULT NULL,
+ `EXTRACT(MINUTE_SECOND FROM a)` int(5) DEFAULT NULL,
+ `EXTRACT(SECOND FROM a)` int(3) DEFAULT NULL,
+ `EXTRACT(MICROSECOND FROM a)` int(7) DEFAULT NULL,
+ `EXTRACT(DAY_MICROSECOND FROM a)` bigint(15) DEFAULT NULL,
+ `EXTRACT(HOUR_MICROSECOND FROM a)` bigint(13) DEFAULT NULL,
+ `EXTRACT(MINUTE_MICROSECOND FROM a)` bigint(11) DEFAULT NULL,
+ `EXTRACT(SECOND_MICROSECOND FROM a)` int(9) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1,t2;
+#
+# End of 10.1 tests
+#
diff --git a/mysql-test/r/function_defaults.result b/mysql-test/r/function_defaults.result
index 6840e5bbb6c..987c505f1fb 100644
--- a/mysql-test/r/function_defaults.result
+++ b/mysql-test/r/function_defaults.result
@@ -1232,7 +1232,7 @@ t1 CREATE TABLE `t1` (
`f` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`g` timestamp NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
- `i` int(11) NOT NULL DEFAULT '42'
+ `i` int(11) NOT NULL DEFAULT 42
) ENGINE=MyISAM DEFAULT CHARSET=latin1
LOAD DATA INFILE "file1.dat" INTO table t1;
Warnings:
@@ -1284,7 +1284,7 @@ t1 CREATE TABLE `t1` (
`f` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`g` timestamp NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
- `i` int(11) NOT NULL DEFAULT '42'
+ `i` int(11) NOT NULL DEFAULT 42
) ENGINE=MyISAM DEFAULT CHARSET=latin1
LOAD DATA INFILE "file1.dat" INTO table t1;
Warnings:
@@ -1351,7 +1351,7 @@ t1 CREATE TABLE `t1` (
`f` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`g` timestamp NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
- `i` int(11) NOT NULL DEFAULT '42'
+ `i` int(11) NOT NULL DEFAULT 42
) ENGINE=MyISAM DEFAULT CHARSET=latin1
LOAD DATA INFILE "file2.dat" INTO table t1;
Warnings:
@@ -1389,7 +1389,7 @@ t1 CREATE TABLE `t1` (
`f` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`g` timestamp NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
- `i` int(11) NOT NULL DEFAULT '42'
+ `i` int(11) NOT NULL DEFAULT 42
) ENGINE=MyISAM DEFAULT CHARSET=latin1
LOAD DATA INFILE "file2.dat" INTO table t1;
Warnings:
@@ -2778,7 +2778,7 @@ t1 CREATE TABLE `t1` (
`f` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
`g` timestamp(6) NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
- `i` int(11) NOT NULL DEFAULT '42'
+ `i` int(11) NOT NULL DEFAULT 42
) ENGINE=MyISAM DEFAULT CHARSET=latin1
LOAD DATA INFILE "file1.dat" INTO table t1;
Warnings:
@@ -2830,7 +2830,7 @@ t1 CREATE TABLE `t1` (
`f` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`g` timestamp(6) NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
- `i` int(11) NOT NULL DEFAULT '42'
+ `i` int(11) NOT NULL DEFAULT 42
) ENGINE=MyISAM DEFAULT CHARSET=latin1
LOAD DATA INFILE "file1.dat" INTO table t1;
Warnings:
@@ -2897,7 +2897,7 @@ t1 CREATE TABLE `t1` (
`f` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
`g` timestamp(6) NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
- `i` int(11) NOT NULL DEFAULT '42'
+ `i` int(11) NOT NULL DEFAULT 42
) ENGINE=MyISAM DEFAULT CHARSET=latin1
LOAD DATA INFILE "file2.dat" INTO table t1;
Warnings:
@@ -2935,7 +2935,7 @@ t1 CREATE TABLE `t1` (
`f` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`g` timestamp(6) NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
- `i` int(11) NOT NULL DEFAULT '42'
+ `i` int(11) NOT NULL DEFAULT 42
) ENGINE=MyISAM DEFAULT CHARSET=latin1
LOAD DATA INFILE "file2.dat" INTO table t1;
Warnings:
diff --git a/mysql-test/r/function_defaults_innodb.result b/mysql-test/r/function_defaults_innodb.result
index a877d27dba7..b539f70a3cb 100644
--- a/mysql-test/r/function_defaults_innodb.result
+++ b/mysql-test/r/function_defaults_innodb.result
@@ -1233,7 +1233,7 @@ t1 CREATE TABLE `t1` (
`f` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`g` timestamp NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
- `i` int(11) NOT NULL DEFAULT '42'
+ `i` int(11) NOT NULL DEFAULT 42
) ENGINE=InnoDB DEFAULT CHARSET=latin1
LOAD DATA INFILE "file1.dat" INTO table t1;
Warnings:
@@ -1285,7 +1285,7 @@ t1 CREATE TABLE `t1` (
`f` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`g` timestamp NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
- `i` int(11) NOT NULL DEFAULT '42'
+ `i` int(11) NOT NULL DEFAULT 42
) ENGINE=InnoDB DEFAULT CHARSET=latin1
LOAD DATA INFILE "file1.dat" INTO table t1;
Warnings:
@@ -1352,7 +1352,7 @@ t1 CREATE TABLE `t1` (
`f` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`g` timestamp NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
- `i` int(11) NOT NULL DEFAULT '42'
+ `i` int(11) NOT NULL DEFAULT 42
) ENGINE=InnoDB DEFAULT CHARSET=latin1
LOAD DATA INFILE "file2.dat" INTO table t1;
Warnings:
@@ -1390,7 +1390,7 @@ t1 CREATE TABLE `t1` (
`f` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`g` timestamp NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
- `i` int(11) NOT NULL DEFAULT '42'
+ `i` int(11) NOT NULL DEFAULT 42
) ENGINE=InnoDB DEFAULT CHARSET=latin1
LOAD DATA INFILE "file2.dat" INTO table t1;
Warnings:
@@ -2779,7 +2779,7 @@ t1 CREATE TABLE `t1` (
`f` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
`g` timestamp(6) NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
- `i` int(11) NOT NULL DEFAULT '42'
+ `i` int(11) NOT NULL DEFAULT 42
) ENGINE=InnoDB DEFAULT CHARSET=latin1
LOAD DATA INFILE "file1.dat" INTO table t1;
Warnings:
@@ -2831,7 +2831,7 @@ t1 CREATE TABLE `t1` (
`f` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`g` timestamp(6) NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
- `i` int(11) NOT NULL DEFAULT '42'
+ `i` int(11) NOT NULL DEFAULT 42
) ENGINE=InnoDB DEFAULT CHARSET=latin1
LOAD DATA INFILE "file1.dat" INTO table t1;
Warnings:
@@ -2898,7 +2898,7 @@ t1 CREATE TABLE `t1` (
`f` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
`g` timestamp(6) NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
- `i` int(11) NOT NULL DEFAULT '42'
+ `i` int(11) NOT NULL DEFAULT 42
) ENGINE=InnoDB DEFAULT CHARSET=latin1
LOAD DATA INFILE "file2.dat" INTO table t1;
Warnings:
@@ -2936,7 +2936,7 @@ t1 CREATE TABLE `t1` (
`f` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`g` timestamp(6) NULL DEFAULT NULL,
`h` int(11) DEFAULT NULL,
- `i` int(11) NOT NULL DEFAULT '42'
+ `i` int(11) NOT NULL DEFAULT 42
) ENGINE=InnoDB DEFAULT CHARSET=latin1
LOAD DATA INFILE "file2.dat" INTO table t1;
Warnings:
diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result
index ee65077fbc2..d10cfec6003 100644
--- a/mysql-test/r/gis.result
+++ b/mysql-test/r/gis.result
@@ -1714,18 +1714,18 @@ GEOMETRY_COLUMNS CREATE TEMPORARY TABLE `GEOMETRY_COLUMNS` (
`G_TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '',
`G_TABLE_NAME` varchar(64) NOT NULL DEFAULT '',
`G_GEOMETRY_COLUMN` varchar(64) NOT NULL DEFAULT '',
- `STORAGE_TYPE` tinyint(2) NOT NULL DEFAULT '0',
- `GEOMETRY_TYPE` int(7) NOT NULL DEFAULT '0',
- `COORD_DIMENSION` tinyint(2) NOT NULL DEFAULT '0',
- `MAX_PPR` tinyint(2) NOT NULL DEFAULT '0',
- `SRID` smallint(5) NOT NULL DEFAULT '0'
+ `STORAGE_TYPE` tinyint(2) NOT NULL DEFAULT 0,
+ `GEOMETRY_TYPE` int(7) NOT NULL DEFAULT 0,
+ `COORD_DIMENSION` tinyint(2) NOT NULL DEFAULT 0,
+ `MAX_PPR` tinyint(2) NOT NULL DEFAULT 0,
+ `SRID` smallint(5) NOT NULL DEFAULT 0
) ENGINE=MEMORY DEFAULT CHARSET=utf8
SHOW CREATE TABLE information_schema.spatial_ref_sys;
Table Create Table
SPATIAL_REF_SYS CREATE TEMPORARY TABLE `SPATIAL_REF_SYS` (
- `SRID` smallint(5) NOT NULL DEFAULT '0',
+ `SRID` smallint(5) NOT NULL DEFAULT 0,
`AUTH_NAME` varchar(512) NOT NULL DEFAULT '',
- `AUTH_SRID` int(5) NOT NULL DEFAULT '0',
+ `AUTH_SRID` int(5) NOT NULL DEFAULT 0,
`SRTEXT` varchar(2048) NOT NULL DEFAULT ''
) ENGINE=MEMORY DEFAULT CHARSET=utf8
create table t1(g GEOMETRY, pt POINT);
diff --git a/mysql-test/r/grant2.result b/mysql-test/r/grant2.result
index d447bc10dc7..2ccc01d225a 100644
--- a/mysql-test/r/grant2.result
+++ b/mysql-test/r/grant2.result
@@ -812,7 +812,7 @@ mysqltest_db1.t3 preload_keys status OK
# RENAME (doesn't work for temporary tables, thus should fail).
#
RENAME TABLE t3 TO t3_1;
-ERROR 42000: DROP, ALTER command denied to user 'mysqltest_u1'@'localhost' for table 't3'
+ERROR 42000: INSERT, CREATE command denied to user 'mysqltest_u1'@'localhost' for table 't3_1'
#
# HANDLER OPEN/READ/CLOSE.
#
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result
index f27ae67adff..7cc5f1029b0 100644
--- a/mysql-test/r/group_by.result
+++ b/mysql-test/r/group_by.result
@@ -2723,3 +2723,37 @@ select distinct a from t1 group by 'a';
a
2001-02-02
drop table t1;
+#
+# MDEV-10324: Server crash in get_sel_arg_for_keypart or Assertion `n < size()' failed in Mem_root_array
+#
+CREATE TABLE t1 (
+job_id int(10) unsigned NOT NULL AUTO_INCREMENT,
+job_cmd varbinary(60) NOT NULL DEFAULT '',
+job_namespace int(11) NOT NULL,
+job_title varbinary(255) NOT NULL,
+job_params blob NOT NULL,
+job_timestamp varbinary(14) DEFAULT NULL,
+job_random int(10) unsigned NOT NULL DEFAULT '0',
+job_token varbinary(32) NOT NULL DEFAULT '',
+job_token_timestamp varbinary(14) DEFAULT NULL,
+job_sha1 varbinary(32) NOT NULL DEFAULT '',
+job_attempts int(10) unsigned NOT NULL DEFAULT '0',
+PRIMARY KEY (job_id),
+KEY job_cmd (job_cmd,job_namespace,job_title,job_params(128)),
+KEY job_timestamp (job_timestamp),
+KEY job_sha1 (job_sha1),
+KEY job_cmd_token (job_cmd,job_token,job_random),
+KEY job_cmd_token_id (job_cmd,job_token,job_id)
+);
+INSERT INTO t1 VALUES
+(NULL, 'foo', 1, 'foo', 'foo', 'foo', 1, 'foo', 'foo', 'foo', 1),
+(NULL, 'bar', 2, 'bar', 'bar', 'bar', 2, 'bar', 'bar', 'bar', 2);
+SELECT DISTINCT job_cmd FROM t1 WHERE job_cmd IN ('foobar','null');
+job_cmd
+drop table t1;
+CREATE TABLE t1 (f1 INT NOT NULL, f2 VARCHAR(3) NOT NULL, KEY(f1), KEY(f2, f1));
+INSERT INTO t1 VALUES (0,'foo'),(1,'bar');
+SELECT 1 IN ( SELECT COUNT( DISTINCT f2 ) FROM t1 WHERE f1 <= 4 );
+1 IN ( SELECT COUNT( DISTINCT f2 ) FROM t1 WHERE f1 <= 4 )
+0
+drop table t1;
diff --git a/mysql-test/r/group_by_innodb.result b/mysql-test/r/group_by_innodb.result
index 381e0d7493c..bf6b25f31fa 100644
--- a/mysql-test/r/group_by_innodb.result
+++ b/mysql-test/r/group_by_innodb.result
@@ -123,4 +123,39 @@ id xtext optionen
2 number 22,25
1 select Kabel mit Stecker 5-polig,Kabel ohne Stecker
DROP TABLE t1, t2;
+# Port of testcase:
+#
+# Bug#20819199 ASSERTION FAILED IN TEST_IF_SKIP_SORT_ORDER
+#
+CREATE TABLE t0 ( a INT );
+INSERT INTO t0 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+CREATE TABLE t1 (
+pk INT NOT NULL AUTO_INCREMENT,
+a INT,
+b INT,
+PRIMARY KEY (pk),
+KEY idx1 (a),
+KEY idx2 (b, a),
+KEY idx3 (a, b)
+) ENGINE = InnoDB;
+INSERT INTO t1 (a, b) SELECT t01.a, t02.a FROM t0 t01, t0 t02;
+ANALYZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 analyze status OK
+EXPLAIN SELECT DISTINCT a, MAX(b) FROM t1 WHERE a >= 0 GROUP BY a,a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range idx1,idx3 idx3 5 NULL 100 Using where; Using index
+SELECT DISTINCT a, MAX(b) FROM t1 WHERE a >= 0 GROUP BY a,a;
+a MAX(b)
+1 10
+2 10
+3 10
+4 10
+5 10
+6 10
+7 10
+8 10
+9 10
+10 10
+DROP TABLE t0, t1;
# End of tests
diff --git a/mysql-test/r/group_min_max.result b/mysql-test/r/group_min_max.result
index cf867dd1e18..7d57222aafd 100644
--- a/mysql-test/r/group_min_max.result
+++ b/mysql-test/r/group_min_max.result
@@ -2378,6 +2378,7 @@ SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
Handler_read_key 8
Handler_read_next 0
+Handler_read_retry 0
EXPLAIN SELECT max(b), a FROM t1 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range NULL a 5 NULL 8 Using index for group-by
@@ -2387,6 +2388,7 @@ SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
Handler_read_key 8
Handler_read_next 0
+Handler_read_retry 0
FLUSH STATUS;
SELECT * FROM (SELECT max(b), a FROM t1 GROUP BY a) b;
max(b) a
@@ -2398,6 +2400,7 @@ SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
Handler_read_key 8
Handler_read_next 0
+Handler_read_retry 0
FLUSH STATUS;
(SELECT max(b), a FROM t1 GROUP BY a) UNION
(SELECT max(b), a FROM t1 GROUP BY a);
@@ -2410,6 +2413,7 @@ SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
Handler_read_key 16
Handler_read_next 0
+Handler_read_retry 0
EXPLAIN (SELECT max(b), a FROM t1 GROUP BY a) UNION
(SELECT max(b), a FROM t1 GROUP BY a);
id select_type table type possible_keys key key_len ref rows Extra
@@ -2462,6 +2466,7 @@ SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
Handler_read_key 8
Handler_read_next 0
+Handler_read_retry 0
DELETE FROM t3;
FLUSH STATUS;
INSERT INTO t3 SELECT 1, (SELECT MAX(b) FROM t1 GROUP BY a HAVING a < 2)
@@ -2470,12 +2475,14 @@ SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
Handler_read_key 8
Handler_read_next 0
+Handler_read_retry 0
FLUSH STATUS;
DELETE FROM t3 WHERE (SELECT MAX(b) FROM t1 GROUP BY a HAVING a < 2) > 10000;
SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
Handler_read_key 8
Handler_read_next 0
+Handler_read_retry 0
FLUSH STATUS;
DELETE FROM t3 WHERE (SELECT (SELECT MAX(b) FROM t1 GROUP BY a HAVING a < 2) x
FROM t1) > 10000;
@@ -2484,6 +2491,7 @@ SHOW STATUS LIKE 'handler_read__e%';
Variable_name Value
Handler_read_key 8
Handler_read_next 1
+Handler_read_retry 0
DROP TABLE t1,t2,t3;
CREATE TABLE t1 (a int, INDEX idx(a));
INSERT INTO t1 VALUES
diff --git a/mysql-test/r/handler_read_last.result b/mysql-test/r/handler_read_last.result
index 574c3c25ab1..9dd3784673a 100644
--- a/mysql-test/r/handler_read_last.result
+++ b/mysql-test/r/handler_read_last.result
@@ -12,6 +12,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -26,6 +27,7 @@ Handler_read_key 0
Handler_read_last 1
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -42,6 +44,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 2
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -58,6 +61,7 @@ Handler_read_key 0
Handler_read_last 1
Handler_read_next 0
Handler_read_prev 2
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
diff --git a/mysql-test/r/index_merge_myisam.result b/mysql-test/r/index_merge_myisam.result
index a857e2a21ff..6fbe7514483 100644
--- a/mysql-test/r/index_merge_myisam.result
+++ b/mysql-test/r/index_merge_myisam.result
@@ -292,7 +292,7 @@ set optimizer_switch='derived_merge=off,derived_with_keys=off';
explain select * from (select * from t1 where key1 = 3 or key2 =3) as Z where key8 >5;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 Using where
-2 DERIVED t1 index_merge i1,i2 i1,i2 4,4 NULL 2 Using union(i1,i2); Using where
+2 DERIVED t1 index_merge i1,i2,i8 i1,i2 4,4 NULL 2 Using union(i1,i2); Using where
set optimizer_switch=@tmp_optimizer_switch;
create table t3 like t0;
insert into t3 select * from t0;
diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result
index 098332a7de6..c7a4edba65a 100644
--- a/mysql-test/r/information_schema.result
+++ b/mysql-test/r/information_schema.result
@@ -273,6 +273,8 @@ latin1_bin latin1 47 # 1
latin1_general_ci latin1 48 # 1
latin1_general_cs latin1 49 # 1
latin1_spanish_ci latin1 94 # 1
+latin1_swedish_nopad_ci latin1 1032 # 1
+latin1_nopad_bin latin1 1071 # 1
SHOW COLLATION LIKE 'latin1%';
Collation Charset Id Default Compiled Sortlen
latin1_german1_ci latin1 5 # 1
@@ -283,6 +285,8 @@ latin1_bin latin1 47 # 1
latin1_general_ci latin1 48 # 1
latin1_general_cs latin1 49 # 1
latin1_spanish_ci latin1 94 # 1
+latin1_swedish_nopad_ci latin1 1032 # 1
+latin1_nopad_bin latin1 1071 # 1
SHOW COLLATION WHERE collation like 'latin1%';
Collation Charset Id Default Compiled Sortlen
latin1_german1_ci latin1 5 # 1
@@ -293,6 +297,8 @@ latin1_bin latin1 47 # 1
latin1_general_ci latin1 48 # 1
latin1_general_cs latin1 49 # 1
latin1_spanish_ci latin1 94 # 1
+latin1_swedish_nopad_ci latin1 1032 # 1
+latin1_nopad_bin latin1 1071 # 1
select * from information_schema.COLLATION_CHARACTER_SET_APPLICABILITY
where COLLATION_NAME like 'latin1%';
COLLATION_NAME CHARACTER_SET_NAME
@@ -304,6 +310,8 @@ latin1_bin latin1
latin1_general_ci latin1
latin1_general_cs latin1
latin1_spanish_ci latin1
+latin1_swedish_nopad_ci latin1
+latin1_nopad_bin latin1
drop procedure if exists sel2;
drop function if exists sub1;
drop function if exists sub2;
@@ -440,6 +448,8 @@ latin1_bin
latin1_general_ci
latin1_general_cs
latin1_spanish_ci
+latin1_swedish_nopad_ci
+latin1_nopad_bin
show keys from v4;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment
select * from information_schema.views where TABLE_NAME like "v%";
@@ -585,7 +595,7 @@ CHARACTER_SETS CREATE TEMPORARY TABLE `CHARACTER_SETS` (
`CHARACTER_SET_NAME` varchar(32) NOT NULL DEFAULT '',
`DEFAULT_COLLATE_NAME` varchar(32) NOT NULL DEFAULT '',
`DESCRIPTION` varchar(60) NOT NULL DEFAULT '',
- `MAXLEN` bigint(3) NOT NULL DEFAULT '0'
+ `MAXLEN` bigint(3) NOT NULL DEFAULT 0
) ENGINE=MEMORY DEFAULT CHARSET=utf8
set names latin2;
SHOW CREATE TABLE INFORMATION_SCHEMA.character_sets;
@@ -594,7 +604,7 @@ CHARACTER_SETS CREATE TEMPORARY TABLE `CHARACTER_SETS` (
`CHARACTER_SET_NAME` varchar(32) NOT NULL DEFAULT '',
`DEFAULT_COLLATE_NAME` varchar(32) NOT NULL DEFAULT '',
`DESCRIPTION` varchar(60) NOT NULL DEFAULT '',
- `MAXLEN` bigint(3) NOT NULL DEFAULT '0'
+ `MAXLEN` bigint(3) NOT NULL DEFAULT 0
) ENGINE=MEMORY DEFAULT CHARSET=utf8
set names latin1;
create table t1 select * from information_schema.CHARACTER_SETS
@@ -609,7 +619,7 @@ t1 CREATE TABLE `t1` (
`CHARACTER_SET_NAME` varchar(32) NOT NULL DEFAULT '',
`DEFAULT_COLLATE_NAME` varchar(32) NOT NULL DEFAULT '',
`DESCRIPTION` varchar(60) NOT NULL DEFAULT '',
- `MAXLEN` bigint(3) NOT NULL DEFAULT '0'
+ `MAXLEN` bigint(3) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=utf8
drop table t1;
create view v1 as select * from information_schema.TABLES;
diff --git a/mysql-test/r/information_schema_parameters.result b/mysql-test/r/information_schema_parameters.result
index 08339f79270..4643b26a259 100644
--- a/mysql-test/r/information_schema_parameters.result
+++ b/mysql-test/r/information_schema_parameters.result
@@ -6,7 +6,7 @@ PARAMETERS CREATE TEMPORARY TABLE `PARAMETERS` (
`SPECIFIC_CATALOG` varchar(512) NOT NULL DEFAULT '',
`SPECIFIC_SCHEMA` varchar(64) NOT NULL DEFAULT '',
`SPECIFIC_NAME` varchar(64) NOT NULL DEFAULT '',
- `ORDINAL_POSITION` int(21) NOT NULL DEFAULT '0',
+ `ORDINAL_POSITION` int(21) NOT NULL DEFAULT 0,
`PARAMETER_MODE` varchar(5) DEFAULT NULL,
`PARAMETER_NAME` varchar(64) DEFAULT NULL,
`DATA_TYPE` varchar(64) NOT NULL DEFAULT '',
diff --git a/mysql-test/r/information_schema_stats.result b/mysql-test/r/information_schema_stats.result
index cd73636879c..bc2ce9f0294 100644
--- a/mysql-test/r/information_schema_stats.result
+++ b/mysql-test/r/information_schema_stats.result
@@ -16,8 +16,8 @@ count(*)
2
select * from information_schema.index_statistics where table_schema='test' and table_name='just_a_test';
TABLE_SCHEMA TABLE_NAME INDEX_NAME ROWS_READ
-test just_a_test IND_just_a_test_state 2
test just_a_test IND_just_a_test_first_name_last_name 1
+test just_a_test IND_just_a_test_state 2
select * from information_schema.table_statistics where table_schema='test' and table_name='just_a_test';
TABLE_SCHEMA TABLE_NAME ROWS_READ ROWS_CHANGED ROWS_CHANGED_X_INDEXES
test just_a_test 18 5 5
@@ -56,9 +56,9 @@ count(*)
3
select * from information_schema.index_statistics where table_schema='test' and table_name='just_a_test';
TABLE_SCHEMA TABLE_NAME INDEX_NAME ROWS_READ
+test just_a_test PRIMARY 5
test just_a_test first_name 1
test just_a_test state 2
-test just_a_test PRIMARY 5
select * from information_schema.table_statistics where table_schema='test' and table_name='just_a_test';
TABLE_SCHEMA TABLE_NAME ROWS_READ ROWS_CHANGED ROWS_CHANGED_X_INDEXES
test just_a_test 8 5 15
diff --git a/mysql-test/r/innodb_ext_key.result b/mysql-test/r/innodb_ext_key.result
index cae402a9f12..1305be86e5a 100644
--- a/mysql-test/r/innodb_ext_key.result
+++ b/mysql-test/r/innodb_ext_key.result
@@ -20,6 +20,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 5
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -39,6 +40,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 1
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -60,6 +62,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -81,6 +84,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -102,6 +106,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 6
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -123,6 +128,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 1
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -146,6 +152,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 6
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -169,6 +176,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 3
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -188,6 +196,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 6
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -207,6 +216,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -228,6 +238,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 6
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -249,6 +260,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -270,6 +282,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 5
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -291,6 +304,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -317,6 +331,7 @@ Handler_read_key 2
Handler_read_last 0
Handler_read_next 9
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 9
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -343,6 +358,7 @@ Handler_read_key 2
Handler_read_last 0
Handler_read_next 2
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 2
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -370,6 +386,7 @@ Handler_read_key 2
Handler_read_last 0
Handler_read_next 9
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 9
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -397,6 +414,7 @@ Handler_read_key 2
Handler_read_last 0
Handler_read_next 3
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 3
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -422,6 +440,7 @@ Handler_read_key 2
Handler_read_last 0
Handler_read_next 9
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 3
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -447,6 +466,7 @@ Handler_read_key 2
Handler_read_last 0
Handler_read_next 3
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 3
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -477,6 +497,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 294
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -507,6 +528,7 @@ Handler_read_key 21
Handler_read_last 1
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -529,6 +551,7 @@ Handler_read_key 2
Handler_read_last 0
Handler_read_next 1230
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -551,6 +574,7 @@ Handler_read_key 6
Handler_read_last 1
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -581,6 +605,7 @@ Handler_read_key 3
Handler_read_last 0
Handler_read_next 26
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -610,6 +635,7 @@ Handler_read_key 3
Handler_read_last 0
Handler_read_next 3
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -807,6 +833,7 @@ Handler_read_key 10
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 11
@@ -828,6 +855,7 @@ Handler_read_key 10
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 11
@@ -1040,5 +1068,70 @@ a
1
drop table t1, t2;
set optimizer_switch=@save_optimizer_switch;
+#
+# MDEV-10325: Queries examines all rows of a tables when it should not
+#
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1 (
+pk int not null,
+col1 varchar(32),
+filler varchar(100),
+key idx1(col1(10)),
+primary key (pk)
+)engine=innodb;
+insert into t1
+select
+A.a + 10*B.a + 100*C.a,
+concat('1234567890-', 1000+ A.a + 10*B.a + 100*C.a),
+repeat('filler-data-', 4)
+from
+t0 A, t0 B, t0 C;
+drop table t0,t1;
+#
+# MDEV-10360: Extended keys: index properties depend on index order
+#
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1 (
+index_id bigint(20) unsigned NOT NULL,
+index_class varchar(265) COLLATE latin1_general_ci DEFAULT NULL ,
+index_object_id int(10) unsigned NOT NULL DEFAULT '0' ,
+index_date_updated int(10) unsigned DEFAULT NULL ,
+PRIMARY KEY (index_id),
+KEY object (index_class(181),index_object_id),
+KEY index_date_updated (index_date_updated)
+) engine=innodb;
+create table t2 (
+index_id bigint(20) unsigned NOT NULL,
+index_class varchar(265) COLLATE latin1_general_ci DEFAULT NULL ,
+index_object_id int(10) unsigned NOT NULL DEFAULT '0' ,
+index_date_updated int(10) unsigned DEFAULT NULL ,
+PRIMARY KEY (index_id),
+KEY index_date_updated (index_date_updated),
+KEY object (index_class(181),index_object_id)
+) engine=innodb;
+insert into t1 select
+@a:=A.a + 10*B.a + 100*C.a,
+concat('val-', @a),
+123456,
+A.a + 10*B.a
+from
+t0 A, t0 B, t0 C;
+insert into t2 select * from t1;
+# This must have the same query plan as the query below it:
+# type=range, key=index_date_updated, key_len=13
+explain
+select * from t1 force index(index_date_updated)
+where index_date_updated= 10 and index_id < 800;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range index_date_updated index_date_updated 13 NULL # Using index condition
+# This used to work from the start:
+explain
+select * from t2 force index(index_date_updated)
+where index_date_updated= 10 and index_id < 800;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 range index_date_updated index_date_updated 13 NULL # Using index condition
+drop table t0,t1,t2;
set optimizer_switch=@save_ext_key_optimizer_switch;
SET SESSION STORAGE_ENGINE=DEFAULT;
diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result
index 8bfc4e9215e..3f4a26a728e 100644
--- a/mysql-test/r/insert_select.result
+++ b/mysql-test/r/insert_select.result
@@ -701,6 +701,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 1
diff --git a/mysql-test/r/join.result b/mysql-test/r/join.result
index 536fd4ab97f..7b476ca6415 100644
--- a/mysql-test/r/join.result
+++ b/mysql-test/r/join.result
@@ -860,6 +860,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 5
@@ -1271,6 +1272,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 1
@@ -1491,7 +1493,7 @@ EXPLAIN EXTENDED
SELECT * FROM t1 JOIN v2 ON i1 = i2 WHERE a < b;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
-2 DERIVED t2 ALL NULL NULL NULL NULL 2 100.00
+2 DERIVED t2 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
Note 1003 select NULL AS `i1`,`v2`.`i2` AS `i2`,`v2`.`a` AS `a`,`v2`.`b` AS `b` from `test`.`v2` where ((`v2`.`i2` = NULL) and (`v2`.`a` < `v2`.`b`))
DROP VIEW v2;
diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result
index 2602181f234..8b4ee17f20e 100644
--- a/mysql-test/r/join_outer.result
+++ b/mysql-test/r/join_outer.result
@@ -1242,6 +1242,7 @@ Handler_read_key 5
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 6
@@ -1803,6 +1804,7 @@ Handler_read_key 4
Handler_read_last 0
Handler_read_next 5
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 1048581
@@ -1817,6 +1819,7 @@ Handler_read_key 4
Handler_read_last 0
Handler_read_next 5
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 1048581
diff --git a/mysql-test/r/join_outer_jcl6.result b/mysql-test/r/join_outer_jcl6.result
index 51f43f1404e..9cdcea379b9 100644
--- a/mysql-test/r/join_outer_jcl6.result
+++ b/mysql-test/r/join_outer_jcl6.result
@@ -1253,6 +1253,7 @@ Handler_read_key 5
Handler_read_last 0
Handler_read_next 9
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 3
Handler_read_rnd_deleted 0
Handler_read_rnd_next 6
@@ -1814,6 +1815,7 @@ Handler_read_key 4
Handler_read_last 0
Handler_read_next 5
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 5
Handler_read_rnd_deleted 0
Handler_read_rnd_next 1048581
@@ -1828,6 +1830,7 @@ Handler_read_key 4
Handler_read_last 0
Handler_read_next 5
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 5
Handler_read_rnd_deleted 0
Handler_read_rnd_next 1048581
diff --git a/mysql-test/r/limit_rows_examined.result b/mysql-test/r/limit_rows_examined.result
index cce8ee5a8e2..a7c477c9e4b 100644
--- a/mysql-test/r/limit_rows_examined.result
+++ b/mysql-test/r/limit_rows_examined.result
@@ -756,6 +756,7 @@ Handler_read_key 5
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 46
@@ -780,6 +781,7 @@ Handler_read_key 5
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 2
Handler_read_rnd_deleted 1
Handler_read_rnd_next 47
diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result
index 16572dd95c5..d21402a336a 100644
--- a/mysql-test/r/loaddata.result
+++ b/mysql-test/r/loaddata.result
@@ -537,7 +537,7 @@ disconnect con1;
# Bug#11765139 58069: LOAD DATA INFILE: VALGRIND REPORTS INVALID MEMORY READS AND WRITES WITH U
#
CREATE TABLE t1(f1 INT);
-SELECT 0xE1BB30 INTO OUTFILE 't1.dat';
+SELECT 0xE1C330 INTO OUTFILE 't1.dat';
LOAD DATA INFILE 't1.dat' IGNORE INTO TABLE t1 CHARACTER SET utf8;
DROP TABLE t1;
#
@@ -562,3 +562,34 @@ FIELDS TERMINATED BY 't' LINES TERMINATED BY '';
Got one of the listed errors
SET @@sql_mode= @old_mode;
DROP TABLE t1;
+
+#
+# Bug#23080148 - Backport of Bug#20683959.
+# Bug#20683959 LOAD DATA INFILE IGNORES A SPECIFIC ROW SILENTLY
+# UNDER DB CHARSET IS UTF8.
+#
+CREATE DATABASE d1 CHARSET latin1;
+USE d1;
+CREATE TABLE t1 (val TEXT);
+LOAD DATA INFILE '../../std_data/bug20683959loaddata.txt' INTO TABLE t1;
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+1
+SELECT HEX(val) FROM t1;
+HEX(val)
+C38322525420406E696F757A656368756E3A20E98198E2889AF58081AEE7B99DE4B88AE383A3E7B99DE69690F58087B3E7B9A7EFBDA8E7B99DEFBDB3E7B99DE78999E880B3E7B8BAEFBDAAE7B9A7E89699E296A1E7B8BAE4BBA3EFBD8CE7B8BAEFBDA9E7B8B2E2889AE38184E7B99DEFBDB3E7B99DE4B88AE383A3E7B99DE69690F58087B3E7B9A7EFBDA8E7B99DEFBDB3E7B99DE5B3A8EFBD84E8ABA0EFBDA8E89C89F580948EE599AAE7B8BAEFBDAAE7B8BAE9A198EFBDA9EFBDB1E7B9A7E581B5E289A0E7B8BAEFBDBEE7B9A7E9A194EFBDA9E882B4EFBDA5EFBDB5E980A7F5808B96E28693E99EABE38287E58F99E7B8BAE58AB1E28691E7B8BAF5808B9AE7828AE98095EFBDB1E7B8BAEFBDAFE7B8B2E288ABE6A89FE89EB3E6BA98F58081ADE88EA0EFBDBAE98095E6BA98F58081AEE89D93EFBDBAE8AD9BEFBDACE980A7F5808B96E28693E7B8BAF580918EE288AAE7B8BAE4B88AEFBC9EE7B8BAE4B99DE28691E7B8BAF5808B96EFBCA0E88DB3E6A68AEFBDB9EFBDB3E981B2E5B3A8E296A1E7B8BAE7A4BCE7828AE88DB3E6A68AEFBDB0EFBDBDE7B8BAA0E7B8BAE88B93EFBDBEE5B899EFBC9E
+CREATE DATABASE d2 CHARSET utf8;
+USE d2;
+CREATE TABLE t1 (val TEXT);
+LOAD DATA INFILE '../../std_data/bug20683959loaddata.txt' INTO TABLE t1;
+Warnings:
+Warning 1366 Incorrect string value: '\xF5\x80\x81\xAE\xE7\xB9...' for column 'val' at row 1
+SELECT COUNT(*) FROM t1;
+COUNT(*)
+1
+SELECT HEX(val) FROM t1;
+HEX(val)
+C38322525420406E696F757A656368756E3A20E98198E2889A3F3F3F3FE7B99DE4B88AE383A3E7B99DE696903F3F3F3FE7B9A7EFBDA8E7B99DEFBDB3E7B99DE78999E880B3E7B8BAEFBDAAE7B9A7E89699E296A1E7B8BAE4BBA3EFBD8CE7B8BAEFBDA9E7B8B2E2889AE38184E7B99DEFBDB3E7B99DE4B88AE383A3E7B99DE696903F3F3F3FE7B9A7EFBDA8E7B99DEFBDB3E7B99DE5B3A8EFBD84E8ABA0EFBDA8E89C893F3F3F3FE599AAE7B8BAEFBDAAE7B8BAE9A198EFBDA9EFBDB1E7B9A7E581B5E289A0E7B8BAEFBDBEE7B9A7E9A194EFBDA9E882B4EFBDA5EFBDB5E980A73F3F3F3FE28693E99EABE38287E58F99E7B8BAE58AB1E28691E7B8BA3F3F3F3FE7828AE98095EFBDB1E7B8BAEFBDAFE7B8B2E288ABE6A89FE89EB3E6BA983F3F3F3FE88EA0EFBDBAE98095E6BA983F3F3F3FE89D93EFBDBAE8AD9BEFBDACE980A73F3F3F3FE28693E7B8BA3F3F3F3FE288AAE7B8BAE4B88AEFBC9EE7B8BAE4B99DE28691E7B8BA3F3F3F3FEFBCA0E88DB3E6A68AEFBDB9EFBDB3E981B2E5B3A8E296A1E7B8BAE7A4BCE7828AE88DB3E6A68AEFBDB0EFBDBDE7B8BA3FE7B8BAE88B93EFBDBEE5B899EFBC9E
+DROP TABLE d1.t1, d2.t1;
+DROP DATABASE d1;
+DROP DATABASE d2;
diff --git a/mysql-test/r/myisam_enable_keys-10506.result b/mysql-test/r/myisam_enable_keys-10506.result
new file mode 100644
index 00000000000..e7ffba787f0
--- /dev/null
+++ b/mysql-test/r/myisam_enable_keys-10506.result
@@ -0,0 +1,114 @@
+CREATE TABLE t1 (
+pk INT AUTO_INCREMENT,
+i INT,
+d DATE,
+dt DATETIME,
+v VARCHAR(1),
+PRIMARY KEY (pk),
+KEY (dt)
+) ENGINE=MyISAM;
+INSERT INTO t1 (i, d, dt, v) VALUES
+(9, '2005-07-23', '2004-05-13 01:01:39', 't'),
+(2, '2009-11-01', '2003-12-24 07:39:29', 'h'),
+(6, NULL, '2008-07-03 05:32:22', 'l'),
+(6, '2007-07-16', '2008-08-28 18:46:11', 'j'),
+(5, NULL, '2001-07-12 21:27:00', 'h'),
+(3, '2007-07-22', '1900-01-01 00:00:00', 'p'),
+(2, '2000-11-21', '2007-05-25 11:58:54', 'g'),
+(6, '1900-01-01', '2009-06-03 17:11:10', 'i'),
+(2, '2008-02-10', '2001-06-15 16:20:07', 'p'),
+(3, '2009-06-04', '1900-01-01 00:00:00', 'h'),
+(9, '2007-04-25', '1900-01-01 00:00:00', 'e'),
+(9, '2006-03-02', '1900-01-01 00:00:00', 'e'),
+(1, '1900-01-01', '2002-11-08 09:33:27', 'u'),
+(7, '2008-07-13', '2007-08-07 17:35:52', 'j'),
+(0, '2004-11-12', '2006-05-01 00:00:00', 'e'),
+(0, '1900-01-01', '2003-05-01 00:00:00', 'z'),
+(1, '2009-09-02', '2007-02-12 09:30:49', 'w'),
+(0, '2004-11-06', '1900-01-01 00:00:00', 't'),
+(4, '2003-01-06', '2002-07-03 02:51:11', 'i'),
+(6, '2006-01-14', '2008-02-26 04:57:32', 'i'),
+(0, '2002-01-19', '2009-02-12 00:00:00', 'i'),
+(8, '2007-02-12', '1900-01-01 00:00:00', 'b'),
+(4, '1900-01-01', '2001-05-16 05:28:40', 'm'),
+(2, '2005-07-16', NULL, 'j'),
+(1, '2004-09-04', '2001-01-24 21:45:18', 'v'),
+(3, '2009-07-01', NULL, NULL),
+(2, '2009-07-21', '2002-07-24 00:00:00', 'h'),
+(4, NULL, '2001-11-03 12:22:30', 'q'),
+(1, '2002-06-22', '2008-06-17 03:17:59', 'f'),
+(7, '2005-06-23', '2005-12-24 00:00:00', 'p'),
+(6, '2001-05-20', '2008-10-23 00:00:00', NULL),
+(3, '2001-10-01', '2000-10-12 16:32:35', 'o'),
+(3, '2001-01-07', '2005-09-11 10:09:54', 'w'),
+(6, '2007-11-02', '2009-09-10 01:44:18', 'l'),
+(6, NULL, NULL, 'i'),
+(9, NULL, '2002-05-18 15:21:55', 'd'),
+(4, '2008-12-21', '2004-10-15 10:09:54', 'j'),
+(6, '2003-10-05', '2009-07-13 03:51:02', 'e'),
+(2, '2001-03-03', '1900-01-01 00:00:00', 'e'),
+(2, '2007-04-04', '2001-11-08 21:14:52', 'q'),
+(5, NULL, '2006-12-02 00:00:00', 'm'),
+(0, '2009-01-04', '1900-01-01 00:00:00', NULL),
+(8, '2008-04-03', '2005-01-01 11:55:18', 'q'),
+(8, NULL, '2005-02-28 03:44:02', 'w'),
+(0, '2003-08-22', NULL, 'c'),
+(9, '1900-01-01', NULL, 'y'),
+(NULL, NULL, '2006-08-25 16:28:09', 'g'),
+(5, '2004-07-04', '2002-08-11 00:00:00', 'z'),
+(1, '1900-01-01', '2007-07-22 21:19:18', 'm'),
+(2, '2007-02-04', '2006-02-10 18:41:38', 't'),
+(2, '1900-01-01', '2009-02-16 14:58:58', 'd'),
+(7, '2001-03-14', '2007-08-14 00:00:00', 'h'),
+(0, NULL, '1900-01-01 00:00:00', NULL),
+(1, '2008-10-05', NULL, 'f'),
+(6, '2001-11-25', '2008-12-03 06:59:23', 'l'),
+(NULL, '2003-01-27', '2008-10-04 00:00:00', 'g'),
+(8, '2008-08-08', '2009-07-07 07:00:21', 'v'),
+(8, '2006-07-03', '2001-04-15 00:00:00', NULL),
+(5, '2002-11-21', '2007-07-08 04:01:58', 'm'),
+(5, '2006-04-08', '2007-09-23 00:01:35', 'i'),
+(5, '2001-05-06', '2008-05-15 00:00:00', 'h'),
+(7, '1900-01-01', '1900-01-01 00:00:00', 'u'),
+(30, '2007-04-16', '2004-03-05 23:35:38', 'o'),
+(NULL, '1900-01-01', '2007-08-25 01:32:47', 'z'),
+(6, '2004-12-03', '1900-01-01 00:00:00', 'o'),
+(8, '2001-06-23', '1900-01-01 00:00:00', 'f'),
+(NULL, '2008-12-15', '2001-05-19 08:28:28', 'a'),
+(9, '2000-02-15', '2009-09-03 06:07:22', 'd'),
+(2, '2001-08-05', '2006-10-08 07:17:27', 'k'),
+(5, '2004-01-17', '2003-09-06 20:36:01', 'd'),
+(4, '2003-10-01', '2001-02-05 18:10:49', 'u'),
+(4, '2003-07-28', '2001-01-07 16:11:37', 'h'),
+(0, '1900-01-01', '2008-08-01 05:26:38', 'w'),
+(9, '1900-01-01', '2001-05-08 00:00:00', 't'),
+(1, '2000-04-17', '2008-07-10 21:26:28', 'i'),
+(8, '2002-01-05', '2006-08-06 20:56:35', 'k'),
+(9, '2001-04-10', '2003-02-17 00:00:00', 'z'),
+(0, '2009-12-04', NULL, 'h'),
+(7, NULL, '2004-10-27 00:29:57', 'h'),
+(2, '2006-03-07', '2008-03-04 06:14:13', 'b'),
+(0, '2001-10-15', '2001-03-17 00:00:00', 'm'),
+(5, '1900-01-01', '2009-02-21 11:35:50', 'i'),
+(4, NULL, '1900-01-01 00:00:00', 'w'),
+(5, '2009-04-05', '1900-01-01 00:00:00', 'm'),
+(6, '2001-03-19', '2001-04-12 00:00:00', 'q'),
+(NULL, '2009-12-08', '2001-12-04 20:21:01', 'k'),
+(2, '2005-02-09', '2001-05-27 08:41:01', 'l'),
+(9, '2004-05-25', '2004-09-18 00:00:00', 'c'),
+(3, '2005-01-17', '2002-09-12 11:18:48', 'd'),
+(0, '2003-08-28', '1900-01-01 00:00:00', 'k'),
+(6, '2006-10-11', '2003-10-28 03:31:02', 'a'),
+(5, '1900-01-01', '2001-08-22 10:20:09', 'p'),
+(8, '1900-01-01', '2008-04-24 00:00:00', 'o'),
+(4, '2005-08-18', '2006-11-10 10:08:49', 'e'),
+(NULL, '2007-03-12', '2007-10-16 00:00:00', 'n'),
+(1, '2000-11-18', '2009-05-27 12:25:07', 't'),
+(4, '2001-03-03', NULL, 'u'),
+(3, '2003-09-11', '2001-09-10 18:10:10', 'f'),
+(4, '2007-06-17', '1900-01-01 00:00:00', 't'),
+(NULL, '2008-09-11', '2004-06-07 23:17:09', 'k');
+ALTER TABLE t1 ADD UNIQUE KEY ind1 (pk, d, i, v);
+ALTER TABLE t1 ADD UNIQUE KEY ind2 (d, v);
+ERROR 23000: Duplicate entry '2008-09-11-k' for key 'ind2'
+DROP TABLE t1;
diff --git a/mysql-test/r/mysql5613mysql.result b/mysql-test/r/mysql5613mysql.result
index 9f32cb57a38..1d2c3b97baf 100644
--- a/mysql-test/r/mysql5613mysql.result
+++ b/mysql-test/r/mysql5613mysql.result
@@ -82,7 +82,7 @@ SHOW CREATE TABLE func;
Table Create Table
func CREATE TABLE `func` (
`name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
- `ret` tinyint(1) NOT NULL DEFAULT '0',
+ `ret` tinyint(1) NOT NULL DEFAULT 0,
`dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '',
`type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL,
PRIMARY KEY (`name`)
@@ -152,7 +152,7 @@ proxies_priv CREATE TABLE `proxies_priv` (
`User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
`Proxied_host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`Proxied_user` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
- `With_grant` tinyint(1) NOT NULL DEFAULT '0',
+ `With_grant` tinyint(1) NOT NULL DEFAULT 0,
`Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '',
`Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`),
@@ -169,7 +169,7 @@ servers CREATE TABLE `servers` (
`Db` char(64) NOT NULL DEFAULT '',
`Username` char(64) NOT NULL DEFAULT '',
`Password` char(64) NOT NULL DEFAULT '',
- `Port` int(4) NOT NULL DEFAULT '0',
+ `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 '',
@@ -241,8 +241,8 @@ Table Create Table
time_zone_transition_type CREATE TABLE `time_zone_transition_type` (
`Time_zone_id` int(10) unsigned NOT NULL,
`Transition_type_id` int(10) unsigned NOT NULL,
- `Offset` int(11) NOT NULL DEFAULT '0',
- `Is_DST` tinyint(3) unsigned NOT NULL DEFAULT '0',
+ `Offset` int(11) NOT NULL DEFAULT 0,
+ `Is_DST` tinyint(3) unsigned NOT NULL DEFAULT 0,
`Abbreviation` char(8) NOT NULL DEFAULT '',
PRIMARY KEY (`Time_zone_id`,`Transition_type_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Time zone transition types'
@@ -288,10 +288,10 @@ user CREATE TABLE `user` (
`ssl_cipher` blob NOT NULL,
`x509_issuer` blob NOT NULL,
`x509_subject` blob NOT NULL,
- `max_questions` int(11) unsigned NOT NULL DEFAULT '0',
- `max_updates` int(11) unsigned NOT NULL DEFAULT '0',
- `max_connections` int(11) unsigned NOT NULL DEFAULT '0',
- `max_user_connections` int(11) unsigned NOT NULL DEFAULT '0',
+ `max_questions` int(11) unsigned NOT NULL DEFAULT 0,
+ `max_updates` int(11) unsigned NOT NULL DEFAULT 0,
+ `max_connections` int(11) unsigned NOT NULL DEFAULT 0,
+ `max_user_connections` int(11) unsigned NOT NULL DEFAULT 0,
`plugin` char(64) COLLATE utf8_bin DEFAULT '',
`authentication_string` text COLLATE utf8_bin DEFAULT NULL,
`password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
diff --git a/mysql-test/r/mysqlcheck.result b/mysql-test/r/mysqlcheck.result
index e0d93b02ecd..8894616fbb3 100644
--- a/mysql-test/r/mysqlcheck.result
+++ b/mysql-test/r/mysqlcheck.result
@@ -343,10 +343,37 @@ DROP TABLE bug47205;
#
#MDEV-6128:[PATCH] mysqlcheck wrongly escapes '.' in table names
#
-CREATE TABLE test.`t.1` (id int);
+create table `t.1` (id int);
+create view `v.1` as select 1;
mysqlcheck test t.1
test.t.1 OK
-drop table test.`t.1`;
+mysqlcheck --all-in-1 test t.1
+test.t.1 OK
+mysqlcheck --all-in-1 --databases --process-views test
+test.t.1 OK
+test.v.1 OK
+create table `t.2`(a varchar(20) primary key) default character set utf8 collate utf8_general_ci engine=innodb;
+flush table `t.2`;
+mysqlcheck --check-upgrade --auto-repair test
+test.t.1 OK
+test.t.2
+error : Table rebuild required. Please do "ALTER TABLE `t.2` FORCE" or dump/reload to fix it!
+test.t.3 Needs upgrade
+
+Repairing tables
+test.t.3 OK
+check table `t.1`, `t.2`, `t.3`;
+Table Op Msg_type Msg_text
+test.t.1 check status OK
+test.t.2 check status OK
+test.t.3 check status OK
+check table `t.1`, `t.2`, `t.3` for upgrade;
+Table Op Msg_type Msg_text
+test.t.1 check status OK
+test.t.2 check status OK
+test.t.3 check status OK
+drop view `v.1`;
+drop table test.`t.1`, `t.2`, `t.3`;
#
# MDEV-8123 mysqlcheck: new --process-views option conflicts with --quick, --extended and such
#
@@ -381,6 +408,57 @@ show tables;
Tables_in_test
t1`1
drop table `t1``1`;
+call mtr.add_suppression("ha_myisam");
+call mtr.add_suppression("Checking table");
+create database mysqltest1;
+create table mysqltest1.t1 (a int) engine=myisam;
+create table t2 (a int);
+check table mysqltest1.t1;
+Table Op Msg_type Msg_text
+mysqltest1.t1 check warning Size of datafile is: 4 Should be: 0
+mysqltest1.t1 check error got error: 0 when reading datafile at record: 0
+mysqltest1.t1 check error Corrupt
+mtr.global_suppressions Table is already up to date
+mtr.test_suppressions Table is already up to date
+mysql.column_stats Table is already up to date
+mysql.columns_priv Table is already up to date
+mysql.db Table is already up to date
+mysql.event Table is already up to date
+mysql.func Table is already up to date
+mysql.gtid_slave_pos Table is already up to date
+mysql.help_category Table is already up to date
+mysql.help_keyword Table is already up to date
+mysql.help_relation Table is already up to date
+mysql.help_topic Table is already up to date
+mysql.host Table is already up to date
+mysql.index_stats Table is already up to date
+mysql.innodb_index_stats OK
+mysql.innodb_table_stats OK
+mysql.plugin Table is already up to date
+mysql.proc Table is already up to date
+mysql.procs_priv Table is already up to date
+mysql.proxies_priv Table is already up to date
+mysql.roles_mapping Table is already up to date
+mysql.servers Table is already up to date
+mysql.table_stats Table is already up to date
+mysql.tables_priv Table is already up to date
+mysql.time_zone Table is already up to date
+mysql.time_zone_leap_second Table is already up to date
+mysql.time_zone_name Table is already up to date
+mysql.time_zone_transition Table is already up to date
+mysql.time_zone_transition_type Table is already up to date
+mysql.user Table is already up to date
+mysqltest1.t1
+warning : Table is marked as crashed
+warning : Size of datafile is: 4 Should be: 0
+error : got error: 0 when reading datafile at record: 0
+error : Corrupt
+test.t2 Table is already up to date
+
+Repairing tables
+mysqltest1.t1 OK
+drop table t2;
+drop database mysqltest1;
#
#MDEV-7384 [PATCH] add PERSISENT FOR ALL option to mysqlanalyze/mysqlcheck
#
diff --git a/mysql-test/r/mysqld--help,win.rdiff b/mysql-test/r/mysqld--help,win.rdiff
index ac10f37b5be..12c9588bb3f 100644
--- a/mysql-test/r/mysqld--help,win.rdiff
+++ b/mysql-test/r/mysqld--help,win.rdiff
@@ -8,7 +8,7 @@
--lc-messages=name Set the language used for the error messages.
-L, --lc-messages-dir=name
Directory where error messages are
-@@ -517,6 +516,7 @@
+@@ -520,6 +519,7 @@
Use MySQL-5.6 (instead of MariaDB-5.3) format for TIME,
DATETIME, TIMESTAMP columns.
(Defaults to on; use --skip-mysql56-temporal-format to disable.)
@@ -16,17 +16,17 @@
--net-buffer-length=#
Buffer length for TCP/IP and socket communication
--net-read-timeout=#
-@@ -903,6 +903,9 @@
- files within specified directory
- --server-id=# Uniquely identifies the server instance in the community
- of replication partners
+@@ -927,6 +927,9 @@
+ characteristics (isolation level, read only/read
+ write,snapshot - but not any work done / data modified
+ within the transaction).
+ --shared-memory Enable the shared memory
+ --shared-memory-base-name=name
+ Base name of shared memory
--show-slave-auth-info
Show user and password in SHOW SLAVE HOSTS on this
master.
-@@ -1015,6 +1018,10 @@
+@@ -1039,6 +1042,10 @@
Log slow queries to given log file. Defaults logging to
'hostname'-slow.log. Must be enabled to activate other
slow log options
@@ -37,15 +37,15 @@
--socket=name Socket file to use for connection
--sort-buffer-size=#
Each thread that needs to do a sort allocates a buffer of
-@@ -1033,6 +1040,7 @@
+@@ -1057,6 +1064,7 @@
NO_ENGINE_SUBSTITUTION, PAD_CHAR_TO_FULL_LENGTH
--stack-trace Print a symbolic stack trace on failure
(Defaults to on; use --skip-stack-trace to disable.)
+ --standalone Dummy option to start as a standalone program (NT).
- --stored-program-cache=#
- The soft upper limit for number of cached stored routines
- for one connection.
-@@ -1070,25 +1078,11 @@
+ --standards-compliant-cte
+ Allow only standards compiant CTE
+ (Defaults to on; use --skip-standards-compliant-cte to disable.)
+@@ -1099,25 +1107,11 @@
--thread-cache-size=#
How many threads we should keep in a cache for reuse.
These are freed after 5 minutes of idle time
@@ -73,7 +73,7 @@
--thread-stack=# The stack size for each thread
--time-format=name The TIME format (ignored)
--timed-mutexes Specify whether to time mutexes. Deprecated, has no
-@@ -1097,8 +1091,8 @@
+@@ -1126,8 +1120,8 @@
size, MySQL will automatically convert it to an on-disk
MyISAM or Aria table
-t, --tmpdir=name Path for temporary files. Several paths may be specified,
@@ -84,7 +84,7 @@
--transaction-alloc-block-size=#
Allocation block size for transactions to be stored in
binary log
-@@ -1225,7 +1219,6 @@
+@@ -1252,7 +1246,6 @@
key-cache-division-limit 100
key-cache-file-hash-size 512
key-cache-segments 0
@@ -92,7 +92,7 @@
lc-messages en_US
lc-messages-dir MYSQL_SHAREDIR/
lc-time-names en_US
-@@ -1291,6 +1284,7 @@
+@@ -1319,6 +1312,7 @@
myisam-stats-method NULLS_UNEQUAL
myisam-use-mmap FALSE
mysql56-temporal-format TRUE
@@ -100,16 +100,16 @@
net-buffer-length 16384
net-read-timeout 30
net-retry-count 10
-@@ -1387,6 +1381,8 @@
- secure-auth TRUE
- secure-file-priv (No default value)
- server-id 0
+@@ -1419,6 +1413,8 @@
+ session-track-state-change FALSE
+ session-track-system-variables
+ session-track-transaction-info OFF
+shared-memory FALSE
+shared-memory-base-name MYSQL
show-slave-auth-info FALSE
silent-startup FALSE
skip-grant-tables TRUE
-@@ -1411,6 +1407,7 @@
+@@ -1443,6 +1439,7 @@
slave-type-conversions
slow-launch-time 2
slow-query-log FALSE
@@ -117,7 +117,7 @@
sort-buffer-size 2097152
sql-mode NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
stack-trace TRUE
-@@ -1423,15 +1420,13 @@
+@@ -1456,16 +1453,14 @@
sync-relay-log 10000
sync-relay-log-info 10000
sysdate-is-now FALSE
@@ -126,6 +126,7 @@
table-definition-cache 400
-table-open-cache 431
+table-open-cache 2000
+ table-open-cache-instances 8
tc-heuristic-recover OFF
thread-cache-size 151
-thread-pool-idle-timeout 60
diff --git a/mysql-test/r/mysqld--help.result b/mysql-test/r/mysqld--help.result
index 818316fb45c..34a20487786 100644
--- a/mysql-test/r/mysqld--help.result
+++ b/mysql-test/r/mysqld--help.result
@@ -447,6 +447,9 @@ The following options may be given as the first argument:
max_allowed_packet instead.
--max-prepared-stmt-count=#
Maximum number of prepared statements in the server
+ --max-recursive-iterations[=#]
+ Maximum number of iterations when executing recursive
+ queries
--max-relay-log-size=#
relay log will be rotated automatically when the size
exceeds this value. If 0 at startup, it's set to
@@ -574,7 +577,8 @@ The following options may be given as the first argument:
semijoin_with_cache, join_cache_incremental,
join_cache_hashed, join_cache_bka,
optimize_join_buffer_size, table_elimination,
- extended_keys, exists_to_in, orderby_uses_equalities
+ extended_keys, exists_to_in, orderby_uses_equalities,
+ condition_pushdown_for_derived
--optimizer-use-condition-selectivity=#
Controls selectivity of which conditions the optimizer
takes into account to calculate cardinality of a partial
@@ -900,6 +904,26 @@ The following options may be given as the first argument:
files within specified directory
--server-id=# Uniquely identifies the server instance in the community
of replication partners
+ --session-track-schema
+ Track changes to the default schema.
+ (Defaults to on; use --skip-session-track-schema to disable.)
+ --session-track-state-change
+ Track changes to the session state.
+ --session-track-system-variables=name
+ Track changes in registered system variables. For
+ compatibility with MySQL defaults this variable should be
+ set to "autocommit, character_set_client,
+ character_set_connection, character_set_results,
+ time_zone"
+ --session-track-transaction-info=name
+ 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).
--show-slave-auth-info
Show user and password in SHOW SLAVE HOSTS on this
master.
@@ -1030,6 +1054,9 @@ The following options may be given as the first argument:
NO_ENGINE_SUBSTITUTION, PAD_CHAR_TO_FULL_LENGTH
--stack-trace Print a symbolic stack trace on failure
(Defaults to on; use --skip-stack-trace to disable.)
+ --standards-compliant-cte
+ Allow only standards compiant CTE
+ (Defaults to on; use --skip-standards-compliant-cte to disable.)
--stored-program-cache=#
The soft upper limit for number of cached stored routines
for one connection.
@@ -1061,6 +1088,8 @@ The following options may be given as the first argument:
The number of cached table definitions
--table-open-cache=#
The number of cached open tables
+ --table-open-cache-instances=#
+ Maximum number of table cache instances
--tc-heuristic-recover=name
Decision to use in heuristic recover process. One of: OFF,
COMMIT, ROLLBACK
@@ -1261,6 +1290,7 @@ max-join-size 18446744073709551615
max-length-for-sort-data 1024
max-long-data-size 4194304
max-prepared-stmt-count 16382
+max-recursive-iterations 18446744073709551615
max-relay-log-size 1073741824
max-seeks-for-key 18446744073709551615
max-sort-length 1024
@@ -1297,7 +1327,7 @@ old-style-user-limits FALSE
optimizer-prune-level 1
optimizer-search-depth 62
optimizer-selectivity-sampling-limit 100
-optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on
+optimizer-switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off,condition_pushdown_for_derived=on
optimizer-use-condition-selectivity 1
performance-schema FALSE
performance-schema-accounts-size -1
@@ -1335,7 +1365,7 @@ performance-schema-max-rwlock-instances -1
performance-schema-max-socket-classes 10
performance-schema-max-socket-instances -1
performance-schema-max-stage-classes 150
-performance-schema-max-statement-classes 181
+performance-schema-max-statement-classes 184
performance-schema-max-table-handles -1
performance-schema-max-table-instances -1
performance-schema-max-thread-classes 50
@@ -1380,7 +1410,11 @@ rowid-merge-buff-size 8388608
safe-user-create FALSE
secure-auth TRUE
secure-file-priv (No default value)
-server-id 0
+server-id 1
+session-track-schema TRUE
+session-track-state-change FALSE
+session-track-system-variables
+session-track-transaction-info OFF
show-slave-auth-info FALSE
silent-startup FALSE
skip-grant-tables TRUE
@@ -1408,6 +1442,7 @@ slow-query-log FALSE
sort-buffer-size 2097152
sql-mode NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
stack-trace TRUE
+standards-compliant-cte TRUE
stored-program-cache 256
strict-password-validation TRUE
symbolic-links FALSE
@@ -1420,6 +1455,7 @@ sysdate-is-now FALSE
table-cache 431
table-definition-cache 400
table-open-cache 431
+table-open-cache-instances 8
tc-heuristic-recover OFF
thread-cache-size 151
thread-pool-idle-timeout 60
diff --git a/mysql-test/r/named_pipe.result b/mysql-test/r/named_pipe.result
index aaf2fa063e1..70806a8aff8 100644
--- a/mysql-test/r/named_pipe.result
+++ b/mysql-test/r/named_pipe.result
@@ -2157,3 +2157,4 @@ Warning 1052 Column 'kundentyp' in group statement is ambiguous
drop table t1;
connection default;
disconnect pipe_con;
+FOUND /\[ERROR\] Create named pipe failed/ in second-mysqld.err
diff --git a/mysql-test/r/null_key.result b/mysql-test/r/null_key.result
index e80851329a4..81bfa1ac994 100644
--- a/mysql-test/r/null_key.result
+++ b/mysql-test/r/null_key.result
@@ -429,6 +429,7 @@ Handler_read_key 6
Handler_read_last 0
Handler_read_next 2
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 5
diff --git a/mysql-test/r/openssl_1.result b/mysql-test/r/openssl_1.result
index 12c91721381..712fbf725da 100644
--- a/mysql-test/r/openssl_1.result
+++ b/mysql-test/r/openssl_1.result
@@ -73,8 +73,8 @@ mysqltest: Could not open connection 'default': 2026 SSL connection error: Unabl
SHOW STATUS LIKE 'Ssl_cipher';
Variable_name Value
Ssl_cipher DHE-RSA-AES256-SHA
-Variable_name Value
-Ssl_cipher DHE-RSA-AES256-SHA
+have_ssl
+1
End of 5.0 tests
DROP TABLE IF EXISTS thread_status;
DROP EVENT IF EXISTS event_status;
@@ -220,9 +220,9 @@ is still running; no cipher request crashed the server
GRANT SELECT ON test.* TO bug42158@localhost REQUIRE X509;
FLUSH PRIVILEGES;
connect con1,localhost,bug42158,,,,,SSL;
-SHOW STATUS LIKE 'Ssl_cipher';
-Variable_name Value
-Ssl_cipher DHE-RSA-AES256-SHA
+SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
+have_ssl
+1
disconnect con1;
connection default;
DROP USER bug42158@localhost;
diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result
index 3897184f3b1..262529ef0ce 100644
--- a/mysql-test/r/order_by.result
+++ b/mysql-test/r/order_by.result
@@ -1159,7 +1159,7 @@ INSERT INTO t1 SELECT a +32, b +32 FROM t1;
INSERT INTO t1 SELECT a +64, b +64 FROM t1;
EXPLAIN SELECT a FROM t1 IGNORE INDEX FOR GROUP BY (a, ab) GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range NULL ab 4 NULL 10 Using index for group-by
+1 SIMPLE t1 index NULL PRIMARY 4 NULL 128 Using index
SELECT a FROM t1 IGNORE INDEX FOR GROUP BY (a, ab) GROUP BY a;
a
1
@@ -2860,6 +2860,7 @@ Handler_read_key 250
Handler_read_last 0
Handler_read_next 249
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 249
Handler_read_rnd_deleted 0
Handler_read_rnd_next 250
@@ -2878,6 +2879,7 @@ Handler_read_key 250
Handler_read_last 0
Handler_read_next 249
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 1
Handler_read_rnd_deleted 0
Handler_read_rnd_next 250
diff --git a/mysql-test/r/parser.result b/mysql-test/r/parser.result
index 499f37e6dfb..8ebb45b927b 100644
--- a/mysql-test/r/parser.result
+++ b/mysql-test/r/parser.result
@@ -1239,3 +1239,44 @@ a
20
1
DROP TABLE t1;
+#
+# MDEV-10779 Failing assertion lex->proc_list.elements == 0 or syntax error on PROCEDURE ANALYSE in UNION
+#
+CREATE TABLE t1 (i INT);
+(SELECT * FROM t1 PROCEDURE ANALYSE(10, 10))
+UNION
+(SELECT * FROM t1 PROCEDURE ANALYSE(10, 10));
+ERROR HY000: Incorrect usage of UNION and SELECT ... PROCEDURE ANALYSE()
+(SELECT * FROM t1 PROCEDURE ANALYSE(10, 10))
+UNION
+SELECT * FROM t1 PROCEDURE ANALYSE(10, 10);
+ERROR HY000: Incorrect usage of UNION and SELECT ... PROCEDURE ANALYSE()
+(SELECT * FROM t1 PROCEDURE ANALYSE(10, 10))
+UNION
+(SELECT 1);
+ERROR HY000: Incorrect usage of UNION and SELECT ... PROCEDURE ANALYSE()
+(SELECT * FROM t1 PROCEDURE ANALYSE(10, 10))
+UNION
+SELECT 1;
+ERROR HY000: Incorrect usage of UNION and SELECT ... PROCEDURE ANALYSE()
+SELECT * FROM t1 PROCEDURE ANALYSE(10, 10)
+UNION
+(SELECT * FROM t1 PROCEDURE ANALYSE(10, 10));
+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 'UNION
+(SELECT * FROM t1 PROCEDURE ANALYSE(10, 10))' at line 2
+SELECT * FROM t1 PROCEDURE ANALYSE(10, 10)
+UNION
+SELECT * FROM t1 PROCEDURE ANALYSE(10, 10);
+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 'UNION
+SELECT * FROM t1 PROCEDURE ANALYSE(10, 10)' at line 2
+SELECT * FROM t1 PROCEDURE ANALYSE(10, 10)
+UNION
+(SELECT 1);
+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 'UNION
+(SELECT 1)' at line 2
+SELECT * FROM t1 PROCEDURE ANALYSE(10, 10)
+UNION
+SELECT 1;
+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 'UNION
+SELECT 1' at line 2
+DROP TABLE t1;
diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result
index 71adc194693..a45a389bab1 100644
--- a/mysql-test/r/partition.result
+++ b/mysql-test/r/partition.result
@@ -182,8 +182,8 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`ID` int(11) NOT NULL,
- `aaaa,aaaaa` tinyint(3) unsigned NOT NULL DEFAULT '0',
- `ddddddddd` int(11) NOT NULL DEFAULT '0',
+ `aaaa,aaaaa` tinyint(3) unsigned NOT NULL DEFAULT 0,
+ `ddddddddd` int(11) NOT NULL DEFAULT 0,
`new_field0` varchar(50) DEFAULT NULL,
PRIMARY KEY (`ID`,`aaaa,aaaaa`,`ddddddddd`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -562,6 +562,7 @@ Handler_read_key 2
Handler_read_last 0
Handler_read_next 4
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -582,6 +583,7 @@ Handler_read_key 2
Handler_read_last 0
Handler_read_next 4
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -614,6 +616,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 2
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -632,6 +635,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 2
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -650,6 +654,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 2
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -668,6 +673,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 2
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
diff --git a/mysql-test/r/partition_cache_innodb.result b/mysql-test/r/partition_cache_innodb.result
index 271b23eed92..c12ff3588b0 100644
--- a/mysql-test/r/partition_cache_innodb.result
+++ b/mysql-test/r/partition_cache_innodb.result
@@ -21,7 +21,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`id` int(11) NOT NULL,
`created_at` datetime NOT NULL,
- `cool` tinyint(4) DEFAULT '0'
+ `cool` tinyint(4) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (TO_DAYS(created_at))
(PARTITION month_2010_4 VALUES LESS THAN (734258) ENGINE = InnoDB,
@@ -70,7 +70,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`id` int(11) NOT NULL,
`created_at` datetime NOT NULL,
- `cool` tinyint(4) DEFAULT '0'
+ `cool` tinyint(4) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (TO_DAYS(created_at))
SUBPARTITION BY HASH (cool)
diff --git a/mysql-test/r/partition_cache_myisam.result b/mysql-test/r/partition_cache_myisam.result
index b7d3dc53599..d20a8baeab7 100644
--- a/mysql-test/r/partition_cache_myisam.result
+++ b/mysql-test/r/partition_cache_myisam.result
@@ -21,7 +21,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`id` int(11) NOT NULL,
`created_at` datetime NOT NULL,
- `cool` tinyint(4) DEFAULT '0'
+ `cool` tinyint(4) DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (TO_DAYS(created_at))
(PARTITION month_2010_4 VALUES LESS THAN (734258) ENGINE = MyISAM,
@@ -70,7 +70,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`id` int(11) NOT NULL,
`created_at` datetime NOT NULL,
- `cool` tinyint(4) DEFAULT '0'
+ `cool` tinyint(4) DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1
/*!50100 PARTITION BY RANGE (TO_DAYS(created_at))
SUBPARTITION BY HASH (cool)
diff --git a/mysql-test/r/partition_default.result b/mysql-test/r/partition_default.result
new file mode 100644
index 00000000000..fcf16ba7ccf
--- /dev/null
+++ b/mysql-test/r/partition_default.result
@@ -0,0 +1,1235 @@
+create table t1 (a int, b int)
+PARTITION BY LIST (a)
+(
+PARTITION p2 VALUES IN (4,5,6),
+PARTITION p1 VALUES IN (1)
+)
+;
+insert into t1 values (10,10);
+ERROR HY000: Table has no partition for value 10
+drop table t1;
+create table t1 (a int, b int)
+PARTITION BY LIST (a)
+(
+PARTITION p2 VALUES IN (4,5,6),
+PARTITION p1 VALUES IN (1),
+PARTITION p0 DEFAULT
+)
+;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY LIST (a)
+(PARTITION p2 VALUES IN (4,5,6) ENGINE = MyISAM,
+ PARTITION p1 VALUES IN (1) ENGINE = MyISAM,
+ PARTITION p0 DEFAULT ENGINE = MyISAM) */
+insert into t1 values (10,10);
+insert into t1 values (4,4);
+select * from t1;
+a b
+4 4
+10 10
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+partition_name table_rows
+p0 1
+p1 0
+p2 1
+drop table t1;
+create table t1 (a int, b int)
+PARTITION BY LIST (a)
+(
+PARTITION p2 VALUES IN (4,5,6),
+PARTITION p1 VALUES IN (1),
+PARTITION p0 DEFAULT,
+PARTITION p3 DEFAULT
+)
+;
+ERROR HY000: Only one DEFAULT partition allowed
+create table t1 (a int, b int)
+PARTITION BY LIST (a)
+(
+PARTITION p0 DEFAULT,
+PARTITION p2 VALUES IN (4,5,6),
+PARTITION p1 VALUES IN (1),
+PARTITION p3 DEFAULT
+)
+;
+ERROR HY000: Only one DEFAULT partition allowed
+create table t1 (a int, b int)
+PARTITION BY LIST (a)
+(
+PARTITION p0 DEFAULT,
+PARTITION p2 VALUES IN (4,5,6),
+PARTITION p1 VALUES IN (1)
+)
+;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY LIST (a)
+(PARTITION p0 DEFAULT ENGINE = MyISAM,
+ PARTITION p2 VALUES IN (4,5,6) ENGINE = MyISAM,
+ PARTITION p1 VALUES IN (1) ENGINE = MyISAM) */
+insert into t1 values (10,10);
+select * from t1;
+a b
+10 10
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+partition_name table_rows
+p0 1
+p1 0
+p2 0
+drop table t1;
+create table t1 (a int, b int)
+PARTITION BY LIST (a)
+(
+PARTITION p0 DEFAULT,
+PARTITION p2 VALUES IN (4,5,6),
+PARTITION p1 VALUES IN (1, 0)
+)
+;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY LIST (a)
+(PARTITION p0 DEFAULT ENGINE = MyISAM,
+ PARTITION p2 VALUES IN (4,5,6) ENGINE = MyISAM,
+ PARTITION p1 VALUES IN (1,0) ENGINE = MyISAM) */
+insert into t1 values (10,10);
+select * from t1;
+a b
+10 10
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+partition_name table_rows
+p0 1
+p1 0
+p2 0
+drop table t1;
+create table t1 (a int, b int)
+PARTITION BY LIST COLUMNS(a,b)
+(
+PARTITION p2 VALUES IN ((1,4),(2,5),(3,6)),
+PARTITION p1 VALUES IN ((1,1),(0,0)),
+PARTITION p0 DEFAULT
+)
+;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50500 PARTITION BY LIST COLUMNS(a,b)
+(PARTITION p2 VALUES IN ((1,4),(2,5),(3,6)) ENGINE = MyISAM,
+ PARTITION p1 VALUES IN ((1,1),(0,0)) ENGINE = MyISAM,
+ PARTITION p0 DEFAULT ENGINE = MyISAM) */
+insert into t1 values (10,10);
+select * from t1;
+a b
+10 10
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+partition_name table_rows
+p0 1
+p1 0
+p2 0
+drop table t1;
+create table t1 (a int, b int)
+PARTITION BY LIST COLUMNS(a,b)
+(
+PARTITION p2 VALUES IN ((1,4),(2,5),(3,6)),
+PARTITION p1 VALUES IN ((1,1),(0,0)),
+PARTITION p0 DEFAULT,
+PARTITION p3 DEFAULT
+)
+;
+ERROR HY000: Only one DEFAULT partition allowed
+create table t1 (a int, b int)
+PARTITION BY LIST COLUMNS(a,b)
+(
+PARTITION p0 DEFAULT,
+PARTITION p2 VALUES IN ((1,4),(2,5),(3,6)),
+PARTITION p1 VALUES IN ((1,1),(0,0)),
+PARTITION p3 DEFAULT
+)
+;
+ERROR HY000: Only one DEFAULT partition allowed
+create table t1 (a int, b int)
+PARTITION BY LIST (a)
+(
+PARTITION p2 VALUES IN (4,5,6),
+PARTITION p1 VALUES IN (1,20),
+PARTITION p0 default
+)
+;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY LIST (a)
+(PARTITION p2 VALUES IN (4,5,6) ENGINE = MyISAM,
+ PARTITION p1 VALUES IN (1,20) ENGINE = MyISAM,
+ PARTITION p0 DEFAULT ENGINE = MyISAM) */
+insert into t1 values (10,10);
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+partition_name table_rows
+p0 1
+p1 0
+p2 0
+select * from t1 where a=10;
+a b
+10 10
+select * from t1 where a<=10;
+a b
+10 10
+select * from t1 where a<=20;
+a b
+10 10
+select * from t1 where a>=10;
+a b
+10 10
+select * from t1 where a>=5;
+a b
+10 10
+insert into t1 values (20,20),(5,5);
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+partition_name table_rows
+p0 1
+p1 1
+p2 1
+select * from t1 where a=10;
+a b
+10 10
+select * from t1 where a<=10;
+a b
+5 5
+10 10
+select * from t1 where a<=20;
+a b
+5 5
+20 20
+10 10
+select * from t1 where a>=10;
+a b
+20 20
+10 10
+select * from t1 where a>=5;
+a b
+5 5
+20 20
+10 10
+explain partitions select * from t1 where a=10;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0 system NULL NULL NULL NULL 1
+explain partitions select * from t1 where a=5;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p2 system NULL NULL NULL NULL 1
+select * from t1 where a=10 or a=5;
+a b
+5 5
+10 10
+explain partitions select * from t1 where a=10 or a=5;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p2,p0 ALL NULL NULL NULL NULL 2 Using where
+drop table t1;
+create table t1 (a int, b int)
+PARTITION BY LIST COLUMNS(a,b)
+(
+PARTITION p2 VALUES IN ((1,4),(2,5),(3,6),(5,5)),
+PARTITION p1 VALUES IN ((1,1),(20,20)),
+PARTITION p0 DEFAULT
+)
+;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50500 PARTITION BY LIST COLUMNS(a,b)
+(PARTITION p2 VALUES IN ((1,4),(2,5),(3,6),(5,5)) ENGINE = MyISAM,
+ PARTITION p1 VALUES IN ((1,1),(20,20)) ENGINE = MyISAM,
+ PARTITION p0 DEFAULT ENGINE = MyISAM) */
+insert into t1 values (10,10);
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+partition_name table_rows
+p0 1
+p1 0
+p2 0
+select * from t1 where a=10 and b=10;
+a b
+10 10
+explain partitions select * from t1 where a=10 and b=10;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0 system NULL NULL NULL NULL 1
+select * from t1 where a=10;
+a b
+10 10
+explain partitions select * from t1 where a=10;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0 system NULL NULL NULL NULL 1
+select * from t1 where a<=10;
+a b
+10 10
+select * from t1 where a>=10;
+a b
+10 10
+insert into t1 values (20,20),(5,5);
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+partition_name table_rows
+p0 1
+p1 1
+p2 1
+select * from t1 where a=10 and b=10;
+a b
+10 10
+explain partitions select * from t1 where a=10 and b=10;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0 system NULL NULL NULL NULL 1
+select * from t1 where a=10 and b=10 or a=20 and b=20;
+a b
+20 20
+10 10
+explain partitions select * from t1 where a=10 and b=10 or a=20 and b=20;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p1,p0 ALL NULL NULL NULL NULL 2 Using where
+drop table t1;
+create table t1 (a int, b int);
+insert into t1 values (10,10),(2,5),(0,0);
+select * from t1;
+a b
+10 10
+2 5
+0 0
+alter table t1
+PARTITION BY LIST (a+b)
+(
+PARTITION p2 VALUES IN (1,2,3,7),
+PARTITION p1 VALUES IN (21,0),
+PARTITION p0 DEFAULT
+)
+;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY LIST (a+b)
+(PARTITION p2 VALUES IN (1,2,3,7) ENGINE = MyISAM,
+ PARTITION p1 VALUES IN (21,0) ENGINE = MyISAM,
+ PARTITION p0 DEFAULT ENGINE = MyISAM) */
+select * from t1;
+a b
+2 5
+0 0
+10 10
+explain partitions select * from t1 where a=2 and b=5;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p2 system NULL NULL NULL NULL 1
+explain partitions select * from t1 where a=10 and b=10;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0 system NULL NULL NULL NULL 1
+drop table t1;
+create table t1 (a int, b int);
+insert into t1 values (10,10),(2,5),(0,0);
+select * from t1;
+a b
+10 10
+2 5
+0 0
+alter table t1
+PARTITION BY LIST (a+5)
+(
+PARTITION p2 VALUES IN (1,2,3,7),
+PARTITION p1 VALUES IN (0),
+PARTITION p0 DEFAULT
+)
+;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY LIST (a+5)
+(PARTITION p2 VALUES IN (1,2,3,7) ENGINE = MyISAM,
+ PARTITION p1 VALUES IN (0) ENGINE = MyISAM,
+ PARTITION p0 DEFAULT ENGINE = MyISAM) */
+select * from t1;
+a b
+2 5
+10 10
+0 0
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+partition_name table_rows
+p0 2
+p1 0
+p2 1
+explain partitions select * from t1 where a>=2;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p2,p1,p0 ALL NULL NULL NULL NULL 3 Using where
+explain partitions select * from t1 where a>=2 and a<=3;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p2,p0 ALL NULL NULL NULL NULL 3 Using where
+explain partitions select * from t1 where a=10;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 2 Using where
+drop table t1;
+CREATE TABLE t1 (a DATE, KEY(a))
+PARTITION BY LIST (TO_DAYS(a))
+(PARTITION `pDEF` DEFAULT,
+PARTITION `p2001-01-01` VALUES IN (TO_DAYS('2001-01-01')),
+PARTITION `pNULL` VALUES IN (NULL),
+PARTITION `p0000-01-02` VALUES IN (TO_DAYS('0000-01-02')),
+PARTITION `p1001-01-01` VALUES IN (TO_DAYS('1001-01-01')));
+INSERT INTO t1 VALUES ('0000-00-00'), ('0000-01-02'), ('0001-01-01'),
+('1001-00-00'), ('1001-01-01'), ('1002-00-00'), ('2001-01-01');
+SELECT * FROM t1 WHERE a < '1001-01-01';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+SELECT * FROM t1 WHERE a <= '1001-01-01';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+SELECT * FROM t1 WHERE a >= '1001-01-01';
+a
+1001-01-01
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a > '1001-01-01';
+a
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a = '1001-01-01';
+a
+1001-01-01
+SELECT * FROM t1 WHERE a < '1001-00-00';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+SELECT * FROM t1 WHERE a <= '1001-00-00';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+SELECT * FROM t1 WHERE a >= '1001-00-00';
+a
+1001-00-00
+1001-01-01
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a > '1001-00-00';
+a
+1001-01-01
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a = '1001-00-00';
+a
+1001-00-00
+# Disabling warnings for the invalid date
+SELECT * FROM t1 WHERE a < '1999-02-31';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a <= '1999-02-31';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a >= '1999-02-31';
+a
+2001-01-01
+SELECT * FROM t1 WHERE a > '1999-02-31';
+a
+2001-01-01
+SELECT * FROM t1 WHERE a = '1999-02-31';
+a
+SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
+a
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
+a
+0001-01-01
+1001-00-00
+1001-01-01
+# test without index
+ALTER TABLE t1 DROP KEY a;
+SELECT * FROM t1 WHERE a < '1001-01-01';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+SELECT * FROM t1 WHERE a <= '1001-01-01';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+SELECT * FROM t1 WHERE a >= '1001-01-01';
+a
+1001-01-01
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a > '1001-01-01';
+a
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a = '1001-01-01';
+a
+1001-01-01
+SELECT * FROM t1 WHERE a < '1001-00-00';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+SELECT * FROM t1 WHERE a <= '1001-00-00';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+SELECT * FROM t1 WHERE a >= '1001-00-00';
+a
+1001-00-00
+1001-01-01
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a > '1001-00-00';
+a
+1001-01-01
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a = '1001-00-00';
+a
+1001-00-00
+# Disabling warnings for the invalid date
+SELECT * FROM t1 WHERE a < '1999-02-31';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a <= '1999-02-31';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a >= '1999-02-31';
+a
+2001-01-01
+SELECT * FROM t1 WHERE a > '1999-02-31';
+a
+2001-01-01
+SELECT * FROM t1 WHERE a = '1999-02-31';
+a
+SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
+a
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
+a
+0001-01-01
+1001-00-00
+1001-01-01
+DROP TABLE t1;
+# TO_SECONDS, test of LIST and index
+CREATE TABLE t1 (a DATE, KEY(a))
+PARTITION BY LIST (TO_SECONDS(a))
+(PARTITION `pDEF` DEFAULT,
+PARTITION `p2001-01-01` VALUES IN (TO_SECONDS('2001-01-01')),
+PARTITION `pNULL` VALUES IN (NULL),
+PARTITION `p0000-01-02` VALUES IN (TO_SECONDS('0000-01-02')),
+PARTITION `p1001-01-01` VALUES IN (TO_SECONDS('1001-01-01')));
+INSERT INTO t1 VALUES ('0000-00-00'), ('0000-01-02'), ('0001-01-01'),
+('1001-00-00'), ('1001-01-01'), ('1002-00-00'), ('2001-01-01');
+SELECT * FROM t1 WHERE a < '1001-01-01';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+SELECT * FROM t1 WHERE a <= '1001-01-01';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+SELECT * FROM t1 WHERE a >= '1001-01-01';
+a
+1001-01-01
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a > '1001-01-01';
+a
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a = '1001-01-01';
+a
+1001-01-01
+SELECT * FROM t1 WHERE a < '1001-00-00';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+SELECT * FROM t1 WHERE a <= '1001-00-00';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+SELECT * FROM t1 WHERE a >= '1001-00-00';
+a
+1001-00-00
+1001-01-01
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a > '1001-00-00';
+a
+1001-01-01
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a = '1001-00-00';
+a
+1001-00-00
+# Disabling warnings for the invalid date
+SELECT * FROM t1 WHERE a < '1999-02-31';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a <= '1999-02-31';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a >= '1999-02-31';
+a
+2001-01-01
+SELECT * FROM t1 WHERE a > '1999-02-31';
+a
+2001-01-01
+SELECT * FROM t1 WHERE a = '1999-02-31';
+a
+SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
+a
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
+a
+0001-01-01
+1001-00-00
+1001-01-01
+# test without index
+ALTER TABLE t1 DROP KEY a;
+SELECT * FROM t1 WHERE a < '1001-01-01';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+SELECT * FROM t1 WHERE a <= '1001-01-01';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+SELECT * FROM t1 WHERE a >= '1001-01-01';
+a
+1001-01-01
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a > '1001-01-01';
+a
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a = '1001-01-01';
+a
+1001-01-01
+SELECT * FROM t1 WHERE a < '1001-00-00';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+SELECT * FROM t1 WHERE a <= '1001-00-00';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+SELECT * FROM t1 WHERE a >= '1001-00-00';
+a
+1001-00-00
+1001-01-01
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a > '1001-00-00';
+a
+1001-01-01
+1002-00-00
+2001-01-01
+SELECT * FROM t1 WHERE a = '1001-00-00';
+a
+1001-00-00
+# Disabling warnings for the invalid date
+SELECT * FROM t1 WHERE a < '1999-02-31';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a <= '1999-02-31';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a >= '1999-02-31';
+a
+2001-01-01
+SELECT * FROM t1 WHERE a > '1999-02-31';
+a
+2001-01-01
+SELECT * FROM t1 WHERE a = '1999-02-31';
+a
+SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
+a
+0000-00-00
+0000-01-02
+0001-01-01
+1001-00-00
+1001-01-01
+SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
+a
+1001-00-00
+1001-01-01
+1002-00-00
+SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
+a
+0001-01-01
+1001-00-00
+1001-01-01
+DROP TABLE t1;
+create table t1 (a int, b int);
+insert into t1 values (10,10),(2,5),(0,0);
+select * from t1;
+a b
+10 10
+2 5
+0 0
+alter table t1
+PARTITION BY LIST (a)
+(
+PARTITION p2 VALUES IN (1,2,3),
+PARTITION p1 VALUES IN (20,0),
+PARTITION p0 DEFAULT
+)
+;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY LIST (a)
+(PARTITION p2 VALUES IN (1,2,3) ENGINE = MyISAM,
+ PARTITION p1 VALUES IN (20,0) ENGINE = MyISAM,
+ PARTITION p0 DEFAULT ENGINE = MyISAM) */
+select * from t1;
+a b
+2 5
+0 0
+10 10
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+partition_name table_rows
+p0 1
+p1 1
+p2 1
+explain partitions select * from t1 where a=2 and b=5;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p2 system NULL NULL NULL NULL 1
+explain partitions select * from t1 where a=10 and b=10;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0 system NULL NULL NULL NULL 1
+alter table t1
+PARTITION BY LIST (a)
+(
+PARTITION p2 VALUES IN (1,2,3),
+PARTITION p1 VALUES IN (20,0),
+PARTITION p0 VALUES IN (10)
+)
+;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY LIST (a)
+(PARTITION p2 VALUES IN (1,2,3) ENGINE = MyISAM,
+ PARTITION p1 VALUES IN (20,0) ENGINE = MyISAM,
+ PARTITION p0 VALUES IN (10) ENGINE = MyISAM) */
+select * from t1;
+a b
+2 5
+0 0
+10 10
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+partition_name table_rows
+p0 1
+p1 1
+p2 1
+explain partitions select * from t1 where a=2 and b=5;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p2 system NULL NULL NULL NULL 1
+explain partitions select * from t1 where a=10 and b=10;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0 system NULL NULL NULL NULL 1
+alter table t1
+PARTITION BY LIST (a)
+(
+PARTITION p2 DEFAULT,
+PARTITION p1 VALUES IN (20,0),
+PARTITION p0 VALUES IN (10)
+)
+;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY LIST (a)
+(PARTITION p2 DEFAULT ENGINE = MyISAM,
+ PARTITION p1 VALUES IN (20,0) ENGINE = MyISAM,
+ PARTITION p0 VALUES IN (10) ENGINE = MyISAM) */
+select * from t1;
+a b
+2 5
+0 0
+10 10
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+partition_name table_rows
+p0 1
+p1 1
+p2 1
+explain partitions select * from t1 where a=2 and b=5;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p2 system NULL NULL NULL NULL 1
+explain partitions select * from t1 where a=10 and b=10;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0 system NULL NULL NULL NULL 1
+alter table t1 drop partition p2;
+ERROR HY000: Table has no partition for value 2
+delete from t1 where a=2;
+alter table t1 drop partition p2;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY LIST (a)
+(PARTITION p1 VALUES IN (20,0) ENGINE = MyISAM,
+ PARTITION p0 VALUES IN (10) ENGINE = MyISAM) */
+select * from t1;
+a b
+0 0
+10 10
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+partition_name table_rows
+p0 1
+p1 1
+alter table t1 add partition (PARTITION pd DEFAULT);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY LIST (a)
+(PARTITION p1 VALUES IN (20,0) ENGINE = MyISAM,
+ PARTITION p0 VALUES IN (10) ENGINE = MyISAM,
+ PARTITION pd DEFAULT ENGINE = MyISAM) */
+alter table t1 add partition (PARTITION pdd DEFAULT);
+ERROR HY000: Only one DEFAULT partition allowed
+alter table t1 drop partition pd;
+alter table t1 add partition (PARTITION pdd DEFAULT,
+PARTITION pd DEFAULT);
+ERROR HY000: Only one DEFAULT partition allowed
+drop table t1;
+create table t1 (a int, b int);
+insert into t1 values (10,10),(2,5),(0,0);
+select * from t1;
+a b
+10 10
+2 5
+0 0
+alter table t1
+PARTITION BY LIST COLUMNS(a,b)
+(
+PARTITION p2 VALUES IN ((1,4),(2,5),(3,6)),
+PARTITION p1 VALUES IN ((1,1),(0,0)),
+PARTITION p0 DEFAULT
+)
+;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50500 PARTITION BY LIST COLUMNS(a,b)
+(PARTITION p2 VALUES IN ((1,4),(2,5),(3,6)) ENGINE = MyISAM,
+ PARTITION p1 VALUES IN ((1,1),(0,0)) ENGINE = MyISAM,
+ PARTITION p0 DEFAULT ENGINE = MyISAM) */
+select * from t1;
+a b
+2 5
+0 0
+10 10
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+partition_name table_rows
+p0 1
+p1 1
+p2 1
+explain partitions select * from t1 where a=2 and b=5;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p2 system NULL NULL NULL NULL 1
+explain partitions select * from t1 where a=10 and b=10;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0 system NULL NULL NULL NULL 1
+alter table t1
+PARTITION BY LIST COLUMNS(a,b)
+(
+PARTITION p2 VALUES IN ((1,4),(2,5),(3,6)),
+PARTITION p1 VALUES IN ((1,1),(0,0)),
+PARTITION p0 VALUES IN ((10,10))
+)
+;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50500 PARTITION BY LIST COLUMNS(a,b)
+(PARTITION p2 VALUES IN ((1,4),(2,5),(3,6)) ENGINE = MyISAM,
+ PARTITION p1 VALUES IN ((1,1),(0,0)) ENGINE = MyISAM,
+ PARTITION p0 VALUES IN ((10,10)) ENGINE = MyISAM) */
+select * from t1;
+a b
+2 5
+0 0
+10 10
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+partition_name table_rows
+p0 1
+p1 1
+p2 1
+explain partitions select * from t1 where a=2 and b=5;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p2 system NULL NULL NULL NULL 1
+explain partitions select * from t1 where a=10 and b=10;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0 system NULL NULL NULL NULL 1
+alter table t1
+PARTITION BY LIST COLUMNS(a,b)
+(
+PARTITION p2 DEFAULT,
+PARTITION p1 VALUES IN ((1,1),(0,0)),
+PARTITION p0 VALUES IN ((10,10))
+)
+;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50500 PARTITION BY LIST COLUMNS(a,b)
+(PARTITION p2 DEFAULT ENGINE = MyISAM,
+ PARTITION p1 VALUES IN ((1,1),(0,0)) ENGINE = MyISAM,
+ PARTITION p0 VALUES IN ((10,10)) ENGINE = MyISAM) */
+select * from t1;
+a b
+2 5
+0 0
+10 10
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+partition_name table_rows
+p0 1
+p1 1
+p2 1
+explain partitions select * from t1 where a=2 and b=5;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p2 system NULL NULL NULL NULL 1
+explain partitions select * from t1 where a=10 and b=10;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0 system NULL NULL NULL NULL 1
+alter table t1 drop partition p2;
+ERROR HY000: Table has no partition for value from column_list
+delete from t1 where a=2;
+alter table t1 drop partition p2;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50500 PARTITION BY LIST COLUMNS(a,b)
+(PARTITION p1 VALUES IN ((1,1),(0,0)) ENGINE = MyISAM,
+ PARTITION p0 VALUES IN ((10,10)) ENGINE = MyISAM) */
+select * from t1;
+a b
+0 0
+10 10
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+partition_name table_rows
+p0 1
+p1 1
+alter table t1 add partition (PARTITION pd DEFAULT);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50500 PARTITION BY LIST COLUMNS(a,b)
+(PARTITION p1 VALUES IN ((1,1),(0,0)) ENGINE = MyISAM,
+ PARTITION p0 VALUES IN ((10,10)) ENGINE = MyISAM,
+ PARTITION pd DEFAULT ENGINE = MyISAM) */
+alter table t1 add partition (PARTITION pdd DEFAULT);
+ERROR HY000: Only one DEFAULT partition allowed
+alter table t1 drop partition pd;
+alter table t1 add partition (PARTITION pdd DEFAULT,
+PARTITION pd DEFAULT);
+ERROR HY000: Only one DEFAULT partition allowed
+drop table t1;
+create table t1 (a int)
+PARTITION BY LIST (a)
+(
+PARTITION p2 VALUES IN (4,5,6),
+PARTITION p1 VALUES IN (1),
+PARTITION pd DEFAULT
+)
+;
+insert into t1 values (1),(2),(3),(4);
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+partition_name table_rows
+p1 1
+p2 1
+pd 2
+alter table t1 add partition
+(partition p0 VALUES IN (2,3));
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+partition_name table_rows
+p0 2
+p1 1
+p2 1
+pd 0
+drop table t1;
+create table t1 (a int, b int)
+PARTITION BY LIST COLUMNS(a,b)
+(
+PARTITION p0 DEFAULT,
+PARTITION p2 VALUES IN ((1,4),(2,5),(3,6)),
+PARTITION p1 VALUES IN ((1,1),(0,0))
+)
+;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50500 PARTITION BY LIST COLUMNS(a,b)
+(PARTITION p0 DEFAULT ENGINE = MyISAM,
+ PARTITION p2 VALUES IN ((1,4),(2,5),(3,6)) ENGINE = MyISAM,
+ PARTITION p1 VALUES IN ((1,1),(0,0)) ENGINE = MyISAM) */
+drop table t1;
+#
+# MDEV-10765: Wrong result - query does not retrieve values from
+# default partition on a table partitioned by list columns
+#
+create table t1 (i int, j int) partition by list columns(i,j) (partition p1 values in ((10,10)), partition p2 default);
+insert into t1 values (10,1);
+select * from t1 where i = 10;
+i j
+10 1
+explain partitions
+select * from t1 where i = 10;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p1,p2 system NULL NULL NULL NULL 1
+select * from t1 where i = 10 and j=1;
+i j
+10 1
+explain partitions
+select * from t1 where i = 10 and j=1;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p2 system NULL NULL NULL NULL 1
+insert into t1 values (10,10);
+select * from t1 where i = 10 and j=10;
+i j
+10 10
+explain partitions
+select * from t1 where i = 10 and j=10;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p1 system NULL NULL NULL NULL 1
+drop table t1;
+create table t1
+(
+a int not null,
+b int not null,
+c int
+)
+partition by list columns(a,b)
+(
+partition p1 values in ((10,10)),
+partition p2 values in ((10,20)),
+partition p3 values in ((10,30)),
+partition p4 values in ((10,40)),
+partition p5 values in ((10,50))
+);
+insert into t1 values
+(10,10,1234),
+(10,20,1234),
+(10,30,1234),
+(10,40,1234),
+(10,50,1234);
+explain partitions
+select * from t1
+where a>=10 and (a <=10 and b <=30);
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p1,p2,p3 ALL NULL NULL NULL NULL 3 Using where
+drop table t1;
+#
+# MDEV-10763: Wrong result - server does not return NULL values
+# from default list partition after ALTER table
+#
+create table t1 (i int) partition by list (i) ( partition p1 default);
+insert into t1 values (null);
+select * from t1 where i is null;
+i
+NULL
+alter table t1 partition by list (i) ( partition p1 values in (1), partition p2 default);
+select * from t1 where i is null;
+i
+NULL
+explain partitions
+select * from t1 where i is null;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p2 system NULL NULL NULL NULL 1
+alter table t1 partition by list (i) (
+partition p0 values in (NULL),
+partition p1 values in (1),
+partition p2 default);
+select * from t1 where i is null;
+i
+NULL
+explain partitions
+select * from t1 where i is null;
+id select_type table partitions type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 p0 system NULL NULL NULL NULL 1
+drop table t1;
diff --git a/mysql-test/r/partition_explicit_prune.result b/mysql-test/r/partition_explicit_prune.result
index ef196bcae0c..0cf9bde225c 100644
--- a/mysql-test/r/partition_explicit_prune.result
+++ b/mysql-test/r/partition_explicit_prune.result
@@ -19,7 +19,7 @@ WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
HANDLER_READ_RND_NEXT 3
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# 4 locks (1 table, 1 partition lock/unlock)
FLUSH STATUS;
SELECT a FROM t1 PARTITION (p0);
@@ -31,7 +31,7 @@ WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
HANDLER_READ_RND_NEXT 3
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# 4 locks (1 table, 1 partition lock/unlock)
FLUSH STATUS;
INSERT INTO v1 VALUES (10);
@@ -39,14 +39,14 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
HANDLER_WRITE 2
# 4 locks (1 table, 1 partition lock/unlock)
FLUSH STATUS;
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# 2 locks (1 table, all partitions pruned)
FLUSH STATUS;
SELECT * FROM v1;
@@ -59,7 +59,7 @@ WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
HANDLER_READ_RND_NEXT 4
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# 4 locks (1 table, 1 partition lock/unlock)
FLUSH STATUS;
SELECT a FROM t1 PARTITION (p0);
@@ -72,7 +72,7 @@ WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
HANDLER_READ_RND_NEXT 4
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# 4 locks (1 table, 1 partition lock/unlock)
SELECT * FROM t1;
a
@@ -89,14 +89,14 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
HANDLER_WRITE 2
# 4 locks (1 table, 1 partition lock/unlock)
FLUSH STATUS;
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# 2 locks (1 table, all partitions pruned)
SELECT * FROM v1;
a
@@ -121,7 +121,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
HANDLER_WRITE 2
# 4 locks (1 table, 1 partition lock/unlock)
FLUSH STATUS;
@@ -131,7 +131,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_ROLLBACK 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# 2 locks (1 table, all partitions pruned)
FLUSH STATUS;
INSERT INTO v1 VALUES (32);
@@ -140,7 +140,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_ROLLBACK 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# 4 locks (1 table, 1 partition lock/unlock)
SELECT * FROM v1;
a
@@ -166,12 +166,12 @@ FLUSH STATUS;
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
-HANDLER_READ_RND_NEXT 26
-HANDLER_TMP_WRITE 47
+HANDLER_READ_RND_NEXT 27
+HANDLER_TMP_WRITE 49
# OK, seems to add number of variables processed before HANDLER_WRITE
# and number of variables + 1 evaluated in the previous call in RND_NEXT
CREATE TABLE t1
@@ -233,7 +233,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
HANDLER_WRITE 2
# Should be 1 commit
# 4 external locks (due to pruning of locks)
@@ -250,7 +250,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
HANDLER_WRITE 2
# Should be 1 commit
# 4 external locks
@@ -262,7 +262,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# should be 1 commit
# 9 locks (1 ha_partition + 8 ha_innobase)
# 17 writes (internal I_S)
@@ -271,8 +271,8 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 2
-HANDLER_READ_RND_NEXT 26
-HANDLER_TMP_WRITE 47
+HANDLER_READ_RND_NEXT 27
+HANDLER_TMP_WRITE 49
HANDLER_WRITE 2
# + 1 commit
# + 19 rnd next (internal I_S)
@@ -282,8 +282,8 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 2
-HANDLER_READ_RND_NEXT 52
-HANDLER_TMP_WRITE 72
+HANDLER_READ_RND_NEXT 54
+HANDLER_TMP_WRITE 75
HANDLER_WRITE 2
# + 9 locks (unlocks)
# + 19 rnd next (internal I_S)
@@ -338,7 +338,7 @@ ERROR HY000: Unknown partition 'pNonexistent' in table 't1'
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# should have failed before locking (only 17 internal I_S writes)
FLUSH STATUS;
SELECT * FROM t1 PARTITION (subp2);
@@ -348,7 +348,7 @@ WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
HANDLER_READ_FIRST 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# Should be 1 commit
# 4 locks (1 ha_partition + 1 ha_innobase) x 2 (lock/unlock)
# 1 read first (also calls index_read)
@@ -366,7 +366,7 @@ VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
HANDLER_READ_FIRST 3
HANDLER_READ_NEXT 3
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# Should be 1 commit
# 8 locks (1 ha_partition + 2 + 1 ha_innobase) x 2
# 3 read first (one for each partition)
@@ -379,7 +379,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# 1 commit
# 18 locks
# 18 READ KEY from opening a new partition table instance,
@@ -398,8 +398,8 @@ VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 2
HANDLER_READ_FIRST 1
HANDLER_READ_NEXT 3
-HANDLER_READ_RND_NEXT 26
-HANDLER_TMP_WRITE 47
+HANDLER_READ_RND_NEXT 27
+HANDLER_TMP_WRITE 49
# + 1 commit
# + 1 read first (read first key from index in one partition)
# + 2 read key (innobase_get_index from index_init + from index_first)
@@ -415,8 +415,8 @@ VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 3
HANDLER_READ_FIRST 3
HANDLER_READ_NEXT 4
-HANDLER_READ_RND_NEXT 52
-HANDLER_TMP_WRITE 72
+HANDLER_READ_RND_NEXT 54
+HANDLER_TMP_WRITE 75
# + 1 commit
# + 2 read first (one for each subpart)
# + 4 read key (innobase_get_index from index_init + from index_first)
@@ -431,8 +431,8 @@ VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 4
HANDLER_READ_FIRST 3
HANDLER_READ_NEXT 4
-HANDLER_READ_RND_NEXT 78
-HANDLER_TMP_WRITE 97
+HANDLER_READ_RND_NEXT 81
+HANDLER_TMP_WRITE 101
# No matching partition, only internal I_S.
SELECT * FROM t1 PARTITION (pNeg) WHERE a = 100;
a b
@@ -443,8 +443,8 @@ VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 5
HANDLER_READ_FIRST 3
HANDLER_READ_NEXT 4
-HANDLER_READ_RND_NEXT 104
-HANDLER_TMP_WRITE 122
+HANDLER_READ_RND_NEXT 108
+HANDLER_TMP_WRITE 127
# + 18 for unlock (same as lock above) (100 is not in pNeg, no match)
# Test that EXPLAIN PARTITION works
EXPLAIN PARTITIONS SELECT * FROM t1 PARTITION (pNonexistent);
@@ -460,7 +460,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# 8 locks (1 ha_partition + 3 ha_innobase) x 2 (lock/unlock)
EXPLAIN PARTITIONS SELECT * FROM t1 PARTITION (subp3) AS TableAlias;
id select_type table partitions type possible_keys key key_len ref rows Extra
@@ -513,7 +513,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_ROLLBACK 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
HANDLER_WRITE 1
# 2 locks (1 ha_partition) x 2 (lock/unlock), Was 4 locks before WL4443
# explicit pruning says part_id 0 and implicit pruning says part_id 1
@@ -526,7 +526,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
HANDLER_WRITE 2
# 1 commit
# 4 locks (1 ha_partition + 1 ha_innobase) x 2 (lock/unlock)
@@ -544,7 +544,7 @@ WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
HANDLER_READ_KEY 2
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
HANDLER_UPDATE 2
HANDLER_WRITE 2
# 1 commit
@@ -566,7 +566,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# 1 commit
# 9 locks
# 17 write (internal I_S)
@@ -578,8 +578,8 @@ HANDLER_COMMIT 2
HANDLER_DELETE 2
HANDLER_READ_KEY 1
HANDLER_READ_NEXT 1
-HANDLER_READ_RND_NEXT 26
-HANDLER_TMP_WRITE 47
+HANDLER_READ_RND_NEXT 27
+HANDLER_TMP_WRITE 49
# + 1 commit
# + 1 delete (one row deleted)
# + 3 read key (1 innodb_get_index in records_in_range,
@@ -596,9 +596,9 @@ HANDLER_COMMIT 2
HANDLER_DELETE 2
HANDLER_READ_KEY 1
HANDLER_READ_NEXT 1
-HANDLER_READ_RND_NEXT 52
+HANDLER_READ_RND_NEXT 54
HANDLER_ROLLBACK 1
-HANDLER_TMP_WRITE 72
+HANDLER_TMP_WRITE 75
HANDLER_WRITE 1
# Failed before start_stmt/execution.
# + 19 rnd next (internal I_S)
@@ -612,9 +612,9 @@ HANDLER_COMMIT 3
HANDLER_DELETE 2
HANDLER_READ_KEY 1
HANDLER_READ_NEXT 1
-HANDLER_READ_RND_NEXT 78
+HANDLER_READ_RND_NEXT 81
HANDLER_ROLLBACK 1
-HANDLER_TMP_WRITE 97
+HANDLER_TMP_WRITE 101
HANDLER_WRITE 3
# + 1 commit
# + 19 rnd next (internal I_S)
@@ -627,9 +627,9 @@ HANDLER_COMMIT 4
HANDLER_DELETE 2
HANDLER_READ_KEY 3
HANDLER_READ_NEXT 1
-HANDLER_READ_RND_NEXT 104
+HANDLER_READ_RND_NEXT 108
HANDLER_ROLLBACK 1
-HANDLER_TMP_WRITE 122
+HANDLER_TMP_WRITE 127
HANDLER_UPDATE 2
HANDLER_WRITE 5
# + 1 commit
@@ -650,9 +650,9 @@ HANDLER_DELETE 2
HANDLER_READ_FIRST 1
HANDLER_READ_KEY 3
HANDLER_READ_NEXT 4
-HANDLER_READ_RND_NEXT 130
+HANDLER_READ_RND_NEXT 135
HANDLER_ROLLBACK 1
-HANDLER_TMP_WRITE 147
+HANDLER_TMP_WRITE 153
HANDLER_UPDATE 2
HANDLER_WRITE 5
# + 1 commit
@@ -670,9 +670,9 @@ HANDLER_DELETE 2
HANDLER_READ_FIRST 1
HANDLER_READ_KEY 3
HANDLER_READ_NEXT 4
-HANDLER_READ_RND_NEXT 156
+HANDLER_READ_RND_NEXT 162
HANDLER_ROLLBACK 1
-HANDLER_TMP_WRITE 172
+HANDLER_TMP_WRITE 179
HANDLER_UPDATE 2
HANDLER_WRITE 5
# + 9 locks
@@ -696,7 +696,7 @@ VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
HANDLER_READ_FIRST 4
HANDLER_READ_NEXT 5
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# 1 commit
# 10 locks (1 ha_partition + 4 ha_innobase) x 2 (lock/unlock)
# 4 read first (for reading the first row in 4 partitions)
@@ -709,7 +709,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# 10 locks (table + 4 partition) x (lock + unlock)
SELECT * FROM t1 PARTITION (pNeg, `p10-99`);
a b
@@ -720,7 +720,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_ROLLBACK 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
HANDLER_WRITE 3
# 6 locks (1 ha_partition + 2 ha_innobase) x 2 (lock+unlock)
# 1 rollback
@@ -732,7 +732,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
HANDLER_WRITE 10
# 10 lock (1 ha_partition + 4 ha_innobase) x 2 (lock + unlock)
ALTER TABLE t1 TRUNCATE PARTITION pNeg, `p10-99`;
@@ -742,7 +742,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# 9 locks
# 18 read key (ALTER forces table to be closed, see above for open)
LOAD DATA INFILE 'loadtest.txt' INTO TABLE t1 PARTITION (pNeg, `p10-99`);
@@ -750,8 +750,8 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 2
-HANDLER_READ_RND_NEXT 26
-HANDLER_TMP_WRITE 47
+HANDLER_READ_RND_NEXT 27
+HANDLER_TMP_WRITE 49
HANDLER_WRITE 10
# + 23 write (18 internal I_S + 5 rows)
UNLOCK TABLES;
@@ -759,8 +759,8 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 2
-HANDLER_READ_RND_NEXT 52
-HANDLER_TMP_WRITE 72
+HANDLER_READ_RND_NEXT 54
+HANDLER_TMP_WRITE 75
HANDLER_WRITE 10
# + 9 locks
#
@@ -773,7 +773,7 @@ WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
HANDLER_READ_RND_NEXT 2
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
HANDLER_UPDATE 2
# 1 commit
# 4 lock (1 ha_partition + 1 ha_innobase) x 2 (lock + unlock)
@@ -791,7 +791,7 @@ WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
HANDLER_READ_KEY 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
HANDLER_UPDATE 2
# 1 commit
# 4 lock
@@ -806,7 +806,7 @@ VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
HANDLER_READ_KEY 1
HANDLER_READ_RND 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
HANDLER_UPDATE 2
# 1 commit
# 4 lock
@@ -819,7 +819,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# Nothing, since impossible PARTITION+WHERE clause.
FLUSH STATUS;
UPDATE t1 PARTITION(subp0) SET a = -2, b = concat(b, ', Updated from a = 100')
@@ -828,7 +828,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# Nothing, since impossible PARTITION+WHERE clause.
FLUSH STATUS;
UPDATE t1 PARTITION(`p100-99999`) SET a = -2, b = concat(b, ', Updated from a = 100')
@@ -840,7 +840,7 @@ VARIABLE_NAME VARIABLE_VALUE
HANDLER_READ_KEY 1
HANDLER_READ_RND 1
HANDLER_ROLLBACK 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
HANDLER_UPDATE 1
# 6 lock
# 4 read key (1 index init + 1 index read + 1 rnd init + 1 rnd pos)
@@ -856,7 +856,7 @@ VARIABLE_NAME VARIABLE_VALUE
HANDLER_READ_KEY 1
HANDLER_READ_RND 1
HANDLER_ROLLBACK 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
HANDLER_UPDATE 1
HANDLER_WRITE 1
# 10 locks
@@ -874,7 +874,7 @@ HANDLER_COMMIT 1
HANDLER_DELETE 1
HANDLER_READ_KEY 1
HANDLER_READ_RND 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
HANDLER_UPDATE 1
HANDLER_WRITE 1
# 1 commit
@@ -902,7 +902,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# Nothing (no matching partition found)
FLUSH STATUS;
UPDATE t1 PARTITION (pNeg) SET b = concat(b, ', Updated2') WHERE a = 1000000;
@@ -910,7 +910,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# Nothing (no matching partition found)
FLUSH STATUS;
LOCK TABLE t1 WRITE;
@@ -918,7 +918,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# 9 locks
UPDATE t1 PARTITION (subp7) SET b = concat(b, ', Updated to 103'), a = 103 WHERE a = 101;
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
@@ -927,8 +927,8 @@ VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 2
HANDLER_READ_KEY 1
HANDLER_READ_RND 1
-HANDLER_READ_RND_NEXT 26
-HANDLER_TMP_WRITE 47
+HANDLER_READ_RND_NEXT 27
+HANDLER_TMP_WRITE 49
HANDLER_UPDATE 2
# + 4 read key
# + 1 read rnd
@@ -941,8 +941,8 @@ HANDLER_COMMIT 3
HANDLER_DELETE 1
HANDLER_READ_KEY 2
HANDLER_READ_RND 2
-HANDLER_READ_RND_NEXT 52
-HANDLER_TMP_WRITE 72
+HANDLER_READ_RND_NEXT 54
+HANDLER_TMP_WRITE 75
HANDLER_UPDATE 3
HANDLER_WRITE 1
# + 1 delete
@@ -957,8 +957,8 @@ HANDLER_COMMIT 3
HANDLER_DELETE 1
HANDLER_READ_KEY 2
HANDLER_READ_RND 2
-HANDLER_READ_RND_NEXT 78
-HANDLER_TMP_WRITE 97
+HANDLER_READ_RND_NEXT 81
+HANDLER_TMP_WRITE 101
HANDLER_UPDATE 3
HANDLER_WRITE 1
+ 9 locks
@@ -986,7 +986,7 @@ VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
HANDLER_DELETE 2
HANDLER_READ_KEY 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# 1 delete
# 4 locks (pruning works!).
# 1 read key (index read)
@@ -998,7 +998,7 @@ VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
HANDLER_DELETE 2
HANDLER_READ_RND_NEXT 3
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# 1 delete
# 4 locks
# 1 read first
@@ -1010,7 +1010,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# 9 locks
DELETE FROM t1 PARTITION (subp1) WHERE b = 'p0-9:subp3';
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
@@ -1018,8 +1018,8 @@ WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 2
HANDLER_READ_KEY 1
-HANDLER_READ_RND_NEXT 26
-HANDLER_TMP_WRITE 47
+HANDLER_READ_RND_NEXT 27
+HANDLER_TMP_WRITE 49
# + 3 read key (1 innodb_get_index in records_in_range
# + 1 innobase_get_index in index_init + 1 index read)
DELETE FROM t1 PARTITION (`p0-9`) WHERE b = 'p0-9:subp3';
@@ -1030,8 +1030,8 @@ HANDLER_COMMIT 3
HANDLER_DELETE 2
HANDLER_READ_KEY 3
HANDLER_READ_NEXT 1
-HANDLER_READ_RND_NEXT 52
-HANDLER_TMP_WRITE 72
+HANDLER_READ_RND_NEXT 54
+HANDLER_TMP_WRITE 75
# + 1 delete
# + 6 read key (same as above, but for two subpartitions)
# + 1 read next (read next after found row)
@@ -1043,8 +1043,8 @@ HANDLER_COMMIT 3
HANDLER_DELETE 2
HANDLER_READ_KEY 3
HANDLER_READ_NEXT 1
-HANDLER_READ_RND_NEXT 78
-HANDLER_TMP_WRITE 97
+HANDLER_READ_RND_NEXT 81
+HANDLER_TMP_WRITE 101
# + 9 locks
# Test multi-table DELETE
# Can be expressed in two different ways.
@@ -1057,7 +1057,7 @@ VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
HANDLER_READ_FIRST 5
HANDLER_READ_NEXT 5
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
HANDLER_WRITE 10
# 24 locks (2 table, 5 + 5 subpartitions lock/unlock)
FLUSH STATUS;
@@ -1066,7 +1066,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# 14 locks (1 table, 6 subpartitions lock/unlock)
FLUSH STATUS;
INSERT INTO t2 PARTITION (subp3) SELECT * FROM t1 PARTITION (subp3, `p10-99`, `p100-99999`);
@@ -1076,7 +1076,7 @@ WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_READ_FIRST 5
HANDLER_ROLLBACK 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
HANDLER_WRITE 1
# 16 locks (2 tables, 1 + 5 subpartitions lock/unlock)
FLUSH STATUS;
@@ -1091,7 +1091,7 @@ VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
HANDLER_READ_FIRST 5
HANDLER_READ_NEXT 5
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
HANDLER_WRITE 7
# 16 locks (2 tables, 1 + 5 subpartitions lock/unlock)
TRUNCATE TABLE t2;
@@ -1103,7 +1103,7 @@ VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
HANDLER_READ_FIRST 5
HANDLER_READ_NEXT 5
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
HANDLER_WRITE 10
# 30 locks (2 table, 8 + 5 subpartitions lock/unlock)
FLUSH STATUS;
@@ -1114,7 +1114,7 @@ VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
HANDLER_READ_FIRST 5
HANDLER_READ_NEXT 7
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
HANDLER_WRITE 7
# 14 locks (2 table, 5 subpartitions lock/unlock)
SHOW CREATE TABLE t1;
@@ -1201,7 +1201,7 @@ WHERE t1.a = t3.a AND t3.b = 'subp3'' at line 1
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# Multi table delete without any matching rows
FLUSH STATUS;
DELETE t1, t2 FROM t1 PARTITION (pNeg), t3, t2 PARTITION (subp3)
@@ -1211,7 +1211,7 @@ WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
HANDLER_READ_RND_NEXT 3
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# 12 locks (3 in t1, 1 in t3, 2 in t2) x 2 (lock + unlock)
# 1 read first (first rnd_next in t2)
# 4 read key (1 innodb_get_index in rnd_init in t2 + index read in t2
@@ -1231,7 +1231,7 @@ HANDLER_READ_KEY 2
HANDLER_READ_NEXT 2
HANDLER_READ_RND 4
HANDLER_READ_RND_NEXT 16
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# 4 delete (2 in t2 + 2 in t3)
# 12 locks (3 in t2, 1 in t3, 2 in t1) x 2 (lock + unlock)
# 3 read first (1 in t1 + 1 in t3 + 1 in t3, for second row in t1)
@@ -1279,7 +1279,7 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
-HANDLER_TMP_WRITE 22
+HANDLER_TMP_WRITE 23
# 6 locks (lock/unlock two subpartitions + table)
# Test on non partitioned table
SELECT * FROM t3 PARTITION (pNeg);
diff --git a/mysql-test/r/plugin_auth.result b/mysql-test/r/plugin_auth.result
index 345d6861ad4..436db33af36 100644
--- a/mysql-test/r/plugin_auth.result
+++ b/mysql-test/r/plugin_auth.result
@@ -25,7 +25,7 @@ proxies_priv CREATE TABLE `proxies_priv` (
`User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
`Proxied_host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`Proxied_user` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
- `With_grant` tinyint(1) NOT NULL DEFAULT '0',
+ `With_grant` tinyint(1) NOT NULL DEFAULT 0,
`Grantor` char(141) COLLATE utf8_bin NOT NULL DEFAULT '',
`Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`),
diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result
index 6f66ae31a39..aca74671561 100644
--- a/mysql-test/r/ps.result
+++ b/mysql-test/r/ps.result
@@ -3965,6 +3965,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -3979,6 +3980,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -3993,6 +3995,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 8
@@ -4007,6 +4010,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
diff --git a/mysql-test/r/ps_1general.result b/mysql-test/r/ps_1general.result
index 0fa12287080..e34855eee62 100644
--- a/mysql-test/r/ps_1general.result
+++ b/mysql-test/r/ps_1general.result
@@ -789,3 +789,5 @@ execute stmt1;
1
drop prepare stmt1;
drop table t1;
+select ?+1;
+Got one of the listed errors
diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result
index 268bd184c58..5adb8225b38 100644
--- a/mysql-test/r/range.result
+++ b/mysql-test/r/range.result
@@ -2114,6 +2114,37 @@ a b
1 1
drop table t2;
#
+# MDEV-10228: Delete missing rows with OR conditions
+# (The example uses UPDATE, because UPDATE allows to use index hints
+# and so it's possible to make an example that works with any storage
+# engine)
+#
+CREATE TABLE t1 (
+key1varchar varchar(14) NOT NULL,
+key2int int(11) NOT NULL DEFAULT '0',
+col1 int,
+PRIMARY KEY (key1varchar,key2int),
+KEY key1varchar (key1varchar),
+KEY key2int (key2int)
+) DEFAULT CHARSET=utf8;
+insert into t1 values
+('value1',0, 0),
+('value1',1, 0),
+('value1',1000685, 0),
+('value1',1003560, 0),
+('value1',1004807, 0);
+update t1 force index (PRIMARY) set col1=12345
+where (key1varchar='value1' AND (key2int <=1 OR key2int > 1));
+# The following must show col1=12345 for all rows:
+select * from t1;
+key1varchar key2int col1
+value1 0 12345
+value1 1 12345
+value1 1000685 12345
+value1 1003560 12345
+value1 1004807 12345
+drop table t1;
+#
# BUG#13731380: RANGE OPTIMIZER CALLS RECORDS_IN_RANGE() FOR OPEN RANGE
#
CREATE TABLE t1 (pk INT PRIMARY KEY);
diff --git a/mysql-test/r/range_mrr_icp.result b/mysql-test/r/range_mrr_icp.result
index 5c6930f4323..4ef7c0b658c 100644
--- a/mysql-test/r/range_mrr_icp.result
+++ b/mysql-test/r/range_mrr_icp.result
@@ -2116,6 +2116,37 @@ a b
1 1
drop table t2;
#
+# MDEV-10228: Delete missing rows with OR conditions
+# (The example uses UPDATE, because UPDATE allows to use index hints
+# and so it's possible to make an example that works with any storage
+# engine)
+#
+CREATE TABLE t1 (
+key1varchar varchar(14) NOT NULL,
+key2int int(11) NOT NULL DEFAULT '0',
+col1 int,
+PRIMARY KEY (key1varchar,key2int),
+KEY key1varchar (key1varchar),
+KEY key2int (key2int)
+) DEFAULT CHARSET=utf8;
+insert into t1 values
+('value1',0, 0),
+('value1',1, 0),
+('value1',1000685, 0),
+('value1',1003560, 0),
+('value1',1004807, 0);
+update t1 force index (PRIMARY) set col1=12345
+where (key1varchar='value1' AND (key2int <=1 OR key2int > 1));
+# The following must show col1=12345 for all rows:
+select * from t1;
+key1varchar key2int col1
+value1 0 12345
+value1 1 12345
+value1 1000685 12345
+value1 1003560 12345
+value1 1004807 12345
+drop table t1;
+#
# BUG#13731380: RANGE OPTIMIZER CALLS RECORDS_IN_RANGE() FOR OPEN RANGE
#
CREATE TABLE t1 (pk INT PRIMARY KEY);
diff --git a/mysql-test/r/range_vs_index_merge.result b/mysql-test/r/range_vs_index_merge.result
index 1b12a9f5512..9af359a55f3 100644
--- a/mysql-test/r/range_vs_index_merge.result
+++ b/mysql-test/r/range_vs_index_merge.result
@@ -1310,6 +1310,7 @@ Handler_read_key 2
Handler_read_last 0
Handler_read_next 385
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 377
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -1338,6 +1339,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 59
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -1367,6 +1369,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 59
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
diff --git a/mysql-test/r/range_vs_index_merge_innodb.result b/mysql-test/r/range_vs_index_merge_innodb.result
index 19feae46575..225d341f1de 100644
--- a/mysql-test/r/range_vs_index_merge_innodb.result
+++ b/mysql-test/r/range_vs_index_merge_innodb.result
@@ -1311,6 +1311,7 @@ Handler_read_key 2
Handler_read_last 0
Handler_read_next 385
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 377
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -1339,6 +1340,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 59
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -1368,6 +1370,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 59
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
diff --git a/mysql-test/r/reopen_temp_table.result b/mysql-test/r/reopen_temp_table.result
index 08affaaaac5..217aa3c8bad 100644
--- a/mysql-test/r/reopen_temp_table.result
+++ b/mysql-test/r/reopen_temp_table.result
@@ -164,5 +164,29 @@ SELECT COUNT(*)=4 FROM t6;
COUNT(*)=4
1
DROP TABLE t5, t6;
+#
+# MDEV-10216: Assertion `strcmp(share->unique_file_name,filename) ||
+# share->last_version' failed in myisam/mi_open.c:67: test_if_reopen
+#
+CREATE TEMPORARY TABLE t7 (i INT) ENGINE=MYISAM;
+INSERT INTO t7 VALUES(1);
+ALTER TABLE t7 RENAME TO t;
+SELECT * FROM t a, t b;
+i i
+1 1
+DROP TABLE t;
+CREATE TEMPORARY TABLE t7 (i INT) ENGINE=ARIA;
+INSERT INTO t7 VALUES(1);
+ALTER TABLE t7 RENAME TO t;
+SELECT * FROM t a, t b;
+i i
+1 1
+DROP TABLE t;
+CREATE TEMPORARY TABLE t8 (i INT) ENGINE=ARIA;
+ALTER TABLE t8 rename to t;
+SELECT (SELECT 1 FROM t a1, t a2 ) AS f1, ( SELECT 2 FROM t a3 ) AS f2 FROM DUAL;
+f1 f2
+NULL NULL
+DROP TABLE t;
# Cleanup
DROP DATABASE temp_db;
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index 8e516c93a14..5a8b52521cb 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -4351,6 +4351,7 @@ Handler_read_key 2
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 6
diff --git a/mysql-test/r/select_jcl6.result b/mysql-test/r/select_jcl6.result
index 99400a09ac7..c5f28395535 100644
--- a/mysql-test/r/select_jcl6.result
+++ b/mysql-test/r/select_jcl6.result
@@ -4362,6 +4362,7 @@ Handler_read_key 2
Handler_read_last 0
Handler_read_next 10
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 10
Handler_read_rnd_deleted 1
Handler_read_rnd_next 6
diff --git a/mysql-test/r/select_pkeycache.result b/mysql-test/r/select_pkeycache.result
index 8e516c93a14..5a8b52521cb 100644
--- a/mysql-test/r/select_pkeycache.result
+++ b/mysql-test/r/select_pkeycache.result
@@ -4351,6 +4351,7 @@ Handler_read_key 2
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 6
diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result
index d0bc80af2bc..d3c4ec94cb7 100644
--- a/mysql-test/r/show_check.result
+++ b/mysql-test/r/show_check.result
@@ -332,7 +332,7 @@ index(type_short)
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `type_bool` tinyint(1) NOT NULL DEFAULT '0',
+ `type_bool` tinyint(1) NOT NULL DEFAULT 0,
`type_tiny` tinyint(4) NOT NULL AUTO_INCREMENT,
`type_short` smallint(3) DEFAULT NULL,
`type_mediumint` mediumint(9) DEFAULT NULL,
diff --git a/mysql-test/r/single_delete_update.result b/mysql-test/r/single_delete_update.result
index cdf97e20238..85e79f53c89 100644
--- a/mysql-test/r/single_delete_update.result
+++ b/mysql-test/r/single_delete_update.result
@@ -29,6 +29,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 4
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -48,6 +49,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 4
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -84,6 +86,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 17
@@ -103,6 +106,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 5
Handler_read_rnd_deleted 0
Handler_read_rnd_next 17
@@ -136,6 +140,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 17
@@ -155,6 +160,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 1
Handler_read_rnd_deleted 0
Handler_read_rnd_next 17
@@ -192,6 +198,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 4
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -211,6 +218,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 4
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -242,6 +250,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 17
@@ -261,6 +270,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 1
Handler_read_rnd_deleted 0
Handler_read_rnd_next 17
@@ -290,6 +300,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 1
Handler_read_rnd_deleted 0
Handler_read_rnd_next 17
@@ -309,6 +320,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 1
Handler_read_rnd_deleted 0
Handler_read_rnd_next 17
@@ -341,6 +353,7 @@ Handler_read_key 2
Handler_read_last 0
Handler_read_next 7
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 4
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -365,6 +378,7 @@ Handler_read_key 2
Handler_read_last 0
Handler_read_next 7
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 8
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -403,6 +417,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 4
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -422,6 +437,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 4
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -458,6 +474,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 17
@@ -477,6 +494,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 5
Handler_read_rnd_deleted 0
Handler_read_rnd_next 17
@@ -522,6 +540,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 4
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -547,6 +566,7 @@ Handler_read_key 0
Handler_read_last 1
Handler_read_next 0
Handler_read_prev 4
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -566,6 +586,7 @@ Handler_read_key 0
Handler_read_last 1
Handler_read_next 0
Handler_read_prev 4
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -603,6 +624,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 4
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -622,6 +644,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 4
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 5
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -663,6 +686,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 17
@@ -682,6 +706,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 5
Handler_read_rnd_deleted 0
Handler_read_rnd_next 17
@@ -720,6 +745,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 17
@@ -739,6 +765,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 1
Handler_read_rnd_deleted 0
Handler_read_rnd_next 17
@@ -776,6 +803,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 4
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -795,6 +823,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 4
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 5
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -826,6 +855,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 17
@@ -845,6 +875,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 1
Handler_read_rnd_deleted 0
Handler_read_rnd_next 17
@@ -875,6 +906,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 1
Handler_read_rnd_deleted 0
Handler_read_rnd_next 17
@@ -894,6 +926,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 1
Handler_read_rnd_deleted 0
Handler_read_rnd_next 17
@@ -927,6 +960,7 @@ Handler_read_key 2
Handler_read_last 0
Handler_read_next 7
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 4
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -951,6 +985,7 @@ Handler_read_key 2
Handler_read_last 0
Handler_read_next 7
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 8
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -993,6 +1028,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 4
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -1012,6 +1048,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 4
+Handler_read_retry 0
Handler_read_rnd 5
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -1053,6 +1090,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 17
@@ -1072,6 +1110,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 5
Handler_read_rnd_deleted 0
Handler_read_rnd_next 17
@@ -1111,6 +1150,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 4
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -1136,6 +1176,7 @@ Handler_read_key 0
Handler_read_last 1
Handler_read_next 0
Handler_read_prev 4
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -1155,6 +1196,7 @@ Handler_read_key 0
Handler_read_last 1
Handler_read_next 0
Handler_read_prev 4
+Handler_read_retry 0
Handler_read_rnd 5
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
diff --git a/mysql-test/r/sp-prelocking.result b/mysql-test/r/sp-prelocking.result
index 9e82a966268..5b594e9ea55 100644
--- a/mysql-test/r/sp-prelocking.result
+++ b/mysql-test/r/sp-prelocking.result
@@ -320,3 +320,23 @@ c2
DROP TRIGGER t1_ai;
DROP TABLE t1, t2;
End of 5.0 tests
+#
+# Bug#21142859: FUNCTION UPDATING A VIEW FAILS TO FIND TABLE THAT ACTUALLY EXISTS
+#
+CREATE TABLE t1 SELECT 1 AS fld1, 'A' AS fld2;
+CREATE TABLE t2 (fld3 INT, fld4 CHAR(1));
+CREATE VIEW v1 AS SELECT * FROM t1;
+CREATE TRIGGER t1_au AFTER UPDATE ON t1
+FOR EACH ROW INSERT INTO t2 VALUES (new.fld1, new.fld2);
+CREATE FUNCTION f1() RETURNS INT
+BEGIN
+UPDATE v1 SET fld2='B' WHERE fld1=1;
+RETURN row_count();
+END !
+# Without the patch, an error was getting reported.
+SELECT f1();
+f1()
+1
+DROP FUNCTION f1;
+DROP VIEW v1;
+DROP TABLE t1,t2;
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index ce23fe1693e..23c8bd00d33 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -7724,6 +7724,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -7735,6 +7736,7 @@ Handler_read_key 2
Handler_read_last 0
Handler_read_next 4097
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
diff --git a/mysql-test/r/sql_mode.result b/mysql-test/r/sql_mode.result
index ac1ad1c625b..e1afb964f0a 100644
--- a/mysql-test/r/sql_mode.result
+++ b/mysql-test/r/sql_mode.result
@@ -121,7 +121,7 @@ create table t1 ( min_num dec(6,6) default .000001);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `min_num` decimal(6,6) DEFAULT '0.000001'
+ `min_num` decimal(6,6) DEFAULT 0.000001
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1 ;
set session sql_mode = 'IGNORE_SPACE';
@@ -129,14 +129,14 @@ create table t1 ( min_num dec(6,6) default 0.000001);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `min_num` decimal(6,6) DEFAULT '0.000001'
+ `min_num` decimal(6,6) DEFAULT 0.000001
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1 ;
create table t1 ( min_num dec(6,6) default .000001);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `min_num` decimal(6,6) DEFAULT '0.000001'
+ `min_num` decimal(6,6) DEFAULT 0.000001
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1 ;
set @@SQL_MODE=NULL;
diff --git a/mysql-test/r/ssl.result b/mysql-test/r/ssl.result
index 7cd18fbf539..2a45a5e4d62 100644
--- a/mysql-test/r/ssl.result
+++ b/mysql-test/r/ssl.result
@@ -1,7 +1,7 @@
connect ssl_con,localhost,root,,,,,SSL;
-SHOW STATUS LIKE 'Ssl_cipher';
-Variable_name Value
-Ssl_cipher DHE-RSA-AES256-SHA
+SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
+have_ssl
+1
SHOW STATUS LIKE 'Ssl_server_not_before';
Variable_name Value
Ssl_server_not_before Apr 25 14:55:05 2015 GMT
@@ -2164,9 +2164,9 @@ Privat (Private Nutzung) Mobilfunk
Warnings:
Warning 1052 Column 'kundentyp' in group statement is ambiguous
drop table t1;
-SHOW STATUS LIKE 'Ssl_cipher';
-Variable_name Value
-Ssl_cipher DHE-RSA-AES256-SHA
+SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
+have_ssl
+1
select aes_decrypt('MySQL','adf');
aes_decrypt('MySQL','adf')
NULL
diff --git a/mysql-test/r/ssl_ca.result b/mysql-test/r/ssl_ca.result
index ffc5671f85f..83a98902581 100644
--- a/mysql-test/r/ssl_ca.result
+++ b/mysql-test/r/ssl_ca.result
@@ -4,21 +4,21 @@
# try to connect with wrong '--ssl-ca' path : should fail
ERROR 2026 (HY000): SSL connection error: SSL_CTX_set_default_verify_paths failed
# try to connect with correct '--ssl-ca' path : should connect
-Variable_name Value
-Ssl_cipher DHE-RSA-AES256-SHA
+have_ssl
+1
#
# Bug#21920678: SSL-CA DOES NOT ACCEPT ~USER TILDE HOME DIRECTORY
# PATH SUBSTITUTION
#
# try to connect with '--ssl-ca' option using tilde home directoy
# path substitution : should connect
-Variable_name Value
-Ssl_cipher DHE-RSA-AES256-SHA
+have_ssl
+1
# try to connect with '--ssl-key' option using tilde home directoy
# path substitution : should connect
-Variable_name Value
-Ssl_cipher DHE-RSA-AES256-SHA
+have_ssl
+1
# try to connect with '--ssl-cert' option using tilde home directoy
# path substitution : should connect
-Variable_name Value
-Ssl_cipher DHE-RSA-AES256-SHA
+have_ssl
+1
diff --git a/mysql-test/r/ssl_compress.result b/mysql-test/r/ssl_compress.result
index 8260fde5c4e..09c682e3851 100644
--- a/mysql-test/r/ssl_compress.result
+++ b/mysql-test/r/ssl_compress.result
@@ -1,7 +1,7 @@
connect ssl_compress_con,localhost,root,,,,,SSL COMPRESS;
-SHOW STATUS LIKE 'Ssl_cipher';
-Variable_name Value
-Ssl_cipher DHE-RSA-AES256-SHA
+SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
+have_ssl
+1
SHOW STATUS LIKE 'Compression';
Variable_name Value
Compression ON
@@ -2161,9 +2161,9 @@ Privat (Private Nutzung) Mobilfunk
Warnings:
Warning 1052 Column 'kundentyp' in group statement is ambiguous
drop table t1;
-SHOW STATUS LIKE 'Ssl_cipher';
-Variable_name Value
-Ssl_cipher DHE-RSA-AES256-SHA
+SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
+have_ssl
+1
SHOW STATUS LIKE 'Compression';
Variable_name Value
Compression ON
diff --git a/mysql-test/r/ssl_timeout.result b/mysql-test/r/ssl_timeout.result
index 27dce524685..3c94a9927da 100644
--- a/mysql-test/r/ssl_timeout.result
+++ b/mysql-test/r/ssl_timeout.result
@@ -1,9 +1,9 @@
# connect with read timeout so SLEEP() should timeout
connect ssl_con,localhost,root,,,,,SSL read_timeout=5;
# Check ssl turned on
-SHOW STATUS LIKE 'Ssl_cipher';
-Variable_name Value
-Ssl_cipher DHE-RSA-AES256-SHA
+SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
+have_ssl
+1
SELECT SLEEP(600);
ERROR HY000: Lost connection to MySQL server during query
connection default;
diff --git a/mysql-test/r/stat_tables_innodb_debug.result b/mysql-test/r/stat_tables_innodb_debug.result
new file mode 100644
index 00000000000..e0c4c78cd29
--- /dev/null
+++ b/mysql-test/r/stat_tables_innodb_debug.result
@@ -0,0 +1,25 @@
+#
+# MDEV-7901: re-implement analyze table for low impact
+#
+create table t1 (a int, b int, c int, key IDX1(a), key IDX2(a,b)) engine=innodb;
+insert into t1 select seq/10, seq/2, seq from seq_0_to_9;
+SET DEBUG_SYNC='statistics_collection_start1 SIGNAL analyzing WAIT_FOR written';
+analyze table t1 persistent for all;
+connect con1, localhost, root,,;
+connection con1;
+SET DEBUG_SYNC= 'now WAIT_FOR analyzing';
+select count(*) from t1;
+count(*)
+10
+insert into t1 values (333,333,333);
+update t1 set a=1;
+SET DEBUG_SYNC= 'now SIGNAL written';
+connection default;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
+select count(*) from t1;
+count(*)
+11
+set debug_sync='RESET';
+drop table t1;
diff --git a/mysql-test/r/stat_tables_myisam_debug.result b/mysql-test/r/stat_tables_myisam_debug.result
new file mode 100644
index 00000000000..ae9a001bdfa
--- /dev/null
+++ b/mysql-test/r/stat_tables_myisam_debug.result
@@ -0,0 +1,24 @@
+#
+# MDEV-7901: re-implement analyze table for low impact
+#
+create table t1 (a int, b int, c int, key IDX1(a), key IDX2(a,b)) engine=myisam;
+insert into t1 select seq/10, seq/2, seq from seq_0_to_9;
+SET DEBUG_SYNC='statistics_collection_start1 SIGNAL analyzing WAIT_FOR written';
+analyze table t1 persistent for all;
+connect con1, localhost, root,,;
+connection con1;
+SET DEBUG_SYNC= 'now WAIT_FOR analyzing';
+select count(*) from t1;
+count(*)
+10
+insert into t1 values (333,333,333);
+SET DEBUG_SYNC= 'now SIGNAL written';
+connection default;
+Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status Table is already up to date
+select count(*) from t1;
+count(*)
+11
+set debug_sync='RESET';
+drop table t1;
diff --git a/mysql-test/r/status.result b/mysql-test/r/status.result
index 60ec5d7dec3..9d75a262592 100644
--- a/mysql-test/r/status.result
+++ b/mysql-test/r/status.result
@@ -316,6 +316,7 @@ Handler_read_key 4
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 7
Handler_read_rnd_deleted 0
Handler_read_rnd_next 23
@@ -333,7 +334,7 @@ Created_tmp_files 0
Created_tmp_tables 2
Handler_tmp_update 2
Handler_tmp_write 7
-Rows_tmp_read 42
+Rows_tmp_read 43
drop table t1;
CREATE TABLE t1 (i int(11) DEFAULT NULL, KEY i (i) ) ENGINE=MyISAM;
insert into t1 values (1),(2),(3),(4),(5);
@@ -358,6 +359,7 @@ Handler_read_key 2
Handler_read_last 0
Handler_read_next 2
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 1
Handler_read_rnd_next 2
diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result
index 9dcd5975411..4da77f21792 100644
--- a/mysql-test/r/strict.result
+++ b/mysql-test/r/strict.result
@@ -1015,7 +1015,7 @@ CREATE TABLE t1 (col1 INT NOT NULL default 99, col2 CHAR(6) NOT NULL);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
- "col1" int(11) NOT NULL DEFAULT '99',
+ "col1" int(11) NOT NULL DEFAULT 99,
"col2" char(6) NOT NULL
)
INSERT INTO t1 VALUES (1, 'hello');
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index f6b3fc7cf25..ff5823c10d9 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -1232,24 +1232,24 @@ CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT 1)) a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(1) NOT NULL DEFAULT '0',
- `(SELECT 1)` int(1) NOT NULL DEFAULT '0'
+ `a` int(1) NOT NULL DEFAULT 0,
+ `(SELECT 1)` int(1) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT a)) a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(1) NOT NULL DEFAULT '0',
- `(SELECT a)` int(1) NOT NULL DEFAULT '0'
+ `a` int(1) NOT NULL DEFAULT 0,
+ `(SELECT a)` int(1) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT a+0)) a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(1) NOT NULL DEFAULT '0',
- `(SELECT a+0)` int(3) NOT NULL DEFAULT '0'
+ `a` int(1) NOT NULL DEFAULT 0,
+ `(SELECT a+0)` int(3) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE t1 SELECT (SELECT 1 as a UNION SELECT 1+1 limit 1,1) as a;
@@ -6896,6 +6896,7 @@ Handler_read_key 8
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 22
@@ -6933,6 +6934,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 16
@@ -7161,5 +7163,21 @@ INSERT INTO t1 VALUES ('foo');
SELECT f FROM t1 WHERE f > ALL ( SELECT 'bar' UNION SELECT 'baz' );
f
foo
+SELECT f FROM t1 WHERE f > ALL ( SELECT 'bar');
+f
+foo
drop table t1;
SET NAMES default;
+#
+# MDEV-10045: Server crashes in Time_and_counter_tracker::incr_loops
+#
+SET NAMES utf8;
+CREATE TABLE t1 (f1 VARCHAR(3), f2 INT UNSIGNED) ENGINE=MyISAM;
+CREATE TABLE t2 (f3 INT) ENGINE=MyISAM;
+SELECT * FROM t1, t2 WHERE f3 = f2 AND f1 > ANY ( SELECT 'foo' UNION SELECT 'bar' );
+f1 f2 f3
+SELECT * FROM t1, t2 WHERE f3 = f2 AND f1 > ANY ( SELECT 'foo');
+f1 f2 f3
+DROP TABLE t1, t2;
+SET NAMES default;
+End of 10.1 tests
diff --git a/mysql-test/r/subselect3.result b/mysql-test/r/subselect3.result
index 906f6a2f083..a7e051e7c06 100644
--- a/mysql-test/r/subselect3.result
+++ b/mysql-test/r/subselect3.result
@@ -124,6 +124,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 41
@@ -889,6 +890,7 @@ ERROR 42S22: Unknown column 'c' in 'field list'
SHOW WARNINGS;
Level Code Message
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #2
+Note 1981 Aggregate function 'count()' of SELECT #3 belongs to SELECT #2
Note 1276 Field or reference 'test.t1.c' of SELECT #3 was resolved in SELECT #2
Error 1054 Unknown column 'c' in 'field list'
DROP TABLE t1;
diff --git a/mysql-test/r/subselect3_jcl6.result b/mysql-test/r/subselect3_jcl6.result
index 7cea1cadddd..fd28084fa43 100644
--- a/mysql-test/r/subselect3_jcl6.result
+++ b/mysql-test/r/subselect3_jcl6.result
@@ -134,6 +134,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 41
@@ -899,6 +900,7 @@ ERROR 42S22: Unknown column 'c' in 'field list'
SHOW WARNINGS;
Level Code Message
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #2
+Note 1981 Aggregate function 'count()' of SELECT #3 belongs to SELECT #2
Note 1276 Field or reference 'test.t1.c' of SELECT #3 was resolved in SELECT #2
Error 1054 Unknown column 'c' in 'field list'
DROP TABLE t1;
diff --git a/mysql-test/r/subselect_cache.result b/mysql-test/r/subselect_cache.result
index 8ca6bf52e0e..97a5f5a77f6 100644
--- a/mysql-test/r/subselect_cache.result
+++ b/mysql-test/r/subselect_cache.result
@@ -36,6 +36,7 @@ Handler_read_key 7
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 31
@@ -289,6 +290,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 61
@@ -316,6 +318,7 @@ Handler_read_key 7
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 31
@@ -342,6 +345,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 61
@@ -369,6 +373,7 @@ Handler_read_key 7
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 31
@@ -395,6 +400,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 61
@@ -494,6 +500,7 @@ Handler_read_key 7
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 442
@@ -592,6 +599,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 472
@@ -615,6 +623,7 @@ Handler_read_key 17
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 4
Handler_read_rnd_deleted 0
Handler_read_rnd_next 36
@@ -637,6 +646,7 @@ Handler_read_key 10
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 4
Handler_read_rnd_deleted 0
Handler_read_rnd_next 86
@@ -660,6 +670,7 @@ Handler_read_key 17
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 4
Handler_read_rnd_deleted 0
Handler_read_rnd_next 41
@@ -682,6 +693,7 @@ Handler_read_key 10
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 4
Handler_read_rnd_deleted 0
Handler_read_rnd_next 91
@@ -711,6 +723,7 @@ Handler_read_key 7
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 31
@@ -739,6 +752,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 61
@@ -762,6 +776,7 @@ Handler_read_key 7
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 4
Handler_read_rnd_deleted 1
Handler_read_rnd_next 36
@@ -784,6 +799,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 4
Handler_read_rnd_deleted 1
Handler_read_rnd_next 66
@@ -883,6 +899,7 @@ Handler_read_key 70
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 141
@@ -981,6 +998,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 671
@@ -1606,6 +1624,7 @@ Handler_read_key 11
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 145
@@ -1636,6 +1655,7 @@ Handler_read_key 32
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 84
@@ -1669,6 +1689,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 127
@@ -1699,6 +1720,7 @@ Handler_read_key 13
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 69
@@ -1890,6 +1912,7 @@ Handler_read_key 15
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 8
Handler_read_rnd_deleted 0
Handler_read_rnd_next 57
@@ -1916,6 +1939,7 @@ Handler_read_key 21
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 8
Handler_read_rnd_deleted 0
Handler_read_rnd_next 37
@@ -1943,6 +1967,7 @@ Handler_read_key 15
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 8
Handler_read_rnd_deleted 0
Handler_read_rnd_next 57
@@ -1969,6 +1994,7 @@ Handler_read_key 22
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 8
Handler_read_rnd_deleted 0
Handler_read_rnd_next 41
@@ -2011,6 +2037,7 @@ Handler_read_key 15
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 16
@@ -2049,6 +2076,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 151
@@ -2086,6 +2114,7 @@ Handler_read_key 15
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 43
@@ -2123,6 +2152,7 @@ Handler_read_key 18
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 27
diff --git a/mysql-test/r/subselect_extra_no_semijoin.result b/mysql-test/r/subselect_extra_no_semijoin.result
index 79bca388181..7cfce6dd006 100644
--- a/mysql-test/r/subselect_extra_no_semijoin.result
+++ b/mysql-test/r/subselect_extra_no_semijoin.result
@@ -436,7 +436,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 2 Using where
2 DEPENDENT SUBQUERY t2 system NULL NULL NULL NULL 1
2 DEPENDENT SUBQUERY <derived3> ALL NULL NULL NULL NULL 3 Using where
-3 DERIVED t1 ALL NULL NULL NULL NULL 3
+3 DERIVED t1 ALL NULL NULL NULL NULL 3 Using where
SELECT * FROM t3
WHERE t3.b IN (SELECT v1.b FROM v1, t2
WHERE t2.c = v1.c AND t2.c = v1.b AND v1.b = t3.c);
@@ -451,7 +451,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 2 Using where
2 DEPENDENT SUBQUERY t2 system NULL NULL NULL NULL 1
2 DEPENDENT SUBQUERY <derived3> ref key1 key1 8 const,const 0 Using where
-3 DERIVED t1 ALL NULL NULL NULL NULL 3
+3 DERIVED t1 ALL NULL NULL NULL NULL 3 Using where
SELECT * FROM t3
WHERE t3.b IN (SELECT v1.b FROM v1, t2
WHERE t2.c = v1.c AND t2.c = v1.b AND v1.b = t3.c);
diff --git a/mysql-test/r/subselect_mat.result b/mysql-test/r/subselect_mat.result
index c9fa7c0c672..af3df9ec811 100644
--- a/mysql-test/r/subselect_mat.result
+++ b/mysql-test/r/subselect_mat.result
@@ -1139,6 +1139,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 4 100.00 Using where
Warnings:
Note 1276 Field or reference 'test.t1.b' of SELECT #3 was resolved in SELECT #1
+Note 1981 Aggregate function 'max()' of SELECT #3 belongs to SELECT #1
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` group by `test`.`t1`.`a` having <expr_cache><`test`.`t1`.`a`,`test`.`t1`.`b`,max(`test`.`t1`.`b`),max(`test`.`t1`.`b`)>(<in_optimizer>(`test`.`t1`.`a`,<exists>(select `test`.`t2`.`c` from `test`.`t2` where (<nop>(<expr_cache><`test`.`t2`.`d`,`test`.`t1`.`b`,max(`test`.`t1`.`b`),max(`test`.`t1`.`b`)>(<in_optimizer>(`test`.`t2`.`d`,<exists>(select `test`.`t3`.`e` from `test`.`t3` where (max(`test`.`t1`.`b`) = `test`.`t3`.`e`) having (<cache>(`test`.`t2`.`d`) >= <ref_null_helper>(`test`.`t3`.`e`)))))) and (<cache>(`test`.`t1`.`a`) = `test`.`t2`.`c`)))))
select a from t1 group by a
having a in (select c from t2 where d >= some(select e from t3 where max(b)=e));
@@ -2237,6 +2238,7 @@ Handler_read_key 5000
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 6003
@@ -2261,6 +2263,19 @@ PREPARE stmt FROM '
EXECUTE stmt;
EXECUTE stmt;
DROP TABLE t1,t2,t3;
+#
+# MDEV-10389: Query returns different results on a debug vs non-debug build of the same revision
+#
+CREATE TABLE t1 (i1 INT, i2 INT NOT NULL);
+INSERT INTO t1 VALUES (1,4),(2,6);
+SELECT * FROM t1 AS alias1
+WHERE alias1.i1 IN (
+SELECT i1 FROM t1 WHERE alias1.i2 IN ( SELECT i2 FROM t1 HAVING i2 <> 7 )
+);
+i1 i2
+1 4
+2 6
+DROP TABLE t1;
set @subselect_mat_test_optimizer_switch_value=null;
set @@optimizer_switch='materialization=on,in_to_exists=off,semijoin=off';
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
diff --git a/mysql-test/r/subselect_no_exists_to_in.result b/mysql-test/r/subselect_no_exists_to_in.result
index 961b23f1028..303303f4619 100644
--- a/mysql-test/r/subselect_no_exists_to_in.result
+++ b/mysql-test/r/subselect_no_exists_to_in.result
@@ -1236,24 +1236,24 @@ CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT 1)) a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(1) NOT NULL DEFAULT '0',
- `(SELECT 1)` int(1) NOT NULL DEFAULT '0'
+ `a` int(1) NOT NULL DEFAULT 0,
+ `(SELECT 1)` int(1) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT a)) a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(1) NOT NULL DEFAULT '0',
- `(SELECT a)` int(1) NOT NULL DEFAULT '0'
+ `a` int(1) NOT NULL DEFAULT 0,
+ `(SELECT a)` int(1) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT a+0)) a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(1) NOT NULL DEFAULT '0',
- `(SELECT a+0)` int(3) NOT NULL DEFAULT '0'
+ `a` int(1) NOT NULL DEFAULT 0,
+ `(SELECT a+0)` int(3) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE t1 SELECT (SELECT 1 as a UNION SELECT 1+1 limit 1,1) as a;
@@ -6896,6 +6896,7 @@ Handler_read_key 8
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 22
@@ -6933,6 +6934,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 16
@@ -7161,8 +7163,24 @@ INSERT INTO t1 VALUES ('foo');
SELECT f FROM t1 WHERE f > ALL ( SELECT 'bar' UNION SELECT 'baz' );
f
foo
+SELECT f FROM t1 WHERE f > ALL ( SELECT 'bar');
+f
+foo
drop table t1;
SET NAMES default;
+#
+# MDEV-10045: Server crashes in Time_and_counter_tracker::incr_loops
+#
+SET NAMES utf8;
+CREATE TABLE t1 (f1 VARCHAR(3), f2 INT UNSIGNED) ENGINE=MyISAM;
+CREATE TABLE t2 (f3 INT) ENGINE=MyISAM;
+SELECT * FROM t1, t2 WHERE f3 = f2 AND f1 > ANY ( SELECT 'foo' UNION SELECT 'bar' );
+f1 f2 f3
+SELECT * FROM t1, t2 WHERE f3 = f2 AND f1 > ANY ( SELECT 'foo');
+f1 f2 f3
+DROP TABLE t1, t2;
+SET NAMES default;
+End of 10.1 tests
set optimizer_switch=default;
select @@optimizer_switch like '%exists_to_in=off%';
@@optimizer_switch like '%exists_to_in=off%'
diff --git a/mysql-test/r/subselect_no_mat.result b/mysql-test/r/subselect_no_mat.result
index a7170a9dc45..6bdb5d1fbc2 100644
--- a/mysql-test/r/subselect_no_mat.result
+++ b/mysql-test/r/subselect_no_mat.result
@@ -1239,24 +1239,24 @@ CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT 1)) a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(1) NOT NULL DEFAULT '0',
- `(SELECT 1)` int(1) NOT NULL DEFAULT '0'
+ `a` int(1) NOT NULL DEFAULT 0,
+ `(SELECT 1)` int(1) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT a)) a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(1) NOT NULL DEFAULT '0',
- `(SELECT a)` int(1) NOT NULL DEFAULT '0'
+ `a` int(1) NOT NULL DEFAULT 0,
+ `(SELECT a)` int(1) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT a+0)) a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(1) NOT NULL DEFAULT '0',
- `(SELECT a+0)` int(3) NOT NULL DEFAULT '0'
+ `a` int(1) NOT NULL DEFAULT 0,
+ `(SELECT a+0)` int(3) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE t1 SELECT (SELECT 1 as a UNION SELECT 1+1 limit 1,1) as a;
@@ -6890,6 +6890,7 @@ Handler_read_key 8
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 22
@@ -6927,6 +6928,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 16
@@ -7154,8 +7156,24 @@ INSERT INTO t1 VALUES ('foo');
SELECT f FROM t1 WHERE f > ALL ( SELECT 'bar' UNION SELECT 'baz' );
f
foo
+SELECT f FROM t1 WHERE f > ALL ( SELECT 'bar');
+f
+foo
drop table t1;
SET NAMES default;
+#
+# MDEV-10045: Server crashes in Time_and_counter_tracker::incr_loops
+#
+SET NAMES utf8;
+CREATE TABLE t1 (f1 VARCHAR(3), f2 INT UNSIGNED) ENGINE=MyISAM;
+CREATE TABLE t2 (f3 INT) ENGINE=MyISAM;
+SELECT * FROM t1, t2 WHERE f3 = f2 AND f1 > ANY ( SELECT 'foo' UNION SELECT 'bar' );
+f1 f2 f3
+SELECT * FROM t1, t2 WHERE f3 = f2 AND f1 > ANY ( SELECT 'foo');
+f1 f2 f3
+DROP TABLE t1, t2;
+SET NAMES default;
+End of 10.1 tests
set optimizer_switch=default;
select @@optimizer_switch like '%materialization=on%';
@@optimizer_switch like '%materialization=on%'
diff --git a/mysql-test/r/subselect_no_opts.result b/mysql-test/r/subselect_no_opts.result
index 1e9749c2eb5..2ce0188cc6d 100644
--- a/mysql-test/r/subselect_no_opts.result
+++ b/mysql-test/r/subselect_no_opts.result
@@ -1235,24 +1235,24 @@ CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT 1)) a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(1) NOT NULL DEFAULT '0',
- `(SELECT 1)` int(1) NOT NULL DEFAULT '0'
+ `a` int(1) NOT NULL DEFAULT 0,
+ `(SELECT 1)` int(1) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT a)) a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(1) NOT NULL DEFAULT '0',
- `(SELECT a)` int(1) NOT NULL DEFAULT '0'
+ `a` int(1) NOT NULL DEFAULT 0,
+ `(SELECT a)` int(1) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT a+0)) a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(1) NOT NULL DEFAULT '0',
- `(SELECT a+0)` int(3) NOT NULL DEFAULT '0'
+ `a` int(1) NOT NULL DEFAULT 0,
+ `(SELECT a+0)` int(3) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE t1 SELECT (SELECT 1 as a UNION SELECT 1+1 limit 1,1) as a;
@@ -6887,6 +6887,7 @@ Handler_read_key 8
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 22
@@ -6924,6 +6925,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 16
@@ -7152,6 +7154,22 @@ INSERT INTO t1 VALUES ('foo');
SELECT f FROM t1 WHERE f > ALL ( SELECT 'bar' UNION SELECT 'baz' );
f
foo
+SELECT f FROM t1 WHERE f > ALL ( SELECT 'bar');
+f
+foo
drop table t1;
SET NAMES default;
+#
+# MDEV-10045: Server crashes in Time_and_counter_tracker::incr_loops
+#
+SET NAMES utf8;
+CREATE TABLE t1 (f1 VARCHAR(3), f2 INT UNSIGNED) ENGINE=MyISAM;
+CREATE TABLE t2 (f3 INT) ENGINE=MyISAM;
+SELECT * FROM t1, t2 WHERE f3 = f2 AND f1 > ANY ( SELECT 'foo' UNION SELECT 'bar' );
+f1 f2 f3
+SELECT * FROM t1, t2 WHERE f3 = f2 AND f1 > ANY ( SELECT 'foo');
+f1 f2 f3
+DROP TABLE t1, t2;
+SET NAMES default;
+End of 10.1 tests
set @optimizer_switch_for_subselect_test=null;
diff --git a/mysql-test/r/subselect_no_scache.result b/mysql-test/r/subselect_no_scache.result
index 23a093b2669..22f25cb0d50 100644
--- a/mysql-test/r/subselect_no_scache.result
+++ b/mysql-test/r/subselect_no_scache.result
@@ -1238,24 +1238,24 @@ CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT 1)) a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(1) NOT NULL DEFAULT '0',
- `(SELECT 1)` int(1) NOT NULL DEFAULT '0'
+ `a` int(1) NOT NULL DEFAULT 0,
+ `(SELECT 1)` int(1) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT a)) a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(1) NOT NULL DEFAULT '0',
- `(SELECT a)` int(1) NOT NULL DEFAULT '0'
+ `a` int(1) NOT NULL DEFAULT 0,
+ `(SELECT a)` int(1) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT a+0)) a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(1) NOT NULL DEFAULT '0',
- `(SELECT a+0)` int(3) NOT NULL DEFAULT '0'
+ `a` int(1) NOT NULL DEFAULT 0,
+ `(SELECT a+0)` int(3) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE t1 SELECT (SELECT 1 as a UNION SELECT 1+1 limit 1,1) as a;
@@ -6902,6 +6902,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 58
@@ -6939,6 +6940,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 16
@@ -7167,8 +7169,24 @@ INSERT INTO t1 VALUES ('foo');
SELECT f FROM t1 WHERE f > ALL ( SELECT 'bar' UNION SELECT 'baz' );
f
foo
+SELECT f FROM t1 WHERE f > ALL ( SELECT 'bar');
+f
+foo
drop table t1;
SET NAMES default;
+#
+# MDEV-10045: Server crashes in Time_and_counter_tracker::incr_loops
+#
+SET NAMES utf8;
+CREATE TABLE t1 (f1 VARCHAR(3), f2 INT UNSIGNED) ENGINE=MyISAM;
+CREATE TABLE t2 (f3 INT) ENGINE=MyISAM;
+SELECT * FROM t1, t2 WHERE f3 = f2 AND f1 > ANY ( SELECT 'foo' UNION SELECT 'bar' );
+f1 f2 f3
+SELECT * FROM t1, t2 WHERE f3 = f2 AND f1 > ANY ( SELECT 'foo');
+f1 f2 f3
+DROP TABLE t1, t2;
+SET NAMES default;
+End of 10.1 tests
set optimizer_switch=default;
select @@optimizer_switch like '%subquery_cache=on%';
@@optimizer_switch like '%subquery_cache=on%'
diff --git a/mysql-test/r/subselect_no_semijoin.result b/mysql-test/r/subselect_no_semijoin.result
index dd1810e47f1..017e9623c76 100644
--- a/mysql-test/r/subselect_no_semijoin.result
+++ b/mysql-test/r/subselect_no_semijoin.result
@@ -1235,24 +1235,24 @@ CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT 1)) a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(1) NOT NULL DEFAULT '0',
- `(SELECT 1)` int(1) NOT NULL DEFAULT '0'
+ `a` int(1) NOT NULL DEFAULT 0,
+ `(SELECT 1)` int(1) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT a)) a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(1) NOT NULL DEFAULT '0',
- `(SELECT a)` int(1) NOT NULL DEFAULT '0'
+ `a` int(1) NOT NULL DEFAULT 0,
+ `(SELECT a)` int(1) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT a+0)) a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(1) NOT NULL DEFAULT '0',
- `(SELECT a+0)` int(3) NOT NULL DEFAULT '0'
+ `a` int(1) NOT NULL DEFAULT 0,
+ `(SELECT a+0)` int(3) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE t1 SELECT (SELECT 1 as a UNION SELECT 1+1 limit 1,1) as a;
@@ -6887,6 +6887,7 @@ Handler_read_key 8
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 22
@@ -6924,6 +6925,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 16
@@ -7152,7 +7154,23 @@ INSERT INTO t1 VALUES ('foo');
SELECT f FROM t1 WHERE f > ALL ( SELECT 'bar' UNION SELECT 'baz' );
f
foo
+SELECT f FROM t1 WHERE f > ALL ( SELECT 'bar');
+f
+foo
drop table t1;
SET NAMES default;
+#
+# MDEV-10045: Server crashes in Time_and_counter_tracker::incr_loops
+#
+SET NAMES utf8;
+CREATE TABLE t1 (f1 VARCHAR(3), f2 INT UNSIGNED) ENGINE=MyISAM;
+CREATE TABLE t2 (f3 INT) ENGINE=MyISAM;
+SELECT * FROM t1, t2 WHERE f3 = f2 AND f1 > ANY ( SELECT 'foo' UNION SELECT 'bar' );
+f1 f2 f3
+SELECT * FROM t1, t2 WHERE f3 = f2 AND f1 > ANY ( SELECT 'foo');
+f1 f2 f3
+DROP TABLE t1, t2;
+SET NAMES default;
+End of 10.1 tests
set @optimizer_switch_for_subselect_test=null;
set @join_cache_level_for_subselect_test=NULL;
diff --git a/mysql-test/r/subselect_sj_mat.result b/mysql-test/r/subselect_sj_mat.result
index 2f3777a47fd..9aa223b83f2 100644
--- a/mysql-test/r/subselect_sj_mat.result
+++ b/mysql-test/r/subselect_sj_mat.result
@@ -1173,6 +1173,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 4 100.00 Using where
Warnings:
Note 1276 Field or reference 'test.t1.b' of SELECT #3 was resolved in SELECT #1
+Note 1981 Aggregate function 'max()' of SELECT #3 belongs to SELECT #1
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` group by `test`.`t1`.`a` having <expr_cache><`test`.`t1`.`a`,`test`.`t1`.`b`,max(`test`.`t1`.`b`),max(`test`.`t1`.`b`)>(<in_optimizer>(`test`.`t1`.`a`,<exists>(select `test`.`t2`.`c` from `test`.`t2` where (<nop>(<expr_cache><`test`.`t2`.`d`,`test`.`t1`.`b`,max(`test`.`t1`.`b`),max(`test`.`t1`.`b`)>(<in_optimizer>(`test`.`t2`.`d`,<exists>(select `test`.`t3`.`e` from `test`.`t3` where (max(`test`.`t1`.`b`) = `test`.`t3`.`e`) having (<cache>(`test`.`t2`.`d`) >= <ref_null_helper>(`test`.`t3`.`e`)))))) and (<cache>(`test`.`t1`.`a`) = `test`.`t2`.`c`)))))
select a from t1 group by a
having a in (select c from t2 where d >= some(select e from t3 where max(b)=e));
@@ -2277,6 +2278,7 @@ Handler_read_key 5000
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 6003
@@ -2301,3 +2303,16 @@ PREPARE stmt FROM '
EXECUTE stmt;
EXECUTE stmt;
DROP TABLE t1,t2,t3;
+#
+# MDEV-10389: Query returns different results on a debug vs non-debug build of the same revision
+#
+CREATE TABLE t1 (i1 INT, i2 INT NOT NULL);
+INSERT INTO t1 VALUES (1,4),(2,6);
+SELECT * FROM t1 AS alias1
+WHERE alias1.i1 IN (
+SELECT i1 FROM t1 WHERE alias1.i2 IN ( SELECT i2 FROM t1 HAVING i2 <> 7 )
+);
+i1 i2
+1 4
+2 6
+DROP TABLE t1;
diff --git a/mysql-test/r/system_mysql_db.result b/mysql-test/r/system_mysql_db.result
index 332609e90f1..414815f02b7 100644
--- a/mysql-test/r/system_mysql_db.result
+++ b/mysql-test/r/system_mysql_db.result
@@ -122,23 +122,23 @@ user CREATE TABLE `user` (
`ssl_cipher` blob NOT NULL,
`x509_issuer` blob NOT NULL,
`x509_subject` blob NOT NULL,
- `max_questions` int(11) unsigned NOT NULL DEFAULT '0',
- `max_updates` int(11) unsigned NOT NULL DEFAULT '0',
- `max_connections` int(11) unsigned NOT NULL DEFAULT '0',
- `max_user_connections` int(11) NOT NULL DEFAULT '0',
+ `max_questions` int(11) unsigned NOT NULL DEFAULT 0,
+ `max_updates` int(11) unsigned NOT NULL DEFAULT 0,
+ `max_connections` int(11) unsigned NOT NULL DEFAULT 0,
+ `max_user_connections` int(11) NOT NULL DEFAULT 0,
`plugin` char(64) CHARACTER SET latin1 NOT NULL DEFAULT '',
`authentication_string` text COLLATE utf8_bin NOT NULL,
`password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`is_role` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`default_role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
- `max_statement_time` decimal(12,6) NOT NULL DEFAULT '0.000000',
+ `max_statement_time` decimal(12,6) NOT NULL DEFAULT 0.000000,
PRIMARY KEY (`Host`,`User`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'
show create table func;
Table Create Table
func CREATE TABLE `func` (
`name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
- `ret` tinyint(1) NOT NULL DEFAULT '0',
+ `ret` tinyint(1) NOT NULL DEFAULT 0,
`dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '',
`type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL,
PRIMARY KEY (`name`)
@@ -191,7 +191,7 @@ servers CREATE TABLE `servers` (
`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',
+ `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 '',
diff --git a/mysql-test/r/system_mysql_db_fix40123.result b/mysql-test/r/system_mysql_db_fix40123.result
index 332609e90f1..414815f02b7 100644
--- a/mysql-test/r/system_mysql_db_fix40123.result
+++ b/mysql-test/r/system_mysql_db_fix40123.result
@@ -122,23 +122,23 @@ user CREATE TABLE `user` (
`ssl_cipher` blob NOT NULL,
`x509_issuer` blob NOT NULL,
`x509_subject` blob NOT NULL,
- `max_questions` int(11) unsigned NOT NULL DEFAULT '0',
- `max_updates` int(11) unsigned NOT NULL DEFAULT '0',
- `max_connections` int(11) unsigned NOT NULL DEFAULT '0',
- `max_user_connections` int(11) NOT NULL DEFAULT '0',
+ `max_questions` int(11) unsigned NOT NULL DEFAULT 0,
+ `max_updates` int(11) unsigned NOT NULL DEFAULT 0,
+ `max_connections` int(11) unsigned NOT NULL DEFAULT 0,
+ `max_user_connections` int(11) NOT NULL DEFAULT 0,
`plugin` char(64) CHARACTER SET latin1 NOT NULL DEFAULT '',
`authentication_string` text COLLATE utf8_bin NOT NULL,
`password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`is_role` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`default_role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
- `max_statement_time` decimal(12,6) NOT NULL DEFAULT '0.000000',
+ `max_statement_time` decimal(12,6) NOT NULL DEFAULT 0.000000,
PRIMARY KEY (`Host`,`User`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'
show create table func;
Table Create Table
func CREATE TABLE `func` (
`name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
- `ret` tinyint(1) NOT NULL DEFAULT '0',
+ `ret` tinyint(1) NOT NULL DEFAULT 0,
`dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '',
`type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL,
PRIMARY KEY (`name`)
@@ -191,7 +191,7 @@ servers CREATE TABLE `servers` (
`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',
+ `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 '',
diff --git a/mysql-test/r/system_mysql_db_fix50030.result b/mysql-test/r/system_mysql_db_fix50030.result
index 200200f0089..ed86a35c910 100644
--- a/mysql-test/r/system_mysql_db_fix50030.result
+++ b/mysql-test/r/system_mysql_db_fix50030.result
@@ -122,23 +122,23 @@ user CREATE TABLE `user` (
`ssl_cipher` blob NOT NULL,
`x509_issuer` blob NOT NULL,
`x509_subject` blob NOT NULL,
- `max_questions` int(11) unsigned NOT NULL DEFAULT '0',
- `max_updates` int(11) unsigned NOT NULL DEFAULT '0',
- `max_connections` int(11) unsigned NOT NULL DEFAULT '0',
- `max_user_connections` int(11) NOT NULL DEFAULT '0',
+ `max_questions` int(11) unsigned NOT NULL DEFAULT 0,
+ `max_updates` int(11) unsigned NOT NULL DEFAULT 0,
+ `max_connections` int(11) unsigned NOT NULL DEFAULT 0,
+ `max_user_connections` int(11) NOT NULL DEFAULT 0,
`plugin` char(64) CHARACTER SET latin1 NOT NULL DEFAULT '',
`authentication_string` text COLLATE utf8_bin NOT NULL,
`password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`is_role` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`default_role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
- `max_statement_time` decimal(12,6) NOT NULL DEFAULT '0.000000',
+ `max_statement_time` decimal(12,6) NOT NULL DEFAULT 0.000000,
PRIMARY KEY (`Host`,`User`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'
show create table func;
Table Create Table
func CREATE TABLE `func` (
`name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
- `ret` tinyint(1) NOT NULL DEFAULT '0',
+ `ret` tinyint(1) NOT NULL DEFAULT 0,
`dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '',
`type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL,
PRIMARY KEY (`name`)
@@ -191,7 +191,7 @@ servers CREATE TABLE `servers` (
`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',
+ `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 '',
diff --git a/mysql-test/r/system_mysql_db_fix50117.result b/mysql-test/r/system_mysql_db_fix50117.result
index 332609e90f1..414815f02b7 100644
--- a/mysql-test/r/system_mysql_db_fix50117.result
+++ b/mysql-test/r/system_mysql_db_fix50117.result
@@ -122,23 +122,23 @@ user CREATE TABLE `user` (
`ssl_cipher` blob NOT NULL,
`x509_issuer` blob NOT NULL,
`x509_subject` blob NOT NULL,
- `max_questions` int(11) unsigned NOT NULL DEFAULT '0',
- `max_updates` int(11) unsigned NOT NULL DEFAULT '0',
- `max_connections` int(11) unsigned NOT NULL DEFAULT '0',
- `max_user_connections` int(11) NOT NULL DEFAULT '0',
+ `max_questions` int(11) unsigned NOT NULL DEFAULT 0,
+ `max_updates` int(11) unsigned NOT NULL DEFAULT 0,
+ `max_connections` int(11) unsigned NOT NULL DEFAULT 0,
+ `max_user_connections` int(11) NOT NULL DEFAULT 0,
`plugin` char(64) CHARACTER SET latin1 NOT NULL DEFAULT '',
`authentication_string` text COLLATE utf8_bin NOT NULL,
`password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`is_role` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`default_role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
- `max_statement_time` decimal(12,6) NOT NULL DEFAULT '0.000000',
+ `max_statement_time` decimal(12,6) NOT NULL DEFAULT 0.000000,
PRIMARY KEY (`Host`,`User`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'
show create table func;
Table Create Table
func CREATE TABLE `func` (
`name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
- `ret` tinyint(1) NOT NULL DEFAULT '0',
+ `ret` tinyint(1) NOT NULL DEFAULT 0,
`dl` char(128) COLLATE utf8_bin NOT NULL DEFAULT '',
`type` enum('function','aggregate') CHARACTER SET utf8 NOT NULL,
PRIMARY KEY (`name`)
@@ -191,7 +191,7 @@ servers CREATE TABLE `servers` (
`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',
+ `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 '',
diff --git a/mysql-test/r/temp_table.result b/mysql-test/r/temp_table.result
index 63a9743ef7b..c655bc01b74 100644
--- a/mysql-test/r/temp_table.result
+++ b/mysql-test/r/temp_table.result
@@ -294,6 +294,9 @@ test.t1 repair status OK
test.t2 repair status OK
test.t3 repair status OK
DROP TABLES t1, t2, t3;
+CREATE TEMPORARY TABLE t1 (a int);
+RENAME TABLE t1 TO t2;
+DROP TABLE t2;
create temporary temporary table t1 (a int);
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 'temporary table t1 (a int)' at line 1
flush status;
@@ -490,5 +493,50 @@ SELECT * FROM temp_t1;
i
1
DROP TABLE temp_t1, t1;
+#
+# ALTER TABLE RENAME & ENABLE/DISABLE KEYS (shortcuts)
+#
+CREATE TEMPORARY TABLE t1(i INT PRIMARY KEY) ENGINE=MYISAM;
+INSERT INTO t1 VALUES(1);
+SELECT COUNT(*)=1 FROM t1;
+COUNT(*)=1
+1
+ALTER TABLE t1 RENAME t2;
+SELECT COUNT(*)=1 FROM t2;
+COUNT(*)=1
+1
+ALTER TABLE t2 RENAME t1;
+ALTER TABLE t1 DISABLE KEYS;
+ALTER TABLE t1 ENABLE KEYS;
+LOCK TABLES t1 WRITE;
+ALTER TABLE t1 RENAME t2;
+SELECT COUNT(*)=1 FROM t2;
+COUNT(*)=1
+1
+ALTER TABLE t2 RENAME t1;
+ALTER TABLE t1 DISABLE KEYS;
+ALTER TABLE t1 ENABLE KEYS;
+UNLOCK TABLES;
+LOCK TABLES t1 READ;
+ALTER TABLE t1 RENAME t2;
+SELECT COUNT(*)=1 FROM t2;
+COUNT(*)=1
+1
+ALTER TABLE t2 RENAME t1;
+ALTER TABLE t1 DISABLE KEYS;
+ALTER TABLE t1 ENABLE KEYS;
+UNLOCK TABLES;
+FLUSH TABLES WITH READ LOCK;
+ALTER TABLE t1 RENAME t2;
+SELECT COUNT(*)=1 FROM t2;
+COUNT(*)=1
+1
+ALTER TABLE t2 RENAME t1;
+ALTER TABLE t1 DISABLE KEYS;
+ALTER TABLE t1 ENABLE KEYS;
+UNLOCK TABLES;
+ALTER TABLE t1 RENAME t2, LOCK SHARED;
+ALTER TABLE t2 RENAME t1, LOCK EXCLUSIVE;
+DROP TABLE t1;
# Cleanup
DROP DATABASE temp_db;
diff --git a/mysql-test/r/type_date.result b/mysql-test/r/type_date.result
index a1eeda063e4..d2587d7199e 100644
--- a/mysql-test/r/type_date.result
+++ b/mysql-test/r/type_date.result
@@ -165,6 +165,7 @@ str_to_date( '', a )
NULL
DROP TABLE t1;
CREATE TABLE t1 (a DATE, b INT, PRIMARY KEY (a,b));
+SET timestamp=UNIX_TIMESTAMP('2016-07-21 14:48:18');
INSERT INTO t1 VALUES (DATE(NOW()), 1);
SELECT COUNT(*) FROM t1 WHERE a = NOW();
COUNT(*)
@@ -192,6 +193,7 @@ COUNT(*)
EXPLAIN SELECT COUNT(*) FROM t1 WHERE a = NOW();
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
+SET timestamp=DEFAULT;
DROP TABLE t1;
CREATE TABLE t1 (a DATE);
CREATE TABLE t2 (a DATE);
diff --git a/mysql-test/r/type_enum.result b/mysql-test/r/type_enum.result
index 14f5d97f426..5c5821da110 100644
--- a/mysql-test/r/type_enum.result
+++ b/mysql-test/r/type_enum.result
@@ -1669,7 +1669,7 @@ b ENUM('value','öäü_value','ÊÃÕ') character set latin1 NOT NULL
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT '1',
+ `a` int(11) DEFAULT 1,
`b` enum('value','öäü_value','ÊÃÕ') NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show columns from t1;
diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result
index 55dde117e80..ed837dda975 100644
--- a/mysql-test/r/type_newdecimal.result
+++ b/mysql-test/r/type_newdecimal.result
@@ -975,8 +975,8 @@ f1 decimal (0,0) zerofill not null default 0);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f0` decimal(30,30) unsigned zerofill NOT NULL DEFAULT '0.000000000000000000000000000000',
- `f1` decimal(10,0) unsigned zerofill NOT NULL DEFAULT '0000000000'
+ `f0` decimal(30,30) unsigned zerofill NOT NULL DEFAULT 0.000000000000000000000000000000,
+ `f1` decimal(10,0) unsigned zerofill NOT NULL DEFAULT 0000000000
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
drop procedure if exists wg2;
@@ -2190,7 +2190,7 @@ Note 1265 Data truncated for column 'a' at row 1
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` decimal(2,1) DEFAULT '0.0'
+ `a` decimal(2,1) DEFAULT 0.0
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (a DECIMAL(2,1) DEFAULT '0.1 ');
@@ -2199,7 +2199,7 @@ Note 1265 Data truncated for column 'a' at row 1
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` decimal(2,1) DEFAULT '0.1'
+ `a` decimal(2,1) DEFAULT 0.1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (a DECIMAL(2,1) DEFAULT '0.10001 ');
@@ -2208,7 +2208,7 @@ Note 1265 Data truncated for column 'a' at row 1
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` decimal(2,1) DEFAULT '0.1'
+ `a` decimal(2,1) DEFAULT 0.1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (a DECIMAL(2,1) DEFAULT '0.10001');
@@ -2217,7 +2217,7 @@ Note 1265 Data truncated for column 'a' at row 1
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` decimal(2,1) DEFAULT '0.1'
+ `a` decimal(2,1) DEFAULT 0.1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (a DECIMAL(2,1) DEFAULT 0.10001);
@@ -2226,7 +2226,7 @@ Note 1265 Data truncated for column 'a' at row 1
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` decimal(2,1) DEFAULT '0.1'
+ `a` decimal(2,1) DEFAULT 0.1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 (a DECIMAL(2,1) DEFAULT 0.10001e0);
@@ -2235,7 +2235,7 @@ Note 1265 Data truncated for column 'a' at row 1
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` decimal(2,1) DEFAULT '0.1'
+ `a` decimal(2,1) DEFAULT 0.1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
#
diff --git a/mysql-test/r/type_timestamp_hires.result b/mysql-test/r/type_timestamp_hires.result
index 89f6754ec9a..3b88454ba00 100644
--- a/mysql-test/r/type_timestamp_hires.result
+++ b/mysql-test/r/type_timestamp_hires.result
@@ -272,33 +272,64 @@ select * from t1;
a
2011-01-01 01:01:01.12345
drop table t1;
-create table t1 (a timestamp(5) default current_timestamp);
+create or replace table t1 (a timestamp(5) default current_timestamp);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` timestamp(5) NOT NULL DEFAULT CURRENT_TIMESTAMP(5)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
-drop table t1;
-create table t1 (a timestamp(5) default current_timestamp());
-drop table t1;
-create table t1 (a timestamp(5) default current_timestamp(2));
+create or replace table t1 (a timestamp(5) default current_timestamp());
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` timestamp(5) NOT NULL DEFAULT CURRENT_TIMESTAMP(5)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
-drop table t1;
-create table t1 (a timestamp(5) default current_timestamp(5));
-drop table t1;
-create table t1 (a timestamp(5) default current_timestamp(6));
-drop table t1;
-create table t1 (a timestamp(5) on update current_timestamp);
-drop table t1;
-create table t1 (a timestamp(5) on update current_timestamp());
-drop table t1;
-create table t1 (a timestamp(5) on update current_timestamp(3));
+create or replace table t1 (a timestamp(5) default current_timestamp(2));
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` timestamp(5) NOT NULL DEFAULT current_timestamp(2)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert t1 () values ();
+select * from t1;
+a
+2011-01-01 01:01:01.12000
+create or replace table t1 (a timestamp(5) default current_timestamp(5));
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` timestamp(5) NOT NULL DEFAULT CURRENT_TIMESTAMP(5)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+create or replace table t1 (a timestamp(5) default current_timestamp(6));
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` timestamp(5) NOT NULL DEFAULT CURRENT_TIMESTAMP(5)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+create or replace table t1 (a timestamp(5) on update current_timestamp);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` timestamp(5) NOT NULL DEFAULT '0000-00-00 00:00:00.00000' ON UPDATE CURRENT_TIMESTAMP(5)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+create or replace table t1 (a timestamp(5) on update current_timestamp());
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` timestamp(5) NOT NULL DEFAULT '0000-00-00 00:00:00.00000' ON UPDATE CURRENT_TIMESTAMP(5)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+create or replace table t1 (a timestamp(5) on update current_timestamp(3));
ERROR HY000: Invalid ON UPDATE clause for 'a' column
-create table t1 (a timestamp(5) on update current_timestamp(5));
-drop table t1;
-create table t1 (a timestamp(5) on update current_timestamp(6));
+create or replace table t1 (a timestamp(5) on update current_timestamp(5));
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` timestamp(5) NOT NULL DEFAULT '0000-00-00 00:00:00.00000' ON UPDATE CURRENT_TIMESTAMP(5)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+create or replace table t1 (a timestamp(5) on update current_timestamp(6));
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` timestamp(5) NOT NULL DEFAULT '0000-00-00 00:00:00.00000' ON UPDATE CURRENT_TIMESTAMP(5)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result
index 308a4c7c369..a692af93b37 100644
--- a/mysql-test/r/union.result
+++ b/mysql-test/r/union.result
@@ -629,7 +629,7 @@ a
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` decimal(3,1) NOT NULL DEFAULT '0.0'
+ `a` decimal(3,1) NOT NULL DEFAULT 0.0
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t2 (it1 tinyint, it2 tinyint not null, i int not null, ib bigint, f float, d double, y year, da date, dt datetime, sc char(10), sv varchar(10), b blob, tx text);
@@ -653,7 +653,7 @@ it2
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `it2` int(11) NOT NULL DEFAULT '0'
+ `it2` int(11) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 SELECT i from t2 UNION select f from t2;
@@ -852,7 +852,7 @@ select * from t1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `1` bigint(20) NOT NULL DEFAULT '0'
+ `1` bigint(20) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 select _latin1"test" union select _latin2"testt" ;
diff --git a/mysql-test/r/update.result b/mysql-test/r/update.result
index f7a36c537f9..68dbd0dc024 100644
--- a/mysql-test/r/update.result
+++ b/mysql-test/r/update.result
@@ -276,6 +276,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -289,6 +290,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 2
Handler_read_rnd_deleted 0
Handler_read_rnd_next 9
@@ -301,6 +303,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -313,6 +316,7 @@ Handler_read_key 0
Handler_read_last 1
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -326,6 +330,7 @@ Handler_read_key 0
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 1
Handler_read_rnd_deleted 2
Handler_read_rnd_next 7
@@ -381,6 +386,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 1
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 1
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -420,6 +426,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -432,6 +439,7 @@ Handler_read_key 2
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -443,6 +451,7 @@ Handler_read_key 3
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -454,6 +463,7 @@ Handler_read_key 3
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -703,6 +713,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 1
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 2
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
diff --git a/mysql-test/r/userstat.result b/mysql-test/r/userstat.result
index a56ff5771f6..ea366e5284e 100644
--- a/mysql-test/r/userstat.result
+++ b/mysql-test/r/userstat.result
@@ -121,6 +121,7 @@ Handler_read_key 9
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 5
diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result
index d8f8c0c03f7..b78b3caa58d 100644
--- a/mysql-test/r/variables.result
+++ b/mysql-test/r/variables.result
@@ -1466,15 +1466,17 @@ SELECT @@GLOBAL.server_id;
@@GLOBAL.server_id
4294967295
SET GLOBAL server_id = 0;
+Warnings:
+Warning 1292 Truncated incorrect server_id value: '0'
SELECT @@GLOBAL.server_id;
@@GLOBAL.server_id
-0
+1
SET GLOBAL server_id = -1;
Warnings:
Warning 1292 Truncated incorrect server_id value: '-1'
SELECT @@GLOBAL.server_id;
@@GLOBAL.server_id
-0
+1
SET GLOBAL server_id = @old_server_id;
#
# BUG#10206 - InnoDB: Transaction requiring Max_BinLog_Cache_size > 4GB always rollsback
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index 8ab215fd99a..15f157431b4 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -4271,6 +4271,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 17
@@ -4294,6 +4295,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 17
@@ -5561,6 +5563,21 @@ test.v1 check Error 'test.v1' is not BASE TABLE
test.v1 check status Operation failed
drop view v1;
drop table t1;
+#
+# MDEV-10419: crash in mariadb 10.1.16-MariaDB-1~trusty
+#
+CREATE TABLE t1 (c1 CHAR(13));
+CREATE TABLE t2 (c2 CHAR(13));
+CREATE FUNCTION f() RETURNS INT RETURN 0;
+CREATE OR REPLACE VIEW v1 AS select f() from t1 where c1 in (select c2 from t2);
+DROP FUNCTION f;
+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 `f`() AS `f()` from `t1` where `test`.`t1`.`c1` in (select `test`.`t2`.`c2` from `t2`) latin1 latin1_swedish_ci
+Warnings:
+Warning 1356 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,t2;
# -----------------------------------------------------------------
# -- End of 5.5 tests.
# -----------------------------------------------------------------
@@ -6236,5 +6253,30 @@ i j
DROP VIEW v1;
DROP TABLE t1, t2, t3;
#
+# MDEV-10035: DBUG_ASSERT on CREATE VIEW v1 AS SELECT * FROM t1
+# FOR UPDATE
+#
+CREATE TABLE t1 (a INT);
+insert into t1 values (1),(2);
+CREATE VIEW v1 AS SELECT * FROM t1 FOR UPDATE;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a` from `t1` for update latin1 latin1_swedish_ci
+select * from v1;
+a
+1
+2
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT * FROM t1 LOCK IN SHARE MODE;
+SHOW CREATE VIEW v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a` from `t1` lock in share mode latin1 latin1_swedish_ci
+select * from v1;
+a
+1
+2
+DROP VIEW v1;
+DROP TABLE t1;
+#
# End of 10.2 tests
#
diff --git a/mysql-test/r/win.result b/mysql-test/r/win.result
index ad99453ea1c..d23e8651eb3 100644
--- a/mysql-test/r/win.result
+++ b/mysql-test/r/win.result
@@ -1189,6 +1189,44 @@ pk c cnt
10 2 0
select
pk, c,
+sum(c) over (partition by c
+order by pk
+rows between 1 preceding
+and 2 preceding)
+as sum
+from t1;
+pk c sum
+1 1 NULL
+2 1 NULL
+3 1 NULL
+4 1 NULL
+5 2 NULL
+6 2 NULL
+7 2 NULL
+8 2 NULL
+9 2 NULL
+10 2 NULL
+select
+pk, c,
+sum(c) over (partition by c
+order by pk
+rows between 2 following
+and 1 following)
+as sum
+from t1;
+pk c sum
+1 1 NULL
+2 1 NULL
+3 1 NULL
+4 1 NULL
+5 2 NULL
+6 2 NULL
+7 2 NULL
+8 2 NULL
+9 2 NULL
+10 2 NULL
+select
+pk, c,
count(*) over (partition by c
order by pk
range between 1 preceding
@@ -1788,15 +1826,12 @@ rank() over (order by b)
0
0
drop table t1;
-#
-# MDEV-9894: Assertion `0' failed in Window_func_runner::setup
-# return ER_NOT_SUPPORTED_YET for aggregates that are not yet supported
-# as window functions.
-#
create table t1 (i int);
insert into t1 values (1),(2);
SELECT MAX(i) OVER (PARTITION BY (i)) FROM t1;
-ERROR 42000: This version of MariaDB doesn't yet support 'This aggregate as window function'
+MAX(i) OVER (PARTITION BY (i))
+1
+2
drop table t1;
#
# Check the 0 in ROWS 0 PRECEDING
@@ -1959,3 +1994,24 @@ select rank() over (order by i) from v1;
rank() over (order by i)
1
drop view v1;
+#
+# MDEV-10097: Assertion `count > 0' failed in Item_sum_sum::add_helper(bool)
+#
+CREATE TABLE `orders` (
+`o_orderkey` int(11) NOT NULL,
+`o_custkey` int(11) DEFAULT NULL,
+PRIMARY KEY (`o_orderkey`)
+) DEFAULT CHARSET=latin1;
+INSERT INTO `orders` VALUES (59908,242);
+INSERT INTO `orders` VALUES (59940,238);
+SELECT o_custkey, avg(o_custkey) OVER (PARTITION BY abs(o_custkey)
+ORDER BY o_custkey
+RANGE BETWEEN 15 FOLLOWING
+AND 15 FOLLOWING) from orders;
+o_custkey avg(o_custkey) OVER (PARTITION BY abs(o_custkey)
+ORDER BY o_custkey
+RANGE BETWEEN 15 FOLLOWING
+AND 15 FOLLOWING)
+242 NULL
+238 NULL
+DROP table orders;
diff --git a/mysql-test/r/win_min_max.result b/mysql-test/r/win_min_max.result
new file mode 100644
index 00000000000..63c1c1e22ec
--- /dev/null
+++ b/mysql-test/r/win_min_max.result
@@ -0,0 +1,97 @@
+create table t1 (
+pk int primary key,
+a int,
+b int,
+c real
+);
+insert into t1 values
+(101 , 0, 10, 1.1),
+(102 , 0, 10, 2.1),
+(103 , 1, 10, 3.1),
+(104 , 1, 10, 4.1),
+(108 , 2, 10, 5.1),
+(105 , 2, 20, 6.1),
+(106 , 2, 20, 7.1),
+(107 , 2, 20, 8.15),
+(109 , 4, 20, 9.15),
+(110 , 4, 20, 10.15),
+(111 , 5, NULL, 11.15),
+(112 , 5, 1, 12.25),
+(113 , 5, NULL, 13.35),
+(114 , 5, NULL, 14.50),
+(115 , 5, NULL, 15.65),
+(116 , 6, 1, NULL),
+(117 , 6, 1, 10),
+(118 , 6, 1, 1.1),
+(119 , 6, 1, NULL),
+(120 , 6, 1, NULL),
+(121 , 6, 1, NULL),
+(122 , 6, 1, 2.2),
+(123 , 6, 1, 20.1),
+(124 , 6, 1, -10.4),
+(125 , 6, 1, NULL),
+(126 , 6, 1, NULL),
+(127 , 6, 1, NULL);
+select pk, a, b, min(b) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING) as min,
+max(b) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING) as max
+from t1;
+pk a b min max
+101 0 10 10 10
+102 0 10 10 10
+103 1 10 10 10
+104 1 10 10 10
+105 2 20 20 20
+106 2 20 20 20
+107 2 20 10 20
+108 2 10 10 20
+109 4 20 20 20
+110 4 20 20 20
+111 5 NULL 1 1
+112 5 1 1 1
+113 5 NULL 1 1
+114 5 NULL NULL NULL
+115 5 NULL NULL NULL
+116 6 1 1 1
+117 6 1 1 1
+118 6 1 1 1
+119 6 1 1 1
+120 6 1 1 1
+121 6 1 1 1
+122 6 1 1 1
+123 6 1 1 1
+124 6 1 1 1
+125 6 1 1 1
+126 6 1 1 1
+127 6 1 1 1
+select pk, a, c, min(c) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING) as min,
+max(c) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING) as max
+from t1;
+pk a c min max
+101 0 1.1 1.1 2.1
+102 0 2.1 1.1 2.1
+103 1 3.1 3.1 4.1
+104 1 4.1 3.1 4.1
+105 2 6.1 6.1 7.1
+106 2 7.1 6.1 8.15
+107 2 8.15 5.1 8.15
+108 2 5.1 5.1 8.15
+109 4 9.15 9.15 10.15
+110 4 10.15 9.15 10.15
+111 5 11.15 11.15 12.25
+112 5 12.25 11.15 13.35
+113 5 13.35 12.25 14.5
+114 5 14.5 13.35 15.65
+115 5 15.65 14.5 15.65
+116 6 NULL 10 10
+117 6 10 1.1 10
+118 6 1.1 1.1 10
+119 6 NULL 1.1 1.1
+120 6 NULL NULL NULL
+121 6 NULL 2.2 2.2
+122 6 2.2 2.2 20.1
+123 6 20.1 -10.4 20.1
+124 6 -10.4 -10.4 20.1
+125 6 NULL -10.4 -10.4
+126 6 NULL NULL NULL
+127 6 NULL NULL NULL
+drop table t1;
diff --git a/mysql-test/r/xtradb_mrr.result b/mysql-test/r/xtradb_mrr.result
index 15b750d2fd3..c238d0530af 100644
--- a/mysql-test/r/xtradb_mrr.result
+++ b/mysql-test/r/xtradb_mrr.result
@@ -311,10 +311,10 @@ concat('c-', 1000 + C.a, '-c'),
'filler'
from t1 A, t1 B, t1 C;
explain
-select count(length(a) + length(filler)) from t2 where a>='a-1000-a' and a <'a-1001-a';
+select count(length(a) + length(filler)) from t2 force index (a) where a>='a-1000-a' and a <'a-1001-a';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range a a 9 NULL 99 Using index condition; Rowid-ordered scan
-select count(length(a) + length(filler)) from t2 where a>='a-1000-a' and a <'a-1001-a';
+select count(length(a) + length(filler)) from t2 force index (a) where a>='a-1000-a' and a <'a-1001-a';
count(length(a) + length(filler))
100
drop table t2;
diff --git a/mysql-test/std_data/bug20683959loaddata.txt b/mysql-test/std_data/bug20683959loaddata.txt
new file mode 100644
index 00000000000..1878cc78879
--- /dev/null
+++ b/mysql-test/std_data/bug20683959loaddata.txt
@@ -0,0 +1 @@
+Ã"RT @niouzechun: é˜âˆšõ€®ç¹ä¸Šãƒ£ç¹æ–õ€‡³ç¹§ï½¨ç¹ï½³ç¹ç‰™è€³ç¸ºï½ªç¹§è–™â–¡ç¸ºä»£ï½Œç¸ºï½©ç¸²âˆšã„ç¹ï½³ç¹ä¸Šãƒ£ç¹æ–õ€‡³ç¹§ï½¨ç¹ï½³ç¹å³¨ï½„諠ィ蜉õ€”Žå™ªç¸ºï½ªç¸ºé¡˜ï½©ï½±ç¹§åµâ‰ ç¸ºï½¾ç¹§é¡”ゥ肴・オ逧õ€‹–↓鞫ょå™ç¸ºåŠ±â†‘ç¸ºõ€‹šç‚Šé€•ア縺ッ縲∫樟螳溘õ€­èŽ ï½ºé€•æº˜õ€®è“コ譛ャ逧õ€‹–↓縺õ€‘Žâˆªç¸ºä¸Šï¼žç¸ºä¹â†‘縺õ€‹–ï¼ è³æ¦Šï½¹ï½³é²å³¨â–¡ç¸ºç¤¼ç‚Šè³æ¦Šï½°ï½½ç¸º ç¸ºè‹“セ帙>
diff --git a/mysql-test/std_data/Index.xml b/mysql-test/std_data/ldml/Index.xml
index b66fdfee55c..bf1b3e82bbf 100644
--- a/mysql-test/std_data/Index.xml
+++ b/mysql-test/std_data/ldml/Index.xml
@@ -318,6 +318,38 @@
</charset>
+ <charset name="ascii2">
+ <!--
+ Notes:
+ - ascii2 has two collations with "binary" flag.
+ ctype_ldml.test makes sure that
+ CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET ascii2 BINARY);
+ uses ascii2_bin2, which is the collation with the least ID.
+ - ascii2_general_inherited_ci inherits sort order in ascii2.xml
+ - ascii2_genegal_inherited2_ci inherits sort order directly in this file.
+ -->
+ <collation name="ascii2_general_nopad_ci" id="318" flag="nopad">
+ <rules>
+ <import source="ascii2_general_ci"/>
+ </rules>
+ </collation>
+ <collation name="ascii2_bin2" id="319" flag="binary"/>
+ <collation name="ascii2_general_ci" id="320" flag="primary"/>
+ <collation name="ascii2_bin" id="321" flag="binary"/>
+ <collation name="ascii2_general_inherited_ci" id="322"/>
+ <collation name="ascii2_general_inherited2_ci" id="323">
+ <rules>
+ <import source="ascii2_general_ci"/>
+ </rules>
+ </collation>
+ <collation name="ascii2_badly_inherited_ci" id="324">
+ <rules>
+ <import source="ascii2_non_existing_ci"/>
+ </rules>
+ </collation>
+ <collation name="ascii2_nopad_bin" id="325" flag="binary" flag="nopad"/>
+ </charset>
+
<charset name="latin1">
<family>Western</family>
<description>cp1252 West European</description>
@@ -330,6 +362,12 @@
<alias>latin1</alias>
<collation name="latin1_test" id="99" order="test"/>
<collation name="latin1_test2" id="332" order="test"/>
+ <collation name="latin1_test2_cs" id="333"/>
+ <collation name="latin1_swedish_nopad2_ci" id="334" flag="nopad">
+ <rules>
+ <import source="latin1_swedish_ci"/>
+ </rules>
+ </collation>
</charset>
<charset name="utf8">
diff --git a/mysql-test/std_data/ldml/ascii2.xml b/mysql-test/std_data/ldml/ascii2.xml
new file mode 100644
index 00000000000..34a2dd484a0
--- /dev/null
+++ b/mysql-test/std_data/ldml/ascii2.xml
@@ -0,0 +1,127 @@
+<?xml version='1.0' encoding="utf-8"?>
+
+<charsets>
+
+<charset name="ascii2">
+
+<ctype>
+<map>
+ 00
+ 20 20 20 20 20 20 20 20 20 28 28 28 28 28 20 20
+ 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
+ 48 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10
+ 84 84 84 84 84 84 84 84 84 84 10 10 10 10 10 10
+ 10 81 81 81 81 81 81 01 01 01 01 01 01 01 01 01
+ 01 01 01 01 01 01 01 01 01 01 01 10 10 10 10 10
+ 10 82 82 82 82 82 82 02 02 02 02 02 02 02 02 02
+ 02 02 02 02 02 02 02 02 02 02 02 10 10 10 10 20
+ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+</map>
+</ctype>
+
+
+<lower>
+<map>
+ 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
+ 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
+ 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
+ 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F
+ 40 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F
+ 70 71 72 73 74 75 76 77 78 79 7A 5B 5C 5D 5E 5F
+ 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F
+ 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F
+ 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F
+ 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F
+ A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF
+ B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF
+ C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF
+ D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF
+ E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF
+ F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF
+</map>
+</lower>
+
+
+<upper>
+<map>
+ 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
+ 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
+ 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
+ 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F
+ 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F
+ 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F
+ 60 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F
+ 50 51 52 53 54 55 56 57 58 59 5A 7B 7C 7D 7E 7F
+ 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F
+ 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F
+ A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF
+ B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF
+ C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF
+ D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF
+ E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF
+ F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF
+</map>
+</upper>
+
+
+<unicode>
+<map>
+0000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000A 000B 000C 000D 000E 000F
+0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001A 001B 001C 001D 001E 001F
+0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002A 002B 002C 002D 002E 002F
+0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003A 003B 003C 003D 003E 003F
+0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004A 004B 004C 004D 004E 004F
+0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005A 005B 005C 005D 005E 005F
+0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006A 006B 006C 006D 006E 006F
+0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007A 007B 007C 007D 007E 007F
+0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
+0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
+0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
+0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
+0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
+0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
+0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
+0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
+</map>
+</unicode>
+
+
+<collation name="ascii2_general_ci">
+<map>
+ 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
+ 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
+ 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
+ 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F
+ 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F
+ 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F
+ 60 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F
+ 50 51 52 53 54 55 56 57 58 59 5A 7B 7C 7D 7E 7F
+ 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F
+ 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F
+ A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF
+ B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF
+ C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF
+ D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF
+ E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF
+ F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF
+</map>
+</collation>
+
+<collation name="ascii2_bin" flag="binary"/>
+
+<collation name="ascii2_general_inherited_ci">
+ <rules>
+ <import source="ascii2_general_ci"/>
+ </rules>
+</collation>
+
+</charset>
+
+</charsets>
diff --git a/mysql-test/std_data/latin1.xml b/mysql-test/std_data/ldml/latin1.xml
index fd5197254e2..3e1d021c127 100644
--- a/mysql-test/std_data/latin1.xml
+++ b/mysql-test/std_data/ldml/latin1.xml
@@ -152,6 +152,29 @@
</map>
</collation>
+
+<!-- This is a copy of latin1_general_cs -->
+<collation name="latin1_test2_cs">
+<map>
+ 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
+ 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
+ 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
+ 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F
+ 40 41 51 53 57 5B 65 67 69 6B 75 77 79 7B 7D 81
+ 8F 91 93 95 98 9A A4 A6 A8 AA AF B3 B4 B5 B6 B7
+ B8 42 52 54 58 5C 66 68 6A 6C 76 78 7A 7C 7E 82
+ 90 92 94 96 99 9B A5 A7 A9 AB B0 B9 BA BB BC BF
+ C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF
+ D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF
+ E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF
+ F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF
+ 43 45 47 49 4B 4D 4F 55 5D 5F 61 63 6D 6F 71 73
+ 59 7F 83 85 87 89 8B BD 8D 9C 9E A0 A2 AC B1 97
+ 44 46 48 4A 4C 4E 50 56 5E 60 62 64 6E 70 72 74
+ 5A 80 84 86 88 8A 8C BE 8E 9D 9F A1 A3 AD B2 AE
+</map>
+</collation>
+
</charset>
</charsets>
diff --git a/mysql-test/suite/archive/archive.result b/mysql-test/suite/archive/archive.result
index d0ab319c4fa..603621abf2a 100644
--- a/mysql-test/suite/archive/archive.result
+++ b/mysql-test/suite/archive/archive.result
@@ -11136,8 +11136,8 @@ SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`auto` int(11) DEFAULT NULL,
- `fld1` int(6) unsigned zerofill NOT NULL DEFAULT '000000',
- `companynr` tinyint(2) unsigned zerofill NOT NULL DEFAULT '00',
+ `fld1` int(6) unsigned zerofill NOT NULL DEFAULT 000000,
+ `companynr` tinyint(2) unsigned zerofill NOT NULL DEFAULT 00,
`fld3` char(30) NOT NULL DEFAULT '',
`fld4` char(35) NOT NULL DEFAULT '',
`fld5` char(35) NOT NULL DEFAULT ''
diff --git a/mysql-test/suite/binlog/r/binlog_dmls_on_tmp_tables_readonly.result b/mysql-test/suite/binlog/r/binlog_dmls_on_tmp_tables_readonly.result
new file mode 100644
index 00000000000..b366bde4daf
--- /dev/null
+++ b/mysql-test/suite/binlog/r/binlog_dmls_on_tmp_tables_readonly.result
@@ -0,0 +1,59 @@
+DROP TABLE IF EXISTS t1 ;
+# READ_ONLY does nothing to SUPER users
+# so we use a non-SUPER one:
+CREATE USER test@localhost;
+GRANT CREATE, SELECT, DROP ON *.* TO test@localhost;
+connect con1,localhost,test,,test;
+connection default;
+SET GLOBAL READ_ONLY=1;
+connection con1;
+CREATE TEMPORARY TABLE t1 (a INT) ENGINE=INNODB;
+# Test INSERTS with autocommit being off and on.
+BEGIN;
+INSERT INTO t1 VALUES (10);
+COMMIT;
+INSERT INTO t1 VALUES (20);
+# Test UPDATES with autocommit being off and on.
+BEGIN;
+UPDATE t1 SET a=30 WHERE a=10;
+COMMIT;
+UPDATE t1 SET a=40 WHERE a=20;
+connection default;
+SET GLOBAL READ_ONLY=0;
+# Test scenario where global read_only is enabled in the middle of transaction.
+# Test INSERT operations on temporary tables, INSERTs should be successful even
+# when global read_only is enabled.
+connection con1;
+BEGIN;
+INSERT INTO t1 VALUES(50);
+connection default;
+SET GLOBAL READ_ONLY=1;
+connection con1;
+SELECT @@GLOBAL.READ_ONLY;
+@@GLOBAL.READ_ONLY
+1
+COMMIT;
+connection default;
+SET GLOBAL READ_ONLY=0;
+# Test UPDATE operations on temporary tables, UPDATEs should be successful even
+# when global read_only is enabled.
+connection con1;
+BEGIN;
+UPDATE t1 SET a=60 WHERE a=50;
+connection default;
+SET GLOBAL READ_ONLY=1;
+connection con1;
+SELECT @@GLOBAL.READ_ONLY;
+@@GLOBAL.READ_ONLY
+1
+COMMIT;
+SELECT * FROM t1;
+a
+30
+40
+60
+# Clean up
+connection default;
+SET GLOBAL READ_ONLY=0;
+disconnect con1;
+DROP USER test@localhost;
diff --git a/mysql-test/suite/binlog/t/binlog_dmls_on_tmp_tables_readonly.test b/mysql-test/suite/binlog/t/binlog_dmls_on_tmp_tables_readonly.test
new file mode 100644
index 00000000000..0fa35d57745
--- /dev/null
+++ b/mysql-test/suite/binlog/t/binlog_dmls_on_tmp_tables_readonly.test
@@ -0,0 +1,92 @@
+# ==== Purpose ====
+#
+# Check that DMLs are allowed on temporary tables, when server is in read only
+# mode and binary log is enabled with binlog-format being stmt/mixed mode.
+#
+# ==== Implementation ====
+#
+# Start the server with binary log being enabled. Mark the server as read only.
+# Create a non-SUPER user and let the user to create a temporary table and
+# perform DML operations on that temporary table. DMLs should not be blocked
+# with a 'server read-only mode' error.
+#
+# ==== References ====
+#
+# Bug#12818255: READ-ONLY OPTION DOES NOT ALLOW INSERTS/UPDATES ON TEMPORARY
+# TABLES
+# Bug#14294223: CHANGES NOT ALLOWED TO TEMPORARY TABLES ON READ-ONLY SERVERS
+###############################################################################
+--source include/have_log_bin.inc
+--source include/have_innodb.inc
+--disable_warnings
+DROP TABLE IF EXISTS t1 ;
+--enable_warnings
+
+--enable_connect_log
+--echo # READ_ONLY does nothing to SUPER users
+--echo # so we use a non-SUPER one:
+CREATE USER test@localhost;
+GRANT CREATE, SELECT, DROP ON *.* TO test@localhost;
+
+connect (con1,localhost,test,,test);
+
+connection default;
+SET GLOBAL READ_ONLY=1;
+
+connection con1;
+CREATE TEMPORARY TABLE t1 (a INT) ENGINE=INNODB;
+
+--echo # Test INSERTS with autocommit being off and on.
+BEGIN;
+INSERT INTO t1 VALUES (10);
+COMMIT;
+INSERT INTO t1 VALUES (20);
+
+--echo # Test UPDATES with autocommit being off and on.
+BEGIN;
+UPDATE t1 SET a=30 WHERE a=10;
+COMMIT;
+UPDATE t1 SET a=40 WHERE a=20;
+
+connection default;
+SET GLOBAL READ_ONLY=0;
+
+--echo # Test scenario where global read_only is enabled in the middle of transaction.
+--echo # Test INSERT operations on temporary tables, INSERTs should be successful even
+--echo # when global read_only is enabled.
+connection con1;
+BEGIN;
+INSERT INTO t1 VALUES(50);
+
+connection default;
+SET GLOBAL READ_ONLY=1;
+
+connection con1;
+SELECT @@GLOBAL.READ_ONLY;
+COMMIT;
+
+connection default;
+SET GLOBAL READ_ONLY=0;
+
+--echo # Test UPDATE operations on temporary tables, UPDATEs should be successful even
+--echo # when global read_only is enabled.
+connection con1;
+BEGIN;
+UPDATE t1 SET a=60 WHERE a=50;
+
+connection default;
+SET GLOBAL READ_ONLY=1;
+
+connection con1;
+SELECT @@GLOBAL.READ_ONLY;
+COMMIT;
+
+SELECT * FROM t1;
+
+--echo # Clean up
+connection default;
+SET GLOBAL READ_ONLY=0;
+
+disconnect con1;
+DROP USER test@localhost;
+--disable_connect_log
diff --git a/mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result b/mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result
index 69ab0d0bca4..798e0ca4357 100644
--- a/mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result
+++ b/mysql-test/suite/encryption/r/innodb_onlinealter_encryption.result
@@ -61,7 +61,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`id` int(11) NOT NULL,
`a` varchar(255) DEFAULT NULL,
- `b` int(11) DEFAULT '2',
+ `b` int(11) DEFAULT 2,
PRIMARY KEY (`id`),
KEY `a` (`a`),
KEY `b` (`b`)
@@ -71,7 +71,7 @@ Table Create Table
t2 CREATE TABLE `t2` (
`id` int(11) NOT NULL,
`a` varchar(255) DEFAULT NULL,
- `b` int(11) DEFAULT '2',
+ `b` int(11) DEFAULT 2,
PRIMARY KEY (`id`),
KEY `a` (`a`),
KEY `b` (`b`)
@@ -81,7 +81,7 @@ Table Create Table
t3 CREATE TABLE `t3` (
`id` int(11) DEFAULT NULL,
`a` varchar(255) DEFAULT NULL,
- `c` int(11) DEFAULT '5',
+ `c` int(11) DEFAULT 5,
KEY `a` (`a`),
KEY `c` (`c`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `encrypted`=yes
@@ -90,7 +90,7 @@ Table Create Table
t4 CREATE TABLE `t4` (
`id` int(11) DEFAULT NULL,
`a` varchar(255) DEFAULT NULL,
- `c` int(11) DEFAULT '5',
+ `c` int(11) DEFAULT 5,
KEY `a` (`a`),
KEY `c` (`c`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
@@ -118,7 +118,7 @@ Table Create Table
t7 CREATE TABLE `t7` (
`id` int(11) NOT NULL,
`a` varchar(255) DEFAULT NULL,
- `b` int(11) DEFAULT '2',
+ `b` int(11) DEFAULT 2,
PRIMARY KEY (`id`),
KEY `a` (`a`),
KEY `b` (`b`)
diff --git a/mysql-test/suite/engines/funcs/r/comment_column2.result b/mysql-test/suite/engines/funcs/r/comment_column2.result
index 6fa5d73b70a..99402e7f5b4 100644
--- a/mysql-test/suite/engines/funcs/r/comment_column2.result
+++ b/mysql-test/suite/engines/funcs/r/comment_column2.result
@@ -249,7 +249,7 @@ abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
comment index_comment char_length(index_comment)
ALTER TABLE t1 ADD COLUMN c64 INTEGER COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij';
-ERROR HY000: Too many columns
+ERROR HY000: Table definition is too large
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
table_comment char_length(table_comment)
0
@@ -388,7 +388,7 @@ c63 INTEGER COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghi
c64 INTEGER COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij',
c65 INTEGER COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij')
;
-ERROR HY000: Too many columns
+ERROR HY000: Table definition is too large
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
table_comment char_length(table_comment)
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
diff --git a/mysql-test/suite/engines/funcs/r/db_alter_collate_ascii.result b/mysql-test/suite/engines/funcs/r/db_alter_collate_ascii.result
index ee127d76bcc..2dffc7dcbb8 100644
--- a/mysql-test/suite/engines/funcs/r/db_alter_collate_ascii.result
+++ b/mysql-test/suite/engines/funcs/r/db_alter_collate_ascii.result
@@ -3,14 +3,24 @@ SHOW COLLATION;
Collation Charset Id Default Compiled Sortlen
big5_chinese_ci big5 1 Yes # #
big5_bin big5 84 # #
+big5_chinese_nopad_ci big5 1025 # #
+big5_nopad_bin big5 1108 # #
dec8_swedish_ci dec8 3 Yes # #
dec8_bin dec8 69 # #
+dec8_swedish_nopad_ci dec8 1027 # #
+dec8_nopad_bin dec8 1093 # #
cp850_general_ci cp850 4 Yes # #
cp850_bin cp850 80 # #
+cp850_general_nopad_ci cp850 1028 # #
+cp850_nopad_bin cp850 1104 # #
hp8_english_ci hp8 6 Yes # #
hp8_bin hp8 72 # #
+hp8_english_nopad_ci hp8 1030 # #
+hp8_nopad_bin hp8 1096 # #
koi8r_general_ci koi8r 7 Yes # #
koi8r_bin koi8r 74 # #
+koi8r_general_nopad_ci koi8r 1031 # #
+koi8r_nopad_bin koi8r 1098 # #
latin1_german1_ci latin1 5 # #
latin1_swedish_ci latin1 8 Yes # #
latin1_danish_ci latin1 15 # #
@@ -19,42 +29,74 @@ latin1_bin latin1 47 # #
latin1_general_ci latin1 48 # #
latin1_general_cs latin1 49 # #
latin1_spanish_ci latin1 94 # #
+latin1_swedish_nopad_ci latin1 1032 # #
+latin1_nopad_bin latin1 1071 # #
latin2_czech_cs latin2 2 # #
latin2_general_ci latin2 9 Yes # #
latin2_hungarian_ci latin2 21 # #
latin2_croatian_ci latin2 27 # #
latin2_bin latin2 77 # #
+latin2_general_nopad_ci latin2 1033 # #
+latin2_nopad_bin latin2 1101 # #
swe7_swedish_ci swe7 10 Yes # #
swe7_bin swe7 82 # #
+swe7_swedish_nopad_ci swe7 1034 # #
+swe7_nopad_bin swe7 1106 # #
ascii_general_ci ascii 11 Yes # #
ascii_bin ascii 65 # #
+ascii_general_nopad_ci ascii 1035 # #
+ascii_nopad_bin ascii 1089 # #
ujis_japanese_ci ujis 12 Yes # #
ujis_bin ujis 91 # #
+ujis_japanese_nopad_ci ujis 1036 # #
+ujis_nopad_bin ujis 1115 # #
sjis_japanese_ci sjis 13 Yes # #
sjis_bin sjis 88 # #
+sjis_japanese_nopad_ci sjis 1037 # #
+sjis_nopad_bin sjis 1112 # #
hebrew_general_ci hebrew 16 Yes # #
hebrew_bin hebrew 71 # #
+hebrew_general_nopad_ci hebrew 1040 # #
+hebrew_nopad_bin hebrew 1095 # #
tis620_thai_ci tis620 18 Yes # #
tis620_bin tis620 89 # #
+tis620_thai_nopad_ci tis620 1042 # #
+tis620_nopad_bin tis620 1113 # #
euckr_korean_ci euckr 19 Yes # #
euckr_bin euckr 85 # #
+euckr_korean_nopad_ci euckr 1043 # #
+euckr_nopad_bin euckr 1109 # #
koi8u_general_ci koi8u 22 Yes # #
koi8u_bin koi8u 75 # #
+koi8u_general_nopad_ci koi8u 1046 # #
+koi8u_nopad_bin koi8u 1099 # #
gb2312_chinese_ci gb2312 24 Yes # #
gb2312_bin gb2312 86 # #
+gb2312_chinese_nopad_ci gb2312 1048 # #
+gb2312_nopad_bin gb2312 1110 # #
greek_general_ci greek 25 Yes # #
greek_bin greek 70 # #
+greek_general_nopad_ci greek 1049 # #
+greek_nopad_bin greek 1094 # #
cp1250_general_ci cp1250 26 Yes # #
cp1250_czech_cs cp1250 34 # #
cp1250_croatian_ci cp1250 44 # #
cp1250_bin cp1250 66 # #
cp1250_polish_ci cp1250 99 # #
+cp1250_general_nopad_ci cp1250 1050 # #
+cp1250_nopad_bin cp1250 1090 # #
gbk_chinese_ci gbk 28 Yes # #
gbk_bin gbk 87 # #
+gbk_chinese_nopad_ci gbk 1052 # #
+gbk_nopad_bin gbk 1111 # #
latin5_turkish_ci latin5 30 Yes # #
latin5_bin latin5 78 # #
+latin5_turkish_nopad_ci latin5 1054 # #
+latin5_nopad_bin latin5 1102 # #
armscii8_general_ci armscii8 32 Yes # #
armscii8_bin armscii8 64 # #
+armscii8_general_nopad_ci armscii8 1056 # #
+armscii8_nopad_bin armscii8 1088 # #
utf8_general_ci utf8 33 Yes # #
utf8_bin utf8 83 # #
utf8_unicode_ci utf8 192 # #
@@ -85,6 +127,8 @@ utf8_general_mysql500_ci utf8 223 # #
utf8_croatian_ci utf8 576 # #
utf8_myanmar_ci utf8 577 # #
utf8_thai_520_w2 utf8 578 # #
+utf8_general_nopad_ci utf8 1057 # #
+utf8_nopad_bin utf8 1107 # #
ucs2_general_ci ucs2 35 Yes # #
ucs2_bin ucs2 90 # #
ucs2_unicode_ci ucs2 128 # #
@@ -115,20 +159,34 @@ ucs2_general_mysql500_ci ucs2 159 # #
ucs2_croatian_ci ucs2 640 # #
ucs2_myanmar_ci ucs2 641 # #
ucs2_thai_520_w2 ucs2 642 # #
+ucs2_general_nopad_ci ucs2 1059 # #
+ucs2_nopad_bin ucs2 1114 # #
cp866_general_ci cp866 36 Yes # #
cp866_bin cp866 68 # #
+cp866_general_nopad_ci cp866 1060 # #
+cp866_nopad_bin cp866 1092 # #
keybcs2_general_ci keybcs2 37 Yes # #
keybcs2_bin keybcs2 73 # #
+keybcs2_general_nopad_ci keybcs2 1061 # #
+keybcs2_nopad_bin keybcs2 1097 # #
macce_general_ci macce 38 Yes # #
macce_bin macce 43 # #
+macce_general_nopad_ci macce 1062 # #
+macce_nopad_bin macce 1067 # #
macroman_general_ci macroman 39 Yes # #
macroman_bin macroman 53 # #
+macroman_general_nopad_ci macroman 1063 # #
+macroman_nopad_bin macroman 1077 # #
cp852_general_ci cp852 40 Yes # #
cp852_bin cp852 81 # #
+cp852_general_nopad_ci cp852 1064 # #
+cp852_nopad_bin cp852 1105 # #
latin7_estonian_cs latin7 20 # #
latin7_general_ci latin7 41 Yes # #
latin7_general_cs latin7 42 # #
latin7_bin latin7 79 # #
+latin7_general_nopad_ci latin7 1065 # #
+latin7_nopad_bin latin7 1103 # #
utf8mb4_general_ci utf8mb4 45 Yes # #
utf8mb4_bin utf8mb4 46 # #
utf8mb4_unicode_ci utf8mb4 224 # #
@@ -158,11 +216,15 @@ utf8mb4_vietnamese_ci utf8mb4 247 # #
utf8mb4_croatian_ci utf8mb4 608 # #
utf8mb4_myanmar_ci utf8mb4 609 # #
utf8mb4_thai_520_w2 utf8mb4 610 # #
+utf8mb4_general_nopad_ci utf8mb4 1069 # #
+utf8mb4_nopad_bin utf8mb4 1070 # #
cp1251_bulgarian_ci cp1251 14 # #
cp1251_ukrainian_ci cp1251 23 # #
cp1251_bin cp1251 50 # #
cp1251_general_ci cp1251 51 Yes # #
cp1251_general_cs cp1251 52 # #
+cp1251_nopad_bin cp1251 1074 # #
+cp1251_general_nopad_ci cp1251 1075 # #
utf16_general_ci utf16 54 Yes # #
utf16_bin utf16 55 # #
utf16_unicode_ci utf16 101 # #
@@ -192,13 +254,21 @@ utf16_vietnamese_ci utf16 124 # #
utf16_croatian_ci utf16 672 # #
utf16_myanmar_ci utf16 673 # #
utf16_thai_520_w2 utf16 674 # #
+utf16_general_nopad_ci utf16 1078 # #
+utf16_nopad_bin utf16 1079 # #
utf16le_general_ci utf16le 56 Yes # #
utf16le_bin utf16le 62 # #
+utf16le_general_nopad_ci utf16le 1080 # #
+utf16le_nopad_bin utf16le 1086 # #
cp1256_general_ci cp1256 57 Yes # #
cp1256_bin cp1256 67 # #
+cp1256_general_nopad_ci cp1256 1081 # #
+cp1256_nopad_bin cp1256 1091 # #
cp1257_lithuanian_ci cp1257 29 # #
cp1257_bin cp1257 58 # #
cp1257_general_ci cp1257 59 Yes # #
+cp1257_nopad_bin cp1257 1082 # #
+cp1257_general_nopad_ci cp1257 1083 # #
utf32_general_ci utf32 60 Yes # #
utf32_bin utf32 61 # #
utf32_unicode_ci utf32 160 # #
@@ -228,13 +298,21 @@ utf32_vietnamese_ci utf32 183 # #
utf32_croatian_ci utf32 736 # #
utf32_myanmar_ci utf32 737 # #
utf32_thai_520_w2 utf32 738 # #
+utf32_general_nopad_ci utf32 1084 # #
+utf32_nopad_bin utf32 1085 # #
binary binary 63 Yes # #
geostd8_general_ci geostd8 92 Yes # #
geostd8_bin geostd8 93 # #
+geostd8_general_nopad_ci geostd8 1116 # #
+geostd8_nopad_bin geostd8 1117 # #
cp932_japanese_ci cp932 95 Yes # #
cp932_bin cp932 96 # #
+cp932_japanese_nopad_ci cp932 1119 # #
+cp932_nopad_bin cp932 1120 # #
eucjpms_japanese_ci eucjpms 97 Yes # #
eucjpms_bin eucjpms 98 # #
+eucjpms_japanese_nopad_ci eucjpms 1121 # #
+eucjpms_nopad_bin eucjpms 1122 # #
CREATE DATABASE d9 DEFAULT CHARACTER SET ascii;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
diff --git a/mysql-test/suite/engines/funcs/r/db_alter_collate_utf8.result b/mysql-test/suite/engines/funcs/r/db_alter_collate_utf8.result
index 46921fcaa8c..6e32c25284e 100644
--- a/mysql-test/suite/engines/funcs/r/db_alter_collate_utf8.result
+++ b/mysql-test/suite/engines/funcs/r/db_alter_collate_utf8.result
@@ -3,14 +3,24 @@ SHOW COLLATION;
Collation Charset Id Default Compiled Sortlen
big5_chinese_ci big5 1 Yes # #
big5_bin big5 84 # #
+big5_chinese_nopad_ci big5 1025 # #
+big5_nopad_bin big5 1108 # #
dec8_swedish_ci dec8 3 Yes # #
dec8_bin dec8 69 # #
+dec8_swedish_nopad_ci dec8 1027 # #
+dec8_nopad_bin dec8 1093 # #
cp850_general_ci cp850 4 Yes # #
cp850_bin cp850 80 # #
+cp850_general_nopad_ci cp850 1028 # #
+cp850_nopad_bin cp850 1104 # #
hp8_english_ci hp8 6 Yes # #
hp8_bin hp8 72 # #
+hp8_english_nopad_ci hp8 1030 # #
+hp8_nopad_bin hp8 1096 # #
koi8r_general_ci koi8r 7 Yes # #
koi8r_bin koi8r 74 # #
+koi8r_general_nopad_ci koi8r 1031 # #
+koi8r_nopad_bin koi8r 1098 # #
latin1_german1_ci latin1 5 # #
latin1_swedish_ci latin1 8 Yes # #
latin1_danish_ci latin1 15 # #
@@ -19,42 +29,74 @@ latin1_bin latin1 47 # #
latin1_general_ci latin1 48 # #
latin1_general_cs latin1 49 # #
latin1_spanish_ci latin1 94 # #
+latin1_swedish_nopad_ci latin1 1032 # #
+latin1_nopad_bin latin1 1071 # #
latin2_czech_cs latin2 2 # #
latin2_general_ci latin2 9 Yes # #
latin2_hungarian_ci latin2 21 # #
latin2_croatian_ci latin2 27 # #
latin2_bin latin2 77 # #
+latin2_general_nopad_ci latin2 1033 # #
+latin2_nopad_bin latin2 1101 # #
swe7_swedish_ci swe7 10 Yes # #
swe7_bin swe7 82 # #
+swe7_swedish_nopad_ci swe7 1034 # #
+swe7_nopad_bin swe7 1106 # #
ascii_general_ci ascii 11 Yes # #
ascii_bin ascii 65 # #
+ascii_general_nopad_ci ascii 1035 # #
+ascii_nopad_bin ascii 1089 # #
ujis_japanese_ci ujis 12 Yes # #
ujis_bin ujis 91 # #
+ujis_japanese_nopad_ci ujis 1036 # #
+ujis_nopad_bin ujis 1115 # #
sjis_japanese_ci sjis 13 Yes # #
sjis_bin sjis 88 # #
+sjis_japanese_nopad_ci sjis 1037 # #
+sjis_nopad_bin sjis 1112 # #
hebrew_general_ci hebrew 16 Yes # #
hebrew_bin hebrew 71 # #
+hebrew_general_nopad_ci hebrew 1040 # #
+hebrew_nopad_bin hebrew 1095 # #
tis620_thai_ci tis620 18 Yes # #
tis620_bin tis620 89 # #
+tis620_thai_nopad_ci tis620 1042 # #
+tis620_nopad_bin tis620 1113 # #
euckr_korean_ci euckr 19 Yes # #
euckr_bin euckr 85 # #
+euckr_korean_nopad_ci euckr 1043 # #
+euckr_nopad_bin euckr 1109 # #
koi8u_general_ci koi8u 22 Yes # #
koi8u_bin koi8u 75 # #
+koi8u_general_nopad_ci koi8u 1046 # #
+koi8u_nopad_bin koi8u 1099 # #
gb2312_chinese_ci gb2312 24 Yes # #
gb2312_bin gb2312 86 # #
+gb2312_chinese_nopad_ci gb2312 1048 # #
+gb2312_nopad_bin gb2312 1110 # #
greek_general_ci greek 25 Yes # #
greek_bin greek 70 # #
+greek_general_nopad_ci greek 1049 # #
+greek_nopad_bin greek 1094 # #
cp1250_general_ci cp1250 26 Yes # #
cp1250_czech_cs cp1250 34 # #
cp1250_croatian_ci cp1250 44 # #
cp1250_bin cp1250 66 # #
cp1250_polish_ci cp1250 99 # #
+cp1250_general_nopad_ci cp1250 1050 # #
+cp1250_nopad_bin cp1250 1090 # #
gbk_chinese_ci gbk 28 Yes # #
gbk_bin gbk 87 # #
+gbk_chinese_nopad_ci gbk 1052 # #
+gbk_nopad_bin gbk 1111 # #
latin5_turkish_ci latin5 30 Yes # #
latin5_bin latin5 78 # #
+latin5_turkish_nopad_ci latin5 1054 # #
+latin5_nopad_bin latin5 1102 # #
armscii8_general_ci armscii8 32 Yes # #
armscii8_bin armscii8 64 # #
+armscii8_general_nopad_ci armscii8 1056 # #
+armscii8_nopad_bin armscii8 1088 # #
utf8_general_ci utf8 33 Yes # #
utf8_bin utf8 83 # #
utf8_unicode_ci utf8 192 # #
@@ -85,6 +127,8 @@ utf8_general_mysql500_ci utf8 223 # #
utf8_croatian_ci utf8 576 # #
utf8_myanmar_ci utf8 577 # #
utf8_thai_520_w2 utf8 578 # #
+utf8_general_nopad_ci utf8 1057 # #
+utf8_nopad_bin utf8 1107 # #
ucs2_general_ci ucs2 35 Yes # #
ucs2_bin ucs2 90 # #
ucs2_unicode_ci ucs2 128 # #
@@ -115,20 +159,34 @@ ucs2_general_mysql500_ci ucs2 159 # #
ucs2_croatian_ci ucs2 640 # #
ucs2_myanmar_ci ucs2 641 # #
ucs2_thai_520_w2 ucs2 642 # #
+ucs2_general_nopad_ci ucs2 1059 # #
+ucs2_nopad_bin ucs2 1114 # #
cp866_general_ci cp866 36 Yes # #
cp866_bin cp866 68 # #
+cp866_general_nopad_ci cp866 1060 # #
+cp866_nopad_bin cp866 1092 # #
keybcs2_general_ci keybcs2 37 Yes # #
keybcs2_bin keybcs2 73 # #
+keybcs2_general_nopad_ci keybcs2 1061 # #
+keybcs2_nopad_bin keybcs2 1097 # #
macce_general_ci macce 38 Yes # #
macce_bin macce 43 # #
+macce_general_nopad_ci macce 1062 # #
+macce_nopad_bin macce 1067 # #
macroman_general_ci macroman 39 Yes # #
macroman_bin macroman 53 # #
+macroman_general_nopad_ci macroman 1063 # #
+macroman_nopad_bin macroman 1077 # #
cp852_general_ci cp852 40 Yes # #
cp852_bin cp852 81 # #
+cp852_general_nopad_ci cp852 1064 # #
+cp852_nopad_bin cp852 1105 # #
latin7_estonian_cs latin7 20 # #
latin7_general_ci latin7 41 Yes # #
latin7_general_cs latin7 42 # #
latin7_bin latin7 79 # #
+latin7_general_nopad_ci latin7 1065 # #
+latin7_nopad_bin latin7 1103 # #
utf8mb4_general_ci utf8mb4 45 Yes # #
utf8mb4_bin utf8mb4 46 # #
utf8mb4_unicode_ci utf8mb4 224 # #
@@ -158,11 +216,15 @@ utf8mb4_vietnamese_ci utf8mb4 247 # #
utf8mb4_croatian_ci utf8mb4 608 # #
utf8mb4_myanmar_ci utf8mb4 609 # #
utf8mb4_thai_520_w2 utf8mb4 610 # #
+utf8mb4_general_nopad_ci utf8mb4 1069 # #
+utf8mb4_nopad_bin utf8mb4 1070 # #
cp1251_bulgarian_ci cp1251 14 # #
cp1251_ukrainian_ci cp1251 23 # #
cp1251_bin cp1251 50 # #
cp1251_general_ci cp1251 51 Yes # #
cp1251_general_cs cp1251 52 # #
+cp1251_nopad_bin cp1251 1074 # #
+cp1251_general_nopad_ci cp1251 1075 # #
utf16_general_ci utf16 54 Yes # #
utf16_bin utf16 55 # #
utf16_unicode_ci utf16 101 # #
@@ -192,13 +254,21 @@ utf16_vietnamese_ci utf16 124 # #
utf16_croatian_ci utf16 672 # #
utf16_myanmar_ci utf16 673 # #
utf16_thai_520_w2 utf16 674 # #
+utf16_general_nopad_ci utf16 1078 # #
+utf16_nopad_bin utf16 1079 # #
utf16le_general_ci utf16le 56 Yes # #
utf16le_bin utf16le 62 # #
+utf16le_general_nopad_ci utf16le 1080 # #
+utf16le_nopad_bin utf16le 1086 # #
cp1256_general_ci cp1256 57 Yes # #
cp1256_bin cp1256 67 # #
+cp1256_general_nopad_ci cp1256 1081 # #
+cp1256_nopad_bin cp1256 1091 # #
cp1257_lithuanian_ci cp1257 29 # #
cp1257_bin cp1257 58 # #
cp1257_general_ci cp1257 59 Yes # #
+cp1257_nopad_bin cp1257 1082 # #
+cp1257_general_nopad_ci cp1257 1083 # #
utf32_general_ci utf32 60 Yes # #
utf32_bin utf32 61 # #
utf32_unicode_ci utf32 160 # #
@@ -228,13 +298,21 @@ utf32_vietnamese_ci utf32 183 # #
utf32_croatian_ci utf32 736 # #
utf32_myanmar_ci utf32 737 # #
utf32_thai_520_w2 utf32 738 # #
+utf32_general_nopad_ci utf32 1084 # #
+utf32_nopad_bin utf32 1085 # #
binary binary 63 Yes # #
geostd8_general_ci geostd8 92 Yes # #
geostd8_bin geostd8 93 # #
+geostd8_general_nopad_ci geostd8 1116 # #
+geostd8_nopad_bin geostd8 1117 # #
cp932_japanese_ci cp932 95 Yes # #
cp932_bin cp932 96 # #
+cp932_japanese_nopad_ci cp932 1119 # #
+cp932_nopad_bin cp932 1120 # #
eucjpms_japanese_ci eucjpms 97 Yes # #
eucjpms_bin eucjpms 98 # #
+eucjpms_japanese_nopad_ci eucjpms 1121 # #
+eucjpms_nopad_bin eucjpms 1122 # #
CREATE DATABASE d10 DEFAULT CHARACTER SET utf8;
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY SCHEMA_NAME;
CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH
diff --git a/mysql-test/suite/engines/funcs/r/ta_set_drop_default.result b/mysql-test/suite/engines/funcs/r/ta_set_drop_default.result
index 2b45626f08d..ffd3c000c7d 100644
--- a/mysql-test/suite/engines/funcs/r/ta_set_drop_default.result
+++ b/mysql-test/suite/engines/funcs/r/ta_set_drop_default.result
@@ -19,7 +19,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` tinyint(4) NOT NULL,
- `c2` tinyint(4) DEFAULT '10',
+ `c2` tinyint(4) DEFAULT 10,
PRIMARY KEY (`c1`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
ALTER TABLE t1 ALTER c2 DROP DEFAULT;
@@ -60,7 +60,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` smallint(6) NOT NULL,
- `c2` smallint(6) DEFAULT '10',
+ `c2` smallint(6) DEFAULT 10,
PRIMARY KEY (`c1`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
ALTER TABLE t1 ALTER c2 DROP DEFAULT;
@@ -101,7 +101,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` mediumint(9) NOT NULL,
- `c2` mediumint(9) DEFAULT '10',
+ `c2` mediumint(9) DEFAULT 10,
PRIMARY KEY (`c1`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
ALTER TABLE t1 ALTER c2 DROP DEFAULT;
@@ -142,7 +142,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL,
- `c2` int(11) DEFAULT '10',
+ `c2` int(11) DEFAULT 10,
PRIMARY KEY (`c1`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
ALTER TABLE t1 ALTER c2 DROP DEFAULT;
@@ -183,7 +183,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL,
- `c2` int(11) DEFAULT '10',
+ `c2` int(11) DEFAULT 10,
PRIMARY KEY (`c1`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
ALTER TABLE t1 ALTER c2 DROP DEFAULT;
@@ -224,7 +224,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` bigint(20) NOT NULL,
- `c2` bigint(20) DEFAULT '10',
+ `c2` bigint(20) DEFAULT 10,
PRIMARY KEY (`c1`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
ALTER TABLE t1 ALTER c2 DROP DEFAULT;
@@ -265,7 +265,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` double NOT NULL,
- `c2` double DEFAULT '10',
+ `c2` double DEFAULT 10,
PRIMARY KEY (`c1`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
ALTER TABLE t1 ALTER c2 DROP DEFAULT;
@@ -306,7 +306,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` double NOT NULL,
- `c2` double DEFAULT '10',
+ `c2` double DEFAULT 10,
PRIMARY KEY (`c1`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
ALTER TABLE t1 ALTER c2 DROP DEFAULT;
@@ -347,7 +347,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` float NOT NULL,
- `c2` float DEFAULT '10',
+ `c2` float DEFAULT 10,
PRIMARY KEY (`c1`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
ALTER TABLE t1 ALTER c2 DROP DEFAULT;
@@ -388,7 +388,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` decimal(10,0) NOT NULL,
- `c2` decimal(10,0) DEFAULT '10',
+ `c2` decimal(10,0) DEFAULT 10,
PRIMARY KEY (`c1`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
ALTER TABLE t1 ALTER c2 DROP DEFAULT;
@@ -429,7 +429,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` decimal(10,0) NOT NULL,
- `c2` decimal(10,0) DEFAULT '10',
+ `c2` decimal(10,0) DEFAULT 10,
PRIMARY KEY (`c1`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
ALTER TABLE t1 ALTER c2 DROP DEFAULT;
@@ -470,7 +470,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` tinyint(4) NOT NULL,
- `c2` tinyint(4) DEFAULT '10',
+ `c2` tinyint(4) DEFAULT 10,
PRIMARY KEY (`c1`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT;
@@ -511,7 +511,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` smallint(6) NOT NULL,
- `c2` smallint(6) DEFAULT '10',
+ `c2` smallint(6) DEFAULT 10,
PRIMARY KEY (`c1`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT;
@@ -552,7 +552,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` mediumint(9) NOT NULL,
- `c2` mediumint(9) DEFAULT '10',
+ `c2` mediumint(9) DEFAULT 10,
PRIMARY KEY (`c1`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT;
@@ -593,7 +593,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL,
- `c2` int(11) DEFAULT '10',
+ `c2` int(11) DEFAULT 10,
PRIMARY KEY (`c1`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT;
@@ -634,7 +634,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL,
- `c2` int(11) DEFAULT '10',
+ `c2` int(11) DEFAULT 10,
PRIMARY KEY (`c1`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT;
@@ -675,7 +675,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` bigint(20) NOT NULL,
- `c2` bigint(20) DEFAULT '10',
+ `c2` bigint(20) DEFAULT 10,
PRIMARY KEY (`c1`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT;
@@ -716,7 +716,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` double NOT NULL,
- `c2` double DEFAULT '10',
+ `c2` double DEFAULT 10,
PRIMARY KEY (`c1`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT;
@@ -757,7 +757,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` double NOT NULL,
- `c2` double DEFAULT '10',
+ `c2` double DEFAULT 10,
PRIMARY KEY (`c1`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT;
@@ -798,7 +798,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` float NOT NULL,
- `c2` float DEFAULT '10',
+ `c2` float DEFAULT 10,
PRIMARY KEY (`c1`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT;
@@ -839,7 +839,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` decimal(10,0) NOT NULL,
- `c2` decimal(10,0) DEFAULT '10',
+ `c2` decimal(10,0) DEFAULT 10,
PRIMARY KEY (`c1`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT;
@@ -880,7 +880,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` decimal(10,0) NOT NULL,
- `c2` decimal(10,0) DEFAULT '10',
+ `c2` decimal(10,0) DEFAULT 10,
PRIMARY KEY (`c1`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
ALTER TABLE t1 ALTER COLUMN c2 DROP DEFAULT;
diff --git a/mysql-test/suite/engines/funcs/r/tc_column_default_decimal.result b/mysql-test/suite/engines/funcs/r/tc_column_default_decimal.result
index 8a70602c0cc..b049451b2b7 100644
--- a/mysql-test/suite/engines/funcs/r/tc_column_default_decimal.result
+++ b/mysql-test/suite/engines/funcs/r/tc_column_default_decimal.result
@@ -7,7 +7,7 @@ t12
SHOW CREATE TABLE t12;
Table Create Table
t12 CREATE TABLE `t12` (
- `c1` decimal(5,0) DEFAULT '2'
+ `c1` decimal(5,0) DEFAULT 2
) ENGINE=ENGINE DEFAULT CHARSET=latin1
DROP TABLE t12;
SHOW TABLES;
@@ -19,7 +19,7 @@ t13
SHOW CREATE TABLE t13;
Table Create Table
t13 CREATE TABLE `t13` (
- `c1` decimal(5,4) DEFAULT '3.1234'
+ `c1` decimal(5,4) DEFAULT 3.1234
) ENGINE=ENGINE DEFAULT CHARSET=latin1
DROP TABLE t13;
SHOW TABLES;
@@ -31,7 +31,7 @@ t12
SHOW CREATE TABLE t12;
Table Create Table
t12 CREATE TABLE `t12` (
- `c1` decimal(5,0) DEFAULT '2'
+ `c1` decimal(5,0) DEFAULT 2
) ENGINE=ENGINE DEFAULT CHARSET=latin1
DROP TABLE t12;
SHOW TABLES;
@@ -43,7 +43,7 @@ t13
SHOW CREATE TABLE t13;
Table Create Table
t13 CREATE TABLE `t13` (
- `c1` decimal(5,4) DEFAULT '3.1234'
+ `c1` decimal(5,4) DEFAULT 3.1234
) ENGINE=ENGINE DEFAULT CHARSET=latin1
DROP TABLE t13;
SHOW TABLES;
@@ -55,7 +55,7 @@ t12
SHOW CREATE TABLE t12;
Table Create Table
t12 CREATE TABLE `t12` (
- `c1` decimal(5,0) DEFAULT '2'
+ `c1` decimal(5,0) DEFAULT 2
) ENGINE=ENGINE DEFAULT CHARSET=latin1
DROP TABLE t12;
SHOW TABLES;
@@ -67,7 +67,7 @@ t13
SHOW CREATE TABLE t13;
Table Create Table
t13 CREATE TABLE `t13` (
- `c1` decimal(5,4) DEFAULT '3.1234'
+ `c1` decimal(5,4) DEFAULT 3.1234
) ENGINE=ENGINE DEFAULT CHARSET=latin1
DROP TABLE t13;
SHOW TABLES;
@@ -79,7 +79,7 @@ t12
SHOW CREATE TABLE t12;
Table Create Table
t12 CREATE TABLE `t12` (
- `c1` decimal(5,0) DEFAULT '2'
+ `c1` decimal(5,0) DEFAULT 2
) ENGINE=ENGINE DEFAULT CHARSET=latin1
DROP TABLE t12;
SHOW TABLES;
@@ -91,7 +91,7 @@ t13
SHOW CREATE TABLE t13;
Table Create Table
t13 CREATE TABLE `t13` (
- `c1` decimal(5,4) DEFAULT '3.1234'
+ `c1` decimal(5,4) DEFAULT 3.1234
) ENGINE=ENGINE DEFAULT CHARSET=latin1
DROP TABLE t13;
SHOW TABLES;
@@ -103,7 +103,7 @@ t12
SHOW CREATE TABLE t12;
Table Create Table
t12 CREATE TABLE `t12` (
- `c1` decimal(5,0) NOT NULL DEFAULT '2'
+ `c1` decimal(5,0) NOT NULL DEFAULT 2
) ENGINE=ENGINE DEFAULT CHARSET=latin1
DROP TABLE t12;
SHOW TABLES;
@@ -115,7 +115,7 @@ t13
SHOW CREATE TABLE t13;
Table Create Table
t13 CREATE TABLE `t13` (
- `c1` decimal(5,4) NOT NULL DEFAULT '3.1234'
+ `c1` decimal(5,4) NOT NULL DEFAULT 3.1234
) ENGINE=ENGINE DEFAULT CHARSET=latin1
DROP TABLE t13;
SHOW TABLES;
@@ -127,7 +127,7 @@ t12
SHOW CREATE TABLE t12;
Table Create Table
t12 CREATE TABLE `t12` (
- `c1` decimal(5,0) NOT NULL DEFAULT '2'
+ `c1` decimal(5,0) NOT NULL DEFAULT 2
) ENGINE=ENGINE DEFAULT CHARSET=latin1
DROP TABLE t12;
SHOW TABLES;
@@ -139,7 +139,7 @@ t13
SHOW CREATE TABLE t13;
Table Create Table
t13 CREATE TABLE `t13` (
- `c1` decimal(5,4) NOT NULL DEFAULT '3.1234'
+ `c1` decimal(5,4) NOT NULL DEFAULT 3.1234
) ENGINE=ENGINE DEFAULT CHARSET=latin1
DROP TABLE t13;
SHOW TABLES;
@@ -151,7 +151,7 @@ t12
SHOW CREATE TABLE t12;
Table Create Table
t12 CREATE TABLE `t12` (
- `c1` decimal(5,0) NOT NULL DEFAULT '2'
+ `c1` decimal(5,0) NOT NULL DEFAULT 2
) ENGINE=ENGINE DEFAULT CHARSET=latin1
DROP TABLE t12;
SHOW TABLES;
@@ -163,7 +163,7 @@ t13
SHOW CREATE TABLE t13;
Table Create Table
t13 CREATE TABLE `t13` (
- `c1` decimal(5,4) NOT NULL DEFAULT '3.1234'
+ `c1` decimal(5,4) NOT NULL DEFAULT 3.1234
) ENGINE=ENGINE DEFAULT CHARSET=latin1
DROP TABLE t13;
SHOW TABLES;
@@ -175,7 +175,7 @@ t12
SHOW CREATE TABLE t12;
Table Create Table
t12 CREATE TABLE `t12` (
- `c1` decimal(5,0) NOT NULL DEFAULT '2'
+ `c1` decimal(5,0) NOT NULL DEFAULT 2
) ENGINE=ENGINE DEFAULT CHARSET=latin1
DROP TABLE t12;
SHOW TABLES;
@@ -187,7 +187,7 @@ t13
SHOW CREATE TABLE t13;
Table Create Table
t13 CREATE TABLE `t13` (
- `c1` decimal(5,4) NOT NULL DEFAULT '3.1234'
+ `c1` decimal(5,4) NOT NULL DEFAULT 3.1234
) ENGINE=ENGINE DEFAULT CHARSET=latin1
DROP TABLE t13;
SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/r/tc_column_default_number.result b/mysql-test/suite/engines/funcs/r/tc_column_default_number.result
index 96326634a49..3cfb17f7e6b 100644
--- a/mysql-test/suite/engines/funcs/r/tc_column_default_number.result
+++ b/mysql-test/suite/engines/funcs/r/tc_column_default_number.result
@@ -6,7 +6,7 @@ t11
SHOW CREATE TABLE t11;
Table Create Table
t11 CREATE TABLE `t11` (
- `c1` tinyint(5) DEFAULT '1'
+ `c1` tinyint(5) DEFAULT 1
) ENGINE=ENGINE DEFAULT CHARSET=latin1
DROP TABLE t11;
SHOW TABLES;
@@ -18,7 +18,7 @@ t11
SHOW CREATE TABLE t11;
Table Create Table
t11 CREATE TABLE `t11` (
- `c1` smallint(5) DEFAULT '1'
+ `c1` smallint(5) DEFAULT 1
) ENGINE=ENGINE DEFAULT CHARSET=latin1
DROP TABLE t11;
SHOW TABLES;
@@ -30,7 +30,7 @@ t11
SHOW CREATE TABLE t11;
Table Create Table
t11 CREATE TABLE `t11` (
- `c1` mediumint(5) DEFAULT '1'
+ `c1` mediumint(5) DEFAULT 1
) ENGINE=ENGINE DEFAULT CHARSET=latin1
DROP TABLE t11;
SHOW TABLES;
@@ -42,7 +42,7 @@ t11
SHOW CREATE TABLE t11;
Table Create Table
t11 CREATE TABLE `t11` (
- `c1` int(5) DEFAULT '1'
+ `c1` int(5) DEFAULT 1
) ENGINE=ENGINE DEFAULT CHARSET=latin1
DROP TABLE t11;
SHOW TABLES;
@@ -54,7 +54,7 @@ t11
SHOW CREATE TABLE t11;
Table Create Table
t11 CREATE TABLE `t11` (
- `c1` int(5) DEFAULT '1'
+ `c1` int(5) DEFAULT 1
) ENGINE=ENGINE DEFAULT CHARSET=latin1
DROP TABLE t11;
SHOW TABLES;
@@ -66,7 +66,7 @@ t11
SHOW CREATE TABLE t11;
Table Create Table
t11 CREATE TABLE `t11` (
- `c1` bigint(5) DEFAULT '1'
+ `c1` bigint(5) DEFAULT 1
) ENGINE=ENGINE DEFAULT CHARSET=latin1
DROP TABLE t11;
SHOW TABLES;
@@ -78,7 +78,7 @@ t11
SHOW CREATE TABLE t11;
Table Create Table
t11 CREATE TABLE `t11` (
- `c1` tinyint(5) NOT NULL DEFAULT '1'
+ `c1` tinyint(5) NOT NULL DEFAULT 1
) ENGINE=ENGINE DEFAULT CHARSET=latin1
DROP TABLE t11;
SHOW TABLES;
@@ -90,7 +90,7 @@ t11
SHOW CREATE TABLE t11;
Table Create Table
t11 CREATE TABLE `t11` (
- `c1` smallint(5) NOT NULL DEFAULT '1'
+ `c1` smallint(5) NOT NULL DEFAULT 1
) ENGINE=ENGINE DEFAULT CHARSET=latin1
DROP TABLE t11;
SHOW TABLES;
@@ -102,7 +102,7 @@ t11
SHOW CREATE TABLE t11;
Table Create Table
t11 CREATE TABLE `t11` (
- `c1` mediumint(5) NOT NULL DEFAULT '1'
+ `c1` mediumint(5) NOT NULL DEFAULT 1
) ENGINE=ENGINE DEFAULT CHARSET=latin1
DROP TABLE t11;
SHOW TABLES;
@@ -114,7 +114,7 @@ t11
SHOW CREATE TABLE t11;
Table Create Table
t11 CREATE TABLE `t11` (
- `c1` int(5) NOT NULL DEFAULT '1'
+ `c1` int(5) NOT NULL DEFAULT 1
) ENGINE=ENGINE DEFAULT CHARSET=latin1
DROP TABLE t11;
SHOW TABLES;
@@ -126,7 +126,7 @@ t11
SHOW CREATE TABLE t11;
Table Create Table
t11 CREATE TABLE `t11` (
- `c1` int(5) NOT NULL DEFAULT '1'
+ `c1` int(5) NOT NULL DEFAULT 1
) ENGINE=ENGINE DEFAULT CHARSET=latin1
DROP TABLE t11;
SHOW TABLES;
@@ -138,7 +138,7 @@ t11
SHOW CREATE TABLE t11;
Table Create Table
t11 CREATE TABLE `t11` (
- `c1` bigint(5) NOT NULL DEFAULT '1'
+ `c1` bigint(5) NOT NULL DEFAULT 1
) ENGINE=ENGINE DEFAULT CHARSET=latin1
DROP TABLE t11;
SHOW TABLES;
diff --git a/mysql-test/suite/engines/funcs/r/tc_multicolumn_different.result b/mysql-test/suite/engines/funcs/r/tc_multicolumn_different.result
index af518d114e3..16be4f4b08c 100644
--- a/mysql-test/suite/engines/funcs/r/tc_multicolumn_different.result
+++ b/mysql-test/suite/engines/funcs/r/tc_multicolumn_different.result
@@ -11,7 +11,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30,7 +30,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -49,7 +49,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -68,7 +68,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -87,7 +87,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -106,7 +106,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -125,7 +125,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -144,7 +144,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -163,7 +163,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -182,7 +182,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -201,7 +201,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -220,7 +220,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -239,7 +239,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -258,7 +258,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -277,7 +277,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -296,7 +296,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -315,7 +315,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -334,7 +334,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -353,7 +353,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -372,7 +372,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -391,7 +391,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -410,7 +410,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -429,7 +429,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -448,7 +448,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -467,7 +467,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -486,7 +486,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -505,7 +505,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -524,7 +524,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -543,7 +543,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -562,7 +562,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -581,7 +581,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -600,7 +600,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -619,7 +619,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -638,7 +638,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -657,7 +657,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -676,7 +676,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -695,7 +695,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -714,7 +714,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -733,7 +733,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -752,7 +752,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -771,7 +771,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -790,7 +790,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -809,7 +809,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -828,7 +828,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -847,7 +847,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -866,7 +866,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -885,7 +885,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -904,7 +904,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -923,7 +923,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -942,7 +942,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -961,7 +961,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -980,7 +980,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -999,7 +999,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1018,7 +1018,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1037,7 +1037,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1056,7 +1056,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1075,7 +1075,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1094,7 +1094,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1113,7 +1113,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1132,7 +1132,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1151,7 +1151,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1170,7 +1170,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1189,7 +1189,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1208,7 +1208,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1227,7 +1227,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1246,7 +1246,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1265,7 +1265,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1284,7 +1284,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1303,7 +1303,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1322,7 +1322,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1341,7 +1341,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1360,7 +1360,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1379,7 +1379,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1398,7 +1398,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1417,7 +1417,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1436,7 +1436,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1455,7 +1455,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1474,7 +1474,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1493,7 +1493,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1512,7 +1512,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1531,7 +1531,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1550,7 +1550,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1569,7 +1569,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1588,7 +1588,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1607,7 +1607,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1626,7 +1626,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1645,7 +1645,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1664,7 +1664,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1683,7 +1683,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1702,7 +1702,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1721,7 +1721,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1740,7 +1740,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1759,7 +1759,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1778,7 +1778,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1797,7 +1797,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1816,7 +1816,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1835,7 +1835,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1854,7 +1854,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1873,7 +1873,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1892,7 +1892,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1911,7 +1911,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1930,7 +1930,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1949,7 +1949,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1968,7 +1968,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -1987,7 +1987,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2006,7 +2006,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2025,7 +2025,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2044,7 +2044,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2063,7 +2063,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2082,7 +2082,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2101,7 +2101,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2120,7 +2120,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2139,7 +2139,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2158,7 +2158,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2177,7 +2177,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2196,7 +2196,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2215,7 +2215,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2234,7 +2234,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2253,7 +2253,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2272,7 +2272,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2291,7 +2291,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2310,7 +2310,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2329,7 +2329,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2348,7 +2348,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2367,7 +2367,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2386,7 +2386,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2405,7 +2405,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2424,7 +2424,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2443,7 +2443,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2462,7 +2462,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2481,7 +2481,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2500,7 +2500,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2519,7 +2519,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2538,7 +2538,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2557,7 +2557,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2576,7 +2576,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2595,7 +2595,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2614,7 +2614,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2633,7 +2633,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2652,7 +2652,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2671,7 +2671,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2690,7 +2690,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2709,7 +2709,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2728,7 +2728,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2747,7 +2747,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2766,7 +2766,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2785,7 +2785,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2804,7 +2804,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2823,7 +2823,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2842,7 +2842,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2861,7 +2861,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2880,7 +2880,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2899,7 +2899,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2918,7 +2918,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2937,7 +2937,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2956,7 +2956,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2975,7 +2975,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -2994,7 +2994,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3013,7 +3013,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3032,7 +3032,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3051,7 +3051,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3070,7 +3070,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3089,7 +3089,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3108,7 +3108,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3127,7 +3127,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3146,7 +3146,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3165,7 +3165,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3184,7 +3184,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3203,7 +3203,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3222,7 +3222,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3241,7 +3241,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3260,7 +3260,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3279,7 +3279,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3298,7 +3298,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3317,7 +3317,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3336,7 +3336,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3355,7 +3355,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3374,7 +3374,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3393,7 +3393,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3412,7 +3412,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3431,7 +3431,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3450,7 +3450,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3469,7 +3469,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3488,7 +3488,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3507,7 +3507,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3526,7 +3526,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3545,7 +3545,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3564,7 +3564,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3583,7 +3583,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3602,7 +3602,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3621,7 +3621,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3640,7 +3640,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3659,7 +3659,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3678,7 +3678,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3697,7 +3697,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3716,7 +3716,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3735,7 +3735,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3754,7 +3754,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3773,7 +3773,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3792,7 +3792,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3811,7 +3811,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3830,7 +3830,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3849,7 +3849,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3868,7 +3868,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3887,7 +3887,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3906,7 +3906,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3925,7 +3925,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3944,7 +3944,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3963,7 +3963,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -3982,7 +3982,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4001,7 +4001,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4020,7 +4020,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4039,7 +4039,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4058,7 +4058,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4077,7 +4077,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4096,7 +4096,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4115,7 +4115,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4134,7 +4134,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4153,7 +4153,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4172,7 +4172,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4191,7 +4191,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4210,7 +4210,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4229,7 +4229,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4248,7 +4248,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4267,7 +4267,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4286,7 +4286,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4305,7 +4305,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4324,7 +4324,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4343,7 +4343,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4362,7 +4362,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4381,7 +4381,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4400,7 +4400,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4419,7 +4419,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4438,7 +4438,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4457,7 +4457,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4476,7 +4476,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4495,7 +4495,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4514,7 +4514,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4533,7 +4533,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4552,7 +4552,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4571,7 +4571,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4590,7 +4590,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4609,7 +4609,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4628,7 +4628,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4647,7 +4647,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4666,7 +4666,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4685,7 +4685,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4704,7 +4704,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4723,7 +4723,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4742,7 +4742,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4761,7 +4761,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4780,7 +4780,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4799,7 +4799,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4818,7 +4818,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4837,7 +4837,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4856,7 +4856,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4875,7 +4875,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4894,7 +4894,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4913,7 +4913,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4932,7 +4932,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4951,7 +4951,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4970,7 +4970,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -4989,7 +4989,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5008,7 +5008,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5027,7 +5027,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5046,7 +5046,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5065,7 +5065,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5084,7 +5084,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5103,7 +5103,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5122,7 +5122,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5141,7 +5141,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5160,7 +5160,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5179,7 +5179,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5198,7 +5198,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5217,7 +5217,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5236,7 +5236,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5255,7 +5255,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5274,7 +5274,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5293,7 +5293,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5312,7 +5312,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5331,7 +5331,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5350,7 +5350,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5369,7 +5369,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5388,7 +5388,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5407,7 +5407,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5426,7 +5426,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5445,7 +5445,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5464,7 +5464,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5483,7 +5483,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5502,7 +5502,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5521,7 +5521,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5540,7 +5540,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5559,7 +5559,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5578,7 +5578,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5597,7 +5597,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5616,7 +5616,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5635,7 +5635,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5654,7 +5654,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5673,7 +5673,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5692,7 +5692,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5711,7 +5711,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5730,7 +5730,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5749,7 +5749,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5768,7 +5768,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5787,7 +5787,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5806,7 +5806,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5825,7 +5825,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5844,7 +5844,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5863,7 +5863,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5882,7 +5882,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5901,7 +5901,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5920,7 +5920,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5939,7 +5939,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5958,7 +5958,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5977,7 +5977,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -5996,7 +5996,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6015,7 +6015,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6034,7 +6034,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6053,7 +6053,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6072,7 +6072,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6091,7 +6091,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6110,7 +6110,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6129,7 +6129,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6148,7 +6148,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6167,7 +6167,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6186,7 +6186,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6205,7 +6205,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6224,7 +6224,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6243,7 +6243,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6262,7 +6262,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6281,7 +6281,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6300,7 +6300,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6319,7 +6319,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6338,7 +6338,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6357,7 +6357,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6376,7 +6376,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6395,7 +6395,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6414,7 +6414,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6433,7 +6433,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6452,7 +6452,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6471,7 +6471,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6490,7 +6490,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6509,7 +6509,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6528,7 +6528,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6547,7 +6547,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6566,7 +6566,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6585,7 +6585,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6604,7 +6604,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6623,7 +6623,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6642,7 +6642,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6661,7 +6661,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6680,7 +6680,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6699,7 +6699,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6718,7 +6718,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6737,7 +6737,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6756,7 +6756,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6775,7 +6775,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6794,7 +6794,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6813,7 +6813,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6832,7 +6832,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6851,7 +6851,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6870,7 +6870,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6889,7 +6889,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6908,7 +6908,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6927,7 +6927,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6946,7 +6946,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6965,7 +6965,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -6984,7 +6984,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7003,7 +7003,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7022,7 +7022,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7041,7 +7041,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7060,7 +7060,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7079,7 +7079,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7098,7 +7098,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7117,7 +7117,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7136,7 +7136,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7155,7 +7155,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7174,7 +7174,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7193,7 +7193,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7212,7 +7212,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7231,7 +7231,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7250,7 +7250,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7269,7 +7269,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7288,7 +7288,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7307,7 +7307,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7326,7 +7326,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7345,7 +7345,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7364,7 +7364,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7383,7 +7383,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7402,7 +7402,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7421,7 +7421,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7440,7 +7440,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7459,7 +7459,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7478,7 +7478,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7497,7 +7497,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7516,7 +7516,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7535,7 +7535,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7554,7 +7554,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7573,7 +7573,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7592,7 +7592,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7611,7 +7611,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7630,7 +7630,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7649,7 +7649,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7668,7 +7668,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7687,7 +7687,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7706,7 +7706,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7725,7 +7725,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7744,7 +7744,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7763,7 +7763,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7782,7 +7782,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7801,7 +7801,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7820,7 +7820,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7839,7 +7839,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7858,7 +7858,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7877,7 +7877,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7896,7 +7896,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7915,7 +7915,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7934,7 +7934,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7953,7 +7953,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7972,7 +7972,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -7991,7 +7991,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8010,7 +8010,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8029,7 +8029,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8048,7 +8048,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8067,7 +8067,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8086,7 +8086,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8105,7 +8105,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8124,7 +8124,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8143,7 +8143,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8162,7 +8162,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8181,7 +8181,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8200,7 +8200,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8219,7 +8219,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8238,7 +8238,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8257,7 +8257,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8276,7 +8276,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8295,7 +8295,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8314,7 +8314,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8333,7 +8333,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8352,7 +8352,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8371,7 +8371,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8390,7 +8390,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8409,7 +8409,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8428,7 +8428,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8447,7 +8447,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8466,7 +8466,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8485,7 +8485,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8504,7 +8504,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8523,7 +8523,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8542,7 +8542,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8561,7 +8561,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8580,7 +8580,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8599,7 +8599,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8618,7 +8618,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8637,7 +8637,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8656,7 +8656,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8675,7 +8675,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8694,7 +8694,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8713,7 +8713,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8732,7 +8732,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8751,7 +8751,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8770,7 +8770,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8789,7 +8789,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8808,7 +8808,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8827,7 +8827,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8846,7 +8846,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8865,7 +8865,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8884,7 +8884,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8903,7 +8903,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8922,7 +8922,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8941,7 +8941,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8960,7 +8960,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8979,7 +8979,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -8998,7 +8998,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9017,7 +9017,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9036,7 +9036,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9055,7 +9055,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9074,7 +9074,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9093,7 +9093,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9112,7 +9112,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9131,7 +9131,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9150,7 +9150,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9169,7 +9169,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9188,7 +9188,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9207,7 +9207,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9226,7 +9226,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9245,7 +9245,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9264,7 +9264,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9283,7 +9283,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9302,7 +9302,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9321,7 +9321,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9340,7 +9340,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9359,7 +9359,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9378,7 +9378,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9397,7 +9397,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9416,7 +9416,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9435,7 +9435,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9454,7 +9454,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9473,7 +9473,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9492,7 +9492,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9511,7 +9511,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9530,7 +9530,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9549,7 +9549,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9568,7 +9568,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9587,7 +9587,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9606,7 +9606,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9625,7 +9625,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9644,7 +9644,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9663,7 +9663,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9682,7 +9682,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9701,7 +9701,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9720,7 +9720,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9739,7 +9739,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9758,7 +9758,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9777,7 +9777,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9796,7 +9796,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9815,7 +9815,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9834,7 +9834,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9853,7 +9853,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9872,7 +9872,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9891,7 +9891,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9910,7 +9910,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9929,7 +9929,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9948,7 +9948,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9967,7 +9967,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -9986,7 +9986,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10005,7 +10005,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10024,7 +10024,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10043,7 +10043,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10062,7 +10062,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10081,7 +10081,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10100,7 +10100,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10119,7 +10119,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10138,7 +10138,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10157,7 +10157,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10176,7 +10176,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10195,7 +10195,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10214,7 +10214,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10233,7 +10233,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10252,7 +10252,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10271,7 +10271,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10290,7 +10290,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10309,7 +10309,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10328,7 +10328,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10347,7 +10347,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10366,7 +10366,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10385,7 +10385,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10404,7 +10404,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10423,7 +10423,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10442,7 +10442,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10461,7 +10461,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10480,7 +10480,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10499,7 +10499,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10518,7 +10518,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10537,7 +10537,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10556,7 +10556,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10575,7 +10575,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10594,7 +10594,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10613,7 +10613,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10632,7 +10632,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10651,7 +10651,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10670,7 +10670,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10689,7 +10689,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10708,7 +10708,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10727,7 +10727,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10746,7 +10746,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10765,7 +10765,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10784,7 +10784,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10803,7 +10803,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10822,7 +10822,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10841,7 +10841,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10860,7 +10860,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10879,7 +10879,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10898,7 +10898,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10917,7 +10917,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10936,7 +10936,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10955,7 +10955,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10974,7 +10974,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -10993,7 +10993,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11012,7 +11012,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11031,7 +11031,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11050,7 +11050,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11069,7 +11069,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11088,7 +11088,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11107,7 +11107,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11126,7 +11126,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11145,7 +11145,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11164,7 +11164,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11183,7 +11183,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11202,7 +11202,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11221,7 +11221,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11240,7 +11240,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11259,7 +11259,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11278,7 +11278,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11297,7 +11297,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11316,7 +11316,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11335,7 +11335,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11354,7 +11354,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11373,7 +11373,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11392,7 +11392,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11411,7 +11411,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11430,7 +11430,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11449,7 +11449,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11468,7 +11468,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11487,7 +11487,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11506,7 +11506,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11525,7 +11525,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11544,7 +11544,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11563,7 +11563,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11582,7 +11582,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11601,7 +11601,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11620,7 +11620,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11639,7 +11639,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11658,7 +11658,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11677,7 +11677,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11696,7 +11696,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11715,7 +11715,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11734,7 +11734,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11753,7 +11753,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11772,7 +11772,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11791,7 +11791,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11810,7 +11810,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11829,7 +11829,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11848,7 +11848,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11867,7 +11867,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11886,7 +11886,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11905,7 +11905,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11924,7 +11924,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11943,7 +11943,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11962,7 +11962,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -11981,7 +11981,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12000,7 +12000,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12019,7 +12019,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12038,7 +12038,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12057,7 +12057,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12076,7 +12076,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12095,7 +12095,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12114,7 +12114,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12133,7 +12133,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12152,7 +12152,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12171,7 +12171,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12190,7 +12190,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12209,7 +12209,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12228,7 +12228,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12247,7 +12247,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12266,7 +12266,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12285,7 +12285,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12304,7 +12304,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12323,7 +12323,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12342,7 +12342,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12361,7 +12361,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12380,7 +12380,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12399,7 +12399,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12418,7 +12418,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12437,7 +12437,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12456,7 +12456,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12475,7 +12475,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12494,7 +12494,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12513,7 +12513,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12532,7 +12532,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12551,7 +12551,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12570,7 +12570,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12589,7 +12589,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12608,7 +12608,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12627,7 +12627,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12646,7 +12646,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12665,7 +12665,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12684,7 +12684,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12703,7 +12703,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12722,7 +12722,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12741,7 +12741,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12760,7 +12760,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12779,7 +12779,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12798,7 +12798,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12817,7 +12817,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12836,7 +12836,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12855,7 +12855,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12874,7 +12874,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12893,7 +12893,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12912,7 +12912,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12931,7 +12931,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12950,7 +12950,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12969,7 +12969,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -12988,7 +12988,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13007,7 +13007,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13026,7 +13026,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13045,7 +13045,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13064,7 +13064,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13083,7 +13083,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13102,7 +13102,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13121,7 +13121,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13140,7 +13140,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13159,7 +13159,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13178,7 +13178,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13197,7 +13197,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13216,7 +13216,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13235,7 +13235,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13254,7 +13254,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13273,7 +13273,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13292,7 +13292,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13311,7 +13311,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13330,7 +13330,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13349,7 +13349,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13368,7 +13368,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13387,7 +13387,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13406,7 +13406,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13425,7 +13425,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13444,7 +13444,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13463,7 +13463,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13482,7 +13482,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13501,7 +13501,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13520,7 +13520,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13539,7 +13539,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13558,7 +13558,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13577,7 +13577,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13596,7 +13596,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13615,7 +13615,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13634,7 +13634,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13653,7 +13653,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13672,7 +13672,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13691,7 +13691,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13710,7 +13710,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13729,7 +13729,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13748,7 +13748,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13767,7 +13767,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13786,7 +13786,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13805,7 +13805,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13824,7 +13824,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13843,7 +13843,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13862,7 +13862,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13881,7 +13881,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13900,7 +13900,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13919,7 +13919,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13938,7 +13938,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13957,7 +13957,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13976,7 +13976,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -13995,7 +13995,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14014,7 +14014,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14033,7 +14033,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14052,7 +14052,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14071,7 +14071,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14090,7 +14090,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14109,7 +14109,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14128,7 +14128,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14147,7 +14147,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14166,7 +14166,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14185,7 +14185,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14204,7 +14204,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14223,7 +14223,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14242,7 +14242,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14261,7 +14261,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14280,7 +14280,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14299,7 +14299,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14318,7 +14318,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14337,7 +14337,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14356,7 +14356,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14375,7 +14375,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14394,7 +14394,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14413,7 +14413,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14432,7 +14432,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14451,7 +14451,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14470,7 +14470,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14489,7 +14489,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14508,7 +14508,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14527,7 +14527,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14546,7 +14546,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14565,7 +14565,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14584,7 +14584,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14603,7 +14603,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14622,7 +14622,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14641,7 +14641,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14660,7 +14660,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14679,7 +14679,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14698,7 +14698,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14717,7 +14717,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14736,7 +14736,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14755,7 +14755,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14774,7 +14774,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14793,7 +14793,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14812,7 +14812,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14831,7 +14831,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14850,7 +14850,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14869,7 +14869,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14888,7 +14888,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14907,7 +14907,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14926,7 +14926,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14945,7 +14945,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14964,7 +14964,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -14983,7 +14983,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15002,7 +15002,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15021,7 +15021,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15040,7 +15040,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15059,7 +15059,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15078,7 +15078,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15097,7 +15097,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15116,7 +15116,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15135,7 +15135,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15154,7 +15154,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15173,7 +15173,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15192,7 +15192,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15211,7 +15211,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15230,7 +15230,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15249,7 +15249,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15268,7 +15268,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15287,7 +15287,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15306,7 +15306,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15325,7 +15325,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15344,7 +15344,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15363,7 +15363,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15382,7 +15382,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15401,7 +15401,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15420,7 +15420,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15439,7 +15439,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15458,7 +15458,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15477,7 +15477,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15496,7 +15496,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15515,7 +15515,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15534,7 +15534,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15553,7 +15553,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15572,7 +15572,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15591,7 +15591,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15610,7 +15610,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15629,7 +15629,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15648,7 +15648,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15667,7 +15667,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15686,7 +15686,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15705,7 +15705,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15724,7 +15724,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15743,7 +15743,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15762,7 +15762,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15781,7 +15781,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15800,7 +15800,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15819,7 +15819,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15838,7 +15838,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15857,7 +15857,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15876,7 +15876,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15895,7 +15895,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15914,7 +15914,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15933,7 +15933,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15952,7 +15952,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15971,7 +15971,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -15990,7 +15990,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16009,7 +16009,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16028,7 +16028,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16047,7 +16047,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16066,7 +16066,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16085,7 +16085,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16104,7 +16104,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16123,7 +16123,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16142,7 +16142,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16161,7 +16161,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16180,7 +16180,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16199,7 +16199,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16218,7 +16218,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16237,7 +16237,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16256,7 +16256,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16275,7 +16275,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16294,7 +16294,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16313,7 +16313,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16332,7 +16332,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16351,7 +16351,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16370,7 +16370,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16389,7 +16389,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16408,7 +16408,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16427,7 +16427,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16446,7 +16446,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16465,7 +16465,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16484,7 +16484,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16503,7 +16503,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16522,7 +16522,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16541,7 +16541,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16560,7 +16560,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16579,7 +16579,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16598,7 +16598,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16617,7 +16617,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16636,7 +16636,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16655,7 +16655,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16674,7 +16674,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16693,7 +16693,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16712,7 +16712,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16731,7 +16731,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16750,7 +16750,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16769,7 +16769,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16788,7 +16788,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16807,7 +16807,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16826,7 +16826,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16845,7 +16845,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16864,7 +16864,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16883,7 +16883,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16902,7 +16902,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16921,7 +16921,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16940,7 +16940,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16959,7 +16959,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16978,7 +16978,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -16997,7 +16997,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17016,7 +17016,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17035,7 +17035,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17054,7 +17054,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17073,7 +17073,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17092,7 +17092,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17111,7 +17111,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17130,7 +17130,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17149,7 +17149,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17168,7 +17168,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17187,7 +17187,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17206,7 +17206,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17225,7 +17225,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17244,7 +17244,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17263,7 +17263,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17282,7 +17282,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17301,7 +17301,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17320,7 +17320,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17339,7 +17339,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17358,7 +17358,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17377,7 +17377,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17396,7 +17396,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17415,7 +17415,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17434,7 +17434,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17453,7 +17453,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17472,7 +17472,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17491,7 +17491,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17510,7 +17510,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17529,7 +17529,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17548,7 +17548,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17567,7 +17567,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17586,7 +17586,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17605,7 +17605,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17624,7 +17624,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17643,7 +17643,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17662,7 +17662,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17681,7 +17681,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17700,7 +17700,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17719,7 +17719,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17738,7 +17738,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17757,7 +17757,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17776,7 +17776,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17795,7 +17795,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17814,7 +17814,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17833,7 +17833,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17852,7 +17852,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17871,7 +17871,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17890,7 +17890,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17909,7 +17909,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17928,7 +17928,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17947,7 +17947,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17966,7 +17966,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -17985,7 +17985,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18004,7 +18004,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18023,7 +18023,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18042,7 +18042,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18061,7 +18061,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18080,7 +18080,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18099,7 +18099,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18118,7 +18118,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18137,7 +18137,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18156,7 +18156,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18175,7 +18175,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18194,7 +18194,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18213,7 +18213,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18232,7 +18232,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18251,7 +18251,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18270,7 +18270,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18289,7 +18289,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18308,7 +18308,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18327,7 +18327,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18346,7 +18346,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18365,7 +18365,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18384,7 +18384,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18403,7 +18403,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18422,7 +18422,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18441,7 +18441,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18460,7 +18460,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18479,7 +18479,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18498,7 +18498,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18517,7 +18517,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18536,7 +18536,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18555,7 +18555,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18574,7 +18574,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18593,7 +18593,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18612,7 +18612,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18631,7 +18631,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18650,7 +18650,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18669,7 +18669,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18688,7 +18688,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18707,7 +18707,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18726,7 +18726,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18745,7 +18745,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18764,7 +18764,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18783,7 +18783,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18802,7 +18802,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18821,7 +18821,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18840,7 +18840,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18859,7 +18859,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18878,7 +18878,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18897,7 +18897,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18916,7 +18916,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18935,7 +18935,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18954,7 +18954,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18973,7 +18973,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -18992,7 +18992,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19011,7 +19011,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19030,7 +19030,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19049,7 +19049,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19068,7 +19068,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19087,7 +19087,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19106,7 +19106,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19125,7 +19125,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19144,7 +19144,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19163,7 +19163,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19182,7 +19182,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19201,7 +19201,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19220,7 +19220,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19239,7 +19239,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19258,7 +19258,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19277,7 +19277,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19296,7 +19296,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19315,7 +19315,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19334,7 +19334,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19353,7 +19353,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19372,7 +19372,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19391,7 +19391,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19410,7 +19410,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19429,7 +19429,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19448,7 +19448,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19467,7 +19467,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19486,7 +19486,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19505,7 +19505,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19524,7 +19524,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19543,7 +19543,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19562,7 +19562,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19581,7 +19581,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19600,7 +19600,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19619,7 +19619,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19638,7 +19638,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19657,7 +19657,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19676,7 +19676,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19695,7 +19695,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19714,7 +19714,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19733,7 +19733,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19752,7 +19752,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19771,7 +19771,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19790,7 +19790,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19809,7 +19809,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19828,7 +19828,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19847,7 +19847,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19866,7 +19866,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19885,7 +19885,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19904,7 +19904,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19923,7 +19923,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19942,7 +19942,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19961,7 +19961,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19980,7 +19980,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -19999,7 +19999,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20018,7 +20018,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20037,7 +20037,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20056,7 +20056,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20075,7 +20075,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20094,7 +20094,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20113,7 +20113,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20132,7 +20132,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20151,7 +20151,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20170,7 +20170,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20189,7 +20189,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20208,7 +20208,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20227,7 +20227,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20246,7 +20246,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20265,7 +20265,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20284,7 +20284,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20303,7 +20303,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20322,7 +20322,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20341,7 +20341,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20360,7 +20360,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20379,7 +20379,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20398,7 +20398,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20417,7 +20417,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20436,7 +20436,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20455,7 +20455,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20474,7 +20474,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20493,7 +20493,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20512,7 +20512,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20531,7 +20531,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20550,7 +20550,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20569,7 +20569,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20588,7 +20588,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20607,7 +20607,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20626,7 +20626,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20645,7 +20645,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20664,7 +20664,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20683,7 +20683,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20702,7 +20702,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20721,7 +20721,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20740,7 +20740,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20759,7 +20759,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20778,7 +20778,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20797,7 +20797,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20816,7 +20816,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20835,7 +20835,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20854,7 +20854,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20873,7 +20873,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20892,7 +20892,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20911,7 +20911,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20930,7 +20930,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20949,7 +20949,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20968,7 +20968,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -20987,7 +20987,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21006,7 +21006,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21025,7 +21025,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21044,7 +21044,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21063,7 +21063,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21082,7 +21082,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21101,7 +21101,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21120,7 +21120,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21139,7 +21139,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21158,7 +21158,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21177,7 +21177,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21196,7 +21196,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21215,7 +21215,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21234,7 +21234,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21253,7 +21253,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21272,7 +21272,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21291,7 +21291,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21310,7 +21310,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21329,7 +21329,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21348,7 +21348,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21367,7 +21367,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21386,7 +21386,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21405,7 +21405,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21424,7 +21424,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21443,7 +21443,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21462,7 +21462,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21481,7 +21481,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21500,7 +21500,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21519,7 +21519,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21538,7 +21538,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21557,7 +21557,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21576,7 +21576,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21595,7 +21595,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21614,7 +21614,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21633,7 +21633,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21652,7 +21652,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21671,7 +21671,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21690,7 +21690,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21709,7 +21709,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21728,7 +21728,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21747,7 +21747,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21766,7 +21766,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21785,7 +21785,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21804,7 +21804,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21823,7 +21823,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21842,7 +21842,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21861,7 +21861,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21880,7 +21880,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21899,7 +21899,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21918,7 +21918,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21937,7 +21937,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21956,7 +21956,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21975,7 +21975,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -21994,7 +21994,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22013,7 +22013,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22032,7 +22032,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22051,7 +22051,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22070,7 +22070,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22089,7 +22089,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22108,7 +22108,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22127,7 +22127,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22146,7 +22146,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22165,7 +22165,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22184,7 +22184,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22203,7 +22203,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22222,7 +22222,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22241,7 +22241,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22260,7 +22260,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22279,7 +22279,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22298,7 +22298,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22317,7 +22317,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22336,7 +22336,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22355,7 +22355,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22374,7 +22374,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22393,7 +22393,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22412,7 +22412,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22431,7 +22431,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22450,7 +22450,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22469,7 +22469,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22488,7 +22488,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22507,7 +22507,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22526,7 +22526,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22545,7 +22545,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22564,7 +22564,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22583,7 +22583,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22602,7 +22602,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22621,7 +22621,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22640,7 +22640,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22659,7 +22659,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22678,7 +22678,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22697,7 +22697,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22716,7 +22716,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22735,7 +22735,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22754,7 +22754,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22773,7 +22773,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22792,7 +22792,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22811,7 +22811,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22830,7 +22830,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22849,7 +22849,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22868,7 +22868,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22887,7 +22887,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22906,7 +22906,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22925,7 +22925,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22944,7 +22944,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22963,7 +22963,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -22982,7 +22982,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23001,7 +23001,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23020,7 +23020,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23039,7 +23039,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23058,7 +23058,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23077,7 +23077,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23096,7 +23096,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23115,7 +23115,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23134,7 +23134,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23153,7 +23153,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23172,7 +23172,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23191,7 +23191,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23210,7 +23210,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23229,7 +23229,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23248,7 +23248,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23267,7 +23267,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23286,7 +23286,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23305,7 +23305,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23324,7 +23324,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23343,7 +23343,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23362,7 +23362,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23381,7 +23381,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23400,7 +23400,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23419,7 +23419,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23438,7 +23438,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23457,7 +23457,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23476,7 +23476,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23495,7 +23495,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23514,7 +23514,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23533,7 +23533,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23552,7 +23552,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23571,7 +23571,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23590,7 +23590,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23609,7 +23609,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23628,7 +23628,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23647,7 +23647,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23666,7 +23666,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23685,7 +23685,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23704,7 +23704,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23723,7 +23723,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23742,7 +23742,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23761,7 +23761,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23780,7 +23780,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23799,7 +23799,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23818,7 +23818,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23837,7 +23837,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23856,7 +23856,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23875,7 +23875,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23894,7 +23894,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23913,7 +23913,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23932,7 +23932,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23951,7 +23951,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23970,7 +23970,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -23989,7 +23989,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24008,7 +24008,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24027,7 +24027,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24046,7 +24046,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24065,7 +24065,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24084,7 +24084,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24103,7 +24103,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24122,7 +24122,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24141,7 +24141,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24160,7 +24160,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24179,7 +24179,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24198,7 +24198,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24217,7 +24217,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24236,7 +24236,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24255,7 +24255,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24274,7 +24274,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24293,7 +24293,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24312,7 +24312,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24331,7 +24331,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24350,7 +24350,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24369,7 +24369,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24388,7 +24388,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24407,7 +24407,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24426,7 +24426,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24445,7 +24445,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24464,7 +24464,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24483,7 +24483,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24502,7 +24502,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24521,7 +24521,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24540,7 +24540,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24559,7 +24559,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24578,7 +24578,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24597,7 +24597,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24616,7 +24616,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24635,7 +24635,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24654,7 +24654,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24673,7 +24673,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24692,7 +24692,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24711,7 +24711,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24730,7 +24730,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24749,7 +24749,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24768,7 +24768,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24787,7 +24787,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24806,7 +24806,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24825,7 +24825,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24844,7 +24844,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24863,7 +24863,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24882,7 +24882,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24901,7 +24901,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24920,7 +24920,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24939,7 +24939,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24958,7 +24958,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24977,7 +24977,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -24996,7 +24996,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25015,7 +25015,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25034,7 +25034,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25053,7 +25053,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25072,7 +25072,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25091,7 +25091,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25110,7 +25110,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25129,7 +25129,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25148,7 +25148,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25167,7 +25167,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25186,7 +25186,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25205,7 +25205,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25224,7 +25224,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25243,7 +25243,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25262,7 +25262,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25281,7 +25281,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25300,7 +25300,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25319,7 +25319,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25338,7 +25338,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25357,7 +25357,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25376,7 +25376,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25395,7 +25395,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25414,7 +25414,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25433,7 +25433,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25452,7 +25452,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25471,7 +25471,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25490,7 +25490,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25509,7 +25509,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25528,7 +25528,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25547,7 +25547,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25566,7 +25566,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25585,7 +25585,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25604,7 +25604,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25623,7 +25623,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25642,7 +25642,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25661,7 +25661,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25680,7 +25680,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25699,7 +25699,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25718,7 +25718,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25737,7 +25737,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25756,7 +25756,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25775,7 +25775,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25794,7 +25794,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25813,7 +25813,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25832,7 +25832,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25851,7 +25851,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25870,7 +25870,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25889,7 +25889,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25908,7 +25908,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25927,7 +25927,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25946,7 +25946,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25965,7 +25965,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -25984,7 +25984,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26003,7 +26003,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26022,7 +26022,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26041,7 +26041,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26060,7 +26060,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26079,7 +26079,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26098,7 +26098,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26117,7 +26117,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26136,7 +26136,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26155,7 +26155,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26174,7 +26174,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26193,7 +26193,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26212,7 +26212,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26231,7 +26231,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26250,7 +26250,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26269,7 +26269,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26288,7 +26288,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26307,7 +26307,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26326,7 +26326,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26345,7 +26345,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26364,7 +26364,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26383,7 +26383,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26402,7 +26402,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26421,7 +26421,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26440,7 +26440,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26459,7 +26459,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26478,7 +26478,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26497,7 +26497,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26516,7 +26516,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26535,7 +26535,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26554,7 +26554,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26573,7 +26573,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26592,7 +26592,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26611,7 +26611,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26630,7 +26630,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26649,7 +26649,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26668,7 +26668,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26687,7 +26687,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26706,7 +26706,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26725,7 +26725,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26744,7 +26744,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26763,7 +26763,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26782,7 +26782,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26801,7 +26801,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26820,7 +26820,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26839,7 +26839,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26858,7 +26858,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26877,7 +26877,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26896,7 +26896,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26915,7 +26915,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26934,7 +26934,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26953,7 +26953,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26972,7 +26972,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -26991,7 +26991,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27010,7 +27010,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27029,7 +27029,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27048,7 +27048,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27067,7 +27067,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27086,7 +27086,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27105,7 +27105,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27124,7 +27124,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27143,7 +27143,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27162,7 +27162,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27181,7 +27181,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27200,7 +27200,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27219,7 +27219,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27238,7 +27238,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27257,7 +27257,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27276,7 +27276,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27295,7 +27295,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27314,7 +27314,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27333,7 +27333,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27352,7 +27352,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27371,7 +27371,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27390,7 +27390,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27409,7 +27409,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27428,7 +27428,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27447,7 +27447,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27466,7 +27466,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27485,7 +27485,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27504,7 +27504,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27523,7 +27523,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27542,7 +27542,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27561,7 +27561,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27580,7 +27580,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27599,7 +27599,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27618,7 +27618,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27637,7 +27637,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27656,7 +27656,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27675,7 +27675,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27694,7 +27694,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27713,7 +27713,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27732,7 +27732,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27751,7 +27751,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27770,7 +27770,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27789,7 +27789,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27808,7 +27808,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27827,7 +27827,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27846,7 +27846,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27865,7 +27865,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27884,7 +27884,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27903,7 +27903,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27922,7 +27922,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27941,7 +27941,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27960,7 +27960,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27979,7 +27979,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -27998,7 +27998,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28017,7 +28017,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28036,7 +28036,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28055,7 +28055,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28074,7 +28074,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28093,7 +28093,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28112,7 +28112,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28131,7 +28131,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28150,7 +28150,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28169,7 +28169,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28188,7 +28188,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28207,7 +28207,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28226,7 +28226,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28245,7 +28245,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28264,7 +28264,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28283,7 +28283,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28302,7 +28302,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28321,7 +28321,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28340,7 +28340,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28359,7 +28359,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28378,7 +28378,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28397,7 +28397,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28416,7 +28416,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28435,7 +28435,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28454,7 +28454,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28473,7 +28473,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28492,7 +28492,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28511,7 +28511,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28530,7 +28530,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28549,7 +28549,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28568,7 +28568,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28587,7 +28587,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28606,7 +28606,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28625,7 +28625,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28644,7 +28644,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28663,7 +28663,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28682,7 +28682,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28701,7 +28701,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28720,7 +28720,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28739,7 +28739,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28758,7 +28758,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28777,7 +28777,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28796,7 +28796,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28815,7 +28815,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28834,7 +28834,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28853,7 +28853,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28872,7 +28872,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28891,7 +28891,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28910,7 +28910,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28929,7 +28929,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28948,7 +28948,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28967,7 +28967,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -28986,7 +28986,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29005,7 +29005,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29024,7 +29024,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29043,7 +29043,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29062,7 +29062,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29081,7 +29081,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29100,7 +29100,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29119,7 +29119,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29138,7 +29138,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29157,7 +29157,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29176,7 +29176,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29195,7 +29195,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29214,7 +29214,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29233,7 +29233,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29252,7 +29252,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29271,7 +29271,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29290,7 +29290,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29309,7 +29309,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29328,7 +29328,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29347,7 +29347,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29366,7 +29366,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29385,7 +29385,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29404,7 +29404,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29423,7 +29423,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29442,7 +29442,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29461,7 +29461,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29480,7 +29480,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29499,7 +29499,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29518,7 +29518,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29537,7 +29537,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29556,7 +29556,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29575,7 +29575,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29594,7 +29594,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29613,7 +29613,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29632,7 +29632,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` char(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29651,7 +29651,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29670,7 +29670,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29689,7 +29689,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29708,7 +29708,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29727,7 +29727,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29746,7 +29746,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29765,7 +29765,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29784,7 +29784,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29803,7 +29803,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29822,7 +29822,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29841,7 +29841,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29860,7 +29860,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29879,7 +29879,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29898,7 +29898,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29917,7 +29917,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29936,7 +29936,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29955,7 +29955,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29974,7 +29974,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -29993,7 +29993,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30012,7 +30012,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30031,7 +30031,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30050,7 +30050,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30069,7 +30069,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30088,7 +30088,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30107,7 +30107,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30126,7 +30126,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30145,7 +30145,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30164,7 +30164,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30183,7 +30183,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30202,7 +30202,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30221,7 +30221,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30240,7 +30240,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30259,7 +30259,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30278,7 +30278,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30297,7 +30297,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30316,7 +30316,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30335,7 +30335,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30354,7 +30354,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30373,7 +30373,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30392,7 +30392,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30411,7 +30411,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30430,7 +30430,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30449,7 +30449,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30468,7 +30468,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30487,7 +30487,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30506,7 +30506,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30525,7 +30525,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30544,7 +30544,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30563,7 +30563,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30582,7 +30582,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30601,7 +30601,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30620,7 +30620,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30639,7 +30639,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30658,7 +30658,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30677,7 +30677,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30696,7 +30696,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30715,7 +30715,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30734,7 +30734,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30753,7 +30753,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30772,7 +30772,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30791,7 +30791,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30810,7 +30810,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30829,7 +30829,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30848,7 +30848,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30867,7 +30867,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30886,7 +30886,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30905,7 +30905,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30924,7 +30924,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30943,7 +30943,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30962,7 +30962,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -30981,7 +30981,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31000,7 +31000,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31019,7 +31019,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31038,7 +31038,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31057,7 +31057,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31076,7 +31076,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31095,7 +31095,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31114,7 +31114,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31133,7 +31133,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31152,7 +31152,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31171,7 +31171,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31190,7 +31190,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31209,7 +31209,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31228,7 +31228,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31247,7 +31247,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31266,7 +31266,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31285,7 +31285,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31304,7 +31304,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31323,7 +31323,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31342,7 +31342,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31361,7 +31361,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31380,7 +31380,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31399,7 +31399,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31418,7 +31418,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31437,7 +31437,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31456,7 +31456,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31475,7 +31475,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31494,7 +31494,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31513,7 +31513,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31532,7 +31532,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31551,7 +31551,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31570,7 +31570,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31589,7 +31589,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31608,7 +31608,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31627,7 +31627,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31646,7 +31646,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31665,7 +31665,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31684,7 +31684,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31703,7 +31703,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31722,7 +31722,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31741,7 +31741,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31760,7 +31760,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31779,7 +31779,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31798,7 +31798,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31817,7 +31817,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31836,7 +31836,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31855,7 +31855,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31874,7 +31874,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31893,7 +31893,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31912,7 +31912,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varchar(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31931,7 +31931,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31950,7 +31950,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31969,7 +31969,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -31988,7 +31988,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32007,7 +32007,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32026,7 +32026,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32045,7 +32045,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32064,7 +32064,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32083,7 +32083,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32102,7 +32102,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32121,7 +32121,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32140,7 +32140,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32159,7 +32159,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32178,7 +32178,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32197,7 +32197,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32216,7 +32216,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32235,7 +32235,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32254,7 +32254,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32273,7 +32273,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32292,7 +32292,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32311,7 +32311,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32330,7 +32330,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32349,7 +32349,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32368,7 +32368,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32387,7 +32387,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32406,7 +32406,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32425,7 +32425,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32444,7 +32444,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32463,7 +32463,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32482,7 +32482,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32501,7 +32501,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32520,7 +32520,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32539,7 +32539,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32558,7 +32558,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32577,7 +32577,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32596,7 +32596,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32615,7 +32615,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32634,7 +32634,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32653,7 +32653,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32672,7 +32672,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32691,7 +32691,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32710,7 +32710,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32729,7 +32729,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32748,7 +32748,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32767,7 +32767,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32786,7 +32786,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32805,7 +32805,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32824,7 +32824,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32843,7 +32843,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32862,7 +32862,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32881,7 +32881,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32900,7 +32900,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32919,7 +32919,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32938,7 +32938,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32957,7 +32957,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32976,7 +32976,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -32995,7 +32995,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33014,7 +33014,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33033,7 +33033,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33052,7 +33052,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33071,7 +33071,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33090,7 +33090,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33109,7 +33109,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33128,7 +33128,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33147,7 +33147,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33166,7 +33166,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33185,7 +33185,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33204,7 +33204,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33223,7 +33223,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33242,7 +33242,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33261,7 +33261,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33280,7 +33280,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33299,7 +33299,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33318,7 +33318,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33337,7 +33337,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33356,7 +33356,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33375,7 +33375,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33394,7 +33394,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33413,7 +33413,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33432,7 +33432,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33451,7 +33451,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33470,7 +33470,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33489,7 +33489,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33508,7 +33508,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33527,7 +33527,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33546,7 +33546,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33565,7 +33565,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33584,7 +33584,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33603,7 +33603,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33622,7 +33622,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33641,7 +33641,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33660,7 +33660,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33679,7 +33679,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33698,7 +33698,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33717,7 +33717,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33736,7 +33736,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33755,7 +33755,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33774,7 +33774,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33793,7 +33793,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33812,7 +33812,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33831,7 +33831,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33850,7 +33850,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33869,7 +33869,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33888,7 +33888,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33907,7 +33907,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33926,7 +33926,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33945,7 +33945,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33964,7 +33964,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -33983,7 +33983,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34002,7 +34002,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34021,7 +34021,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34040,7 +34040,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34059,7 +34059,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34078,7 +34078,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34097,7 +34097,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34116,7 +34116,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34135,7 +34135,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34154,7 +34154,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34173,7 +34173,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34192,7 +34192,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` binary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34211,7 +34211,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34230,7 +34230,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34249,7 +34249,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34268,7 +34268,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34287,7 +34287,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34306,7 +34306,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34325,7 +34325,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34344,7 +34344,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34363,7 +34363,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34382,7 +34382,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34401,7 +34401,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34420,7 +34420,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34439,7 +34439,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34458,7 +34458,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34477,7 +34477,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34496,7 +34496,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34515,7 +34515,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34534,7 +34534,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34553,7 +34553,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34572,7 +34572,7 @@ m3 CREATE TABLE `m3` (
`c3` tinyint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34591,7 +34591,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34610,7 +34610,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34629,7 +34629,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34648,7 +34648,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34667,7 +34667,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34686,7 +34686,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34705,7 +34705,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34724,7 +34724,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34743,7 +34743,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34762,7 +34762,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34781,7 +34781,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34800,7 +34800,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34819,7 +34819,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34838,7 +34838,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34857,7 +34857,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34876,7 +34876,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34895,7 +34895,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34914,7 +34914,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34933,7 +34933,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34952,7 +34952,7 @@ m3 CREATE TABLE `m3` (
`c3` smallint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34971,7 +34971,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -34990,7 +34990,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35009,7 +35009,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35028,7 +35028,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35047,7 +35047,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35066,7 +35066,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35085,7 +35085,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35104,7 +35104,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35123,7 +35123,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35142,7 +35142,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35161,7 +35161,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35180,7 +35180,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35199,7 +35199,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35218,7 +35218,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35237,7 +35237,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35256,7 +35256,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35275,7 +35275,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35294,7 +35294,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35313,7 +35313,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35332,7 +35332,7 @@ m3 CREATE TABLE `m3` (
`c3` mediumint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35351,7 +35351,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35370,7 +35370,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35389,7 +35389,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35408,7 +35408,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35427,7 +35427,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35446,7 +35446,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35465,7 +35465,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35484,7 +35484,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35503,7 +35503,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35522,7 +35522,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35541,7 +35541,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35560,7 +35560,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35579,7 +35579,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35598,7 +35598,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35617,7 +35617,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35636,7 +35636,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35655,7 +35655,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35674,7 +35674,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35693,7 +35693,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35712,7 +35712,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35731,7 +35731,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35750,7 +35750,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35769,7 +35769,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35788,7 +35788,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35807,7 +35807,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35826,7 +35826,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35845,7 +35845,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35864,7 +35864,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35883,7 +35883,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35902,7 +35902,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35921,7 +35921,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35940,7 +35940,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35959,7 +35959,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35978,7 +35978,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -35997,7 +35997,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -36016,7 +36016,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -36035,7 +36035,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -36054,7 +36054,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -36073,7 +36073,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -36092,7 +36092,7 @@ m3 CREATE TABLE `m3` (
`c3` int(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -36111,7 +36111,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bit(1) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -36130,7 +36130,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` tinyint(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -36149,7 +36149,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` smallint(6) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -36168,7 +36168,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` mediumint(9) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -36187,7 +36187,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -36206,7 +36206,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` int(11) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -36225,7 +36225,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` bigint(20) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -36244,7 +36244,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -36263,7 +36263,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -36282,7 +36282,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -36301,7 +36301,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` decimal(10,0) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -36320,7 +36320,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -36339,7 +36339,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -36358,7 +36358,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` double NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -36377,7 +36377,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` float NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -36396,7 +36396,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` date NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -36415,7 +36415,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` time NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -36434,7 +36434,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -36453,7 +36453,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` datetime NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
@@ -36472,7 +36472,7 @@ m3 CREATE TABLE `m3` (
`c3` bigint(4) DEFAULT NULL,
`c4` varbinary(15) NOT NULL,
`c5` year(4) NOT NULL,
- `c6` decimal(10,8) NOT NULL DEFAULT '3.14159200',
+ `c6` decimal(10,8) NOT NULL DEFAULT 3.14159200,
PRIMARY KEY (`c4`),
UNIQUE KEY `c5` (`c5`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1
diff --git a/mysql-test/suite/engines/rr_trx/r/init_innodb.result b/mysql-test/suite/engines/rr_trx/r/init_innodb.result
index b4d11879521..516147976ce 100644
--- a/mysql-test/suite/engines/rr_trx/r/init_innodb.result
+++ b/mysql-test/suite/engines/rr_trx/r/init_innodb.result
@@ -42,12 +42,12 @@ t1 CREATE TABLE `t1` (
`int2` int(11) DEFAULT NULL,
`int2_key` int(11) DEFAULT NULL,
`int2_unique` int(11) DEFAULT NULL,
- `for_update` tinyint(1) DEFAULT '0',
+ `for_update` tinyint(1) DEFAULT 0,
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`connection_id` int(11) DEFAULT NULL,
- `thread_id` int(11) DEFAULT '0',
- `is_uncommitted` tinyint(1) DEFAULT '0',
- `is_consistent` tinyint(1) DEFAULT '0',
+ `thread_id` int(11) DEFAULT 0,
+ `is_uncommitted` tinyint(1) DEFAULT 0,
+ `is_consistent` tinyint(1) DEFAULT 0,
PRIMARY KEY (`pk`),
UNIQUE KEY `int1_unique` (`int1_unique`),
UNIQUE KEY `int2_unique` (`int2_unique`),
diff --git a/mysql-test/suite/federated/assisted_discovery.result b/mysql-test/suite/federated/assisted_discovery.result
index 76ac6e422cd..f79e47da8b4 100644
--- a/mysql-test/suite/federated/assisted_discovery.result
+++ b/mysql-test/suite/federated/assisted_discovery.result
@@ -19,8 +19,8 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` int(20) NOT NULL,
- `group` int(11) NOT NULL DEFAULT '1',
- `a\\b` int(11) NOT NULL DEFAULT '2',
+ `group` int(11) NOT NULL DEFAULT 1,
+ `a\\b` int(11) NOT NULL DEFAULT 2,
`a\\` int(10) unsigned DEFAULT NULL,
`name` varchar(32) DEFAULT 'name',
PRIMARY KEY (`id`)
diff --git a/mysql-test/suite/funcs_1/datadict/processlist_priv.inc b/mysql-test/suite/funcs_1/datadict/processlist_priv.inc
index e19f8b4f820..cd060e7a370 100644
--- a/mysql-test/suite/funcs_1/datadict/processlist_priv.inc
+++ b/mysql-test/suite/funcs_1/datadict/processlist_priv.inc
@@ -152,7 +152,7 @@ connection default;
let $wait_timeout= 10;
let $wait_condition=
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST
-WHERE DB = 'information_schema' AND COMMAND = 'Sleep' AND USER = 'ddicttestuser1';
+WHERE DB = 'information_schema' AND COMMAND = 'Sleep' AND USER = 'ddicttestuser1' AND state='';
--source include/wait_condition.inc
--replace_result ENGINE=MyISAM "" ENGINE=Aria "" " PAGE_CHECKSUM=1" "" " PAGE_CHECKSUM=0" ""
eval SHOW CREATE TABLE $table;
diff --git a/mysql-test/suite/funcs_1/r/is_character_sets.result b/mysql-test/suite/funcs_1/r/is_character_sets.result
index 2aaa1985020..caff08ae1e4 100644
--- a/mysql-test/suite/funcs_1/r/is_character_sets.result
+++ b/mysql-test/suite/funcs_1/r/is_character_sets.result
@@ -38,7 +38,7 @@ CHARACTER_SETS CREATE TEMPORARY TABLE `CHARACTER_SETS` (
`CHARACTER_SET_NAME` varchar(32) NOT NULL DEFAULT '',
`DEFAULT_COLLATE_NAME` varchar(32) NOT NULL DEFAULT '',
`DESCRIPTION` varchar(60) NOT NULL DEFAULT '',
- `MAXLEN` bigint(3) NOT NULL DEFAULT '0'
+ `MAXLEN` bigint(3) NOT NULL DEFAULT 0
) ENGINE=MEMORY DEFAULT CHARSET=utf8
SHOW COLUMNS FROM information_schema.CHARACTER_SETS;
Field Type Null Key Default Extra
diff --git a/mysql-test/suite/funcs_1/r/is_collations.result b/mysql-test/suite/funcs_1/r/is_collations.result
index 234aeff8ff2..c017bbd4eaf 100644
--- a/mysql-test/suite/funcs_1/r/is_collations.result
+++ b/mysql-test/suite/funcs_1/r/is_collations.result
@@ -39,10 +39,10 @@ Table Create Table
COLLATIONS CREATE TEMPORARY TABLE `COLLATIONS` (
`COLLATION_NAME` varchar(32) NOT NULL DEFAULT '',
`CHARACTER_SET_NAME` varchar(32) NOT NULL DEFAULT '',
- `ID` bigint(11) NOT NULL DEFAULT '0',
+ `ID` bigint(11) NOT NULL DEFAULT 0,
`IS_DEFAULT` varchar(3) NOT NULL DEFAULT '',
`IS_COMPILED` varchar(3) NOT NULL DEFAULT '',
- `SORTLEN` bigint(3) NOT NULL DEFAULT '0'
+ `SORTLEN` bigint(3) NOT NULL DEFAULT 0
) ENGINE=MEMORY DEFAULT CHARSET=utf8
SHOW COLUMNS FROM information_schema.COLLATIONS;
Field Type Null Key Default Extra
diff --git a/mysql-test/suite/funcs_1/r/is_columns.result b/mysql-test/suite/funcs_1/r/is_columns.result
index b614b789c63..4b028e1da3d 100644
--- a/mysql-test/suite/funcs_1/r/is_columns.result
+++ b/mysql-test/suite/funcs_1/r/is_columns.result
@@ -55,7 +55,7 @@ COLUMNS CREATE TEMPORARY TABLE `COLUMNS` (
`TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '',
`TABLE_NAME` varchar(64) NOT NULL DEFAULT '',
`COLUMN_NAME` varchar(64) NOT NULL DEFAULT '',
- `ORDINAL_POSITION` bigint(21) unsigned NOT NULL DEFAULT '0',
+ `ORDINAL_POSITION` bigint(21) unsigned NOT NULL DEFAULT 0,
`COLUMN_DEFAULT` longtext DEFAULT NULL,
`IS_NULLABLE` varchar(3) NOT NULL DEFAULT '',
`DATA_TYPE` varchar(64) NOT NULL DEFAULT '',
diff --git a/mysql-test/suite/funcs_1/r/is_events.result b/mysql-test/suite/funcs_1/r/is_events.result
index 2add18062d9..3db6cc5e61d 100644
--- a/mysql-test/suite/funcs_1/r/is_events.result
+++ b/mysql-test/suite/funcs_1/r/is_events.result
@@ -75,7 +75,7 @@ EVENTS CREATE TEMPORARY TABLE `EVENTS` (
`LAST_ALTERED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`LAST_EXECUTED` datetime DEFAULT NULL,
`EVENT_COMMENT` varchar(64) NOT NULL DEFAULT '',
- `ORIGINATOR` bigint(10) NOT NULL DEFAULT '0',
+ `ORIGINATOR` bigint(10) NOT NULL DEFAULT 0,
`CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '',
`COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT '',
`DATABASE_COLLATION` varchar(32) NOT NULL DEFAULT ''
diff --git a/mysql-test/suite/funcs_1/r/is_key_column_usage.result b/mysql-test/suite/funcs_1/r/is_key_column_usage.result
index 79310904d0f..80dd2db5441 100644
--- a/mysql-test/suite/funcs_1/r/is_key_column_usage.result
+++ b/mysql-test/suite/funcs_1/r/is_key_column_usage.result
@@ -50,7 +50,7 @@ KEY_COLUMN_USAGE CREATE TEMPORARY TABLE `KEY_COLUMN_USAGE` (
`TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '',
`TABLE_NAME` varchar(64) NOT NULL DEFAULT '',
`COLUMN_NAME` varchar(64) NOT NULL DEFAULT '',
- `ORDINAL_POSITION` bigint(10) NOT NULL DEFAULT '0',
+ `ORDINAL_POSITION` bigint(10) NOT NULL DEFAULT 0,
`POSITION_IN_UNIQUE_CONSTRAINT` bigint(10) DEFAULT NULL,
`REFERENCED_TABLE_SCHEMA` varchar(64) DEFAULT NULL,
`REFERENCED_TABLE_NAME` varchar(64) DEFAULT NULL,
diff --git a/mysql-test/suite/funcs_1/r/is_statistics.result b/mysql-test/suite/funcs_1/r/is_statistics.result
index f58c3e56772..8197f043e48 100644
--- a/mysql-test/suite/funcs_1/r/is_statistics.result
+++ b/mysql-test/suite/funcs_1/r/is_statistics.result
@@ -50,10 +50,10 @@ STATISTICS CREATE TEMPORARY TABLE `STATISTICS` (
`TABLE_CATALOG` varchar(512) NOT NULL DEFAULT '',
`TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '',
`TABLE_NAME` varchar(64) NOT NULL DEFAULT '',
- `NON_UNIQUE` bigint(1) NOT NULL DEFAULT '0',
+ `NON_UNIQUE` bigint(1) NOT NULL DEFAULT 0,
`INDEX_SCHEMA` varchar(64) NOT NULL DEFAULT '',
`INDEX_NAME` varchar(64) NOT NULL DEFAULT '',
- `SEQ_IN_INDEX` bigint(2) NOT NULL DEFAULT '0',
+ `SEQ_IN_INDEX` bigint(2) NOT NULL DEFAULT 0,
`COLUMN_NAME` varchar(64) NOT NULL DEFAULT '',
`COLLATION` varchar(1) DEFAULT NULL,
`CARDINALITY` bigint(21) DEFAULT NULL,
diff --git a/mysql-test/suite/funcs_1/r/is_triggers.result b/mysql-test/suite/funcs_1/r/is_triggers.result
index 6c218be565d..ac6372b1d84 100644
--- a/mysql-test/suite/funcs_1/r/is_triggers.result
+++ b/mysql-test/suite/funcs_1/r/is_triggers.result
@@ -61,7 +61,7 @@ TRIGGERS CREATE TEMPORARY TABLE `TRIGGERS` (
`EVENT_OBJECT_CATALOG` varchar(512) NOT NULL DEFAULT '',
`EVENT_OBJECT_SCHEMA` varchar(64) NOT NULL DEFAULT '',
`EVENT_OBJECT_TABLE` varchar(64) NOT NULL DEFAULT '',
- `ACTION_ORDER` bigint(4) NOT NULL DEFAULT '0',
+ `ACTION_ORDER` bigint(4) NOT NULL DEFAULT 0,
`ACTION_CONDITION` longtext DEFAULT NULL,
`ACTION_STATEMENT` longtext NOT NULL DEFAULT '',
`ACTION_ORIENTATION` varchar(9) NOT NULL DEFAULT '',
diff --git a/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result b/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result
index 70001195e02..6680e045558 100644
--- a/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result
+++ b/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result
@@ -24,23 +24,23 @@ connection default;
SHOW CREATE TABLE processlist;
Table Create Table
PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
- `ID` bigint(4) NOT NULL DEFAULT '0',
+ `ID` bigint(4) NOT NULL DEFAULT 0,
`USER` varchar(128) NOT NULL DEFAULT '',
`HOST` varchar(64) NOT NULL DEFAULT '',
`DB` varchar(64) DEFAULT NULL,
`COMMAND` varchar(16) NOT NULL DEFAULT '',
- `TIME` int(7) NOT NULL DEFAULT '0',
+ `TIME` int(7) NOT NULL DEFAULT 0,
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext DEFAULT NULL,
- `TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000',
- `STAGE` tinyint(2) NOT NULL DEFAULT '0',
- `MAX_STAGE` tinyint(2) NOT NULL DEFAULT '0',
- `PROGRESS` decimal(7,3) NOT NULL DEFAULT '0.000',
- `MEMORY_USED` bigint(7) NOT NULL DEFAULT '0',
- `EXAMINED_ROWS` int(7) NOT NULL DEFAULT '0',
- `QUERY_ID` bigint(4) NOT NULL DEFAULT '0',
+ `TIME_MS` decimal(22,3) NOT NULL DEFAULT 0.000,
+ `STAGE` tinyint(2) NOT NULL DEFAULT 0,
+ `MAX_STAGE` tinyint(2) NOT NULL DEFAULT 0,
+ `PROGRESS` decimal(7,3) NOT NULL DEFAULT 0.000,
+ `MEMORY_USED` bigint(7) NOT NULL DEFAULT 0,
+ `EXAMINED_ROWS` int(7) NOT NULL DEFAULT 0,
+ `QUERY_ID` bigint(4) NOT NULL DEFAULT 0,
`INFO_BINARY` blob DEFAULT NULL,
- `TID` bigint(4) NOT NULL DEFAULT '0'
+ `TID` bigint(4) NOT NULL DEFAULT 0
) DEFAULT CHARSET=utf8
SHOW processlist;
Id User Host db Command Time State Info Progress
@@ -103,23 +103,23 @@ SHOW/SELECT shows only the processes (1) of the user.
SHOW CREATE TABLE processlist;
Table Create Table
PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
- `ID` bigint(4) NOT NULL DEFAULT '0',
+ `ID` bigint(4) NOT NULL DEFAULT 0,
`USER` varchar(128) NOT NULL DEFAULT '',
`HOST` varchar(64) NOT NULL DEFAULT '',
`DB` varchar(64) DEFAULT NULL,
`COMMAND` varchar(16) NOT NULL DEFAULT '',
- `TIME` int(7) NOT NULL DEFAULT '0',
+ `TIME` int(7) NOT NULL DEFAULT 0,
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext DEFAULT NULL,
- `TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000',
- `STAGE` tinyint(2) NOT NULL DEFAULT '0',
- `MAX_STAGE` tinyint(2) NOT NULL DEFAULT '0',
- `PROGRESS` decimal(7,3) NOT NULL DEFAULT '0.000',
- `MEMORY_USED` bigint(7) NOT NULL DEFAULT '0',
- `EXAMINED_ROWS` int(7) NOT NULL DEFAULT '0',
- `QUERY_ID` bigint(4) NOT NULL DEFAULT '0',
+ `TIME_MS` decimal(22,3) NOT NULL DEFAULT 0.000,
+ `STAGE` tinyint(2) NOT NULL DEFAULT 0,
+ `MAX_STAGE` tinyint(2) NOT NULL DEFAULT 0,
+ `PROGRESS` decimal(7,3) NOT NULL DEFAULT 0.000,
+ `MEMORY_USED` bigint(7) NOT NULL DEFAULT 0,
+ `EXAMINED_ROWS` int(7) NOT NULL DEFAULT 0,
+ `QUERY_ID` bigint(4) NOT NULL DEFAULT 0,
`INFO_BINARY` blob DEFAULT NULL,
- `TID` bigint(4) NOT NULL DEFAULT '0'
+ `TID` bigint(4) NOT NULL DEFAULT 0
) DEFAULT CHARSET=utf8
SHOW processlist;
Id User Host db Command Time State Info Progress
diff --git a/mysql-test/suite/funcs_1/r/processlist_priv_ps.result b/mysql-test/suite/funcs_1/r/processlist_priv_ps.result
index 69fa605f2bb..09f9d231144 100644
--- a/mysql-test/suite/funcs_1/r/processlist_priv_ps.result
+++ b/mysql-test/suite/funcs_1/r/processlist_priv_ps.result
@@ -24,23 +24,23 @@ connection default;
SHOW CREATE TABLE processlist;
Table Create Table
PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
- `ID` bigint(4) NOT NULL DEFAULT '0',
+ `ID` bigint(4) NOT NULL DEFAULT 0,
`USER` varchar(128) NOT NULL DEFAULT '',
`HOST` varchar(64) NOT NULL DEFAULT '',
`DB` varchar(64) DEFAULT NULL,
`COMMAND` varchar(16) NOT NULL DEFAULT '',
- `TIME` int(7) NOT NULL DEFAULT '0',
+ `TIME` int(7) NOT NULL DEFAULT 0,
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext DEFAULT NULL,
- `TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000',
- `STAGE` tinyint(2) NOT NULL DEFAULT '0',
- `MAX_STAGE` tinyint(2) NOT NULL DEFAULT '0',
- `PROGRESS` decimal(7,3) NOT NULL DEFAULT '0.000',
- `MEMORY_USED` bigint(7) NOT NULL DEFAULT '0',
- `EXAMINED_ROWS` int(7) NOT NULL DEFAULT '0',
- `QUERY_ID` bigint(4) NOT NULL DEFAULT '0',
+ `TIME_MS` decimal(22,3) NOT NULL DEFAULT 0.000,
+ `STAGE` tinyint(2) NOT NULL DEFAULT 0,
+ `MAX_STAGE` tinyint(2) NOT NULL DEFAULT 0,
+ `PROGRESS` decimal(7,3) NOT NULL DEFAULT 0.000,
+ `MEMORY_USED` bigint(7) NOT NULL DEFAULT 0,
+ `EXAMINED_ROWS` int(7) NOT NULL DEFAULT 0,
+ `QUERY_ID` bigint(4) NOT NULL DEFAULT 0,
`INFO_BINARY` blob DEFAULT NULL,
- `TID` bigint(4) NOT NULL DEFAULT '0'
+ `TID` bigint(4) NOT NULL DEFAULT 0
) DEFAULT CHARSET=utf8
SHOW processlist;
Id User Host db Command Time State Info Progress
@@ -103,23 +103,23 @@ SHOW/SELECT shows only the processes (1) of the user.
SHOW CREATE TABLE processlist;
Table Create Table
PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
- `ID` bigint(4) NOT NULL DEFAULT '0',
+ `ID` bigint(4) NOT NULL DEFAULT 0,
`USER` varchar(128) NOT NULL DEFAULT '',
`HOST` varchar(64) NOT NULL DEFAULT '',
`DB` varchar(64) DEFAULT NULL,
`COMMAND` varchar(16) NOT NULL DEFAULT '',
- `TIME` int(7) NOT NULL DEFAULT '0',
+ `TIME` int(7) NOT NULL DEFAULT 0,
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext DEFAULT NULL,
- `TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000',
- `STAGE` tinyint(2) NOT NULL DEFAULT '0',
- `MAX_STAGE` tinyint(2) NOT NULL DEFAULT '0',
- `PROGRESS` decimal(7,3) NOT NULL DEFAULT '0.000',
- `MEMORY_USED` bigint(7) NOT NULL DEFAULT '0',
- `EXAMINED_ROWS` int(7) NOT NULL DEFAULT '0',
- `QUERY_ID` bigint(4) NOT NULL DEFAULT '0',
+ `TIME_MS` decimal(22,3) NOT NULL DEFAULT 0.000,
+ `STAGE` tinyint(2) NOT NULL DEFAULT 0,
+ `MAX_STAGE` tinyint(2) NOT NULL DEFAULT 0,
+ `PROGRESS` decimal(7,3) NOT NULL DEFAULT 0.000,
+ `MEMORY_USED` bigint(7) NOT NULL DEFAULT 0,
+ `EXAMINED_ROWS` int(7) NOT NULL DEFAULT 0,
+ `QUERY_ID` bigint(4) NOT NULL DEFAULT 0,
`INFO_BINARY` blob DEFAULT NULL,
- `TID` bigint(4) NOT NULL DEFAULT '0'
+ `TID` bigint(4) NOT NULL DEFAULT 0
) DEFAULT CHARSET=utf8
SHOW processlist;
Id User Host db Command Time State Info Progress
diff --git a/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result b/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result
index 72e4b4a3379..f935f7770b8 100644
--- a/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result
+++ b/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result
@@ -12,23 +12,23 @@ USE test;
SHOW CREATE TABLE INFORMATION_SCHEMA.PROCESSLIST;
Table Create Table
PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
- `ID` bigint(4) NOT NULL DEFAULT '0',
+ `ID` bigint(4) NOT NULL DEFAULT 0,
`USER` varchar(128) NOT NULL DEFAULT '',
`HOST` varchar(64) NOT NULL DEFAULT '',
`DB` varchar(64) DEFAULT NULL,
`COMMAND` varchar(16) NOT NULL DEFAULT '',
- `TIME` int(7) NOT NULL DEFAULT '0',
+ `TIME` int(7) NOT NULL DEFAULT 0,
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext DEFAULT NULL,
- `TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000',
- `STAGE` tinyint(2) NOT NULL DEFAULT '0',
- `MAX_STAGE` tinyint(2) NOT NULL DEFAULT '0',
- `PROGRESS` decimal(7,3) NOT NULL DEFAULT '0.000',
- `MEMORY_USED` bigint(7) NOT NULL DEFAULT '0',
- `EXAMINED_ROWS` int(7) NOT NULL DEFAULT '0',
- `QUERY_ID` bigint(4) NOT NULL DEFAULT '0',
+ `TIME_MS` decimal(22,3) NOT NULL DEFAULT 0.000,
+ `STAGE` tinyint(2) NOT NULL DEFAULT 0,
+ `MAX_STAGE` tinyint(2) NOT NULL DEFAULT 0,
+ `PROGRESS` decimal(7,3) NOT NULL DEFAULT 0.000,
+ `MEMORY_USED` bigint(7) NOT NULL DEFAULT 0,
+ `EXAMINED_ROWS` int(7) NOT NULL DEFAULT 0,
+ `QUERY_ID` bigint(4) NOT NULL DEFAULT 0,
`INFO_BINARY` blob DEFAULT NULL,
- `TID` bigint(4) NOT NULL DEFAULT '0'
+ `TID` bigint(4) NOT NULL DEFAULT 0
) DEFAULT CHARSET=utf8
# Ensure that the information about the own connection is correct.
#--------------------------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/processlist_val_ps.result b/mysql-test/suite/funcs_1/r/processlist_val_ps.result
index a9f1297a507..48fcc0a5553 100644
--- a/mysql-test/suite/funcs_1/r/processlist_val_ps.result
+++ b/mysql-test/suite/funcs_1/r/processlist_val_ps.result
@@ -12,23 +12,23 @@ USE test;
SHOW CREATE TABLE INFORMATION_SCHEMA.PROCESSLIST;
Table Create Table
PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` (
- `ID` bigint(4) NOT NULL DEFAULT '0',
+ `ID` bigint(4) NOT NULL DEFAULT 0,
`USER` varchar(128) NOT NULL DEFAULT '',
`HOST` varchar(64) NOT NULL DEFAULT '',
`DB` varchar(64) DEFAULT NULL,
`COMMAND` varchar(16) NOT NULL DEFAULT '',
- `TIME` int(7) NOT NULL DEFAULT '0',
+ `TIME` int(7) NOT NULL DEFAULT 0,
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext DEFAULT NULL,
- `TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000',
- `STAGE` tinyint(2) NOT NULL DEFAULT '0',
- `MAX_STAGE` tinyint(2) NOT NULL DEFAULT '0',
- `PROGRESS` decimal(7,3) NOT NULL DEFAULT '0.000',
- `MEMORY_USED` bigint(7) NOT NULL DEFAULT '0',
- `EXAMINED_ROWS` int(7) NOT NULL DEFAULT '0',
- `QUERY_ID` bigint(4) NOT NULL DEFAULT '0',
+ `TIME_MS` decimal(22,3) NOT NULL DEFAULT 0.000,
+ `STAGE` tinyint(2) NOT NULL DEFAULT 0,
+ `MAX_STAGE` tinyint(2) NOT NULL DEFAULT 0,
+ `PROGRESS` decimal(7,3) NOT NULL DEFAULT 0.000,
+ `MEMORY_USED` bigint(7) NOT NULL DEFAULT 0,
+ `EXAMINED_ROWS` int(7) NOT NULL DEFAULT 0,
+ `QUERY_ID` bigint(4) NOT NULL DEFAULT 0,
`INFO_BINARY` blob DEFAULT NULL,
- `TID` bigint(4) NOT NULL DEFAULT '0'
+ `TID` bigint(4) NOT NULL DEFAULT 0
) DEFAULT CHARSET=utf8
# Ensure that the information about the own connection is correct.
#--------------------------------------------------------------------------
diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def
index 25f20e01521..5f8d9c6ddff 100644
--- a/mysql-test/suite/galera/disabled.def
+++ b/mysql-test/suite/galera/disabled.def
@@ -28,3 +28,5 @@ galera_flush : mysql-wsrep/issues/229
galera_transaction_read_only : mysql-wsrep/issues/229
galera_gcs_fragment : Incorrect arguments to SET
galera_flush_local : Fails sporadically
+galera_binlog_stmt_autoinc : TODO: investigate
+galera_concurrent_ctas : Test times out, investigate
diff --git a/mysql-test/suite/galera/galera_2nodes.cnf b/mysql-test/suite/galera/galera_2nodes.cnf
index b8c61bc814d..e5cf769a910 100644
--- a/mysql-test/suite/galera/galera_2nodes.cnf
+++ b/mysql-test/suite/galera/galera_2nodes.cnf
@@ -16,7 +16,7 @@ wsrep-sync-wait=7
#ist_port=@OPT.port
#sst_port=@OPT.port
wsrep-cluster-address=gcomm://
-wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;gcache.size=10M'
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;gcache.size=10M;evs.suspect_timeout=PT10S'
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
@@ -25,7 +25,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
#ist_port=@OPT.port
#sst_port=@OPT.port
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;gcache.size=10M'
+wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;gcache.size=10M;evs.suspect_timeout=PT10S'
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
diff --git a/mysql-test/suite/galera/include/auto_increment_offset_restore.inc b/mysql-test/suite/galera/include/auto_increment_offset_restore.inc
new file mode 100644
index 00000000000..6218dfd6f2c
--- /dev/null
+++ b/mysql-test/suite/galera/include/auto_increment_offset_restore.inc
@@ -0,0 +1,35 @@
+# See auto_increment_offset_restore.inc for details.
+
+if (!$node_1)
+{
+ --die ERROR IN TEST: $node_1 must be set before sourcing auto_increment_offset_save.inc
+}
+
+if (!$node_2)
+{
+ --die ERROR IN TEST: $node_2 must be set before sourcing auto_increment_offset_save.inc
+}
+
+if (!$auto_increment_offset_node_1)
+{
+ --die ERROR IN TEST: $auto_increment_offset_node_1 must be set before sourcing auto_increment_offset_save.inc
+}
+
+if (!$auto_increment_offset_node_2)
+{
+ --die ERROR IN TEST: $auto_increment_offset_node_2 must be set before sourcing auto_increment_offset_save.inc
+}
+
+# Restore original auto_increment_offset values.
+--disable_query_log
+--connection $node_1
+--eval SET @@global.auto_increment_offset = $auto_increment_offset_node_1;
+--connection $node_2
+--eval SET @@global.auto_increment_offset = $auto_increment_offset_node_2;
+
+if ($node_3)
+{
+--connection $node_3
+--eval SET @@global.auto_increment_offset = $auto_increment_offset_node_3;
+}
+--enable_query_log
diff --git a/mysql-test/suite/galera/include/auto_increment_offset_save.inc b/mysql-test/suite/galera/include/auto_increment_offset_save.inc
new file mode 100644
index 00000000000..3c4db3f381c
--- /dev/null
+++ b/mysql-test/suite/galera/include/auto_increment_offset_save.inc
@@ -0,0 +1,37 @@
+# This file can be used to save the @@global.auto_increment_offset value at
+# the beginning of any test that intends to restart any of the participating
+# nodes. This is required as the node may get auto-assigned a different
+# auto_increment_offset value on restart, which could cause MTR's internal
+# post-check to fail. auto_increment_offset_restore.inc can be used at the
+# end of the test to restore these saved values.
+
+# Parameters
+# ----------
+# $node_1
+# Connection handle for 1st node
+# $node_2
+# Connection handle for 2nd node
+# $node_3 (optional)
+# Connection handle for 3rd node
+
+if (!$node_1)
+{
+ --die ERROR IN TEST: $node_1 must be set before sourcing auto_increment_offset_save.inc
+}
+
+if (!$node_2)
+{
+ --die ERROR IN TEST: $node_2 must be set before sourcing auto_increment_offset_save.inc
+}
+
+--connection $node_1
+let $auto_increment_offset_node_1 = `SELECT @@global.auto_increment_offset`;
+--connection $node_2
+let $auto_increment_offset_node_2 = `SELECT @@global.auto_increment_offset`;
+
+if ($node_3)
+{
+ --connection $node_3
+ let $auto_increment_offset_node_3 = `SELECT @@global.auto_increment_offset`;
+}
+
diff --git a/mysql-test/suite/galera/r/GAL-382.result b/mysql-test/suite/galera/r/GAL-382.result
new file mode 100644
index 00000000000..0c7365f3005
--- /dev/null
+++ b/mysql-test/suite/galera/r/GAL-382.result
@@ -0,0 +1,6 @@
+create table t1 (i int, j int, k int, primary key pk(i)) engine=innodb;
+insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3);
+create table t2 (i int, j int, k int, primary key pk(i, j, k), index idx(i, k, j)) engine=innodb;
+replace into t2 (i, j, k) select /*!99997 */ i, k, j from t1;
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/suite/galera/r/MW-252.result b/mysql-test/suite/galera/r/MW-252.result
new file mode 100644
index 00000000000..c422edcb82a
--- /dev/null
+++ b/mysql-test/suite/galera/r/MW-252.result
@@ -0,0 +1,7 @@
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+FLUSH TABLES WITH READ LOCK;
+SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+VARIABLE_VALUE = 2
+1
+UNLOCK TABLES;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/MW-258.result b/mysql-test/suite/galera/r/MW-258.result
new file mode 100644
index 00000000000..1b4d4ae0de8
--- /dev/null
+++ b/mysql-test/suite/galera/r/MW-258.result
@@ -0,0 +1,34 @@
+CREATE TABLE t1 (f1 INTEGER);
+LOCK TABLE t1 WRITE;
+value prior to RSU:
+SHOW STATUS LIKE 'wsrep_desync_count';
+Variable_name Value
+wsrep_desync_count 0
+SHOW VARIABLES LIKE 'wsrep_desync';
+Variable_name Value
+wsrep_desync OFF
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_osu_method = RSU;
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_osu_method = RSU;
+ALTER TABLE t1 ADD COLUMN f3 INTEGER;;
+value during RSU:
+SHOW STATUS LIKE 'wsrep_desync_count';
+Variable_name Value
+wsrep_desync_count 2
+SHOW VARIABLES LIKE 'wsrep_desync';
+Variable_name Value
+wsrep_desync OFF
+UNLOCK TABLES;
+value after RSU:
+SHOW STATUS LIKE 'wsrep_desync_count';
+Variable_name Value
+wsrep_desync_count 0
+SHOW VARIABLES LIKE 'wsrep_desync';
+Variable_name Value
+wsrep_desync OFF
+SET GLOBAL wsrep_desync=0;
+Warnings:
+Warning 1231 'wsrep_desync' is already OFF.
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/MW-259.result b/mysql-test/suite/galera/r/MW-259.result
new file mode 100644
index 00000000000..df76e959de5
--- /dev/null
+++ b/mysql-test/suite/galera/r/MW-259.result
@@ -0,0 +1,12 @@
+CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
+SET GLOBAL wsrep_desync=0;
+Warnings:
+Warning 1231 'wsrep_desync' is already OFF.
+SET wsrep_OSU_method=RSU;
+SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue';
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;;
+SET GLOBAL wsrep_desync=1;;
+SET DEBUG_SYNC= 'now SIGNAL continue';
+DROP TABLE t1;
+SET GLOBAL wsrep_desync=0;
+SET DEBUG_SYNC= 'RESET';
diff --git a/mysql-test/suite/galera/r/MW-284.result b/mysql-test/suite/galera/r/MW-284.result
index 8b5119663ce..338f6c21375 100644
--- a/mysql-test/suite/galera/r/MW-284.result
+++ b/mysql-test/suite/galera/r/MW-284.result
@@ -1,13 +1,23 @@
+connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
+connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
SET SESSION wsrep_on = OFF;
SET SESSION wsrep_on = ON;
+connection node_3;
START SLAVE;
include/wait_for_slave_param.inc [Slave_IO_Running]
+connection node_1;
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
+connection node_3;
include/wait_for_slave_to_start.inc
+connection node_1;
INSERT INTO t1 VALUES (1);
+connection node_3;
+connection node_1;
DROP TABLE t1;
+connection node_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');
diff --git a/mysql-test/suite/galera/r/MW-285.result b/mysql-test/suite/galera/r/MW-285.result
new file mode 100644
index 00000000000..8c5a21fcbee
--- /dev/null
+++ b/mysql-test/suite/galera/r/MW-285.result
@@ -0,0 +1,19 @@
+CREATE TABLE parent1 ( id INT PRIMARY KEY, KEY (id) ) ENGINE=InnoDB;
+CREATE TABLE parent2 ( id INT PRIMARY KEY, KEY (id) ) ENGINE=InnoDB;
+CREATE TABLE child (
+id INT PRIMARY KEY,
+parent1_id INT,
+parent2_id INT,
+FOREIGN KEY (parent1_id) REFERENCES parent1(id),
+FOREIGN KEY (parent1_id) REFERENCES parent2(id)
+) ENGINE=InnoDB;
+INSERT INTO parent1 VALUES (1);
+INSERT INTO parent2 VALUES (1);
+INSERT INTO child VALUES (1,1,1);
+INSERT INTO child VALUES (2,1,1);
+SET foreign_key_checks=OFF;
+DROP TABLE parent1;
+UPDATE child SET parent1_id=2 WHERE id=1;
+DROP TABLE child;
+DROP TABLE parent2;
+SET foreign_key_checks=ON;
diff --git a/mysql-test/suite/galera/r/MW-286.result b/mysql-test/suite/galera/r/MW-286.result
new file mode 100644
index 00000000000..adc996c1cbe
--- /dev/null
+++ b/mysql-test/suite/galera/r/MW-286.result
@@ -0,0 +1,13 @@
+CREATE TABLE ten (f1 INTEGER);
+INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+CREATE TABLE t1 (f1 INTEGER) 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;
+INSERT INTO t1 (f1) SELECT 100000 + (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;;
+SET GLOBAL wsrep_desync = TRUE;
+SET wsrep_on = FALSE;
+ALTER TABLE t1 ADD PRIMARY KEY (f1);
+ERROR 70100: Query execution was interrupted
+SET wsrep_on = TRUE;
+SET GLOBAL wsrep_desync = FALSE;
+DROP TABLE t1;
+DROP TABLE ten;
diff --git a/mysql-test/suite/galera/r/MW-292.result b/mysql-test/suite/galera/r/MW-292.result
new file mode 100644
index 00000000000..f038f880efa
--- /dev/null
+++ b/mysql-test/suite/galera/r/MW-292.result
@@ -0,0 +1,30 @@
+CREATE TABLE rand_table (f1 FLOAT);
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+SET AUTOCOMMIT=ON;
+START TRANSACTION;
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
+f1 f2
+2 a
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync';
+COMMIT;;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync';
+SELECT TIMEDIFF(SYSDATE(), NOW()) < 2;
+TIMEDIFF(SYSDATE(), NOW()) < 2
+1
+INSERT INTO rand_table VALUES (RAND()),(RAND()),(RAND()),(RAND()),(RAND());
+INSERT INTO rand_table VALUES (RAND()),(RAND()),(RAND()),(RAND()),(RAND());
+SELECT COUNT(DISTINCT f1) = 10 FROM rand_table;
+COUNT(DISTINCT f1) = 10
+1
+wsrep_local_replays
+1
+DROP TABLE t1;
+DROP TABLE rand_table;
diff --git a/mysql-test/suite/galera/r/MW-44.result b/mysql-test/suite/galera/r/MW-44.result
new file mode 100644
index 00000000000..28a6f1ac8dd
--- /dev/null
+++ b/mysql-test/suite/galera/r/MW-44.result
@@ -0,0 +1,14 @@
+TRUNCATE TABLE mysql.general_log;
+TRUNCATE TABLE mysql.general_log;
+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 COUNT(*) = 2 FROM mysql.general_log WHERE argument LIKE 'CREATE%' OR argument LIKE 'ALTER%';
+COUNT(*) = 2
+1
+SELECT COUNT(*) = 0 FROM mysql.general_log WHERE argument NOT LIKE 'SELECT%';
+COUNT(*) = 0
+1
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera#414.result b/mysql-test/suite/galera/r/galera#414.result
new file mode 100644
index 00000000000..029961f9463
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera#414.result
@@ -0,0 +1,5 @@
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_on = OFF;
+SET SESSION wsrep_on = ON;
+CALL mtr.add_suppression("Failed to set packet size");
+CALL mtr.add_suppression("Failed to set packet size");
diff --git a/mysql-test/suite/galera/r/galera_as_master.result b/mysql-test/suite/galera/r/galera_as_master.result
index 92a1a0e7cb3..9d1262724d2 100644
--- a/mysql-test/suite/galera/r/galera_as_master.result
+++ b/mysql-test/suite/galera/r/galera_as_master.result
@@ -52,3 +52,4 @@ DROP TABLE t2, t3;
connection node_3;
STOP SLAVE;
RESET SLAVE ALL;
+CALL mtr.add_suppression('You need to use --log-bin to make --binlog-format work');
diff --git a/mysql-test/suite/galera/r/galera_as_slave_autoinc.result b/mysql-test/suite/galera/r/galera_as_slave_autoinc.result
new file mode 100644
index 00000000000..b6314b862c2
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_as_slave_autoinc.result
@@ -0,0 +1,82 @@
+START SLAVE;
+SET SESSION binlog_format='STATEMENT';
+CREATE TABLE t1 (
+i int(11) NOT NULL AUTO_INCREMENT,
+c char(32) DEFAULT 'dummy_text',
+PRIMARY KEY (i)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+insert into t1(i) values(null);
+select * from t1;
+i c
+1 dummy_text
+insert into t1(i) values(null), (null), (null);
+select * from t1;
+i c
+1 dummy_text
+2 dummy_text
+3 dummy_text
+4 dummy_text
+SET SESSION auto_increment_increment=7;
+insert into t1(i) values(null), (null), (null);
+SET SESSION auto_increment_offset=5;
+insert into t1(i) values(null), (null), (null);
+select * from t1;
+i c
+1 dummy_text
+2 dummy_text
+3 dummy_text
+4 dummy_text
+8 dummy_text
+15 dummy_text
+22 dummy_text
+33 dummy_text
+40 dummy_text
+47 dummy_text
+show variables like 'binlog_format';
+Variable_name Value
+binlog_format STATEMENT
+show variables like '%auto_increment%';
+Variable_name Value
+auto_increment_increment 7
+auto_increment_offset 5
+wsrep_auto_increment_control ON
+select * from t1;
+i c
+1 dummy_text
+2 dummy_text
+3 dummy_text
+4 dummy_text
+8 dummy_text
+15 dummy_text
+22 dummy_text
+33 dummy_text
+40 dummy_text
+47 dummy_text
+show variables like 'binlog_format';
+Variable_name Value
+binlog_format ROW
+show variables like 'auto_increment_increment';
+Variable_name Value
+auto_increment_increment 2
+select * from t1;
+i c
+1 dummy_text
+2 dummy_text
+3 dummy_text
+4 dummy_text
+8 dummy_text
+15 dummy_text
+22 dummy_text
+33 dummy_text
+40 dummy_text
+47 dummy_text
+show variables like 'binlog_format';
+Variable_name Value
+binlog_format ROW
+show variables like 'auto_increment_increment';
+Variable_name Value
+auto_increment_increment 2
+DROP TABLE t1;
+STOP SLAVE;
+RESET SLAVE ALL;
+RESET MASTER;
diff --git a/mysql-test/suite/galera/r/galera_as_slave_nonprim.result b/mysql-test/suite/galera/r/galera_as_slave_nonprim.result
index fd20f8db2f9..365ea31f292 100644
--- a/mysql-test/suite/galera/r/galera_as_slave_nonprim.result
+++ b/mysql-test/suite/galera/r/galera_as_slave_nonprim.result
@@ -12,7 +12,7 @@ STOP SLAVE;
RESET SLAVE ALL;
CALL mtr.add_suppression("Slave SQL: Error 'Unknown command' on query");
CALL mtr.add_suppression("Slave: Unknown command Error_code: 1047");
-CALL mtr.add_suppression("Send action {\\(nil\\), 328, TORDERED} returned -107 \\(Transport endpoint is not connected\\)");
+CALL mtr.add_suppression("Transport endpoint is not connected");
CALL mtr.add_suppression("Slave SQL: Error in Xid_log_event: Commit could not be completed, 'Deadlock found when trying to get lock; try restarting transaction', Error_code: 1213");
CALL mtr.add_suppression("Slave SQL: Node has dropped from cluster, Error_code: 1047");
RESET MASTER;
diff --git a/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result b/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result
index 210492937b0..91b3c9ecaa8 100644
--- a/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result
+++ b/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result
@@ -9,9 +9,10 @@ SET SESSION wsrep_sync_wait = 0;
UNLOCK TABLES;
COMMIT;
SET AUTOCOMMIT=ON;
-SELECT * FROM t1;
-f1
-2
+SET SESSION wsrep_sync_wait = 7;
+SELECT COUNT(*) = 1 FROM t1;
+COUNT(*) = 1
+1
wsrep_local_aborts_increment
1
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_defaults.result b/mysql-test/suite/galera/r/galera_defaults.result
index 6879ecf67fc..b6a16f72ec3 100644
--- a/mysql-test/suite/galera/r/galera_defaults.result
+++ b/mysql-test/suite/galera/r/galera_defaults.result
@@ -32,8 +32,8 @@ WSREP_GTID_DOMAIN_ID 0
WSREP_GTID_MODE OFF
WSREP_LOAD_DATA_SPLITTING ON
WSREP_LOG_CONFLICTS OFF
-WSREP_MAX_WS_ROWS 131072
-WSREP_MAX_WS_SIZE 1073741824
+WSREP_MAX_WS_ROWS 0
+WSREP_MAX_WS_SIZE 2147483647
WSREP_MYSQL_REPLICATION_BUNDLE 0
WSREP_NOTIFY_CMD
WSREP_ON ON
@@ -50,12 +50,12 @@ WSREP_SST_DONOR
WSREP_SST_DONOR_REJECTS_QUERIES OFF
WSREP_SST_METHOD rsync
WSREP_SYNC_WAIT 7
-<BASE_HOST>; <BASE_PORT>; cert.log_conflicts = no; debug = no; evs.auto_evict = 0; evs.causal_keepalive_period = PT1S; evs.debug_log_mask = 0x1; evs.delay_margin = PT1S; evs.delayed_keep_period = PT30S; evs.inactive_check_period = PT0.5S; evs.inactive_timeout = PT15S; evs.info_log_mask = 0; evs.install_timeout = PT7.5S; evs.join_retrans_period = PT1S; evs.keepalive_period = PT1S; evs.max_install_timeouts = 3; evs.send_window = 4; evs.stats_report_period = PT1M; evs.suspect_timeout = PT5S; evs.use_aggregate = true; evs.user_send_window = 2; evs.version = 0; evs.view_forget_timeout = P1D; <GCACHE_DIR>; gcache.keep_pages_size = 0; gcache.mem_size = 0; <GCACHE_NAME>; gcache.page_size = 128M; gcache.size = 10M; gcs.fc_debug = 0; gcs.fc_factor = 1.0; gcs.fc_limit = 16; gcs.fc_master_slave = no; gcs.max_packet_size = 64500; gcs.max_throttle = 0.25; <GCS_RECV_Q_HARD_LIMIT>; gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = no; <GMCAST_LISTEN_ADDR>; gmcast.mcast_addr = ; gmcast.mcast_ttl = 1; gmcast.peer_timeout = PT3S; gmcast.segment = 0; gmcast.time_wait = PT5S; gmcast.version = 0; <IST_RECV_ADDR>; pc.announce_timeout = PT3S; pc.checksum = false; pc.ignore_quorum = false; pc.ignore_sb = false; pc.linger = PT20S; pc.npvo = false; pc.recovery = true; pc.version = 0; pc.wait_prim = true; pc.wait_prim_timeout = P30S; pc.weight = 1; protonet.backend = asio; protonet.version = 0; repl.causal_read_timeout = PT90S; repl.commit_order = 3; repl.key_format = FLAT8; repl.max_ws_size = 2147483647; repl.proto_max = 7; socket.checksum = 2;
+<BASE_DIR>; <BASE_HOST>; <BASE_PORT>; cert.log_conflicts = no; debug = no; evs.auto_evict = 0; evs.causal_keepalive_period = PT1S; evs.debug_log_mask = 0x1; evs.delay_margin = PT1S; evs.delayed_keep_period = PT30S; evs.inactive_check_period = PT0.5S; evs.inactive_timeout = PT15S; evs.info_log_mask = 0; evs.install_timeout = PT7.5S; evs.join_retrans_period = PT1S; evs.keepalive_period = PT1S; evs.max_install_timeouts = 3; evs.send_window = 4; evs.stats_report_period = PT1M; evs.suspect_timeout = PT10S; evs.use_aggregate = true; evs.user_send_window = 2; evs.version = 0; evs.view_forget_timeout = P1D; <GCACHE_DIR>; gcache.keep_pages_size = 0; gcache.mem_size = 0; <GCACHE_NAME>; gcache.page_size = 128M; gcache.size = 10M; gcomm.thread_prio = ; gcs.fc_debug = 0; gcs.fc_factor = 1.0; gcs.fc_limit = 16; gcs.fc_master_slave = no; gcs.max_packet_size = 64500; gcs.max_throttle = 0.25; <GCS_RECV_Q_HARD_LIMIT>; gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = no; <GMCAST_LISTEN_ADDR>; gmcast.mcast_addr = ; gmcast.mcast_ttl = 1; gmcast.peer_timeout = PT3S; gmcast.segment = 0; gmcast.time_wait = PT5S; gmcast.version = 0; <IST_RECV_ADDR>; pc.announce_timeout = PT3S; pc.checksum = false; pc.ignore_quorum = false; pc.ignore_sb = false; pc.linger = PT20S; pc.npvo = false; pc.recovery = true; pc.version = 0; pc.wait_prim = true; pc.wait_prim_timeout = P30S; pc.weight = 1; protonet.backend = asio; protonet.version = 0; repl.causal_read_timeout = PT90S; repl.commit_order = 3; repl.key_format = FLAT8; repl.max_ws_size = 2147483647; repl.proto_max = 7; socket.checksum = 2; socket.recv_buf_size = 212992;
SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_STATUS
WHERE VARIABLE_NAME LIKE 'wsrep_%'
AND VARIABLE_NAME != 'wsrep_debug_sync_waiters';
COUNT(*)
-57
+58
SELECT VARIABLE_NAME FROM INFORMATION_SCHEMA.GLOBAL_STATUS
WHERE VARIABLE_NAME LIKE 'wsrep_%'
AND VARIABLE_NAME != 'wsrep_debug_sync_waiters'
@@ -76,6 +76,7 @@ WSREP_COMMIT_OOOE
WSREP_COMMIT_OOOL
WSREP_COMMIT_WINDOW
WSREP_CONNECTED
+WSREP_DESYNC_COUNT
WSREP_EVS_DELAYED
WSREP_EVS_EVICT_LIST
WSREP_EVS_REPL_LATENCY
diff --git a/mysql-test/suite/galera/r/galera_ftwrl_drain.result b/mysql-test/suite/galera/r/galera_ftwrl_drain.result
index d704699925b..751811b88fd 100644
--- a/mysql-test/suite/galera/r/galera_ftwrl_drain.result
+++ b/mysql-test/suite/galera/r/galera_ftwrl_drain.result
@@ -1,25 +1,37 @@
+connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
+connection node_2;
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
+connection node_1;
INSERT INTO t1 VALUES (1);
+connection node_2;
SET SESSION wsrep_sync_wait = 0;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
+connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
+connection node_2a;
FLUSH TABLES WITH READ LOCK;;
+connection node_2;
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
+connection node_2a;
+connection node_2;
SET SESSION lock_wait_timeout = 1;
SET SESSION innodb_lock_wait_timeout=1;
SET SESSION wait_timeout=1;
INSERT INTO t2 VALUES (2);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+connection node_2a;
UNLOCK TABLES;
+connection node_2;
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
INSERT INTO t1 VALUES (3);
+connection node_1;
SELECT COUNT(*) = 2 FROM t1;
COUNT(*) = 2
1
diff --git a/mysql-test/suite/galera/r/galera_gcs_fc_limit.result b/mysql-test/suite/galera/r/galera_gcs_fc_limit.result
index a1ba8672eae..464a8b7ea97 100644
--- a/mysql-test/suite/galera/r/galera_gcs_fc_limit.result
+++ b/mysql-test/suite/galera/r/galera_gcs_fc_limit.result
@@ -5,7 +5,7 @@ SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
SET GLOBAL wsrep_provider_options = 'gcs.fc_limit=1';
-FLUSH TABLES WITH READ LOCK;
+LOCK TABLE t1 WRITE;
connection node_1;
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
diff --git a/mysql-test/suite/galera/r/galera_ist_recv_bind.result b/mysql-test/suite/galera/r/galera_ist_recv_bind.result
new file mode 100644
index 00000000000..de4e07fbe41
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_ist_recv_bind.result
@@ -0,0 +1,13 @@
+SELECT @@wsrep_provider_options LIKE '%ist.recv_bind = 127.0.0.1%';
+@@wsrep_provider_options LIKE '%ist.recv_bind = 127.0.0.1%'
+1
+SELECT @@wsrep_provider_options LIKE '%ist.recv_bind = 127.0.0.1%';
+@@wsrep_provider_options LIKE '%ist.recv_bind = 127.0.0.1%'
+1
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
+SET SESSION wsrep_on = OFF;
+SET SESSION wsrep_on = ON;
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_ist_restart_joiner.result b/mysql-test/suite/galera/r/galera_ist_restart_joiner.result
index f7a1386e7f8..01544843d2d 100644
--- a/mysql-test/suite/galera/r/galera_ist_restart_joiner.result
+++ b/mysql-test/suite/galera/r/galera_ist_restart_joiner.result
@@ -1,22 +1,31 @@
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
INSERT INTO t1 VALUES (1, 'a'), (2, 'a'), (3, 'a'), (4, 'a'), (5, 'a'),(6, 'a');
+connection node_2;
Unloading wsrep provider ...
SET GLOBAL wsrep_provider = 'none';
+connection node_1;
UPDATE t1 SET f2 = 'b' WHERE f1 > 1;
UPDATE t1 SET f2 = 'c' WHERE f1 > 2;
+connection node_2;
SET GLOBAL wsrep_provider_options = 'dbug=d,recv_IST_after_apply_trx';
SET SESSION wsrep_sync_wait = 0;
Loading wsrep_provider ...
SHOW STATUS LIKE 'wsrep_debug_sync_waiters';
Variable_name Value
wsrep_debug_sync_waiters recv_IST_after_apply_trx
+connection node_1;
+connection node_1;
UPDATE t1 SET f2 = 'd' WHERE f1 > 3;
CREATE TABLE t2 (f1 INTEGER);
+connection node_2;
+connection node_1;
UPDATE t1 SET f2 = 'e' WHERE f1 > 4;
CREATE TABLE t3 (f1 INTEGER);
+connection node_2;
Performing --wsrep-recover ...
Starting server ...
Using --wsrep-start-position when starting mysqld ...
+connection node_1;
UPDATE t1 SET f2 = 'f' WHERE f1 > 5;
SELECT * FROM t1;
f1 f2
@@ -26,6 +35,7 @@ f1 f2
4 d
5 e
6 f
+connection node_2;
SELECT * FROM t1;
f1 f2
1 a
@@ -40,4 +50,5 @@ COUNT(*) = 0
SELECT COUNT(*) = 0 FROM t3;
COUNT(*) = 0
1
+connection node_1;
DROP TABLE t1, t2, t3;
diff --git a/mysql-test/suite/galera/r/galera_kill_ddl.result b/mysql-test/suite/galera/r/galera_kill_ddl.result
index c5b3e31b80e..9b15aaeb0af 100644
--- a/mysql-test/suite/galera/r/galera_kill_ddl.result
+++ b/mysql-test/suite/galera/r/galera_kill_ddl.result
@@ -10,8 +10,8 @@ connection node_2a;
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1';
COUNT(*) = 2
1
+connection node_1;
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
-connection node_1;
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_log_output_csv.result b/mysql-test/suite/galera/r/galera_log_output_csv.result
index 07a78469578..cdb5ee49f3e 100644
--- a/mysql-test/suite/galera/r/galera_log_output_csv.result
+++ b/mysql-test/suite/galera/r/galera_log_output_csv.result
@@ -9,9 +9,6 @@ SELECT 1 = 1 FROM t1;
SELECT COUNT(*) = 1 FROM mysql.slow_log WHERE sql_text = 'SELECT 1 = 1 FROM t1';
COUNT(*) = 1
1
-SELECT COUNT(*) > 0 FROM mysql.general_log WHERE argument = 'CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB';
-COUNT(*) > 0
-1
SELECT 2 = 2 FROM t1;
2 = 2
1
diff --git a/mysql-test/suite/galera/r/galera_parallel_simple.result b/mysql-test/suite/galera/r/galera_parallel_simple.result
index 294a94baed3..6d023c38a57 100644
--- a/mysql-test/suite/galera/r/galera_parallel_simple.result
+++ b/mysql-test/suite/galera/r/galera_parallel_simple.result
@@ -1,6 +1,7 @@
CREATE TABLE t1 (id INT) ENGINE=InnoDB;
CREATE TABLE t2 (id INT) ENGINE=InnoDB;
SET GLOBAL wsrep_slave_threads = 2;
+LOCK TABLE t1 WRITE;
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
INSERT INTO t1 VALUES (1);
@@ -13,15 +14,15 @@ INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
+SET SESSION wsrep_sync_wait = 0;
+UNLOCK TABLES;
+SET SESSION wsrep_sync_wait = 7;
SELECT COUNT(*) = 10 FROM t1;
COUNT(*) = 10
0
SELECT COUNT(*) = 10 FROM t2;
COUNT(*) = 10
0
-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'committed%';
-COUNT(*) = 2
-1
SET GLOBAL wsrep_slave_threads = 1;;
DROP TABLE t1;
DROP TABLE t2;
diff --git a/mysql-test/suite/galera/r/galera_repl_max_ws_size.result b/mysql-test/suite/galera/r/galera_repl_max_ws_size.result
index 00980181824..da24a741351 100644
--- a/mysql-test/suite/galera/r/galera_repl_max_ws_size.result
+++ b/mysql-test/suite/galera/r/galera_repl_max_ws_size.result
@@ -7,3 +7,7 @@ SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
DROP TABLE t1;
+CALL mtr.add_suppression("Maximum writeset size exceeded by");
+CALL mtr.add_suppression("transaction size limit");
+CALL mtr.add_suppression("transaction size exceeded");
+CALL mtr.add_suppression("rbr write fail");
diff --git a/mysql-test/suite/galera/r/galera_roles.result b/mysql-test/suite/galera/r/galera_roles.result
index 1617f0d7b51..f07cd81c03f 100644
--- a/mysql-test/suite/galera/r/galera_roles.result
+++ b/mysql-test/suite/galera/r/galera_roles.result
@@ -74,8 +74,8 @@ SET ROLE role1;
FLUSH TABLES;
SELECT * FROM mysql.roles_mapping;
Host User Role Admin_option
- role1 Y
localhost foo role1 N
+localhost root role1 Y
SHOW TABLES FROM test1;
Tables_in_test1
t1
@@ -166,6 +166,45 @@ disconnect foo_node_2;
connection node_1;
DROP USER foo@localhost;
DROP DATABASE test1;
+#
+# MDEV-10566: Create role statement replicated inconsistently in Galera Cluster
+#
+
+# On node_1
+CREATE USER foo@localhost;
+CREATE ROLE role1;
+CREATE ROLE role2 WITH ADMIN CURRENT_USER;
+CREATE ROLE role3 WITH ADMIN foo@localhost;
+CREATE ROLE role4 WITH ADMIN role1;
+SELECT * FROM mysql.roles_mapping;
+Host User Role Admin_option
+ role1 role4 Y
+localhost foo role3 Y
+localhost root role1 Y
+localhost root role2 Y
+SELECT * FROM INFORMATION_SCHEMA.APPLICABLE_ROLES;
+GRANTEE ROLE_NAME IS_GRANTABLE IS_DEFAULT
+role1 role4 YES NULL
+root@localhost role1 YES NO
+root@localhost role2 YES NO
+
+# On node_2
+SELECT * FROM mysql.roles_mapping;
+Host User Role Admin_option
+ role1 role4 Y
+localhost foo role3 Y
+localhost root role1 Y
+localhost root role2 Y
+SELECT * FROM INFORMATION_SCHEMA.APPLICABLE_ROLES;
+GRANTEE ROLE_NAME IS_GRANTABLE IS_DEFAULT
+role1 role4 YES NULL
+root@localhost role1 YES NO
+root@localhost role2 YES NO
+DROP ROLE role1;
+DROP ROLE role2;
+DROP ROLE role3;
+DROP ROLE role4;
+DROP USER foo@localhost;
disconnect node_2;
disconnect node_1;
# End of test
diff --git a/mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result b/mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result
index 2b2b80ee91c..aa0d20a3466 100644
--- a/mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result
+++ b/mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result
@@ -27,13 +27,12 @@ SET GLOBAL wsrep_desync=0;
Warnings:
Warning 1231 'wsrep_desync' is already OFF.
SET wsrep_OSU_method=RSU;
-SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue';
+SET DEBUG_SYNC = 'alter_table_before_create_table_no_lock WAIT_FOR continue';
ALTER TABLE t1 ADD COLUMN f2 INTEGER;;
connection node_1a;
-SET GLOBAL wsrep_desync=1;
-ERROR HY000: Operation 'desync' failed for SET GLOBAL wsrep_desync=1
-SET GLOBAL wsrep_desync=0;
+SET GLOBAL wsrep_desync=1;;
SET DEBUG_SYNC= 'now SIGNAL continue';
+SET GLOBAL wsrep_desync=0;
connection node_1;
SHOW CREATE TABLE t1;
Table Create Table
diff --git a/mysql-test/suite/galera/r/galera_ssl_upgrade.result b/mysql-test/suite/galera/r/galera_ssl_upgrade.result
index c0f2e84dc6f..b24671d120d 100644
--- a/mysql-test/suite/galera/r/galera_ssl_upgrade.result
+++ b/mysql-test/suite/galera/r/galera_ssl_upgrade.result
@@ -4,21 +4,12 @@ VARIABLE_VALUE = 'Synced'
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
-SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
-VARIABLE_VALUE = 'Synced'
-1
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
-SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
-VARIABLE_VALUE = 'Synced'
-1
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
-SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
-VARIABLE_VALUE = 'Synced'
-1
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
diff --git a/mysql-test/suite/galera/r/galera_transaction_replay.result b/mysql-test/suite/galera/r/galera_transaction_replay.result
index bfafa506fe6..e932e4aed02 100644
--- a/mysql-test/suite/galera/r/galera_transaction_replay.result
+++ b/mysql-test/suite/galera/r/galera_transaction_replay.result
@@ -1,20 +1,28 @@
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
INSERT INTO t1 VALUES (1, 'a');
INSERT INTO t1 VALUES (2, 'a');
+connection node_1;
SET AUTOCOMMIT=ON;
START TRANSACTION;
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
f1 f2
2 a
+connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync';
+connection node_1;
COMMIT;;
+connection node_1a;
SET SESSION wsrep_sync_wait = 0;
SET SESSION wsrep_on = 0;
SET SESSION wsrep_on = 1;
+connection node_2;
UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
+connection node_1a;
+connection node_1a;
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync';
+connection node_1;
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
COUNT(*) = 1
1
@@ -23,6 +31,7 @@ COUNT(*) = 1
1
wsrep_local_replays
1
+connection node_2;
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
COUNT(*) = 1
1
@@ -30,3 +39,30 @@ SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
COUNT(*) = 1
1
DROP TABLE t1;
+CREATE TABLE t1 (i int primary key, j int) ENGINE=INNODB;
+INSERT INTO t1 VALUES (1, 0), (3, 0);
+SELECT * FROM t1;
+i j
+1 0
+3 0
+PREPARE stmt1 FROM "UPDATE t1 SET j = 1 where i > 0";
+SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync';
+EXECUTE stmt1;;
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_on = 0;
+SET SESSION wsrep_on = 1;
+INSERT INTO t1 VALUES(2,2);
+SET GLOBAL wsrep_provider_options = 'dbug=';
+SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync';
+SELECT * FROM t1;
+i j
+1 1
+2 2
+3 1
+SELECT * FROM t1;
+i j
+1 1
+2 2
+3 1
+DEALLOCATE PREPARE stmt1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_var_desync_on.result b/mysql-test/suite/galera/r/galera_var_desync_on.result
index 383e077f775..54c30370c4a 100644
--- a/mysql-test/suite/galera/r/galera_var_desync_on.result
+++ b/mysql-test/suite/galera/r/galera_var_desync_on.result
@@ -31,4 +31,6 @@ connection node_2;
SELECT COUNT(*) = 11 FROM t1;
COUNT(*) = 11
1
+CALL mtr.add_suppression("Protocol violation");
DROP TABLE t1;
+CALL mtr.add_suppression("Protocol violation");
diff --git a/mysql-test/suite/galera/r/galera_var_max_ws_rows.result b/mysql-test/suite/galera/r/galera_var_max_ws_rows.result
new file mode 100644
index 00000000000..6e239c70a3e
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_var_max_ws_rows.result
@@ -0,0 +1,115 @@
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
+SET GLOBAL wsrep_max_ws_rows = 4;
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (2);
+INSERT INTO t1 (f2) VALUES (3);
+INSERT INTO t1 (f2) VALUES (4);
+INSERT INTO t1 (f2) VALUES (5);
+ERROR HY000: wsrep_max_ws_rows exceeded
+COMMIT;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (2);
+INSERT INTO t1 (f2) VALUES (3);
+INSERT INTO t1 (f2) VALUES (4);
+UPDATE t1 SET f2 = 10 WHERE f2 = 4;
+ERROR HY000: wsrep_max_ws_rows exceeded
+COMMIT;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (2);
+INSERT INTO t1 (f2) VALUES (3);
+INSERT INTO t1 (f2) VALUES (4);
+DELETE FROM t1 WHERE f2 = 1;
+ERROR HY000: wsrep_max_ws_rows exceeded
+COMMIT;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SET GLOBAL wsrep_max_ws_rows = 5;
+INSERT INTO t1 (f2) VALUES (1),(2),(3),(4),(5);
+SET GLOBAL wsrep_max_ws_rows = 4;
+UPDATE t1 SET f2 = f2 + 10;
+ERROR HY000: wsrep_max_ws_rows exceeded
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+DELETE FROM t1 WHERE f2 < 10;
+ERROR HY000: wsrep_max_ws_rows exceeded
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+INSERT INTO t1 (f2) SELECT * FROM ten;
+ERROR HY000: wsrep_max_ws_rows exceeded
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+INSERT INTO t1 (f2) VALUES (10),(20),(30),(40),(50);
+ERROR HY000: wsrep_max_ws_rows exceeded
+SELECT COUNT(*) = 5 FROM t1;
+COUNT(*) = 5
+1
+SET GLOBAL wsrep_max_ws_rows = 10;
+DELETE FROM t1 WHERE f2 < 10;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SET GLOBAL wsrep_max_ws_rows = 100;
+SELECT COUNT(*) = 100 FROM t1;
+COUNT(*) = 100
+1
+DELETE FROM t1 WHERE f2 < 101;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SET GLOBAL wsrep_max_ws_rows = 9999;
+INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+ERROR HY000: wsrep_max_ws_rows exceeded
+SET GLOBAL wsrep_max_ws_rows = 10000;
+INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+SET GLOBAL wsrep_max_ws_rows = 9999;
+UPDATE t1 SET f2 = 2 WHERE f2 = 1;
+ERROR HY000: wsrep_max_ws_rows exceeded
+SET GLOBAL wsrep_max_ws_rows = 10000;
+UPDATE t1 SET f2 = 2 WHERE f2 = 1;
+SET GLOBAL wsrep_max_ws_rows = 9999;
+DELETE FROM t1 WHERE f2 = 2;
+ERROR HY000: wsrep_max_ws_rows exceeded
+SET GLOBAL wsrep_max_ws_rows = 10000;
+DELETE FROM t1 WHERE f2 = 2;
+SELECT COUNT(*) = 0 FROM t1;
+COUNT(*) = 0
+1
+SET AUTOCOMMIT = ON;
+SET GLOBAL wsrep_max_ws_rows = 1;
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (2);
+ERROR HY000: wsrep_max_ws_rows exceeded
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (2);
+SET AUTOCOMMIT = OFF;
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (2);
+ERROR HY000: wsrep_max_ws_rows exceeded
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (2);
+ERROR HY000: wsrep_max_ws_rows exceeded
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (2);
+ERROR HY000: wsrep_max_ws_rows exceeded
+DROP TABLE t1;
+DROP TABLE ten;
diff --git a/mysql-test/suite/galera/r/galera_var_max_ws_size.result b/mysql-test/suite/galera/r/galera_var_max_ws_size.result
index 71859ef82e0..53bac04fa86 100644
--- a/mysql-test/suite/galera/r/galera_var_max_ws_size.result
+++ b/mysql-test/suite/galera/r/galera_var_max_ws_size.result
@@ -6,4 +6,13 @@ ERROR HY000: Got error 90 "Message too long" during COMMIT
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
+SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=10000';
+SELECT @@wsrep_max_ws_size = 10000;
+@@wsrep_max_ws_size = 10000
+1
+SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=20000';
+SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=10000';
+SET GLOBAL wsrep_max_ws_size = 20000;
+provider_options_match
+1
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/r/galera_var_sst_auth.result b/mysql-test/suite/galera/r/galera_var_sst_auth.result
new file mode 100644
index 00000000000..1db83197870
--- /dev/null
+++ b/mysql-test/suite/galera/r/galera_var_sst_auth.result
@@ -0,0 +1,12 @@
+#
+# MDEV-10492: Assertion failure on shutdown when wsrep_sst_auth set in config
+#
+SELECT @@global.wsrep_sst_auth;
+@@global.wsrep_sst_auth
+********
+SET @@global.wsrep_sst_auth='foo:bar';
+SELECT @@global.wsrep_sst_auth;
+@@global.wsrep_sst_auth
+********
+disconnect node_2;
+disconnect node_1;
diff --git a/mysql-test/suite/galera/r/mdev_10518.result b/mysql-test/suite/galera/r/mdev_10518.result
new file mode 100644
index 00000000000..b2a3e0a65ef
--- /dev/null
+++ b/mysql-test/suite/galera/r/mdev_10518.result
@@ -0,0 +1,74 @@
+# On node_1
+list of GTID variables :
+gtid_domain_id 1
+gtid_binlog_pos
+gtid_binlog_state
+gtid_current_pos
+gtid_slave_pos
+wsrep_gtid_domain_id 4294967295
+wsrep_gtid_mode 1
+# On node_2
+list of GTID variables :
+gtid_domain_id 2
+gtid_binlog_pos
+gtid_binlog_state
+gtid_current_pos
+gtid_slave_pos
+wsrep_gtid_domain_id 4294967295
+wsrep_gtid_mode 1
+# On node_1
+CREATE TABLE t1(i INT) ENGINE=INNODB;
+CREATE TABLE t2(i INT) ENGINE=MEMORY;
+INSERT INTO t1 VALUES(1);
+SELECT * FROM t1;
+i
+1
+SELECT * FROM t2;
+i
+list of GTID variables :
+gtid_domain_id 1
+gtid_binlog_pos 4294967295-1-3
+gtid_binlog_state 4294967295-1-3
+gtid_current_pos 4294967295-1-3
+gtid_slave_pos
+wsrep_gtid_domain_id 4294967295
+wsrep_gtid_mode 1
+# On node_2
+SELECT * FROM t1;
+i
+1
+list of GTID variables :
+gtid_domain_id 2
+gtid_binlog_pos 4294967295-1-3
+gtid_binlog_state 4294967295-1-3
+gtid_current_pos
+gtid_slave_pos
+wsrep_gtid_domain_id 4294967295
+wsrep_gtid_mode 1
+# On node_1
+INSERT INTO t2 VALUES(1);
+SELECT * FROM t2;
+i
+1
+list of GTID variables :
+gtid_domain_id 1
+gtid_binlog_pos 1-1-1,4294967295-1-3
+gtid_binlog_state 1-1-1,4294967295-1-3
+gtid_current_pos 1-1-1,4294967295-1-3
+gtid_slave_pos
+wsrep_gtid_domain_id 4294967295
+wsrep_gtid_mode 1
+# On node_2
+SELECT * FROM t2;
+i
+list of GTID variables :
+gtid_domain_id 2
+gtid_binlog_pos 4294967295-1-3
+gtid_binlog_state 4294967295-1-3
+gtid_current_pos
+gtid_slave_pos
+wsrep_gtid_domain_id 4294967295
+wsrep_gtid_mode 1
+# On node_1
+DROP TABLE t1, t2;
+# End of test
diff --git a/mysql-test/suite/galera/t/GAL-382.test b/mysql-test/suite/galera/t/GAL-382.test
new file mode 100644
index 00000000000..05cc7346055
--- /dev/null
+++ b/mysql-test/suite/galera/t/GAL-382.test
@@ -0,0 +1,16 @@
+#
+# GAL-382 InnoDB: Failing assertion: xid_seqno > trx_sys_cur_xid_seqno in trx0sys.cc line 356
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+
+create table t1 (i int, j int, k int, primary key pk(i)) engine=innodb;
+insert into t1 values (1, 1, 1), (2, 2, 2), (3, 3, 3);
+create table t2 (i int, j int, k int, primary key pk(i, j, k), index idx(i, k, j)) engine=innodb;
+replace into t2 (i, j, k) select /*!99997 */ i, k, j from t1;
+
+DROP TABLE t1;
+DROP TABLE t2;
diff --git a/mysql-test/suite/galera/t/MW-252.test b/mysql-test/suite/galera/t/MW-252.test
new file mode 100644
index 00000000000..dfb82e8070a
--- /dev/null
+++ b/mysql-test/suite/galera/t/MW-252.test
@@ -0,0 +1,42 @@
+#
+# MW-252 - Check that FTWRL causes the node to become desynced
+# and not subject to flow control
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+
+FLUSH TABLES WITH READ LOCK;
+
+# Node #1 is now desynced
+--let $wait_condition = SELECT VARIABLE_VALUE = 'Donor/Desynced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'
+--source include/wait_condition.inc
+
+SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+
+# Node #2 can issue updates without flow control kicking in
+--connection node_2
+
+--let $count = 100
+--disable_query_log
+while ($count)
+{
+ INSERT INTO t1 VALUES (1);
+ --dec $count
+}
+--enable_query_log
+
+# Restore cluster
+--connection node_1
+UNLOCK TABLES;
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'
+--source include/wait_condition.inc
+
+--let $wait_condition = SELECT COUNT(*) = 100 FROM t1
+--source include/wait_condition.inc
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/MW-258.test b/mysql-test/suite/galera/t/MW-258.test
new file mode 100644
index 00000000000..f5519f8a081
--- /dev/null
+++ b/mysql-test/suite/galera/t/MW-258.test
@@ -0,0 +1,41 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER);
+LOCK TABLE t1 WRITE;
+--echo value prior to RSU:
+SHOW STATUS LIKE 'wsrep_desync_count';
+SHOW VARIABLES LIKE 'wsrep_desync';
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_osu_method = RSU;
+--send ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+
+--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1b
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_osu_method = RSU;
+--send ALTER TABLE t1 ADD COLUMN f3 INTEGER;
+
+--sleep 5
+--connection node_1
+--echo value during RSU:
+SHOW STATUS LIKE 'wsrep_desync_count';
+SHOW VARIABLES LIKE 'wsrep_desync';
+UNLOCK TABLES;
+
+--connection node_1a
+--reap
+--connection node_1b
+--reap
+
+--connection node_1
+--echo value after RSU:
+SHOW STATUS LIKE 'wsrep_desync_count';
+SHOW VARIABLES LIKE 'wsrep_desync';
+SET GLOBAL wsrep_desync=0;
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/MW-259.test b/mysql-test/suite/galera/t/MW-259.test
new file mode 100644
index 00000000000..7298285f6ff
--- /dev/null
+++ b/mysql-test/suite/galera/t/MW-259.test
@@ -0,0 +1,42 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/have_debug_sync.inc
+
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
+
+SET GLOBAL wsrep_desync=0;
+SET wsrep_OSU_method=RSU;
+
+SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue';
+--send ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+
+--connection node_1a
+
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'debug sync point: alter_table_before_open_tables'
+--source include/wait_condition.inc
+
+# wsrep_desync=1 will block
+--send SET GLOBAL wsrep_desync=1;
+
+--connection node_1b
+--sleep 2
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO = 'SET GLOBAL wsrep_desync=1'
+--source include/wait_condition.inc
+
+SET DEBUG_SYNC= 'now SIGNAL continue';
+DROP TABLE t1;
+SET GLOBAL wsrep_desync=0;
+
+--connection node_1
+--reap
+
+--connection node_1a
+--reap
+
+# Cleanup
+SET DEBUG_SYNC= 'RESET';
+
diff --git a/mysql-test/suite/galera/t/MW-284.test b/mysql-test/suite/galera/t/MW-284.test
index 5998e22ed1e..f3ce1b0dc91 100644
--- a/mysql-test/suite/galera/t/MW-284.test
+++ b/mysql-test/suite/galera/t/MW-284.test
@@ -55,3 +55,4 @@ 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');
diff --git a/mysql-test/suite/galera/t/MW-285.test b/mysql-test/suite/galera/t/MW-285.test
new file mode 100644
index 00000000000..1c567f7b250
--- /dev/null
+++ b/mysql-test/suite/galera/t/MW-285.test
@@ -0,0 +1,31 @@
+#
+# Broken FK constraints cause assertions
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE parent1 ( id INT PRIMARY KEY, KEY (id) ) ENGINE=InnoDB;
+CREATE TABLE parent2 ( id INT PRIMARY KEY, KEY (id) ) ENGINE=InnoDB;
+
+CREATE TABLE child (
+ id INT PRIMARY KEY,
+ parent1_id INT,
+ parent2_id INT,
+ FOREIGN KEY (parent1_id) REFERENCES parent1(id),
+ FOREIGN KEY (parent1_id) REFERENCES parent2(id)
+) ENGINE=InnoDB;
+
+INSERT INTO parent1 VALUES (1);
+INSERT INTO parent2 VALUES (1);
+INSERT INTO child VALUES (1,1,1);
+INSERT INTO child VALUES (2,1,1);
+
+SET foreign_key_checks=OFF;
+DROP TABLE parent1;
+
+UPDATE child SET parent1_id=2 WHERE id=1;
+
+DROP TABLE child;
+DROP TABLE parent2;
+SET foreign_key_checks=ON;
diff --git a/mysql-test/suite/galera/t/MW-286.test b/mysql-test/suite/galera/t/MW-286.test
new file mode 100644
index 00000000000..1b2e322f078
--- /dev/null
+++ b/mysql-test/suite/galera/t/MW-286.test
@@ -0,0 +1,32 @@
+#
+# MW-286 Spurious deadlock error after error with wsrep_desync and wsrep_on
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/big_test.inc
+
+--connection node_1
+CREATE TABLE ten (f1 INTEGER);
+INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+
+CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
+
+# Insert some values before the ALTER
+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;
+
+# Insert more values while the ALTER is running
+--send INSERT INTO t1 (f1) SELECT 100000 + (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;
+
+--connection node_2
+SET GLOBAL wsrep_desync = TRUE;
+SET wsrep_on = FALSE;
+
+--error ER_QUERY_INTERRUPTED
+ALTER TABLE t1 ADD PRIMARY KEY (f1);
+
+SET wsrep_on = TRUE;
+SET GLOBAL wsrep_desync = FALSE;
+
+DROP TABLE t1;
+DROP TABLE ten;
diff --git a/mysql-test/suite/galera/t/MW-292.test b/mysql-test/suite/galera/t/MW-292.test
new file mode 100644
index 00000000000..ecb1273759e
--- /dev/null
+++ b/mysql-test/suite/galera/t/MW-292.test
@@ -0,0 +1,79 @@
+#
+# MW-292 Reset timestamp after transaction replay
+#
+# We force transaction replay to happen and then we check that NOW() is not stuck in time.
+# As a bonus we also check that RAND() continues to return random values after replay
+#
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+--source include/have_debug_sync.inc
+--source suite/galera/include/galera_have_debug_sync.inc
+
+--let $wsrep_local_replays_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
+
+CREATE TABLE rand_table (f1 FLOAT);
+CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
+INSERT INTO t1 VALUES (1, 'a');
+INSERT INTO t1 VALUES (2, 'a');
+
+--connection node_1
+SET AUTOCOMMIT=ON;
+START TRANSACTION;
+
+UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
+SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
+
+# Block the commit
+--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--let $galera_sync_point = commit_monitor_enter_sync
+--source include/galera_set_sync_point.inc
+
+--connection node_1
+--send COMMIT;
+
+# Wait until commit is blocked
+--connection node_1a
+SET SESSION wsrep_sync_wait = 0;
+--source include/galera_wait_sync_point.inc
+
+# Issue a conflicting update on node #2
+--connection node_2
+UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
+
+# Wait for both transactions to be blocked
+--connection node_1a
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Update_rows_log_event::find_row%';
+--source include/wait_condition.inc
+
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'init' AND INFO = 'COMMIT';
+--source include/wait_condition.inc
+
+# Unblock the commit
+--connection node_1a
+--source include/galera_clear_sync_point.inc
+--source include/galera_signal_sync_point.inc
+
+# Commit succeeds via replay
+--connection node_1
+--reap
+
+# Confirm that NOW() is not stuck in time relative to SYSDATE();
+--sleep 3
+SELECT TIMEDIFF(SYSDATE(), NOW()) < 2;
+
+INSERT INTO rand_table VALUES (RAND()),(RAND()),(RAND()),(RAND()),(RAND());
+INSERT INTO rand_table VALUES (RAND()),(RAND()),(RAND()),(RAND()),(RAND());
+
+SELECT COUNT(DISTINCT f1) = 10 FROM rand_table;
+
+# wsrep_local_replays has increased by 1
+--let $wsrep_local_replays_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
+--disable_query_log
+--eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old = 1 AS wsrep_local_replays;
+--enable_query_log
+
+--connection node_2
+DROP TABLE t1;
+DROP TABLE rand_table;
diff --git a/mysql-test/suite/galera/t/MW-44-master.opt b/mysql-test/suite/galera/t/MW-44-master.opt
new file mode 100644
index 00000000000..a15aa0a99d9
--- /dev/null
+++ b/mysql-test/suite/galera/t/MW-44-master.opt
@@ -0,0 +1 @@
+--log-output=TABLE
diff --git a/mysql-test/suite/galera/t/MW-44.test b/mysql-test/suite/galera/t/MW-44.test
new file mode 100644
index 00000000000..55a3fd57f80
--- /dev/null
+++ b/mysql-test/suite/galera/t/MW-44.test
@@ -0,0 +1,25 @@
+#
+# MW-44: DDL is logged in the general_log on the slave
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+TRUNCATE TABLE mysql.general_log;
+
+--connection node_2
+TRUNCATE TABLE mysql.general_log;
+
+--connection node_1
+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 COUNT(*) = 2 FROM mysql.general_log WHERE argument LIKE 'CREATE%' OR argument LIKE 'ALTER%';
+
+--connection node_2
+SELECT COUNT(*) = 0 FROM mysql.general_log WHERE argument NOT LIKE 'SELECT%';
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera#414.cnf b/mysql-test/suite/galera/t/galera#414.cnf
new file mode 100644
index 00000000000..fbd1c58754f
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera#414.cnf
@@ -0,0 +1,8 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcs.max_packet_size=2'
+
+[mysqld.2]
+wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcs.max_packet_size=2'
+
diff --git a/mysql-test/suite/galera/t/galera#414.test b/mysql-test/suite/galera/t/galera#414.test
new file mode 100644
index 00000000000..b426e6510b6
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera#414.test
@@ -0,0 +1,32 @@
+#
+# codership/galera#414 Shutdown crashes node if the node started with `gcs.max_packet_size=2`
+#
+
+--source include/big_test.inc
+--source include/galera_cluster.inc
+
+# We perform the shutdown/restart sequence in here. If there was a crash during shutdown, MTR will detect it
+
+--connection node_2
+--source include/shutdown_mysqld.inc
+
+--connection node_1
+SET SESSION wsrep_sync_wait = 0;
+SET SESSION wsrep_on = OFF;
+--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+--connection node_2
+--source include/start_mysqld.inc
+
+--connection node_1
+SET SESSION wsrep_on = ON;
+--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
+CALL mtr.add_suppression("Failed to set packet size");
+
+--connection node_2
+CALL mtr.add_suppression("Failed to set packet size");
+
diff --git a/mysql-test/suite/galera/t/galera_as_master.test b/mysql-test/suite/galera/t/galera_as_master.test
index c5d4db9f192..93f9224b258 100644
--- a/mysql-test/suite/galera/t/galera_as_master.test
+++ b/mysql-test/suite/galera/t/galera_as_master.test
@@ -60,3 +60,6 @@ DROP TABLE t2, t3;
STOP SLAVE;
RESET SLAVE ALL;
+
+CALL mtr.add_suppression('You need to use --log-bin to make --binlog-format work');
+
diff --git a/mysql-test/suite/galera/t/galera_as_slave_autoinc.cnf b/mysql-test/suite/galera/t/galera_as_slave_autoinc.cnf
new file mode 100644
index 00000000000..9449ec9cf40
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_as_slave_autoinc.cnf
@@ -0,0 +1 @@
+!include ../galera_2nodes_as_slave.cnf
diff --git a/mysql-test/suite/galera/t/galera_as_slave_autoinc.test b/mysql-test/suite/galera/t/galera_as_slave_autoinc.test
new file mode 100644
index 00000000000..9292badc480
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_as_slave_autoinc.test
@@ -0,0 +1,83 @@
+#
+# Test Galera as a slave to a MySQL master
+#
+# The galera/galera_2node_slave.cnf describes the setup of the nodes
+#
+
+--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
+--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
+
+##
+## Verify the correct operation of the auto-increment when
+## the binlog format set to the 'STATEMENT' on the master node:
+##
+
+SET SESSION binlog_format='STATEMENT';
+
+CREATE TABLE t1 (
+ i int(11) NOT NULL AUTO_INCREMENT,
+ c char(32) DEFAULT 'dummy_text',
+ PRIMARY KEY (i)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+insert into t1(i) values(null);
+
+select * from t1;
+
+insert into t1(i) values(null), (null), (null);
+
+select * from t1;
+
+SET SESSION auto_increment_increment=7;
+insert into t1(i) values(null), (null), (null);
+
+SET SESSION auto_increment_offset=5;
+insert into t1(i) values(null), (null), (null);
+
+select * from t1;
+
+show variables like 'binlog_format';
+show variables like '%auto_increment%';
+
+--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(*) = 10 FROM t1;
+--source include/wait_condition.inc
+
+select * from t1;
+
+show variables like 'binlog_format';
+show variables like 'auto_increment_increment';
+
+--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
+
+select * from t1;
+
+show variables like 'binlog_format';
+show variables like 'auto_increment_increment';
+
+--connection node_1
+DROP TABLE t1;
+
+--connection node_2
+--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
+--source include/wait_condition.inc
+
+STOP SLAVE;
+RESET SLAVE ALL;
+
+--connection node_1
+RESET MASTER;
diff --git a/mysql-test/suite/galera/t/galera_as_slave_nonprim.test b/mysql-test/suite/galera/t/galera_as_slave_nonprim.test
index 5914e52d851..46a93458271 100644
--- a/mysql-test/suite/galera/t/galera_as_slave_nonprim.test
+++ b/mysql-test/suite/galera/t/galera_as_slave_nonprim.test
@@ -87,7 +87,7 @@ RESET SLAVE ALL;
CALL mtr.add_suppression("Slave SQL: Error 'Unknown command' on query");
CALL mtr.add_suppression("Slave: Unknown command Error_code: 1047");
-CALL mtr.add_suppression("Send action {\\(nil\\), 328, TORDERED} returned -107 \\(Transport endpoint is not connected\\)");
+CALL mtr.add_suppression("Transport endpoint is not connected");
CALL mtr.add_suppression("Slave SQL: Error in Xid_log_event: Commit could not be completed, 'Deadlock found when trying to get lock; try restarting transaction', Error_code: 1213");
CALL mtr.add_suppression("Slave SQL: Node has dropped from cluster, Error_code: 1047");
diff --git a/mysql-test/suite/galera/t/galera_bf_abort_flush_for_export.test b/mysql-test/suite/galera/t/galera_bf_abort_flush_for_export.test
index dbbe3b3c483..e32089ce21e 100644
--- a/mysql-test/suite/galera/t/galera_bf_abort_flush_for_export.test
+++ b/mysql-test/suite/galera/t/galera_bf_abort_flush_for_export.test
@@ -27,9 +27,8 @@ UNLOCK TABLES;
COMMIT;
SET AUTOCOMMIT=ON;
---let $wait_condition = SELECT COUNT(*) = 1 FROM t1
---source include/wait_condition.inc
-SELECT * FROM t1;
+SET SESSION wsrep_sync_wait = 7;
+SELECT COUNT(*) = 1 FROM t1;
--let $wsrep_local_bf_aborts_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
diff --git a/mysql-test/suite/galera/t/galera_defaults.test b/mysql-test/suite/galera/t/galera_defaults.test
index 1cbb19cc405..3b1cb7b8650 100644
--- a/mysql-test/suite/galera/t/galera_defaults.test
+++ b/mysql-test/suite/galera/t/galera_defaults.test
@@ -13,7 +13,7 @@
# Make sure that the test is operating on the right version of galera library.
--disable_query_log
---let $galera_version=3.9
+--let $galera_version=25.3.17
source ../wsrep/include/check_galera_version.inc;
--enable_query_log
diff --git a/mysql-test/suite/galera/t/galera_gcs_fc_limit.test b/mysql-test/suite/galera/t/galera_gcs_fc_limit.test
index fd77ec0a0eb..721d84ecb05 100644
--- a/mysql-test/suite/galera/t/galera_gcs_fc_limit.test
+++ b/mysql-test/suite/galera/t/galera_gcs_fc_limit.test
@@ -16,7 +16,7 @@ SELECT COUNT(*) = 1 FROM t1;
SET GLOBAL wsrep_provider_options = 'gcs.fc_limit=1';
# Block the slave applier thread
-FLUSH TABLES WITH READ LOCK;
+LOCK TABLE t1 WRITE;
--connection node_1
diff --git a/mysql-test/suite/galera/t/galera_ist_recv_bind.cnf b/mysql-test/suite/galera/t/galera_ist_recv_bind.cnf
new file mode 100644
index 00000000000..2628f05eaef
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_ist_recv_bind.cnf
@@ -0,0 +1,8 @@
+!include ../galera_2nodes.cnf
+
+[mysqld.1]
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;ist.recv_bind=127.0.0.1;pc.ignore_sb=true'
+
+[mysqld.2]
+wsrep_provider_options='base_port=@mysqld.2.#galera_port;ist.recv_bind=127.0.0.1'
+
diff --git a/mysql-test/suite/galera/t/galera_ist_recv_bind.test b/mysql-test/suite/galera/t/galera_ist_recv_bind.test
new file mode 100644
index 00000000000..cb7329073ad
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_ist_recv_bind.test
@@ -0,0 +1,54 @@
+#
+# Test ist.recv_bind option. Since MTR can not do proper testing with multiple interfaces and such, we
+# simply confirm that the option can be set (in the galera_ist_recv_bind.cnf file) and that IST works as expected
+#
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--connection node_1
+SELECT @@wsrep_provider_options LIKE '%ist.recv_bind = 127.0.0.1%';
+
+--connection node_2
+SELECT @@wsrep_provider_options LIKE '%ist.recv_bind = 127.0.0.1%';
+
+# Isolate node #2
+
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
+--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
+
+--connection node_2
+SET SESSION wsrep_on = OFF;
+--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;
+
+# Node #2 is now isolated. Run some transactions to accumulate writesets for IST
+
+--connection node_1
+CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1);
+
+# Restore node #2
+
+--connection node_2
+SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
+
+--connection node_1
+--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_2
+--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+--source include/wait_condition.inc
+
+# Confirm that IST has taken place
+
+--let $wait_condition = SELECT COUNT(*) = 1 FROM t1;
+--source include/wait_condition.inc
+
+# Cleanup
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_ist_restart_joiner.test b/mysql-test/suite/galera/t/galera_ist_restart_joiner.test
index eae28bdbcd7..931daaad30d 100644
--- a/mysql-test/suite/galera/t/galera_ist_restart_joiner.test
+++ b/mysql-test/suite/galera/t/galera_ist_restart_joiner.test
@@ -9,6 +9,11 @@
--source include/have_debug_sync.inc
--source suite/galera/include/galera_have_debug_sync.inc
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
+
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
INSERT INTO t1 VALUES (1, 'a'), (2, 'a'), (3, 'a'), (4, 'a'), (5, 'a'),(6, 'a');
@@ -106,3 +111,9 @@ SELECT COUNT(*) = 0 FROM t3;
--connection node_1
DROP TABLE t1, t2, t3;
+
+# Restore original auto_increment_offset values.
+--source include/auto_increment_offset_restore.inc
+
+--source include/galera_end.inc
+
diff --git a/mysql-test/suite/galera/t/galera_kill_ddl.test b/mysql-test/suite/galera/t/galera_kill_ddl.test
index 3c2bce5b9c9..90f3f30cc76 100644
--- a/mysql-test/suite/galera/t/galera_kill_ddl.test
+++ b/mysql-test/suite/galera/t/galera_kill_ddl.test
@@ -28,8 +28,13 @@ ALTER TABLE t1 ADD COLUMN f2 INTEGER;
--source include/galera_connect.inc
--connection node_2a
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
+--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
+--source include/wait_condition.inc
+
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1';
-SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--connection node_1
--disable_query_log
diff --git a/mysql-test/suite/galera/t/galera_log_output_csv.test b/mysql-test/suite/galera/t/galera_log_output_csv.test
index 00009396f6a..94ae3dd6168 100644
--- a/mysql-test/suite/galera/t/galera_log_output_csv.test
+++ b/mysql-test/suite/galera/t/galera_log_output_csv.test
@@ -17,9 +17,6 @@ SELECT COUNT(*) = 1 FROM mysql.slow_log WHERE sql_text = 'SELECT 1 = 1 FROM t1';
--connection node_2
-# CREATE TABLE from master is also present in the slave query log, but is logged twice, mysql-wsrep#44
-SELECT COUNT(*) > 0 FROM mysql.general_log WHERE argument = 'CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB';
-
SELECT 2 = 2 FROM t1;
SELECT COUNT(*) = 1 FROM mysql.slow_log WHERE sql_text = 'SELECT 2 = 2 FROM t1';
diff --git a/mysql-test/suite/galera/t/galera_parallel_simple.test b/mysql-test/suite/galera/t/galera_parallel_simple.test
index b1dc14deb5b..e078a342c16 100644
--- a/mysql-test/suite/galera/t/galera_parallel_simple.test
+++ b/mysql-test/suite/galera/t/galera_parallel_simple.test
@@ -13,6 +13,7 @@ CREATE TABLE t2 (id INT) ENGINE=InnoDB;
--connection node_2
SET GLOBAL wsrep_slave_threads = 2;
+LOCK TABLE t1 WRITE;
--connection node_1
INSERT INTO t1 VALUES (1);
@@ -34,10 +35,20 @@ INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
--connection node_2
+SET SESSION wsrep_sync_wait = 0;
+
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Waiting for table metadata lock%';
+--source include/wait_condition.inc
+
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'applied write set%';
+--source include/wait_condition.inc
+
+UNLOCK TABLES;
+
+SET SESSION wsrep_sync_wait = 7;
SELECT COUNT(*) = 10 FROM t1;
SELECT COUNT(*) = 10 FROM t2;
-SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'committed%';
--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig;
diff --git a/mysql-test/suite/galera/t/galera_pc_ignore_sb.test b/mysql-test/suite/galera/t/galera_pc_ignore_sb.test
index f63215ebe4a..84fd3a91857 100644
--- a/mysql-test/suite/galera/t/galera_pc_ignore_sb.test
+++ b/mysql-test/suite/galera/t/galera_pc_ignore_sb.test
@@ -6,10 +6,9 @@
--source include/have_innodb.inc
# Save original auto_increment_offset values.
---connection node_1
-let $auto_increment_offset_node_1 = `SELECT @@global.auto_increment_offset`;
---connection node_2
-let $auto_increment_offset_node_2 = `SELECT @@global.auto_increment_offset`;
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
--connection node_1
--let $wsrep_cluster_address_orig = `SELECT @@wsrep_cluster_address`
@@ -40,10 +39,8 @@ SET GLOBAL wsrep_cluster_address = '';
--source include/start_mysqld.inc
--source include/wait_until_connected_again.inc
---disable_query_log
# Restore original auto_increment_offset values.
---connection node_1
---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_1;
---connection node_2
---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_2;
---enable_query_log
+--source include/auto_increment_offset_restore.inc
+
+--source include/galera_end.inc
+
diff --git a/mysql-test/suite/galera/t/galera_repl_max_ws_size.test b/mysql-test/suite/galera/t/galera_repl_max_ws_size.test
index 37a2f7d4ce3..60b866ae018 100644
--- a/mysql-test/suite/galera/t/galera_repl_max_ws_size.test
+++ b/mysql-test/suite/galera/t/galera_repl_max_ws_size.test
@@ -23,3 +23,7 @@ SELECT COUNT(*) = 0 FROM t1;
DROP TABLE t1;
+CALL mtr.add_suppression("Maximum writeset size exceeded by");
+CALL mtr.add_suppression("transaction size limit");
+CALL mtr.add_suppression("transaction size exceeded");
+CALL mtr.add_suppression("rbr write fail");
diff --git a/mysql-test/suite/galera/t/galera_restart_nochanges.test b/mysql-test/suite/galera/t/galera_restart_nochanges.test
index a61332cefd6..0a6a0c5ccbe 100644
--- a/mysql-test/suite/galera/t/galera_restart_nochanges.test
+++ b/mysql-test/suite/galera/t/galera_restart_nochanges.test
@@ -6,10 +6,9 @@
--source include/have_innodb.inc
# Save original auto_increment_offset values.
---connection node_1
-let $auto_increment_offset_node_1 = `SELECT @@global.auto_increment_offset`;
---connection node_2
-let $auto_increment_offset_node_2 = `SELECT @@global.auto_increment_offset`;
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
--connection node_1
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
@@ -18,6 +17,10 @@ INSERT INTO t1 VALUES (1);
--connection node_2
--source include/restart_mysqld.inc
+--connection node_1
+--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
+--source include/wait_condition.inc
+
--let $galera_connection_name = node_2a
--let $galera_server_number = 2
--source include/galera_connect.inc
@@ -29,11 +32,9 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N
DROP TABLE t1;
---disable_query_log
# Restore original auto_increment_offset values.
---connection node_1
---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_1;
---connection node_2a
---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_2;
---enable_query_log
+--let $node_2=node_2a
+--source include/auto_increment_offset_restore.inc
+
+--source include/galera_end.inc
diff --git a/mysql-test/suite/galera/t/galera_roles.test b/mysql-test/suite/galera/t/galera_roles.test
index f9a15126e5e..16e417d1fdb 100644
--- a/mysql-test/suite/galera/t/galera_roles.test
+++ b/mysql-test/suite/galera/t/galera_roles.test
@@ -163,5 +163,37 @@ disconnect foo_node_2;
DROP USER foo@localhost;
DROP DATABASE test1;
+--echo #
+--echo # MDEV-10566: Create role statement replicated inconsistently in Galera Cluster
+--echo #
+--echo
+--echo # On node_1
+--connection node_1
+CREATE USER foo@localhost;
+CREATE ROLE role1;
+CREATE ROLE role2 WITH ADMIN CURRENT_USER;
+CREATE ROLE role3 WITH ADMIN foo@localhost;
+CREATE ROLE role4 WITH ADMIN role1;
+
+--sorted_result
+SELECT * FROM mysql.roles_mapping;
+--sorted_result
+SELECT * FROM INFORMATION_SCHEMA.APPLICABLE_ROLES;
+
+--echo
+--echo # On node_2
+--connection node_2
+--sorted_result
+SELECT * FROM mysql.roles_mapping;
+--sorted_result
+SELECT * FROM INFORMATION_SCHEMA.APPLICABLE_ROLES;
+
+# Cleanup
+DROP ROLE role1;
+DROP ROLE role2;
+DROP ROLE role3;
+DROP ROLE role4;
+DROP USER foo@localhost;
+
--source include/galera_end.inc
--echo # End of test
diff --git a/mysql-test/suite/galera/t/galera_rsu_wsrep_desync.test b/mysql-test/suite/galera/t/galera_rsu_wsrep_desync.test
index 36ec8563cbe..882f846fe67 100644
--- a/mysql-test/suite/galera/t/galera_rsu_wsrep_desync.test
+++ b/mysql-test/suite/galera/t/galera_rsu_wsrep_desync.test
@@ -17,9 +17,11 @@ SET wsrep_OSU_method=RSU;
SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue';
--send ALTER TABLE t1 ADD COLUMN f2 INTEGER;
+
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
---connection node_1a
+--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
+--connection node_1a
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'debug sync point: alter_table_before_open_tables'
--source include/wait_condition.inc
@@ -44,24 +46,32 @@ CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
SET GLOBAL wsrep_desync=0;
SET wsrep_OSU_method=RSU;
-SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue';
+SET DEBUG_SYNC = 'alter_table_before_create_table_no_lock WAIT_FOR continue';
--send ALTER TABLE t1 ADD COLUMN f2 INTEGER;
--connection node_1a
---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'debug sync point: alter_table_before_open_tables'
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'debug sync point: alter_table_before_create_table_no_lock'
--source include/wait_condition.inc
-# This transition is currently not allowed
---error ER_CANNOT_USER
-SET GLOBAL wsrep_desync=1;
-SET GLOBAL wsrep_desync=0;
+# wsrep_desync=1 will block
+--send SET GLOBAL wsrep_desync=1;
+
+
+--connection node_1b
+--sleep 2
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO = 'SET GLOBAL wsrep_desync=1'
+--source include/wait_condition.inc
SET DEBUG_SYNC= 'now SIGNAL continue';
--connection node_1
--reap
+--connection node_1a
+--reap
+SET GLOBAL wsrep_desync=0;
+
SHOW CREATE TABLE t1;
# Restore old state
@@ -74,5 +84,3 @@ CALL mtr.add_suppression("desync failed");
--connection node_2
CALL mtr.add_suppression("Protocol violation");
-
-
diff --git a/mysql-test/suite/galera/t/galera_split_brain.test b/mysql-test/suite/galera/t/galera_split_brain.test
index e0298e55422..22f6370241c 100644
--- a/mysql-test/suite/galera/t/galera_split_brain.test
+++ b/mysql-test/suite/galera/t/galera_split_brain.test
@@ -6,17 +6,16 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
+
call mtr.add_suppression("WSREP: TO isolation failed for: ");
--connection node_1
--let $wsrep_cluster_address_orig = `SELECT @@wsrep_cluster_address`
-# Save original auto_increment_offset values.
---connection node_1
-let $auto_increment_offset_node_1 = `SELECT @@global.auto_increment_offset`;
---connection node_2
-let $auto_increment_offset_node_2 = `SELECT @@global.auto_increment_offset`;
-
--connection node_2
--source include/kill_galera.inc
@@ -44,10 +43,8 @@ SET GLOBAL wsrep_cluster_address = '';
--source include/wait_until_connected_again.inc
# Restore original auto_increment_offset values.
---disable_query_log
---connection node_1
---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_1;
---connection node_2a
---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_2;
---enable_query_log
+--let $node_2=node_2a
+--source include/auto_increment_offset_restore.inc
+
+--source include/galera_end.inc
diff --git a/mysql-test/suite/galera/t/galera_ssl_upgrade.test b/mysql-test/suite/galera/t/galera_ssl_upgrade.test
index 07aac0fbe92..a424942da30 100644
--- a/mysql-test/suite/galera/t/galera_ssl_upgrade.test
+++ b/mysql-test/suite/galera/t/galera_ssl_upgrade.test
@@ -18,7 +18,8 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N
--source include/start_mysqld.inc
--source include/wait_until_connected_again.inc
-SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
+--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
+--source include/wait_condition.inc
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
# 3. Restart node #2 with the new socket.ssl_ca , socket.ssl_cert and socket.ssl_key
@@ -29,7 +30,8 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N
--source include/start_mysqld.inc
--source include/wait_until_connected_again.inc
-SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
+--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
+--source include/wait_condition.inc
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
# 4. Restart node #1 with the new socket.ssl_ca , socket.ssl_cert and socket.ssl_key
@@ -40,7 +42,8 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N
--source include/start_mysqld.inc
--source include/wait_until_connected_again.inc
-SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
+--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
+--source include/wait_condition.inc
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
# Upgrade complete. Both nodes now use the new key and certificate
diff --git a/mysql-test/suite/galera/t/galera_suspend_slave.test b/mysql-test/suite/galera/t/galera_suspend_slave.test
index b4302f7d195..353a7c38a73 100644
--- a/mysql-test/suite/galera/t/galera_suspend_slave.test
+++ b/mysql-test/suite/galera/t/galera_suspend_slave.test
@@ -8,10 +8,9 @@
--source include/have_innodb.inc
# Save original auto_increment_offset values.
---connection node_1
-let $auto_increment_offset_node_1 = `SELECT @@global.auto_increment_offset`;
---connection node_2
-let $auto_increment_offset_node_2 = `SELECT @@global.auto_increment_offset`;
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
--connection node_1
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
@@ -56,11 +55,7 @@ SELECT COUNT(*) = 1 FROM t1;
DROP TABLE t1;
---disable_query_log
# Restore original auto_increment_offset values.
---connection node_1
---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_1;
---connection node_2a
---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_2;
---enable_query_log
+--let $node_2=node_2a
+--source include/auto_increment_offset_restore.inc
diff --git a/mysql-test/suite/galera/t/galera_transaction_replay.test b/mysql-test/suite/galera/t/galera_transaction_replay.test
index bd5288a51c6..29870829ba3 100644
--- a/mysql-test/suite/galera/t/galera_transaction_replay.test
+++ b/mysql-test/suite/galera/t/galera_transaction_replay.test
@@ -40,7 +40,7 @@ UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
# Wait for both transactions to be blocked
--connection node_1a
---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'System lock';
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Update_rows_log_event::find_row%';
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'init' AND INFO = 'COMMIT';
@@ -69,3 +69,56 @@ SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
DROP TABLE t1;
+
+#echo "# test for PS replaying"
+
+#
+# test replaying of prepared statements
+#
+--connection node_1
+CREATE TABLE t1 (i int primary key, j int) ENGINE=INNODB;
+INSERT INTO t1 VALUES (1, 0), (3, 0);
+SELECT * FROM t1;
+
+PREPARE stmt1 FROM "UPDATE t1 SET j = 1 where i > 0";
+
+# block the commit of PS
+--connection node_1a
+--let $galera_sync_point = commit_monitor_enter_sync
+--source include/galera_set_sync_point.inc
+
+--connection node_1
+--send EXECUTE stmt1;
+
+# Wait until commit is blocked
+--connection node_1a
+SET SESSION wsrep_sync_wait = 0;
+--source include/galera_wait_sync_point.inc
+
+# Issue a conflicting update on node_2
+--connection node_2
+#UPDATE t1 SET j=2;
+INSERT INTO t1 VALUES(2,2);
+
+
+# Wait until applying begins in node_1
+--connection node_1a
+--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'Write_rows_log_event::write_row%';
+--source include/wait_condition.inc
+
+# Unblock the PS commit
+--connection node_1a
+--source include/galera_clear_sync_point.inc
+--source include/galera_signal_sync_point.inc
+
+# Commit succeeds
+--connection node_1
+--reap
+SELECT * FROM t1;
+
+--connection node_2
+SELECT * FROM t1;
+
+--connection node_1
+DEALLOCATE PREPARE stmt1;
+DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_var_desync_on.test b/mysql-test/suite/galera/t/galera_var_desync_on.test
index fb0fb9f762a..06c5d30a769 100644
--- a/mysql-test/suite/galera/t/galera_var_desync_on.test
+++ b/mysql-test/suite/galera/t/galera_var_desync_on.test
@@ -55,4 +55,8 @@ INSERT INTO t1 VALUES (11);
# Replication continues normally
SELECT COUNT(*) = 11 FROM t1;
+CALL mtr.add_suppression("Protocol violation");
DROP TABLE t1;
+
+--connection node_1
+CALL mtr.add_suppression("Protocol violation");
diff --git a/mysql-test/suite/galera/t/galera_var_dirty_reads.test b/mysql-test/suite/galera/t/galera_var_dirty_reads.test
index 9eea8efdaf3..dfd8d5ecf29 100644
--- a/mysql-test/suite/galera/t/galera_var_dirty_reads.test
+++ b/mysql-test/suite/galera/t/galera_var_dirty_reads.test
@@ -5,13 +5,10 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
---disable_query_log
# Save original auto_increment_offset values.
---connection node_1
-let $auto_increment_offset_node_1 = `SELECT @@global.auto_increment_offset`;
---connection node_2
-let $auto_increment_offset_node_2 = `SELECT @@global.auto_increment_offset`;
---enable_query_log
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
--connection node_2
--let $wsrep_cluster_address_saved = `SELECT @@global.wsrep_cluster_address`
@@ -49,13 +46,8 @@ SELECT * FROM t1;
# Cleanup
DROP TABLE t1;
---disable_query_log
# Restore original auto_increment_offset values.
---connection node_1
---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_1;
---connection node_2
---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_2;
---enable_query_log
+--source include/auto_increment_offset_restore.inc
--source include/galera_end.inc
--echo # End of test
diff --git a/mysql-test/suite/galera/t/galera_var_max_ws_rows.test b/mysql-test/suite/galera/t/galera_var_max_ws_rows.test
new file mode 100644
index 00000000000..944238bf1aa
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_var_max_ws_rows.test
@@ -0,0 +1,155 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
+INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
+
+CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
+
+--let $wsrep_max_ws_rows_orig = `SELECT @@wsrep_max_ws_rows`
+SET GLOBAL wsrep_max_ws_rows = 4;
+
+# Test that wsrep_max_ws_rows is enforced with multi statement transactions
+
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (2);
+INSERT INTO t1 (f2) VALUES (3);
+INSERT INTO t1 (f2) VALUES (4);
+--error ER_ERROR_DURING_COMMIT
+INSERT INTO t1 (f2) VALUES (5);
+COMMIT;
+SELECT COUNT(*) = 0 FROM t1;
+
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (2);
+INSERT INTO t1 (f2) VALUES (3);
+INSERT INTO t1 (f2) VALUES (4);
+--error ER_ERROR_DURING_COMMIT
+UPDATE t1 SET f2 = 10 WHERE f2 = 4;
+COMMIT;
+SELECT COUNT(*) = 0 FROM t1;
+
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (2);
+INSERT INTO t1 (f2) VALUES (3);
+INSERT INTO t1 (f2) VALUES (4);
+--error ER_ERROR_DURING_COMMIT
+DELETE FROM t1 WHERE f2 = 1;
+COMMIT;
+SELECT COUNT(*) = 0 FROM t1;
+
+
+# Test that wsrep_max_ws_rows is enforced on sigle statements
+
+SET GLOBAL wsrep_max_ws_rows = 5;
+INSERT INTO t1 (f2) VALUES (1),(2),(3),(4),(5);
+SET GLOBAL wsrep_max_ws_rows = 4;
+
+--error ER_ERROR_DURING_COMMIT
+UPDATE t1 SET f2 = f2 + 10;
+SELECT COUNT(*) = 5 FROM t1;
+
+--error ER_ERROR_DURING_COMMIT
+DELETE FROM t1 WHERE f2 < 10;
+SELECT COUNT(*) = 5 FROM t1;
+
+--error ER_ERROR_DURING_COMMIT
+INSERT INTO t1 (f2) SELECT * FROM ten;
+SELECT COUNT(*) = 5 FROM t1;
+
+--error ER_ERROR_DURING_COMMIT
+INSERT INTO t1 (f2) VALUES (10),(20),(30),(40),(50);
+SELECT COUNT(*) = 5 FROM t1;
+
+# Fewer than wsrep_max_ws_rows is OK
+
+SET GLOBAL wsrep_max_ws_rows = 10;
+DELETE FROM t1 WHERE f2 < 10;
+SELECT COUNT(*) = 0 FROM t1;
+
+# Test a series of transactions
+
+--disable_query_log
+SET GLOBAL wsrep_max_ws_rows = 5;
+let $i= 100;
+while ($i)
+{
+ START TRANSACTION;
+ --eval INSERT INTO t1 (f2) VALUES ($i);
+ COMMIT;
+ dec $i;
+}
+--enable_query_log
+SET GLOBAL wsrep_max_ws_rows = 100;
+SELECT COUNT(*) = 100 FROM t1;
+DELETE FROM t1 WHERE f2 < 101;
+SELECT COUNT(*) = 0 FROM t1;
+
+# Test large statements
+
+SET GLOBAL wsrep_max_ws_rows = 9999;
+--error ER_ERROR_DURING_COMMIT
+INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+SET GLOBAL wsrep_max_ws_rows = 10000;
+INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
+
+SET GLOBAL wsrep_max_ws_rows = 9999;
+--error ER_ERROR_DURING_COMMIT
+UPDATE t1 SET f2 = 2 WHERE f2 = 1;
+SET GLOBAL wsrep_max_ws_rows = 10000;
+UPDATE t1 SET f2 = 2 WHERE f2 = 1;
+
+SET GLOBAL wsrep_max_ws_rows = 9999;
+--error ER_ERROR_DURING_COMMIT
+DELETE FROM t1 WHERE f2 = 2;
+SET GLOBAL wsrep_max_ws_rows = 10000;
+DELETE FROM t1 WHERE f2 = 2;
+
+SELECT COUNT(*) = 0 FROM t1;
+
+
+# Test that wsrep_max_ws_rows is reset when switching autocommit mode
+
+SET AUTOCOMMIT = ON;
+SET GLOBAL wsrep_max_ws_rows = 1;
+
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+--error ER_ERROR_DURING_COMMIT
+INSERT INTO t1 (f2) VALUES (2);
+
+INSERT INTO t1 (f2) VALUES (1);
+INSERT INTO t1 (f2) VALUES (2);
+
+
+SET AUTOCOMMIT = OFF;
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+--error ER_ERROR_DURING_COMMIT
+INSERT INTO t1 (f2) VALUES (2);
+
+INSERT INTO t1 (f2) VALUES (1);
+--error ER_ERROR_DURING_COMMIT
+INSERT INTO t1 (f2) VALUES (2);
+
+
+# Test that wsrep_max_ws_rows is reset on implicit commits
+
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+
+START TRANSACTION;
+INSERT INTO t1 (f2) VALUES (1);
+--error ER_ERROR_DURING_COMMIT
+INSERT INTO t1 (f2) VALUES (2);
+
+
+--disable_query_log
+--eval SET GLOBAL wsrep_max_ws_rows = $wsrep_max_ws_rows_orig
+--enable_query_log
+
+DROP TABLE t1;
+DROP TABLE ten;
diff --git a/mysql-test/suite/galera/t/galera_var_max_ws_size.test b/mysql-test/suite/galera/t/galera_var_max_ws_size.test
index b66ef2d5ee2..8eb93bda9be 100644
--- a/mysql-test/suite/galera/t/galera_var_max_ws_size.test
+++ b/mysql-test/suite/galera/t/galera_var_max_ws_size.test
@@ -16,6 +16,29 @@ SET GLOBAL wsrep_max_ws_size = 1024;
INSERT INTO t1 VALUES (DEFAULT, REPEAT('X', 1024));
SELECT COUNT(*) = 0 FROM t1;
+#
+# Changing repl.max_ws_size also changes wsrep_max_ws_size
+#
+
+SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=10000';
+SELECT @@wsrep_max_ws_size = 10000;
+
+
+#
+# Changing wsrep_max_ws_size is equivalent to changing repl.max_ws_size
+#
+
+SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=20000';
+--let $provider_options = `SELECT @@wsrep_provider_options`
+SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=10000';
+
+SET GLOBAL wsrep_max_ws_size = 20000;
+--let $provider_options_updated = `SELECT @@wsrep_provider_options`
+
+--disable_query_log
+--eval SELECT STRCMP('$provider_options', '$provider_options_updated') = 0 AS provider_options_match
+--enable_query_log
+
--disable_query_log
--eval SET GLOBAL wsrep_max_ws_size = $wsrep_max_ws_size_orig
--enable_query_log
diff --git a/mysql-test/suite/galera/t/galera_var_sst_auth.opt b/mysql-test/suite/galera/t/galera_var_sst_auth.opt
new file mode 100644
index 00000000000..67babbb1ae7
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_var_sst_auth.opt
@@ -0,0 +1 @@
+--wsrep_sst_auth=root:
diff --git a/mysql-test/suite/galera/t/galera_var_sst_auth.test b/mysql-test/suite/galera/t/galera_var_sst_auth.test
new file mode 100644
index 00000000000..5c9b3f5a61e
--- /dev/null
+++ b/mysql-test/suite/galera/t/galera_var_sst_auth.test
@@ -0,0 +1,12 @@
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--echo #
+--echo # MDEV-10492: Assertion failure on shutdown when wsrep_sst_auth set in config
+--echo #
+
+SELECT @@global.wsrep_sst_auth;
+SET @@global.wsrep_sst_auth='foo:bar';
+SELECT @@global.wsrep_sst_auth;
+
+--source include/galera_end.inc
diff --git a/mysql-test/suite/galera/t/mdev_10518.cnf b/mysql-test/suite/galera/t/mdev_10518.cnf
new file mode 100644
index 00000000000..482334c2f8a
--- /dev/null
+++ b/mysql-test/suite/galera/t/mdev_10518.cnf
@@ -0,0 +1,17 @@
+!include ../galera_2nodes.cnf
+
+[mysqld]
+log-bin
+log-slave-updates
+
+[mysqld.1]
+gtid_domain_id=1
+wsrep_gtid_mode=ON
+# Maximum allowed wsrep_gtid_domain_id.
+wsrep_gtid_domain_id=4294967295
+
+[mysqld.2]
+gtid_domain_id=2
+wsrep_gtid_mode=ON
+#wsrep_gitd_domain_id value will be inherited from donor node (mysqld.1)
+#wsrep_gitd_domain_id=X
diff --git a/mysql-test/suite/galera/t/mdev_10518.test b/mysql-test/suite/galera/t/mdev_10518.test
new file mode 100644
index 00000000000..c4127b4f655
--- /dev/null
+++ b/mysql-test/suite/galera/t/mdev_10518.test
@@ -0,0 +1,53 @@
+# Test for @@wsrep_gtid_mode and @@wsrep_gtid_domain_id variables
+#
+# When @@wsrep_gtid_mode=ON, all DDL/DML commands and transactions that
+# are meant to be replicated over Galera cluster nodes are tagged with
+# galera gtid_domain_id (@@wsrep_gtid_domain_id), while others are tagged
+# with the local domain_id (@@gtid_domain_id).
+
+--source include/galera_cluster.inc
+--source include/have_innodb.inc
+
+--echo # On node_1
+--connection node_1
+# print initial GTIDs
+source include/print_gtid.inc;
+
+--echo # On node_2
+--connection node_2
+# print initial GTIDs
+source include/print_gtid.inc;
+
+--echo # On node_1
+--connection node_1
+CREATE TABLE t1(i INT) ENGINE=INNODB;
+CREATE TABLE t2(i INT) ENGINE=MEMORY;
+INSERT INTO t1 VALUES(1);
+SELECT * FROM t1;
+SELECT * FROM t2;
+source include/print_gtid.inc;
+
+--echo # On node_2
+--connection node_2
+SELECT * FROM t1;
+source include/print_gtid.inc;
+
+--echo # On node_1
+--connection node_1
+INSERT INTO t2 VALUES(1);
+SELECT * FROM t2;
+source include/print_gtid.inc;
+
+--echo # On node_2
+--connection node_2
+SELECT * FROM t2;
+source include/print_gtid.inc;
+
+--echo # On node_1
+--connection node_1
+# Cleanup
+DROP TABLE t1, t2;
+
+--source include/galera_end.inc
+--echo # End of test
+
diff --git a/mysql-test/suite/galera/t/mysql-wsrep#31.test b/mysql-test/suite/galera/t/mysql-wsrep#31.test
index eaace5d50dd..c669d4834ba 100644
--- a/mysql-test/suite/galera/t/mysql-wsrep#31.test
+++ b/mysql-test/suite/galera/t/mysql-wsrep#31.test
@@ -1,6 +1,11 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
+# Save original auto_increment_offset values.
+--let $node_1=node_1
+--let $node_2=node_2
+--source include/auto_increment_offset_save.inc
+
--connection node_1
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
@@ -36,4 +41,13 @@ if ($galera_wsrep_start_position != $expected_position)
DROP TABLE t1;
DROP DATABASE db;
+--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
+--source include/wait_until_connected_again.inc
+
+# Restore original auto_increment_offset values.
+--let $node_2=node_2a
+--source include/auto_increment_offset_restore.inc
+
+--source include/galera_end.inc
+
diff --git a/mysql-test/suite/galera_3nodes/galera_3nodes.cnf b/mysql-test/suite/galera_3nodes/galera_3nodes.cnf
index 2a06c1cd5a9..eaa2899968c 100644
--- a/mysql-test/suite/galera_3nodes/galera_3nodes.cnf
+++ b/mysql-test/suite/galera_3nodes/galera_3nodes.cnf
@@ -18,7 +18,7 @@ wsrep-sync-wait=7
#ist_port=@OPT.port
#sst_port=@OPT.port
wsrep-cluster-address=gcomm://
-wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M'
+wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M;evs.suspect_timeout=PT10S'
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
@@ -27,7 +27,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
#ist_port=@OPT.port
#sst_port=@OPT.port
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_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M;evs.suspect_timeout=PT10S'
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
@@ -36,7 +36,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
#ist_port=@OPT.port
#sst_port=@OPT.port
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_provider_options='base_port=@mysqld.3.#galera_port;gcache.size=10M;evs.suspect_timeout=PT10S'
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
diff --git a/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result b/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result
index f5a4cad4a23..69995acb982 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result
@@ -3,9 +3,6 @@ SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
SET SESSION wsrep_sync_wait = 0;
-SHOW STATUS LIKE 'wsrep_cluster_status';
-Variable_name Value
-wsrep_cluster_status non-Primary
SET GLOBAL wsrep_provider_options = 'pc.bootstrap=1';
SHOW STATUS LIKE 'wsrep_cluster_size';
Variable_name Value
diff --git a/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result b/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result
index 85f923ad55e..6fb931638ef 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result
@@ -1,6 +1,8 @@
SET GLOBAL wsrep_provider_options = 'pc.weight=3';
Suspending node ...
SET SESSION wsrep_sync_wait=0;
+SET SESSION wsrep_on=OFF;
+SET SESSION wsrep_on=ON;
SHOW STATUS LIKE 'wsrep_cluster_size';
Variable_name Value
wsrep_cluster_size 2
diff --git a/mysql-test/suite/galera_3nodes/t/galera_certification_ccc.test b/mysql-test/suite/galera_3nodes/t/galera_certification_ccc.test
index e19169a350c..b4fe10bff0d 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_certification_ccc.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_certification_ccc.test
@@ -10,12 +10,10 @@
--source include/galera_connect.inc
# Save original auto_increment_offset values.
---connection node_1
-let $auto_increment_offset_node_1 = `SELECT @@global.auto_increment_offset`;
---connection node_2
-let $auto_increment_offset_node_2 = `SELECT @@global.auto_increment_offset`;
---connection node_3
-let $auto_increment_offset_node_3 = `SELECT @@global.auto_increment_offset`;
+--let $node_1=node_1
+--let $node_2=node_2
+--let $node_3=node_3
+--source ../galera/include/auto_increment_offset_save.inc
--connection node_1
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
@@ -49,12 +47,7 @@ SELECT COUNT(*) = 2 FROM t1;
DROP TABLE t1;
# Restore original auto_increment_offset values.
---disable_query_log
---connection node_1
---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_1;
---connection node_2
---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_2;
---connection node_3
---eval SET @@global.auto_increment_offset = $auto_increment_offset_node_3;
---enable_query_log
+--source ../galera/include/auto_increment_offset_restore.inc
+
+--source include/galera_end.inc
diff --git a/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test b/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test
index af4a5fbf9d6..a6660bd08d1 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_innobackupex_backup.test
@@ -13,8 +13,8 @@ INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
SELECT COUNT(*) = 10 FROM t1;
--exec rm -rf $MYSQL_TMP_DIR/innobackupex_backup
---exec innobackupex $MYSQL_TMP_DIR/innobackupex_backup --galera-info --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 --port=$NODE_MYPORT_2 --host=127.0.0.1 --no-timestamp > $MYSQL_TMP_DIR/innobackupex-backup.log
---exec innobackupex $MYSQL_TMP_DIR/innobackupex_backup --apply-log --galera-info --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 --port=$NODE_MYPORT_2 --host=127.0.0.1 --no-timestamp > $MYSQL_TMP_DIR/innobackupex-apply.log
+--exec innobackupex --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 $MYSQL_TMP_DIR/innobackupex_backup --galera-info --port=$NODE_MYPORT_2 --host=127.0.0.1 --no-timestamp > $MYSQL_TMP_DIR/innobackupex-backup.log
+--exec innobackupex --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 $MYSQL_TMP_DIR/innobackupex_backup --apply-log --galera-info --port=$NODE_MYPORT_2 --host=127.0.0.1 --no-timestamp > $MYSQL_TMP_DIR/innobackupex-apply.log
--source include/kill_galera.inc
--sleep 1
@@ -23,7 +23,7 @@ SELECT COUNT(*) = 10 FROM t1;
INSERT INTO t1 VALUES (11),(12),(13),(14),(15),(16),(17),(18),(19),(20);
--exec rm -rf $MYSQLTEST_VARDIR/mysqld.2/data/*
---exec innobackupex --copy-back $MYSQL_TMP_DIR/innobackupex_backup --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 --port=$NODE_MYPORT_2 --host=127.0.0.1 > $MYSQL_TMP_DIR/innobackupex-restore.log
+--exec innobackupex --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group=mysqld.2 --copy-back $MYSQL_TMP_DIR/innobackupex_backup --port=$NODE_MYPORT_2 --host=127.0.0.1 > $MYSQL_TMP_DIR/innobackupex-restore.log
#
# Convert the xtrabackup_galera_info into a grastate.dat file
diff --git a/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test b/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test
index 7d8bbb39e35..8575d99f066 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_ist_gcache_rollover.test
@@ -82,6 +82,8 @@ INSERT INTO t1 VALUES (51), (52), (53), (54), (55);
--connection node_3
--source include/wait_until_connected_again.inc
+sleep 5;
+
# Final checks
--connection node_2
SELECT COUNT(*) = 30 FROM t1;
diff --git a/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.cnf b/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.cnf
new file mode 100644
index 00000000000..d560b675427
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.cnf
@@ -0,0 +1,5 @@
+# We need a dedicated .cnf file, even if empty, in order to force this test to run
+# alone on a freshly started cluster. Otherwise there are adverse interactions with
+# prior tests such as galera_3nodes.galera_innobackupex_backup
+
+!include ../galera_3nodes.cnf
diff --git a/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test b/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test
index 6172ffcc743..f8381a3324b 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test
@@ -23,7 +23,8 @@ SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
# Node #2 should be non-primary
SET SESSION wsrep_sync_wait = 0;
-SHOW STATUS LIKE 'wsrep_cluster_status';
+--let $wait_condition = SELECT variable_value = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE variable_name = 'wsrep_cluster_status';
+--source include/wait_condition.inc
# Signal node #2 to bootstrap
--connection node_2
diff --git a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf
new file mode 100644
index 00000000000..57026ce6928
--- /dev/null
+++ b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.cnf
@@ -0,0 +1,5 @@
+# We need a dedicated .cnf file, even if empty, in order to force this test to run
+# alone on a freshly started cluster. Otherwise there are adverse interactions with
+# following tests such as galera_3nodes.galera_var_dirty_reads2
+
+!include ../galera_3nodes.cnf
diff --git a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test
index 6585f1934a4..c118b7481bc 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test
@@ -19,6 +19,11 @@ SET GLOBAL wsrep_provider_options = 'pc.weight=3';
SET SESSION wsrep_sync_wait=0;
--source include/wait_until_connected_again.inc
+SET SESSION wsrep_on=OFF;
+--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;
+
# We can not use SELECT queries here, as only SHOW is allowed to run.
# For nodes #2 and #3, we expect a non-primary component of size 2
@@ -45,7 +50,7 @@ SHOW STATUS LIKE 'wsrep_local_state_comment';
--connection node_1
--source include/galera_resume.inc
---sleep 5
+--sleep 10
--source include/wait_until_connected_again.inc
# For Node #1, we expect a primary component of size 1
diff --git a/mysql-test/suite/innodb/r/innodb-alter-table.result b/mysql-test/suite/innodb/r/innodb-alter-table.result
index 514b8b7935f..6045b6d70a0 100644
--- a/mysql-test/suite/innodb/r/innodb-alter-table.result
+++ b/mysql-test/suite/innodb/r/innodb-alter-table.result
@@ -72,7 +72,7 @@ Level Code Message
SHOW CREATE TABLE `w_findispmon05u`;
Table Create Table
w_findispmon05u CREATE TABLE `w_findispmon05u` (
- `f5atpkey` int(11) NOT NULL DEFAULT '0',
+ `f5atpkey` int(11) NOT NULL DEFAULT 0,
`f5atzo05` int(11) DEFAULT NULL,
`pos` bigint(21) DEFAULT NULL,
`f5BnvB` int(9) DEFAULT NULL,
@@ -135,3 +135,53 @@ child CREATE TABLE `child` (
CONSTRAINT `child_ibfk_1` FOREIGN KEY (`c`) REFERENCES `parent` (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE child, parent;
+CREATE TABLE IF NOT EXISTS ticket (
+id INT UNSIGNED NOT NULL AUTO_INCREMENT,
+mask VARCHAR(16) DEFAULT '' NOT NULL,
+subject VARCHAR(255) DEFAULT '' NOT NULL,
+is_closed TINYINT(1) UNSIGNED DEFAULT 0 NOT NULL,
+is_deleted TINYINT(1) UNSIGNED DEFAULT 0 NOT NULL,
+team_id INT UNSIGNED DEFAULT 0 NOT NULL,
+category_id INT UNSIGNED DEFAULT 0 NOT NULL,
+first_message_id INT UNSIGNED DEFAULT 0 NOT NULL,
+created_date INT UNSIGNED,
+updated_date INT UNSIGNED,
+due_date INT UNSIGNED,
+first_wrote_address_id INT UNSIGNED NOT NULL DEFAULT 0,
+last_wrote_address_id INT UNSIGNED NOT NULL DEFAULT 0,
+spam_score DECIMAL(4,4) NOT NULL DEFAULT 0,
+spam_training VARCHAR(1) NOT NULL DEFAULT '',
+interesting_words VARCHAR(255) NOT NULL DEFAULT '',
+next_action VARCHAR(255) NOT NULL DEFAULT '',
+PRIMARY KEY (id)
+) ENGINE=InnoDB;
+ALTER TABLE ticket
+CHANGE COLUMN team_id group_id INT UNSIGNED NOT NULL DEFAULT 0,
+CHANGE COLUMN category_id bucket_id INT UNSIGNED NOT NULL DEFAULT 0,
+ADD COLUMN org_id INT UNSIGNED NOT NULL DEFAULT 0,
+ADD INDEX org_id (org_id);
+SHOW CREATE TABLE ticket;
+Table Create Table
+ticket CREATE TABLE `ticket` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `mask` varchar(16) NOT NULL DEFAULT '',
+ `subject` varchar(255) NOT NULL DEFAULT '',
+ `is_closed` tinyint(1) unsigned NOT NULL DEFAULT 0,
+ `is_deleted` tinyint(1) unsigned NOT NULL DEFAULT 0,
+ `group_id` int(10) unsigned NOT NULL DEFAULT 0,
+ `bucket_id` int(10) unsigned NOT NULL DEFAULT 0,
+ `first_message_id` int(10) unsigned NOT NULL DEFAULT 0,
+ `created_date` int(10) unsigned DEFAULT NULL,
+ `updated_date` int(10) unsigned DEFAULT NULL,
+ `due_date` int(10) unsigned DEFAULT NULL,
+ `first_wrote_address_id` int(10) unsigned NOT NULL DEFAULT 0,
+ `last_wrote_address_id` int(10) unsigned NOT NULL DEFAULT 0,
+ `spam_score` decimal(4,4) NOT NULL DEFAULT 0.0000,
+ `spam_training` varchar(1) NOT NULL DEFAULT '',
+ `interesting_words` varchar(255) NOT NULL DEFAULT '',
+ `next_action` varchar(255) NOT NULL DEFAULT '',
+ `org_id` int(10) unsigned NOT NULL DEFAULT 0,
+ PRIMARY KEY (`id`),
+ KEY `org_id` (`org_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+DROP TABLE ticket;
diff --git a/mysql-test/suite/innodb/r/innodb-alter-tempfile.result b/mysql-test/suite/innodb/r/innodb-alter-tempfile.result
index ce13ad0978b..3cc973ca3a3 100644
--- a/mysql-test/suite/innodb/r/innodb-alter-tempfile.result
+++ b/mysql-test/suite/innodb/r/innodb-alter-tempfile.result
@@ -4,6 +4,10 @@
# Temporary tablename will be unique. This makes sure that future
# in-place ALTERs of the same table will not be blocked due to
# temporary tablename.
+call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed
+");
+call mtr.add_suppression("InnoDB: file read of space .* page .*");
+call mtr.add_suppression("InnoDB: Trying to recover it from the doublewrite buffer.");
# Crash the server in ha_innobase::commit_inplace_alter_table()
CREATE TABLE t1 (f1 INT NOT NULL, f2 INT NOT NULL) ENGINE=innodb;
SET debug='d,innodb_alter_commit_crash_before_commit';
diff --git a/mysql-test/suite/innodb/r/innodb-autoinc.result b/mysql-test/suite/innodb/r/innodb-autoinc.result
index ddca4685e05..52c5bb6157b 100644
--- a/mysql-test/suite/innodb/r/innodb-autoinc.result
+++ b/mysql-test/suite/innodb/r/innodb-autoinc.result
@@ -1304,7 +1304,7 @@ Warning 1264 Out of range value for column 'c1' at row 1
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` int(11) NOT NULL DEFAULT '0',
+ `c1` int(11) NOT NULL DEFAULT 0,
`c2` varchar(10) DEFAULT NULL,
PRIMARY KEY (`c1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
@@ -1316,7 +1316,7 @@ c1 c2
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` int(11) NOT NULL DEFAULT '0',
+ `c1` int(11) NOT NULL DEFAULT 0,
`c2` varchar(10) DEFAULT NULL,
PRIMARY KEY (`c1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
diff --git a/mysql-test/suite/innodb/r/innodb-fk-warnings.result b/mysql-test/suite/innodb/r/innodb-fk-warnings.result
index 6c203cca207..792cae85b55 100644
--- a/mysql-test/suite/innodb/r/innodb-fk-warnings.result
+++ b/mysql-test/suite/innodb/r/innodb-fk-warnings.result
@@ -70,6 +70,20 @@ Level Code Message
Warning 150 Alter table `mysqld.1`.`t1` with foreign key constraint failed. Referenced table `mysqld.1`.`t1` not found in the data dictionary close to foreign key(b) references t1(a).
Error 1005 Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
Warning 1215 Cannot add foreign key constraint
+create temporary table t2(a int, foreign key(a) references t1(a)) engine=innodb;
+ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
+show warnings;
+Level Code Message
+Warning 150 Create table `mysqld.1`.`t2` with foreign key constraint failed. Referenced table `mysqld.1`.`t1` not found in the data dictionary near 'foreign key(a) references t1(a)) engine=innodb'.
+Error 1005 Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
+Warning 1215 Cannot add foreign key constraint
+alter table t1 add foreign key(b) references t1(a);
+ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
+show warnings;
+Level Code Message
+Warning 150 Alter table `mysqld.1`.`t1` with foreign key constraint failed. Referenced table `mysqld.1`.`t1` not found in the data dictionary near 'foreign key(b) references t1(a)'.
+Error 1005 Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
+Warning 1215 Cannot add foreign key constraint
drop table t1;
create table t1(a int not null primary key, b int, key(b)) engine=innodb;
alter table t1 add foreign key(a,b) references t1(a);
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522,xtradb.rdiff-disabled b/mysql-test/suite/innodb/r/innodb-wl5522,xtradb.rdiff-disabled
new file mode 100644
index 00000000000..4aea0b451ec
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb-wl5522,xtradb.rdiff-disabled
@@ -0,0 +1,56 @@
+--- suite/innodb/r/innodb-wl5522.result
++++ suite/innodb/r/innodb-wl5522.reject
+@@ -580,7 +580,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 (Table flags don't match, server table has 0x5 and the meta-data file has 0x0)
++ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x1 and the meta-data file has 0x0)
+ unlink: t1.ibd
+ unlink: t1.cfg
+ DROP TABLE t1;
+@@ -592,7 +592,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 (Table flags don't match, server table has 0x5 and the meta-data file has 0x0)
++ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x21 and the meta-data file has 0x0)
+ unlink: t1.ibd
+ unlink: t1.cfg
+ DROP TABLE t1;
+@@ -766,7 +766,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 (Table flags don't match, server table has 0x5 and the meta-data file has 0x1)
++ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x0 and the meta-data file has 0x1)
+ unlink: t1.ibd
+ unlink: t1.cfg
+ DROP TABLE t1;
+@@ -778,7 +778,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 (Table flags don't match, server table has 0x5 and the meta-data file has 0x1)
++ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x21 and the meta-data file has 0x1)
+ unlink: t1.ibd
+ unlink: t1.cfg
+ DROP TABLE t1;
+@@ -955,7 +955,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 (Table flags don't match, server table has 0x5 and the meta-data file has 0x21)
++ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x1 and the meta-data file has 0x21)
+ unlink: t1.ibd
+ unlink: t1.cfg
+ DROP TABLE t1;
+@@ -967,7 +967,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 (Table flags don't match, server table has 0x5 and the meta-data file has 0x21)
++ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x0 and the meta-data file has 0x21)
+ unlink: t1.ibd
+ unlink: t1.cfg
+ DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innodb_ctype_big5.result b/mysql-test/suite/innodb/r/innodb_ctype_big5.result
new file mode 100644
index 00000000000..3ff2eed2b25
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb_ctype_big5.result
@@ -0,0 +1,285 @@
+SET STORAGE_ENGINE=InnoDB;
+#
+# Start of 10.2 tests
+#
+#
+# MDEV-9711 NO PAD Collatons
+#
+SET NAMES big5;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'big5_chinese_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE big5_chinese_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=InnoDB DEFAULT CHARSET=big5 COLLATE=big5_chinese_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'big5_chinese_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'big5_chinese_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'big5_chinese_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'big5_chinese_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'big5_chinese_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'big5_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'big5_chinese_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'big5_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'big5_chinese_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'big5_chinese_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'big5_chinese_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'big5_chinese_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'big5_chinese_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'big5_chinese_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'big5_chinese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'big5_chinese_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'big5_chinese_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'big5_chinese_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'big5_chinese_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'big5_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE big5_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=InnoDB DEFAULT CHARSET=big5 COLLATE=big5_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'big5_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'big5_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'big5_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'big5_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'big5_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'big5_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'big5_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'big5_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'big5_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'big5_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'big5_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'big5_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'big5_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'big5_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'big5_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'big5_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'big5_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'big5_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'big5_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+#
+# End of 10.2 tests
+#
diff --git a/mysql-test/suite/innodb/r/innodb_ctype_latin1.result b/mysql-test/suite/innodb/r/innodb_ctype_latin1.result
new file mode 100644
index 00000000000..5818964328f
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb_ctype_latin1.result
@@ -0,0 +1,285 @@
+SET STORAGE_ENGINE=InnoDB;
+#
+# Start of 10.2 tests
+#
+#
+# MDEV-9711 NO PAD Collatons
+#
+SET NAMES latin1;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'latin1_swedish_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE latin1_swedish_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'latin1_swedish_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin1_swedish_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'latin1_swedish_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+41000000000000000000
+41202000000000000000
+20410000000000000000
+20412000000000000000
+41202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'latin1_swedish_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'latin1_swedish_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'latin1_swedish_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'latin1_swedish_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'latin1_swedish_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'latin1_swedish_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'latin1_swedish_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'latin1_swedish_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'latin1_swedish_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'latin1_swedish_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin1_swedish_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin1_swedish_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin1_swedish_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'latin1_swedish_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin1_swedish_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin1_swedish_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'latin1_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE latin1_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'latin1_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin1_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'latin1_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+61000000000000000000
+61202000000000000000
+20610000000000000000
+20612000000000000000
+61202020000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'latin1_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'latin1_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'latin1_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'latin1_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'latin1_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'latin1_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'latin1_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'latin1_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'latin1_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'latin1_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'latin1_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin1_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin1_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'latin1_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin1_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'latin1_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+#
+# End of 10.2 tests
+#
diff --git a/mysql-test/suite/innodb/r/innodb_ctype_ldml.result b/mysql-test/suite/innodb/r/innodb_ctype_ldml.result
index fefadb2ecb0..a4ee090020d 100644
--- a/mysql-test/suite/innodb/r/innodb_ctype_ldml.result
+++ b/mysql-test/suite/innodb/r/innodb_ctype_ldml.result
@@ -5,7 +5,7 @@ with all Unicode character sets
set names utf8;
show variables like 'character_sets_dir%';
Variable_name Value
-character_sets_dir MYSQL_TEST_DIR/std_data/
+character_sets_dir MYSQL_TEST_DIR/std_data/ldml/
show collation like 'utf8_phone_ci';
Collation Charset Id Default Compiled Sortlen
utf8_phone_ci utf8 352 8
@@ -390,10 +390,20 @@ select "foo" = "foo " collate latin1_test;
The following tests check that two-byte collation IDs work
select * from information_schema.collations where id>256 and is_compiled<>'Yes' order by id;
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
+ascii2_general_nopad_ci ascii2 318 1
+ascii2_bin2 ascii2 319 1
+ascii2_general_ci ascii2 320 Yes 1
+ascii2_bin ascii2 321 1
+ascii2_general_inherited_ci ascii2 322 1
+ascii2_general_inherited2_ci ascii2 323 1
+ascii2_badly_inherited_ci ascii2 324 1
+ascii2_nopad_bin ascii2 325 1
utf8mb4_test_ci utf8mb4 326 8
utf16_test_ci utf16 327 8
utf8mb4_test_400_ci utf8mb4 328 8
latin1_test2 latin1 332 1
+latin1_test2_cs latin1 333 1
+latin1_swedish_nopad2_ci latin1 334 1
utf8_bengali_standard_ci utf8 336 8
utf8_bengali_traditional_ci utf8 337 8
utf8_implicit_weights_ci utf8 338 8
@@ -414,6 +424,7 @@ show collation like '%test%';
Collation Charset Id Default Compiled Sortlen
latin1_test latin1 99 Yes 1
latin1_test2 latin1 332 1
+latin1_test2_cs latin1 333 1
utf8_test_ci utf8 353 8
ucs2_test_ci ucs2 358 8
utf8mb4_test_ci utf8mb4 326 8
diff --git a/mysql-test/suite/innodb/r/innodb_ctype_utf8.result b/mysql-test/suite/innodb/r/innodb_ctype_utf8.result
new file mode 100644
index 00000000000..360a4192ee7
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb_ctype_utf8.result
@@ -0,0 +1,285 @@
+SET STORAGE_ENGINE=InnoDB;
+#
+# Start of 10.2 tests
+#
+#
+# MDEV-9711 NO PAD Collatons
+#
+SET NAMES utf8;
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'utf8_general_nopad_ci';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE utf8_general_nopad_ci NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_nopad_ci
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'utf8_general_nopad_ci';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf8_general_nopad_ci';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'utf8_general_nopad_ci';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+0041000000000000000000000000000000000000
+0041002000200000000000000000000000000000
+0020004100000000000000000000000000000000
+0020004100200000000000000000000000000000
+0041002000200020000000000000000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'utf8_general_nopad_ci' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'utf8_general_nopad_ci' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'utf8_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'utf8_general_nopad_ci' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'utf8_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'utf8_general_nopad_ci' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'utf8_general_nopad_ci', 'abc '));
+HEX(LEAST('abc ' COLLATE 'utf8_general_nopad_ci', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'utf8_general_nopad_ci', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'utf8_general_nopad_ci', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf8_general_ci';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8_general_nopad_ci';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'utf8_general_nopad_ci';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8_general_ci';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8_general_nopad_ci';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+#
+# Start of ctype_pad.inc
+#
+#
+# Unique indexes
+#
+CREATE TABLE t1 (a VARCHAR(10) PRIMARY KEY) COLLATE 'utf8_nopad_bin';
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varchar(10) COLLATE utf8_nopad_bin NOT NULL,
+ PRIMARY KEY (`a`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_nopad_bin
+INSERT INTO t1 VALUES ('abc'),('abc '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM t1 ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a;
+HEX(a) a
+2061 a
+206120 a
+61202020 a
+616263 abc
+6162632020 abc
+SELECT HEX(a), a FROM t1 IGNORE INDEX(PRIMARY) ORDER BY a DESC;
+HEX(a) a
+6162632020 abc
+616263 abc
+61202020 a
+206120 a
+2061 a
+#
+# UNION
+#
+CREATE TABLE t2 (a VARCHAR(10)) COLLATE 'utf8_nopad_bin';
+INSERT INTO t2 VALUES ('abc '),('abc '),(' a'),('a ');
+SELECT HEX(a),a FROM (SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+6120 a
+61202020 a
+616263 abc
+61626320 abc
+6162632020 abc
+DROP TABLE t1;
+DROP TABLE t2;
+#
+# DISTINCT, COUNT, MAX
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf8_nopad_bin';
+INSERT INTO t1 VALUES ('a'),('a '),(' a'),(' a '),('a ');
+SELECT HEX(a), a FROM (SELECT DISTINCT a FROM t1 ORDER BY a) td;
+HEX(a) a
+2061 a
+206120 a
+61 a
+612020 a
+61202020 a
+SELECT COUNT(DISTINCT a) FROM t1 ORDER BY a;
+COUNT(DISTINCT a)
+5
+SELECT HEX(MAX(a)), MAX(a) FROM t1;
+HEX(MAX(a)) MAX(a)
+61202020 a
+#
+# GROUP BY
+#
+CREATE TABLE t2 (a VARCHAR(10), b int, c varchar(10)) COLLATE 'utf8_nopad_bin';
+INSERT t2 values('ab', 12, 'cd'), ('ab', 2, 'ed'), ('aa', 20, 'er'), ('aa ', 0, 'er ');
+SELECT HEX(a), cnt FROM (SELECT a, COUNT(a) AS cnt FROM t2 GROUP BY a ORDER BY a) AS td;
+HEX(a) cnt
+6161 1
+61612020 1
+6162 2
+DROP TABLE t2;
+#
+# Weights
+#
+SELECT HEX(WEIGHT_STRING(a AS CHAR(10))) FROM t1;
+HEX(WEIGHT_STRING(a AS CHAR(10)))
+0061000000000000000000000000000000000000
+0061002000200000000000000000000000000000
+0020006100000000000000000000000000000000
+0020006100200000000000000000000000000000
+0061002000200020000000000000000000000000
+DROP TABLE t1;
+#
+# IF, CASE, LEAST
+#
+SELECT IF('abc' COLLATE 'utf8_nopad_bin' = 'abc ', 'pad', 'nopad');
+IF('abc' COLLATE 'utf8_nopad_bin' = 'abc ', 'pad', 'nopad')
+nopad
+SELECT CASE 'abc' COLLATE 'utf8_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE 'abc' COLLATE 'utf8_nopad_bin' WHEN 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT CASE WHEN 'abc' COLLATE 'utf8_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END;
+CASE WHEN 'abc' COLLATE 'utf8_nopad_bin' = 'abc ' THEN 'pad' ELSE 'nopad' END
+nopad
+SELECT HEX(LEAST('abc ' COLLATE 'utf8_nopad_bin', 'abc '));
+HEX(LEAST('abc ' COLLATE 'utf8_nopad_bin', 'abc '))
+61626320
+SELECT HEX(GREATEST('abc ' COLLATE 'utf8_nopad_bin', 'abc '));
+HEX(GREATEST('abc ' COLLATE 'utf8_nopad_bin', 'abc '))
+6162632020
+#
+# Collation mix
+#
+CREATE TABLE t1 (a VARCHAR(10)) COLLATE 'utf8_bin';
+INSERT INTO t1 VALUES ('a'),('a ');
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8_nopad_bin';
+COUNT(*)
+1
+ALTER TABLE t1 MODIFY a VARCHAR(10) COLLATE 'utf8_nopad_bin';
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+1
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8_bin';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE a='a' COLLATE 'utf8_nopad_bin';
+COUNT(*)
+1
+DROP TABLE t1;
+#
+# End of ctype_pad.inc
+#
+#
+# End of 10.2 tests
+#
diff --git a/mysql-test/suite/innodb/t/innodb-alter-table.test b/mysql-test/suite/innodb/t/innodb-alter-table.test
index 2ad9c8791cb..45342b4a218 100644
--- a/mysql-test/suite/innodb/t/innodb-alter-table.test
+++ b/mysql-test/suite/innodb/t/innodb-alter-table.test
@@ -138,3 +138,36 @@ SHOW CREATE TABLE child;
DROP TABLE child, parent;
+#
+# MDEV-10535: ALTER TABLE causes standalone/wsrep cluster crash
+#
+CREATE TABLE IF NOT EXISTS ticket (
+ id INT UNSIGNED NOT NULL AUTO_INCREMENT,
+ mask VARCHAR(16) DEFAULT '' NOT NULL,
+ subject VARCHAR(255) DEFAULT '' NOT NULL,
+ is_closed TINYINT(1) UNSIGNED DEFAULT 0 NOT NULL,
+ is_deleted TINYINT(1) UNSIGNED DEFAULT 0 NOT NULL,
+ team_id INT UNSIGNED DEFAULT 0 NOT NULL,
+ category_id INT UNSIGNED DEFAULT 0 NOT NULL,
+ first_message_id INT UNSIGNED DEFAULT 0 NOT NULL,
+ created_date INT UNSIGNED,
+ updated_date INT UNSIGNED,
+ due_date INT UNSIGNED,
+ first_wrote_address_id INT UNSIGNED NOT NULL DEFAULT 0,
+ last_wrote_address_id INT UNSIGNED NOT NULL DEFAULT 0,
+ spam_score DECIMAL(4,4) NOT NULL DEFAULT 0,
+ spam_training VARCHAR(1) NOT NULL DEFAULT '',
+ interesting_words VARCHAR(255) NOT NULL DEFAULT '',
+ next_action VARCHAR(255) NOT NULL DEFAULT '',
+ PRIMARY KEY (id)
+) ENGINE=InnoDB;
+
+ALTER TABLE ticket
+ CHANGE COLUMN team_id group_id INT UNSIGNED NOT NULL DEFAULT 0,
+ CHANGE COLUMN category_id bucket_id INT UNSIGNED NOT NULL DEFAULT 0,
+ ADD COLUMN org_id INT UNSIGNED NOT NULL DEFAULT 0,
+ ADD INDEX org_id (org_id);
+
+SHOW CREATE TABLE ticket;
+
+DROP TABLE ticket;
diff --git a/mysql-test/suite/innodb/t/innodb-alter-tempfile.test b/mysql-test/suite/innodb/t/innodb-alter-tempfile.test
index ec1ea35f1cf..e1e736fc678 100644
--- a/mysql-test/suite/innodb/t/innodb-alter-tempfile.test
+++ b/mysql-test/suite/innodb/t/innodb-alter-tempfile.test
@@ -20,6 +20,13 @@
--echo # in-place ALTERs of the same table will not be blocked due to
--echo # temporary tablename.
+# As we intentionally crash below, there could be partially written
+# pages that are then recovered from the doublewrite buffer
+call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed
+");
+call mtr.add_suppression("InnoDB: file read of space .* page .*");
+call mtr.add_suppression("InnoDB: Trying to recover it from the doublewrite buffer.");
+
let datadir= `select @@datadir`;
--let $_server_id= `SELECT @@server_id`
diff --git a/mysql-test/suite/innodb/t/innodb-fk-warnings.test b/mysql-test/suite/innodb/t/innodb-fk-warnings.test
index a95a7f55a40..f45ae00d788 100644
--- a/mysql-test/suite/innodb/t/innodb-fk-warnings.test
+++ b/mysql-test/suite/innodb/t/innodb-fk-warnings.test
@@ -87,16 +87,16 @@ create temporary table t1(a int not null primary key, b int, key(b)) engine=inno
--echo Warning 150 Alter table `mysqld.1`.`t1` with foreign key constraint failed. Referenced table `mysqld.1`.`t1` not found in the data dictionary close to foreign key(b) references t1(a).
--echo Error 1005 Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
--echo Warning 1215 Cannot add foreign key constraint
-#--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
-#--error 1005
-#create temporary table t2(a int, foreign key(a) references t1(a)) engine=innodb;
-#--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
-#show warnings;
-#--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
-#--error 1005
-#alter table t1 add foreign key(b) references t1(a);
-#--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
-#show warnings;
+--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
+--error 1005
+create temporary table t2(a int, foreign key(a) references t1(a)) engine=innodb;
+--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
+show warnings;
+--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
+--error 1005
+alter table t1 add foreign key(b) references t1(a);
+--replace_regex /#sql-[0-9a-f_]*`/#sql-temporary`/
+show warnings;
drop table t1;
#
diff --git a/mysql-test/suite/innodb/t/innodb_ctype_big5.test b/mysql-test/suite/innodb/t/innodb_ctype_big5.test
new file mode 100644
index 00000000000..684a97983e5
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_ctype_big5.test
@@ -0,0 +1,25 @@
+--source include/have_innodb.inc
+--source include/have_big5.inc
+
+SET STORAGE_ENGINE=InnoDB;
+
+--echo #
+--echo # Start of 10.2 tests
+--echo #
+
+--echo #
+--echo # MDEV-9711 NO PAD Collatons
+--echo #
+
+SET NAMES big5;
+let $coll='big5_chinese_nopad_ci';
+let $coll_pad='big5_chinese_ci';
+--source include/ctype_pad.inc
+
+let $coll='big5_nopad_bin';
+let $coll_pad='big5_bin';
+--source include/ctype_pad.inc
+
+--echo #
+--echo # End of 10.2 tests
+--echo #
diff --git a/mysql-test/suite/innodb/t/innodb_ctype_latin1.test b/mysql-test/suite/innodb/t/innodb_ctype_latin1.test
new file mode 100644
index 00000000000..0f88ae3212d
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_ctype_latin1.test
@@ -0,0 +1,25 @@
+--source include/have_innodb.inc
+
+SET STORAGE_ENGINE=InnoDB;
+
+--echo #
+--echo # Start of 10.2 tests
+--echo #
+
+--echo #
+--echo # MDEV-9711 NO PAD Collatons
+--echo #
+
+SET NAMES latin1;
+
+let $coll='latin1_swedish_nopad_ci';
+let $coll_pad='latin1_swedish_ci';
+--source include/ctype_pad.inc
+
+let $coll='latin1_nopad_bin';
+let $coll_pad='latin1_bin';
+--source include/ctype_pad.inc
+
+--echo #
+--echo # End of 10.2 tests
+--echo #
diff --git a/mysql-test/suite/innodb/t/innodb_ctype_ldml-master.opt b/mysql-test/suite/innodb/t/innodb_ctype_ldml-master.opt
index cddf744de98..25eed3eb299 100644
--- a/mysql-test/suite/innodb/t/innodb_ctype_ldml-master.opt
+++ b/mysql-test/suite/innodb/t/innodb_ctype_ldml-master.opt
@@ -1,3 +1,3 @@
---character-sets-dir=$MYSQL_TEST_DIR/std_data/
+--character-sets-dir=$MYSQL_TEST_DIR/std_data/ldml/
--default-storage-engine=InnoDB
diff --git a/mysql-test/suite/innodb/t/innodb_ctype_utf8.test b/mysql-test/suite/innodb/t/innodb_ctype_utf8.test
new file mode 100644
index 00000000000..105f771d8b3
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_ctype_utf8.test
@@ -0,0 +1,25 @@
+--source include/have_innodb.inc
+
+SET STORAGE_ENGINE=InnoDB;
+
+--echo #
+--echo # Start of 10.2 tests
+--echo #
+
+--echo #
+--echo # MDEV-9711 NO PAD Collatons
+--echo #
+
+SET NAMES utf8;
+
+let $coll='utf8_general_nopad_ci';
+let $coll_pad='utf8_general_ci';
+--source include/ctype_pad.inc
+
+let $coll='utf8_nopad_bin';
+let $coll_pad='utf8_bin';
+--source include/ctype_pad.inc
+
+--echo #
+--echo # End of 10.2 tests
+--echo #
diff --git a/mysql-test/suite/innodb_fts/r/innodb_fts_misc.result b/mysql-test/suite/innodb_fts/r/innodb_fts_misc.result
index a76f715246d..1449fd7d85a 100644
--- a/mysql-test/suite/innodb_fts/r/innodb_fts_misc.result
+++ b/mysql-test/suite/innodb_fts/r/innodb_fts_misc.result
@@ -302,7 +302,7 @@ MATCH a,b AGAINST ('support') ;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `id` int(10) unsigned NOT NULL DEFAULT '0'
+ `id` int(10) unsigned NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT id FROM t2;
id
@@ -314,7 +314,7 @@ MATCH a,b AGAINST("+support +collections" IN BOOLEAN MODE);
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `id` int(10) unsigned NOT NULL DEFAULT '0'
+ `id` int(10) unsigned NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT id FROM t2;
id
@@ -325,7 +325,7 @@ MATCH a,b AGAINST ('"proximity search"@10' IN BOOLEAN MODE);
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `id` int(10) unsigned NOT NULL DEFAULT '0'
+ `id` int(10) unsigned NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT id FROM t2;
id
diff --git a/mysql-test/suite/maria/encrypt-wrong-key.test b/mysql-test/suite/maria/encrypt-wrong-key.test
index 6f59952c1fa..2afa785dd0f 100644
--- a/mysql-test/suite/maria/encrypt-wrong-key.test
+++ b/mysql-test/suite/maria/encrypt-wrong-key.test
@@ -52,3 +52,5 @@ INSERT INTO t1 VALUES (2);
--error 192
select * from t1;
drop table t1;
+--remove_file $MYSQLTEST_VARDIR/keys1.txt
+--remove_file $MYSQLTEST_VARDIR/keys2.txt
diff --git a/mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result b/mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result
index 34fcba6ae87..c55fab0f5cc 100644
--- a/mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result
@@ -68,8 +68,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -560,8 +560,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -1060,8 +1060,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -1565,8 +1565,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -2064,8 +2064,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -2567,8 +2567,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -3077,8 +3077,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -3585,8 +3585,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -4082,8 +4082,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -4574,8 +4574,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -5074,8 +5074,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -5579,8 +5579,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -6078,8 +6078,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -6581,8 +6581,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -7091,8 +7091,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -7599,8 +7599,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -8097,8 +8097,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -8605,8 +8605,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -9121,8 +9121,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -9642,8 +9642,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -10157,8 +10157,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -10676,8 +10676,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -11202,8 +11202,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -11726,8 +11726,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -12239,8 +12239,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -12747,8 +12747,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -13263,8 +13263,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -13784,8 +13784,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -14299,8 +14299,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -14818,8 +14818,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -15344,8 +15344,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -15868,8 +15868,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -16382,8 +16382,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -16875,8 +16875,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -17376,8 +17376,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -17882,8 +17882,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -18382,8 +18382,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -18886,8 +18886,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -19397,8 +19397,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -19906,8 +19906,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -20404,8 +20404,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -20897,8 +20897,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -21398,8 +21398,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -21904,8 +21904,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -22404,8 +22404,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -22908,8 +22908,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -23419,8 +23419,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -23928,8 +23928,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -24426,8 +24426,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -24919,8 +24919,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -25420,8 +25420,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -25926,8 +25926,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -26426,8 +26426,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -26930,8 +26930,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -27441,8 +27441,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -27950,8 +27950,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
diff --git a/mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result b/mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result
index 018bc4e9287..3d5548c340b 100644
--- a/mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result
@@ -68,8 +68,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -585,8 +585,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -1116,8 +1116,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -1658,8 +1658,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -2190,8 +2190,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -2730,8 +2730,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -3277,8 +3277,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -3822,8 +3822,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -4358,8 +4358,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -4875,8 +4875,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -5406,8 +5406,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -5948,8 +5948,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -6480,8 +6480,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -7020,8 +7020,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -7567,8 +7567,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -8112,8 +8112,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
diff --git a/mysql-test/suite/parts/r/partition_alter1_1_innodb.result b/mysql-test/suite/parts/r/partition_alter1_1_innodb.result
index c05abfbcaed..29aaa2713c1 100644
--- a/mysql-test/suite/parts/r/partition_alter1_1_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter1_1_innodb.result
@@ -386,8 +386,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -878,8 +878,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -1378,8 +1378,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -1883,8 +1883,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -2382,8 +2382,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -2887,8 +2887,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -3397,8 +3397,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -3905,8 +3905,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -4402,8 +4402,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -4894,8 +4894,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -5394,8 +5394,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -5899,8 +5899,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -6398,8 +6398,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -6903,8 +6903,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -7413,8 +7413,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -7921,8 +7921,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -8419,8 +8419,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -8927,8 +8927,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -9443,8 +9443,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -9964,8 +9964,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -10479,8 +10479,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -11000,8 +11000,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -11526,8 +11526,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -12050,8 +12050,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -12563,8 +12563,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -13071,8 +13071,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -13587,8 +13587,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -14108,8 +14108,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -14623,8 +14623,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -15144,8 +15144,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -15670,8 +15670,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -16194,8 +16194,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
diff --git a/mysql-test/suite/parts/r/partition_alter1_1_myisam.result b/mysql-test/suite/parts/r/partition_alter1_1_myisam.result
index 514afd88a20..4f724d3c8b2 100644
--- a/mysql-test/suite/parts/r/partition_alter1_1_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter1_1_myisam.result
@@ -227,8 +227,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -744,8 +744,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -1275,8 +1275,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -1817,8 +1817,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -2349,8 +2349,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -2891,8 +2891,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -3438,8 +3438,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -3983,8 +3983,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -4519,8 +4519,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -5036,8 +5036,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -5567,8 +5567,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -6109,8 +6109,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -6641,8 +6641,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -7183,8 +7183,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -7730,8 +7730,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -8275,8 +8275,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
diff --git a/mysql-test/suite/parts/r/partition_alter1_2_innodb.result b/mysql-test/suite/parts/r/partition_alter1_2_innodb.result
index 8ab37aafcbe..d52a3180124 100644
--- a/mysql-test/suite/parts/r/partition_alter1_2_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter1_2_innodb.result
@@ -67,8 +67,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -507,8 +507,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -955,8 +955,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1408,8 +1408,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1855,8 +1855,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2308,8 +2308,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2766,8 +2766,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -3222,8 +3222,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -3667,8 +3667,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -4107,8 +4107,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -4555,8 +4555,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -5008,8 +5008,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -5455,8 +5455,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -5908,8 +5908,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -6366,8 +6366,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -6822,8 +6822,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -7267,8 +7267,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -7723,8 +7723,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -8187,8 +8187,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -8656,8 +8656,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -9119,8 +9119,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -9588,8 +9588,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -10062,8 +10062,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -10534,8 +10534,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -10999,8 +10999,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -11439,8 +11439,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -11887,8 +11887,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -12340,8 +12340,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -12787,8 +12787,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -13238,8 +13238,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -13696,8 +13696,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -14152,8 +14152,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -14597,8 +14597,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -15037,8 +15037,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -15485,8 +15485,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -15938,8 +15938,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -16385,8 +16385,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -16836,8 +16836,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -17294,8 +17294,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -17750,8 +17750,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -18196,8 +18196,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -18652,8 +18652,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -19116,8 +19116,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -19585,8 +19585,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -20048,8 +20048,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -20515,8 +20515,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -20989,8 +20989,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -21461,8 +21461,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -21922,8 +21922,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -22378,8 +22378,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -22842,8 +22842,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -23311,8 +23311,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -23774,8 +23774,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -24241,8 +24241,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -24715,8 +24715,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -25187,8 +25187,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -25649,8 +25649,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -26089,8 +26089,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -26537,8 +26537,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -26990,8 +26990,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -27437,8 +27437,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -27888,8 +27888,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -28346,8 +28346,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -28802,8 +28802,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -29247,8 +29247,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -29687,8 +29687,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -30135,8 +30135,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -30588,8 +30588,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -31035,8 +31035,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -31486,8 +31486,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -31944,8 +31944,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -32400,8 +32400,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -32845,8 +32845,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -33301,8 +33301,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -33765,8 +33765,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -34234,8 +34234,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -34697,8 +34697,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -35164,8 +35164,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -35638,8 +35638,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -36110,8 +36110,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
diff --git a/mysql-test/suite/parts/r/partition_alter1_2_myisam.result b/mysql-test/suite/parts/r/partition_alter1_2_myisam.result
index d998e264522..6f9a2486fbe 100644
--- a/mysql-test/suite/parts/r/partition_alter1_2_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter1_2_myisam.result
@@ -66,8 +66,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -531,8 +531,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1010,8 +1010,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1500,8 +1500,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1980,8 +1980,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2470,8 +2470,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2965,8 +2965,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -3458,8 +3458,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -3946,8 +3946,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -4411,8 +4411,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -4890,8 +4890,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -5380,8 +5380,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -5860,8 +5860,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -6348,8 +6348,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -6843,8 +6843,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -7336,8 +7336,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -7820,8 +7820,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -8285,8 +8285,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -8764,8 +8764,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -9254,8 +9254,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -9734,8 +9734,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -10222,8 +10222,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -10717,8 +10717,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -11210,8 +11210,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -11694,8 +11694,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -12159,8 +12159,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -12638,8 +12638,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -13128,8 +13128,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -13608,8 +13608,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -14096,8 +14096,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -14591,8 +14591,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -15084,8 +15084,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
diff --git a/mysql-test/suite/parts/r/partition_alter2_1_1_innodb.result b/mysql-test/suite/parts/r/partition_alter2_1_1_innodb.result
index efc81603b5a..06dd78b69dc 100644
--- a/mysql-test/suite/parts/r/partition_alter2_1_1_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter2_1_1_innodb.result
@@ -68,7 +68,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -524,7 +524,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -988,7 +988,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -1457,7 +1457,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -1920,7 +1920,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -2389,7 +2389,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -2863,7 +2863,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -3335,7 +3335,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -3797,7 +3797,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -4291,7 +4291,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -4793,7 +4793,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -5300,7 +5300,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -5801,7 +5801,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -6308,7 +6308,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -6820,7 +6820,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -7330,7 +7330,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -7829,7 +7829,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -8323,7 +8323,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -8825,7 +8825,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -9332,7 +9332,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -9833,7 +9833,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -10340,7 +10340,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -10852,7 +10852,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -11362,7 +11362,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -11862,7 +11862,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -12370,7 +12370,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -12886,7 +12886,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -13407,7 +13407,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -13922,7 +13922,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -14443,7 +14443,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -14969,7 +14969,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -15493,7 +15493,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -16006,7 +16006,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -16514,7 +16514,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -17030,7 +17030,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -17551,7 +17551,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -18066,7 +18066,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -18587,7 +18587,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -19113,7 +19113,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -19637,7 +19637,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
diff --git a/mysql-test/suite/parts/r/partition_alter2_1_maria.result b/mysql-test/suite/parts/r/partition_alter2_1_maria.result
index 1182794ff05..1905c5c25ae 100644
--- a/mysql-test/suite/parts/r/partition_alter2_1_maria.result
+++ b/mysql-test/suite/parts/r/partition_alter2_1_maria.result
@@ -68,7 +68,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -533,7 +533,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -1012,7 +1012,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -1502,7 +1502,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -1982,7 +1982,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -2472,7 +2472,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -2967,7 +2967,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -3460,7 +3460,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -3945,7 +3945,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -4462,7 +4462,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -4993,7 +4993,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -5535,7 +5535,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -6067,7 +6067,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -6609,7 +6609,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -7156,7 +7156,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -7701,7 +7701,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -8237,7 +8237,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -8754,7 +8754,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -9285,7 +9285,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -9827,7 +9827,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -10359,7 +10359,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -10901,7 +10901,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -11448,7 +11448,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -11993,7 +11993,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
diff --git a/mysql-test/suite/parts/r/partition_alter2_1_myisam.result b/mysql-test/suite/parts/r/partition_alter2_1_myisam.result
index c6f68a5882e..3a31fa905e1 100644
--- a/mysql-test/suite/parts/r/partition_alter2_1_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter2_1_myisam.result
@@ -68,7 +68,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -533,7 +533,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -1012,7 +1012,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -1502,7 +1502,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -1982,7 +1982,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -2472,7 +2472,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -2967,7 +2967,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -3460,7 +3460,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -3945,7 +3945,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -4462,7 +4462,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -4993,7 +4993,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -5535,7 +5535,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -6067,7 +6067,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -6609,7 +6609,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -7156,7 +7156,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -7701,7 +7701,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -8237,7 +8237,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -8754,7 +8754,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -9285,7 +9285,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -9827,7 +9827,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -10359,7 +10359,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -10901,7 +10901,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -11448,7 +11448,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -11993,7 +11993,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
diff --git a/mysql-test/suite/parts/r/partition_alter2_2_1_innodb.result b/mysql-test/suite/parts/r/partition_alter2_2_1_innodb.result
index 2c8ec37d844..1b5fbc437cc 100644
--- a/mysql-test/suite/parts/r/partition_alter2_2_1_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter2_2_1_innodb.result
@@ -68,7 +68,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -526,7 +526,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -992,7 +992,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -1463,7 +1463,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -1926,7 +1926,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -2397,7 +2397,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -2871,7 +2871,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -3345,7 +3345,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -3808,7 +3808,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -4304,7 +4304,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -4808,7 +4808,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -5317,7 +5317,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -5818,7 +5818,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -6327,7 +6327,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -6839,7 +6839,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -7351,7 +7351,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -7852,7 +7852,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -8348,7 +8348,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -8852,7 +8852,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -9361,7 +9361,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -9862,7 +9862,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -10371,7 +10371,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -10883,7 +10883,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -11395,7 +11395,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -11897,7 +11897,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -12407,7 +12407,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -12925,7 +12925,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -13448,7 +13448,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -13963,7 +13963,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -14486,7 +14486,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -15012,7 +15012,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -15538,7 +15538,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -16053,7 +16053,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -16563,7 +16563,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -17081,7 +17081,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -17604,7 +17604,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -18119,7 +18119,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -18642,7 +18642,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -19168,7 +19168,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -19694,7 +19694,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
diff --git a/mysql-test/suite/parts/r/partition_alter2_2_maria.result b/mysql-test/suite/parts/r/partition_alter2_2_maria.result
index 7eaffd200ce..9407be53e04 100644
--- a/mysql-test/suite/parts/r/partition_alter2_2_maria.result
+++ b/mysql-test/suite/parts/r/partition_alter2_2_maria.result
@@ -68,7 +68,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -535,7 +535,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -1016,7 +1016,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -1508,7 +1508,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -1988,7 +1988,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -2480,7 +2480,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -2975,7 +2975,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -3470,7 +3470,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -3957,7 +3957,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -4476,7 +4476,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -5009,7 +5009,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -5553,7 +5553,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -6085,7 +6085,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -6629,7 +6629,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -7176,7 +7176,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -7723,7 +7723,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -8261,7 +8261,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -8780,7 +8780,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -9313,7 +9313,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -9857,7 +9857,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -10389,7 +10389,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -10933,7 +10933,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -11480,7 +11480,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -12027,7 +12027,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
diff --git a/mysql-test/suite/parts/r/partition_alter2_2_myisam.result b/mysql-test/suite/parts/r/partition_alter2_2_myisam.result
index 85ace90e88c..f2a450686f5 100644
--- a/mysql-test/suite/parts/r/partition_alter2_2_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter2_2_myisam.result
@@ -68,7 +68,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -535,7 +535,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -1016,7 +1016,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -1508,7 +1508,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -1988,7 +1988,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -2480,7 +2480,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -2975,7 +2975,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -3470,7 +3470,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -3957,7 +3957,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -4476,7 +4476,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -5009,7 +5009,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -5553,7 +5553,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -6085,7 +6085,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -6629,7 +6629,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -7176,7 +7176,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -7723,7 +7723,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -8261,7 +8261,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -8780,7 +8780,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -9313,7 +9313,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -9857,7 +9857,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -10389,7 +10389,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -10933,7 +10933,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -11480,7 +11480,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -12027,7 +12027,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
diff --git a/mysql-test/suite/parts/r/partition_alter3_innodb.result b/mysql-test/suite/parts/r/partition_alter3_innodb.result
index a1718453c11..2bb1bcc2433 100644
--- a/mysql-test/suite/parts/r/partition_alter3_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter3_innodb.result
@@ -440,8 +440,8 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -463,8 +463,8 @@ ALTER TABLE t1 PARTITION BY KEY(f_int1);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -489,8 +489,8 @@ ALTER TABLE t1 ADD PARTITION (PARTITION part1, PARTITION part7);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -515,8 +515,8 @@ ALTER TABLE t1 ADD PARTITION (PARTITION part2);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -543,8 +543,8 @@ ALTER TABLE t1 ADD PARTITION PARTITIONS 4;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -586,8 +586,8 @@ ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -619,8 +619,8 @@ ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -650,8 +650,8 @@ ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -679,8 +679,8 @@ ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -706,8 +706,8 @@ ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -731,8 +731,8 @@ ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -754,8 +754,8 @@ ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -779,8 +779,8 @@ ALTER TABLE t1 REMOVE PARTITIONING;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
diff --git a/mysql-test/suite/parts/r/partition_alter3_myisam.result b/mysql-test/suite/parts/r/partition_alter3_myisam.result
index 8bee02a3096..2a2ae74d8bd 100644
--- a/mysql-test/suite/parts/r/partition_alter3_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter3_myisam.result
@@ -482,8 +482,8 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -506,8 +506,8 @@ ALTER TABLE t1 PARTITION BY KEY(f_int1);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -533,8 +533,8 @@ ALTER TABLE t1 ADD PARTITION (PARTITION part1, PARTITION part7);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -562,8 +562,8 @@ ALTER TABLE t1 ADD PARTITION (PARTITION part2);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -594,8 +594,8 @@ ALTER TABLE t1 ADD PARTITION PARTITIONS 4;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -645,8 +645,8 @@ ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -685,8 +685,8 @@ ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -722,8 +722,8 @@ ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -756,8 +756,8 @@ ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -787,8 +787,8 @@ ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -815,8 +815,8 @@ ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -840,8 +840,8 @@ ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -866,8 +866,8 @@ ALTER TABLE t1 REMOVE PARTITIONING;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
diff --git a/mysql-test/suite/parts/r/partition_alter4_innodb.result b/mysql-test/suite/parts/r/partition_alter4_innodb.result
index f51d6e5cb02..5bdf4ac0ab1 100644
--- a/mysql-test/suite/parts/r/partition_alter4_innodb.result
+++ b/mysql-test/suite/parts/r/partition_alter4_innodb.result
@@ -69,8 +69,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -528,8 +528,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -998,8 +998,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1469,8 +1469,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1934,8 +1934,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2405,8 +2405,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2881,8 +2881,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -3355,8 +3355,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -3819,8 +3819,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -4278,8 +4278,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -4748,8 +4748,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -5219,8 +5219,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -5684,8 +5684,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -6155,8 +6155,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -6631,8 +6631,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -7105,8 +7105,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -7569,8 +7569,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -8028,8 +8028,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -8498,8 +8498,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -8969,8 +8969,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -9434,8 +9434,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -9905,8 +9905,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -10381,8 +10381,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -10855,8 +10855,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -11319,8 +11319,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -11778,8 +11778,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -12248,8 +12248,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -12719,8 +12719,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -13184,8 +13184,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -13655,8 +13655,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -14131,8 +14131,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -14605,8 +14605,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -15069,8 +15069,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -15528,8 +15528,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -15998,8 +15998,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -16469,8 +16469,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -16934,8 +16934,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -17405,8 +17405,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -17881,8 +17881,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -18355,8 +18355,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -18822,8 +18822,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -19281,8 +19281,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -19751,8 +19751,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -20222,8 +20222,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -20687,8 +20687,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -21158,8 +21158,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -21634,8 +21634,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -22108,8 +22108,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -22572,8 +22572,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -23031,8 +23031,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -23501,8 +23501,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -23972,8 +23972,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -24437,8 +24437,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -24908,8 +24908,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -25384,8 +25384,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -25858,8 +25858,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -26322,8 +26322,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -26781,8 +26781,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -27251,8 +27251,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -27722,8 +27722,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -28187,8 +28187,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -28658,8 +28658,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -29134,8 +29134,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -29608,8 +29608,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -30072,8 +30072,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -30531,8 +30531,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -31001,8 +31001,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -31472,8 +31472,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -31937,8 +31937,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -32408,8 +32408,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -32884,8 +32884,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -33358,8 +33358,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -33822,8 +33822,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -34281,8 +34281,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -34751,8 +34751,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -35222,8 +35222,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -35687,8 +35687,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -36158,8 +36158,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -36634,8 +36634,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -37108,8 +37108,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -37576,8 +37576,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -38036,8 +38036,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -38507,8 +38507,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -38979,8 +38979,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -39445,8 +39445,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -39917,8 +39917,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -40394,8 +40394,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -40869,8 +40869,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -41334,8 +41334,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -41794,8 +41794,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -42265,8 +42265,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -42737,8 +42737,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -43203,8 +43203,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -43675,8 +43675,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -44152,8 +44152,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -44627,8 +44627,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -45091,8 +45091,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -45550,8 +45550,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -46020,8 +46020,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -46491,8 +46491,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -46956,8 +46956,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -47427,8 +47427,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -47903,8 +47903,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -48377,8 +48377,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -48841,8 +48841,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -49300,8 +49300,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -49770,8 +49770,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -50241,8 +50241,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -50706,8 +50706,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -51177,8 +51177,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -51653,8 +51653,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -52127,8 +52127,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -52592,8 +52592,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -53052,8 +53052,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -53523,8 +53523,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -53995,8 +53995,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -54461,8 +54461,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -54933,8 +54933,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -55410,8 +55410,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -55885,8 +55885,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -56350,8 +56350,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -56807,8 +56807,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -57275,8 +57275,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -57744,8 +57744,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -58207,8 +58207,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -58676,8 +58676,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -59150,8 +59150,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -59622,8 +59622,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -60084,8 +60084,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -60541,8 +60541,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -61009,8 +61009,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -61478,8 +61478,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -61941,8 +61941,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -62410,8 +62410,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -62884,8 +62884,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -63356,8 +63356,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -64138,8 +64138,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -64595,8 +64595,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -65063,8 +65063,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -65532,8 +65532,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -65995,8 +65995,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -66464,8 +66464,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -66938,8 +66938,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -67410,8 +67410,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -67877,8 +67877,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -68336,8 +68336,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -68806,8 +68806,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -69277,8 +69277,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -69742,8 +69742,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -70213,8 +70213,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -70689,8 +70689,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -71163,8 +71163,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -71627,8 +71627,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -72086,8 +72086,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -72556,8 +72556,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -73027,8 +73027,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -73492,8 +73492,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -73963,8 +73963,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -74439,8 +74439,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -74913,8 +74913,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -75377,8 +75377,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -75836,8 +75836,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -76306,8 +76306,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -76777,8 +76777,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -77242,8 +77242,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -77713,8 +77713,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -78189,8 +78189,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -78663,8 +78663,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -79127,8 +79127,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -79586,8 +79586,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -80056,8 +80056,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -80527,8 +80527,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -80992,8 +80992,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -81463,8 +81463,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -81939,8 +81939,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -82413,8 +82413,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -82877,8 +82877,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -83336,8 +83336,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -83806,8 +83806,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -84277,8 +84277,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -84742,8 +84742,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -85213,8 +85213,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -85689,8 +85689,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -86163,8 +86163,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -86628,8 +86628,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -87082,8 +87082,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -87544,8 +87544,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -88004,8 +88004,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -88462,8 +88462,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -88924,8 +88924,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -89386,8 +89386,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -89844,8 +89844,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
diff --git a/mysql-test/suite/parts/r/partition_alter4_myisam.result b/mysql-test/suite/parts/r/partition_alter4_myisam.result
index c49b4229519..da99d6867ab 100644
--- a/mysql-test/suite/parts/r/partition_alter4_myisam.result
+++ b/mysql-test/suite/parts/r/partition_alter4_myisam.result
@@ -69,8 +69,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -537,8 +537,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1022,8 +1022,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1514,8 +1514,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1996,8 +1996,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2488,8 +2488,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2985,8 +2985,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -3480,8 +3480,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -3967,8 +3967,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -4435,8 +4435,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -4920,8 +4920,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -5412,8 +5412,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -5894,8 +5894,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -6386,8 +6386,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -6883,8 +6883,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -7378,8 +7378,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -7865,8 +7865,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -8333,8 +8333,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -8818,8 +8818,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -9310,8 +9310,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -9792,8 +9792,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -10284,8 +10284,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -10781,8 +10781,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -11276,8 +11276,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -11763,8 +11763,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -12231,8 +12231,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -12716,8 +12716,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -13208,8 +13208,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -13690,8 +13690,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -14182,8 +14182,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -14679,8 +14679,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -15174,8 +15174,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -15661,8 +15661,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -16129,8 +16129,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -16614,8 +16614,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -17106,8 +17106,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -17588,8 +17588,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -18080,8 +18080,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -18577,8 +18577,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -19072,8 +19072,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -19562,8 +19562,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -20030,8 +20030,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -20515,8 +20515,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -21007,8 +21007,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -21489,8 +21489,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -21981,8 +21981,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -22478,8 +22478,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -22973,8 +22973,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -23460,8 +23460,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -23928,8 +23928,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -24413,8 +24413,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -24905,8 +24905,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -25387,8 +25387,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -25879,8 +25879,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -26376,8 +26376,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -26871,8 +26871,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -27358,8 +27358,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -27826,8 +27826,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -28311,8 +28311,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -28803,8 +28803,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -29285,8 +29285,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -29777,8 +29777,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -30274,8 +30274,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -30769,8 +30769,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -31256,8 +31256,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -31724,8 +31724,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -32209,8 +32209,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -32701,8 +32701,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -33183,8 +33183,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -33675,8 +33675,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -34172,8 +34172,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -34667,8 +34667,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -35154,8 +35154,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -35622,8 +35622,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -36107,8 +36107,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -36599,8 +36599,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -37081,8 +37081,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -37573,8 +37573,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -38070,8 +38070,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -38565,8 +38565,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -39055,8 +39055,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -39523,8 +39523,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -40008,8 +40008,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -40500,8 +40500,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -40982,8 +40982,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -41474,8 +41474,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -41971,8 +41971,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -42466,8 +42466,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -42953,8 +42953,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -43421,8 +43421,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -43906,8 +43906,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -44398,8 +44398,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -44880,8 +44880,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -45372,8 +45372,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -45869,8 +45869,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -46364,8 +46364,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -46851,8 +46851,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -47319,8 +47319,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -47804,8 +47804,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -48296,8 +48296,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -48778,8 +48778,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -49270,8 +49270,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -49767,8 +49767,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -50262,8 +50262,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -50749,8 +50749,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -51217,8 +51217,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -51702,8 +51702,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -52194,8 +52194,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -52676,8 +52676,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -53168,8 +53168,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -53665,8 +53665,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -54160,8 +54160,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -54647,8 +54647,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -55115,8 +55115,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -55600,8 +55600,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -56092,8 +56092,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -56574,8 +56574,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -57066,8 +57066,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -57563,8 +57563,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -58058,8 +58058,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -58546,8 +58546,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -59012,8 +59012,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -59495,8 +59495,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -59985,8 +59985,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -60465,8 +60465,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -60955,8 +60955,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -61450,8 +61450,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -61943,8 +61943,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -62428,8 +62428,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -62894,8 +62894,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -63377,8 +63377,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -63867,8 +63867,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -64347,8 +64347,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -64837,8 +64837,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -65332,8 +65332,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -65825,8 +65825,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -66630,8 +66630,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -67096,8 +67096,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -67579,8 +67579,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -68069,8 +68069,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -68549,8 +68549,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -69039,8 +69039,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -69534,8 +69534,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -70027,8 +70027,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -70517,8 +70517,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -70985,8 +70985,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -71470,8 +71470,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -71962,8 +71962,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -72444,8 +72444,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -72936,8 +72936,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -73433,8 +73433,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -73928,8 +73928,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -74415,8 +74415,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -74883,8 +74883,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -75368,8 +75368,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -75860,8 +75860,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -76342,8 +76342,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -76834,8 +76834,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -77331,8 +77331,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -77826,8 +77826,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -78313,8 +78313,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -78781,8 +78781,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -79266,8 +79266,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -79758,8 +79758,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -80240,8 +80240,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -80732,8 +80732,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -81229,8 +81229,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -81724,8 +81724,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -82211,8 +82211,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -82679,8 +82679,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -83164,8 +83164,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -83656,8 +83656,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -84138,8 +84138,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -84630,8 +84630,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -85127,8 +85127,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -85622,8 +85622,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -86109,8 +86109,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -86577,8 +86577,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -87062,8 +87062,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -87554,8 +87554,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -88036,8 +88036,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -88528,8 +88528,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -89025,8 +89025,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -89520,8 +89520,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -90008,8 +90008,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -90468,8 +90468,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -90936,8 +90936,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -91402,8 +91402,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -91866,8 +91866,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -92334,8 +92334,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -92802,8 +92802,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -93266,8 +93266,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
diff --git a/mysql-test/suite/parts/r/partition_basic_innodb.result b/mysql-test/suite/parts/r/partition_basic_innodb.result
index 1a726229403..5bfda948ca4 100644
--- a/mysql-test/suite/parts/r/partition_basic_innodb.result
+++ b/mysql-test/suite/parts/r/partition_basic_innodb.result
@@ -67,8 +67,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -524,8 +524,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -992,8 +992,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1468,8 +1468,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1936,8 +1936,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2412,8 +2412,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2897,8 +2897,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -3376,8 +3376,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -3846,8 +3846,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -4303,8 +4303,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -4771,8 +4771,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -5247,8 +5247,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -5715,8 +5715,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -6189,8 +6189,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -6670,8 +6670,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -7149,8 +7149,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -7623,8 +7623,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -8117,8 +8117,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -8622,8 +8622,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -9135,8 +9135,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -9640,8 +9640,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -10153,8 +10153,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -10675,8 +10675,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -11191,8 +11191,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -11697,8 +11697,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -12191,8 +12191,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -12696,8 +12696,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -13209,8 +13209,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -13714,8 +13714,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -14227,8 +14227,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -14749,8 +14749,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -15265,8 +15265,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -15771,8 +15771,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -16281,8 +16281,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -16802,8 +16802,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -17331,8 +17331,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -17852,8 +17852,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -18381,8 +18381,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -18919,8 +18919,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -19451,8 +19451,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -19978,8 +19978,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -20472,8 +20472,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -20977,8 +20977,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -21490,8 +21490,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -21995,8 +21995,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -22506,8 +22506,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -23024,8 +23024,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -23540,8 +23540,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -24046,8 +24046,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -24540,8 +24540,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -25045,8 +25045,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -25558,8 +25558,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -26063,8 +26063,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -26574,8 +26574,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -27092,8 +27092,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -27608,8 +27608,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -28114,8 +28114,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -28624,8 +28624,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -29145,8 +29145,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -29674,8 +29674,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -30195,8 +30195,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -30722,8 +30722,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -31256,8 +31256,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -31788,8 +31788,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
diff --git a/mysql-test/suite/parts/r/partition_basic_myisam.result b/mysql-test/suite/parts/r/partition_basic_myisam.result
index bade6841047..3351201ea06 100644
--- a/mysql-test/suite/parts/r/partition_basic_myisam.result
+++ b/mysql-test/suite/parts/r/partition_basic_myisam.result
@@ -67,8 +67,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -527,8 +527,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1001,8 +1001,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1486,8 +1486,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1961,8 +1961,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2446,8 +2446,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2940,8 +2940,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -3428,8 +3428,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -3908,8 +3908,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -4368,8 +4368,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -4842,8 +4842,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -5327,8 +5327,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -5802,8 +5802,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -6285,8 +6285,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -6775,8 +6775,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -7263,8 +7263,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -7747,8 +7747,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -8260,8 +8260,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -8787,8 +8787,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -9325,8 +9325,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -9853,8 +9853,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -10391,8 +10391,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -10938,8 +10938,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -11479,8 +11479,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -12016,8 +12016,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -12529,8 +12529,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -13056,8 +13056,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -13594,8 +13594,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -14122,8 +14122,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -14658,8 +14658,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -15201,8 +15201,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -15742,8 +15742,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
diff --git a/mysql-test/suite/parts/r/partition_basic_symlink_myisam.result b/mysql-test/suite/parts/r/partition_basic_symlink_myisam.result
index 006820d3f18..1c1a758f985 100644
--- a/mysql-test/suite/parts/r/partition_basic_symlink_myisam.result
+++ b/mysql-test/suite/parts/r/partition_basic_symlink_myisam.result
@@ -77,8 +77,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -557,8 +557,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1053,8 +1053,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1566,8 +1566,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2061,8 +2061,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2566,8 +2566,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -3096,8 +3096,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -3606,8 +3606,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -4110,8 +4110,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -4590,8 +4590,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -5086,8 +5086,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -5599,8 +5599,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -6094,8 +6094,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -6597,8 +6597,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -7127,8 +7127,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -7637,8 +7637,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -8145,8 +8145,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -8678,8 +8678,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -9227,8 +9227,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -9793,8 +9793,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -10341,8 +10341,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -10899,8 +10899,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -11482,8 +11482,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -12045,8 +12045,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -12606,8 +12606,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -13139,8 +13139,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -13688,8 +13688,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -14254,8 +14254,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -14802,8 +14802,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -15358,8 +15358,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -15941,8 +15941,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -16504,8 +16504,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -17061,8 +17061,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -17587,8 +17587,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -18131,8 +18131,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -18684,8 +18684,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -19222,8 +19222,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -19773,8 +19773,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -20316,8 +20316,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
diff --git a/mysql-test/suite/parts/r/partition_engine_innodb.result b/mysql-test/suite/parts/r/partition_engine_innodb.result
index c3cb7cff083..cfa27c8e112 100644
--- a/mysql-test/suite/parts/r/partition_engine_innodb.result
+++ b/mysql-test/suite/parts/r/partition_engine_innodb.result
@@ -62,8 +62,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -519,8 +519,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -978,8 +978,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1503,8 +1503,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2004,8 +2004,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2466,8 +2466,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2928,8 +2928,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -3387,8 +3387,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -3852,8 +3852,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -4310,8 +4310,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -4764,8 +4764,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
diff --git a/mysql-test/suite/parts/r/partition_engine_myisam.result b/mysql-test/suite/parts/r/partition_engine_myisam.result
index 02f8649692d..3d20dbb726a 100644
--- a/mysql-test/suite/parts/r/partition_engine_myisam.result
+++ b/mysql-test/suite/parts/r/partition_engine_myisam.result
@@ -62,8 +62,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -528,8 +528,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -996,8 +996,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1534,8 +1534,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2048,8 +2048,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2523,8 +2523,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2998,8 +2998,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -3466,8 +3466,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -3944,8 +3944,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -4415,8 +4415,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -4876,8 +4876,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
diff --git a/mysql-test/suite/parts/r/partition_syntax_innodb.result b/mysql-test/suite/parts/r/partition_syntax_innodb.result
index 3dba2873235..767f023d04e 100644
--- a/mysql-test/suite/parts/r/partition_syntax_innodb.result
+++ b/mysql-test/suite/parts/r/partition_syntax_innodb.result
@@ -652,8 +652,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -679,8 +679,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -713,8 +713,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -735,8 +735,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -820,8 +820,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -856,8 +856,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -881,8 +881,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -906,8 +906,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -931,8 +931,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1675,8 +1675,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1704,8 +1704,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
diff --git a/mysql-test/suite/parts/r/partition_syntax_myisam.result b/mysql-test/suite/parts/r/partition_syntax_myisam.result
index 7da964a1f8c..97eabe7d2ce 100644
--- a/mysql-test/suite/parts/r/partition_syntax_myisam.result
+++ b/mysql-test/suite/parts/r/partition_syntax_myisam.result
@@ -652,8 +652,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -687,8 +687,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -731,8 +731,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -759,8 +759,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -852,8 +852,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -904,8 +904,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -937,8 +937,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -974,8 +974,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1005,8 +1005,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1757,8 +1757,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1794,8 +1794,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
diff --git a/mysql-test/suite/perfschema/r/nesting.result b/mysql-test/suite/perfschema/r/nesting.result
index 6a4233d2e42..e08aec94845 100644
--- a/mysql-test/suite/perfschema/r/nesting.result
+++ b/mysql-test/suite/perfschema/r/nesting.result
@@ -167,76 +167,78 @@ relative_event_id relative_end_event_id event_name comment nesting_event_type re
57 58 stage/sql/cleaning up (stage) STATEMENT 40
58 58 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 57
59 59 idle idle NULL NULL
-60 76 statement/sql/select select "This is the first part of a multi query" as payload;
+60 77 statement/sql/select select "This is the first part of a multi query" as payload;
select "And this is the second part of a multi query" as payload;
select "With a third part to make things complete" as payload NULL NULL
-61 64 stage/sql/init (stage) STATEMENT 60
+61 65 stage/sql/init (stage) STATEMENT 60
62 62 wait/io/socket/sql/client_connection recv STAGE 61
63 63 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 61
64 64 wait/io/file/sql/query_log write STAGE 61
-65 65 stage/sql/checking permissions (stage) STATEMENT 60
-66 66 stage/sql/Opening tables (stage) STATEMENT 60
-67 67 stage/sql/After opening tables (stage) STATEMENT 60
-68 68 stage/sql/init (stage) STATEMENT 60
-69 69 stage/sql/optimizing (stage) STATEMENT 60
-70 70 stage/sql/executing (stage) STATEMENT 60
-71 71 stage/sql/end (stage) STATEMENT 60
-72 72 stage/sql/query end (stage) STATEMENT 60
-73 73 stage/sql/closing tables (stage) STATEMENT 60
-74 76 stage/sql/freeing items (stage) STATEMENT 60
-75 75 wait/io/socket/sql/client_connection send STAGE 74
-76 76 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 74
-77 91 statement/sql/select select "And this is the second part of a multi query" as payload;
+65 65 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 61
+66 66 stage/sql/checking permissions (stage) STATEMENT 60
+67 67 stage/sql/Opening tables (stage) STATEMENT 60
+68 68 stage/sql/After opening tables (stage) STATEMENT 60
+69 69 stage/sql/init (stage) STATEMENT 60
+70 70 stage/sql/optimizing (stage) STATEMENT 60
+71 71 stage/sql/executing (stage) STATEMENT 60
+72 72 stage/sql/end (stage) STATEMENT 60
+73 73 stage/sql/query end (stage) STATEMENT 60
+74 74 stage/sql/closing tables (stage) STATEMENT 60
+75 77 stage/sql/freeing items (stage) STATEMENT 60
+76 76 wait/io/socket/sql/client_connection send STAGE 75
+77 77 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 75
+78 93 statement/sql/select select "And this is the second part of a multi query" as payload;
select "With a third part to make things complete" as payload NULL NULL
-78 79 stage/sql/init (stage) STATEMENT 77
-79 79 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 78
-80 80 stage/sql/checking permissions (stage) STATEMENT 77
-81 81 stage/sql/Opening tables (stage) STATEMENT 77
-82 82 stage/sql/After opening tables (stage) STATEMENT 77
-83 83 stage/sql/init (stage) STATEMENT 77
-84 84 stage/sql/optimizing (stage) STATEMENT 77
-85 85 stage/sql/executing (stage) STATEMENT 77
-86 86 stage/sql/end (stage) STATEMENT 77
-87 87 stage/sql/query end (stage) STATEMENT 77
-88 88 stage/sql/closing tables (stage) STATEMENT 77
-89 91 stage/sql/freeing items (stage) STATEMENT 77
-90 90 wait/io/socket/sql/client_connection send STAGE 89
-91 91 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 89
-92 108 statement/sql/select select "With a third part to make things complete" as payload NULL NULL
-93 94 stage/sql/init (stage) STATEMENT 92
-94 94 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 93
-95 95 stage/sql/checking permissions (stage) STATEMENT 92
-96 96 stage/sql/Opening tables (stage) STATEMENT 92
-97 97 stage/sql/After opening tables (stage) STATEMENT 92
-98 98 stage/sql/init (stage) STATEMENT 92
-99 99 stage/sql/optimizing (stage) STATEMENT 92
-100 100 stage/sql/executing (stage) STATEMENT 92
-101 101 stage/sql/end (stage) STATEMENT 92
-102 102 stage/sql/query end (stage) STATEMENT 92
-103 103 stage/sql/closing tables (stage) STATEMENT 92
-104 104 stage/sql/freeing items (stage) STATEMENT 92
-105 105 wait/io/socket/sql/client_connection send STATEMENT 92
-106 106 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 92
-107 108 stage/sql/cleaning up (stage) STATEMENT 92
-108 108 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 107
-109 109 idle idle NULL NULL
-110 128 statement/sql/select select "MARKER_END" as marker NULL NULL
-111 114 stage/sql/init (stage) STATEMENT 110
-112 112 wait/io/socket/sql/client_connection recv STAGE 111
-113 113 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 111
-114 114 wait/io/file/sql/query_log write STAGE 111
-115 115 stage/sql/checking permissions (stage) STATEMENT 110
-116 116 stage/sql/Opening tables (stage) STATEMENT 110
-117 117 stage/sql/After opening tables (stage) STATEMENT 110
-118 118 stage/sql/init (stage) STATEMENT 110
-119 119 stage/sql/optimizing (stage) STATEMENT 110
-120 120 stage/sql/executing (stage) STATEMENT 110
-121 121 stage/sql/end (stage) STATEMENT 110
-122 122 stage/sql/query end (stage) STATEMENT 110
-123 123 stage/sql/closing tables (stage) STATEMENT 110
-124 124 stage/sql/freeing items (stage) STATEMENT 110
-125 125 wait/io/socket/sql/client_connection send STATEMENT 110
-126 126 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 110
-127 128 stage/sql/cleaning up (stage) STATEMENT 110
-128 128 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 127
+79 81 stage/sql/init (stage) STATEMENT 78
+80 80 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 79
+81 81 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 79
+82 82 stage/sql/checking permissions (stage) STATEMENT 78
+83 83 stage/sql/Opening tables (stage) STATEMENT 78
+84 84 stage/sql/After opening tables (stage) STATEMENT 78
+85 85 stage/sql/init (stage) STATEMENT 78
+86 86 stage/sql/optimizing (stage) STATEMENT 78
+87 87 stage/sql/executing (stage) STATEMENT 78
+88 88 stage/sql/end (stage) STATEMENT 78
+89 89 stage/sql/query end (stage) STATEMENT 78
+90 90 stage/sql/closing tables (stage) STATEMENT 78
+91 93 stage/sql/freeing items (stage) STATEMENT 78
+92 92 wait/io/socket/sql/client_connection send STAGE 91
+93 93 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 91
+94 110 statement/sql/select select "With a third part to make things complete" as payload NULL NULL
+95 96 stage/sql/init (stage) STATEMENT 94
+96 96 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 95
+97 97 stage/sql/checking permissions (stage) STATEMENT 94
+98 98 stage/sql/Opening tables (stage) STATEMENT 94
+99 99 stage/sql/After opening tables (stage) STATEMENT 94
+100 100 stage/sql/init (stage) STATEMENT 94
+101 101 stage/sql/optimizing (stage) STATEMENT 94
+102 102 stage/sql/executing (stage) STATEMENT 94
+103 103 stage/sql/end (stage) STATEMENT 94
+104 104 stage/sql/query end (stage) STATEMENT 94
+105 105 stage/sql/closing tables (stage) STATEMENT 94
+106 106 stage/sql/freeing items (stage) STATEMENT 94
+107 107 wait/io/socket/sql/client_connection send STATEMENT 94
+108 108 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 94
+109 110 stage/sql/cleaning up (stage) STATEMENT 94
+110 110 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 109
+111 111 idle idle NULL NULL
+112 130 statement/sql/select select "MARKER_END" as marker NULL NULL
+113 116 stage/sql/init (stage) STATEMENT 112
+114 114 wait/io/socket/sql/client_connection recv STAGE 113
+115 115 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 113
+116 116 wait/io/file/sql/query_log write STAGE 113
+117 117 stage/sql/checking permissions (stage) STATEMENT 112
+118 118 stage/sql/Opening tables (stage) STATEMENT 112
+119 119 stage/sql/After opening tables (stage) STATEMENT 112
+120 120 stage/sql/init (stage) STATEMENT 112
+121 121 stage/sql/optimizing (stage) STATEMENT 112
+122 122 stage/sql/executing (stage) STATEMENT 112
+123 123 stage/sql/end (stage) STATEMENT 112
+124 124 stage/sql/query end (stage) STATEMENT 112
+125 125 stage/sql/closing tables (stage) STATEMENT 112
+126 126 stage/sql/freeing items (stage) STATEMENT 112
+127 127 wait/io/socket/sql/client_connection send STATEMENT 112
+128 128 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 112
+129 130 stage/sql/cleaning up (stage) STATEMENT 112
+130 130 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 129
disconnect con1;
diff --git a/mysql-test/suite/perfschema/r/threads_mysql.result b/mysql-test/suite/perfschema/r/threads_mysql.result
index 6ab0b0641b0..9f9c46fe6a6 100644
--- a/mysql-test/suite/perfschema/r/threads_mysql.result
+++ b/mysql-test/suite/perfschema/r/threads_mysql.result
@@ -44,6 +44,16 @@ processlist_info NULL
unified_parent_thread_id unified parent_thread_id
role NULL
instrumented YES
+name thread/sql/slave_background
+type BACKGROUND
+processlist_user NULL
+processlist_host NULL
+processlist_db NULL
+processlist_command NULL
+processlist_info NULL
+unified_parent_thread_id unified parent_thread_id
+role NULL
+instrumented YES
CREATE TEMPORARY TABLE t1 AS
SELECT thread_id FROM performance_schema.threads
WHERE name LIKE 'thread/sql%';
@@ -105,4 +115,5 @@ parent_thread_name child_thread_name
thread/sql/event_scheduler thread/sql/event_worker
thread/sql/main thread/sql/one_connection
thread/sql/main thread/sql/signal_handler
+thread/sql/main thread/sql/slave_background
thread/sql/one_connection thread/sql/event_scheduler
diff --git a/mysql-test/suite/perfschema/t/privilege_table_io.test b/mysql-test/suite/perfschema/t/privilege_table_io.test
index 833fe85e8bb..35c49bf33fb 100644
--- a/mysql-test/suite/perfschema/t/privilege_table_io.test
+++ b/mysql-test/suite/perfschema/t/privilege_table_io.test
@@ -1,7 +1,10 @@
# Tests for PERFORMANCE_SCHEMA table io
+# This test makes a restart because without it, events_waits_history_long
+# sometimes contains duplicated entries of roles_mapping.
--source include/not_embedded.inc
--source include/have_perfschema.inc
+--source include/restart_mysqld.inc
--source ../include/table_io_setup_helper.inc
# Remove "deleted" records from mysql.db that may come from previous tests,
diff --git a/mysql-test/suite/plugins/r/cracklib_password_check.result b/mysql-test/suite/plugins/r/cracklib_password_check.result
index dc31cb6d044..158a7501240 100644
--- a/mysql-test/suite/plugins/r/cracklib_password_check.result
+++ b/mysql-test/suite/plugins/r/cracklib_password_check.result
@@ -11,7 +11,7 @@ PLUGIN_AUTHOR Sergei Golubchik
PLUGIN_DESCRIPTION Password validation via CrackLib
PLUGIN_LICENSE GPL
LOAD_OPTION ON
-PLUGIN_MATURITY Gamma
+PLUGIN_MATURITY Stable
PLUGIN_AUTH_VERSION 1.0
grant select on *.* to foocar identified by 'foocar';
ERROR HY000: Your password does not satisfy the current policy requirements
diff --git a/mysql-test/suite/plugins/r/pam_cleartext.result b/mysql-test/suite/plugins/r/pam_cleartext.result
index 00e0e94618e..824e8329cc3 100644
--- a/mysql-test/suite/plugins/r/pam_cleartext.result
+++ b/mysql-test/suite/plugins/r/pam_cleartext.result
@@ -2,9 +2,12 @@ install plugin pam soname 'auth_pam.so';
create user test_pam identified via pam using 'mariadb_mtr';
create user pam_test;
grant proxy on pam_test to test_pam;
-show variables like 'pam%';
+show variables like 'pam_use_%';
Variable_name Value
pam_use_cleartext_plugin ON
+#
+# same test as in pam.test now fails
+#
drop user test_pam;
drop user pam_test;
uninstall plugin pam;
diff --git a/mysql-test/suite/plugins/r/simple_password_check.result b/mysql-test/suite/plugins/r/simple_password_check.result
index bbb96bb8c38..015a26adc87 100644
--- a/mysql-test/suite/plugins/r/simple_password_check.result
+++ b/mysql-test/suite/plugins/r/simple_password_check.result
@@ -11,7 +11,7 @@ PLUGIN_AUTHOR Sergei Golubchik
PLUGIN_DESCRIPTION Simple password strength checks
PLUGIN_LICENSE GPL
LOAD_OPTION ON
-PLUGIN_MATURITY Gamma
+PLUGIN_MATURITY Stable
PLUGIN_AUTH_VERSION 1.0
select * from information_schema.system_variables where variable_name like 'simple_password_check%' order by 1;
VARIABLE_NAME SIMPLE_PASSWORD_CHECK_DIGITS
@@ -85,7 +85,11 @@ grant select on *.* to foo1;
drop user foo1;
set global simple_password_check_digits=3;
set global simple_password_check_letters_same_case=3;
+Warnings:
+Warning 1292 Adjusted the value of simple_password_check_minimal_length from 8 to 10
set global simple_password_check_other_characters=3;
+Warnings:
+Warning 1292 Adjusted the value of simple_password_check_minimal_length from 10 to 12
show variables like 'simple_password_check_%';
Variable_name Value
simple_password_check_digits 3
diff --git a/mysql-test/suite/plugins/t/pam.test b/mysql-test/suite/plugins/t/pam.test
index 1871e5801a3..8a95d6baed2 100644
--- a/mysql-test/suite/plugins/t/pam.test
+++ b/mysql-test/suite/plugins/t/pam.test
@@ -29,5 +29,6 @@ EOF
--remove_file $MYSQLTEST_VARDIR/tmp/pam_bad.txt
drop user test_pam;
drop user pam_test;
+let $count_sessions= 1;
+--source include/wait_until_count_sessions.inc
uninstall plugin pam;
-
diff --git a/mysql-test/suite/plugins/t/pam_cleartext.test b/mysql-test/suite/plugins/t/pam_cleartext.test
index 6b9bf087ce5..29ed7430649 100644
--- a/mysql-test/suite/plugins/t/pam_cleartext.test
+++ b/mysql-test/suite/plugins/t/pam_cleartext.test
@@ -1,13 +1,24 @@
--source pam_init.inc
-show variables like 'pam%';
+show variables like 'pam_use_%';
+--write_file $MYSQLTEST_VARDIR/tmp/pam_good.txt
+not very secret challenge
+9225
+select user(), current_user(), database();
+EOF
+
+--echo #
+--echo # same test as in pam.test now fails
+--echo #
--error 1
---exec echo FAIL | $MYSQL_TEST -u test_pam --plugin-dir=$plugindir
+--exec $MYSQL_TEST -u test_pam --plugin-dir=$plugindir < $MYSQLTEST_VARDIR/tmp/pam_good.txt
+
+--remove_file $MYSQLTEST_VARDIR/tmp/pam_good.txt
drop user test_pam;
drop user pam_test;
---disable_warnings
+let $count_sessions= 1;
+--source include/wait_until_count_sessions.inc
uninstall plugin pam;
-
diff --git a/mysql-test/suite/roles/definer.result b/mysql-test/suite/roles/definer.result
index 293e5e539bc..4810e597763 100644
--- a/mysql-test/suite/roles/definer.result
+++ b/mysql-test/suite/roles/definer.result
@@ -22,10 +22,10 @@ show create view test.v1;
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`role1` SQL SECURITY DEFINER VIEW `test`.`v1` AS select (`mysqltest1`.`t1`.`a` + `mysqltest1`.`t1`.`b`) AS `a+b`,`mysqltest1`.`t1`.`c` AS `c` from `mysqltest1`.`t1` latin1 latin1_swedish_ci
set role none;
-create definer=role2 view test.v2 as select a+b,c from t1;
+create definer=role2 view test.v2 as select a+b,c,current_role() from t1;
show create view test.v2;
View Create View character_set_client collation_connection
-v2 CREATE ALGORITHM=UNDEFINED DEFINER=`role2` SQL SECURITY DEFINER VIEW `test`.`v2` AS select (`mysqltest1`.`t1`.`a` + `mysqltest1`.`t1`.`b`) AS `a+b`,`mysqltest1`.`t1`.`c` AS `c` from `mysqltest1`.`t1` latin1 latin1_swedish_ci
+v2 CREATE ALGORITHM=UNDEFINED DEFINER=`role2` SQL SECURITY DEFINER VIEW `test`.`v2` AS select (`mysqltest1`.`t1`.`a` + `mysqltest1`.`t1`.`b`) AS `a+b`,`mysqltest1`.`t1`.`c` AS `c`,current_role() AS `current_role()` from `mysqltest1`.`t1` latin1 latin1_swedish_ci
create definer=role3 view test.v3 as select a+b,c from t1;
Warnings:
Note 1449 The user specified as a definer ('role3'@'%') does not exist
@@ -44,9 +44,9 @@ GRANT CREATE VIEW ON `mysqltest1`.* TO 'foo'@'localhost'
select * from test.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
select * from test.v2;
-a+b c
-11 100
-22 200
+a+b c current_role()
+11 100 role2
+22 200 role2
select * from test.v3;
ERROR 28000: Access denied for user 'foo'@'localhost' (using password: NO)
create definer=role4 view test.v4 as select a+b,c from t1;
@@ -113,7 +113,7 @@ tr1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` trigger tr
insert t1 values (111, 222, 333) latin1 latin1_swedish_ci latin1_swedish_ci
set role none;
insert t2 values (11,22,33);
-ERROR 42000: INSERT command denied to user 'role1'@'' for table 't1'
+ERROR 42000: INSERT command denied to user ''@'' for table 't1'
select * from t1;
a b c
1 10 100
@@ -179,7 +179,7 @@ pr1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` PROCEDURE
insert t1 values (111, 222, 333) latin1 latin1_swedish_ci latin1_swedish_ci
set role none;
call pr1();
-ERROR 42000: INSERT command denied to user 'role1'@'' for table 't1'
+ERROR 42000: INSERT command denied to user ''@'' for table 't1'
select * from t1;
a b c
1 10 100
@@ -222,7 +222,7 @@ fn1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` FUNCTION `
return (select sum(a+b) from t1) latin1 latin1_swedish_ci latin1_swedish_ci
set role none;
select fn1();
-ERROR 42000: SELECT command denied to user 'role1'@'' for column 'b' in table 't1'
+ERROR 42000: SELECT command denied to user ''@'' for column 'b' in table 't1'
select * from t1;
a b c
1 10 100
@@ -289,7 +289,8 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v2` (
`a+b` tinyint NOT NULL,
- `c` tinyint NOT NULL
+ `c` tinyint NOT NULL,
+ `current_role()` tinyint NOT NULL
) ENGINE=MyISAM */;
SET character_set_client = @saved_cs_client;
SET @saved_cs_client = @@character_set_client;
@@ -553,7 +554,7 @@ USE `test`;
/*!50001 SET character_set_client = latin1 */;
/*!50001 SET character_set_results = latin1 */;
/*!50001 SET collation_connection = latin1_swedish_ci */;
-/*!50001 CREATE ALGORITHM=UNDEFINED DEFINER=`role2` SQL SECURITY DEFINER VIEW `v2` AS select (`mysqltest1`.`t1`.`a` + `mysqltest1`.`t1`.`b`) AS `a+b`,`mysqltest1`.`t1`.`c` AS `c` from `mysqltest1`.`t1` */;
+/*!50001 CREATE ALGORITHM=UNDEFINED DEFINER=`role2` SQL SECURITY DEFINER VIEW `v2` AS select (`mysqltest1`.`t1`.`a` + `mysqltest1`.`t1`.`b`) AS `a+b`,`mysqltest1`.`t1`.`c` AS `c`,current_role() AS `current_role()` from `mysqltest1`.`t1` */;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
diff --git a/mysql-test/suite/roles/definer.test b/mysql-test/suite/roles/definer.test
index 3de4a6922c2..090c60917c9 100644
--- a/mysql-test/suite/roles/definer.test
+++ b/mysql-test/suite/roles/definer.test
@@ -47,7 +47,7 @@ show create view test.v1;
set role none;
# definer=role_name, privileges ok
-create definer=role2 view test.v2 as select a+b,c from t1;
+create definer=role2 view test.v2 as select a+b,c,current_role() from t1;
show create view test.v2;
# definer=non_existent_role
diff --git a/mysql-test/suite/rpl/r/parallel_conflicts.result b/mysql-test/suite/rpl/r/parallel_conflicts.result
new file mode 100644
index 00000000000..f3f5bc4a8ee
--- /dev/null
+++ b/mysql-test/suite/rpl/r/parallel_conflicts.result
@@ -0,0 +1,312 @@
+include/master-slave.inc
+[connection master]
+connection server_2;
+SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=10;
+SET GLOBAL slave_parallel_mode='conservative';
+include/start_slave.inc
+*** MDEV-7847: "Slave worker thread retried transaction 10 time(s) in vain, giving up", followed by replication hanging ***
+*** MDEV-7882: Excessive transaction retry in parallel replication ***
+connection server_1;
+CREATE TABLE t7 (a int PRIMARY KEY, b INT) ENGINE=InnoDB;
+CREATE TABLE t8 (a int PRIMARY KEY, b INT) ENGINE=InnoDB;
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=40;
+SELECT @old_retries:=@@GLOBAL.slave_transaction_retries;
+@old_retries:=@@GLOBAL.slave_transaction_retries
+10
+SET GLOBAL slave_transaction_retries= 5;
+connection server_1;
+INSERT INTO t7 VALUES (1,1), (2,2), (3,3), (4,4), (5,5);
+SET @old_dbug= @@SESSION.debug_dbug;
+SET @commit_id= 42;
+SET SESSION debug_dbug="+d,binlog_force_commit_id";
+INSERT INTO t8 VALUES (1,1);
+INSERT INTO t8 VALUES (2,2);
+INSERT INTO t8 VALUES (3,3);
+INSERT INTO t8 VALUES (4,4);
+INSERT INTO t8 VALUES (5,5);
+INSERT INTO t8 VALUES (6,6);
+INSERT INTO t8 VALUES (7,7);
+INSERT INTO t8 VALUES (8,8);
+UPDATE t7 SET b=9 WHERE a=3;
+UPDATE t7 SET b=10 WHERE a=3;
+UPDATE t7 SET b=11 WHERE a=3;
+INSERT INTO t8 VALUES (12,12);
+INSERT INTO t8 VALUES (13,13);
+UPDATE t7 SET b=14 WHERE a=3;
+UPDATE t7 SET b=15 WHERE a=3;
+INSERT INTO t8 VALUES (16,16);
+UPDATE t7 SET b=17 WHERE a=3;
+INSERT INTO t8 VALUES (18,18);
+INSERT INTO t8 VALUES (19,19);
+UPDATE t7 SET b=20 WHERE a=3;
+INSERT INTO t8 VALUES (21,21);
+UPDATE t7 SET b=22 WHERE a=3;
+INSERT INTO t8 VALUES (23,24);
+INSERT INTO t8 VALUES (24,24);
+UPDATE t7 SET b=25 WHERE a=3;
+INSERT INTO t8 VALUES (26,26);
+UPDATE t7 SET b=27 WHERE a=3;
+BEGIN;
+INSERT INTO t8 VALUES (28,28);
+INSERT INTO t8 VALUES (29,28), (30,28);
+INSERT INTO t8 VALUES (31,28);
+INSERT INTO t8 VALUES (32,28);
+INSERT INTO t8 VALUES (33,28);
+INSERT INTO t8 VALUES (34,28);
+INSERT INTO t8 VALUES (35,28);
+INSERT INTO t8 VALUES (36,28);
+INSERT INTO t8 VALUES (37,28);
+INSERT INTO t8 VALUES (38,28);
+INSERT INTO t8 VALUES (39,28);
+INSERT INTO t8 VALUES (40,28);
+INSERT INTO t8 VALUES (41,28);
+INSERT INTO t8 VALUES (42,28);
+COMMIT;
+SET @commit_id=43;
+INSERT INTO t8 VALUES (43,43);
+INSERT INTO t8 VALUES (44,44);
+UPDATE t7 SET b=45 WHERE a=3;
+INSERT INTO t8 VALUES (46,46);
+INSERT INTO t8 VALUES (47,47);
+UPDATE t7 SET b=48 WHERE a=3;
+INSERT INTO t8 VALUES (49,49);
+INSERT INTO t8 VALUES (50,50);
+SET @commit_id=44;
+INSERT INTO t8 VALUES (51,51);
+INSERT INTO t8 VALUES (52,52);
+UPDATE t7 SET b=53 WHERE a=3;
+INSERT INTO t8 VALUES (54,54);
+INSERT INTO t8 VALUES (55,55);
+UPDATE t7 SET b=56 WHERE a=3;
+INSERT INTO t8 VALUES (57,57);
+UPDATE t7 SET b=58 WHERE a=3;
+INSERT INTO t8 VALUES (58,58);
+INSERT INTO t8 VALUES (59,59);
+INSERT INTO t8 VALUES (60,60);
+INSERT INTO t8 VALUES (61,61);
+UPDATE t7 SET b=62 WHERE a=3;
+INSERT INTO t8 VALUES (63,63);
+INSERT INTO t8 VALUES (64,64);
+INSERT INTO t8 VALUES (65,65);
+INSERT INTO t8 VALUES (66,66);
+UPDATE t7 SET b=67 WHERE a=3;
+INSERT INTO t8 VALUES (68,68);
+UPDATE t7 SET b=69 WHERE a=3;
+UPDATE t7 SET b=70 WHERE a=3;
+UPDATE t7 SET b=71 WHERE a=3;
+INSERT INTO t8 VALUES (72,72);
+UPDATE t7 SET b=73 WHERE a=3;
+UPDATE t7 SET b=74 WHERE a=3;
+UPDATE t7 SET b=75 WHERE a=3;
+UPDATE t7 SET b=76 WHERE a=3;
+INSERT INTO t8 VALUES (77,77);
+UPDATE t7 SET b=78 WHERE a=3;
+INSERT INTO t8 VALUES (79,79);
+UPDATE t7 SET b=80 WHERE a=3;
+INSERT INTO t8 VALUES (81,81);
+UPDATE t7 SET b=82 WHERE a=3;
+INSERT INTO t8 VALUES (83,83);
+UPDATE t7 SET b=84 WHERE a=3;
+SET @commit_id=45;
+INSERT INTO t8 VALUES (85,85);
+UPDATE t7 SET b=86 WHERE a=3;
+INSERT INTO t8 VALUES (87,87);
+SET @commit_id=46;
+INSERT INTO t8 VALUES (88,88);
+INSERT INTO t8 VALUES (89,89);
+INSERT INTO t8 VALUES (90,90);
+SET SESSION debug_dbug=@old_dbug;
+INSERT INTO t8 VALUES (91,91);
+INSERT INTO t8 VALUES (92,92);
+INSERT INTO t8 VALUES (93,93);
+INSERT INTO t8 VALUES (94,94);
+INSERT INTO t8 VALUES (95,95);
+INSERT INTO t8 VALUES (96,96);
+INSERT INTO t8 VALUES (97,97);
+INSERT INTO t8 VALUES (98,98);
+INSERT INTO t8 VALUES (99,99);
+SELECT * FROM t7 ORDER BY a;
+a b
+1 1
+2 2
+3 86
+4 4
+5 5
+SELECT * FROM t8 ORDER BY a;
+a b
+1 1
+2 2
+3 3
+4 4
+5 5
+6 6
+7 7
+8 8
+12 12
+13 13
+16 16
+18 18
+19 19
+21 21
+23 24
+24 24
+26 26
+28 28
+29 28
+30 28
+31 28
+32 28
+33 28
+34 28
+35 28
+36 28
+37 28
+38 28
+39 28
+40 28
+41 28
+42 28
+43 43
+44 44
+46 46
+47 47
+49 49
+50 50
+51 51
+52 52
+54 54
+55 55
+57 57
+58 58
+59 59
+60 60
+61 61
+63 63
+64 64
+65 65
+66 66
+68 68
+72 72
+77 77
+79 79
+81 81
+83 83
+85 85
+87 87
+88 88
+89 89
+90 90
+91 91
+92 92
+93 93
+94 94
+95 95
+96 96
+97 97
+98 98
+99 99
+include/save_master_gtid.inc
+connection server_2;
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+SELECT * FROM t7 ORDER BY a;
+a b
+1 1
+2 2
+3 86
+4 4
+5 5
+SELECT * FROM t8 ORDER BY a;
+a b
+1 1
+2 2
+3 3
+4 4
+5 5
+6 6
+7 7
+8 8
+12 12
+13 13
+16 16
+18 18
+19 19
+21 21
+23 24
+24 24
+26 26
+28 28
+29 28
+30 28
+31 28
+32 28
+33 28
+34 28
+35 28
+36 28
+37 28
+38 28
+39 28
+40 28
+41 28
+42 28
+43 43
+44 44
+46 46
+47 47
+49 49
+50 50
+51 51
+52 52
+54 54
+55 55
+57 57
+58 58
+59 59
+60 60
+61 61
+63 63
+64 64
+65 65
+66 66
+68 68
+72 72
+77 77
+79 79
+81 81
+83 83
+85 85
+87 87
+88 88
+89 89
+90 90
+91 91
+92 92
+93 93
+94 94
+95 95
+96 96
+97 97
+98 98
+99 99
+connection server_2;
+include/stop_slave.inc
+SET GLOBAL slave_parallel_threads=@old_parallel_threads;
+SET GLOBAL slave_transaction_retries=@old_retries;
+include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+connection server_1;
+DROP TABLE if exists t1,t2,t3,t4,t5,t6,t7,t8;
+Warnings:
+Note 1051 Unknown table 'test.t1'
+Note 1051 Unknown table 'test.t2'
+Note 1051 Unknown table 'test.t3'
+Note 1051 Unknown table 'test.t4'
+Note 1051 Unknown table 'test.t5'
+Note 1051 Unknown table 'test.t6'
+SET DEBUG_SYNC= 'RESET';
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result b/mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result
index 0ecc28a94ec..f4648160bbd 100644
--- a/mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result
@@ -674,7 +674,7 @@ t16 CREATE TABLE `t16` (
`c3` text DEFAULT NULL,
`c4` blob DEFAULT NULL,
`c5` char(5) DEFAULT NULL,
- `c6` int(11) DEFAULT '1',
+ `c6` int(11) DEFAULT 1,
`c7` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`c1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
diff --git a/mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result b/mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result
index a2888377e39..f3863b27325 100644
--- a/mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result
@@ -674,7 +674,7 @@ t16 CREATE TABLE `t16` (
`c3` text DEFAULT NULL,
`c4` blob DEFAULT NULL,
`c5` char(5) DEFAULT NULL,
- `c6` int(11) DEFAULT '1',
+ `c6` int(11) DEFAULT 1,
`c7` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`c1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
diff --git a/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result b/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result
index ceb4fdf39d5..e7b0d6f29c8 100644
--- a/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result
+++ b/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result
@@ -44,7 +44,7 @@ t3 CREATE TABLE `t3` (
show create table t5;
Table Create Table
t5 CREATE TABLE `t5` (
- `id` int(11) NOT NULL DEFAULT '0',
+ `id` int(11) NOT NULL DEFAULT 0,
`created` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
connection master;
diff --git a/mysql-test/suite/rpl/r/rpl_multi_engine.result b/mysql-test/suite/rpl/r/rpl_multi_engine.result
index c39d9f5f374..075cbc14fe7 100644
--- a/mysql-test/suite/rpl/r/rpl_multi_engine.result
+++ b/mysql-test/suite/rpl/r/rpl_multi_engine.result
@@ -17,8 +17,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
@@ -34,8 +34,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
@@ -76,8 +76,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
@@ -118,8 +118,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
@@ -160,8 +160,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
@@ -177,8 +177,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
@@ -219,8 +219,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
@@ -261,8 +261,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
@@ -303,8 +303,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
@@ -320,8 +320,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
@@ -362,8 +362,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
@@ -404,8 +404,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
diff --git a/mysql-test/suite/rpl/r/rpl_parallel.result b/mysql-test/suite/rpl/r/rpl_parallel.result
index 1b149fb170e..86154204666 100644
--- a/mysql-test/suite/rpl/r/rpl_parallel.result
+++ b/mysql-test/suite/rpl/r/rpl_parallel.result
@@ -1504,303 +1504,11 @@ a
1044
1045
1046
-include/stop_slave.inc
-SET GLOBAL slave_parallel_mode='conservative';
-include/start_slave.inc
-*** MDEV-7847: "Slave worker thread retried transaction 10 time(s) in vain, giving up", followed by replication hanging ***
-*** MDEV-7882: Excessive transaction retry in parallel replication ***
-connection server_1;
-CREATE TABLE t7 (a int PRIMARY KEY, b INT) ENGINE=InnoDB;
-CREATE TABLE t8 (a int PRIMARY KEY, b INT) ENGINE=InnoDB;
-connection server_2;
-include/stop_slave.inc
-SET GLOBAL slave_parallel_threads=40;
-SELECT @old_retries:=@@GLOBAL.slave_transaction_retries;
-@old_retries:=@@GLOBAL.slave_transaction_retries
-10
-SET GLOBAL slave_transaction_retries= 5;
-connection server_1;
-INSERT INTO t7 VALUES (1,1), (2,2), (3,3), (4,4), (5,5);
-SET @old_dbug= @@SESSION.debug_dbug;
-SET @commit_id= 42;
-SET SESSION debug_dbug="+d,binlog_force_commit_id";
-INSERT INTO t8 VALUES (1,1);
-INSERT INTO t8 VALUES (2,2);
-INSERT INTO t8 VALUES (3,3);
-INSERT INTO t8 VALUES (4,4);
-INSERT INTO t8 VALUES (5,5);
-INSERT INTO t8 VALUES (6,6);
-INSERT INTO t8 VALUES (7,7);
-INSERT INTO t8 VALUES (8,8);
-UPDATE t7 SET b=9 WHERE a=3;
-UPDATE t7 SET b=10 WHERE a=3;
-UPDATE t7 SET b=11 WHERE a=3;
-INSERT INTO t8 VALUES (12,12);
-INSERT INTO t8 VALUES (13,13);
-UPDATE t7 SET b=14 WHERE a=3;
-UPDATE t7 SET b=15 WHERE a=3;
-INSERT INTO t8 VALUES (16,16);
-UPDATE t7 SET b=17 WHERE a=3;
-INSERT INTO t8 VALUES (18,18);
-INSERT INTO t8 VALUES (19,19);
-UPDATE t7 SET b=20 WHERE a=3;
-INSERT INTO t8 VALUES (21,21);
-UPDATE t7 SET b=22 WHERE a=3;
-INSERT INTO t8 VALUES (23,24);
-INSERT INTO t8 VALUES (24,24);
-UPDATE t7 SET b=25 WHERE a=3;
-INSERT INTO t8 VALUES (26,26);
-UPDATE t7 SET b=27 WHERE a=3;
-BEGIN;
-INSERT INTO t8 VALUES (28,28);
-INSERT INTO t8 VALUES (29,28), (30,28);
-INSERT INTO t8 VALUES (31,28);
-INSERT INTO t8 VALUES (32,28);
-INSERT INTO t8 VALUES (33,28);
-INSERT INTO t8 VALUES (34,28);
-INSERT INTO t8 VALUES (35,28);
-INSERT INTO t8 VALUES (36,28);
-INSERT INTO t8 VALUES (37,28);
-INSERT INTO t8 VALUES (38,28);
-INSERT INTO t8 VALUES (39,28);
-INSERT INTO t8 VALUES (40,28);
-INSERT INTO t8 VALUES (41,28);
-INSERT INTO t8 VALUES (42,28);
-COMMIT;
-SET @commit_id=43;
-INSERT INTO t8 VALUES (43,43);
-INSERT INTO t8 VALUES (44,44);
-UPDATE t7 SET b=45 WHERE a=3;
-INSERT INTO t8 VALUES (46,46);
-INSERT INTO t8 VALUES (47,47);
-UPDATE t7 SET b=48 WHERE a=3;
-INSERT INTO t8 VALUES (49,49);
-INSERT INTO t8 VALUES (50,50);
-SET @commit_id=44;
-INSERT INTO t8 VALUES (51,51);
-INSERT INTO t8 VALUES (52,52);
-UPDATE t7 SET b=53 WHERE a=3;
-INSERT INTO t8 VALUES (54,54);
-INSERT INTO t8 VALUES (55,55);
-UPDATE t7 SET b=56 WHERE a=3;
-INSERT INTO t8 VALUES (57,57);
-UPDATE t7 SET b=58 WHERE a=3;
-INSERT INTO t8 VALUES (58,58);
-INSERT INTO t8 VALUES (59,59);
-INSERT INTO t8 VALUES (60,60);
-INSERT INTO t8 VALUES (61,61);
-UPDATE t7 SET b=62 WHERE a=3;
-INSERT INTO t8 VALUES (63,63);
-INSERT INTO t8 VALUES (64,64);
-INSERT INTO t8 VALUES (65,65);
-INSERT INTO t8 VALUES (66,66);
-UPDATE t7 SET b=67 WHERE a=3;
-INSERT INTO t8 VALUES (68,68);
-UPDATE t7 SET b=69 WHERE a=3;
-UPDATE t7 SET b=70 WHERE a=3;
-UPDATE t7 SET b=71 WHERE a=3;
-INSERT INTO t8 VALUES (72,72);
-UPDATE t7 SET b=73 WHERE a=3;
-UPDATE t7 SET b=74 WHERE a=3;
-UPDATE t7 SET b=75 WHERE a=3;
-UPDATE t7 SET b=76 WHERE a=3;
-INSERT INTO t8 VALUES (77,77);
-UPDATE t7 SET b=78 WHERE a=3;
-INSERT INTO t8 VALUES (79,79);
-UPDATE t7 SET b=80 WHERE a=3;
-INSERT INTO t8 VALUES (81,81);
-UPDATE t7 SET b=82 WHERE a=3;
-INSERT INTO t8 VALUES (83,83);
-UPDATE t7 SET b=84 WHERE a=3;
-SET @commit_id=45;
-INSERT INTO t8 VALUES (85,85);
-UPDATE t7 SET b=86 WHERE a=3;
-INSERT INTO t8 VALUES (87,87);
-SET @commit_id=46;
-INSERT INTO t8 VALUES (88,88);
-INSERT INTO t8 VALUES (89,89);
-INSERT INTO t8 VALUES (90,90);
-SET SESSION debug_dbug=@old_dbug;
-INSERT INTO t8 VALUES (91,91);
-INSERT INTO t8 VALUES (92,92);
-INSERT INTO t8 VALUES (93,93);
-INSERT INTO t8 VALUES (94,94);
-INSERT INTO t8 VALUES (95,95);
-INSERT INTO t8 VALUES (96,96);
-INSERT INTO t8 VALUES (97,97);
-INSERT INTO t8 VALUES (98,98);
-INSERT INTO t8 VALUES (99,99);
-SELECT * FROM t7 ORDER BY a;
-a b
-1 1
-2 2
-3 86
-4 4
-5 5
-SELECT * FROM t8 ORDER BY a;
-a b
-1 1
-2 2
-3 3
-4 4
-5 5
-6 6
-7 7
-8 8
-12 12
-13 13
-16 16
-18 18
-19 19
-21 21
-23 24
-24 24
-26 26
-28 28
-29 28
-30 28
-31 28
-32 28
-33 28
-34 28
-35 28
-36 28
-37 28
-38 28
-39 28
-40 28
-41 28
-42 28
-43 43
-44 44
-46 46
-47 47
-49 49
-50 50
-51 51
-52 52
-54 54
-55 55
-57 57
-58 58
-59 59
-60 60
-61 61
-63 63
-64 64
-65 65
-66 66
-68 68
-72 72
-77 77
-79 79
-81 81
-83 83
-85 85
-87 87
-88 88
-89 89
-90 90
-91 91
-92 92
-93 93
-94 94
-95 95
-96 96
-97 97
-98 98
-99 99
-include/save_master_gtid.inc
-connection server_2;
-include/start_slave.inc
-include/sync_with_master_gtid.inc
-SELECT * FROM t7 ORDER BY a;
-a b
-1 1
-2 2
-3 86
-4 4
-5 5
-SELECT * FROM t8 ORDER BY a;
-a b
-1 1
-2 2
-3 3
-4 4
-5 5
-6 6
-7 7
-8 8
-12 12
-13 13
-16 16
-18 18
-19 19
-21 21
-23 24
-24 24
-26 26
-28 28
-29 28
-30 28
-31 28
-32 28
-33 28
-34 28
-35 28
-36 28
-37 28
-38 28
-39 28
-40 28
-41 28
-42 28
-43 43
-44 44
-46 46
-47 47
-49 49
-50 50
-51 51
-52 52
-54 54
-55 55
-57 57
-58 58
-59 59
-60 60
-61 61
-63 63
-64 64
-65 65
-66 66
-68 68
-72 72
-77 77
-79 79
-81 81
-83 83
-85 85
-87 87
-88 88
-89 89
-90 90
-91 91
-92 92
-93 93
-94 94
-95 95
-96 96
-97 97
-98 98
-99 99
-include/stop_slave.inc
-SET GLOBAL slave_transaction_retries= @old_retries;
-SET GLOBAL slave_parallel_threads=10;
-include/start_slave.inc
*** MDEV-7888: ANALYZE TABLE does wakeup_subsequent_commits(), causing wrong binlog order and parallel replication hang ***
connection server_2;
include/stop_slave.inc
+SET GLOBAL slave_parallel_mode='conservative';
+SET GLOBAL slave_parallel_threads=10;
SET @old_dbug= @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug= '+d,inject_analyze_table_sleep';
connection server_1;
@@ -1949,49 +1657,6 @@ include/stop_slave.inc
SET GLOBAL debug_dbug= @old_debg;
SET GLOBAL max_relay_log_size= @old_max;
include/start_slave.inc
-*** MDEV-8302: Duplicate key with parallel replication ***
-connection server_2;
-include/stop_slave.inc
-/* Inject a small sleep which makes the race easier to hit. */
-SET @old_dbug=@@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug="+d,inject_mdev8302";
-connection server_1;
-INSERT INTO t7 VALUES (100,1), (101,2), (102,3), (103,4), (104,5);
-SET @old_dbug= @@SESSION.debug_dbug;
-SET @commit_id= 20000;
-SET SESSION debug_dbug="+d,binlog_force_commit_id";
-SET SESSION debug_dbug=@old_dbug;
-SELECT * FROM t7 ORDER BY a;
-a b
-1 1
-2 2
-3 86
-4 4
-5 5
-100 5
-101 1
-102 2
-103 3
-104 4
-include/save_master_gtid.inc
-connection server_2;
-include/start_slave.inc
-include/sync_with_master_gtid.inc
-SELECT * FROM t7 ORDER BY a;
-a b
-1 1
-2 2
-3 86
-4 4
-5 5
-100 5
-101 1
-102 2
-103 3
-104 4
-include/stop_slave.inc
-SET GLOBAL debug_dbug=@old_dbug;
-include/start_slave.inc
*** MDEV-8725: Assertion on ROLLBACK statement in the binary log ***
connection server_1;
BEGIN;
@@ -2019,6 +1684,6 @@ include/start_slave.inc
SET DEBUG_SYNC= 'RESET';
connection server_1;
DROP function foo;
-DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8;
+DROP TABLE t1,t2,t3,t4,t5,t6;
SET DEBUG_SYNC= 'RESET';
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_parallel_conflicts.result b/mysql-test/suite/rpl/r/rpl_parallel_conflicts.result
new file mode 100644
index 00000000000..b15de6fc215
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_parallel_conflicts.result
@@ -0,0 +1,333 @@
+include/master-slave.inc
+[connection master]
+*** MDEV-7847: "Slave worker thread retried transaction 10 time(s) in vain, giving up", followed by replication hanging ***
+*** MDEV-7882: Excessive transaction retry in parallel replication ***
+connection server_1;
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t7 (a int PRIMARY KEY, b INT) ENGINE=InnoDB;
+CREATE TABLE t8 (a int PRIMARY KEY, b INT) ENGINE=InnoDB;
+connection server_2;
+include/stop_slave.inc
+connection server_1;
+INSERT INTO t7 VALUES (1,1), (2,2), (3,3), (4,4), (5,5);
+SET @old_dbug= @@SESSION.debug_dbug;
+SET @commit_id= 42;
+SET SESSION debug_dbug="+d,binlog_force_commit_id";
+INSERT INTO t8 VALUES (1,1);
+INSERT INTO t8 VALUES (2,2);
+INSERT INTO t8 VALUES (3,3);
+INSERT INTO t8 VALUES (4,4);
+INSERT INTO t8 VALUES (5,5);
+INSERT INTO t8 VALUES (6,6);
+INSERT INTO t8 VALUES (7,7);
+INSERT INTO t8 VALUES (8,8);
+UPDATE t7 SET b=9 WHERE a=3;
+UPDATE t7 SET b=10 WHERE a=3;
+UPDATE t7 SET b=11 WHERE a=3;
+INSERT INTO t8 VALUES (12,12);
+INSERT INTO t8 VALUES (13,13);
+UPDATE t7 SET b=14 WHERE a=3;
+UPDATE t7 SET b=15 WHERE a=3;
+INSERT INTO t8 VALUES (16,16);
+UPDATE t7 SET b=17 WHERE a=3;
+INSERT INTO t8 VALUES (18,18);
+INSERT INTO t8 VALUES (19,19);
+UPDATE t7 SET b=20 WHERE a=3;
+INSERT INTO t8 VALUES (21,21);
+UPDATE t7 SET b=22 WHERE a=3;
+INSERT INTO t8 VALUES (23,24);
+INSERT INTO t8 VALUES (24,24);
+UPDATE t7 SET b=25 WHERE a=3;
+INSERT INTO t8 VALUES (26,26);
+UPDATE t7 SET b=27 WHERE a=3;
+BEGIN;
+INSERT INTO t8 VALUES (28,28);
+INSERT INTO t8 VALUES (29,28), (30,28);
+INSERT INTO t8 VALUES (31,28);
+INSERT INTO t8 VALUES (32,28);
+INSERT INTO t8 VALUES (33,28);
+INSERT INTO t8 VALUES (34,28);
+INSERT INTO t8 VALUES (35,28);
+INSERT INTO t8 VALUES (36,28);
+INSERT INTO t8 VALUES (37,28);
+INSERT INTO t8 VALUES (38,28);
+INSERT INTO t8 VALUES (39,28);
+INSERT INTO t8 VALUES (40,28);
+INSERT INTO t8 VALUES (41,28);
+INSERT INTO t8 VALUES (42,28);
+COMMIT;
+SET @commit_id=43;
+INSERT INTO t8 VALUES (43,43);
+INSERT INTO t8 VALUES (44,44);
+UPDATE t7 SET b=45 WHERE a=3;
+INSERT INTO t8 VALUES (46,46);
+INSERT INTO t8 VALUES (47,47);
+UPDATE t7 SET b=48 WHERE a=3;
+INSERT INTO t8 VALUES (49,49);
+INSERT INTO t8 VALUES (50,50);
+SET @commit_id=44;
+INSERT INTO t8 VALUES (51,51);
+INSERT INTO t8 VALUES (52,52);
+UPDATE t7 SET b=53 WHERE a=3;
+INSERT INTO t8 VALUES (54,54);
+INSERT INTO t8 VALUES (55,55);
+UPDATE t7 SET b=56 WHERE a=3;
+INSERT INTO t8 VALUES (57,57);
+UPDATE t7 SET b=58 WHERE a=3;
+INSERT INTO t8 VALUES (58,58);
+INSERT INTO t8 VALUES (59,59);
+INSERT INTO t8 VALUES (60,60);
+INSERT INTO t8 VALUES (61,61);
+UPDATE t7 SET b=62 WHERE a=3;
+INSERT INTO t8 VALUES (63,63);
+INSERT INTO t8 VALUES (64,64);
+INSERT INTO t8 VALUES (65,65);
+INSERT INTO t8 VALUES (66,66);
+UPDATE t7 SET b=67 WHERE a=3;
+INSERT INTO t8 VALUES (68,68);
+UPDATE t7 SET b=69 WHERE a=3;
+UPDATE t7 SET b=70 WHERE a=3;
+UPDATE t7 SET b=71 WHERE a=3;
+INSERT INTO t8 VALUES (72,72);
+UPDATE t7 SET b=73 WHERE a=3;
+UPDATE t7 SET b=74 WHERE a=3;
+UPDATE t7 SET b=75 WHERE a=3;
+UPDATE t7 SET b=76 WHERE a=3;
+INSERT INTO t8 VALUES (77,77);
+UPDATE t7 SET b=78 WHERE a=3;
+INSERT INTO t8 VALUES (79,79);
+UPDATE t7 SET b=80 WHERE a=3;
+INSERT INTO t8 VALUES (81,81);
+UPDATE t7 SET b=82 WHERE a=3;
+INSERT INTO t8 VALUES (83,83);
+UPDATE t7 SET b=84 WHERE a=3;
+SET @commit_id=45;
+INSERT INTO t8 VALUES (85,85);
+UPDATE t7 SET b=86 WHERE a=3;
+INSERT INTO t8 VALUES (87,87);
+SET @commit_id=46;
+INSERT INTO t8 VALUES (88,88);
+INSERT INTO t8 VALUES (89,89);
+INSERT INTO t8 VALUES (90,90);
+SET SESSION debug_dbug=@old_dbug;
+INSERT INTO t8 VALUES (91,91);
+INSERT INTO t8 VALUES (92,92);
+INSERT INTO t8 VALUES (93,93);
+INSERT INTO t8 VALUES (94,94);
+INSERT INTO t8 VALUES (95,95);
+INSERT INTO t8 VALUES (96,96);
+INSERT INTO t8 VALUES (97,97);
+INSERT INTO t8 VALUES (98,98);
+INSERT INTO t8 VALUES (99,99);
+SELECT * FROM t7 ORDER BY a;
+a b
+1 1
+2 2
+3 86
+4 4
+5 5
+SELECT * FROM t8 ORDER BY a;
+a b
+1 1
+2 2
+3 3
+4 4
+5 5
+6 6
+7 7
+8 8
+12 12
+13 13
+16 16
+18 18
+19 19
+21 21
+23 24
+24 24
+26 26
+28 28
+29 28
+30 28
+31 28
+32 28
+33 28
+34 28
+35 28
+36 28
+37 28
+38 28
+39 28
+40 28
+41 28
+42 28
+43 43
+44 44
+46 46
+47 47
+49 49
+50 50
+51 51
+52 52
+54 54
+55 55
+57 57
+58 58
+59 59
+60 60
+61 61
+63 63
+64 64
+65 65
+66 66
+68 68
+72 72
+77 77
+79 79
+81 81
+83 83
+85 85
+87 87
+88 88
+89 89
+90 90
+91 91
+92 92
+93 93
+94 94
+95 95
+96 96
+97 97
+98 98
+99 99
+include/save_master_gtid.inc
+connection server_2;
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+SELECT * FROM t7 ORDER BY a;
+a b
+1 1
+2 2
+3 86
+4 4
+5 5
+SELECT * FROM t8 ORDER BY a;
+a b
+1 1
+2 2
+3 3
+4 4
+5 5
+6 6
+7 7
+8 8
+12 12
+13 13
+16 16
+18 18
+19 19
+21 21
+23 24
+24 24
+26 26
+28 28
+29 28
+30 28
+31 28
+32 28
+33 28
+34 28
+35 28
+36 28
+37 28
+38 28
+39 28
+40 28
+41 28
+42 28
+43 43
+44 44
+46 46
+47 47
+49 49
+50 50
+51 51
+52 52
+54 54
+55 55
+57 57
+58 58
+59 59
+60 60
+61 61
+63 63
+64 64
+65 65
+66 66
+68 68
+72 72
+77 77
+79 79
+81 81
+83 83
+85 85
+87 87
+88 88
+89 89
+90 90
+91 91
+92 92
+93 93
+94 94
+95 95
+96 96
+97 97
+98 98
+99 99
+*** MDEV-8302: Duplicate key with parallel replication ***
+connection server_2;
+include/stop_slave.inc
+/* Inject a small sleep which makes the race easier to hit. */
+SET @old_dbug=@@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug="+d,inject_mdev8302";
+connection server_1;
+INSERT INTO t7 VALUES (100,1), (101,2), (102,3), (103,4), (104,5);
+SET @old_dbug= @@SESSION.debug_dbug;
+SET @commit_id= 20000;
+SET SESSION debug_dbug="+d,binlog_force_commit_id";
+SET SESSION debug_dbug=@old_dbug;
+SELECT * FROM t7 ORDER BY a;
+a b
+1 1
+2 2
+3 86
+4 4
+5 5
+100 5
+101 1
+102 2
+103 3
+104 4
+include/save_master_gtid.inc
+connection server_2;
+include/start_slave.inc
+include/sync_with_master_gtid.inc
+SELECT * FROM t7 ORDER BY a;
+a b
+1 1
+2 2
+3 86
+4 4
+5 5
+100 5
+101 1
+102 2
+103 3
+104 4
+include/stop_slave.inc
+SET GLOBAL debug_dbug=@old_dbug;
+include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+connection server_1;
+DROP TABLE t7,t8;
+SET DEBUG_SYNC= 'RESET';
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_8partition.result b/mysql-test/suite/rpl/r/rpl_row_basic_8partition.result
index a88d81caaf0..37548cad4db 100644
--- a/mysql-test/suite/rpl/r/rpl_row_basic_8partition.result
+++ b/mysql-test/suite/rpl/r/rpl_row_basic_8partition.result
@@ -22,8 +22,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL
@@ -43,8 +43,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL
@@ -110,8 +110,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` text DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL
@@ -131,8 +131,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` text DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL
@@ -207,8 +207,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL
@@ -225,8 +225,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL
@@ -289,8 +289,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` text DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL
@@ -307,8 +307,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` text DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL
@@ -378,8 +378,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL
@@ -394,8 +394,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL
@@ -455,8 +455,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` text DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL
@@ -471,8 +471,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` text DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL
@@ -540,8 +540,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL,
@@ -557,8 +557,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned DEFAULT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL,
@@ -620,8 +620,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned NOT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL,
@@ -637,8 +637,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` varchar(255) DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned NOT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL,
@@ -700,8 +700,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` text DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned NOT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL,
@@ -717,8 +717,8 @@ t1 CREATE TABLE `t1` (
`b1` bit(8) DEFAULT NULL,
`vc` text DEFAULT NULL,
`bc` char(255) DEFAULT NULL,
- `d` decimal(10,4) DEFAULT '0.0000',
- `f` float DEFAULT '0',
+ `d` decimal(10,4) DEFAULT 0.0000,
+ `f` float DEFAULT 0,
`total` bigint(20) unsigned NOT NULL,
`y` year(4) DEFAULT NULL,
`t` date DEFAULT NULL,
diff --git a/mysql-test/suite/rpl/r/rpl_temporary.result b/mysql-test/suite/rpl/r/rpl_temporary.result
index e1b34026cb7..37f13c8afb0 100644
--- a/mysql-test/suite/rpl/r/rpl_temporary.result
+++ b/mysql-test/suite/rpl/r/rpl_temporary.result
@@ -183,5 +183,63 @@ disconnect cont43748;
-- throw out test-user on slave.
connection slave;
DROP USER user43748@127.0.0.1;
+#
+# MDEV-10216: Assertion `strcmp(share->unique_file_name,filename) ||
+# share->last_version' failed in myisam/mi_open.c:67: test_if_reopen
+#
+connection master;
+CREATE TEMPORARY TABLE t1(i INT PRIMARY KEY) ENGINE=MYISAM;
+INSERT INTO t1 VALUES(1);
+SELECT COUNT(*)=1 FROM t1;
+COUNT(*)=1
+1
+ALTER TABLE t1 RENAME t2;
+SELECT COUNT(*)=1 FROM t2;
+COUNT(*)=1
+1
+ALTER TABLE t2 RENAME t1;
+ALTER TABLE t1 DISABLE KEYS;
+ALTER TABLE t1 ENABLE KEYS;
+LOCK TABLES t1 WRITE;
+ALTER TABLE t1 RENAME t2;
+SELECT COUNT(*)=1 FROM t2;
+COUNT(*)=1
+1
+ALTER TABLE t2 RENAME t1;
+ALTER TABLE t1 DISABLE KEYS;
+ALTER TABLE t1 ENABLE KEYS;
+UNLOCK TABLES;
+LOCK TABLES t1 READ;
+ALTER TABLE t1 RENAME t2;
+SELECT COUNT(*)=1 FROM t2;
+COUNT(*)=1
+1
+ALTER TABLE t2 RENAME t1;
+ALTER TABLE t1 DISABLE KEYS;
+ALTER TABLE t1 ENABLE KEYS;
+UNLOCK TABLES;
+FLUSH TABLES WITH READ LOCK;
+ALTER TABLE t1 RENAME t2;
+SELECT COUNT(*)=1 FROM t2;
+COUNT(*)=1
+1
+ALTER TABLE t2 RENAME t1;
+ALTER TABLE t1 DISABLE KEYS;
+ALTER TABLE t1 ENABLE KEYS;
+UNLOCK TABLES;
+ALTER TABLE t1 RENAME t2, LOCK SHARED;
+ALTER TABLE t2 RENAME t1, LOCK EXCLUSIVE;
+DROP TABLE t1;
+#
+# MDEV-10320: NO-OP ALTER TABLE on temporary tables getting logged
+# under row binlog format
+#
+connection master;
+CREATE TEMPORARY TABLE t1(i INT PRIMARY KEY) ENGINE=MYISAM;
+ALTER TABLE t1;
+ALTER TABLE t1 ADD COLUMN IF NOT EXISTS I INT;
+Warnings:
+Note 1060 Duplicate column name 'I'
+DROP TABLE t1;
End of 5.1 tests
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_mdev6020.test b/mysql-test/suite/rpl/t/rpl_mdev6020.test
index 2fd342f5eda..8484e3e11c0 100644
--- a/mysql-test/suite/rpl/t/rpl_mdev6020.test
+++ b/mysql-test/suite/rpl/t/rpl_mdev6020.test
@@ -1,8 +1,10 @@
+# Running this with valgrind can take > 5000 seconds with xtradb
+--source include/not_valgrind.inc
+
--source include/have_innodb.inc
--source include/have_partition.inc
--source include/have_binlog_format_mixed_or_row.inc
--source include/master-slave.inc
-
--connection slave
--source include/stop_slave.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel.test b/mysql-test/suite/rpl/t/rpl_parallel.test
index a7e5353a9fc..5d2232269cc 100644
--- a/mysql-test/suite/rpl/t/rpl_parallel.test
+++ b/mysql-test/suite/rpl/t/rpl_parallel.test
@@ -1972,218 +1972,14 @@ SET GLOBAL slave_parallel_mode=minimal;
--source include/start_slave.inc
--source include/sync_with_master_gtid.inc
SELECT * FROM t2 WHERE a >= 1040 ORDER BY a;
---source include/stop_slave.inc
-SET GLOBAL slave_parallel_mode='conservative';
---source include/start_slave.inc
-
-
---echo *** MDEV-7847: "Slave worker thread retried transaction 10 time(s) in vain, giving up", followed by replication hanging ***
---echo *** MDEV-7882: Excessive transaction retry in parallel replication ***
-
---connection server_1
-CREATE TABLE t7 (a int PRIMARY KEY, b INT) ENGINE=InnoDB;
-CREATE TABLE t8 (a int PRIMARY KEY, b INT) ENGINE=InnoDB;
---save_master_pos
-
---connection server_2
---sync_with_master
---source include/stop_slave.inc
-SET GLOBAL slave_parallel_threads=40;
-SELECT @old_retries:=@@GLOBAL.slave_transaction_retries;
-SET GLOBAL slave_transaction_retries= 5;
-
-
-# Using dbug error injection, we artificially create event groups with a lot of
-# conflicting transactions in each event group. The bugs were originally seen
-# "in the wild" with transactions that did not conflict on the master, and only
-# conflicted very rarely on the slave (maybe some edge case with InnoDB btree
-# page splits or something like that). The event groups here loosely reflect
-# the structure of the original failure's group commits.
-
-
---connection server_1
-INSERT INTO t7 VALUES (1,1), (2,2), (3,3), (4,4), (5,5);
-SET @old_dbug= @@SESSION.debug_dbug;
-SET @commit_id= 42;
-SET SESSION debug_dbug="+d,binlog_force_commit_id";
-INSERT INTO t8 VALUES (1,1);
-INSERT INTO t8 VALUES (2,2);
-INSERT INTO t8 VALUES (3,3);
-INSERT INTO t8 VALUES (4,4);
-INSERT INTO t8 VALUES (5,5);
-INSERT INTO t8 VALUES (6,6);
-INSERT INTO t8 VALUES (7,7);
-INSERT INTO t8 VALUES (8,8);
-
-UPDATE t7 SET b=9 WHERE a=3;
-UPDATE t7 SET b=10 WHERE a=3;
-UPDATE t7 SET b=11 WHERE a=3;
-
-INSERT INTO t8 VALUES (12,12);
-INSERT INTO t8 VALUES (13,13);
-
-UPDATE t7 SET b=14 WHERE a=3;
-UPDATE t7 SET b=15 WHERE a=3;
-
-INSERT INTO t8 VALUES (16,16);
-
-UPDATE t7 SET b=17 WHERE a=3;
-
-INSERT INTO t8 VALUES (18,18);
-INSERT INTO t8 VALUES (19,19);
-
-UPDATE t7 SET b=20 WHERE a=3;
-
-INSERT INTO t8 VALUES (21,21);
-
-UPDATE t7 SET b=22 WHERE a=3;
-
-INSERT INTO t8 VALUES (23,24);
-INSERT INTO t8 VALUES (24,24);
-
-UPDATE t7 SET b=25 WHERE a=3;
-
-INSERT INTO t8 VALUES (26,26);
-
-UPDATE t7 SET b=27 WHERE a=3;
-
-BEGIN;
-INSERT INTO t8 VALUES (28,28);
-INSERT INTO t8 VALUES (29,28), (30,28);
-INSERT INTO t8 VALUES (31,28);
-INSERT INTO t8 VALUES (32,28);
-INSERT INTO t8 VALUES (33,28);
-INSERT INTO t8 VALUES (34,28);
-INSERT INTO t8 VALUES (35,28);
-INSERT INTO t8 VALUES (36,28);
-INSERT INTO t8 VALUES (37,28);
-INSERT INTO t8 VALUES (38,28);
-INSERT INTO t8 VALUES (39,28);
-INSERT INTO t8 VALUES (40,28);
-INSERT INTO t8 VALUES (41,28);
-INSERT INTO t8 VALUES (42,28);
-COMMIT;
-
-
-SET @commit_id=43;
-INSERT INTO t8 VALUES (43,43);
-INSERT INTO t8 VALUES (44,44);
-
-UPDATE t7 SET b=45 WHERE a=3;
-
-INSERT INTO t8 VALUES (46,46);
-INSERT INTO t8 VALUES (47,47);
-
-UPDATE t7 SET b=48 WHERE a=3;
-
-INSERT INTO t8 VALUES (49,49);
-INSERT INTO t8 VALUES (50,50);
-
-
-SET @commit_id=44;
-INSERT INTO t8 VALUES (51,51);
-INSERT INTO t8 VALUES (52,52);
-
-UPDATE t7 SET b=53 WHERE a=3;
-
-INSERT INTO t8 VALUES (54,54);
-INSERT INTO t8 VALUES (55,55);
-
-UPDATE t7 SET b=56 WHERE a=3;
-
-INSERT INTO t8 VALUES (57,57);
-
-UPDATE t7 SET b=58 WHERE a=3;
-
-INSERT INTO t8 VALUES (58,58);
-INSERT INTO t8 VALUES (59,59);
-INSERT INTO t8 VALUES (60,60);
-INSERT INTO t8 VALUES (61,61);
-
-UPDATE t7 SET b=62 WHERE a=3;
-
-INSERT INTO t8 VALUES (63,63);
-INSERT INTO t8 VALUES (64,64);
-INSERT INTO t8 VALUES (65,65);
-INSERT INTO t8 VALUES (66,66);
-
-UPDATE t7 SET b=67 WHERE a=3;
-
-INSERT INTO t8 VALUES (68,68);
-
-UPDATE t7 SET b=69 WHERE a=3;
-UPDATE t7 SET b=70 WHERE a=3;
-UPDATE t7 SET b=71 WHERE a=3;
-
-INSERT INTO t8 VALUES (72,72);
-
-UPDATE t7 SET b=73 WHERE a=3;
-UPDATE t7 SET b=74 WHERE a=3;
-UPDATE t7 SET b=75 WHERE a=3;
-UPDATE t7 SET b=76 WHERE a=3;
-
-INSERT INTO t8 VALUES (77,77);
-
-UPDATE t7 SET b=78 WHERE a=3;
-
-INSERT INTO t8 VALUES (79,79);
-
-UPDATE t7 SET b=80 WHERE a=3;
-
-INSERT INTO t8 VALUES (81,81);
-
-UPDATE t7 SET b=82 WHERE a=3;
-
-INSERT INTO t8 VALUES (83,83);
-
-UPDATE t7 SET b=84 WHERE a=3;
-
-
-SET @commit_id=45;
-INSERT INTO t8 VALUES (85,85);
-UPDATE t7 SET b=86 WHERE a=3;
-INSERT INTO t8 VALUES (87,87);
-
-
-SET @commit_id=46;
-INSERT INTO t8 VALUES (88,88);
-INSERT INTO t8 VALUES (89,89);
-INSERT INTO t8 VALUES (90,90);
-
-SET SESSION debug_dbug=@old_dbug;
-
-INSERT INTO t8 VALUES (91,91);
-INSERT INTO t8 VALUES (92,92);
-INSERT INTO t8 VALUES (93,93);
-INSERT INTO t8 VALUES (94,94);
-INSERT INTO t8 VALUES (95,95);
-INSERT INTO t8 VALUES (96,96);
-INSERT INTO t8 VALUES (97,97);
-INSERT INTO t8 VALUES (98,98);
-INSERT INTO t8 VALUES (99,99);
-
-
-SELECT * FROM t7 ORDER BY a;
-SELECT * FROM t8 ORDER BY a;
---source include/save_master_gtid.inc
+--echo *** MDEV-7888: ANALYZE TABLE does wakeup_subsequent_commits(), causing wrong binlog order and parallel replication hang ***
--connection server_2
---source include/start_slave.inc
---source include/sync_with_master_gtid.inc
-SELECT * FROM t7 ORDER BY a;
-SELECT * FROM t8 ORDER BY a;
-
--source include/stop_slave.inc
-SET GLOBAL slave_transaction_retries= @old_retries;
+SET GLOBAL slave_parallel_mode='conservative';
SET GLOBAL slave_parallel_threads=10;
---source include/start_slave.inc
-
---echo *** MDEV-7888: ANALYZE TABLE does wakeup_subsequent_commits(), causing wrong binlog order and parallel replication hang ***
-
---connection server_2
---source include/stop_slave.inc
SET @old_dbug= @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug= '+d,inject_analyze_table_sleep';
@@ -2380,62 +2176,6 @@ SET GLOBAL debug_dbug= @old_debg;
SET GLOBAL max_relay_log_size= @old_max;
--source include/start_slave.inc
-
---echo *** MDEV-8302: Duplicate key with parallel replication ***
-
---connection server_2
---source include/stop_slave.inc
-/* Inject a small sleep which makes the race easier to hit. */
-SET @old_dbug=@@GLOBAL.debug_dbug;
-SET GLOBAL debug_dbug="+d,inject_mdev8302";
-
-
---connection server_1
-INSERT INTO t7 VALUES (100,1), (101,2), (102,3), (103,4), (104,5);
-
-# Artificially create a bunch of group commits with conflicting transactions.
-# The bug happened when T1 and T2 was in one group commit, and T3 was in the
-# following group commit. T2 is a DELETE of a row with same primary key as a
-# row that T3 inserts. T1 and T2 can conflict, causing T2 to be deadlock
-# killed after starting to commit. The bug was that T2 could roll back before
-# doing unmark_start_commit(); this could allow T3 to run before the retry
-# of T2, causing duplicate key violation.
-
-SET @old_dbug= @@SESSION.debug_dbug;
-SET @commit_id= 20000;
-SET SESSION debug_dbug="+d,binlog_force_commit_id";
-
---let $n = 100
---disable_query_log
-while ($n)
-{
- eval UPDATE t7 SET b=b+1 WHERE a=100+($n MOD 5);
- eval DELETE FROM t7 WHERE a=100+($n MOD 5);
-
- SET @commit_id = @commit_id + 1;
- eval INSERT INTO t7 VALUES (100+($n MOD 5), $n);
- SET @commit_id = @commit_id + 1;
- dec $n;
-}
---enable_query_log
-SET SESSION debug_dbug=@old_dbug;
-
-
-SELECT * FROM t7 ORDER BY a;
---source include/save_master_gtid.inc
-
-
---connection server_2
---source include/start_slave.inc
---source include/sync_with_master_gtid.inc
-SELECT * FROM t7 ORDER BY a;
-
---source include/stop_slave.inc
-SET GLOBAL debug_dbug=@old_dbug;
---source include/start_slave.inc
-
-
-
--echo *** MDEV-8725: Assertion on ROLLBACK statement in the binary log ***
--connection server_1
# Inject an event group terminated by ROLLBACK, by mixing MyISAM and InnoDB
@@ -2457,7 +2197,6 @@ SELECT * FROM t2 WHERE a>=2000 ORDER BY a;
SELECT * FROM t1 WHERE a>=2000 ORDER BY a;
SELECT * FROM t2 WHERE a>=2000 ORDER BY a;
-
# Clean up.
--connection server_2
--source include/stop_slave.inc
@@ -2467,7 +2206,7 @@ SET DEBUG_SYNC= 'RESET';
--connection server_1
DROP function foo;
-DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8;
+DROP TABLE t1,t2,t3,t4,t5,t6;
SET DEBUG_SYNC= 'RESET';
--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_conflicts-slave.opt b/mysql-test/suite/rpl/t/rpl_parallel_conflicts-slave.opt
new file mode 100644
index 00000000000..af7bd138793
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_conflicts-slave.opt
@@ -0,0 +1 @@
+--slave_parallel_threads=40 --slave_parallel_mode=conservative --slave_transaction_retries=5
diff --git a/mysql-test/suite/rpl/t/rpl_parallel_conflicts.test b/mysql-test/suite/rpl/t/rpl_parallel_conflicts.test
new file mode 100644
index 00000000000..fc294f68197
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_parallel_conflicts.test
@@ -0,0 +1,261 @@
+--source include/have_innodb.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/master-slave.inc
+
+--echo *** MDEV-7847: "Slave worker thread retried transaction 10 time(s) in vain, giving up", followed by replication hanging ***
+--echo *** MDEV-7882: Excessive transaction retry in parallel replication ***
+
+--connection server_1
+ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB;
+CREATE TABLE t7 (a int PRIMARY KEY, b INT) ENGINE=InnoDB;
+CREATE TABLE t8 (a int PRIMARY KEY, b INT) ENGINE=InnoDB;
+--save_master_pos
+
+--connection server_2
+--sync_with_master
+--source include/stop_slave.inc
+
+
+# Using dbug error injection, we artificially create event groups with a lot of
+# conflicting transactions in each event group. The bugs were originally seen
+# "in the wild" with transactions that did not conflict on the master, and only
+# conflicted very rarely on the slave (maybe some edge case with InnoDB btree
+# page splits or something like that). The event groups here loosely reflect
+# the structure of the original failure's group commits.
+
+
+--connection server_1
+INSERT INTO t7 VALUES (1,1), (2,2), (3,3), (4,4), (5,5);
+SET @old_dbug= @@SESSION.debug_dbug;
+SET @commit_id= 42;
+SET SESSION debug_dbug="+d,binlog_force_commit_id";
+INSERT INTO t8 VALUES (1,1);
+INSERT INTO t8 VALUES (2,2);
+INSERT INTO t8 VALUES (3,3);
+INSERT INTO t8 VALUES (4,4);
+INSERT INTO t8 VALUES (5,5);
+INSERT INTO t8 VALUES (6,6);
+INSERT INTO t8 VALUES (7,7);
+INSERT INTO t8 VALUES (8,8);
+
+UPDATE t7 SET b=9 WHERE a=3;
+UPDATE t7 SET b=10 WHERE a=3;
+UPDATE t7 SET b=11 WHERE a=3;
+
+INSERT INTO t8 VALUES (12,12);
+INSERT INTO t8 VALUES (13,13);
+
+UPDATE t7 SET b=14 WHERE a=3;
+UPDATE t7 SET b=15 WHERE a=3;
+
+INSERT INTO t8 VALUES (16,16);
+
+UPDATE t7 SET b=17 WHERE a=3;
+
+INSERT INTO t8 VALUES (18,18);
+INSERT INTO t8 VALUES (19,19);
+
+UPDATE t7 SET b=20 WHERE a=3;
+
+INSERT INTO t8 VALUES (21,21);
+
+UPDATE t7 SET b=22 WHERE a=3;
+
+INSERT INTO t8 VALUES (23,24);
+INSERT INTO t8 VALUES (24,24);
+
+UPDATE t7 SET b=25 WHERE a=3;
+
+INSERT INTO t8 VALUES (26,26);
+
+UPDATE t7 SET b=27 WHERE a=3;
+
+BEGIN;
+INSERT INTO t8 VALUES (28,28);
+INSERT INTO t8 VALUES (29,28), (30,28);
+INSERT INTO t8 VALUES (31,28);
+INSERT INTO t8 VALUES (32,28);
+INSERT INTO t8 VALUES (33,28);
+INSERT INTO t8 VALUES (34,28);
+INSERT INTO t8 VALUES (35,28);
+INSERT INTO t8 VALUES (36,28);
+INSERT INTO t8 VALUES (37,28);
+INSERT INTO t8 VALUES (38,28);
+INSERT INTO t8 VALUES (39,28);
+INSERT INTO t8 VALUES (40,28);
+INSERT INTO t8 VALUES (41,28);
+INSERT INTO t8 VALUES (42,28);
+COMMIT;
+
+
+SET @commit_id=43;
+INSERT INTO t8 VALUES (43,43);
+INSERT INTO t8 VALUES (44,44);
+
+UPDATE t7 SET b=45 WHERE a=3;
+
+INSERT INTO t8 VALUES (46,46);
+INSERT INTO t8 VALUES (47,47);
+
+UPDATE t7 SET b=48 WHERE a=3;
+
+INSERT INTO t8 VALUES (49,49);
+INSERT INTO t8 VALUES (50,50);
+
+
+SET @commit_id=44;
+INSERT INTO t8 VALUES (51,51);
+INSERT INTO t8 VALUES (52,52);
+
+UPDATE t7 SET b=53 WHERE a=3;
+
+INSERT INTO t8 VALUES (54,54);
+INSERT INTO t8 VALUES (55,55);
+
+UPDATE t7 SET b=56 WHERE a=3;
+
+INSERT INTO t8 VALUES (57,57);
+
+UPDATE t7 SET b=58 WHERE a=3;
+
+INSERT INTO t8 VALUES (58,58);
+INSERT INTO t8 VALUES (59,59);
+INSERT INTO t8 VALUES (60,60);
+INSERT INTO t8 VALUES (61,61);
+
+UPDATE t7 SET b=62 WHERE a=3;
+
+INSERT INTO t8 VALUES (63,63);
+INSERT INTO t8 VALUES (64,64);
+INSERT INTO t8 VALUES (65,65);
+INSERT INTO t8 VALUES (66,66);
+
+UPDATE t7 SET b=67 WHERE a=3;
+
+INSERT INTO t8 VALUES (68,68);
+
+UPDATE t7 SET b=69 WHERE a=3;
+UPDATE t7 SET b=70 WHERE a=3;
+UPDATE t7 SET b=71 WHERE a=3;
+
+INSERT INTO t8 VALUES (72,72);
+
+UPDATE t7 SET b=73 WHERE a=3;
+UPDATE t7 SET b=74 WHERE a=3;
+UPDATE t7 SET b=75 WHERE a=3;
+UPDATE t7 SET b=76 WHERE a=3;
+
+INSERT INTO t8 VALUES (77,77);
+
+UPDATE t7 SET b=78 WHERE a=3;
+
+INSERT INTO t8 VALUES (79,79);
+
+UPDATE t7 SET b=80 WHERE a=3;
+
+INSERT INTO t8 VALUES (81,81);
+
+UPDATE t7 SET b=82 WHERE a=3;
+
+INSERT INTO t8 VALUES (83,83);
+
+UPDATE t7 SET b=84 WHERE a=3;
+
+
+SET @commit_id=45;
+INSERT INTO t8 VALUES (85,85);
+UPDATE t7 SET b=86 WHERE a=3;
+INSERT INTO t8 VALUES (87,87);
+
+
+SET @commit_id=46;
+INSERT INTO t8 VALUES (88,88);
+INSERT INTO t8 VALUES (89,89);
+INSERT INTO t8 VALUES (90,90);
+
+SET SESSION debug_dbug=@old_dbug;
+
+INSERT INTO t8 VALUES (91,91);
+INSERT INTO t8 VALUES (92,92);
+INSERT INTO t8 VALUES (93,93);
+INSERT INTO t8 VALUES (94,94);
+INSERT INTO t8 VALUES (95,95);
+INSERT INTO t8 VALUES (96,96);
+INSERT INTO t8 VALUES (97,97);
+INSERT INTO t8 VALUES (98,98);
+INSERT INTO t8 VALUES (99,99);
+
+
+SELECT * FROM t7 ORDER BY a;
+SELECT * FROM t8 ORDER BY a;
+--source include/save_master_gtid.inc
+
+
+--connection server_2
+--source include/start_slave.inc
+--source include/sync_with_master_gtid.inc
+SELECT * FROM t7 ORDER BY a;
+SELECT * FROM t8 ORDER BY a;
+
+--echo *** MDEV-8302: Duplicate key with parallel replication ***
+
+--connection server_2
+--source include/stop_slave.inc
+/* Inject a small sleep which makes the race easier to hit. */
+SET @old_dbug=@@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug="+d,inject_mdev8302";
+
+
+--connection server_1
+INSERT INTO t7 VALUES (100,1), (101,2), (102,3), (103,4), (104,5);
+
+# Artificially create a bunch of group commits with conflicting transactions.
+# The bug happened when T1 and T2 was in one group commit, and T3 was in the
+# following group commit. T2 is a DELETE of a row with same primary key as a
+# row that T3 inserts. T1 and T2 can conflict, causing T2 to be deadlock
+# killed after starting to commit. The bug was that T2 could roll back before
+# doing unmark_start_commit(); this could allow T3 to run before the retry
+# of T2, causing duplicate key violation.
+
+SET @old_dbug= @@SESSION.debug_dbug;
+SET @commit_id= 20000;
+SET SESSION debug_dbug="+d,binlog_force_commit_id";
+
+--let $n = 100
+--disable_query_log
+while ($n)
+{
+ eval UPDATE t7 SET b=b+1 WHERE a=100+($n MOD 5);
+ eval DELETE FROM t7 WHERE a=100+($n MOD 5);
+
+ SET @commit_id = @commit_id + 1;
+ eval INSERT INTO t7 VALUES (100+($n MOD 5), $n);
+ SET @commit_id = @commit_id + 1;
+ dec $n;
+}
+--enable_query_log
+SET SESSION debug_dbug=@old_dbug;
+
+
+SELECT * FROM t7 ORDER BY a;
+--source include/save_master_gtid.inc
+
+
+--connection server_2
+--source include/start_slave.inc
+--source include/sync_with_master_gtid.inc
+SELECT * FROM t7 ORDER BY a;
+
+--source include/stop_slave.inc
+SET GLOBAL debug_dbug=@old_dbug;
+
+# Clean up.
+--source include/start_slave.inc
+SET DEBUG_SYNC= 'RESET';
+
+--connection server_1
+DROP TABLE t7,t8;
+SET DEBUG_SYNC= 'RESET';
+
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_temporary.test b/mysql-test/suite/rpl/t/rpl_temporary.test
index 96ee31667b6..e3f5a0be573 100644
--- a/mysql-test/suite/rpl/t/rpl_temporary.test
+++ b/mysql-test/suite/rpl/t/rpl_temporary.test
@@ -354,6 +354,62 @@ connection slave;
DROP USER user43748@127.0.0.1;
+--echo #
+--echo # MDEV-10216: Assertion `strcmp(share->unique_file_name,filename) ||
+--echo # share->last_version' failed in myisam/mi_open.c:67: test_if_reopen
+--echo #
+
+connection master;
+CREATE TEMPORARY TABLE t1(i INT PRIMARY KEY) ENGINE=MYISAM;
+INSERT INTO t1 VALUES(1);
+SELECT COUNT(*)=1 FROM t1;
+
+ALTER TABLE t1 RENAME t2;
+SELECT COUNT(*)=1 FROM t2;
+ALTER TABLE t2 RENAME t1;
+
+ALTER TABLE t1 DISABLE KEYS;
+ALTER TABLE t1 ENABLE KEYS;
+
+# LOCK TABLES is ignored for temporary tables.
+LOCK TABLES t1 WRITE;
+ALTER TABLE t1 RENAME t2;
+SELECT COUNT(*)=1 FROM t2;
+ALTER TABLE t2 RENAME t1;
+ALTER TABLE t1 DISABLE KEYS;
+ALTER TABLE t1 ENABLE KEYS;
+UNLOCK TABLES;
+
+LOCK TABLES t1 READ;
+ALTER TABLE t1 RENAME t2;
+SELECT COUNT(*)=1 FROM t2;
+ALTER TABLE t2 RENAME t1;
+ALTER TABLE t1 DISABLE KEYS;
+ALTER TABLE t1 ENABLE KEYS;
+UNLOCK TABLES;
+
+FLUSH TABLES WITH READ LOCK;
+ALTER TABLE t1 RENAME t2;
+SELECT COUNT(*)=1 FROM t2;
+ALTER TABLE t2 RENAME t1;
+ALTER TABLE t1 DISABLE KEYS;
+ALTER TABLE t1 ENABLE KEYS;
+UNLOCK TABLES;
+
+ALTER TABLE t1 RENAME t2, LOCK SHARED;
+ALTER TABLE t2 RENAME t1, LOCK EXCLUSIVE;
+
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-10320: NO-OP ALTER TABLE on temporary tables getting logged
+--echo # under row binlog format
+--echo #
+connection master;
+CREATE TEMPORARY TABLE t1(i INT PRIMARY KEY) ENGINE=MYISAM;
+ALTER TABLE t1;
+ALTER TABLE t1 ADD COLUMN IF NOT EXISTS I INT;
+DROP TABLE t1;
--echo End of 5.1 tests
--let $rpl_only_running_threads= 1
diff --git a/mysql-test/suite/sys_vars/r/general_log_file_basic.result b/mysql-test/suite/sys_vars/r/general_log_file_basic.result
index 369ef7844db..c7c24f155ca 100644
--- a/mysql-test/suite/sys_vars/r/general_log_file_basic.result
+++ b/mysql-test/suite/sys_vars/r/general_log_file_basic.result
@@ -12,6 +12,16 @@ SET @@global.general_log_file = mytest.log;
ERROR 42000: Incorrect argument type to variable 'general_log_file'
SET @@global.general_log_file = 12;
ERROR 42000: Incorrect argument type to variable 'general_log_file'
+SET @@global.general_log_file = 'my.cnf';
+ERROR 42000: Variable 'general_log_file' can't be set to the value of 'my.cnf'
+SET @@global.general_log_file = '/tmp/my.cnf';
+ERROR 42000: Variable 'general_log_file' can't be set to the value of '/tmp/my.cnf'
+SET @@global.general_log_file = '.my.cnf';
+ERROR 42000: Variable 'general_log_file' can't be set to the value of '.my.cnf'
+SET @@global.general_log_file = 'my.cnf\0foo';
+ERROR 42000: Variable 'general_log_file' can't be set to the value of 'my.cnf'
+SET @@global.general_log_file = 'my.ini';
+ERROR 42000: Variable 'general_log_file' can't be set to the value of 'my.ini'
'#----------------------FN_DYNVARS_004_03------------------------#'
SELECT @@global.general_log_file = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
diff --git a/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result b/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result
index 97fe3957264..43075317bc3 100644
--- a/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result
+++ b/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result
@@ -1,63 +1,63 @@
SET @start_global_value = @@global.optimizer_switch;
SELECT @start_global_value;
@start_global_value
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off,condition_pushdown_for_derived=on
select @@global.optimizer_switch;
@@global.optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off,condition_pushdown_for_derived=on
select @@session.optimizer_switch;
@@session.optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off,condition_pushdown_for_derived=on
show global variables like 'optimizer_switch';
Variable_name Value
-optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off
+optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off,condition_pushdown_for_derived=on
show session variables like 'optimizer_switch';
Variable_name Value
-optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off
+optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off,condition_pushdown_for_derived=on
select * from information_schema.global_variables where variable_name='optimizer_switch';
VARIABLE_NAME VARIABLE_VALUE
-OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off
+OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off,condition_pushdown_for_derived=on
select * from information_schema.session_variables where variable_name='optimizer_switch';
VARIABLE_NAME VARIABLE_VALUE
-OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off
+OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off,condition_pushdown_for_derived=on
set global optimizer_switch=10;
set session optimizer_switch=5;
select @@global.optimizer_switch;
@@global.optimizer_switch
-index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off
+index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off
select @@session.optimizer_switch;
@@session.optimizer_switch
-index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off
+index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off
set global optimizer_switch="index_merge_sort_union=on";
set session optimizer_switch="index_merge=off";
select @@global.optimizer_switch;
@@global.optimizer_switch
-index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off
+index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off
select @@session.optimizer_switch;
@@session.optimizer_switch
-index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off
+index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off
show global variables like 'optimizer_switch';
Variable_name Value
-optimizer_switch index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off
+optimizer_switch index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off
show session variables like 'optimizer_switch';
Variable_name Value
-optimizer_switch index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off
+optimizer_switch index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off
select * from information_schema.global_variables where variable_name='optimizer_switch';
VARIABLE_NAME VARIABLE_VALUE
-OPTIMIZER_SWITCH index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off
+OPTIMIZER_SWITCH index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off
select * from information_schema.session_variables where variable_name='optimizer_switch';
VARIABLE_NAME VARIABLE_VALUE
-OPTIMIZER_SWITCH index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off
+OPTIMIZER_SWITCH index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off
set session optimizer_switch="default";
select @@session.optimizer_switch;
@@session.optimizer_switch
-index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off
+index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off
set optimizer_switch = replace(@@optimizer_switch, '=off', '=on');
Warnings:
Warning 1681 'engine_condition_pushdown=on' is deprecated and will be removed in a future release.
select @@optimizer_switch;
@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=on,mrr_cost_based=on,mrr_sort_keys=on,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=on,mrr_cost_based=on,mrr_sort_keys=on,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on
set global optimizer_switch=1.1;
ERROR 42000: Incorrect argument type to variable 'optimizer_switch'
set global optimizer_switch=1e1;
@@ -69,4 +69,4 @@ ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'foobar'
SET @@global.optimizer_switch = @start_global_value;
SELECT @@global.optimizer_switch;
@@global.optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off,condition_pushdown_for_derived=on
diff --git a/mysql-test/suite/sys_vars/r/server_id_basic.result b/mysql-test/suite/sys_vars/r/server_id_basic.result
index 4d82d8f102a..a2b117c1332 100644
--- a/mysql-test/suite/sys_vars/r/server_id_basic.result
+++ b/mysql-test/suite/sys_vars/r/server_id_basic.result
@@ -8,17 +8,19 @@ SET @@global.server_id = 500000;
SET @@global.server_id = DEFAULT;
SELECT @@global.server_id;
@@global.server_id
-0
+1
'#--------------------FN_DYNVARS_144_02-------------------------#'
SET @@global.server_id = DEFAULT;
-SELECT @@global.server_id = 0;
-@@global.server_id = 0
+SELECT @@global.server_id = 1;
+@@global.server_id = 1
1
'#--------------------FN_DYNVARS_144_03-------------------------#'
SET @@global.server_id = 0;
+Warnings:
+Warning 1292 Truncated incorrect server_id value: '0'
SELECT @@global.server_id;
@@global.server_id
-0
+1
SET @@global.server_id = 1;
SELECT @@global.server_id;
@@global.server_id
@@ -62,13 +64,13 @@ Warnings:
Warning 1292 Truncated incorrect server_id value: '-1'
SELECT @@global.server_id;
@@global.server_id
-0
+1
SET @@global.server_id = -2147483648;
Warnings:
Warning 1292 Truncated incorrect server_id value: '-2147483648'
SELECT @@global.server_id;
@@global.server_id
-0
+1
SET @@global.server_id = 2147483649*2;
Warnings:
Warning 1292 Truncated incorrect server_id value: '4294967298'
@@ -102,9 +104,11 @@ SELECT @@global.server_id;
@@global.server_id
1
SET @@global.server_id = FALSE;
+Warnings:
+Warning 1292 Truncated incorrect server_id value: '0'
SELECT @@global.server_id;
@@global.server_id
-0
+1
'#---------------------FN_DYNVARS_001_09----------------------#'
SET @@global.server_id = 512;
SELECT @@server_id = @@global.server_id;
diff --git a/mysql-test/suite/sys_vars/r/session_track_system_variables_basic.result b/mysql-test/suite/sys_vars/r/session_track_system_variables_basic.result
new file mode 100644
index 00000000000..7162e40ef6b
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/session_track_system_variables_basic.result
@@ -0,0 +1,164 @@
+#
+# Variable name : session_track_system_variables
+# Scope : Global & Session
+#
+# Global - default
+SELECT @@global.session_track_system_variables;
+@@global.session_track_system_variables
+
+# Session - default
+SELECT @@session.session_track_system_variables;
+@@session.session_track_system_variables
+
+
+# via INFORMATION_SCHEMA.GLOBAL_VARIABLES
+SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'session_track%' ORDER BY VARIABLE_NAME;
+VARIABLE_NAME VARIABLE_VALUE
+SESSION_TRACK_SCHEMA ON
+SESSION_TRACK_STATE_CHANGE OFF
+SESSION_TRACK_SYSTEM_VARIABLES
+SESSION_TRACK_TRANSACTION_INFO OFF
+# via INFORMATION_SCHEMA.SESSION_VARIABLES
+SELECT * FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE 'session_track%' ORDER BY VARIABLE_NAME;
+VARIABLE_NAME VARIABLE_VALUE
+SESSION_TRACK_SCHEMA ON
+SESSION_TRACK_STATE_CHANGE OFF
+SESSION_TRACK_SYSTEM_VARIABLES
+SESSION_TRACK_TRANSACTION_INFO OFF
+SET @global_saved_tmp = @@global.session_track_system_variables;
+
+# Altering global variable's value
+SET @@global.session_track_system_variables='autocommit';
+SELECT @@global.session_track_system_variables;
+@@global.session_track_system_variables
+autocommit
+SELECT @@session.session_track_system_variables;
+@@session.session_track_system_variables
+
+
+# Altering session variable's value
+SET @@session.session_track_system_variables='autocommit';
+SELECT @@global.session_track_system_variables;
+@@global.session_track_system_variables
+autocommit
+SELECT @@session.session_track_system_variables;
+@@session.session_track_system_variables
+autocommit
+
+# Variables' values in a new session.
+connect con1,"127.0.0.1",root,,test,$MASTER_MYPORT,;
+# Global - expect "autocommit"
+SELECT @@global.session_track_system_variables;
+@@global.session_track_system_variables
+autocommit
+
+# Session - expect "autocommit"
+SELECT @@session.session_track_system_variables;
+@@session.session_track_system_variables
+autocommit
+
+# Switching to the default connection.
+connection default;
+SELECT @@global.session_track_system_variables;
+@@global.session_track_system_variables
+autocommit
+SELECT @@session.session_track_system_variables;
+@@session.session_track_system_variables
+autocommit
+
+# Test if DEFAULT is working as expected.
+SET @@global.session_track_system_variables = DEFAULT;
+SET @@session.session_track_system_variables = DEFAULT;
+
+SELECT @@global.session_track_system_variables;
+@@global.session_track_system_variables
+
+SELECT @@session.session_track_system_variables;
+@@session.session_track_system_variables
+
+
+# Variables' values in a new session (con2).
+connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,;
+SELECT @@global.session_track_system_variables;
+@@global.session_track_system_variables
+
+SELECT @@session.session_track_system_variables;
+@@session.session_track_system_variables
+
+
+# Altering session should not affect global.
+SET @@session.session_track_system_variables = 'sql_mode';
+SELECT @@global.session_track_system_variables;
+@@global.session_track_system_variables
+
+SELECT @@session.session_track_system_variables;
+@@session.session_track_system_variables
+sql_mode
+
+# Variables' values in a new session (con3).
+connect con3,"127.0.0.1",root,,test,$MASTER_MYPORT,;
+# Altering global should not affect session.
+SET @@global.session_track_system_variables = 'sql_mode';
+SELECT @@global.session_track_system_variables;
+@@global.session_track_system_variables
+sql_mode
+SELECT @@session.session_track_system_variables;
+@@session.session_track_system_variables
+
+
+# Switching to the default connection.
+connection default;
+# Testing NULL
+SET @@global.session_track_system_variables = NULL;
+SET @@session.session_track_system_variables = NULL;
+# Global - expect "" instead of NULL
+SELECT @@global.session_track_system_variables;
+@@global.session_track_system_variables
+NULL
+# Session - expect "" instead of NULL
+SELECT @@session.session_track_system_variables;
+@@session.session_track_system_variables
+
+# testing with duplicate entries.
+SET @@global.session_track_system_variables= "time_zone";
+SET @@session.session_track_system_variables= "time_zone";
+SET @@global.session_track_system_variables= "sql_mode,sql_mode";
+SET @@session.session_track_system_variables= "sql_mode,sql_mode";
+SELECT @@global.session_track_system_variables;
+@@global.session_track_system_variables
+sql_mode
+SELECT @@session.session_track_system_variables;
+@@session.session_track_system_variables
+sql_mode
+
+# testing ordering
+SET @@global.session_track_system_variables= "time_zone,sql_mode";
+SET @@session.session_track_system_variables= "time_zone,sql_mode";
+SELECT @@global.session_track_system_variables;
+@@global.session_track_system_variables
+sql_mode,time_zone
+SELECT @@session.session_track_system_variables;
+@@session.session_track_system_variables
+sql_mode,time_zone
+
+# special values
+SET @@global.session_track_system_variables= "*";
+SET @@session.session_track_system_variables= "*";
+SELECT @@global.session_track_system_variables;
+@@global.session_track_system_variables
+*
+SELECT @@session.session_track_system_variables;
+@@session.session_track_system_variables
+*
+SET @@global.session_track_system_variables= "";
+SET @@session.session_track_system_variables= "";
+SELECT @@global.session_track_system_variables;
+@@global.session_track_system_variables
+
+SELECT @@session.session_track_system_variables;
+@@session.session_track_system_variables
+
+
+# Restoring the original values.
+SET @@global.session_track_system_variables = @global_saved_tmp;
+# End of tests.
diff --git a/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result b/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result
index f45c568ff4a..a64666f6298 100644
--- a/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result
+++ b/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result
@@ -9,6 +9,16 @@ SET @@global.slow_query_log_file = mytest.log;
ERROR 42000: Incorrect argument type to variable 'slow_query_log_file'
SET @@global.slow_query_log_file = 12;
ERROR 42000: Incorrect argument type to variable 'slow_query_log_file'
+SET @@global.slow_query_log_file = 'my.cnf';
+ERROR 42000: Variable 'slow_query_log_file' can't be set to the value of 'my.cnf'
+SET @@global.slow_query_log_file = '/tmp/my.cnf';
+ERROR 42000: Variable 'slow_query_log_file' can't be set to the value of '/tmp/my.cnf'
+SET @@global.general_log_file = '.my.cnf';
+ERROR 42000: Variable 'general_log_file' can't be set to the value of '.my.cnf'
+SET @@global.general_log_file = 'my.cnf\0foo';
+ERROR 42000: Variable 'general_log_file' can't be set to the value of 'my.cnf'
+SET @@global.general_log_file = 'my.ini';
+ERROR 42000: Variable 'general_log_file' can't be set to the value of 'my.ini'
'#----------------------FN_DYNVARS_004_03------------------------#'
SELECT @@global.slow_query_log_file = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
diff --git a/mysql-test/suite/sys_vars/r/sysvars_aria.result b/mysql-test/suite/sys_vars/r/sysvars_aria.result
index f2418cf31db..461eef9ec47 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_aria.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_aria.result
@@ -54,7 +54,7 @@ VARIABLE_COMMENT Encrypt tables (only for tables with ROW_FORMAT=PAGE (default)
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME ARIA_FORCE_START_AFTER_RECOVERY_FAILURES
@@ -208,7 +208,7 @@ VARIABLE_COMMENT Maintain page checksums (can be overridden per table with PAGE_
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME ARIA_RECOVER_OPTIONS
@@ -292,6 +292,6 @@ VARIABLE_COMMENT Whether temporary tables should be MyISAM or Aria
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit,xtradb.rdiff-disabled b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit,xtradb.rdiff-disabled
index 4d507126872..930fa18541f 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit,xtradb.rdiff-disabled
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb,32bit,xtradb.rdiff-disabled
@@ -111,7 +111,7 @@
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST NULL
++ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_BUFFER_POOL_SIZE
@@ -150,7 +150,7 @@
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST NULL
++ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_CLEANER_FLUSH_CHUNK_SIZE
@@ -343,7 +343,7 @@
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST NULL
++ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_FAST_SHUTDOWN
@@ -578,7 +578,7 @@
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST NULL
++ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_LOCKS_UNSAFE_FOR_BINLOG
@@ -624,7 +624,7 @@
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
- ENUM_VALUE_LIST NULL
+ ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
-VARIABLE_NAME INNODB_LOG_COMPRESSED_PAGES
@@ -695,7 +695,7 @@
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST NULL
++ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_LOG_CHECKSUM_ALGORITHM
@@ -850,7 +850,7 @@
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST NULL
++ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_PRIORITY_IO
@@ -864,7 +864,7 @@
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST NULL
++ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_PRIORITY_MASTER
@@ -878,7 +878,7 @@
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST NULL
++ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_PRIORITY_PURGE
@@ -892,7 +892,7 @@
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST NULL
++ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_PURGE_BATCH_SIZE
@@ -1134,7 +1134,7 @@
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST NULL
++ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_TRACK_REDO_LOG_NOW
@@ -1148,7 +1148,7 @@
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST NULL
++ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_TRX_PURGE_VIEW_UPDATE_ONLY_DEBUG
@@ -1196,7 +1196,7 @@
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST NULL
++ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_USE_MTFLUSH
@@ -1217,7 +1217,7 @@
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST NULL
++ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_USE_SYS_MALLOC
@@ -1227,8 +1227,8 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_VERSION
SESSION_VALUE NULL
--GLOBAL_VALUE 5.6.31
-+GLOBAL_VALUE 5.6.30-76.3
+-GLOBAL_VALUE 5.6.32
++GLOBAL_VALUE 5.6.31-77.0
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff-disabled b/mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff-disabled
index 6d95a517b33..aafc0a9e806 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff-disabled
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb,xtradb.rdiff-disabled
@@ -36,7 +36,7 @@
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST NULL
++ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_BUFFER_POOL_SIZE
@@ -66,7 +66,7 @@
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST NULL
++ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_CLEANER_FLUSH_CHUNK_SIZE
@@ -213,7 +213,7 @@
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST NULL
++ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_FAST_SHUTDOWN
@@ -290,7 +290,7 @@
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST NULL
++ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_LOCKS_UNSAFE_FOR_BINLOG
@@ -311,7 +311,7 @@
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST NULL
++ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_LOG_ARCH_DIR
@@ -430,7 +430,7 @@
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST NULL
++ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_PRIORITY_IO
@@ -444,7 +444,7 @@
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST NULL
++ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_PRIORITY_MASTER
@@ -458,7 +458,7 @@
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST NULL
++ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME INNODB_PRIORITY_PURGE
@@ -472,7 +472,7 @@
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST NULL
++ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_PURGE_BATCH_SIZE
@@ -586,7 +586,7 @@
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST NULL
++ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NONE
+VARIABLE_NAME INNODB_TRACK_REDO_LOG_NOW
@@ -600,7 +600,7 @@
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST NULL
++ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_TRX_PURGE_VIEW_UPDATE_ONLY_DEBUG
@@ -630,7 +630,7 @@
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST NULL
++ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_USE_MTFLUSH
@@ -651,7 +651,7 @@
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
-+ENUM_VALUE_LIST NULL
++ENUM_VALUE_LIST OFF,ON
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_USE_SYS_MALLOC
@@ -661,8 +661,8 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_VERSION
SESSION_VALUE NULL
--GLOBAL_VALUE 5.6.31
-+GLOBAL_VALUE 5.6.30-76.3
+-GLOBAL_VALUE 5.6.32
++GLOBAL_VALUE 5.6.31-77.0
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
index 21d75f9e981..f586b7b294a 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result
@@ -16,7 +16,7 @@ VARIABLE_COMMENT Attempt flushing dirty pages to avoid IO bursts at checkpoints.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_ADAPTIVE_FLUSHING_LWM
@@ -44,7 +44,7 @@ VARIABLE_COMMENT Enable InnoDB adaptive hash index (enabled by default). Disabl
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_ADAPTIVE_HASH_INDEX_PARTS
@@ -100,7 +100,7 @@ VARIABLE_COMMENT Disable row lock when direct access InnoDB through InnoDB APIs
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_API_ENABLE_BINLOG
@@ -114,7 +114,7 @@ VARIABLE_COMMENT Enable binlog for applications direct access InnoDB through Inn
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_API_ENABLE_MDL
@@ -128,7 +128,7 @@ VARIABLE_COMMENT Enable MDL for applications direct access InnoDB through InnoDB
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_API_TRX_LEVEL
@@ -184,7 +184,7 @@ VARIABLE_COMMENT Wait for the background drop list to become empty
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_BACKGROUND_SCRUB_DATA_CHECK_INTERVAL
@@ -212,7 +212,7 @@ VARIABLE_COMMENT Enable scrubbing of compressed data by background threads (same
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BACKGROUND_SCRUB_DATA_INTERVAL
@@ -240,7 +240,7 @@ VARIABLE_COMMENT Enable scrubbing of uncompressed data by background threads (sa
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BUFFER_POOL_CHUNK_SIZE
@@ -268,7 +268,7 @@ VARIABLE_COMMENT Dump the buffer pool into a file named @@innodb_buffer_pool_fil
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BUFFER_POOL_DUMP_NOW
@@ -282,7 +282,7 @@ VARIABLE_COMMENT Trigger an immediate dump of the buffer pool into a file named
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BUFFER_POOL_DUMP_PCT
@@ -352,7 +352,7 @@ VARIABLE_COMMENT Abort a currently running load of the buffer pool
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BUFFER_POOL_LOAD_AT_STARTUP
@@ -366,7 +366,7 @@ VARIABLE_COMMENT Load the buffer pool from a file named @@innodb_buffer_pool_fil
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BUFFER_POOL_LOAD_NOW
@@ -380,7 +380,7 @@ VARIABLE_COMMENT Trigger an immediate load of the buffer pool from a file named
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_BUFFER_POOL_SIZE
@@ -422,7 +422,7 @@ VARIABLE_COMMENT Force dirty page flush now
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_CHANGE_BUFFERING
@@ -478,7 +478,7 @@ VARIABLE_COMMENT DEPRECATED. Use innodb_checksum_algorithm=NONE instead of setti
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_CHECKSUM_ALGORITHM
@@ -506,7 +506,7 @@ VARIABLE_COMMENT Enable INFORMATION_SCHEMA.innodb_cmp_per_index, may have negati
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_COMMIT_CONCURRENCY
@@ -646,7 +646,7 @@ VARIABLE_COMMENT Perform extra scrubbing to increase test exposure
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_DEFAULT_ENCRYPTION_KEY_ID
@@ -688,7 +688,7 @@ VARIABLE_COMMENT Enable/disable InnoDB defragmentation (default FALSE). When set
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_DEFRAGMENT_FILL_FACTOR
@@ -772,7 +772,7 @@ VARIABLE_COMMENT Disable dict_stats thread
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_DISABLE_BACKGROUND_MERGE
@@ -786,7 +786,7 @@ VARIABLE_COMMENT Disable change buffering merges by the master thread
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_DISABLE_RESIZE_BUFFER_POOL_DEBUG
@@ -800,7 +800,7 @@ VARIABLE_COMMENT Disable resizing buffer pool to make assertion code not expensi
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_DISABLE_SORT_FILE_CACHE
@@ -814,7 +814,7 @@ VARIABLE_COMMENT Whether to disable OS system file cache for sort I/O
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_DOUBLEWRITE
@@ -828,7 +828,7 @@ VARIABLE_COMMENT Enable InnoDB doublewrite buffer (enabled by default). Disable
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_DOUBLEWRITE_BATCH_SIZE
@@ -898,7 +898,7 @@ VARIABLE_COMMENT Enable redo log encryption
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_ENCRYPT_TABLES
@@ -968,7 +968,7 @@ VARIABLE_COMMENT Whether to perform system file format check.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_FILE_FORMAT_MAX
@@ -996,7 +996,7 @@ VARIABLE_COMMENT Stores each InnoDB table to an .ibd file in the database dir.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_FILL_FACTOR
@@ -1108,7 +1108,7 @@ VARIABLE_COMMENT Allow IO bursts at the checkpoints ignoring io_capacity setting
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_FORCE_LOAD_CORRUPTED
@@ -1122,7 +1122,7 @@ VARIABLE_COMMENT Force InnoDB to load metadata of corrupted table.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_FORCE_PRIMARY_KEY
@@ -1136,7 +1136,7 @@ VARIABLE_COMMENT Do not allow to create table without primary key (off by defaul
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_FORCE_RECOVERY
@@ -1206,7 +1206,7 @@ VARIABLE_COMMENT Whether to enable additional FTS diagnostic printout
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_FT_ENABLE_STOPWORD
@@ -1220,7 +1220,7 @@ VARIABLE_COMMENT Create FTS index with stopword.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_FT_MAX_TOKEN_SIZE
@@ -1360,7 +1360,7 @@ VARIABLE_COMMENT Enable scrubbing of data
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_INSTRUMENT_SEMAPHORES
@@ -1374,7 +1374,7 @@ VARIABLE_COMMENT Enable semaphore request instrumentation. This could have some
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_IO_CAPACITY
@@ -1416,7 +1416,7 @@ VARIABLE_COMMENT Support large index prefix length of REC_VERSION_56_MAX_INDEX_C
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_LIMIT_OPTIMISTIC_INSERT_DEBUG
@@ -1444,7 +1444,7 @@ VARIABLE_COMMENT DEPRECATED. This option may be removed in future releases. Plea
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_LOCK_WAIT_TIMEOUT
@@ -1486,7 +1486,7 @@ VARIABLE_COMMENT Force checkpoint now
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_LOG_CHECKSUMS
@@ -1500,7 +1500,7 @@ VARIABLE_COMMENT Whether to compute and require checksums for InnoDB redo log bl
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_LOG_COMPRESSED_PAGES
@@ -1514,7 +1514,7 @@ VARIABLE_COMMENT Enables/disables the logging of entire compressed page images.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_LOG_FILES_IN_GROUP
@@ -1598,7 +1598,7 @@ VARIABLE_COMMENT Disable master thread
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_MAX_DIRTY_PAGES_PCT
@@ -1822,7 +1822,7 @@ VARIABLE_COMMENT Only optimize the Fulltext index of the table
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_PAGE_CLEANERS
@@ -1850,7 +1850,7 @@ VARIABLE_COMMENT Disable page cleaner
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_PAGE_HASH_LOCKS
@@ -1892,7 +1892,7 @@ VARIABLE_COMMENT Enable prefix optimization to sometimes avoid cluster index loo
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_PRINT_ALL_DEADLOCKS
@@ -1906,7 +1906,7 @@ VARIABLE_COMMENT Print all deadlocks to MySQL error log (off by default)
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_PURGE_BATCH_SIZE
@@ -1948,7 +1948,7 @@ VARIABLE_COMMENT Set purge state to RUN
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_PURGE_STOP_NOW
@@ -1962,7 +1962,7 @@ VARIABLE_COMMENT Set purge state to STOP
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_PURGE_THREADS
@@ -1990,7 +1990,7 @@ VARIABLE_COMMENT Whether to use read ahead for random access within an extent.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_READ_AHEAD_THRESHOLD
@@ -2032,7 +2032,7 @@ VARIABLE_COMMENT Start InnoDB in read only mode (off by default)
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_REPLICATION_DELAY
@@ -2060,7 +2060,7 @@ VARIABLE_COMMENT Roll back the complete transaction on lock wait timeout, for 4.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_ROLLBACK_SEGMENTS
@@ -2102,7 +2102,7 @@ VARIABLE_COMMENT Enable background redo log (ib_logfile0, ib_logfile1...) scrubb
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_SCRUB_LOG_SPEED
@@ -2172,7 +2172,7 @@ VARIABLE_COMMENT InnoDB automatic recalculation of persistent statistics enabled
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_STATS_METHOD
@@ -2214,7 +2214,7 @@ VARIABLE_COMMENT Enable statistics gathering for metadata commands such as SHOW
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_STATS_PERSISTENT
@@ -2228,7 +2228,7 @@ VARIABLE_COMMENT InnoDB persistent statistics enabled for all tables unless over
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_STATS_PERSISTENT_SAMPLE_PAGES
@@ -2270,7 +2270,7 @@ VARIABLE_COMMENT Enable traditional statistic calculation based on number of con
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME INNODB_STATS_TRANSIENT_SAMPLE_PAGES
@@ -2298,7 +2298,7 @@ VARIABLE_COMMENT Enable InnoDB monitor output to the error log.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_STATUS_OUTPUT_LOCKS
@@ -2312,7 +2312,7 @@ VARIABLE_COMMENT Enable InnoDB lock monitor output to the error log. Requires in
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_STRICT_MODE
@@ -2326,7 +2326,7 @@ VARIABLE_COMMENT Use strict mode when evaluating create options.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_SUPPORT_XA
@@ -2340,7 +2340,7 @@ VARIABLE_COMMENT Enable InnoDB support for the XA two-phase commit
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_SYNC_ARRAY_SIZE
@@ -2368,7 +2368,7 @@ VARIABLE_COMMENT Enable the sync debug checks
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_SYNC_SPIN_LOOPS
@@ -2396,7 +2396,7 @@ VARIABLE_COMMENT Enable InnoDB locking in LOCK TABLES
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_TEMP_DATA_FILE_PATH
@@ -2466,7 +2466,7 @@ VARIABLE_COMMENT Pause actual purging any delete-marked records, but merely upda
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME INNODB_TRX_RSEG_N_SLOTS_DEBUG
@@ -2522,7 +2522,7 @@ VARIABLE_COMMENT Enable or Disable Truncate of UNDO tablespace.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_UNDO_TABLESPACES
@@ -2550,7 +2550,7 @@ VARIABLE_COMMENT Prevent partial page writes, via atomic writes.The option is us
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_USE_FALLOCATE
@@ -2564,7 +2564,7 @@ VARIABLE_COMMENT Preallocate files fast, using operating system functionality. O
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_USE_MTFLUSH
@@ -2578,7 +2578,7 @@ VARIABLE_COMMENT Use multi-threaded flush. Default FALSE.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME INNODB_USE_TRIM
@@ -2592,7 +2592,7 @@ VARIABLE_COMMENT Use trim. Default FALSE.
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME INNODB_VERSION
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff b/mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff
index 37f38ceb7be..588d38d9c73 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff
@@ -1,5 +1,5 @@
--- suite/sys_vars/r/sysvars_server_embedded.result
-+++ suite/sys_vars/r/sysvars_server_embedded,32bit.reject
++++ suite/sys_vars/r/sysvars_server_embedded.reject
@@ -57,7 +57,7 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE 1
@@ -455,10 +455,19 @@
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Maximum number of iterations when executing recursive queries
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 4294967295
+@@ -2017,7 +2017,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 4294967295
+ VARIABLE_SCOPE SESSION
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Limit assumed max number of seeks when looking up rows based on a key
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -2017,7 +2017,7 @@
+@@ -2031,7 +2031,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1024
VARIABLE_SCOPE SESSION
@@ -467,7 +476,7 @@
VARIABLE_COMMENT The number of bytes to use when sorting BLOB or TEXT values (only the first max_sort_length bytes of each value are used; the rest are ignored)
NUMERIC_MIN_VALUE 4
NUMERIC_MAX_VALUE 8388608
-@@ -2031,7 +2031,7 @@
+@@ -2045,7 +2045,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION
@@ -476,7 +485,7 @@
VARIABLE_COMMENT Maximum stored procedure recursion depth
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 255
-@@ -2059,7 +2059,7 @@
+@@ -2073,7 +2073,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 32
VARIABLE_SCOPE SESSION
@@ -485,7 +494,7 @@
VARIABLE_COMMENT Unused, will be removed.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -2087,7 +2087,7 @@
+@@ -2101,7 +2101,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 4294967295
VARIABLE_SCOPE GLOBAL
@@ -494,7 +503,7 @@
VARIABLE_COMMENT After this many write locks, allow some read locks to run in between
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -2101,7 +2101,7 @@
+@@ -2115,7 +2115,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1024
VARIABLE_SCOPE GLOBAL
@@ -503,7 +512,7 @@
VARIABLE_COMMENT Unused
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1048576
-@@ -2115,7 +2115,7 @@
+@@ -2129,7 +2129,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 8
VARIABLE_SCOPE GLOBAL
@@ -512,7 +521,7 @@
VARIABLE_COMMENT Unused
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 1024
-@@ -2129,7 +2129,7 @@
+@@ -2143,7 +2143,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0
VARIABLE_SCOPE SESSION
@@ -521,7 +530,7 @@
VARIABLE_COMMENT Don't write queries to slow log that examine fewer rows than that
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -2143,7 +2143,7 @@
+@@ -2157,7 +2157,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 262144
VARIABLE_SCOPE SESSION
@@ -530,7 +539,7 @@
VARIABLE_COMMENT Size of buffer to use when using MRR with range access
NUMERIC_MIN_VALUE 8192
NUMERIC_MAX_VALUE 2147483647
-@@ -2157,10 +2157,10 @@
+@@ -2171,10 +2171,10 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 256
VARIABLE_SCOPE SESSION
@@ -543,7 +552,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2171,7 +2171,7 @@
+@@ -2185,7 +2185,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1024
VARIABLE_SCOPE GLOBAL
@@ -552,7 +561,7 @@
VARIABLE_COMMENT Block size to be used for MyISAM index pages
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 16384
-@@ -2185,7 +2185,7 @@
+@@ -2199,7 +2199,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 6
VARIABLE_SCOPE GLOBAL
@@ -561,7 +570,7 @@
VARIABLE_COMMENT Default pointer size to be used for MyISAM tables
NUMERIC_MIN_VALUE 2
NUMERIC_MAX_VALUE 7
-@@ -2195,9 +2195,9 @@
+@@ -2209,9 +2209,9 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MYISAM_MAX_SORT_FILE_SIZE
SESSION_VALUE NULL
@@ -573,7 +582,7 @@
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Don't use the fast sort index method to created index if the temporary file would get bigger than this
-@@ -2209,14 +2209,14 @@
+@@ -2223,14 +2223,14 @@
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME MYISAM_MMAP_SIZE
SESSION_VALUE NULL
@@ -591,7 +600,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY YES
-@@ -2241,10 +2241,10 @@
+@@ -2255,10 +2255,10 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1
VARIABLE_SCOPE SESSION
@@ -604,7 +613,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2258,7 +2258,7 @@
+@@ -2272,7 +2272,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The buffer that is allocated when sorting the index when doing a REPAIR or when creating indexes with CREATE INDEX or ALTER TABLE
NUMERIC_MIN_VALUE 4096
@@ -613,7 +622,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -2311,7 +2311,7 @@
+@@ -2325,7 +2325,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 16384
VARIABLE_SCOPE SESSION
@@ -622,7 +631,7 @@
VARIABLE_COMMENT Buffer length for TCP/IP and socket communication
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 1048576
-@@ -2325,7 +2325,7 @@
+@@ -2339,7 +2339,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 30
VARIABLE_SCOPE SESSION
@@ -631,7 +640,7 @@
VARIABLE_COMMENT Number of seconds to wait for more data from a connection before aborting the read
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -2339,7 +2339,7 @@
+@@ -2353,7 +2353,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 10
VARIABLE_SCOPE SESSION
@@ -640,7 +649,7 @@
VARIABLE_COMMENT If a read on a communication port is interrupted, retry this many times before giving up
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -2353,7 +2353,7 @@
+@@ -2367,7 +2367,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 60
VARIABLE_SCOPE SESSION
@@ -649,7 +658,7 @@
VARIABLE_COMMENT Number of seconds to wait for a block to be written to a connection before aborting the write
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -2423,7 +2423,7 @@
+@@ -2437,7 +2437,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1
VARIABLE_SCOPE SESSION
@@ -658,7 +667,7 @@
VARIABLE_COMMENT Controls the heuristic(s) applied during query optimization to prune less-promising partial plans from the optimizer search space. Meaning: 0 - do not apply any heuristic, thus perform exhaustive search; 1 - prune plans based on number of retrieved rows
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1
-@@ -2437,7 +2437,7 @@
+@@ -2451,7 +2451,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 62
VARIABLE_SCOPE SESSION
@@ -667,7 +676,7 @@
VARIABLE_COMMENT Maximum depth of search performed by the query optimizer. Values larger than the number of relations in a query result in better query plans, but take longer to compile a query. Values smaller than the number of tables in a relation result in faster optimization, but may produce very bad query plans. If set to 0, the system will automatically pick a reasonable value
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 62
-@@ -2451,7 +2451,7 @@
+@@ -2465,7 +2465,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 100
VARIABLE_SCOPE SESSION
@@ -676,7 +685,7 @@
VARIABLE_COMMENT Controls number of record samples to check condition selectivity
NUMERIC_MIN_VALUE 10
NUMERIC_MAX_VALUE 4294967295
-@@ -2479,7 +2479,7 @@
+@@ -2493,7 +2493,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1
VARIABLE_SCOPE SESSION
@@ -685,7 +694,7 @@
VARIABLE_COMMENT Controls selectivity of which conditions the optimizer takes into account to calculate cardinality of a partial join when it searches for the best execution plan Meaning: 1 - use selectivity of index backed range conditions to calculate the cardinality of a partial join if the last joined table is accessed by full table scan or an index scan, 2 - use selectivity of index backed range conditions to calculate the cardinality of a partial join in any case, 3 - additionally always use selectivity of range conditions that are not backed by any index to calculate the cardinality of a partial join, 4 - use histograms to calculate selectivity of range conditions that are not backed by any index to calculate the cardinality of a partial join.5 - additionally use selectivity of certain non-range predicates calculated on record samples
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 5
-@@ -2507,7 +2507,7 @@
+@@ -2521,7 +2521,7 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
@@ -694,7 +703,7 @@
VARIABLE_COMMENT Maximum number of instrumented user@host accounts. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2521,7 +2521,7 @@
+@@ -2535,7 +2535,7 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
@@ -703,7 +712,7 @@
VARIABLE_COMMENT Size of the statement digest. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 200
-@@ -2535,7 +2535,7 @@
+@@ -2549,7 +2549,7 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
@@ -712,7 +721,7 @@
VARIABLE_COMMENT Number of rows in EVENTS_STAGES_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2549,7 +2549,7 @@
+@@ -2563,7 +2563,7 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
@@ -721,7 +730,7 @@
VARIABLE_COMMENT Number of rows per thread in EVENTS_STAGES_HISTORY. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1024
-@@ -2563,7 +2563,7 @@
+@@ -2577,7 +2577,7 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
@@ -730,7 +739,7 @@
VARIABLE_COMMENT Number of rows in EVENTS_STATEMENTS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2577,7 +2577,7 @@
+@@ -2591,7 +2591,7 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
@@ -739,7 +748,7 @@
VARIABLE_COMMENT Number of rows per thread in EVENTS_STATEMENTS_HISTORY. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1024
-@@ -2591,7 +2591,7 @@
+@@ -2605,7 +2605,7 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
@@ -748,7 +757,7 @@
VARIABLE_COMMENT Number of rows in EVENTS_WAITS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2605,7 +2605,7 @@
+@@ -2619,7 +2619,7 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
@@ -757,7 +766,7 @@
VARIABLE_COMMENT Number of rows per thread in EVENTS_WAITS_HISTORY. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1024
-@@ -2619,7 +2619,7 @@
+@@ -2633,7 +2633,7 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
@@ -766,7 +775,7 @@
VARIABLE_COMMENT Maximum number of instrumented hosts. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2633,7 +2633,7 @@
+@@ -2647,7 +2647,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 80
VARIABLE_SCOPE GLOBAL
@@ -775,7 +784,7 @@
VARIABLE_COMMENT Maximum number of condition instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2647,7 +2647,7 @@
+@@ -2661,7 +2661,7 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
@@ -784,7 +793,7 @@
VARIABLE_COMMENT Maximum number of instrumented condition objects. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2661,7 +2661,7 @@
+@@ -2675,7 +2675,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1024
VARIABLE_SCOPE GLOBAL
@@ -793,7 +802,7 @@
VARIABLE_COMMENT Maximum length considered for digest text, when stored in performance_schema tables.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1048576
-@@ -2675,7 +2675,7 @@
+@@ -2689,7 +2689,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 50
VARIABLE_SCOPE GLOBAL
@@ -802,7 +811,7 @@
VARIABLE_COMMENT Maximum number of file instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2689,7 +2689,7 @@
+@@ -2703,7 +2703,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 32768
VARIABLE_SCOPE GLOBAL
@@ -811,7 +820,7 @@
VARIABLE_COMMENT Maximum number of opened instrumented files.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1048576
-@@ -2703,7 +2703,7 @@
+@@ -2717,7 +2717,7 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
@@ -820,7 +829,7 @@
VARIABLE_COMMENT Maximum number of instrumented files. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2717,7 +2717,7 @@
+@@ -2731,7 +2731,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 200
VARIABLE_SCOPE GLOBAL
@@ -829,7 +838,7 @@
VARIABLE_COMMENT Maximum number of mutex instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2731,7 +2731,7 @@
+@@ -2745,7 +2745,7 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
@@ -838,7 +847,7 @@
VARIABLE_COMMENT Maximum number of instrumented MUTEX objects. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 104857600
-@@ -2745,7 +2745,7 @@
+@@ -2759,7 +2759,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 40
VARIABLE_SCOPE GLOBAL
@@ -847,7 +856,7 @@
VARIABLE_COMMENT Maximum number of rwlock instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2759,7 +2759,7 @@
+@@ -2773,7 +2773,7 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
@@ -856,7 +865,7 @@
VARIABLE_COMMENT Maximum number of instrumented RWLOCK objects. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 104857600
-@@ -2773,7 +2773,7 @@
+@@ -2787,7 +2787,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 10
VARIABLE_SCOPE GLOBAL
@@ -865,7 +874,7 @@
VARIABLE_COMMENT Maximum number of socket instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2787,7 +2787,7 @@
+@@ -2801,7 +2801,7 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
@@ -874,7 +883,7 @@
VARIABLE_COMMENT Maximum number of opened instrumented sockets. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2801,7 +2801,7 @@
+@@ -2815,7 +2815,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 150
VARIABLE_SCOPE GLOBAL
@@ -883,16 +892,16 @@
VARIABLE_COMMENT Maximum number of stage instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2815,7 +2815,7 @@
+@@ -2829,7 +2829,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
- DEFAULT_VALUE 181
+ DEFAULT_VALUE 184
VARIABLE_SCOPE GLOBAL
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Maximum number of statement instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2829,7 +2829,7 @@
+@@ -2843,7 +2843,7 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
@@ -901,7 +910,7 @@
VARIABLE_COMMENT Maximum number of opened instrumented tables. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2843,7 +2843,7 @@
+@@ -2857,7 +2857,7 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
@@ -910,7 +919,7 @@
VARIABLE_COMMENT Maximum number of instrumented tables. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2857,7 +2857,7 @@
+@@ -2871,7 +2871,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 50
VARIABLE_SCOPE GLOBAL
@@ -919,7 +928,7 @@
VARIABLE_COMMENT Maximum number of thread instruments.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 256
-@@ -2871,7 +2871,7 @@
+@@ -2885,7 +2885,7 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
@@ -928,7 +937,7 @@
VARIABLE_COMMENT Maximum number of instrumented threads. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2885,7 +2885,7 @@
+@@ -2899,7 +2899,7 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
@@ -937,7 +946,7 @@
VARIABLE_COMMENT Size of session attribute string buffer per thread. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2899,7 +2899,7 @@
+@@ -2913,7 +2913,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 100
VARIABLE_SCOPE GLOBAL
@@ -946,7 +955,7 @@
VARIABLE_COMMENT Maximum number of rows in SETUP_ACTORS.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1024
-@@ -2913,7 +2913,7 @@
+@@ -2927,7 +2927,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 100
VARIABLE_SCOPE GLOBAL
@@ -955,7 +964,7 @@
VARIABLE_COMMENT Maximum number of rows in SETUP_OBJECTS.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1048576
-@@ -2927,7 +2927,7 @@
+@@ -2941,7 +2941,7 @@
GLOBAL_VALUE_ORIGIN CONFIG
DEFAULT_VALUE -1
VARIABLE_SCOPE GLOBAL
@@ -964,7 +973,7 @@
VARIABLE_COMMENT Maximum number of instrumented users. Use 0 to disable, -1 for automated sizing.
NUMERIC_MIN_VALUE -1
NUMERIC_MAX_VALUE 1048576
-@@ -2997,7 +2997,7 @@
+@@ -3011,7 +3011,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 32768
VARIABLE_SCOPE SESSION
@@ -973,7 +982,7 @@
VARIABLE_COMMENT The size of the buffer that is allocated when preloading indexes
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 1073741824
-@@ -3025,7 +3025,7 @@
+@@ -3039,7 +3039,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 15
VARIABLE_SCOPE SESSION
@@ -982,7 +991,7 @@
VARIABLE_COMMENT Limit of query profiling memory
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 100
-@@ -3039,7 +3039,7 @@
+@@ -3053,7 +3053,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 5
VARIABLE_SCOPE SESSION
@@ -991,7 +1000,7 @@
VARIABLE_COMMENT Seconds between sending progress reports to the client for time-consuming statements. Set to 0 to disable progress reporting.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -3109,7 +3109,7 @@
+@@ -3123,7 +3123,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 16384
VARIABLE_SCOPE SESSION
@@ -1000,7 +1009,7 @@
VARIABLE_COMMENT Allocation block size for query parsing and execution
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 4294967295
-@@ -3123,7 +3123,7 @@
+@@ -3137,7 +3137,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1048576
VARIABLE_SCOPE GLOBAL
@@ -1009,7 +1018,7 @@
VARIABLE_COMMENT Don't cache results that are bigger than this
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -3137,7 +3137,7 @@
+@@ -3151,7 +3151,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 4096
VARIABLE_SCOPE GLOBAL
@@ -1018,7 +1027,7 @@
VARIABLE_COMMENT The minimum size for blocks allocated by the query cache
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -3154,7 +3154,7 @@
+@@ -3168,7 +3168,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The memory allocated to store results from old queries
NUMERIC_MIN_VALUE 0
@@ -1027,7 +1036,7 @@
NUMERIC_BLOCK_SIZE 1024
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -3207,7 +3207,7 @@
+@@ -3221,7 +3221,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 24576
VARIABLE_SCOPE SESSION
@@ -1036,7 +1045,7 @@
VARIABLE_COMMENT Persistent buffer for query parsing and execution
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 4294967295
-@@ -3221,7 +3221,7 @@
+@@ -3235,7 +3235,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 4096
VARIABLE_SCOPE SESSION
@@ -1045,7 +1054,7 @@
VARIABLE_COMMENT Allocation block size for storing ranges during optimization
NUMERIC_MIN_VALUE 4096
NUMERIC_MAX_VALUE 4294967295
-@@ -3235,7 +3235,7 @@
+@@ -3249,7 +3249,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 131072
VARIABLE_SCOPE SESSION
@@ -1054,7 +1063,7 @@
VARIABLE_COMMENT Each thread that does a sequential scan allocates a buffer of this size for each table it scans. If you do many sequential scans, you may want to increase this value
NUMERIC_MIN_VALUE 8192
NUMERIC_MAX_VALUE 2147483647
-@@ -3263,7 +3263,7 @@
+@@ -3277,7 +3277,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 262144
VARIABLE_SCOPE SESSION
@@ -1063,7 +1072,7 @@
VARIABLE_COMMENT When reading rows in sorted order after a sort, the rows are read through this buffer to avoid a disk seeks
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 2147483647
-@@ -3277,10 +3277,10 @@
+@@ -3291,10 +3291,10 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 8388608
VARIABLE_SCOPE SESSION
@@ -1076,16 +1085,16 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -3319,7 +3319,7 @@
+@@ -3333,7 +3333,7 @@
GLOBAL_VALUE_ORIGIN CONFIG
- DEFAULT_VALUE 0
+ DEFAULT_VALUE 1
VARIABLE_SCOPE SESSION
-VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT Uniquely identifies the server instance in the community of replication partners
- NUMERIC_MIN_VALUE 0
+ NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
-@@ -3417,7 +3417,7 @@
+@@ -3431,7 +3431,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 1073741824
VARIABLE_SCOPE GLOBAL
@@ -1094,7 +1103,7 @@
VARIABLE_COMMENT The maximum packet length to sent successfully from the master to slave.
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 1073741824
-@@ -3431,7 +3431,7 @@
+@@ -3445,7 +3445,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 2
VARIABLE_SCOPE GLOBAL
@@ -1103,7 +1112,7 @@
VARIABLE_COMMENT If creating the thread takes longer than this value (in seconds), the Slow_launch_threads counter will be incremented
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 31536000
-@@ -3490,7 +3490,7 @@
+@@ -3504,7 +3504,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Each thread that needs to do a sort allocates a buffer of this size
NUMERIC_MIN_VALUE 1024
@@ -1112,7 +1121,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -3767,7 +3767,7 @@
+@@ -3795,7 +3795,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 256
VARIABLE_SCOPE GLOBAL
@@ -1121,7 +1130,7 @@
VARIABLE_COMMENT The soft upper limit for number of cached stored routines for one connection.
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 524288
-@@ -3837,7 +3837,7 @@
+@@ -3865,7 +3865,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 400
VARIABLE_SCOPE GLOBAL
@@ -1130,7 +1139,7 @@
VARIABLE_COMMENT The number of cached table definitions
NUMERIC_MIN_VALUE 400
NUMERIC_MAX_VALUE 524288
-@@ -3851,7 +3851,7 @@
+@@ -3879,7 +3879,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 2000
VARIABLE_SCOPE GLOBAL
@@ -1139,7 +1148,7 @@
VARIABLE_COMMENT The number of cached open tables
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 524288
-@@ -3865,7 +3865,7 @@
+@@ -3893,7 +3893,7 @@
GLOBAL_VALUE_ORIGIN AUTO
DEFAULT_VALUE 256
VARIABLE_SCOPE GLOBAL
@@ -1148,7 +1157,7 @@
VARIABLE_COMMENT How many threads we should keep in a cache for reuse. These are freed after 5 minutes of idle time
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 16384
-@@ -3879,7 +3879,7 @@
+@@ -3907,7 +3907,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 10
VARIABLE_SCOPE GLOBAL
@@ -1157,7 +1166,7 @@
VARIABLE_COMMENT Permits the application to give the threads system a hint for the desired number of threads that should be run at the same time.This variable has no effect, and is deprecated. It will be removed in a future release.
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 512
-@@ -3994,7 +3994,7 @@
+@@ -4022,7 +4022,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT If an internal in-memory temporary table exceeds this size, MySQL will automatically convert it to an on-disk MyISAM or Aria table
NUMERIC_MIN_VALUE 1024
@@ -1166,7 +1175,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -4005,7 +4005,7 @@
+@@ -4033,7 +4033,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 8192
VARIABLE_SCOPE SESSION
@@ -1175,7 +1184,7 @@
VARIABLE_COMMENT Allocation block size for transactions to be stored in binary log
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 134217728
-@@ -4019,7 +4019,7 @@
+@@ -4047,7 +4047,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 4096
VARIABLE_SCOPE SESSION
@@ -1184,7 +1193,7 @@
VARIABLE_COMMENT Persistent buffer for transactions to be stored in binary log
NUMERIC_MIN_VALUE 1024
NUMERIC_MAX_VALUE 134217728
-@@ -4117,7 +4117,7 @@
+@@ -4145,7 +4145,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 28800
VARIABLE_SCOPE SESSION
@@ -1193,7 +1202,7 @@
VARIABLE_COMMENT The number of seconds the server waits for activity on a connection before closing it
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -4221,7 +4221,7 @@
+@@ -4249,7 +4249,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME OPEN_FILES_LIMIT
VARIABLE_SCOPE GLOBAL
@@ -1202,7 +1211,7 @@
VARIABLE_COMMENT If this is not 0, then mysqld will use this value to reserve file descriptors to use with setrlimit(). If this value is 0 then mysqld will reserve max_connections*5 or max_connections + table_cache*2 (whichever is larger) number of file descriptors
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -4234,7 +4234,7 @@
+@@ -4262,7 +4262,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
NUMERIC_MIN_VALUE 0
@@ -1211,7 +1220,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -4244,7 +4244,7 @@
+@@ -4272,7 +4272,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
NUMERIC_MIN_VALUE 0
@@ -1220,7 +1229,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -4329,7 +4329,7 @@
+@@ -4357,7 +4357,7 @@
VARIABLE_NAME LOG_TC_SIZE
GLOBAL_VALUE_ORIGIN AUTO
VARIABLE_SCOPE GLOBAL
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
index eecebce80ad..d8f2663857f 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
@@ -230,7 +230,7 @@ VARIABLE_COMMENT Run fast part of group commit in a single thread, to optimize k
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_ROW_IMAGE
@@ -1997,6 +1997,20 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME MAX_RECURSIVE_ITERATIONS
+SESSION_VALUE 4294967295
+GLOBAL_VALUE 4294967295
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 4294967295
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Maximum number of iterations when executing recursive queries
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME MAX_SEEKS_FOR_KEY
SESSION_VALUE 4294967295
GLOBAL_VALUE 4294967295
@@ -2288,7 +2302,7 @@ VARIABLE_COMMENT Use memory mapping for reading and writing MyISAM tables
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME MYSQL56_TEMPORAL_FORMAT
@@ -2460,17 +2474,17 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_SWITCH
-SESSION_VALUE index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off
-GLOBAL_VALUE index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off
+SESSION_VALUE index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off,condition_pushdown_for_derived=on
+GLOBAL_VALUE index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off,condition_pushdown_for_derived=on
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off
+DEFAULT_VALUE index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off,condition_pushdown_for_derived=on
VARIABLE_SCOPE SESSION
VARIABLE_TYPE FLAGSET
VARIABLE_COMMENT Fine-tune the optimizer behavior
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST index_merge,index_merge_union,index_merge_sort_union,index_merge_intersection,index_merge_sort_intersection,engine_condition_pushdown,index_condition_pushdown,derived_merge,derived_with_keys,firstmatch,loosescan,materialization,in_to_exists,semijoin,partial_match_rowid_merge,partial_match_table_scan,subquery_cache,mrr,mrr_cost_based,mrr_sort_keys,outer_join_with_cache,semijoin_with_cache,join_cache_incremental,join_cache_hashed,join_cache_bka,optimize_join_buffer_size,table_elimination,extended_keys,exists_to_in,orderby_uses_equalities,default
+ENUM_VALUE_LIST index_merge,index_merge_union,index_merge_sort_union,index_merge_intersection,index_merge_sort_intersection,engine_condition_pushdown,index_condition_pushdown,derived_merge,derived_with_keys,firstmatch,loosescan,materialization,in_to_exists,semijoin,partial_match_rowid_merge,partial_match_table_scan,subquery_cache,mrr,mrr_cost_based,mrr_sort_keys,outer_join_with_cache,semijoin_with_cache,join_cache_incremental,join_cache_hashed,join_cache_bka,optimize_join_buffer_size,table_elimination,extended_keys,exists_to_in,orderby_uses_equalities,condition_pushdown_for_derived,default
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_USE_CONDITION_SELECTIVITY
@@ -2811,9 +2825,9 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STATEMENT_CLASSES
SESSION_VALUE NULL
-GLOBAL_VALUE 181
+GLOBAL_VALUE 184
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 181
+DEFAULT_VALUE 184
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of statement instruments.
@@ -3317,11 +3331,11 @@ VARIABLE_NAME SERVER_ID
SESSION_VALUE 1
GLOBAL_VALUE 1
GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE 0
+DEFAULT_VALUE 1
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Uniquely identifies the server instance in the community of replication partners
-NUMERIC_MIN_VALUE 0
+NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
@@ -3747,6 +3761,20 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT NULL
+VARIABLE_NAME STANDARDS_COMPLIANT_CTE
+SESSION_VALUE ON
+GLOBAL_VALUE ON
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE ON
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Allow only standards compiant CTE
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME STORAGE_ENGINE
SESSION_VALUE MyISAM
GLOBAL_VALUE MyISAM
@@ -3859,6 +3887,20 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME TABLE_OPEN_CACHE_INSTANCES
+SESSION_VALUE NULL
+GLOBAL_VALUE 8
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 8
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Maximum number of table cache instances
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 64
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME THREAD_CACHE_SIZE
SESSION_VALUE NULL
GLOBAL_VALUE 151
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.rdiff b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.rdiff
index c5cdcf884d8..82b5b7bf38f 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.rdiff
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded,32bit.rdiff
@@ -449,6 +449,15 @@
VARIABLE_COMMENT Maximum number of prepared statements in the server
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1048576
+@@ -2171,7 +2171,7 @@
+ GLOBAL_VALUE_ORIGIN COMPILE-TIME
+ DEFAULT_VALUE 4294967295
+ VARIABLE_SCOPE SESSION
+-VARIABLE_TYPE BIGINT UNSIGNED
++VARIABLE_TYPE INT UNSIGNED
+ VARIABLE_COMMENT Maximum number of iterations when executing recursive queries
+ NUMERIC_MIN_VALUE 0
+ NUMERIC_MAX_VALUE 4294967295
@@ -2199,7 +2199,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 4294967295
@@ -1238,7 +1247,7 @@
VARIABLE_COMMENT The number of seconds the server waits for activity on a connection before closing it
NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 31536000
-@@ -5005,7 +5005,7 @@
+@@ -5089,7 +5089,7 @@
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME OPEN_FILES_LIMIT
VARIABLE_SCOPE GLOBAL
@@ -1247,7 +1256,7 @@
VARIABLE_COMMENT If this is not 0, then mysqld will use this value to reserve file descriptors to use with setrlimit(). If this value is 0 then mysqld will reserve max_connections*5 or max_connections + table_cache*2 (whichever is larger) number of file descriptors
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 4294967295
-@@ -5018,7 +5018,7 @@
+@@ -5102,7 +5102,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
NUMERIC_MIN_VALUE 0
@@ -1256,7 +1265,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -5028,7 +5028,7 @@
+@@ -5112,7 +5112,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Sets the internal state of the RAND() generator for replication purposes
NUMERIC_MIN_VALUE 0
@@ -1265,7 +1274,7 @@
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
-@@ -5113,7 +5113,7 @@
+@@ -5197,7 +5197,7 @@
VARIABLE_NAME LOG_TC_SIZE
GLOBAL_VALUE_ORIGIN AUTO
VARIABLE_SCOPE GLOBAL
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
index 371fd9e3918..3c88437551b 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
@@ -230,7 +230,7 @@ VARIABLE_COMMENT Run fast part of group commit in a single thread, to optimize k
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_ROW_IMAGE
@@ -2179,6 +2179,20 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME MAX_RECURSIVE_ITERATIONS
+SESSION_VALUE 4294967295
+GLOBAL_VALUE 4294967295
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 4294967295
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BIGINT UNSIGNED
+VARIABLE_COMMENT Maximum number of iterations when executing recursive queries
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 4294967295
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME MAX_RELAY_LOG_SIZE
SESSION_VALUE 1073741824
GLOBAL_VALUE 1073741824
@@ -2484,7 +2498,7 @@ VARIABLE_COMMENT Use memory mapping for reading and writing MyISAM tables
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST NULL
+ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT NONE
VARIABLE_NAME MYSQL56_TEMPORAL_FORMAT
@@ -2656,17 +2670,17 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_SWITCH
-SESSION_VALUE index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off
-GLOBAL_VALUE index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off
+SESSION_VALUE index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off,condition_pushdown_for_derived=on
+GLOBAL_VALUE index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off,condition_pushdown_for_derived=on
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off
+DEFAULT_VALUE index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off,condition_pushdown_for_derived=on
VARIABLE_SCOPE SESSION
VARIABLE_TYPE FLAGSET
VARIABLE_COMMENT Fine-tune the optimizer behavior
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
-ENUM_VALUE_LIST index_merge,index_merge_union,index_merge_sort_union,index_merge_intersection,index_merge_sort_intersection,engine_condition_pushdown,index_condition_pushdown,derived_merge,derived_with_keys,firstmatch,loosescan,materialization,in_to_exists,semijoin,partial_match_rowid_merge,partial_match_table_scan,subquery_cache,mrr,mrr_cost_based,mrr_sort_keys,outer_join_with_cache,semijoin_with_cache,join_cache_incremental,join_cache_hashed,join_cache_bka,optimize_join_buffer_size,table_elimination,extended_keys,exists_to_in,orderby_uses_equalities,default
+ENUM_VALUE_LIST index_merge,index_merge_union,index_merge_sort_union,index_merge_intersection,index_merge_sort_intersection,engine_condition_pushdown,index_condition_pushdown,derived_merge,derived_with_keys,firstmatch,loosescan,materialization,in_to_exists,semijoin,partial_match_rowid_merge,partial_match_table_scan,subquery_cache,mrr,mrr_cost_based,mrr_sort_keys,outer_join_with_cache,semijoin_with_cache,join_cache_incremental,join_cache_hashed,join_cache_bka,optimize_join_buffer_size,table_elimination,extended_keys,exists_to_in,orderby_uses_equalities,condition_pushdown_for_derived,default
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME OPTIMIZER_USE_CONDITION_SELECTIVITY
@@ -3007,9 +3021,9 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME PERFORMANCE_SCHEMA_MAX_STATEMENT_CLASSES
SESSION_VALUE NULL
-GLOBAL_VALUE 181
+GLOBAL_VALUE 184
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 181
+DEFAULT_VALUE 184
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Maximum number of statement instruments.
@@ -3779,16 +3793,72 @@ VARIABLE_NAME SERVER_ID
SESSION_VALUE 1
GLOBAL_VALUE 1
GLOBAL_VALUE_ORIGIN CONFIG
-DEFAULT_VALUE 0
+DEFAULT_VALUE 1
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Uniquely identifies the server instance in the community of replication partners
-NUMERIC_MIN_VALUE 0
+NUMERIC_MIN_VALUE 1
NUMERIC_MAX_VALUE 4294967295
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME SESSION_TRACK_SCHEMA
+SESSION_VALUE ON
+GLOBAL_VALUE ON
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE ON
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Track changes to the default schema.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME SESSION_TRACK_STATE_CHANGE
+SESSION_VALUE OFF
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Track changes to the session state.
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
+VARIABLE_NAME SESSION_TRACK_SYSTEM_VARIABLES
+SESSION_VALUE
+GLOBAL_VALUE
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE VARCHAR
+VARIABLE_COMMENT Track changes in registered system variables. For compatibility with MySQL defaults this variable should be set to "autocommit, character_set_client, character_set_connection, character_set_results, time_zone"
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME SESSION_TRACK_TRANSACTION_INFO
+SESSION_VALUE OFF
+GLOBAL_VALUE OFF
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE OFF
+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).
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,STATE,CHARACTERISTICS
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME SKIP_EXTERNAL_LOCKING
SESSION_VALUE NULL
GLOBAL_VALUE ON
@@ -4433,6 +4503,20 @@ NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST NULL
READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME STANDARDS_COMPLIANT_CTE
+SESSION_VALUE ON
+GLOBAL_VALUE ON
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE ON
+VARIABLE_SCOPE SESSION
+VARIABLE_TYPE BOOLEAN
+VARIABLE_COMMENT Allow only standards compiant CTE
+NUMERIC_MIN_VALUE NULL
+NUMERIC_MAX_VALUE NULL
+NUMERIC_BLOCK_SIZE NULL
+ENUM_VALUE_LIST OFF,ON
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME STORAGE_ENGINE
SESSION_VALUE MyISAM
GLOBAL_VALUE MyISAM
@@ -4573,6 +4657,20 @@ NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
+VARIABLE_NAME TABLE_OPEN_CACHE_INSTANCES
+SESSION_VALUE NULL
+GLOBAL_VALUE 8
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 8
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Maximum number of table cache instances
+NUMERIC_MIN_VALUE 1
+NUMERIC_MAX_VALUE 64
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY YES
+COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME THREAD_CACHE_SIZE
SESSION_VALUE NULL
GLOBAL_VALUE 151
diff --git a/mysql-test/suite/sys_vars/r/sysvars_wsrep.result b/mysql-test/suite/sys_vars/r/sysvars_wsrep.result
index f1745a1ad34..36d04afb80d 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_wsrep.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_wsrep.result
@@ -162,7 +162,7 @@ GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE OFF
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BOOLEAN
-VARIABLE_COMMENT To use a workaround forbad autoincrement value
+VARIABLE_COMMENT Enable a workaround to handle the cases where inserting a DEFAULT value into an auto-increment column could fail with duplicate key error
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
@@ -241,13 +241,13 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME WSREP_MAX_WS_ROWS
SESSION_VALUE NULL
-GLOBAL_VALUE 131072
+GLOBAL_VALUE 0
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 131072
+DEFAULT_VALUE 0
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Max number of rows in write set
-NUMERIC_MIN_VALUE 1
+NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 1048576
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
@@ -255,14 +255,14 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME WSREP_MAX_WS_SIZE
SESSION_VALUE NULL
-GLOBAL_VALUE 1073741824
+GLOBAL_VALUE 2147483647
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE 1073741824
+DEFAULT_VALUE 2147483647
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Max write set size (bytes)
NUMERIC_MIN_VALUE 1024
-NUMERIC_MAX_VALUE 4294901759
+NUMERIC_MAX_VALUE 2147483647
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
@@ -367,7 +367,7 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME WSREP_PATCH_VERSION
SESSION_VALUE NULL
-GLOBAL_VALUE wsrep_25.13
+GLOBAL_VALUE wsrep_25.16
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
diff --git a/mysql-test/suite/sys_vars/r/wsrep_desync_basic.result b/mysql-test/suite/sys_vars/r/wsrep_desync_basic.result
index 52fede2f538..90925e71c32 100644
--- a/mysql-test/suite/sys_vars/r/wsrep_desync_basic.result
+++ b/mysql-test/suite/sys_vars/r/wsrep_desync_basic.result
@@ -20,7 +20,7 @@ SET @@global.wsrep_desync=ON;
Got one of the listed errors
SELECT @@global.wsrep_desync;
@@global.wsrep_desync
-1
+0
# valid values
SET @@global.wsrep_desync='OFF';
@@ -31,7 +31,7 @@ SET @@global.wsrep_desync=ON;
Got one of the listed errors
SELECT @@global.wsrep_desync;
@@global.wsrep_desync
-1
+0
SET @@global.wsrep_desync=default;
SELECT @@global.wsrep_desync;
@@global.wsrep_desync
diff --git a/mysql-test/suite/sys_vars/r/wsrep_max_ws_rows_basic.result b/mysql-test/suite/sys_vars/r/wsrep_max_ws_rows_basic.result
index 15438a2afd5..d96bc8708c5 100644
--- a/mysql-test/suite/sys_vars/r/wsrep_max_ws_rows_basic.result
+++ b/mysql-test/suite/sys_vars/r/wsrep_max_ws_rows_basic.result
@@ -6,7 +6,7 @@ SET @wsrep_max_ws_rows_global_saved = @@global.wsrep_max_ws_rows;
# default
SELECT @@global.wsrep_max_ws_rows;
@@global.wsrep_max_ws_rows
-131072
+0
# scope
SELECT @@session.wsrep_max_ws_rows;
@@ -26,11 +26,9 @@ SELECT @@global.wsrep_max_ws_rows;
@@global.wsrep_max_ws_rows
131073
SET @@global.wsrep_max_ws_rows=0;
-Warnings:
-Warning 1292 Truncated incorrect wsrep_max_ws_rows value: '0'
SELECT @@global.wsrep_max_ws_rows;
@@global.wsrep_max_ws_rows
-1
+0
SET @@global.wsrep_max_ws_rows=default;
SELECT @global.wsrep_max_ws_rows;
@global.wsrep_max_ws_rows
diff --git a/mysql-test/suite/sys_vars/r/wsrep_max_ws_size_basic.result b/mysql-test/suite/sys_vars/r/wsrep_max_ws_size_basic.result
index 26d8d823a5c..689da3e9cb0 100644
--- a/mysql-test/suite/sys_vars/r/wsrep_max_ws_size_basic.result
+++ b/mysql-test/suite/sys_vars/r/wsrep_max_ws_size_basic.result
@@ -1,39 +1,38 @@
#
# wsrep_max_ws_size
#
-# save the initial value
-SET @wsrep_max_ws_size_global_saved = @@global.wsrep_max_ws_size;
# default
SELECT @@global.wsrep_max_ws_size;
@@global.wsrep_max_ws_size
-1073741824
+2147483647
# scope
SELECT @@session.wsrep_max_ws_size;
ERROR HY000: Variable 'wsrep_max_ws_size' is a GLOBAL variable
SET @@global.wsrep_max_ws_size=1;
-Warnings:
-Warning 1292 Truncated incorrect wsrep_max_ws_size value: '1'
+ERROR HY000: WSREP (galera) not started
SELECT @@global.wsrep_max_ws_size;
@@global.wsrep_max_ws_size
-1024
+2147483647
# valid values
SET @@global.wsrep_max_ws_size=1073741824;
+ERROR HY000: WSREP (galera) not started
SELECT @@global.wsrep_max_ws_size;
@@global.wsrep_max_ws_size
-1073741824
+2147483647
SET @@global.wsrep_max_ws_size=1073741825;
+ERROR HY000: WSREP (galera) not started
SELECT @@global.wsrep_max_ws_size;
@@global.wsrep_max_ws_size
-1073741825
+2147483647
SET @@global.wsrep_max_ws_size=0;
-Warnings:
-Warning 1292 Truncated incorrect wsrep_max_ws_size value: '0'
+ERROR HY000: WSREP (galera) not started
SELECT @@global.wsrep_max_ws_size;
@@global.wsrep_max_ws_size
-1024
+2147483647
SET @@global.wsrep_max_ws_size=default;
+ERROR HY000: WSREP (galera) not started
SELECT @global.wsrep_max_ws_size;
@global.wsrep_max_ws_size
NULL
@@ -47,12 +46,8 @@ SELECT @global.wsrep_max_ws_size;
@global.wsrep_max_ws_size
NULL
SET @@global.wsrep_max_ws_size=-1;
-Warnings:
-Warning 1292 Truncated incorrect wsrep_max_ws_size value: '-1'
+ERROR HY000: WSREP (galera) not started
SELECT @global.wsrep_max_ws_size;
@global.wsrep_max_ws_size
NULL
-
-# restore the initial value
-SET @@global.wsrep_max_ws_size = @wsrep_max_ws_size_global_saved;
# End of test
diff --git a/mysql-test/suite/sys_vars/r/wsrep_provider_options_basic.result b/mysql-test/suite/sys_vars/r/wsrep_provider_options_basic.result
index 5ef36180de5..b2e07c55b38 100644
--- a/mysql-test/suite/sys_vars/r/wsrep_provider_options_basic.result
+++ b/mysql-test/suite/sys_vars/r/wsrep_provider_options_basic.result
@@ -2,6 +2,7 @@
# wsrep_provider_options
#
call mtr.add_suppression("WSREP: Failed to get provider options");
+SET @@global.wsrep_provider = @@global.wsrep_provider;
# save the initial value
SET @wsrep_provider_options_global_saved = @@global.wsrep_provider_options;
# default
diff --git a/mysql-test/suite/sys_vars/t/general_log_file_basic.test b/mysql-test/suite/sys_vars/t/general_log_file_basic.test
index 12362fa123c..0a169b472e2 100644
--- a/mysql-test/suite/sys_vars/t/general_log_file_basic.test
+++ b/mysql-test/suite/sys_vars/t/general_log_file_basic.test
@@ -58,6 +58,20 @@ SET @@global.general_log_file = mytest.log;
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.general_log_file = 12;
+#
+# MDEV-10465
+#
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.general_log_file = 'my.cnf';
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.general_log_file = '/tmp/my.cnf';
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.general_log_file = '.my.cnf';
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.general_log_file = 'my.cnf\0foo';
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.general_log_file = 'my.ini';
+
--echo '#----------------------FN_DYNVARS_004_03------------------------#'
##############################################################################
diff --git a/mysql-test/suite/sys_vars/t/server_id_basic.test b/mysql-test/suite/sys_vars/t/server_id_basic.test
index 6940270c12e..c2dfa4c5f9d 100644
--- a/mysql-test/suite/sys_vars/t/server_id_basic.test
+++ b/mysql-test/suite/sys_vars/t/server_id_basic.test
@@ -54,7 +54,7 @@ SELECT @@global.server_id;
###################################################################
SET @@global.server_id = DEFAULT;
-SELECT @@global.server_id = 0;
+SELECT @@global.server_id = 1;
--echo '#--------------------FN_DYNVARS_144_03-------------------------#'
##################################################################################
diff --git a/mysql-test/suite/sys_vars/t/session_track_system_variables_basic.test b/mysql-test/suite/sys_vars/t/session_track_system_variables_basic.test
new file mode 100644
index 00000000000..90e6052947c
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/session_track_system_variables_basic.test
@@ -0,0 +1,129 @@
+--source include/not_embedded.inc
+
+--echo #
+--echo # Variable name : session_track_system_variables
+--echo # Scope : Global & Session
+--echo #
+
+--echo # Global - default
+SELECT @@global.session_track_system_variables;
+--echo # Session - default
+SELECT @@session.session_track_system_variables;
+--echo
+
+--echo # via INFORMATION_SCHEMA.GLOBAL_VARIABLES
+SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME LIKE 'session_track%' ORDER BY VARIABLE_NAME;
+
+--echo # via INFORMATION_SCHEMA.SESSION_VARIABLES
+SELECT * FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE 'session_track%' ORDER BY VARIABLE_NAME;
+
+# Save the global value to be used to restore the original value.
+SET @global_saved_tmp = @@global.session_track_system_variables;
+--echo
+
+--echo # Altering global variable's value
+SET @@global.session_track_system_variables='autocommit';
+SELECT @@global.session_track_system_variables;
+SELECT @@session.session_track_system_variables;
+--echo
+
+--echo # Altering session variable's value
+SET @@session.session_track_system_variables='autocommit';
+SELECT @@global.session_track_system_variables;
+SELECT @@session.session_track_system_variables;
+--echo
+
+--echo # Variables' values in a new session.
+connect (con1,"127.0.0.1",root,,test,$MASTER_MYPORT,);
+
+--echo # Global - expect "autocommit"
+SELECT @@global.session_track_system_variables;
+--echo
+--echo # Session - expect "autocommit"
+SELECT @@session.session_track_system_variables;
+--echo
+
+--echo # Switching to the default connection.
+connection default;
+
+SELECT @@global.session_track_system_variables;
+SELECT @@session.session_track_system_variables;
+--echo
+
+--echo # Test if DEFAULT is working as expected.
+SET @@global.session_track_system_variables = DEFAULT;
+SET @@session.session_track_system_variables = DEFAULT;
+--echo
+
+SELECT @@global.session_track_system_variables;
+SELECT @@session.session_track_system_variables;
+--echo
+
+--echo # Variables' values in a new session (con2).
+connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,);
+
+SELECT @@global.session_track_system_variables;
+SELECT @@session.session_track_system_variables;
+--echo
+
+--echo # Altering session should not affect global.
+SET @@session.session_track_system_variables = 'sql_mode';
+SELECT @@global.session_track_system_variables;
+SELECT @@session.session_track_system_variables;
+--echo
+
+--echo # Variables' values in a new session (con3).
+connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,);
+
+--echo # Altering global should not affect session.
+SET @@global.session_track_system_variables = 'sql_mode';
+SELECT @@global.session_track_system_variables;
+SELECT @@session.session_track_system_variables;
+--echo
+
+--echo # Switching to the default connection.
+connection default;
+
+--echo # Testing NULL
+SET @@global.session_track_system_variables = NULL;
+SET @@session.session_track_system_variables = NULL;
+
+--echo # Global - expect "" instead of NULL
+SELECT @@global.session_track_system_variables;
+--echo # Session - expect "" instead of NULL
+SELECT @@session.session_track_system_variables;
+
+--echo # testing with duplicate entries.
+# Lets first set it to some valid value.
+SET @@global.session_track_system_variables= "time_zone";
+SET @@session.session_track_system_variables= "time_zone";
+# Now set with duplicate entries (must pass)
+SET @@global.session_track_system_variables= "sql_mode,sql_mode";
+SET @@session.session_track_system_variables= "sql_mode,sql_mode";
+SELECT @@global.session_track_system_variables;
+SELECT @@session.session_track_system_variables;
+--echo
+
+--echo # testing ordering
+SET @@global.session_track_system_variables= "time_zone,sql_mode";
+SET @@session.session_track_system_variables= "time_zone,sql_mode";
+SELECT @@global.session_track_system_variables;
+SELECT @@session.session_track_system_variables;
+--echo
+
+--echo # special values
+SET @@global.session_track_system_variables= "*";
+SET @@session.session_track_system_variables= "*";
+SELECT @@global.session_track_system_variables;
+SELECT @@session.session_track_system_variables;
+SET @@global.session_track_system_variables= "";
+SET @@session.session_track_system_variables= "";
+SELECT @@global.session_track_system_variables;
+SELECT @@session.session_track_system_variables;
+--echo
+
+
+--echo # Restoring the original values.
+SET @@global.session_track_system_variables = @global_saved_tmp;
+
+--echo # End of tests.
diff --git a/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test b/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test
index 28fc17f6077..69ca5f21f62 100644
--- a/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test
+++ b/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test
@@ -56,6 +56,20 @@ SET @@global.slow_query_log_file = mytest.log;
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.slow_query_log_file = 12;
+#
+# MDEV-10465
+#
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.slow_query_log_file = 'my.cnf';
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.slow_query_log_file = '/tmp/my.cnf';
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.general_log_file = '.my.cnf';
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.general_log_file = 'my.cnf\0foo';
+--error ER_WRONG_VALUE_FOR_VAR
+SET @@global.general_log_file = 'my.ini';
+
--echo '#----------------------FN_DYNVARS_004_03------------------------#'
##############################################################################
# Check if the value in GLOBAL Tables matches values in variable #
diff --git a/mysql-test/suite/sys_vars/t/sysvars_wsrep.test b/mysql-test/suite/sys_vars/t/sysvars_wsrep.test
index 25454191e2e..700b129fd62 100644
--- a/mysql-test/suite/sys_vars/t/sysvars_wsrep.test
+++ b/mysql-test/suite/sys_vars/t/sysvars_wsrep.test
@@ -3,7 +3,9 @@
--let $datadir = `SELECT @@datadir`
--let $hostname = `SELECT @@hostname`
---replace_result $datadir DATADIR $hostname HOSTNAME
+--replace_result $datadir DATADIR
+--let $hostname_regex=/^$hostname\$/HOSTNAME/
+--replace_regex $hostname_regex
--vertical_results
select * from information_schema.system_variables
where variable_name like 'wsrep%'
diff --git a/mysql-test/suite/sys_vars/t/wsrep_max_ws_size_basic.test b/mysql-test/suite/sys_vars/t/wsrep_max_ws_size_basic.test
index e7af4558f24..50506ed12df 100644
--- a/mysql-test/suite/sys_vars/t/wsrep_max_ws_size_basic.test
+++ b/mysql-test/suite/sys_vars/t/wsrep_max_ws_size_basic.test
@@ -4,9 +4,6 @@
--echo # wsrep_max_ws_size
--echo #
---echo # save the initial value
-SET @wsrep_max_ws_size_global_saved = @@global.wsrep_max_ws_size;
-
--echo # default
SELECT @@global.wsrep_max_ws_size;
@@ -14,17 +11,22 @@ SELECT @@global.wsrep_max_ws_size;
--echo # scope
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SELECT @@session.wsrep_max_ws_size;
+--error ER_WRONG_ARGUMENTS
SET @@global.wsrep_max_ws_size=1;
SELECT @@global.wsrep_max_ws_size;
--echo
--echo # valid values
+--error ER_WRONG_ARGUMENTS
SET @@global.wsrep_max_ws_size=1073741824;
SELECT @@global.wsrep_max_ws_size;
+--error ER_WRONG_ARGUMENTS
SET @@global.wsrep_max_ws_size=1073741825;
SELECT @@global.wsrep_max_ws_size;
+--error ER_WRONG_ARGUMENTS
SET @@global.wsrep_max_ws_size=0;
SELECT @@global.wsrep_max_ws_size;
+--error ER_WRONG_ARGUMENTS
SET @@global.wsrep_max_ws_size=default;
SELECT @global.wsrep_max_ws_size;
@@ -35,11 +37,8 @@ SET @@global.wsrep_max_ws_size=NULL;
--error ER_WRONG_TYPE_FOR_VAR
SET @@global.wsrep_max_ws_size='junk';
SELECT @global.wsrep_max_ws_size;
+--error ER_WRONG_ARGUMENTS
SET @@global.wsrep_max_ws_size=-1;
SELECT @global.wsrep_max_ws_size;
---echo
---echo # restore the initial value
-SET @@global.wsrep_max_ws_size = @wsrep_max_ws_size_global_saved;
-
--echo # End of test
diff --git a/mysql-test/suite/sys_vars/t/wsrep_provider_options_basic.test b/mysql-test/suite/sys_vars/t/wsrep_provider_options_basic.test
index 73ec4ffc846..d2ea32a0637 100644
--- a/mysql-test/suite/sys_vars/t/wsrep_provider_options_basic.test
+++ b/mysql-test/suite/sys_vars/t/wsrep_provider_options_basic.test
@@ -6,6 +6,8 @@
call mtr.add_suppression("WSREP: Failed to get provider options");
+SET @@global.wsrep_provider = @@global.wsrep_provider;
+
--echo # save the initial value
SET @wsrep_provider_options_global_saved = @@global.wsrep_provider_options;
diff --git a/mysql-test/suite/vcol/r/charsets.result b/mysql-test/suite/vcol/r/charsets.result
new file mode 100644
index 00000000000..aeff00d3711
--- /dev/null
+++ b/mysql-test/suite/vcol/r/charsets.result
@@ -0,0 +1,31 @@
+set names utf8;
+create table t1 (
+a int,
+b varchar(100) as (if(a,collation('й'),hex('ю')))
+) character set koi8r;
+insert t1 (a) values (0),(1);
+select * from t1;
+a b
+0 C0
+1 koi8r_general_ci
+set names latin1;
+select * from t1;
+a b
+0 C0
+1 koi8r_general_ci
+flush tables;
+select * from t1;
+a b
+0 C0
+1 koi8r_general_ci
+set names koi8r;
+select * from t1;
+a b
+0 C0
+1 koi8r_general_ci
+flush tables;
+select * from t1;
+a b
+0 C0
+1 koi8r_general_ci
+drop table t1;
diff --git a/mysql-test/suite/vcol/r/not_supported.result b/mysql-test/suite/vcol/r/not_supported.result
index fb03e3fdae3..cecf5c27912 100644
--- a/mysql-test/suite/vcol/r/not_supported.result
+++ b/mysql-test/suite/vcol/r/not_supported.result
@@ -14,12 +14,6 @@ create table t4 (a int, b int, v int as (@a:=a));
ERROR HY000: Function or expression '@a' cannot be used in the GENERATED ALWAYS AS clause of `v`
create table t4 (a int, b int, v int as (@a:=a) PERSISTENT);
ERROR HY000: Function or expression '@a' cannot be used in the GENERATED ALWAYS AS clause of `v`
-create table t5 (a int, b int, v varchar(100) as (monthname(a)));
-ERROR HY000: Function or expression 'monthname()' cannot be used in the GENERATED ALWAYS AS clause of `v`
-create table t6 (a int, b int, v varchar(100) as (dayname(a)));
-ERROR HY000: Function or expression 'dayname()' cannot be used in the GENERATED ALWAYS AS clause of `v`
-create table t7 (a int, b int, v varchar(100) as (date_format(a, '%W %a %M %b')));
-ERROR HY000: Function or expression 'date_format()' cannot be used in the GENERATED ALWAYS AS clause of `v`
create table t8 (a int, b int, v varchar(100) as (from_unixtime(a)));
insert t1 (a,b) values (1,2);
insert t8 (a,b) values (1234567890,2);
diff --git a/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result b/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result
index 369f0f902fc..0e03d80014d 100644
--- a/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result
+++ b/mysql-test/suite/vcol/r/vcol_blocked_sql_funcs.result
@@ -74,13 +74,6 @@ create or replace table t1 (a varchar(64), b varchar(64) as (collation(a)) PERSI
create or replace table t1 (a int as (connection_id()));
create or replace table t1 (a int as (connection_id()) PERSISTENT);
ERROR HY000: Function or expression 'connection_id()' cannot be used in the GENERATED ALWAYS AS clause of `a`
-# CURRENT_USER(), CURRENT_USER
-create or replace table t1 (a varchar(32) as (current_user()));
-ERROR HY000: Function or expression 'current_user()' cannot be used in the GENERATED ALWAYS AS clause of `a`
-create or replace table t1 (a varchar(32) as (current_user()) PERSISTENT);
-ERROR HY000: Function or expression 'current_user()' cannot be used in the GENERATED ALWAYS AS clause of `a`
-create or replace table t1 (a varchar(32) as (current_user) PERSISTENT);
-ERROR HY000: Function or expression 'current_user()' cannot be used in the GENERATED ALWAYS AS clause of `a`
# DATABASE()
create or replace table t1 (a varchar(32) as (database()));
create or replace table t1 (a varchar(1024), b varchar(1024) as (database()) PERSISTENT);
@@ -141,9 +134,6 @@ create or replace table t1 (a varchar(1024), b varchar(1024) as (version()) PERS
ERROR HY000: Function or expression 'version()' cannot be used in the GENERATED ALWAYS AS clause of `b`
# ENCRYPT()
create or replace table t1 (a varchar(1024), b varchar(1024) as (encrypt(a)) PERSISTENT);
-# DATE_FORMAT()
-create or replace table t1 (a datetime, b varchar(64) as (date_format(a,'%W %M %D'));
-ERROR HY000: Function or expression 'date_format()' cannot be used in the GENERATED ALWAYS AS clause of `b`
# Stored procedures
create procedure p1()
begin
@@ -217,15 +207,6 @@ ERROR HY000: Function or expression 'var_samp()' cannot be used in the GENERATED
# VARIANCE()
create or replace table t1 (a int, b int as (variance(a)));
ERROR HY000: Function or expression 'variance()' cannot be used in the GENERATED ALWAYS AS clause of `b`
-# DAYNAME()
-create or replace table t1 (a int, b varchar(10) as (dayname(a)));
-ERROR HY000: Function or expression 'dayname()' cannot be used in the GENERATED ALWAYS AS clause of `b`
-create or replace table t1 (a int, b varchar(10) as (monthname(a)));
-ERROR HY000: Function or expression 'monthname()' cannot be used in the GENERATED ALWAYS AS clause of `b`
-create or replace table t1 (a int, b varchar(10) as (date_format("1963-01-01","%d.%m.%Y")));
-ERROR HY000: Function or expression 'date_format()' cannot be used in the GENERATED ALWAYS AS clause of `b`
-create or replace table t1 (a int, b varchar(10) as (time_format(now(),"%d.%m.%Y")));
-ERROR HY000: Function or expression 'time_format()' cannot be used in the GENERATED ALWAYS AS clause of `b`
#
# XML FUNCTIONS
#
@@ -261,7 +242,7 @@ drop function sub1;
create or replace table t1 (a int, b varchar(300) as (concat(a,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')));
drop table t1;
create or replace table t1 (a int, b varchar(16384) as (concat(a,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')));
-ERROR HY000: Too many columns
+ERROR HY000: Table definition is too large
#
# Constant expression
create or replace table t1 (a int as (PI()) PERSISTENT);
diff --git a/mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result b/mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result
index 7ce09a3a967..2e6dbc38b6f 100644
--- a/mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result
+++ b/mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result
@@ -2831,3 +2831,78 @@ a b
a 30
drop table t1;
set sql_warnings = 0;
+# MONTHNAME()
+set sql_warnings = 1;
+create table t1 (a date, b varchar(100) as (monthname(a)));
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` date DEFAULT NULL,
+ `b` varchar(100) AS (monthname(a)) VIRTUAL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert into t1 values ('2010-10-10',default);
+select * from t1;
+a b
+2010-10-10 October
+drop table t1;
+set sql_warnings = 0;
+# DAYNAME()
+set sql_warnings = 1;
+create table t1 (a date, b varchar(100) as (dayname(a)));
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` date DEFAULT NULL,
+ `b` varchar(100) AS (dayname(a)) VIRTUAL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert into t1 values ('2011-11-11',default);
+select * from t1;
+a b
+2011-11-11 Friday
+drop table t1;
+set sql_warnings = 0;
+# DATE_FORMAT()
+set sql_warnings = 1;
+create table t1 (a date, b varchar(100) as (date_format(a, '%W %a %M %b')));
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` date DEFAULT NULL,
+ `b` varchar(100) AS (date_format(a, '%W %a %M %b')) VIRTUAL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert into t1 values ('2012-12-12',default);
+select * from t1;
+a b
+2012-12-12 Wednesday Wed December Dec
+drop table t1;
+set sql_warnings = 0;
+# CURRENT_USER()
+set sql_warnings = 1;
+create table t1 (a char, b varchar(32) as (current_user()));
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` char(1) DEFAULT NULL,
+ `b` varchar(32) AS (current_user()) VIRTUAL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert into t1 values ('a', default);
+select * from t1;
+a b
+a root@localhost
+drop table t1;
+set sql_warnings = 0;
+# TIME_FORMAT()
+set sql_warnings = 1;
+create table t1 (a datetime, b varchar(10) as (time_format(a,"%d.%m.%Y")));
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` datetime DEFAULT NULL,
+ `b` varchar(10) AS (time_format(a,"%d.%m.%Y")) VIRTUAL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert into t1 values ('2001-01-01 02:02:02',default);
+select * from t1;
+a b
+2001-01-01 02:02:02 01.01.2001
+drop table t1;
+set sql_warnings = 0;
diff --git a/mysql-test/suite/vcol/t/charsets.test b/mysql-test/suite/vcol/t/charsets.test
new file mode 100644
index 00000000000..72f9b7a31a6
--- /dev/null
+++ b/mysql-test/suite/vcol/t/charsets.test
@@ -0,0 +1,19 @@
+#
+# vcol definition, table charset, current connection charset
+#
+set names utf8;
+create table t1 (
+ a int,
+ b varchar(100) as (if(a,collation('й'),hex('ю')))
+) character set koi8r;
+insert t1 (a) values (0),(1);
+select * from t1;
+set names latin1;
+select * from t1;
+flush tables;
+select * from t1;
+set names koi8r;
+select * from t1;
+flush tables;
+select * from t1;
+drop table t1;
diff --git a/mysql-test/suite/vcol/t/not_supported.test b/mysql-test/suite/vcol/t/not_supported.test
index 4cfc97a1be1..ee6074870de 100644
--- a/mysql-test/suite/vcol/t/not_supported.test
+++ b/mysql-test/suite/vcol/t/not_supported.test
@@ -24,12 +24,6 @@ create table t3 (a int, b int, v int as (a+@@error_count) PERSISTENT);
create table t4 (a int, b int, v int as (@a:=a));
--error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
create table t4 (a int, b int, v int as (@a:=a) PERSISTENT);
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
-create table t5 (a int, b int, v varchar(100) as (monthname(a)));
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
-create table t6 (a int, b int, v varchar(100) as (dayname(a)));
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
-create table t7 (a int, b int, v varchar(100) as (date_format(a, '%W %a %M %b')));
create table t8 (a int, b int, v varchar(100) as (from_unixtime(a)));
insert t1 (a,b) values (1,2);
diff --git a/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_main.inc b/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_main.inc
index fad2f531ee5..492082af30c 100644
--- a/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_main.inc
+++ b/mysql-test/suite/vcol/t/vcol_blocked_sql_funcs_main.inc
@@ -116,14 +116,6 @@ create or replace table t1 (a int as (connection_id()));
-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
create or replace table t1 (a int as (connection_id()) PERSISTENT);
---echo # CURRENT_USER(), CURRENT_USER
--- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
-create or replace table t1 (a varchar(32) as (current_user()));
--- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
-create or replace table t1 (a varchar(32) as (current_user()) PERSISTENT);
--- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
-create or replace table t1 (a varchar(32) as (current_user) PERSISTENT);
-
--echo # DATABASE()
create or replace table t1 (a varchar(32) as (database()));
-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
@@ -204,10 +196,6 @@ create or replace table t1 (a varchar(1024), b varchar(1024) as (version()) PERS
--echo # ENCRYPT()
create or replace table t1 (a varchar(1024), b varchar(1024) as (encrypt(a)) PERSISTENT);
---echo # DATE_FORMAT()
--- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
-create or replace table t1 (a datetime, b varchar(64) as (date_format(a,'%W %M %D'));
-
--echo # Stored procedures
delimiter //;
@@ -308,19 +296,6 @@ create or replace table t1 (a int, b int as (var_samp(a)));
-- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
create or replace table t1 (a int, b int as (variance(a)));
---echo # DAYNAME()
--- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
-create or replace table t1 (a int, b varchar(10) as (dayname(a)));
-
--- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
-create or replace table t1 (a int, b varchar(10) as (monthname(a)));
-
--- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
-create or replace table t1 (a int, b varchar(10) as (date_format("1963-01-01","%d.%m.%Y")));
-
--- error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
-create or replace table t1 (a int, b varchar(10) as (time_format(now(),"%d.%m.%Y")));
-
--echo #
--echo # XML FUNCTIONS
--echo #
diff --git a/mysql-test/suite/vcol/t/vcol_supported_sql_funcs_main.inc b/mysql-test/suite/vcol/t/vcol_supported_sql_funcs_main.inc
index cf3183d979d..4a95ea75534 100644
--- a/mysql-test/suite/vcol/t/vcol_supported_sql_funcs_main.inc
+++ b/mysql-test/suite/vcol/t/vcol_supported_sql_funcs_main.inc
@@ -1179,3 +1179,33 @@ let $values1 = 'a',default;
let $rows = 1;
--source suite/vcol/inc/vcol_supported_sql_funcs.inc
+--echo # MONTHNAME()
+let $cols = a date, b varchar(100) as (monthname(a));
+let $values1 = '2010-10-10',default;
+let $rows = 1;
+--source suite/vcol/inc/vcol_supported_sql_funcs.inc
+
+--echo # DAYNAME()
+let $cols = a date, b varchar(100) as (dayname(a));
+let $values1 = '2011-11-11',default;
+let $rows = 1;
+--source suite/vcol/inc/vcol_supported_sql_funcs.inc
+
+--echo # DATE_FORMAT()
+let $cols = a date, b varchar(100) as (date_format(a, '%W %a %M %b'));
+let $values1 = '2012-12-12',default;
+let $rows = 1;
+--source suite/vcol/inc/vcol_supported_sql_funcs.inc
+
+--echo # CURRENT_USER()
+let $cols = a char, b varchar(32) as (current_user());
+let $values1 = 'a', default;
+let $rows = 1;
+--source suite/vcol/inc/vcol_supported_sql_funcs.inc
+
+--echo # TIME_FORMAT()
+let $cols = a datetime, b varchar(10) as (time_format(a,"%d.%m.%Y"));
+let $values1 = '2001-01-01 02:02:02',default;
+let $rows = 1;
+--source suite/vcol/inc/vcol_supported_sql_funcs.inc
+
diff --git a/mysql-test/suite/wsrep/r/variables.result b/mysql-test/suite/wsrep/r/variables.result
index 62d7f62440f..30b97e02af3 100644
--- a/mysql-test/suite/wsrep/r/variables.result
+++ b/mysql-test/suite/wsrep/r/variables.result
@@ -160,7 +160,7 @@ SELECT @@global.wsrep_slave_threads;
1
SELECT @@global.wsrep_cluster_address;
@@global.wsrep_cluster_address
-NULL
+
SHOW STATUS LIKE 'threads_connected';
Variable_name Value
Threads_connected 1
@@ -173,7 +173,7 @@ SELECT @@global.wsrep_provider;
libgalera_smm.so
SELECT @@global.wsrep_cluster_address;
@@global.wsrep_cluster_address
-NULL
+
SHOW STATUS LIKE 'threads_connected';
Variable_name Value
Threads_connected 1
diff --git a/mysql-test/suite/wsrep/t/mdev_10186.test b/mysql-test/suite/wsrep/t/mdev_10186.test
index ec5e9462821..90665d3c97f 100644
--- a/mysql-test/suite/wsrep/t/mdev_10186.test
+++ b/mysql-test/suite/wsrep/t/mdev_10186.test
@@ -7,6 +7,7 @@
--echo #
SELECT @@wsrep_on;
+--replace_result /usr/lib64/ /usr/lib/
SELECT @@GLOBAL.wsrep_provider;
SET @@GLOBAL.wsrep_cluster_address='gcomm://';
diff --git a/mysql-test/suite/wsrep/t/variables.test b/mysql-test/suite/wsrep/t/variables.test
index d77dc4e66f9..1769f567848 100644
--- a/mysql-test/suite/wsrep/t/variables.test
+++ b/mysql-test/suite/wsrep/t/variables.test
@@ -29,7 +29,7 @@ CALL mtr.add_suppression("WSREP: Could not open saved state file for reading.*")
--disable_query_log
eval SET GLOBAL wsrep_provider= '$WSREP_PROVIDER';
---let $galera_version=3.9
+--let $galera_version=25.3.17
source include/check_galera_version.inc;
--enable_query_log
diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test
index 7811de0f9f7..a84b22c69b6 100644
--- a/mysql-test/t/alter_table.test
+++ b/mysql-test/t/alter_table.test
@@ -1732,3 +1732,17 @@ ALTER TABLE t1 DROP INDEX i1, ADD INDEX i1(a) COMMENT 'comment2';
SHOW CREATE TABLE t1;
DROP TABLE t1;
+--echo #
+--echo # MDEV-10421 duplicate CHECK CONSTRAINTs
+--echo #
+CREATE TABLE t1 (a INT, b INT) engine=myisam;
+ALTER TABLE t1 ADD CONSTRAINT IF NOT EXISTS `min` CHECK (a+b > 100);
+--error ER_DUP_CONSTRAINT_NAME
+ALTER TABLE t1 ADD CONSTRAINT `min` CHECK (a+b > 100);
+ALTER TABLE t1 ADD CONSTRAINT IF NOT EXISTS `min` CHECK (a+b > 100);
+ALTER TABLE t1 ADD CONSTRAINT `mini` CHECK (a+b > 100);
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+--error ER_DUP_CONSTRAINT_NAME
+CREATE TABLE t1(a INT, b INT, CONSTRAINT min check (a>5),
+ CONSTRAINT min check (b>5));
diff --git a/mysql-test/t/cte_nonrecursive.test b/mysql-test/t/cte_nonrecursive.test
index 81f12cc91b1..ccd08940de3 100644
--- a/mysql-test/t/cte_nonrecursive.test
+++ b/mysql-test/t/cte_nonrecursive.test
@@ -152,6 +152,28 @@ select * from (select * from t1 where b >= 'c') as r1,
with t(c) as (select a from t1 where b >= 'c')
select * from t r1, t r2 where r1.c=r2.c;
+--echo # t two references of t used in different parts of a union
+with t as (select a from t1 where b >= 'c')
+ select * from t where a < 2
+ union
+ select * from t where a >= 4;
+select * from (select a from t1 where b >= 'c') as t
+ where t.a < 2
+union
+select * from (select a from t1 where b >= 'c') as t
+ where t.a >= 4;
+explain
+with t as (select a from t1 where b >= 'c')
+ select * from t where a < 2
+ union
+ select * from t where a >= 4;
+explain
+select * from (select a from t1 where b >= 'c') as t
+ where t.a < 2
+union
+select * from (select a from t1 where b >= 'c') as t
+ where t.a >= 4;
+
--echo # specification of t contains union
with t as (select a from t1 where b >= 'f'
union
@@ -366,7 +388,7 @@ with t as (select * from t2 where c>3),
t as (select a from t1 where a>2)
select * from t,t1 where t1.a=t.c;
---ERROR ER_WRONG_ORDER_IN_WITH_CLAUSE
+--ERROR ER_NO_SUCH_TABLE
with t as (select a from s where a<5),
s as (select a from t1 where b>='d')
select * from t,s where t.a=s.a;
@@ -376,31 +398,35 @@ with recursive
s as (select a from t1 where b>='d')
select * from t,s where t.a=s.a;
---ERROR ER_RECURSIVE_QUERY_IN_WITH_CLAUSE
+--ERROR ER_RECURSIVE_WITHOUT_ANCHORS
with recursive t as (select * from s where a>2),
s as (select a from t1,r where t1.a>r.c),
r as (select c from t,t2 where t.a=t2.c)
select * from r where r.c<7;
---ERROR ER_RECURSIVE_QUERY_IN_WITH_CLAUSE
-with t as (select * from s where a>2),
+--ERROR ER_RECURSIVE_WITHOUT_ANCHORS
+with recursive
+ t as (select * from s where a>2),
s as (select a from t1,r where t1.a>r.c),
r as (select c from t,t2 where t.a=t2.c)
select * from r where r.c<7;
---ERROR ER_RECURSIVE_QUERY_IN_WITH_CLAUSE
-with t as (select * from t1
+--ERROR ER_RECURSIVE_WITHOUT_ANCHORS
+with recursive
+ t as (select * from t1
where a in (select c from s where b<='ccc') and b>'b'),
s as (select * from t1,t2
where t1.a=t2.c and t1.c in (select a from t where a<5))
select * from s where s.b>'aaa';
---ERROR ER_RECURSIVE_QUERY_IN_WITH_CLAUSE
-with t as (select * from t1 where b>'aaa' and b <='d')
+--ERROR ER_RECURSIVE_WITHOUT_ANCHORS
+with recursive
+ t as (select * from t1 where b>'aaa' and b <='d')
select t.b from t,t2
where t.a=t2.c and
- t2.c in (with s as (select t1.a from s,t1 where t1.a=s.a and t1.b<'c')
- select * from s);
+ t2.c in (with recursive
+ s as (select t1.a from s,t1 where t1.a=s.a and t1.b<'c')
+ select * from s);
--echo #erroneous definition of unreferenced with table t
--ERROR ER_BAD_FIELD_ERROR
with t as (select count(*) from t1 where d>='f' group by a)
@@ -433,6 +459,30 @@ with t(f) as (select * from t1 where b >= 'c')
with t(f1,f1) as (select * from t1 where b >= 'c')
select t1.b from t2,t1 where t1.a = t2.c;
+--echo # explain for query with unreferenced with table
+
+explain
+with t as (select a from t1 where b >= 'c')
+ select t1.b from t2,t1 where t1.a = t2.c;
+
+explain
+with t as (select a, count(*) from t1 where b >= 'c' group by a)
+ select t1.b from t2,t1 where t1.a = t2.c;
+
+--echo # too many with elements in with clause
+let $m= 65;
+let $i= $m;
+dec $i;
+let $q= with s$m as (select * from t1);
+while ($i)
+{
+ let $q= $q, s$i as (select * from t1) ;
+ dec $i;
+ }
+let $q= $q select * from s$m;
+--ERROR ER_TOO_MANY_DEFINITIONS_IN_WITH_CLAUSE
+eval $q;
+
drop table t1,t2;
--echo #
@@ -467,3 +517,62 @@ SELECT * FROM (WITH a AS (SELECT * FROM t1) SELECT * FROM t2 NATURAL JOIN t3) AS
DROP TABLE t1,t2,t3;
+--echo #
+--echo # Bug mdev-10344: the WITH clause of the query refers to a view that uses
+--echo # a base table with the same name as a CTE table from the clause
+--echo #
+
+
+create table ten(a int primary key);
+insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+
+create table one_k(a int primary key);
+insert into one_k select A.a + B.a* 10 + C.a * 100 from ten A, ten B, ten C;
+
+create view v1 as select * from ten;
+
+select * from v1;
+
+drop view v1;
+drop table ten, one_k;
+
+--echo #
+--echo # MDEV-10057 : Crash with EXPLAIN + WITH + constant query
+--echo #
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+SELECT * FROM (WITH a AS (SELECT * FROM t1) SELECT 1) AS t1;
+EXPLAIN SELECT * FROM (WITH a AS (SELECT * FROM t1) SELECT 1) AS t1;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-10058: Suspicious EXPLAIN output for a derived table + WITH + joined table
+--echo #
+CREATE TABLE t1 (a INT);
+CREATE TABLE t2 (a INT);
+CREATE TABLE t3 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+INSERT INTO t2 VALUES (1),(2),(3);
+INSERT INTO t3 VALUES (1),(2),(3);
+--error ER_PARSE_ERROR
+EXPLAIN SELECT * FROM (WITH a AS (SELECT * FROM t1) (t2 NATURAL JOIN t3));
+explain SELECT * FROM (WITH a AS (SELECT * FROM t1) SELECT * FROM t2 NATURAL JOIN t3) AS d1;
+DROP TABLE t1,t2,t3;
+
+--echo #
+--echo # MDEV-10729: Server crashes in st_select_lex::set_explain_type
+--echo #
+CREATE TABLE t1 (i1 INT, KEY(i1)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (4),(8);
+
+CREATE TABLE t2 (a2 INT, b2 INT, KEY(b2)) ENGINE=MyISAM;
+INSERT INTO t2 VALUES (8,7);
+
+CREATE TABLE t3 (i3 INT) ENGINE=MyISAM;
+INSERT INTO t3 VALUES (2),(6);
+
+SELECT * FROM t1, t2 WHERE a2 = i1 and b2 >= i1 AND i1 IN ( SELECT i3 FROM t3 )
+UNION
+SELECT * FROM t1, t2 WHERE a2 = i1 and b2 >= i1 AND i1 IN ( SELECT i3 FROM t3 )
+;
+DROP TABLE t1,t2,t3;
diff --git a/mysql-test/t/cte_recursive.test b/mysql-test/t/cte_recursive.test
new file mode 100644
index 00000000000..5eb84bae4fb
--- /dev/null
+++ b/mysql-test/t/cte_recursive.test
@@ -0,0 +1,1196 @@
+create table t1 (a int, b varchar(32));
+insert into t1 values
+(4,'aaaa' ), (7,'bb'), (1,'ccc'), (4,'dd');
+insert into t1 values
+(3,'eee'), (7,'bb'), (1,'fff'), (4,'ggg');
+
+--ERROR ER_UNACCEPTABLE_MUTUAL_RECURSION
+with recursive
+t as
+(
+ select * from t1 where t1.b >= 'c'
+ union
+ select * from r
+),
+r as
+(
+ select * from t
+ union
+ select t1.* from t1,r where r.a+1 = t1.a
+)
+select * from r;
+
+
+--ERROR ER_UNACCEPTABLE_MUTUAL_RECURSION
+with recursive
+a1(a,b) as
+(select * from t1 where t1.a>3
+union
+select * from b1 where b1.a >3
+union
+select * from c1 where c1.a>3),
+b1(a,b) as
+(select * from a1 where a1.b > 'ccc'
+union
+select * from c1 where c1.b > 'ddd'),
+c1(a,b) as
+(select * from a1 where a1.a<6 and a1.b< 'zz'
+union
+select * from b1 where b1.b > 'auu')
+select * from c1;
+
+drop table t1;
+
+
+--echo # WITH RECURSIVE vs just WITH
+
+create table t1 (a int);
+insert into t1 values
+ (0), (1), (2), (3), (4);
+create table t2 (a int);
+insert into t2 values
+ (1), (2), (3), (4), (5);
+
+
+--echo # just WITH : s refers to t defined after s
+--ERROR ER_NO_SUCH_TABLE
+with
+ s(a) as (select t.a + 10 from t),
+ t(a) as (select t1.a from t1)
+select * from s;
+
+--echo # WITH RECURSIVE: s refers to t defined after s
+with recursive
+ s(a) as (select t.a + 10 from t),
+ t(a) as (select t1.a from t1)
+select * from s;
+
+--echo # just WITH : defined t1 is non-recursive and uses base tables t1,t2
+with
+t1 as
+(
+select a from t2 where t2.a=3
+union
+select t2.a from t1,t2 where t1.a+1=t2.a
+)
+select * from t1;
+
+explain
+with
+t1 as
+(
+select a from t2 where t2.a=3
+union
+select t2.a from t1,t2 where t1.a+1=t2.a
+)
+select * from t1;
+
+
+--echo #WITH RECURSIVE : defined t1 is recursive and uses only base table t2
+with recursive
+t1 as
+(
+select a from t2 where t2.a=3
+union
+select t2.a from t1,t2 where t1.a+1=t2.a
+)
+select * from t1;
+
+explain
+with recursive
+t1 as
+(
+select a from t2 where t2.a=3
+union
+select t2.a from t1,t2 where t1.a+1=t2.a
+)
+select * from t1;
+
+--echo # just WITH : types of t1 columns are determined by all parts of union
+
+create view v1 as
+with
+t1 as
+(
+select a from t2 where t2.a=3
+union
+select t2.a+1 from t1,t2 where t1.a=t2.a
+)
+select * from t1;
+
+show columns from v1;
+
+
+--echo # WITH RECURSIVE : types of t1 columns are determined by anchor parts
+
+create view v2 as
+with recursive
+t1 as
+(
+select a from t2 where t2.a=3
+union
+select t2.a+1 from t1,t2 where t1.a=t2.a
+)
+select * from t1;
+
+show columns from v2;
+
+drop view v1,v2;
+
+drop table t1,t2;
+
+
+create table folks(id int, name char(32), dob date, father int, mother int);
+
+insert into folks values
+(100, 'Me', '2000-01-01', 20, 30),
+(20, 'Dad', '1970-02-02', 10, 9),
+(30, 'Mom', '1975-03-03', 8, 7),
+(10, 'Grandpa Bill', '1940-04-05', null, null),
+(9, 'Grandma Ann', '1941-10-15', null, null),
+(25, 'Uncle Jim', '1968-11-18', 8, 7),
+(98, 'Sister Amy', '2001-06-20', 20, 30),
+(7, 'Grandma Sally', '1943-08-23', null, 6),
+(8, 'Grandpa Ben', '1940-10-21', null, null),
+(6, 'Grandgrandma Martha', '1923-05-17', null, null),
+(67, 'Cousin Eddie', '1992-02-28', 25, 27),
+(27, 'Auntie Melinda', '1971-03-29', null, null);
+
+--echo # simple recursion with one anchor and one recursive select
+--echo # the anchor is the first select in the specification
+with recursive
+ancestors
+as
+(
+ select *
+ from folks
+ where name = 'Me' and dob = '2000-01-01'
+ union
+ select p.id, p.name, p.dob, p.father, p.mother
+ from folks as p, ancestors AS a
+ where p.id = a.father or p.id = a.mother
+)
+select * from ancestors;
+
+--echo # simple recursion with one anchor and one recursive select
+--echo # the anchor is the last select in the specification
+with recursive
+ancestors
+as
+(
+ select p.*
+ from folks as p, ancestors AS a
+ where p.id = a.father or p.id = a.mother
+ union
+ select *
+ from folks
+ where name = 'Me' and dob = '2000-01-01'
+)
+select * from ancestors;
+
+--echo # simple recursion with one anchor and one recursive select
+--echo # the anchor is the first select in the specification
+with recursive
+ancestors
+as
+(
+ select *
+ from folks
+ where name = 'Cousin Eddie'
+ union
+ select p.*
+ from folks as p, ancestors as a
+ where p.id = a.father or p.id = a.mother
+)
+select * from ancestors;
+
+--echo # simple recursion with or in anchor and or in recursive part
+with recursive
+ancestors
+as
+(
+ select *
+ from folks
+ where name = 'Me' or name='Sister Amy'
+ union
+ select p.*
+ from folks as p, ancestors as a
+ where p.id = a.father or p.id = a.mother
+)
+select * from ancestors;
+
+--echo # two recursive definition, one uses another
+with recursive
+prev_gen
+as
+(
+ select folks.*
+ from folks, prev_gen
+ where folks.id=prev_gen.father or folks.id=prev_gen.mother
+ union
+ select *
+ from folks
+ where name='Me'
+),
+ancestors
+as
+(
+ select *
+ from folks
+ where name='Me'
+ union
+ select *
+ from ancestors
+ union
+ select *
+ from prev_gen
+)
+select ancestors.name, ancestors.dob from ancestors;
+
+--echo # recursive definition with two attached non-recursive
+with recursive
+ancestors(id,name,dob)
+as
+(
+ with
+ father(child_id,id,name,dob)
+ as
+ (
+ select folks.id, f.id, f.name, f.dob
+ from folks, folks f
+ where folks.father=f.id
+
+ ),
+ mother(child_id,id,name,dob)
+ as
+ (
+ select folks.id, m.id, m.name, m.dob
+ from folks, folks m
+ where folks.mother=m.id
+
+ )
+ select folks.id, folks.name, folks.dob
+ from folks
+ where name='Me'
+ union
+ select f.id, f.name, f.dob
+ from ancestors a, father f
+ where f.child_id=a.id
+ union
+ select m.id, m.name, m.dob
+ from ancestors a, mother m
+ where m.child_id=a.id
+
+)
+select ancestors.name, ancestors.dob from ancestors;
+
+--echo # simple recursion with one anchor and one recursive select
+--echo # the anchor is the first select in the specification
+with recursive
+descendants
+as
+(
+ select *
+ from folks
+ where name = 'Grandpa Bill'
+ union
+ select folks.*
+ from folks, descendants as d
+ where d.id=folks.father or d.id=folks.mother
+)
+select * from descendants;
+
+--echo # simple recursion with one anchor and one recursive select
+--echo # the anchor is the first select in the specification
+with recursive
+descendants
+as
+(
+ select *
+ from folks
+ where name = 'Grandma Sally'
+ union
+ select folks.*
+ from folks, descendants as d
+ where d.id=folks.father or d.id=folks.mother
+)
+select * from descendants;
+
+
+--echo # simple recursive table used three times in the main query
+with recursive
+ancestors
+as
+(
+ select *
+ from folks
+ where name = 'Me' and dob = '2000-01-01'
+ union
+ select p.*
+ from folks as p, ancestors AS a
+ where p.id = a.father OR p.id = a.mother
+)
+select *
+ from ancestors t1, ancestors t2
+ where exists (select * from ancestors a
+ where a.father=t1.id AND a.mother=t2.id);
+
+
+--echo # simple recursive table used three times in the main query
+with
+ancestor_couples(husband, h_dob, wife, w_dob)
+as
+(
+with recursive
+ancestors
+as
+(
+ select *
+ from folks
+ where name = 'Me'
+ union
+ select p.*
+ from folks as p, ancestors AS a
+ where p.id = a.father OR p.id = a.mother
+)
+select t1.name, t1.dob, t2.name, t2.dob
+ from ancestors t1, ancestors t2
+ where exists (select * from ancestors a
+ where a.father=t1.id AND a.mother=t2.id)
+)
+select * from ancestor_couples;
+
+
+--echo # simple recursion with two selects in recursive part
+with recursive
+ancestors
+as
+(
+ select *
+ from folks
+ where name = 'Me'
+ union
+ select p.*
+ from folks as p, ancestors as fa
+ where p.id = fa.father
+ union
+ select p.*
+ from folks as p, ancestors as ma
+ where p.id = ma.mother
+)
+select * from ancestors;
+
+
+--echo # mutual recursion with renaming
+with recursive
+ancestor_couples(h_id, h_name, h_dob, h_father, h_mother,
+ w_id, w_name, w_dob, w_father, w_mother)
+as
+(
+ select h.*, w.*
+ from folks h, folks w, coupled_ancestors a
+ where a.father = h.id AND a.mother = w.id
+ union
+ select h.*, w.*
+ from folks v, folks h, folks w
+ where v.name = 'Me' and
+ (v.father = h.id AND v.mother= w.id)
+),
+coupled_ancestors (id, name, dob, father, mother)
+as
+(
+ select h_id, h_name, h_dob, h_father, h_mother
+ from ancestor_couples
+ union
+ select w_id, w_name, w_dob, w_father, w_mother
+ from ancestor_couples
+)
+select h_name, h_dob, w_name, w_dob
+ from ancestor_couples;
+
+
+--echo # mutual recursion with union all
+with recursive
+ancestor_couples(h_id, h_name, h_dob, h_father, h_mother,
+ w_id, w_name, w_dob, w_father, w_mother)
+as
+(
+ select h.*, w.*
+ from folks h, folks w, coupled_ancestors a
+ where a.father = h.id AND a.mother = w.id
+ union
+ select h.*, w.*
+ from folks v, folks h, folks w
+ where v.name = 'Me' and
+ (v.father = h.id AND v.mother= w.id)
+),
+coupled_ancestors (id, name, dob, father, mother)
+as
+(
+ select h_id, h_name, h_dob, h_father, h_mother
+ from ancestor_couples
+ union all
+ select w_id, w_name, w_dob, w_father, w_mother
+ from ancestor_couples
+)
+select h_name, h_dob, w_name, w_dob
+ from ancestor_couples;
+
+
+--echo # mutual recursion with renaming
+with recursive
+ancestor_couples(h_id, h_name, h_dob, h_father, h_mother,
+ w_id, w_name, w_dob, w_father, w_mother)
+as
+(
+ select h.*, w.*
+ from folks h, folks w, coupled_ancestors a
+ where a.father = h.id AND a.mother = w.id
+ union
+ select h.*, w.*
+ from folks v, folks h, folks w
+ where v.name = 'Me' and
+ (v.father = h.id AND v.mother= w.id)
+),
+coupled_ancestors (id, name, dob, father, mother)
+as
+(
+ select h_id, h_name, h_dob, h_father, h_mother
+ from ancestor_couples
+ union
+ select w_id, w_name, w_dob, w_father, w_mother
+ from ancestor_couples
+)
+select h_name, h_dob, w_name, w_dob
+ from ancestor_couples;
+
+
+--echo # mutual recursion with union all
+with recursive
+ancestor_couples(h_id, h_name, h_dob, h_father, h_mother,
+ w_id, w_name, w_dob, w_father, w_mother)
+as
+(
+ select h.*, w.*
+ from folks h, folks w, coupled_ancestors a
+ where a.father = h.id AND a.mother = w.id
+),
+coupled_ancestors (id, name, dob, father, mother)
+as
+(
+ select *
+ from folks
+ where name = 'Me'
+ union all
+ select h_id, h_name, h_dob, h_father, h_mother
+ from ancestor_couples
+ union all
+ select w_id, w_name, w_dob, w_father, w_mother
+ from ancestor_couples
+)
+select h_name, h_dob, w_name, w_dob
+ from ancestor_couples;
+
+--echo # mutual recursion with one select in the first definition
+with recursive
+ancestor_couple_ids(h_id, w_id)
+as
+(
+ select a.father, a.mother
+ 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 *
+ from folks
+ where name = 'Me'
+ union all
+ select p.*
+ from folks p, ancestor_couple_ids fa
+ where p.id = fa.h_id
+ union all
+ select p.*
+ from folks p, ancestor_couple_ids ma
+ where p.id = ma.w_id
+)
+select *
+ from ancestor_couple_ids;
+
+
+--echo # join of a mutually recursive table with base tables
+with recursive
+ancestor_couple_ids(h_id, w_id)
+as
+(
+ select a.father, a.mother
+ 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 *
+ from folks
+ where name = 'Me'
+ union all
+ select p.*
+ from folks p, ancestor_couple_ids fa
+ where p.id = fa.h_id
+ union all
+ select p.*
+ from folks p, ancestor_couple_ids ma
+ where p.id = ma.w_id
+)
+select h.name, h.dob, w.name, w.dob
+ from ancestor_couple_ids c, folks h, folks w
+ where c.h_id = h.id and c.w_id= w.id;
+
+
+--echo # join of two mutually recursive tables
+with recursive
+ancestor_couple_ids(h_id, w_id)
+as
+(
+ select a.father, a.mother
+ 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 *
+ from folks
+ where name = 'Me'
+ union all
+ select p.*
+ from folks p, ancestor_couple_ids fa
+ where p.id = fa.h_id
+ union all
+ select p.*
+ from folks p, ancestor_couple_ids ma
+ where p.id = ma.w_id
+)
+select h.name, h.dob, w.name, w.dob
+ from ancestor_couple_ids c, coupled_ancestors h, coupled_ancestors w
+ where c.h_id = h.id and c.w_id= w.id;
+
+explain extended
+with recursive
+ancestor_couple_ids(h_id, w_id)
+as
+(
+ select a.father, a.mother
+ 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 *
+ from folks
+ where name = 'Me'
+ union all
+ select p.*
+ from folks p, ancestor_couple_ids fa
+ where p.id = fa.h_id
+ union all
+ select p.*
+ from folks p, ancestor_couple_ids ma
+ where p.id = ma.w_id
+)
+select h.name, h.dob, w.name, w.dob
+ from ancestor_couple_ids c, coupled_ancestors h, coupled_ancestors w
+ where c.h_id = h.id and c.w_id= w.id;
+
+
+--echo # simple mutual recursion
+with recursive
+ancestor_couple_ids(h_id, w_id)
+as
+(
+ select a.father, a.mother
+ from coupled_ancestors a
+),
+coupled_ancestors (id, name, dob, father, mother)
+as
+(
+ select *
+ from folks
+ where name = 'Me'
+ union all
+ select p.*
+ from folks p, ancestor_couple_ids fa
+ where p.id = fa.h_id
+ union all
+ select p.*
+ from folks p, ancestor_couple_ids ma
+ where p.id = ma.w_id
+)
+select *
+ from ancestor_couple_ids;
+
+
+--echo # join of two mutually recursive tables
+with recursive
+ancestor_couple_ids(h_id, w_id)
+as
+(
+ select a.father, a.mother
+ from coupled_ancestors a
+),
+coupled_ancestors (id, name, dob, father, mother)
+as
+(
+ select *
+ from folks
+ where name = 'Me'
+ union all
+ select p.*
+ from folks p, ancestor_couple_ids fa
+ where p.id = fa.h_id
+ union all
+ select p.*
+ from folks p, ancestor_couple_ids ma
+ where p.id = ma.w_id
+)
+select h.name, h.dob, w.name, w.dob
+ from ancestor_couple_ids c, coupled_ancestors h, coupled_ancestors w
+ where c.h_id = h.id and c.w_id= w.id;
+
+
+--echo # execution of prepared query using a recursive table
+prepare stmt1 from "
+with recursive
+ancestors
+as
+(
+ select *
+ from folks
+ where name = 'Me' and dob = '2000-01-01'
+ union
+ select p.id, p.name, p.dob, p.father, p.mother
+ from folks as p, ancestors AS a
+ where p.id = a.father or p.id = a.mother
+)
+select * from ancestors;
+";
+
+execute stmt1;
+execute stmt1;
+
+deallocate prepare stmt1;
+
+
+--echo # view using a recursive table
+create view v1 as
+with recursive
+ancestors
+as
+(
+ select *
+ from folks
+ where name = 'Me' and dob = '2000-01-01'
+ union
+ select p.id, p.name, p.dob, p.father, p.mother
+ from folks as p, ancestors AS a
+ where p.id = a.father or p.id = a.mother
+)
+select * from ancestors;
+
+show create view v1;
+
+select * from v1;
+
+create view v2 as
+with recursive
+ancestors
+as
+(
+ select *
+ from folks
+ where name = 'Me'
+ union
+ select p.*
+ from folks as p, ancestors as fa
+ where p.id = fa.father
+ union
+ select p.*
+ from folks as p, ancestors as ma
+ where p.id = ma.mother
+)
+select * from ancestors;
+
+show create view v2;
+
+select * from v2;
+
+drop view v1,v2;
+
+
+explain extended
+with recursive
+ancestors
+as
+(
+ select *
+ from folks
+ where name = 'Me' and dob = '2000-01-01'
+ union
+ select p.id, p.name, p.dob, p.father, p.mother
+ from folks as p, ancestors AS a
+ where p.id = a.father or p.id = a.mother
+)
+select * from ancestors;
+
+
+--echo # recursive spec with two anchor selects and two recursive ones
+with recursive
+ancestor_ids (id)
+as
+(
+ select father from folks where name = 'Me'
+ union
+ select mother from folks where name = 'Me'
+ union
+ select father from folks, ancestor_ids a where folks.id = a.id
+ union
+ select mother from folks, ancestor_ids a where folks.id = a.id
+),
+ancestors
+as
+(
+ select p.* from folks as p, ancestor_ids as a
+ where p.id = a.id
+)
+select * from ancestors;
+
+
+--echo # recursive spec using union all
+with recursive
+ancestors
+as
+(
+ select *
+ from folks
+ where name = 'Me'
+ union all
+ select p.*
+ from folks as p, ancestors as fa
+ where p.id = fa.father
+ union all
+ select p.*
+ from folks as p, ancestors as ma
+ where p.id = ma.mother
+)
+select * from ancestors;
+
+
+--ERROR ER_NOT_STANDARDS_COMPLIANT_RECURSIVE
+with recursive
+ancestor_ids (id, generation)
+as
+(
+ select father, 1 from folks where name = 'Me' and father is not null
+ union all
+ select mother, 1 from folks where name = 'Me' and mother is not null
+ union all
+ select father, fa.generation+1 from folks, ancestor_ids fa
+ where folks.id = fa.id and (father not in (select id from ancestor_ids))
+ union all
+ select mother, ma.generation+1 from folks, ancestor_ids ma
+ where folks.id = ma.id and (mother not in (select id from ancestor_ids))
+)
+select generation, name from ancestor_ids a, folks
+ where a.id = folks.id;
+
+set standards_compliant_cte=0;
+
+--ERROR ER_WITH_COL_WRONG_LIST
+with recursive
+ancestor_ids (id, generation)
+as
+(
+ select father from folks where name = 'Me' and father is not null
+ union all
+ select mother from folks where name = 'Me' and mother is not null
+ union all
+ select father, fa.generation+1 from folks, ancestor_ids fa
+ where folks.id = fa.id and (father not in (select id from ancestor_ids))
+ union all
+ select mother, ma.generation+1 from folks, ancestor_ids ma
+ where folks.id = ma.id and (mother not in (select id from ancestor_ids))
+)
+select generation, name from ancestor_ids a, folks
+ where a.id = folks.id;
+
+with recursive
+ancestor_ids (id, generation)
+as
+(
+ select father, 1 from folks where name = 'Me' and father is not null
+ union all
+ select mother, 1 from folks where name = 'Me' and mother is not null
+ union all
+ select father, fa.generation+1 from folks, ancestor_ids fa
+ where folks.id = fa.id and father is not null and
+ (father not in (select id from ancestor_ids))
+ union all
+ select mother, ma.generation+1 from folks, ancestor_ids ma
+ where folks.id = ma.id and mother is not null and
+ (mother not in (select id from ancestor_ids))
+)
+select generation, name from ancestor_ids a, folks
+ where a.id = folks.id;
+
+set standards_compliant_cte=1;
+
+--ERROR ER_NOT_STANDARDS_COMPLIANT_RECURSIVE
+with recursive
+coupled_ancestor_ids (id)
+as
+(
+ select father from folks where name = 'Me' and father is not null
+ union
+ select mother from folks where name = 'Me' and mother is not null
+ union
+ select n.father
+ from folks, coupled_ancestor_ids fa, coupled_ancestor_ids ma, folks n
+ where folks.father = fa.id and folks.mother = ma.id and
+ (fa.id = n.id or ma.id = n.id) and
+ n.father is not null and n.mother is not null
+ union
+ select n.mother
+ from folks, coupled_ancestor_ids fa, coupled_ancestor_ids ma, folks n
+ where folks.father = fa.id and folks.mother = ma.id and
+ (fa.id = n.id or ma.id = n.id) and
+ n.father is not null and n.mother is not null
+)
+select p.* from coupled_ancestor_ids a, folks p
+ where a.id = p.id;
+
+set statement standards_compliant_cte=0 for
+with recursive
+coupled_ancestor_ids (id)
+as
+(
+ select father from folks where name = 'Me' and father is not null
+ union
+ select mother from folks where name = 'Me' and mother is not null
+ union
+ select n.father
+ from folks, coupled_ancestor_ids fa, coupled_ancestor_ids ma, folks n
+ where folks.father = fa.id and folks.mother = ma.id and
+ (fa.id = n.id or ma.id = n.id) and
+ n.father is not null and n.mother is not null
+ union
+ select n.mother
+ from folks, coupled_ancestor_ids fa, coupled_ancestor_ids ma, folks n
+ where folks.father = fa.id and folks.mother = ma.id and
+ (fa.id = n.id or ma.id = n.id) and
+ n.father is not null and n.mother is not null
+)
+select p.* from coupled_ancestor_ids a, folks p
+ where a.id = p.id;
+
+--ERROR ER_NOT_STANDARDS_COMPLIANT_RECURSIVE
+with recursive
+ancestor_ids (id)
+as
+(
+ select father from folks where name = 'Me'
+ union
+ select mother from folks where name = 'Me'
+ union
+ select father from folks left join ancestor_ids a on folks.id = a.id
+ union
+ select mother from folks left join ancestor_ids a on folks.id = a.id
+),
+ancestors
+as
+(
+ select p.* from folks as p, ancestor_ids as a
+ where p.id = a.id
+)
+select * from ancestors;
+
+set statement standards_compliant_cte=0 for
+with recursive
+ancestor_ids (id)
+as
+(
+ select father from folks where name = 'Me'
+ union
+ select mother from folks where name = 'Me'
+ union
+ select father from folks left join ancestor_ids a on folks.id = a.id
+ union
+ select mother from folks left join ancestor_ids a on folks.id = a.id
+),
+ancestors
+as
+(
+ select p.* from folks as p, ancestor_ids as a
+ where p.id = a.id
+)
+select * from ancestors;
+
+with recursive
+ancestor_ids (id, generation)
+as
+(
+ select father, 1 from folks where name = 'Me'
+ union
+ select mother, 1 from folks where name = 'Me'
+ union
+ select father, a.generation+1 from folks, ancestor_ids a
+ where folks.id = a.id
+ union
+ select mother, a.generation+1 from folks, ancestor_ids a
+ where folks.id = a.id
+),
+ancestors
+as
+(
+ select generation, name from folks as p, ancestor_ids as a
+ where p.id = a.id
+)
+select * from ancestors;
+
+--ERROR ER_NOT_STANDARDS_COMPLIANT_RECURSIVE
+with recursive
+ancestor_ids (id, generation)
+as
+(
+ select father, 1 from folks where name = 'Me'
+ union
+ select mother, 1 from folks where name = 'Me'
+ union
+ select max(father), max(a.generation)+1 from folks, ancestor_ids a
+ where folks.id = a.id
+ group by a.generation
+ union
+ select max(mother), max(a.generation)+1 from folks, ancestor_ids a
+ where folks.id = a.id
+ group by a.generation
+),
+ancestors
+as
+(
+ select generation, name from folks as p, ancestor_ids as a
+ where p.id = a.id
+)
+select * from ancestors;
+
+set statement standards_compliant_cte=0 for
+with recursive
+ancestor_ids (id, generation)
+as
+(
+ select father, 1 from folks where name = 'Me'
+ union
+ select mother, 1 from folks where name = 'Me'
+ union
+ select max(father), a.generation+1 from folks, ancestor_ids a
+ where folks.id = a.id
+ group by a.generation
+ union
+ select max(mother), a.generation+1 from folks, ancestor_ids a
+ where folks.id = a.id
+ group by a.generation
+),
+ancestors
+as
+(
+ select generation, name from folks as p, ancestor_ids as a
+ where p.id = a.id
+)
+select * from ancestors;
+
+set statement max_recursive_iterations=1 for
+with recursive
+ancestor_ids (id, generation)
+as
+(
+ select father, 1 from folks where name = 'Me'
+ union
+ select mother, 1 from folks where name = 'Me'
+ union
+ select father, a.generation+1 from folks, ancestor_ids a
+ where folks.id = a.id
+ union
+ select mother, a.generation+1 from folks, ancestor_ids a
+ where folks.id = a.id
+),
+ancestors
+as
+(
+ select generation, name from folks as p, ancestor_ids as a
+ where p.id = a.id
+)
+select * from ancestors;
+
+--echo # query with recursive tables using key access
+
+alter table folks add primary key (id);
+
+explain
+with recursive
+ancestors
+as
+(
+ select *
+ from folks
+ where name = 'Me'
+ union
+ select p.*
+ from folks as p, ancestors as fa
+ where p.id = fa.father
+ union
+ select p.*
+ from folks as p, ancestors as ma
+ where p.id = ma.mother
+)
+select * from ancestors;
+
+
+with recursive
+ancestors
+as
+(
+ select *
+ from folks
+ where name = 'Me'
+ union
+ select p.*
+ from folks as p, ancestors as fa
+ where p.id = fa.father
+ union
+ select p.*
+ from folks as p, ancestors as ma
+ where p.id = ma.mother
+)
+select * from ancestors;
+
+
+--echo #
+--echo # EXPLAIN FORMAT=JSON on a query where one recursive CTE uses another:
+--echo #
+explain
+with recursive
+prev_gen
+as
+(
+ select folks.*
+ from folks, prev_gen
+ where folks.id=prev_gen.father or folks.id=prev_gen.mother
+ union
+ select *
+ from folks
+ where name='Me'
+),
+ancestors
+as
+(
+ select *
+ from folks
+ where name='Me'
+ union
+ select *
+ from ancestors
+ union
+ select *
+ from prev_gen
+)
+select ancestors.name, ancestors.dob from ancestors;
+
+explain FORMAT=JSON
+with recursive
+prev_gen
+as
+(
+ select folks.*
+ from folks, prev_gen
+ where folks.id=prev_gen.father or folks.id=prev_gen.mother
+ union
+ select *
+ from folks
+ where name='Me'
+),
+ancestors
+as
+(
+ select *
+ from folks
+ where name='Me2'
+ union
+ select *
+ from ancestors where id < 234
+ union
+ select *
+ from prev_gen where id < 345
+)
+select ancestors.name, ancestors.dob from ancestors;
+
+--echo #
+explain format=json
+with recursive
+ancestor_couples(h_id, h_name, h_dob, h_father, h_mother,
+ w_id, w_name, w_dob, w_father, w_mother)
+as
+(
+ select h.*, w.*
+ from folks h, folks w, coupled_ancestors a
+ where a.father = h.id AND a.mother = w.id
+ union
+ select h.*, w.*
+ from folks v, folks h, folks w
+ where v.name = 'Me' and
+ (v.father = h.id AND v.mother= w.id)
+),
+coupled_ancestors (id, name, dob, father, mother)
+as
+(
+ select h_id, h_name, h_dob, h_father, h_mother
+ from ancestor_couples
+ union all
+ select w_id, w_name, w_dob, w_father, w_mother
+ from ancestor_couples
+)
+select h_name, h_dob, w_name, w_dob
+ from ancestor_couples;
+
+
+drop table folks;
+
+--echo #
+--echo # MDEV-10372: [bb-10.2-mdev9864 tree] EXPLAIN with recursive CTE enters endless recursion
+--echo #
+create table t1(a int);
+insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+
+explain format=json
+with recursive t as (select a from t1 union select a+10 from t where a < 1000)
+select * from t;
+
+drop table t1;
+
+
+--echo #
+--echo # MDEV-10737: recursive union with several anchors at the end
+--echo #
+
+WITH RECURSIVE cte(n) AS
+ ( SELECT n+1 FROM cte WHERE n < 5 UNION SELECT 1 UNION SELECT 1 )
+SELECT * FROM cte;
+
+--echo #
+--echo # MDEV-10736: recursive definition with anchor over a table with blob
+--echo #
+
+CREATE TABLE t1 (f VARCHAR(1024));
+WITH RECURSIVE cte(f) AS
+ (SELECT t1.f FROM t1 UNION ALL SELECT cte.f FROM cte)
+SELECT * FROM cte as t;
+DROP TABLE t1;
diff --git a/mysql-test/t/ctype_big5.test b/mysql-test/t/ctype_big5.test
index 629db68f62f..fe29f769a89 100644
--- a/mysql-test/t/ctype_big5.test
+++ b/mysql-test/t/ctype_big5.test
@@ -249,3 +249,23 @@ DROP TABLE t1;
--echo #
--echo # End of 10.0 tests
--echo #
+
+--echo #
+--echo # Start of 10.2 tests
+--echo #
+
+--echo #
+--echo # MDEV-9711 NO PAD Collatons
+--echo #
+SET character_set_connection=big5;
+let $coll='big5_chinese_nopad_ci';
+let $coll_pad='big5_chinese_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='big5_nopad_bin';
+let $coll_pad='big5_bin';
+--source include/ctype_pad_all_engines.inc
+
+--echo #
+--echo # End of 10.2 tests
+--echo #
diff --git a/mysql-test/t/ctype_cp932.test b/mysql-test/t/ctype_cp932.test
index 96a2666f69b..2486ca8a79e 100644
--- a/mysql-test/t/ctype_cp932.test
+++ b/mysql-test/t/ctype_cp932.test
@@ -27,3 +27,23 @@ DROP TABLE t1;
SET @@character_set_client= @old_character_set_client;
SET @@character_set_connection= @old_character_set_connection;
SET @@character_set_results= @old_character_set_results;
+
+--echo #
+--echo # Start of 10.2 tests
+--echo #
+
+--echo #
+--echo # MDEV-9711 NO PAD Collatons
+--echo #
+SET character_set_connection=cp932;
+let $coll='cp932_japanese_nopad_ci';
+let $coll_pad='cp932_japanese_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='cp932_nopad_bin';
+let $coll_pad='cp932_bin';
+--source include/ctype_pad_all_engines.inc
+
+--echo #
+--echo # End of 10.2 tests
+--echo #
diff --git a/mysql-test/t/ctype_eucjpms.test b/mysql-test/t/ctype_eucjpms.test
index b5bd92d1d07..bda4cec61cc 100644
--- a/mysql-test/t/ctype_eucjpms.test
+++ b/mysql-test/t/ctype_eucjpms.test
@@ -568,7 +568,7 @@ DROP TABLE t1;
--echo #
--echo #
---echo # End of 10.2 tests
+--echo # Start of 10.2 tests
--echo #
--echo #
@@ -580,5 +580,17 @@ SELECT HEX(a) FROM t1;
DROP TABLE t1;
--echo #
+--echo # MDEV-9711 NO PAD Collatons
+--echo #
+SET character_set_connection=eucjpms;
+let $coll='eucjpms_japanese_nopad_ci';
+let $coll_pad='eucjpms_japanese_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='eucjpms_nopad_bin';
+let $coll_pad='eucjpms_bin';
+--source include/ctype_pad_all_engines.inc
+
+--echo #
--echo # End of 10.2 tests
--echo #
diff --git a/mysql-test/t/ctype_euckr.test b/mysql-test/t/ctype_euckr.test
index 33b3e96cba8..b0b1569e540 100644
--- a/mysql-test/t/ctype_euckr.test
+++ b/mysql-test/t/ctype_euckr.test
@@ -197,3 +197,23 @@ set collation_connection=euckr_bin;
--echo # End of 5.6 tests
--echo #
+
+--echo #
+--echo # Start of 10.2 tests
+--echo #
+
+--echo #
+--echo # MDEV-9711 NO PAD Collatons
+--echo #
+SET character_set_connection=euckr;
+let $coll='euckr_korean_nopad_ci';
+let $coll_pad='euckr_korean_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='euckr_nopad_bin';
+let $coll_pad='euckr_bin';
+--source include/ctype_pad_all_engines.inc
+
+--echo #
+--echo # End of 10.2 tests
+--echo #
diff --git a/mysql-test/t/ctype_gb2312.test b/mysql-test/t/ctype_gb2312.test
index 3ca6941705c..8f15f72fad5 100644
--- a/mysql-test/t/ctype_gb2312.test
+++ b/mysql-test/t/ctype_gb2312.test
@@ -160,3 +160,23 @@ let $ctype_unescape_combinations=selected;
--echo #
--echo # End of 10.0 tests
--echo #
+
+
+--echo #
+--echo # Start of 10.2 tests
+--echo #
+--echo #
+--echo # MDEV-9711 NO PAD Collatons
+--echo #
+SET character_set_connection=gb2312;
+let $coll='gb2312_chinese_nopad_ci';
+let $coll_pad='gb2312_chinese_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='gb2312_nopad_bin';
+let $coll_pad='gb2312_bin';
+--source include/ctype_pad_all_engines.inc
+
+--echo #
+--echo # End of 10.2 tests
+--echo #
diff --git a/mysql-test/t/ctype_gbk.test b/mysql-test/t/ctype_gbk.test
index ae66dbba4b5..88bfda46748 100644
--- a/mysql-test/t/ctype_gbk.test
+++ b/mysql-test/t/ctype_gbk.test
@@ -450,6 +450,17 @@ DELETE FROM t1;
LOAD DATA INFILE '../../std_data/loaddata/mdev8711.txt' INTO TABLE t1 CHARACTER SET gbk LINES TERMINATED BY '@' IGNORE 1 LINES;
SELECT HEX(a) FROM t1;
DROP TABLE t1;
+--echo #
+--echo # MDEV-9711 NO PAD Collatons
+--echo #
+SET character_set_connection=gbk;
+let $coll='gbk_chinese_nopad_ci';
+let $coll_pad='gbk_chinese_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='gbk_nopad_bin';
+let $coll_pad='gbk_bin';
+--source include/ctype_pad_all_engines.inc
--echo #
--echo # End of 10.2 tests
diff --git a/mysql-test/t/ctype_latin1.test b/mysql-test/t/ctype_latin1.test
index d82a5b88418..78d5f819f57 100644
--- a/mysql-test/t/ctype_latin1.test
+++ b/mysql-test/t/ctype_latin1.test
@@ -378,3 +378,23 @@ DROP TABLE t1;
--echo #
--echo # End of 10.1 tests
--echo #
+
+--echo #
+--echo # Start of 10.2 tests
+--echo #
+
+--echo #
+--echo # MDEV-9711 NO PAD Collatons
+--echo #
+SET character_set_connection=latin1;
+let $coll='latin1_swedish_nopad_ci';
+let $coll_pad='latin1_swedish_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='latin1_nopad_bin';
+let $coll_pad='latin1_bin';
+--source include/ctype_pad_all_engines.inc
+
+--echo #
+--echo # End of 10.2 tests
+--echo #
diff --git a/mysql-test/t/ctype_ldml-master.opt b/mysql-test/t/ctype_ldml-master.opt
index d7ecd9095cb..250dd2cb5a2 100644
--- a/mysql-test/t/ctype_ldml-master.opt
+++ b/mysql-test/t/ctype_ldml-master.opt
@@ -1,2 +1,2 @@
---character-sets-dir=$MYSQL_TEST_DIR/std_data/
+--character-sets-dir=$MYSQL_TEST_DIR/std_data/ldml/
--log-error=$MYSQLTEST_VARDIR/tmp/ctype_ldml_log.err
diff --git a/mysql-test/t/ctype_ldml.test b/mysql-test/t/ctype_ldml.test
index 1ea8002a2eb..e511d7aefc8 100644
--- a/mysql-test/t/ctype_ldml.test
+++ b/mysql-test/t/ctype_ldml.test
@@ -409,3 +409,76 @@ INSERT INTO t1 VALUES (_ucs2 0x3400),(_ucs2 0x3560),(_ucs2 0x3561),(_ucs2 0x3600
INSERT INTO t1 VALUES (_ucs2 0x3700),(_ucs2 0x3701);
SELECT HEX(CONVERT(a USING ucs2)) AS ch, HEX(WEIGHT_STRING(a)) AS w, HEX(WEIGHT_STRING(a COLLATE utf8_unicode_ci)) AS ducet FROM t1 ORDER BY a,ch;
DROP TABLE t1;
+
+
+--echo #
+--echo # Testing that the MY_CS_PUREASCII flag is set properly
+--echo # Comparison between ascii2 and latin1 should not give "illegal collation error"
+--echo #
+CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET ascii2, b VARCHAR(10) CHARACTER SET latin1);
+INSERT INTO t1 VALUES ('a','a'),('b','b');
+SELECT * FROM t1 WHERE a=b;
+ALTER TABLE t1 MODIFY a VARCHAR(10) CHARACTER SET ascii2 COLLATE ascii2_bin2;
+SELECT * FROM t1 WHERE a=b;
+ALTER TABLE t1 MODIFY a VARCHAR(10) CHARACTER SET ascii2 COLLATE ascii2_bin;
+SELECT * FROM t1 WHERE a=b;
+ALTER TABLE t1 MODIFY a VARCHAR(10) CHARACTER SET ascii2 COLLATE ascii2_general_inherited_ci;
+SELECT * FROM t1 WHERE a=b;
+ALTER TABLE t1 MODIFY a VARCHAR(10) CHARACTER SET ascii2 COLLATE ascii2_general_inherited2_ci;
+SELECT * FROM t1 WHERE a=b;
+DROP TABLE t1;
+
+--echo #
+--echo # Testing that in case of two binary collations
+--echo # "BINARY" in a column definition uses the collation with the least id
+--echo #
+CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET ascii2 BINARY);
+INSERT INTO t1 VALUES ('test');
+SELECT COLLATION(a) FROM t1;
+DROP TABLE t1;
+
+
+--echo #
+--echo # Testing mixing of two binary collations of the same character set
+--echo #
+CREATE TABLE t1 (
+ a VARCHAR(10) CHARACTER SET ascii2 COLLATE ascii2_bin,
+ b VARCHAR(10) CHARACTER SET ascii2 COLLATE ascii2_bin2
+);
+INSERT INTO t1 VALUES ('a','a');
+--error ER_CANT_AGGREGATE_2COLLATIONS
+SELECT * FROM t1 WHERE a=b;
+DROP TABLE t1;
+
+--echo #
+--echo # Testing bad collation inheritance
+--echo #
+--error ER_UNKNOWN_COLLATION
+CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET ascii2 COLLATE ascii2_badly_inherited_ci);
+
+--echo #
+--echo # Testing that the MY_CS_CSSORT flag is set properly
+--echo #
+CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET latin1 COLLATE latin1_test);
+INSERT INTO t1 VALUES ('a'),('A');
+# should be case insensitive
+SELECT * FROM t1 WHERE a RLIKE 'a';
+DROP TABLE t1;
+
+CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET latin1 COLLATE latin1_test2_cs);
+INSERT INTO t1 VALUES ('a'),('A');
+ # should be case sensitive
+SELECT * FROM t1 WHERE a RLIKE 'a';
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-9711 NO PAD collations
+--echo #
+CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET ascii2 COLLATE ascii2_general_nopad_ci);
+INSERT INTO t1 VALUES ('a'),('a '),('A'),('A ');
+SELECT a, a='a', a='a ', HEX(a), LOWER(a), UPPER(a), CONVERT(a USING utf8) FROM t1;
+ALTER TABLE t1 MODIFY a VARCHAR(10) CHARACTER SET ascii2 COLLATE ascii2_nopad_bin;
+SELECT a, a='a', a='a ', HEX(a), LOWER(a), UPPER(a), CONVERT(a USING utf8) FROM t1;
+ALTER TABLE t1 MODIFY a VARCHAR(10) CHARACTER SET latin1 COLLATE latin1_swedish_nopad2_ci;
+SELECT a, a='a', a='a ', HEX(a), LOWER(a), UPPER(a), CONVERT(a USING utf8) FROM t1;
+DROP TABLE t1;
diff --git a/mysql-test/t/ctype_nopad_8bit.test b/mysql-test/t/ctype_nopad_8bit.test
new file mode 100644
index 00000000000..fc60bbd7759
--- /dev/null
+++ b/mysql-test/t/ctype_nopad_8bit.test
@@ -0,0 +1,239 @@
+#
+# Tests with the nopad 8 bit character sets
+#
+
+--echo #
+--echo # MDEV-9711 NO PAD Collatons
+--echo #
+SET character_set_connection=dec8;
+let $coll='dec8_swedish_nopad_ci';
+let $coll_pad='dec8_swedish_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='dec8_nopad_bin';
+let $coll_pad='dec8_bin';
+--source include/ctype_pad_all_engines.inc
+
+
+SET character_set_connection=cp850;
+let $coll='cp850_general_nopad_ci';
+let $coll_pad='cp850_general_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='cp850_nopad_bin';
+let $coll_pad='cp850_bin';
+--source include/ctype_pad_all_engines.inc
+
+
+SET character_set_connection=hp8;
+let $coll='hp8_english_nopad_ci';
+let $coll_pad='hp8_english_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='hp8_nopad_bin';
+let $coll_pad='hp8_bin';
+--source include/ctype_pad_all_engines.inc
+
+
+SET character_set_connection=koi8r;
+let $coll='koi8r_general_nopad_ci';
+let $coll_pad='koi8r_general_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='koi8r_nopad_bin';
+let $coll_pad='koi8r_bin';
+--source include/ctype_pad_all_engines.inc
+
+
+SET character_set_connection=latin2;
+let $coll='latin2_general_nopad_ci';
+let $coll_pad='latin2_general_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='latin2_nopad_bin';
+let $coll_pad='latin2_bin';
+--source include/ctype_pad_all_engines.inc
+
+
+SET character_set_connection=swe7;
+let $coll='swe7_swedish_nopad_ci';
+let $coll_pad='swe7_swedish_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='swe7_nopad_bin';
+let $coll_pad='swe7_bin';
+--source include/ctype_pad_all_engines.inc
+
+
+SET character_set_connection=ascii;
+let $coll='ascii_general_nopad_ci';
+let $coll_pad='ascii_general_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='ascii_nopad_bin';
+let $coll_pad='ascii_bin';
+--source include/ctype_pad_all_engines.inc
+
+
+SET character_set_connection=hebrew;
+let $coll='hebrew_general_nopad_ci';
+let $coll_pad='hebrew_general_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='hebrew_nopad_bin';
+let $coll_pad='hebrew_bin';
+--source include/ctype_pad_all_engines.inc
+
+
+SET character_set_connection=koi8u;
+let $coll='koi8u_general_nopad_ci';
+let $coll_pad='koi8u_general_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='koi8u_nopad_bin';
+let $coll_pad='koi8u_bin';
+--source include/ctype_pad_all_engines.inc
+
+
+SET character_set_connection=greek;
+let $coll='greek_general_nopad_ci';
+let $coll_pad='greek_general_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='greek_nopad_bin';
+let $coll_pad='greek_bin';
+--source include/ctype_pad_all_engines.inc
+
+
+SET character_set_connection=cp1250;
+let $coll='cp1250_general_nopad_ci';
+let $coll_pad='cp1250_general_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='cp1250_nopad_bin';
+let $coll_pad='cp1250_bin';
+--source include/ctype_pad_all_engines.inc
+
+
+SET character_set_connection=cp1257;
+let $coll='cp1257_general_nopad_ci';
+let $coll_pad='cp1257_general_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='cp1257_nopad_bin';
+let $coll_pad='cp1257_bin';
+--source include/ctype_pad_all_engines.inc
+
+
+SET character_set_connection=latin5;
+let $coll='latin5_turkish_nopad_ci';
+let $coll_pad='latin5_turkish_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='latin5_nopad_bin';
+let $coll_pad='latin5_bin';
+--source include/ctype_pad_all_engines.inc
+
+
+SET character_set_connection=armscii8;
+let $coll='armscii8_general_nopad_ci';
+let $coll_pad='armscii8_general_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='armscii8_nopad_bin';
+let $coll_pad='armscii8_bin';
+--source include/ctype_pad_all_engines.inc
+
+
+SET character_set_connection=cp866;
+let $coll='cp866_general_nopad_ci';
+let $coll_pad='cp866_general_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='cp866_nopad_bin';
+let $coll_pad='cp866_bin';
+--source include/ctype_pad_all_engines.inc
+
+
+SET character_set_connection=keybcs2;
+let $coll='keybcs2_general_nopad_ci';
+let $coll_pad='keybcs2_general_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='keybcs2_nopad_bin';
+let $coll_pad='keybcs2_bin';
+--source include/ctype_pad_all_engines.inc
+
+
+SET character_set_connection=macce;
+let $coll='macce_general_nopad_ci';
+let $coll_pad='macce_general_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='macce_nopad_bin';
+let $coll_pad='macce_bin';
+--source include/ctype_pad_all_engines.inc
+
+
+SET character_set_connection=macroman;
+let $coll='macroman_general_nopad_ci';
+let $coll_pad='macroman_general_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='macroman_nopad_bin';
+let $coll_pad='macroman_bin';
+--source include/ctype_pad_all_engines.inc
+
+
+SET character_set_connection=cp852;
+let $coll='cp852_general_nopad_ci';
+let $coll_pad='cp852_general_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='cp852_nopad_bin';
+let $coll_pad='cp852_bin';
+--source include/ctype_pad_all_engines.inc
+
+
+SET character_set_connection=latin7;
+let $coll='latin7_general_nopad_ci';
+let $coll_pad='latin7_general_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='latin7_nopad_bin';
+let $coll_pad='latin7_bin';
+--source include/ctype_pad_all_engines.inc
+
+
+SET character_set_connection=cp1251;
+let $coll='cp1251_general_nopad_ci';
+let $coll_pad='cp1251_general_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='cp1251_nopad_bin';
+let $coll_pad='cp1251_bin';
+--source include/ctype_pad_all_engines.inc
+
+
+SET character_set_connection=cp1256;
+let $coll='cp1256_general_nopad_ci';
+let $coll_pad='cp1256_general_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='cp1256_nopad_bin';
+let $coll_pad='cp1256_bin';
+--source include/ctype_pad_all_engines.inc
+
+
+SET character_set_connection=geostd8;
+let $coll='geostd8_general_nopad_ci';
+let $coll_pad='geostd8_general_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='geostd8_nopad_bin';
+let $coll_pad='geostd8_bin';
+--source include/ctype_pad_all_engines.inc
+
+--echo #
+--echo # End of 10.2 tests
+--echo #
diff --git a/mysql-test/t/ctype_sjis.test b/mysql-test/t/ctype_sjis.test
index 5cc7d9a858d..a962f69003d 100644
--- a/mysql-test/t/ctype_sjis.test
+++ b/mysql-test/t/ctype_sjis.test
@@ -245,6 +245,17 @@ SELECT HEX(a) FROM t1;
SELECT a=CONCAT('x', REPEAT(_sjis 0x835C, 200)) FROM t1;
DROP TABLE t1;
+--echo #
+--echo # MDEV-9711 NO PAD Collatons
+--echo #
+SET character_set_connection=sjis;
+let $coll='sjis_japanese_nopad_ci';
+let $coll_pad='sjis_japanese_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='sjis_nopad_bin';
+let $coll_pad='sjis_bin';
+--source include/ctype_pad_all_engines.inc
--echo #
--echo # End of 10.2 tests
diff --git a/mysql-test/t/ctype_swe7.test b/mysql-test/t/ctype_swe7.test
index 7d1ef89b374..2e648a89406 100644
--- a/mysql-test/t/ctype_swe7.test
+++ b/mysql-test/t/ctype_swe7.test
@@ -17,3 +17,24 @@ let $ctype_unescape_combinations=selected;
--echo #
--echo # End of 10.0 tests
--echo #
+
+
+--echo #
+--echo # Start of 10.2 tests
+--echo #
+
+--echo #
+--echo # MDEV-9711 NO PAD Collatons
+--echo #
+SET character_set_connection=swe7;
+let $coll='swe7_swedish_nopad_ci';
+let $coll_pad='swe7_swedish_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='swe7_nopad_bin';
+let $coll_pad='swe7_bin';
+--source include/ctype_pad_all_engines.inc
+
+--echo #
+--echo # End of 10.2 tests
+--echo #
diff --git a/mysql-test/t/ctype_tis620.test b/mysql-test/t/ctype_tis620.test
index 4909acee31d..7bc248aec2b 100644
--- a/mysql-test/t/ctype_tis620.test
+++ b/mysql-test/t/ctype_tis620.test
@@ -192,3 +192,23 @@ select hex(weight_string(cast(0xE0A1 as char) as char(1)));
--echo #
--echo # End of 5.6 tests
--echo #
+
+--echo #
+--echo # Start of 10.2 tests
+--echo #
+
+--echo #
+--echo # MDEV-9711 NO PAD Collatons
+--echo #
+SET character_set_connection=tis620;
+let $coll='tis620_thai_nopad_ci';
+let $coll_pad='tis620_thai_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='tis620_nopad_bin';
+let $coll_pad='tis620_bin';
+--source include/ctype_pad_all_engines.inc
+
+--echo #
+--echo # End of 10.2 tests
+--echo #
diff --git a/mysql-test/t/ctype_ucs.test b/mysql-test/t/ctype_ucs.test
index 2f480621c56..aa5838e7c6d 100644
--- a/mysql-test/t/ctype_ucs.test
+++ b/mysql-test/t/ctype_ucs.test
@@ -957,3 +957,23 @@ SELECT CAST(CONVERT('1IJ3' USING ucs2) AS SIGNED);
--echo #
--echo # End of 10.1 tests
--echo #
+
+--echo #
+--echo # Start of 10.2 tests
+--echo #
+
+--echo #
+--echo # MDEV-9711 NO PAD Collatons
+--echo #
+SET character_set_connection=ucs2;
+let $coll='ucs2_general_nopad_ci';
+let $coll_pad='ucs2_general_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='ucs2_nopad_bin';
+let $coll_pad='ucs2_bin';
+--source include/ctype_pad_all_engines.inc
+
+--echo #
+--echo # End of 10.2 tests
+--echo #
diff --git a/mysql-test/t/ctype_ujis.test b/mysql-test/t/ctype_ujis.test
index db85585efd9..17aa3850219 100644
--- a/mysql-test/t/ctype_ujis.test
+++ b/mysql-test/t/ctype_ujis.test
@@ -1399,7 +1399,7 @@ SELECT HEX(a) FROM t1 ORDER BY a;DROP TABLE t1;
--echo #
---echo # End of 10.2 tests
+--echo # Start of 10.2 tests
--echo #
--echo #
@@ -1411,5 +1411,17 @@ SELECT HEX(a) FROM t1;
DROP TABLE t1;
--echo #
+--echo # MDEV-9711 NO PAD Collatons
+--echo #
+SET character_set_connection=ujis;
+let $coll='ujis_japanese_nopad_ci';
+let $coll_pad='ujis_japanese_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='ujis_nopad_bin';
+let $coll_pad='ujis_bin';
+--source include/ctype_pad_all_engines.inc
+
+--echo #
--echo # End of 10.2 tests
--echo #
diff --git a/mysql-test/t/ctype_utf16.test b/mysql-test/t/ctype_utf16.test
index bb7eb8cd959..3946da73f9b 100644
--- a/mysql-test/t/ctype_utf16.test
+++ b/mysql-test/t/ctype_utf16.test
@@ -895,3 +895,23 @@ SELECT CAST(CONVERT('1IJ3' USING utf16) AS SIGNED);
--echo #
--echo # End of 10.1 tests
--echo #
+
+--echo #
+--echo # Start of 10.2 tests
+--echo #
+
+--echo #
+--echo # MDEV-9711 NO PAD Collatons
+--echo #
+SET character_set_connection=utf16;
+let $coll='utf16_general_nopad_ci';
+let $coll_pad='utf16_general_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='utf16_nopad_bin';
+let $coll_pad='utf16_bin';
+--source include/ctype_pad_all_engines.inc
+
+--echo #
+--echo # End of 10.2 tests
+--echo #
diff --git a/mysql-test/t/ctype_utf16le.test b/mysql-test/t/ctype_utf16le.test
index 42017f9a635..665443bb278 100644
--- a/mysql-test/t/ctype_utf16le.test
+++ b/mysql-test/t/ctype_utf16le.test
@@ -778,3 +778,23 @@ SELECT CAST(CONVERT('1IJ3' USING utf16le) AS SIGNED);
--echo #
--echo # End of 10.1 tests
--echo #
+
+--echo #
+--echo # Start of 10.2 tests
+--echo #
+
+--echo #
+--echo # MDEV-9711 NO PAD Collatons
+--echo #
+SET character_set_connection=utf16le;
+let $coll='utf16le_general_nopad_ci';
+let $coll_pad='utf16le_general_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='utf16le_nopad_bin';
+let $coll_pad='utf16le_bin';
+--source include/ctype_pad_all_engines.inc
+
+--echo #
+--echo # End of 10.2 tests
+--echo #
diff --git a/mysql-test/t/ctype_utf32.test b/mysql-test/t/ctype_utf32.test
index 4bff8a867f1..2fe075f24ef 100644
--- a/mysql-test/t/ctype_utf32.test
+++ b/mysql-test/t/ctype_utf32.test
@@ -979,3 +979,23 @@ SELECT CAST(CONVERT('1IJ3' USING utf32) AS SIGNED);
--echo #
--echo # End of 10.1 tests
--echo #
+
+--echo #
+--echo # Start of 10.2 tests
+--echo #
+
+--echo #
+--echo # MDEV-9711 NO PAD Collatons
+--echo #
+SET character_set_connection=utf32;
+let $coll='utf32_general_nopad_ci';
+let $coll_pad='utf32_general_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='utf32_nopad_bin';
+let $coll_pad='utf32_bin';
+--source include/ctype_pad_all_engines.inc
+
+--echo #
+--echo # End of 10.2 tests
+--echo #
diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test
index c4d94166493..352359a03b6 100644
--- a/mysql-test/t/ctype_utf8.test
+++ b/mysql-test/t/ctype_utf8.test
@@ -2059,6 +2059,18 @@ INSERT INTO t1 VALUES (DEFAULT);
SELECT HEX(a) FROM t1;
DROP TABLE t1;
+
+--echo #
+--echo # MDEV-9711 NO PAD Collatons
+--echo #
+let $coll='utf8_general_nopad_ci';
+let $coll_pad='utf8_general_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='utf8_nopad_bin';
+let $coll_pad='utf8_bin';
+--source include/ctype_pad_all_engines.inc
+
--echo #
--echo # End of 10.2 tests
--echo #
diff --git a/mysql-test/t/ctype_utf8mb4.test b/mysql-test/t/ctype_utf8mb4.test
index 7c7c532b045..12fb5455e20 100644
--- a/mysql-test/t/ctype_utf8mb4.test
+++ b/mysql-test/t/ctype_utf8mb4.test
@@ -1954,5 +1954,16 @@ SELECT HEX(a) FROM t1;
DROP TABLE t1;
--echo #
+--echo # MDEV-9711 NO PAD Collatons
+--echo #
+let $coll='utf8mb4_general_nopad_ci';
+let $coll_pad='utf8mb4_general_ci';
+--source include/ctype_pad_all_engines.inc
+
+let $coll='utf8mb4_nopad_bin';
+let $coll_pad='utf8mb4_bin';
+--source include/ctype_pad_all_engines.inc
+
+--echo #
--echo # End of 10.2 tests
--echo #
diff --git a/mysql-test/t/default.test b/mysql-test/t/default.test
index 4981c2161e7..6c871527212 100644
--- a/mysql-test/t/default.test
+++ b/mysql-test/t/default.test
@@ -295,7 +295,6 @@ create or replace table t1 (a int not null, b int default (a+1));
--error ER_EXPRESSION_REFERS_TO_UNINIT_FIELD
create or replace table t1 (a int default a);
---error ER_EXPRESSION_REFERS_TO_UNINIT_FIELD
create or replace table t1 (a int default b, b int default (1+1));
--error ER_EXPRESSION_REFERS_TO_UNINIT_FIELD
create or replace table t1 (a int default 1, b int as (c), c int as (a+1));
@@ -817,29 +816,6 @@ INSERT INTO t1 VALUES ();
SELECT * FROM t1;
DROP TABLE t1;
-
---echo #
---echo # Miscelaneous SQL standard <default option> variants
---echo #
-
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
-CREATE TABLE t1 (a VARCHAR(30) DEFAULT CURRENT_USER);
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
-CREATE TABLE t1 (a VARCHAR(30) DEFAULT CURRENT_ROLE);
-
---echo #
---echo # Other Item_func_sysconst derived functions
---echo #
-CREATE TABLE t1 (a VARCHAR(30) DEFAULT DATABASE());
-SHOW CREATE TABLE t1;
-INSERT INTO t1 VALUES ();
-USE INFORMATION_SCHEMA;
-INSERT INTO test.t1 VALUES ();
-USE test;
-INSERT INTO t1 VALUES ();
-SELECT * FROM t1;
-DROP TABLE t1;
-
--echo #
--echo # Check DEFAULT() function
--echo #
@@ -1010,9 +986,6 @@ INSERT INTO t1 VALUES ('01,5,2013','%d,%m,%Y', DEFAULT);
SELECT * FROM t1;
DROP TABLE t1;
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
-CREATE TABLE t1 (a VARCHAR(30), b VARCHAR(30) DEFAULT DATE_FORMAT(a,'%W %M %Y'));
-
--echo # Item_datefunc
SET time_zone='-10:00';
@@ -1221,7 +1194,6 @@ INSERT INTO t1 (a) VALUES ('1987-01-01');
SELECT * FROM t1;
DROP TABLE t1;
-# QQ: this depends on @@default_week_format.
CREATE TABLE t1 (a DATE, b INT DEFAULT WEEK(a));
SHOW CREATE TABLE t1;
INSERT INTO t1 (a) VALUES ('1987-02-01');
@@ -1240,12 +1212,6 @@ INSERT INTO t1 (a) VALUES ('2008-04-01');
SELECT * FROM t1;
DROP TABLE t1;
-# QQ: this depends on @@lc_time_names
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
-CREATE TABLE t1 (a DATE, b VARCHAR(30) DEFAULT DAYNAME(a));
---error ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED
-CREATE TABLE t1 (a DATE, b VARCHAR(30) DEFAULT MONTHNAME(a));
-
CREATE TABLE t1 (a DATE, b INT DEFAULT EXTRACT(YEAR FROM a));
SHOW CREATE TABLE t1;
INSERT INTO t1 (a) VALUES ('2009-07-02');
@@ -1596,7 +1562,6 @@ INSERT INTO t1 (a) VALUES (64);
SELECT * FROM t1;
DROP TABLE t1;
-# QQ: this depends on @@lc_time_names
CREATE TABLE t1 (a INT, b INT, c VARCHAR(30) DEFAULT FORMAT(a,b));
SHOW CREATE TABLE t1;
INSERT INTO t1 (a,b) VALUES (10000,3);
@@ -1844,7 +1809,7 @@ DROP TABLE t1;
#
# Order of evaluation:
#
-create table t1 (a int default 1, b int default (1+1), c int);
+create table t1 (a int default 1, b int default (rand()*0+2), c int);
insert t1 (c) values (a);
insert t1 (c) values (b);
select * from t1;
@@ -1861,3 +1826,13 @@ alter table t1 alter a set default (2+3), alter b set default 4,
alter table t1 alter a set default 1+2;
show create table t1;
drop table t1;
+
+#
+# CREATE ... SELECT
+#
+create table t1 (a int default 5 check (a>10), b int default (5+5), c int as (a+b));
+create table t2 as select a, b, c from t1;
+create table t3 as select max(a), max(b), max(c) from t1;
+show create table t2;
+show create table t3;
+drop table t1, t2, t3;
diff --git a/mysql-test/t/default_session.test b/mysql-test/t/default_session.test
new file mode 100644
index 00000000000..7796354ffd4
--- /dev/null
+++ b/mysql-test/t/default_session.test
@@ -0,0 +1,82 @@
+#
+# DEFAULT clause with functions that depend on the current session state
+#
+
+source include/not_embedded.inc;
+
+create database mysqltest1;
+
+create user ''@localhost;
+create user foo@localhost;
+create role bar;
+grant select on *.* to ''@localhost;
+grant select,insert on *.* to foo@localhost;
+grant select,insert on *.* to bar;
+grant bar to ''@localhost;
+
+create table t1 (n varchar(100),
+ u varchar(100) default user(),
+ cu varchar(100) default current_user(),
+ cr varchar(100) default current_role(),
+ d varchar(100) default database());
+
+create definer=foo@localhost view mysqltest1.v1 as select * from t1;
+create definer=bar view v2 as select * from t1;
+create view v3 as select * from v2;
+
+create definer=foo@localhost view mysqltest1.v4 as select default(n),default(u),default(cu),default(cr), default(d) from t1;
+create definer=bar view v5 as select default(n),default(u),default(cu),default(cr), default(d) from t1;
+create view v6 as select * from v5;
+
+insert t1 (n) values ('t1');
+insert mysqltest1.v1 (n) values ('v1');
+insert v2 (n) values ('v2');
+insert v3 (n) values ('v3');
+
+select default(n),default(u),default(cu),default(cr), default(d) from t1 limit 1;
+select * from mysqltest1.v4 limit 1;
+select * from v5 limit 1;
+select * from v6 limit 1;
+
+connect (conn,localhost,conn,,mysqltest1);
+set role bar;
+insert test.t1 (n) values ('t1');
+insert v1 (n) values ('v1');
+insert test.v2 (n) values ('v2');
+insert test.v3 (n) values ('v3');
+
+select default(n),default(u),default(cu),default(cr), default(d) from test.t1 limit 1;
+select * from v4 limit 1;
+select * from test.v5 limit 1;
+select * from test.v6 limit 1;
+connection default;
+disconnect conn;
+
+select * from t1;
+drop database mysqltest1;
+drop view v2, v3, v5, v6;
+drop table t1;
+drop user ''@localhost;
+drop user foo@localhost;
+drop role bar;
+
+create table t1 (a date,
+ mn varchar(100) default monthname(a),
+ dn varchar(100) default dayname(a),
+ df varchar(100) default date_format(a, "%a, %b"));
+
+insert t1 (a) values ('2010-12-2');
+set lc_time_names=de_DE;
+insert t1 (a) values ('2010-12-2');
+set lc_time_names=default;
+
+select * from t1;
+drop table t1;
+
+create table t1 (a varchar(100) default @@sql_mode);
+insert t1 () values ();
+set sql_mode=ansi;
+insert t1 () values ();
+set sql_mode=default;
+select * from t1;
+drop table t1;
diff --git a/mysql-test/t/derived_cond_pushdown.test b/mysql-test/t/derived_cond_pushdown.test
new file mode 100644
index 00000000000..141c705aa18
--- /dev/null
+++ b/mysql-test/t/derived_cond_pushdown.test
@@ -0,0 +1,925 @@
+let $no_pushdown= set statement optimizer_switch='condition_pushdown_for_derived=off' for;
+
+create table t1 (a int, b int, c int);
+create table t2 (a int, b int, c int, d decimal);
+insert into t1 values
+ (1,21,345), (1,33,7), (8,33,114), (1,21,500), (1,19,107), (5,14,787),
+ (8,33,123), (9,10,211), (5,16,207), (1,33,988), (5,27,132), (1,21,104),
+ (6,20,309), (6,20,315), (1,21,101), (8,33,404), (9,10,800), (1,21,123),
+ (7,11,708), (6,20,214);
+insert into t2 values
+ (2,3,207,207.0000), (1,21,909,12.0000), (7,13,312,406.0000),
+ (8,64,248,107.0000), (6,20,315,279.3333), (1,19,203,107.0000),
+ (8,80,800,314.0000), (3,12,231,190.0000), (6,23,303,909.0000);
+
+create table t1_double(a int, b double, c double);
+insert into t1_double values
+ (1,23.4,14.3333), (1,12.5,18.9), (3,12.5,18.9),
+ (4,33.4,14.3333), (4,14.3333,13.65), (5,17.89,7.22),
+ (6,33.4,14.3), (10,33.4,13.65), (11,33.4,13.65);
+
+create table t2_double(a int, b double, c double);
+insert into t2_double values
+ (1,22.4,14.3333), (1,12.5,18.9), (2,22.4,18.9),
+ (4,33.4,14.3333), (5,22.4,13.65), (7,17.89,18.9),
+ (6,33.4,14.3333), (10,31.4,13.65), (12,33.4,13.65);
+
+create table t1_char(a char, b char(8), c int);
+insert into t1_char values
+ ('a','Ivan',1), ('b','Vika',2), ('b','Inga',6), ('c','Vika',7),
+ ('b','Ivan',7), ('a','Alex',6), ('b','Inga',5), ('d','Ron',9),
+ ('d','Harry',2), ('d','Hermione',3), ('c','Ivan',3), ('c','Harry',4);
+
+create table t2_char(a char, b char(8), c int);
+insert into t2_char values
+ ('b','Ivan',1), ('c','Vinny',3), ('c','Inga',9), ('a','Vika',1),
+ ('c','Ivan',2), ('b','Ali',6), ('c','Inga',2), ('a','Ron',9),
+ ('d','Harry',1), ('b','Hermes',3), ('b','Ivan',11), ('b','Harry',4);
+
+create table t1_decimal (a decimal(3,1), b decimal(3,1), c int);
+insert into t1_decimal values
+ (1,1,23),(2,2,11),(3,3,16),
+ (1,1,12),(1,1,14),(2,3,15),
+ (2,1,13),(2,3,11),(3,3,16);
+
+create table t2_decimal (a decimal(3,1), b decimal(3,1), c int);
+insert into t2_decimal values
+ (2,1,13),(2,2,11),(3,3,16),
+ (1,3,22),(1,3,14),(2,2,15),
+ (2,1,43),(2,3,11),(2,3,16);
+
+create view v1 as select a, b, max(c) as max_c, avg(c) as avg_c from t1
+ group by a,b having max_c < 707;
+
+create view v2 as select a, b, max(c) as max_c, avg(c) as avg_c from t1
+ where t1.a>5 group by a,b having max_c < 707;
+
+create view v3 as select a, b, min(c) as min_c from t1
+ where t1.a<10 group by a,b having min_c > 109;
+
+create view v4 as
+ select a, b, min(max_c) as min_c from v1
+ where (v1.a<15) group by a,b;
+
+create view v_union as
+ select a, b, min(c) as c from t1
+ where t1.a<10 group by a,b having c > 109
+ union
+ select a, b, max(c) as c from t1
+ where t1.b>10 group by a,b having c < 300;
+
+create view v2_union as
+ select a, b, min(c) as c from t1
+ where t1.a<10 group by a,b having c > 109
+ union
+ select a, b, max(c) as c from t1
+ where t1.b>10 group by a,b having c < 300
+ union
+ select a, b, avg(c) as c from t1
+ where t1.c>300 group by a,b having c < 707;
+
+create view v3_union as
+ select a, b, (a+1) as c from t1
+ where t1.a<10
+ union
+ select a, b, c from t1
+ where t1.b>10 and t1.c>100;
+
+create view v4_union as
+ select a, b, max(c)-100 as c from t1
+ where t1.a<10 group by a,b having c > 109
+ union
+ select a, b, (c+100) as c from t1
+ where t1.b>10;
+
+create view v_double as
+ select a, avg(a/4) as avg_a, b, c from t1_double
+ where (b>12.2) group by b,c having (avg_a<22.333);
+
+create view v_char as
+ select a, b, max(c) as max_c from t1_char
+ group by a,b having max_c < 9;
+
+create view v_decimal as
+ select a, b, avg(c) as avg_c from t1_decimal
+ group by a,b having (avg_c>12);
+
+--echo # conjunctive subformula : pushing into HAVING
+let $query= select * from v1,t2 where (v1.max_c>214) and (t2.a>v1.a);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+let $query=
+ select * from
+ (select a, b, max(c) as max_c, avg(c) as avg_c from t1
+ group by a,b having max_c < 707) v1,
+ t2 where (v1.a=t2.a) and (v1.max_c>300);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # extracted or formula : pushing into HAVING
+let $query=
+ select * from v1,t2 where
+ ((v1.max_c>400) and (t2.a>v1.a)) or ((v1.max_c<135) and (t2.a<v1.a));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+let $query=
+ select * from v1,t2 where
+ ((v1.max_c>300) and (v1.avg_c>t2.d) and (v1.b=t2.b)) or
+ ((v1.max_c<135) and (v1.max_c<t2.c) and (v1.a=t2.a));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # conjunctive subformula : pushing into WHERE
+let $query= select * from v1,t2 where (v1.a>6) and (t2.b>v1.b);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+let $query= select * from v2,t2 where (v2.b>25) and (t2.a<v2.a);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # extracted or formula : pushing into WHERE
+let $query=
+ select * from v1,t2 where
+ ((v1.a>7) and (t2.c<v1.max_c)) or ((v1.a<2) and (t2.b<v1.b));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+let $query=
+ select * from v2,t2 where
+ ((v2.a>7) and (t2.c<v2.max_c)) or ((v2.a>5) and (t2.b<v2.b));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+let $query=
+ select * from v1,t2 where
+ ((v1.a>4) and (v1.b>t2.b) and (v1.max_c=t2.d)) or
+ ((v1.a<2) and (v1.max_c<t2.c) and (v1.max_c=t2.d));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # conjunctive subformulas : pushing into HAVING and WHERE
+let $query=
+ select * from v1,t2 where (v1.a<2) and (v1.max_c>400) and (t2.b>v1.b);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+let $query=
+ select * from v_double as v,t2_double as t where
+ (v.a=t.a) and (v.avg_a>0.45) and (v.b>10);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+let $query=
+ select * from v_decimal as v,t2_decimal as t where
+ (v.a=t.a) and (v.avg_c>15) and (v.b>1);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # extracted or formula : pushing into HAVING and WHERE
+let $query=
+ select * from v1,t2 where
+ ((v1.a>7) and (v1.max_c>300) and (t2.c<v1.max_c)) or
+ ((v1.a<4) and (v1.max_c<500) and (t2.b<v1.b));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+let $query=
+ select * from v1,t2 where ((v1.a<2) and (v1.max_c>120)) or (v1.a>7);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # extracted or formulas : pushing into WHERE and HAVING
+let $query=
+ select * from v1,t2 where
+ ((v1.a<2) and (v1.max_c>120) and (v1.b=t2.b)) or (v1.a>7);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+let $query=
+ select * from v1,t2 where
+ ((v1.a<2) and (v1.max_c<200) and (t2.c>v1.max_c) and (v1.max_c=t2.d)) or
+ ((v1.a>4) and (v1.max_c<500) and (t2.b<v1.b) and (v1.max_c=t2.c));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # prepare of a query containing extracted or formula
+prepare stmt from "select * from v1,t2 where
+ ((v1.max_c>400) and (t2.a>v1.a)) or ((v1.max_c<135) and (t2.a<v1.a));";
+execute stmt;
+execute stmt;
+deallocate prepare stmt;
+prepare stmt from
+ "explain format=json select * from v1,t2 where
+ ((v1.max_c>400) and (t2.a>v1.a)) or ((v1.max_c<135) and (t2.a<v1.a));";
+execute stmt;
+execute stmt;
+deallocate prepare stmt;
+
+--echo # conjunctive subformula : pushing into WHERE
+--echo # pushing equalities
+let $query=
+ select * from v1,t2 where (t2.a=v1.a) and (v1.b=t2.b) and (v1.a=1);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+let $query= select * from v1,t2 where (v1.a=5) and (v1.max_c=t2.d);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # conjunctive subformula : pushing into WHERE using equalities
+let $query= select * from v1,t2 where (t2.a<5) and (v1.a=t2.a);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+let $query=
+ select * from v1,t2 where (v1.a=v1.b) and (v1.a=t2.a);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # conjunctive subformula : pushing into HAVING using equalities
+let $query= select * from v1,t2 where (t2.c>150) and (v1.max_c=t2.c);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # extracted and formula : pushing into WHERE
+--echo # pushing equalities
+let $query=
+ select * from v1,t2 where (v1.a=v1.b) and (v1.a=t2.a) and (v1.a=3);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+let $query=
+ select * from v1,t2 where (v1.a=1) and (v1.b=21) and (t2.a=2);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+let $query=
+ select * from v_char as v,t2_char as t where
+ (v.a='c') and (v.b<'Hermes') and ((v.b=t.b) or (v.max_c>20));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # extracted and formula : pushing into WHERE using equalities
+--echo # pushing equalities
+let $query=
+select * from v_decimal as v,t2_decimal as t where
+ (v.a=v.b) and (v.b=t.b) and ((t.b>1) or (v.a=1));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # extracted or formula : pushing into HAVING using equalities
+let $query=
+ select * from v1,t2
+ where ((t2.a<4) and (v1.a=t2.a)) or ((t2.c>150) and (v1.max_c=t2.c));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # conjunctive subformulas : pushing into WHERE and HAVING using equalities
+let $query=
+ select * from v1,t2
+ where ((t2.a>5) and (v1.a=t2.a)) and ((t2.c>250) and (v1.max_c=t2.c));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # conjunctive subformulas : pushing into WHERE and HAVING
+--echo # pushing equalities
+let $query=
+ select * from
+ (select a, b, max(c) as max_c, avg(c) as avg_c from t1
+ group by a,b having max_c < 707) v1,
+ t2 where (v1.a=8) and (v1.a=t2.a) and (v1.max_c=404);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # conjunctive subformulas : pushing into WHERE and HAVING
+let $query=
+ select * from v1,t2 where
+ (v1.a>3) and (v1.max_c>200) and (t2.b<v1.b) and (t2.d=v1.max_c);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # conjunctive subformula : pushing into WHERE
+--echo # extracted or formula : pushing into HAVING using equalities
+--echo # pushing equalities
+let $query=
+ select * from v_double as v,t2_double as t where
+ (v.b=v.c) and (v.c=t.c) and ((t.c>10) or (v.a=1));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # conjunctive subformula : pushing into WHERE
+--echo # extracted or formula : pushing into HAVING using equalities
+let $query=
+ select * from v_double as v,t2_double as t where
+ (((v.a>0.2) or (v.b<17)) or (t.c>17)) and (t.c=v.c) and (v.c>18);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # extracted or formula : pushing into WHERE
+--echo # conjunctive subformula : pushing into HAVING
+--echo # pushing equalities
+let $query=
+ select * from v_decimal as v,t2_decimal as t where
+ (((v.a>4) or (v.a=2)) or (v.b>3)) and (v.avg_c=13);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+let $query=
+ select * from
+ (select a, b, max(c) as max_c, avg(c) as avg_c from t1
+ where t1.a>5 group by a,b having max_c < 707) v1,
+ t2 where (v1.a=t2.a) and (v1.max_c>300) and (v1.a=v1.b);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # nothing to push
+let $query=
+ select * from v1,t2 where (t2.a<2) and (t2.c>900);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+let $query= select * from v1,t2 where (v1.a=t2.a) and (v1.b=t2.b);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+let $query=
+ select * from v1,t2 where
+ (t2.a=v1.a) or (v1.b=t2.b) and ((v1.a=1) or (v1.a=6));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+let $query=
+ select * from v1,t2 where (v1.a=1) or (v1.b=21) or (t2.a=2);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+let $query=
+ select * from v1,t2 where
+ (t2.a<2) and (t2.c>900) and ((v1.a<t2.a) or (t2.a<11));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using several derived tables : nothing to push
+let $query= select * from v1,v2,t2 where
+ (v1.a=v2.a) and (v1.a=t2.a) and (v2.b<50);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+let $query=
+ select * from v1,v2,t2 where
+ ((v1.a=v2.a) or (v1.a=t2.a)) and (t2.b<50) and (v1.b=v2.b);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+let $query=
+ select * from v1,v2,t2 where
+ ((v1.a=v2.a) and (v1.a=t2.a)) or ((v2.b>13) and (t2.c<115));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using several derived tables : pushing in all tables
+--echo # conjunctive subformula : pushing into HAVING
+--echo # extracted or formula : pushing into WHERE
+--echo # pushing equalities
+let $query=
+ select * from v1,v2,t2 where ((v1.a=v2.a) or (v1.a=t2.a)) and
+ ((v2.b<50) or (v2.b=19)) and (v1.max_c<300);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using several derived tables : pushing only in one table
+--echo # conjunctive subformula : pushing into WHERE
+--echo # pushing equalities
+let $query=
+ select * from v1,v2,t2 where
+ (v1.a=t2.a) and (v1.a=v1.b) and (v1.a=v2.a) and (v2.max_c<300);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using several derived tables : pushing only in one table
+--echo # extracted and formula : pushing into WHERE
+--echo # conjunctive subformula : pushing into WHERE using equalities
+--echo # pushing equalities
+let $query=
+ select * from v1,v2,t2 where (v1.a=1) and (v1.b>10) and (v1.b=v2.b);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # extracted or formula : pushing into WHERE
+--echo # conjunctive subformula : pushing into WHERE using equalities
+--echo # pushing equalities
+let $query=
+ select * from v_char as v,t2_char as t where
+ (v.a=t.a) and (t.a='b') and ((v.b='Vika') or (v.b='Ali'));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using several derived tables : pushing in all tables
+--echo # extracted or formula : pushing into WHERE
+--echo # conjunctive subformulas : pushing into HAVING
+--echo # pushing equalities
+let $query=
+ select * from v1,v2,v3,t2 where
+ ((v1.a=v2.a) or (v1.a=t2.a)) and ((v3.b<50) or (v3.b=33))
+ and (v1.max_c<500) and (v3.a=t2.a) and (v2.max_c>300);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using several derived tables : pushing in all tables
+--echo # conjunctive subformulas : pushing into HAVING
+let $query=
+ select * from
+ (select a, b, max(c) as max_c, avg(c) as avg_c from t1
+ where t1.a>5 group by a,b having max_c < 707) v1,
+ (select a, b, min(c) as min_c from t1
+ where t1.a>5 group by a,b having min_c < 707) v2,
+ t2 where (v1.a=v2.a) and (v1.b=t2.b) and (v1.max_c>130) and (v2.min_c<130);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using several derived tables : pushing in all tables
+--echo # extracted or formulas : pushing into HAVING
+--echo # conjunctive subformula : pushing into HAVING
+let $query=
+ select * from
+ (select a, b, max(c) as max_c, avg(c) as avg_c from t1
+ where t1.a>5 group by a,b having max_c < 707) v1,
+ (select a, b, min(c) as min_c from t1
+ where t1.a>5 group by a,b having min_c < 707) v2,
+ (select a, b, avg(c) as avg_c from t1
+ where t1.a<8 group by a,b) v3,
+ t2 where (v1.a=v2.a) and (v1.b=v3.b) and ((v3.avg_c>170) or (v3.a<5))
+ and ((v1.avg_c<400) or (v1.a>1)) and (v2.min_c<200);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # extracted or formula : pushing into HAVING
+--echo # conjunctive subformula : pushing into WHERE
+let $query=
+ select * from
+ (select a, b, max(c) as max_c, avg(c) as avg_c from t1
+ group by a,b having max_c < 707) v1,
+ t2 where ((v1.a=1) or (v1.max_c<300)) and (v1.b>25);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # extracted and formula : pushing into WHERE
+--echo # conjunctive subformula : pushing into HAVING
+let $query=
+ select * from
+ (select a, b, max(c) as max_c, avg(c) as avg_c from t1
+ where t1.a>5 group by a,b having max_c < 707) v1,
+ t2 where (v1.a=t2.a) and (v1.max_c>300) and (v1.b<30);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using query with union
+--echo # conjunctive subformula : pushing into WHERE
+--echo # conjunctive subformulas : pushing into HAVING and WHERE
+let $query=
+ select * from v1,t2 where (v1.a<5) and (v1.b=t2.b) and (t2.c>800)
+ union
+ select * from v1,t2 where (v1.max_c>100) and (v1.a>7) and (t2.d>800);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using query with union
+--echo # extracted and formula : pushing into WHERE
+--echo # extracted or formula : pushing into HAVING
+--echo # pushing equalities
+let $query=
+ select * from v1,t2 where (v1.a<5) and (v1.b=t2.b) and (v1.b=19)
+ union
+ select * from v1,t2 where ((v1.max_c>400) or (v1.avg_c>270)) and (v1.a<t2.a);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using query with union
+--echo # extracted or formula : pushing into HAVING
+--echo # extracted or formula : pushing into WHERE
+--echo # pushing equalities
+let $query=
+ select * from v1,t2 where
+ ((t2.a=v1.a) or (v1.b=t2.b)) and ((v1.a=1) or (v1.a=6))
+ union
+ select * from v1,t2 where ((v1.a>3) and (v1.b>27)) or (v1.max_c>550);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using query with union
+--echo # extracted or formula : pushing into HAVING
+--echo # conjunctive subformulas : pushing into WHERE
+--echo # pushing equalities
+let $query=
+ select * from v1,t2 where
+ ((v1.a=1) and (v1.a=t2.a)) and ((v1.max_c<500) or (v1.avg_c>500))
+ union
+ select * from v2,t2 where
+ ((v2.a<t2.b) or (v2.max_c>200)) and (v2.b>10) and (t2.a<2)
+ union
+ select * from v2,t2 where
+ (v2.max_c=t2.c) and (v2.b<10);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using derived table with union
+--echo # conjunctive subformulas : pushing into WHERE and HAVING
+let $query= select * from v_union,t2 where (v_union.a<3) and (v_union.c>100);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using derived table with union
+--echo # conjunctive subformula : pushing into WHERE
+--echo # extracted or formula : pushing into HAVING
+let $query=
+ select * from v_union,t2 where
+ ((v_union.a<2) or (v_union.c>800)) and (v_union.b>12);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using derived table with union
+--echo # conjunctive subformula : pushing into HAVING
+--echo # conjunctive subformula : pushing into WHERE
+--echo # pushing equalities
+let $query=
+ select * from v_union,t2 where
+ (v_union.a=1) and (v_union.a=t2.a) and (v_union.c<200);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+let $query=
+ select * from v_char as v,t2_char as t where
+ (v.a=t.a) and (v.b='Vika') and (v.max_c>2);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using derived table with union
+--echo # using several derived tables : pushing in all tables
+--echo # conjunctive subformula : pushing into WHERE using equalities
+--echo # pushing equalities
+let $query=
+ select * from v_union,v1,t2 where
+ (v_union.a=v1.a) and (v1.a=t2.a) and (t2.a=1)
+ and ((v_union.c>800) or (v1.max_c>200));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using derived table with union
+--echo # extracted or formula : pushing into WHERE
+--echo # conjunctive subformula : pushing into HAVING
+--echo # pushing equalities
+let $query=
+ select * from v2_union as v,t2 where
+ ((v.a=6) or (v.a=8)) and (v.c>200) and (v.a=t2.a);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using derived table with union of selects without aggregation
+--echo # extracted conjunctive predicate: pushing in WHERE of both selects
+let $query=
+ select * from v3_union as v,t2 where (v.a=t2.a) and (v.c>6);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using derived table with union of selects without aggregation
+--echo # extracted conjunctive OR subformula: pushing in WHERE using equalities
+let $query=
+ select * from v3_union as v,t2 where (v.a=t2.a) and ((t2.a>1) or (v.b<20));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using derived table with union of selects without aggregation
+--echo # extracted the whole condition: in WHERE of both selects
+let $query=
+ select * from v3_union as v,t2 where
+ (v.a=t2.a) and ((v.b=19) or (v.b=21)) and ((v.c<3) or (v.c>600));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using derived table with union of
+--echo # a select without aggregation and a select with aggregation
+--echo # extracted conjunctive predicate: pushing in WHERE of both selects
+let $query=
+ select * from v4_union as v,t2 where (v.a=t2.a) and (v.b<20);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using derived table with union of
+--echo # a select without aggregation and a select with aggregation
+--echo # extracted subformula: pushing in WHERE of one select
+--echo # extracted subformula: pushing in HAVING of the other select
+--echo # extracted sub-subformula: pushing in WHERE of the other select
+--echo # using an equality in all pushdowns
+let $query=
+ select * from v4_union as v,t2 where
+ (v.a=t2.a) and ((t2.a<3) or (v.b<40)) and (v.c>500);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using embedded derived table : pushing the same conditions
+--echo # using several derived tables : pushing in all tables
+--echo # conjunctive subformula : pushing into WHERE
+--echo # extracted and formula : pushing into WHERE
+let $query=
+select * from v4,v1 where
+ (v4.a<13) and (v1.a>5) and (v1.b>12);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using embedded view : nothing to push
+--echo # using several derived tables : pushing only in one table
+--echo # conjunctive subformula : pushing into WHERE
+let $query=
+ select * from v4,v1,t2 where
+ (v4.a=t2.a) and (v4.a=v1.a) and (v1.b>30);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using embedded view : pushing different conditions
+--echo # using several derived tables : pushing in all tables
+--echo # conjunctive subformula : pushing into WHERE using equalities
+--echo # extracted and formula : pushing into WHERE using equalities
+--echo # conjunctive subformula : pushing into HAVING
+let $query=
+ select * from v4,v1,t2 where
+ (v4.a=t2.a) and (v4.a>1) and (v4.a=v1.a) and (v4.min_c>100) and (v1.b<30);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using embedded view : pushing different conditions
+--echo # using several derived tables : pushing in all tables
+--echo # extracted or formula : pushing into WHERE
+--echo # conjunctive subformula : pushing into HAVING
+let $query=
+ select * from v4,v1,t2 where
+ (((v4.b>10) and (v4.a>1)) or (v4.b<20)) and (v1.max_c>200) and (v1.a=v4.a);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using embedded view : pushing different conditions
+--echo # using several derived tables : pushing only in one table
+--echo # extracted or formula : pushing into WHERE
+--echo # extracted or formula : pushing into HAVING
+let $query=
+ select * from v4,v2 where
+ ((v4.a>12) and (v4.min_c<300) and (v4.b>13)) or (v4.a<1);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using embedded view : pushing different conditions
+--echo # using several derived tables : pushing only in one table
+--echo # conjunctive subformula : pushing into WHERE
+--echo # conjunctive subformula : pushing into HAVING
+--echo # pushing equalities
+let $query=
+ select * from v4,v2 where
+ (v4.a=v2.b) and (v4.a=v4.b) and (v4.min_c<100);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using embedded view : pushing the same conditions
+--echo # using several derived tables : pushing in all tables
+--echo # extracted and formula : pushing into WHERE using equalities
+--echo # conjunctive subformula : pushing into WHERE
+--echo # pushing equalities
+let $query=
+ select * from v4,v2 where
+ (v4.a=v2.b) and (v4.a=v4.b) and (v2.b<30);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using embedded view : pushing the same conditions
+--echo # using several derived tables : pushing in all tables
+--echo # extracted or formula : pushing into WHERE using equalities
+--echo # extracted and formula : pushing into WHERE using equalities
+--echo # pushing equalities
+let $query=
+ select * from v4,v2 where
+ (v4.a=v2.b) and (v4.a=v4.b) and ((v2.b<30) or (v4.a>2));
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using embedded view : pushing the same conditions
+--echo # using several derived tables : pushing in all tables
+--echo # extracted or formula : pushing into WHERE
+--echo # conjunctive subformula : pushing into WHERE
+--echo # pushing equalities
+let $query=
+ select * from v4,v2 where
+ (((v4.a<12) and (v4.b>13)) or (v4.a>10)) and
+ (v4.min_c=v2.max_c) and (v4.min_c>100);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+--echo # using embedded view : pushing the same conditions
+--echo # using several derived tables : pushing only in one table
+--echo # extracted or formula : pushing into WHERE
+let $query=
+ select * from v4,v2,t2 where
+ (((v4.a<12) and (t2.b>13)) or (v4.a>10)) and
+ (v4.min_c=t2.c) and (t2.c>100);
+eval $no_pushdown $query;
+eval $query;
+eval explain $query;
+eval explain format=json $query;
+
+drop view v1,v2,v3,v4;
+drop view v_union,v2_union,v3_union,v4_union;
+drop view v_double,v_char,v_decimal;
+drop table t1,t2,t1_double,t2_double,t1_char,t2_char,t1_decimal,t2_decimal;
+
+--echo #
+--echo # MDEV-10782: condition extracted from a multiple equality
+--echo # pushed into HAVING
+--echo #
+
+CREATE TABLE t1 (i int);
+INSERT INTO t1 VALUES (1),(2);
+EXPLAIN EXTENDED
+SELECT *
+ FROM ( SELECT * FROM ( SELECT MIN(i) as f FROM t1 ) sq1 ) AS sq2
+ WHERE f = 8;
+SELECT *
+ FROM ( SELECT * FROM ( SELECT MIN(i) as f FROM t1 ) sq1 ) AS sq2
+ WHERE f = 8;
+SELECT *
+ FROM ( SELECT * FROM ( SELECT MIN(i) as f FROM t1 ) sq1 ) AS sq2
+ WHERE f = 1;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-10783: pushdown into constant view
+--echo #
+
+CREATE TABLE t1 (i int) ENGINE=MyISAM;
+CREATE VIEW v AS SELECT 5;
+SELECT * FROM t1 WHERE 1 IN ( SELECT * FROM v );
+DROP VIEW v;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-10785: second execution of a query with condition
+--echo # pushed into view
+--echo #
+
+CREATE TABLE t1 (i int);
+CREATE VIEW v1 AS SELECT i FROM t1 WHERE i < 5;
+CREATE FUNCTION f (in1 int) RETURNS int RETURN in1;
+CREATE VIEW v2 AS SELECT * FROM v1 GROUP BY i;
+PREPARE stmt FROM "SELECT * FROM v2 WHERE f(0) <> 2";
+EXECUTE stmt;
+EXECUTE stmt;
+DROP FUNCTION f;
+DROP VIEW v2,v1;
+DROP TABLE t1;
diff --git a/mysql-test/t/derived_view.test b/mysql-test/t/derived_view.test
index 3d9ab4e4477..e94ab7073a6 100644
--- a/mysql-test/t/derived_view.test
+++ b/mysql-test/t/derived_view.test
@@ -113,6 +113,7 @@ select * from t1 join v2 on f1=f2;
show status like 'Handler_read%';
explain extended select * from v1 join v4 on f1=f2;
+explain format=json select * from v1 join v4 on f1=f2;
select * from v1 join v4 on f1=f2;
--echo merged derived in merged derived
@@ -136,6 +137,8 @@ select * from (select * from
--echo materialized derived in materialized derived
explain extended select * from (select * from
(select * from t1 where f1 < 7 group by f1) tt where f1 > 2 group by f1) zz;
+explain format=json select * from (select * from
+ (select * from t1 where f1 < 7 group by f1) tt where f1 > 2 group by f1) zz;
select * from (select * from
(select * from t1 where f1 < 7 group by f1) tt where f1 > 2 group by f1) zz;
@@ -145,6 +148,11 @@ explain extended select * from
join
(select * from (select * from t1 where f1 < 7 group by f1) tt where f1 > 2) z
on x.f1 = z.f1;
+explain format=json select * from
+ (select * from (select * from t1 where f1 < 7 group by f1) tt where f1 > 2) x
+join
+ (select * from (select * from t1 where f1 < 7 group by f1) tt where f1 > 2) z
+ on x.f1 = z.f1;
flush status;
select * from
@@ -181,6 +189,13 @@ join
(select * from
(select * from t1 where f1 < 7 group by f1) tt where f1 > 2 group by f1) z
on x.f1 = z.f1;
+explain format=json select * from
+ (select * from
+ (select * from t1 where f1 < 7 group by f1) tt where f1 > 2 group by f1) x
+join
+ (select * from
+ (select * from t1 where f1 < 7 group by f1) tt where f1 > 2 group by f1) z
+ on x.f1 = z.f1;
select * from
(select * from
@@ -198,6 +213,8 @@ select * from (select * from v4 group by 1) tt;
--echo materialized view in merged derived
explain extended
select * from ( select * from v1 where f1 < 7) tt;
+explain format=json
+select * from ( select * from v1 where f1 < 7) tt;
select * from ( select * from v1 where f1 < 7) tt;
--echo merged view in a merged view in a merged derived
@@ -212,6 +229,7 @@ select * from (select * from v7 group by 1) tt;
--echo join of above two
explain extended select * from v6 join v7 on f2=f1;
+explain format=json select * from v6 join v7 on f2=f1;
select * from v6 join v7 on f2=f1;
--echo test two keys
diff --git a/mysql-test/t/empty_table.test b/mysql-test/t/empty_table.test
index e8e532832f4..754671868ba 100644
--- a/mysql-test/t/empty_table.test
+++ b/mysql-test/t/empty_table.test
@@ -10,6 +10,15 @@ create table t1 (nr int(5) not null auto_increment,b blob,str char(10), primary
select count(*) from t1;
select * from t1;
select * from t1 limit 0;
+show status like "Empty_queries";
drop table t1;
+#
+# Accessing a non existing table should not increase Empty_queries
+#
+
+--error 1146
+select * from t2;
+show status like "Empty_queries";
+
# End of 4.1 tests
diff --git a/mysql-test/t/features.test b/mysql-test/t/features.test
index 225ab40b361..63e923a772b 100644
--- a/mysql-test/t/features.test
+++ b/mysql-test/t/features.test
@@ -130,3 +130,11 @@ insert into t1 values(2);
drop table t1;
show status like "feature_delay_key_write";
+
+#
+# Feature CHECK CONSTRAINT
+#
+create table t1 (a int check (a > 5));
+create table t2 (b int, constraint foo check (b < 10));
+drop table t1, t2;
+show status like "feature_check_constraint";
diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test
index 47477c72004..7e342928ef8 100644
--- a/mysql-test/t/func_group.test
+++ b/mysql-test/t/func_group.test
@@ -1567,6 +1567,37 @@ EXECUTE stmt;
DROP TABLE t1,t2,t3,t4,t5,t6;
--echo #
+--echo # MDEV-10500 CASE/IF Statement returns multiple values and shifts further result values to the next column
+--echo #
+
+CREATE TABLE t1 (
+ id int not null AUTO_INCREMENT,
+ active bool not null,
+ data1 bigint,
+ data2 bigint,
+ data3 bigint,
+ primary key (id)
+);
+INSERT INTO t1 (active,data1,data2,data3) VALUES (1,null,100,200);
+SELECT
+ CASE WHEN active THEN SUM(data1) END AS C_1,
+ SUM(data2) AS C_2,
+ SUM(data3) AS C_3
+FROM t1;
+SELECT
+ IF(active, SUM(data1), 5) AS C_1,
+ SUM(data2) AS C_2,
+ SUM(data3) AS C_3
+FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-10468 Assertion `nr >= 0.0' failed in Item_sum_std::val_real()
+--echo #
+SELECT STDDEV_POP(f) FROM (SELECT "1e+309" AS f UNION SELECT "-1e+309" AS f) tbl;
+SELECT STDDEV(f) FROM (SELECT 1.7976931348623157e+308 AS f UNION SELECT -1.7976931348623157e+308 AS f) tbl;
+
+--echo #
--echo # MDEV-8852 Implicit or explicit CAST from MAX(string) to INT,DOUBLE,DECIMAL does not produce warnings
--echo #
SELECT MAX('x') << 1, CAST(MAX('x') AS DOUBLE), CAST(MAX('x') AS DECIMAL);
@@ -1617,5 +1648,37 @@ SELECT companynr, AVG(fld1), AVG(fld1)<<0 AS avg1, CAST(AVG(fld1) AS UNSIGNED)<<
DROP TABLE t1;
--echo #
+--echo # case where aggregate resolved in the local SELECT
+--echo # but outer ones are checked
+--echo #
+create table t10 (a int , b int, c int);
+insert into t10 values (0,0,0),(1,1,1);
+create table t11 as select * from t10;
+create table t12 as select * from t10;
+explain extended select a from t10 where c<3 or a in (select c from t12 union select max(t10.b) from t11 group by t11.c);
+drop table t10,t11,t12;
+--echo #
+--echo # MDEV-10017: Get unexpected `Empty Set` for correlated subquery
+--echo # with aggregate functions
+--echo #
+
+create table t1(c1 int, c2 int, c3 int);
+insert into t1 values(1,1,1),(2,2,2),(3,3,3);
+select * from t1;
+create table t2(c1 int, c2 int);
+insert into t2 values(2,2);
+select * from t2;
+--error ER_INVALID_GROUP_FUNC_USE
+explain extended
+select c1 from t1 having c1 >= (select t.c1 as c from t2 t order by (select min(t1.c1+c) from t2 tt));
+--error ER_INVALID_GROUP_FUNC_USE
+select c1 from t1 having c1 >= (select t.c1 as c from t2 t order by (select min(t1.c1+c) from t2 tt));
+
+explain extended
+select c1 from t1 having c1 >= (select t.c1 as c from t2 t order by (select min(t1.c1+tt.c1) from t2 tt));
+select c1 from t1 having c1 >= (select t.c1 as c from t2 t order by (select min(t1.c1+tt.c1) from t2 tt));
+drop table t1,t2;
+
+--echo #
--echo # End of 10.1 tests
--echo #
diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test
index fdda9c844ea..08349f007e1 100644
--- a/mysql-test/t/func_math.test
+++ b/mysql-test/t/func_math.test
@@ -580,11 +580,15 @@ select 5 div 2.0;
select 5.9 div 2, 1.23456789e3 DIV 2, 1.23456789e9 DIV 2, 1.23456789e19 DIV 2;
--echo #
---echo # End of 5.5 tests
+--echo # MDEV-10467 Assertion `nr >= 0.0' failed in Item_sum_std::val_real()
--echo #
+CREATE TABLE t1 (i INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT STDDEV_SAMP(ROUND('0', 309)) FROM t1;
+DROP TABLE t1;
--echo #
---echo # Start of 10.0 tests
+--echo # End of 5.5 tests
--echo #
--echo #
@@ -592,7 +596,6 @@ select 5.9 div 2, 1.23456789e3 DIV 2, 1.23456789e9 DIV 2, 1.23456789e19 DIV 2;
--echo #
SELECT STDDEV_POP(ROUND(0,@A:=2009)) FROM (SELECT 1 UNION SELECT 2) fake_table;
-
--echo #
--echo # Start of 10.2 tests
--echo #
@@ -600,3 +603,8 @@ SELECT STDDEV_POP(ROUND(0,@A:=2009)) FROM (SELECT 1 UNION SELECT 2) fake_table;
--echo # Test zero
select 0=0, 0=-0, 0.0= -0.0, 0.0 = -(0.0), 0.0E1=-0.0E1, 0.0E1=-(0.0E1);
+--echo #
+--echo # CRC32 tests
+--echo #
+
+select CRC32(NULL), CRC32(''), CRC32('MySQL'), CRC32('mysql'), CRC32('01234567'), CRC32('012345678');
diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test
index f24576cc992..f931352c0e2 100644
--- a/mysql-test/t/func_misc.test
+++ b/mysql-test/t/func_misc.test
@@ -596,6 +596,16 @@ AND 57813X540X1723 = 'Test';
drop table t1;
+#
+# Bug#12735545 - PARSER STACK OVERFLOW WITH NAME_CONST
+# CONTAINING OR EXPRESSION
+#
+--error ER_WRONG_ARGUMENTS
+SELECT NAME_CONST('a', -(1 OR 2)) OR 1;
+--error ER_WRONG_ARGUMENTS
+SELECT NAME_CONST('a', -(1 AND 2)) OR 1;
+SELECT NAME_CONST('a', -(1)) OR 1;
+
--echo #
--echo # End of 5.5 tests
--echo #
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test
index 18293f31dd2..12b7c92688f 100644
--- a/mysql-test/t/func_time.test
+++ b/mysql-test/t/func_time.test
@@ -1712,3 +1712,77 @@ SELECT
--echo #
--echo # End of 10.0 tests
--echo #
+
+--echo #
+--echo # Start of 10.1 tests
+--echo #
+
+--echo #
+--echo # MDEV-10317 EXCTACT(MINUTE_MICROSECOND) truncates data
+--echo #
+
+let $query=
+SELECT
+ a,
+ EXTRACT(YEAR FROM a),
+ EXTRACT(YEAR_MONTH FROM a),
+ EXTRACT(QUARTER FROM a),
+ EXTRACT(MONTH FROM a),
+ EXTRACT(WEEK FROM a),
+ EXTRACT(DAY FROM a),
+ EXTRACT(DAY_HOUR FROM a),
+ EXTRACT(DAY_MINUTE FROM a),
+ EXTRACT(DAY_SECOND FROM a),
+ EXTRACT(HOUR FROM a),
+ EXTRACT(HOUR_MINUTE FROM a),
+ EXTRACT(HOUR_SECOND FROM a),
+ EXTRACT(MINUTE FROM a),
+ EXTRACT(MINUTE_SECOND FROM a),
+ EXTRACT(SECOND FROM a),
+ EXTRACT(MICROSECOND FROM a),
+ EXTRACT(DAY_MICROSECOND FROM a),
+ EXTRACT(HOUR_MICROSECOND FROM a),
+ EXTRACT(MINUTE_MICROSECOND FROM a),
+ EXTRACT(SECOND_MICROSECOND FROM a)
+FROM t1;
+
+
+CREATE TABLE t1 (a DATETIME(6));
+INSERT INTO t1 VALUES ('1999-12-31 23:59:59.999999');
+
+--vertical_results
+--enable_metadata
+--disable_ps_protocol
+--eval $query
+--enable_ps_protocol
+--disable_metadata
+--horizontal_results
+
+--eval CREATE TABLE t2 AS $query
+--vertical_results
+SELECT * FROM t2;
+--horizontal_results
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+CREATE TABLE t1 (a TIME(6));
+INSERT INTO t1 VALUES ('-838:59:59.999999'),('838:59:59.999999');
+
+--vertical_results
+--enable_metadata
+--disable_ps_protocol
+--eval $query
+--enable_ps_protocol
+--disable_metadata
+--horizontal_results
+
+--eval CREATE TABLE t2 AS $query
+--vertical_results
+SELECT * FROM t2;
+--horizontal_results
+SHOW CREATE TABLE t2;
+DROP TABLE t1,t2;
+
+--echo #
+--echo # End of 10.1 tests
+--echo #
diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test
index f0007186ab2..a1a73d15e1a 100644
--- a/mysql-test/t/group_by.test
+++ b/mysql-test/t/group_by.test
@@ -1828,3 +1828,39 @@ select distinct a from t1 group by 'a';
insert into t1 values("2001-02-02"),("2001-02-03");
select distinct a from t1 group by 'a';
drop table t1;
+
+--echo #
+--echo # MDEV-10324: Server crash in get_sel_arg_for_keypart or Assertion `n < size()' failed in Mem_root_array
+--echo #
+CREATE TABLE t1 (
+ job_id int(10) unsigned NOT NULL AUTO_INCREMENT,
+ job_cmd varbinary(60) NOT NULL DEFAULT '',
+ job_namespace int(11) NOT NULL,
+ job_title varbinary(255) NOT NULL,
+ job_params blob NOT NULL,
+ job_timestamp varbinary(14) DEFAULT NULL,
+ job_random int(10) unsigned NOT NULL DEFAULT '0',
+ job_token varbinary(32) NOT NULL DEFAULT '',
+ job_token_timestamp varbinary(14) DEFAULT NULL,
+ job_sha1 varbinary(32) NOT NULL DEFAULT '',
+ job_attempts int(10) unsigned NOT NULL DEFAULT '0',
+ PRIMARY KEY (job_id),
+ KEY job_cmd (job_cmd,job_namespace,job_title,job_params(128)),
+ KEY job_timestamp (job_timestamp),
+ KEY job_sha1 (job_sha1),
+ KEY job_cmd_token (job_cmd,job_token,job_random),
+ KEY job_cmd_token_id (job_cmd,job_token,job_id)
+);
+
+INSERT INTO t1 VALUES
+ (NULL, 'foo', 1, 'foo', 'foo', 'foo', 1, 'foo', 'foo', 'foo', 1),
+ (NULL, 'bar', 2, 'bar', 'bar', 'bar', 2, 'bar', 'bar', 'bar', 2);
+
+SELECT DISTINCT job_cmd FROM t1 WHERE job_cmd IN ('foobar','null');
+drop table t1;
+
+CREATE TABLE t1 (f1 INT NOT NULL, f2 VARCHAR(3) NOT NULL, KEY(f1), KEY(f2, f1));
+INSERT INTO t1 VALUES (0,'foo'),(1,'bar');
+SELECT 1 IN ( SELECT COUNT( DISTINCT f2 ) FROM t1 WHERE f1 <= 4 );
+drop table t1;
+
diff --git a/mysql-test/t/group_by_innodb.test b/mysql-test/t/group_by_innodb.test
index e072a94fada..ed65e0c3e57 100644
--- a/mysql-test/t/group_by_innodb.test
+++ b/mysql-test/t/group_by_innodb.test
@@ -125,4 +125,34 @@ ORDER BY id DESC;
DROP TABLE t1, t2;
+--echo # Port of testcase:
+--echo #
+--echo # Bug#20819199 ASSERTION FAILED IN TEST_IF_SKIP_SORT_ORDER
+--echo #
+
+CREATE TABLE t0 ( a INT );
+INSERT INTO t0 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
+
+CREATE TABLE t1 (
+ pk INT NOT NULL AUTO_INCREMENT,
+ a INT,
+ b INT,
+ PRIMARY KEY (pk),
+ KEY idx1 (a),
+ KEY idx2 (b, a),
+ KEY idx3 (a, b)
+) ENGINE = InnoDB;
+
+INSERT INTO t1 (a, b) SELECT t01.a, t02.a FROM t0 t01, t0 t02;
+
+ANALYZE TABLE t1;
+
+let $query=
+SELECT DISTINCT a, MAX(b) FROM t1 WHERE a >= 0 GROUP BY a,a;
+
+eval EXPLAIN $query;
+eval $query;
+
+DROP TABLE t0, t1;
+
--echo # End of tests
diff --git a/mysql-test/t/information_schema_stats.test b/mysql-test/t/information_schema_stats.test
index 38248063d68..c7f39894ce7 100644
--- a/mysql-test/t/information_schema_stats.test
+++ b/mysql-test/t/information_schema_stats.test
@@ -13,6 +13,7 @@ alter table just_a_test add key IND_just_a_test_first_name_last_name(first_name,
alter table just_a_test add key IND_just_a_test_state(state);
select count(*) from just_a_test where first_name='fc' and last_name='lc';
select count(*) from just_a_test where state = 'California';
+--sorted_result
select * from information_schema.index_statistics where table_schema='test' and table_name='just_a_test';
select * from information_schema.table_statistics where table_schema='test' and table_name='just_a_test';
alter table just_a_test drop key IND_just_a_test_first_name_last_name;
@@ -36,6 +37,7 @@ insert into just_a_test values(1,'fa','la','china_a',11111111,'fa_la@163.com','C
select count(*) from just_a_test where first_name='fc' and last_name='lc';
select count(*) from just_a_test where state = 'California';
select count(*) from just_a_test where id between 2 and 4;
+--sorted_result
select * from information_schema.index_statistics where table_schema='test' and table_name='just_a_test';
select * from information_schema.table_statistics where table_schema='test' and table_name='just_a_test';
drop table just_a_test;
diff --git a/mysql-test/t/init_file.opt b/mysql-test/t/init_file.opt
index 825311dabf2..f6af01ee2c3 100644
--- a/mysql-test/t/init_file.opt
+++ b/mysql-test/t/init_file.opt
@@ -1 +1 @@
---init-file=$MYSQL_TEST_DIR/std_data/init_file.dat
+--init-file=$MYSQL_TEST_DIR/std_data/init_file.dat --log-bin=mariadb-bin
diff --git a/mysql-test/t/innodb_ext_key.test b/mysql-test/t/innodb_ext_key.test
index 9f3a89ff948..bf94b7dd3d5 100644
--- a/mysql-test/t/innodb_ext_key.test
+++ b/mysql-test/t/innodb_ext_key.test
@@ -693,5 +693,90 @@ drop table t1, t2;
set optimizer_switch=@save_optimizer_switch;
+--echo #
+--echo # MDEV-10325: Queries examines all rows of a tables when it should not
+--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 not null,
+ col1 varchar(32),
+ filler varchar(100),
+ key idx1(col1(10)),
+ primary key (pk)
+)engine=innodb;
+
+insert into t1
+select
+ A.a + 10*B.a + 100*C.a,
+ concat('1234567890-', 1000+ A.a + 10*B.a + 100*C.a),
+ repeat('filler-data-', 4)
+from
+ t0 A, t0 B, t0 C;
+
+let $q=explain select * from t1 where col1='1234567890-a';
+let $rows=query_get_value($q, rows, 1);
+if ($rows < 2)
+{
+ --echo The EXPLAIN should not produce a query plan with type=ref, rows=1
+ --die Fix for MDEV-10325 didnt work;
+}
+
+drop table t0,t1;
+
+--echo #
+--echo # MDEV-10360: Extended keys: index properties depend on index order
+--echo #
+create table t0 (a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+
+create table t1 (
+ index_id bigint(20) unsigned NOT NULL,
+ index_class varchar(265) COLLATE latin1_general_ci DEFAULT NULL ,
+ index_object_id int(10) unsigned NOT NULL DEFAULT '0' ,
+ index_date_updated int(10) unsigned DEFAULT NULL ,
+
+ PRIMARY KEY (index_id),
+ KEY object (index_class(181),index_object_id),
+ KEY index_date_updated (index_date_updated)
+) engine=innodb;
+
+create table t2 (
+ index_id bigint(20) unsigned NOT NULL,
+ index_class varchar(265) COLLATE latin1_general_ci DEFAULT NULL ,
+ index_object_id int(10) unsigned NOT NULL DEFAULT '0' ,
+ index_date_updated int(10) unsigned DEFAULT NULL ,
+
+ PRIMARY KEY (index_id),
+ KEY index_date_updated (index_date_updated),
+ KEY object (index_class(181),index_object_id)
+) engine=innodb;
+
+insert into t1 select
+ @a:=A.a + 10*B.a + 100*C.a,
+ concat('val-', @a),
+ 123456,
+ A.a + 10*B.a
+from
+ t0 A, t0 B, t0 C;
+
+insert into t2 select * from t1;
+
+--echo # This must have the same query plan as the query below it:
+--echo # type=range, key=index_date_updated, key_len=13
+--replace_column 9 #
+explain
+select * from t1 force index(index_date_updated)
+where index_date_updated= 10 and index_id < 800;
+
+--echo # This used to work from the start:
+--replace_column 9 #
+explain
+select * from t2 force index(index_date_updated)
+where index_date_updated= 10 and index_id < 800;
+
+drop table t0,t1,t2;
+
set optimizer_switch=@save_ext_key_optimizer_switch;
SET SESSION STORAGE_ENGINE=DEFAULT;
diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test
index 35243864c04..7e529194303 100644
--- a/mysql-test/t/loaddata.test
+++ b/mysql-test/t/loaddata.test
@@ -612,7 +612,7 @@ disconnect con1;
--echo #
CREATE TABLE t1(f1 INT);
-EVAL SELECT 0xE1BB30 INTO OUTFILE 't1.dat';
+EVAL SELECT 0xE1C330 INTO OUTFILE 't1.dat';
--disable_warnings
LOAD DATA INFILE 't1.dat' IGNORE INTO TABLE t1 CHARACTER SET utf8;
--enable_warnings
@@ -658,3 +658,27 @@ SET @@sql_mode= @old_mode;
--remove_file $MYSQLTEST_VARDIR/mysql
DROP TABLE t1;
+--echo
+--echo #
+--echo # Bug#23080148 - Backport of Bug#20683959.
+--echo # Bug#20683959 LOAD DATA INFILE IGNORES A SPECIFIC ROW SILENTLY
+--echo # UNDER DB CHARSET IS UTF8.
+--echo #
+
+CREATE DATABASE d1 CHARSET latin1;
+USE d1;
+CREATE TABLE t1 (val TEXT);
+LOAD DATA INFILE '../../std_data/bug20683959loaddata.txt' INTO TABLE t1;
+SELECT COUNT(*) FROM t1;
+SELECT HEX(val) FROM t1;
+
+CREATE DATABASE d2 CHARSET utf8;
+USE d2;
+CREATE TABLE t1 (val TEXT);
+LOAD DATA INFILE '../../std_data/bug20683959loaddata.txt' INTO TABLE t1;
+SELECT COUNT(*) FROM t1;
+SELECT HEX(val) FROM t1;
+
+DROP TABLE d1.t1, d2.t1;
+DROP DATABASE d1;
+DROP DATABASE d2;
diff --git a/mysql-test/t/myisam_enable_keys-10506.test b/mysql-test/t/myisam_enable_keys-10506.test
new file mode 100644
index 00000000000..8e1c058c3f0
--- /dev/null
+++ b/mysql-test/t/myisam_enable_keys-10506.test
@@ -0,0 +1,117 @@
+#
+# MDEV-10506 Protocol::end_statement(): Assertion `0' failed upon ALTER TABLE
+#
+CREATE TABLE t1 (
+ pk INT AUTO_INCREMENT,
+ i INT,
+ d DATE,
+ dt DATETIME,
+ v VARCHAR(1),
+ PRIMARY KEY (pk),
+ KEY (dt)
+) ENGINE=MyISAM;
+INSERT INTO t1 (i, d, dt, v) VALUES
+ (9, '2005-07-23', '2004-05-13 01:01:39', 't'),
+ (2, '2009-11-01', '2003-12-24 07:39:29', 'h'),
+ (6, NULL, '2008-07-03 05:32:22', 'l'),
+ (6, '2007-07-16', '2008-08-28 18:46:11', 'j'),
+ (5, NULL, '2001-07-12 21:27:00', 'h'),
+ (3, '2007-07-22', '1900-01-01 00:00:00', 'p'),
+ (2, '2000-11-21', '2007-05-25 11:58:54', 'g'),
+ (6, '1900-01-01', '2009-06-03 17:11:10', 'i'),
+ (2, '2008-02-10', '2001-06-15 16:20:07', 'p'),
+ (3, '2009-06-04', '1900-01-01 00:00:00', 'h'),
+ (9, '2007-04-25', '1900-01-01 00:00:00', 'e'),
+ (9, '2006-03-02', '1900-01-01 00:00:00', 'e'),
+ (1, '1900-01-01', '2002-11-08 09:33:27', 'u'),
+ (7, '2008-07-13', '2007-08-07 17:35:52', 'j'),
+ (0, '2004-11-12', '2006-05-01 00:00:00', 'e'),
+ (0, '1900-01-01', '2003-05-01 00:00:00', 'z'),
+ (1, '2009-09-02', '2007-02-12 09:30:49', 'w'),
+ (0, '2004-11-06', '1900-01-01 00:00:00', 't'),
+ (4, '2003-01-06', '2002-07-03 02:51:11', 'i'),
+ (6, '2006-01-14', '2008-02-26 04:57:32', 'i'),
+ (0, '2002-01-19', '2009-02-12 00:00:00', 'i'),
+ (8, '2007-02-12', '1900-01-01 00:00:00', 'b'),
+ (4, '1900-01-01', '2001-05-16 05:28:40', 'm'),
+ (2, '2005-07-16', NULL, 'j'),
+ (1, '2004-09-04', '2001-01-24 21:45:18', 'v'),
+ (3, '2009-07-01', NULL, NULL),
+ (2, '2009-07-21', '2002-07-24 00:00:00', 'h'),
+ (4, NULL, '2001-11-03 12:22:30', 'q'),
+ (1, '2002-06-22', '2008-06-17 03:17:59', 'f'),
+ (7, '2005-06-23', '2005-12-24 00:00:00', 'p'),
+ (6, '2001-05-20', '2008-10-23 00:00:00', NULL),
+ (3, '2001-10-01', '2000-10-12 16:32:35', 'o'),
+ (3, '2001-01-07', '2005-09-11 10:09:54', 'w'),
+ (6, '2007-11-02', '2009-09-10 01:44:18', 'l'),
+ (6, NULL, NULL, 'i'),
+ (9, NULL, '2002-05-18 15:21:55', 'd'),
+ (4, '2008-12-21', '2004-10-15 10:09:54', 'j'),
+ (6, '2003-10-05', '2009-07-13 03:51:02', 'e'),
+ (2, '2001-03-03', '1900-01-01 00:00:00', 'e'),
+ (2, '2007-04-04', '2001-11-08 21:14:52', 'q'),
+ (5, NULL, '2006-12-02 00:00:00', 'm'),
+ (0, '2009-01-04', '1900-01-01 00:00:00', NULL),
+ (8, '2008-04-03', '2005-01-01 11:55:18', 'q'),
+ (8, NULL, '2005-02-28 03:44:02', 'w'),
+ (0, '2003-08-22', NULL, 'c'),
+ (9, '1900-01-01', NULL, 'y'),
+ (NULL, NULL, '2006-08-25 16:28:09', 'g'),
+ (5, '2004-07-04', '2002-08-11 00:00:00', 'z'),
+ (1, '1900-01-01', '2007-07-22 21:19:18', 'm'),
+ (2, '2007-02-04', '2006-02-10 18:41:38', 't'),
+ (2, '1900-01-01', '2009-02-16 14:58:58', 'd'),
+ (7, '2001-03-14', '2007-08-14 00:00:00', 'h'),
+ (0, NULL, '1900-01-01 00:00:00', NULL),
+ (1, '2008-10-05', NULL, 'f'),
+ (6, '2001-11-25', '2008-12-03 06:59:23', 'l'),
+ (NULL, '2003-01-27', '2008-10-04 00:00:00', 'g'),
+ (8, '2008-08-08', '2009-07-07 07:00:21', 'v'),
+ (8, '2006-07-03', '2001-04-15 00:00:00', NULL),
+ (5, '2002-11-21', '2007-07-08 04:01:58', 'm'),
+ (5, '2006-04-08', '2007-09-23 00:01:35', 'i'),
+ (5, '2001-05-06', '2008-05-15 00:00:00', 'h'),
+ (7, '1900-01-01', '1900-01-01 00:00:00', 'u'),
+ (30, '2007-04-16', '2004-03-05 23:35:38', 'o'),
+ (NULL, '1900-01-01', '2007-08-25 01:32:47', 'z'),
+ (6, '2004-12-03', '1900-01-01 00:00:00', 'o'),
+ (8, '2001-06-23', '1900-01-01 00:00:00', 'f'),
+ (NULL, '2008-12-15', '2001-05-19 08:28:28', 'a'),
+ (9, '2000-02-15', '2009-09-03 06:07:22', 'd'),
+ (2, '2001-08-05', '2006-10-08 07:17:27', 'k'),
+ (5, '2004-01-17', '2003-09-06 20:36:01', 'd'),
+ (4, '2003-10-01', '2001-02-05 18:10:49', 'u'),
+ (4, '2003-07-28', '2001-01-07 16:11:37', 'h'),
+ (0, '1900-01-01', '2008-08-01 05:26:38', 'w'),
+ (9, '1900-01-01', '2001-05-08 00:00:00', 't'),
+ (1, '2000-04-17', '2008-07-10 21:26:28', 'i'),
+ (8, '2002-01-05', '2006-08-06 20:56:35', 'k'),
+ (9, '2001-04-10', '2003-02-17 00:00:00', 'z'),
+ (0, '2009-12-04', NULL, 'h'),
+ (7, NULL, '2004-10-27 00:29:57', 'h'),
+ (2, '2006-03-07', '2008-03-04 06:14:13', 'b'),
+ (0, '2001-10-15', '2001-03-17 00:00:00', 'm'),
+ (5, '1900-01-01', '2009-02-21 11:35:50', 'i'),
+ (4, NULL, '1900-01-01 00:00:00', 'w'),
+ (5, '2009-04-05', '1900-01-01 00:00:00', 'm'),
+ (6, '2001-03-19', '2001-04-12 00:00:00', 'q'),
+ (NULL, '2009-12-08', '2001-12-04 20:21:01', 'k'),
+ (2, '2005-02-09', '2001-05-27 08:41:01', 'l'),
+ (9, '2004-05-25', '2004-09-18 00:00:00', 'c'),
+ (3, '2005-01-17', '2002-09-12 11:18:48', 'd'),
+ (0, '2003-08-28', '1900-01-01 00:00:00', 'k'),
+ (6, '2006-10-11', '2003-10-28 03:31:02', 'a'),
+ (5, '1900-01-01', '2001-08-22 10:20:09', 'p'),
+ (8, '1900-01-01', '2008-04-24 00:00:00', 'o'),
+ (4, '2005-08-18', '2006-11-10 10:08:49', 'e'),
+ (NULL, '2007-03-12', '2007-10-16 00:00:00', 'n'),
+ (1, '2000-11-18', '2009-05-27 12:25:07', 't'),
+ (4, '2001-03-03', NULL, 'u'),
+ (3, '2003-09-11', '2001-09-10 18:10:10', 'f'),
+ (4, '2007-06-17', '1900-01-01 00:00:00', 't'),
+ (NULL, '2008-09-11', '2004-06-07 23:17:09', 'k');
+ALTER TABLE t1 ADD UNIQUE KEY ind1 (pk, d, i, v);
+--error ER_DUP_ENTRY
+ALTER TABLE t1 ADD UNIQUE KEY ind2 (d, v);
+DROP TABLE t1;
diff --git a/mysql-test/t/mysqlcheck.test b/mysql-test/t/mysqlcheck.test
index e479a2232f0..779ea8d13d4 100644
--- a/mysql-test/t/mysqlcheck.test
+++ b/mysql-test/t/mysqlcheck.test
@@ -309,15 +309,36 @@ CHECK TABLE bug47205 FOR UPGRADE;
DROP TABLE bug47205;
+
--echo #
--echo #MDEV-6128:[PATCH] mysqlcheck wrongly escapes '.' in table names
--echo #
-CREATE TABLE test.`t.1` (id int);
+create table `t.1` (id int);
+create view `v.1` as select 1;
--echo mysqlcheck test t.1
--exec $MYSQL_CHECK test t.1
+--echo mysqlcheck --all-in-1 test t.1
+--exec $MYSQL_CHECK --all-in-1 test t.1
+--echo mysqlcheck --all-in-1 --databases --process-views test
+--exec $MYSQL_CHECK --all-in-1 --databases --process-views test
+
+create table `t.2`(a varchar(20) primary key) default character set utf8 collate utf8_general_ci engine=innodb;
+flush table `t.2`;
+--remove_file $MYSQLD_DATADIR/test/t@002e2.frm
+--copy_file std_data/bug47205.frm $MYSQLD_DATADIR/test/t@002e2.frm
+
+--copy_file std_data/bug36055.frm $MYSQLD_DATADIR/test/t@002e3.frm
+--copy_file std_data/bug36055.MYD $MYSQLD_DATADIR/test/t@002e3.MYD
+--copy_file std_data/bug36055.MYI $MYSQLD_DATADIR/test/t@002e3.MYI
-drop table test.`t.1`;
+--echo mysqlcheck --check-upgrade --auto-repair test
+--exec $MYSQL_CHECK --check-upgrade --auto-repair test
+
+check table `t.1`, `t.2`, `t.3`;
+check table `t.1`, `t.2`, `t.3` for upgrade;
+drop view `v.1`;
+drop table test.`t.1`, `t.2`, `t.3`;
--echo #
--echo # MDEV-8123 mysqlcheck: new --process-views option conflicts with --quick, --extended and such
@@ -355,6 +376,28 @@ create table `#mysql50#t1``1` (a int) engine=myisam;
show tables;
drop table `t1``1`;
+#
+# MDEV-9440 mysqlcheck -A --auto-repair selects wrong database when trying to repair broken table
+#
+call mtr.add_suppression("ha_myisam");
+call mtr.add_suppression("Checking table");
+create database mysqltest1;
+create table mysqltest1.t1 (a int) engine=myisam;
+create table t2 (a int);
+
+let $datadir= `select @@datadir`;
+remove_file $datadir/mysqltest1/t1.MYD;
+write_file $datadir/mysqltest1/t1.MYD;
+foo
+EOF
+
+check table mysqltest1.t1;
+
+--exec $MYSQL_CHECK -A --auto-repair --fast
+
+drop table t2;
+drop database mysqltest1;
+
--echo #
--echo #MDEV-7384 [PATCH] add PERSISENT FOR ALL option to mysqlanalyze/mysqlcheck
--echo #
diff --git a/mysql-test/t/named_pipe.test b/mysql-test/t/named_pipe.test
index 8dcab3329e4..af74c200e96 100644
--- a/mysql-test/t/named_pipe.test
+++ b/mysql-test/t/named_pipe.test
@@ -22,3 +22,12 @@ connect(pipe_con,localhost,root,,,,,PIPE);
connection default;
disconnect pipe_con;
+
+# MDEV-10383 : check that other server cannot 'bind' on the same pipe
+let $MYSQLD_DATADIR= `select @@datadir`;
+--error 1
+--exec $MYSQLD_CMD --enable-named-pipe --skip-networking --log-error=second-mysqld.err
+let SEARCH_FILE=$MYSQLD_DATADIR/second-mysqld.err;
+let SEARCH_RANGE= -50;
+let SEARCH_PATTERN=\[ERROR\] Create named pipe failed;
+source include/search_pattern_in_file.inc;
diff --git a/mysql-test/t/openssl_1.test b/mysql-test/t/openssl_1.test
index 837206e2717..eea74b5b012 100644
--- a/mysql-test/t/openssl_1.test
+++ b/mysql-test/t/openssl_1.test
@@ -134,8 +134,7 @@ drop table t1;
# verification of servers certificate by setting both ca certificate
# and ca path to NULL
#
---replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA DHE-RSA-CHACHA20-POLY1305 DHE-RSA-AES256-SHA
---exec $MYSQL --ssl --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem -e "SHOW STATUS LIKE 'ssl_Cipher'" 2>&1
+--exec $MYSQL --ssl --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem -e "SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher'" 2>&1
--echo End of 5.0 tests
#
@@ -259,8 +258,7 @@ select 'is still running; no cipher request crashed the server' as result from d
GRANT SELECT ON test.* TO bug42158@localhost REQUIRE X509;
FLUSH PRIVILEGES;
connect(con1,localhost,bug42158,,,,,SSL);
---replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA DHE-RSA-CHACHA20-POLY1305 DHE-RSA-AES256-SHA
-SHOW STATUS LIKE 'Ssl_cipher';
+SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
disconnect con1;
connection default;
DROP USER bug42158@localhost;
diff --git a/mysql-test/t/parser.test b/mysql-test/t/parser.test
index 90b0fb11648..5970b564c85 100644
--- a/mysql-test/t/parser.test
+++ b/mysql-test/t/parser.test
@@ -1263,3 +1263,51 @@ SELECT a FROM t1 GROUP BY a WITH ROLLUP UNION SELECT 1 ORDER BY a LIMIT 1;
SELECT 1 AS a UNION (SELECT a FROM t1 GROUP BY a WITH ROLLUP LIMIT 2);
(SELECT a FROM t1 GROUP BY a WITH ROLLUP LIMIT 2) UNION SELECT 1;
DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-10779 Failing assertion lex->proc_list.elements == 0 or syntax error on PROCEDURE ANALYSE in UNION
+--echo #
+
+CREATE TABLE t1 (i INT);
+--error ER_WRONG_USAGE
+(SELECT * FROM t1 PROCEDURE ANALYSE(10, 10))
+UNION
+(SELECT * FROM t1 PROCEDURE ANALYSE(10, 10));
+
+--error ER_WRONG_USAGE
+(SELECT * FROM t1 PROCEDURE ANALYSE(10, 10))
+UNION
+SELECT * FROM t1 PROCEDURE ANALYSE(10, 10);
+
+--error ER_WRONG_USAGE
+(SELECT * FROM t1 PROCEDURE ANALYSE(10, 10))
+UNION
+(SELECT 1);
+
+--error ER_WRONG_USAGE
+(SELECT * FROM t1 PROCEDURE ANALYSE(10, 10))
+UNION
+SELECT 1;
+
+--error ER_PARSE_ERROR
+SELECT * FROM t1 PROCEDURE ANALYSE(10, 10)
+UNION
+(SELECT * FROM t1 PROCEDURE ANALYSE(10, 10));
+
+--error ER_PARSE_ERROR
+SELECT * FROM t1 PROCEDURE ANALYSE(10, 10)
+UNION
+SELECT * FROM t1 PROCEDURE ANALYSE(10, 10);
+
+--error ER_PARSE_ERROR
+SELECT * FROM t1 PROCEDURE ANALYSE(10, 10)
+UNION
+(SELECT 1);
+
+--error ER_PARSE_ERROR
+SELECT * FROM t1 PROCEDURE ANALYSE(10, 10)
+UNION
+SELECT 1;
+
+DROP TABLE t1;
diff --git a/mysql-test/t/partition_default.test b/mysql-test/t/partition_default.test
new file mode 100644
index 00000000000..1110b311c29
--- /dev/null
+++ b/mysql-test/t/partition_default.test
@@ -0,0 +1,522 @@
+
+--source include/have_partition.inc
+
+#
+# expression lists
+#
+create table t1 (a int, b int)
+ PARTITION BY LIST (a)
+ (
+ PARTITION p2 VALUES IN (4,5,6),
+ PARTITION p1 VALUES IN (1)
+ )
+;
+--error ER_NO_PARTITION_FOR_GIVEN_VALUE
+insert into t1 values (10,10);
+drop table t1;
+create table t1 (a int, b int)
+ PARTITION BY LIST (a)
+ (
+ PARTITION p2 VALUES IN (4,5,6),
+ PARTITION p1 VALUES IN (1),
+ PARTITION p0 DEFAULT
+ )
+;
+show create table t1;
+insert into t1 values (10,10);
+insert into t1 values (4,4);
+select * from t1;
+--sorted_result
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+drop table t1;
+
+--error ER_PARTITION_DEFAULT_ERROR
+create table t1 (a int, b int)
+ PARTITION BY LIST (a)
+ (
+ PARTITION p2 VALUES IN (4,5,6),
+ PARTITION p1 VALUES IN (1),
+ PARTITION p0 DEFAULT,
+ PARTITION p3 DEFAULT
+ )
+;
+--error ER_PARTITION_DEFAULT_ERROR
+create table t1 (a int, b int)
+ PARTITION BY LIST (a)
+ (
+ PARTITION p0 DEFAULT,
+ PARTITION p2 VALUES IN (4,5,6),
+ PARTITION p1 VALUES IN (1),
+ PARTITION p3 DEFAULT
+ )
+;
+
+create table t1 (a int, b int)
+ PARTITION BY LIST (a)
+ (
+ PARTITION p0 DEFAULT,
+ PARTITION p2 VALUES IN (4,5,6),
+ PARTITION p1 VALUES IN (1)
+ )
+;
+show create table t1;
+insert into t1 values (10,10);
+select * from t1;
+--sorted_result
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+drop table t1;
+
+#
+# Default has its value as 0 check that they are not clash.
+#
+create table t1 (a int, b int)
+ PARTITION BY LIST (a)
+ (
+ PARTITION p0 DEFAULT,
+ PARTITION p2 VALUES IN (4,5,6),
+ PARTITION p1 VALUES IN (1, 0)
+ )
+;
+show create table t1;
+insert into t1 values (10,10);
+select * from t1;
+--sorted_result
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+drop table t1;
+
+#
+# columns lists
+#
+create table t1 (a int, b int)
+ PARTITION BY LIST COLUMNS(a,b)
+ (
+ PARTITION p2 VALUES IN ((1,4),(2,5),(3,6)),
+ PARTITION p1 VALUES IN ((1,1),(0,0)),
+ PARTITION p0 DEFAULT
+ )
+;
+show create table t1;
+insert into t1 values (10,10);
+select * from t1;
+--sorted_result
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+drop table t1;
+
+--error ER_PARTITION_DEFAULT_ERROR
+create table t1 (a int, b int)
+ PARTITION BY LIST COLUMNS(a,b)
+ (
+ PARTITION p2 VALUES IN ((1,4),(2,5),(3,6)),
+ PARTITION p1 VALUES IN ((1,1),(0,0)),
+ PARTITION p0 DEFAULT,
+ PARTITION p3 DEFAULT
+ )
+;
+
+--error ER_PARTITION_DEFAULT_ERROR
+create table t1 (a int, b int)
+ PARTITION BY LIST COLUMNS(a,b)
+ (
+ PARTITION p0 DEFAULT,
+ PARTITION p2 VALUES IN ((1,4),(2,5),(3,6)),
+ PARTITION p1 VALUES IN ((1,1),(0,0)),
+ PARTITION p3 DEFAULT
+ )
+;
+
+#
+# partititon prunning test
+#
+
+create table t1 (a int, b int)
+ PARTITION BY LIST (a)
+ (
+ PARTITION p2 VALUES IN (4,5,6),
+ PARTITION p1 VALUES IN (1,20),
+ PARTITION p0 default
+ )
+;
+show create table t1;
+insert into t1 values (10,10);
+--sorted_result
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+select * from t1 where a=10;
+select * from t1 where a<=10;
+select * from t1 where a<=20;
+select * from t1 where a>=10;
+select * from t1 where a>=5;
+insert into t1 values (20,20),(5,5);
+--sorted_result
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+select * from t1 where a=10;
+select * from t1 where a<=10;
+select * from t1 where a<=20;
+select * from t1 where a>=10;
+select * from t1 where a>=5;
+explain partitions select * from t1 where a=10;
+explain partitions select * from t1 where a=5;
+select * from t1 where a=10 or a=5;
+explain partitions select * from t1 where a=10 or a=5;
+
+drop table t1;
+
+create table t1 (a int, b int)
+ PARTITION BY LIST COLUMNS(a,b)
+ (
+ PARTITION p2 VALUES IN ((1,4),(2,5),(3,6),(5,5)),
+ PARTITION p1 VALUES IN ((1,1),(20,20)),
+ PARTITION p0 DEFAULT
+ )
+;
+show create table t1;
+insert into t1 values (10,10);
+--sorted_result
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+select * from t1 where a=10 and b=10;
+explain partitions select * from t1 where a=10 and b=10;
+select * from t1 where a=10;
+explain partitions select * from t1 where a=10;
+select * from t1 where a<=10;
+select * from t1 where a>=10;
+insert into t1 values (20,20),(5,5);
+--sorted_result
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+select * from t1 where a=10 and b=10;
+explain partitions select * from t1 where a=10 and b=10;
+select * from t1 where a=10 and b=10 or a=20 and b=20;
+explain partitions select * from t1 where a=10 and b=10 or a=20 and b=20;
+drop table t1;
+
+#
+# partition pruning with expressions
+#
+create table t1 (a int, b int);
+
+insert into t1 values (10,10),(2,5),(0,0);
+
+select * from t1;
+
+alter table t1
+ PARTITION BY LIST (a+b)
+ (
+ PARTITION p2 VALUES IN (1,2,3,7),
+ PARTITION p1 VALUES IN (21,0),
+ PARTITION p0 DEFAULT
+ )
+;
+show create table t1;
+select * from t1;
+explain partitions select * from t1 where a=2 and b=5;
+explain partitions select * from t1 where a=10 and b=10;
+drop table t1;
+
+create table t1 (a int, b int);
+
+insert into t1 values (10,10),(2,5),(0,0);
+
+select * from t1;
+
+alter table t1
+ PARTITION BY LIST (a+5)
+ (
+ PARTITION p2 VALUES IN (1,2,3,7),
+ PARTITION p1 VALUES IN (0),
+ PARTITION p0 DEFAULT
+ )
+;
+show create table t1;
+select * from t1;
+--sorted_result
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+explain partitions select * from t1 where a>=2;
+explain partitions select * from t1 where a>=2 and a<=3;
+explain partitions select * from t1 where a=10;
+drop table t1;
+
+
+
+CREATE TABLE t1 (a DATE, KEY(a))
+PARTITION BY LIST (TO_DAYS(a))
+(PARTITION `pDEF` DEFAULT,
+ PARTITION `p2001-01-01` VALUES IN (TO_DAYS('2001-01-01')),
+ PARTITION `pNULL` VALUES IN (NULL),
+ PARTITION `p0000-01-02` VALUES IN (TO_DAYS('0000-01-02')),
+ PARTITION `p1001-01-01` VALUES IN (TO_DAYS('1001-01-01')));
+if ($verify_without_partitions)
+{
+ALTER TABLE t1 REMOVE PARTITIONING;
+}
+INSERT INTO t1 VALUES ('0000-00-00'), ('0000-01-02'), ('0001-01-01'),
+ ('1001-00-00'), ('1001-01-01'), ('1002-00-00'), ('2001-01-01');
+--source include/partition_date_range.inc
+--echo # test without index
+ALTER TABLE t1 DROP KEY a;
+--source include/partition_date_range.inc
+DROP TABLE t1;
+--echo # TO_SECONDS, test of LIST and index
+CREATE TABLE t1 (a DATE, KEY(a))
+PARTITION BY LIST (TO_SECONDS(a))
+(PARTITION `pDEF` DEFAULT,
+ PARTITION `p2001-01-01` VALUES IN (TO_SECONDS('2001-01-01')),
+ PARTITION `pNULL` VALUES IN (NULL),
+ PARTITION `p0000-01-02` VALUES IN (TO_SECONDS('0000-01-02')),
+ PARTITION `p1001-01-01` VALUES IN (TO_SECONDS('1001-01-01')));
+if ($verify_without_partitions)
+{
+ALTER TABLE t1 REMOVE PARTITIONING;
+}
+INSERT INTO t1 VALUES ('0000-00-00'), ('0000-01-02'), ('0001-01-01'),
+ ('1001-00-00'), ('1001-01-01'), ('1002-00-00'), ('2001-01-01');
+--source include/partition_date_range.inc
+--echo # test without index
+ALTER TABLE t1 DROP KEY a;
+--source include/partition_date_range.inc
+DROP TABLE t1;
+
+#
+# ALTER TABLE test
+#
+
+create table t1 (a int, b int);
+
+insert into t1 values (10,10),(2,5),(0,0);
+
+select * from t1;
+
+alter table t1
+ PARTITION BY LIST (a)
+ (
+ PARTITION p2 VALUES IN (1,2,3),
+ PARTITION p1 VALUES IN (20,0),
+ PARTITION p0 DEFAULT
+ )
+;
+show create table t1;
+select * from t1;
+--sorted_result
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+explain partitions select * from t1 where a=2 and b=5;
+explain partitions select * from t1 where a=10 and b=10;
+alter table t1
+ PARTITION BY LIST (a)
+ (
+ PARTITION p2 VALUES IN (1,2,3),
+ PARTITION p1 VALUES IN (20,0),
+ PARTITION p0 VALUES IN (10)
+ )
+;
+show create table t1;
+select * from t1;
+--sorted_result
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+explain partitions select * from t1 where a=2 and b=5;
+explain partitions select * from t1 where a=10 and b=10;
+alter table t1
+ PARTITION BY LIST (a)
+ (
+ PARTITION p2 DEFAULT,
+ PARTITION p1 VALUES IN (20,0),
+ PARTITION p0 VALUES IN (10)
+ )
+;
+show create table t1;
+select * from t1;
+--sorted_result
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+explain partitions select * from t1 where a=2 and b=5;
+explain partitions select * from t1 where a=10 and b=10;
+
+--error ER_NO_PARTITION_FOR_GIVEN_VALUE
+alter table t1 drop partition p2;
+delete from t1 where a=2;
+alter table t1 drop partition p2;
+show create table t1;
+select * from t1;
+--sorted_result
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+
+alter table t1 add partition (PARTITION pd DEFAULT);
+show create table t1;
+--error ER_PARTITION_DEFAULT_ERROR
+alter table t1 add partition (PARTITION pdd DEFAULT);
+alter table t1 drop partition pd;
+--error ER_PARTITION_DEFAULT_ERROR
+alter table t1 add partition (PARTITION pdd DEFAULT,
+ PARTITION pd DEFAULT);
+
+drop table t1;
+
+create table t1 (a int, b int);
+
+insert into t1 values (10,10),(2,5),(0,0);
+
+select * from t1;
+
+alter table t1
+ PARTITION BY LIST COLUMNS(a,b)
+ (
+ PARTITION p2 VALUES IN ((1,4),(2,5),(3,6)),
+ PARTITION p1 VALUES IN ((1,1),(0,0)),
+ PARTITION p0 DEFAULT
+ )
+;
+show create table t1;
+select * from t1;
+--sorted_result
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+explain partitions select * from t1 where a=2 and b=5;
+explain partitions select * from t1 where a=10 and b=10;
+alter table t1
+ PARTITION BY LIST COLUMNS(a,b)
+ (
+ PARTITION p2 VALUES IN ((1,4),(2,5),(3,6)),
+ PARTITION p1 VALUES IN ((1,1),(0,0)),
+ PARTITION p0 VALUES IN ((10,10))
+ )
+;
+show create table t1;
+select * from t1;
+--sorted_result
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+explain partitions select * from t1 where a=2 and b=5;
+explain partitions select * from t1 where a=10 and b=10;
+alter table t1
+ PARTITION BY LIST COLUMNS(a,b)
+ (
+ PARTITION p2 DEFAULT,
+ PARTITION p1 VALUES IN ((1,1),(0,0)),
+ PARTITION p0 VALUES IN ((10,10))
+ )
+;
+show create table t1;
+select * from t1;
+--sorted_result
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+explain partitions select * from t1 where a=2 and b=5;
+explain partitions select * from t1 where a=10 and b=10;
+
+--error ER_NO_PARTITION_FOR_GIVEN_VALUE
+alter table t1 drop partition p2;
+delete from t1 where a=2;
+alter table t1 drop partition p2;
+show create table t1;
+select * from t1;
+--sorted_result
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+
+alter table t1 add partition (PARTITION pd DEFAULT);
+show create table t1;
+--error ER_PARTITION_DEFAULT_ERROR
+alter table t1 add partition (PARTITION pdd DEFAULT);
+alter table t1 drop partition pd;
+--error ER_PARTITION_DEFAULT_ERROR
+alter table t1 add partition (PARTITION pdd DEFAULT,
+ PARTITION pd DEFAULT);
+drop table t1;
+
+
+#
+# Problem of reorganizing DEFAULT partition
+#
+create table t1 (a int)
+ PARTITION BY LIST (a)
+ (
+ PARTITION p2 VALUES IN (4,5,6),
+ PARTITION p1 VALUES IN (1),
+ PARTITION pd DEFAULT
+ )
+;
+insert into t1 values (1),(2),(3),(4);
+--sorted_result
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+
+alter table t1 add partition
+ (partition p0 VALUES IN (2,3));
+
+--sorted_result
+select partition_name, table_rows from INFORMATION_SCHEMA.PARTITIONS where table_name='t1';
+
+drop table t1;
+
+#
+# Check that first DEFAULT works in LIST COLUMN
+#
+create table t1 (a int, b int)
+ PARTITION BY LIST COLUMNS(a,b)
+ (
+ PARTITION p0 DEFAULT,
+ PARTITION p2 VALUES IN ((1,4),(2,5),(3,6)),
+ PARTITION p1 VALUES IN ((1,1),(0,0))
+ )
+;
+
+show create table t1;
+
+drop table t1;
+
+--echo #
+--echo # MDEV-10765: Wrong result - query does not retrieve values from
+--echo # default partition on a table partitioned by list columns
+--echo #
+
+create table t1 (i int, j int) partition by list columns(i,j) (partition p1 values in ((10,10)), partition p2 default);
+insert into t1 values (10,1);
+select * from t1 where i = 10;
+explain partitions
+select * from t1 where i = 10;
+select * from t1 where i = 10 and j=1;
+explain partitions
+select * from t1 where i = 10 and j=1;
+insert into t1 values (10,10);
+select * from t1 where i = 10 and j=10;
+explain partitions
+select * from t1 where i = 10 and j=10;
+drop table t1;
+
+create table t1
+(
+ a int not null,
+ b int not null,
+ c int
+)
+partition by list columns(a,b)
+(
+ partition p1 values in ((10,10)),
+ partition p2 values in ((10,20)),
+ partition p3 values in ((10,30)),
+ partition p4 values in ((10,40)),
+ partition p5 values in ((10,50))
+);
+
+insert into t1 values
+ (10,10,1234),
+ (10,20,1234),
+ (10,30,1234),
+ (10,40,1234),
+ (10,50,1234);
+
+explain partitions
+select * from t1
+where a>=10 and (a <=10 and b <=30);
+drop table t1;
+
+--echo #
+--echo # MDEV-10763: Wrong result - server does not return NULL values
+--echo # from default list partition after ALTER table
+--echo #
+create table t1 (i int) partition by list (i) ( partition p1 default);
+insert into t1 values (null);
+select * from t1 where i is null;
+alter table t1 partition by list (i) ( partition p1 values in (1), partition p2 default);
+select * from t1 where i is null;
+explain partitions
+select * from t1 where i is null;
+alter table t1 partition by list (i) (
+ partition p0 values in (NULL),
+ partition p1 values in (1),
+ partition p2 default);
+select * from t1 where i is null;
+explain partitions
+select * from t1 where i is null;
+
+drop table t1;
diff --git a/mysql-test/t/ps_1general.test b/mysql-test/t/ps_1general.test
index 5fedc787e01..9dfab0f07ba 100644
--- a/mysql-test/t/ps_1general.test
+++ b/mysql-test/t/ps_1general.test
@@ -935,3 +935,10 @@ drop table t1;
# Matthias
# End of 4.1 tests
+
+#
+# MDEV-10318 unset params in --ps --embedded
+#
+--error ER_PARSE_ERROR,2031
+select ?+1;
+
diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test
index 7f0e063124e..30f4419bd7e 100644
--- a/mysql-test/t/range.test
+++ b/mysql-test/t/range.test
@@ -1691,6 +1691,35 @@ select a, b from t2 where (a, b) in ((0, 0), (1, 1));
drop table t2;
--echo #
+--echo # MDEV-10228: Delete missing rows with OR conditions
+--echo # (The example uses UPDATE, because UPDATE allows to use index hints
+--echo # and so it's possible to make an example that works with any storage
+--echo # engine)
+--echo #
+
+CREATE TABLE t1 (
+ key1varchar varchar(14) NOT NULL,
+ key2int int(11) NOT NULL DEFAULT '0',
+ col1 int,
+ PRIMARY KEY (key1varchar,key2int),
+ KEY key1varchar (key1varchar),
+ KEY key2int (key2int)
+) DEFAULT CHARSET=utf8;
+
+insert into t1 values
+ ('value1',0, 0),
+ ('value1',1, 0),
+ ('value1',1000685, 0),
+ ('value1',1003560, 0),
+ ('value1',1004807, 0);
+
+update t1 force index (PRIMARY) set col1=12345
+where (key1varchar='value1' AND (key2int <=1 OR key2int > 1));
+--echo # The following must show col1=12345 for all rows:
+select * from t1;
+drop table t1;
+
+--echo #
--echo # BUG#13731380: RANGE OPTIMIZER CALLS RECORDS_IN_RANGE() FOR OPEN RANGE
--echo #
diff --git a/mysql-test/t/reopen_temp_table.test b/mysql-test/t/reopen_temp_table.test
index 98de983777d..2aa6caa1655 100644
--- a/mysql-test/t/reopen_temp_table.test
+++ b/mysql-test/t/reopen_temp_table.test
@@ -159,5 +159,26 @@ SELECT COUNT(*)=6 FROM t5;
SELECT COUNT(*)=4 FROM t6;
DROP TABLE t5, t6;
+--echo #
+--echo # MDEV-10216: Assertion `strcmp(share->unique_file_name,filename) ||
+--echo # share->last_version' failed in myisam/mi_open.c:67: test_if_reopen
+--echo #
+CREATE TEMPORARY TABLE t7 (i INT) ENGINE=MYISAM;
+INSERT INTO t7 VALUES(1);
+ALTER TABLE t7 RENAME TO t;
+SELECT * FROM t a, t b;
+DROP TABLE t;
+
+CREATE TEMPORARY TABLE t7 (i INT) ENGINE=ARIA;
+INSERT INTO t7 VALUES(1);
+ALTER TABLE t7 RENAME TO t;
+SELECT * FROM t a, t b;
+DROP TABLE t;
+
+CREATE TEMPORARY TABLE t8 (i INT) ENGINE=ARIA;
+ALTER TABLE t8 rename to t;
+SELECT (SELECT 1 FROM t a1, t a2 ) AS f1, ( SELECT 2 FROM t a3 ) AS f2 FROM DUAL;
+DROP TABLE t;
+
--echo # Cleanup
DROP DATABASE temp_db;
diff --git a/mysql-test/t/sp-prelocking.test b/mysql-test/t/sp-prelocking.test
index 966c59a5789..c1378d59196 100644
--- a/mysql-test/t/sp-prelocking.test
+++ b/mysql-test/t/sp-prelocking.test
@@ -388,3 +388,29 @@ DROP TABLE t1, t2;
--echo End of 5.0 tests
+--echo #
+--echo # Bug#21142859: FUNCTION UPDATING A VIEW FAILS TO FIND TABLE THAT ACTUALLY EXISTS
+--echo #
+
+CREATE TABLE t1 SELECT 1 AS fld1, 'A' AS fld2;
+CREATE TABLE t2 (fld3 INT, fld4 CHAR(1));
+
+CREATE VIEW v1 AS SELECT * FROM t1;
+
+CREATE TRIGGER t1_au AFTER UPDATE ON t1
+FOR EACH ROW INSERT INTO t2 VALUES (new.fld1, new.fld2);
+
+DELIMITER !;
+CREATE FUNCTION f1() RETURNS INT
+BEGIN
+ UPDATE v1 SET fld2='B' WHERE fld1=1;
+ RETURN row_count();
+END !
+DELIMITER ;!
+
+--echo # Without the patch, an error was getting reported.
+SELECT f1();
+
+DROP FUNCTION f1;
+DROP VIEW v1;
+DROP TABLE t1,t2;
diff --git a/mysql-test/t/ssl.test b/mysql-test/t/ssl.test
index 88766e7cf39..9a08b273b6b 100644
--- a/mysql-test/t/ssl.test
+++ b/mysql-test/t/ssl.test
@@ -11,8 +11,7 @@
connect (ssl_con,localhost,root,,,,,SSL);
# Check ssl turned on
---replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA DHE-RSA-CHACHA20-POLY1305 DHE-RSA-AES256-SHA
-SHOW STATUS LIKE 'Ssl_cipher';
+SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
# Check ssl expiration
SHOW STATUS LIKE 'Ssl_server_not_before';
@@ -22,8 +21,7 @@ SHOW STATUS LIKE 'Ssl_server_not_after';
-- source include/common-tests.inc
# Check ssl turned on
---replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA DHE-RSA-CHACHA20-POLY1305 DHE-RSA-AES256-SHA
-SHOW STATUS LIKE 'Ssl_cipher';
+SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
#
# MDEV-7697 Client reports ERROR 2006 (MySQL server has gone away) or ERROR 2013 (Lost connection to MySQL server during query) while executing AES* functions under SSL
diff --git a/mysql-test/t/ssl_ca.test b/mysql-test/t/ssl_ca.test
index 8e81f44e61c..8d830a75879 100644
--- a/mysql-test/t/ssl_ca.test
+++ b/mysql-test/t/ssl_ca.test
@@ -7,11 +7,10 @@
--echo # try to connect with wrong '--ssl-ca' path : should fail
--error 1
---exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/wrong-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_cipher'" 2>&1
+--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/wrong-cacert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test -e "SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher'" 2>&1
--echo # try to connect with correct '--ssl-ca' path : should connect
---replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA
---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_cipher'"
+--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 "SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher'"
--echo #
--echo # Bug#21920678: SSL-CA DOES NOT ACCEPT ~USER TILDE HOME DIRECTORY
@@ -22,15 +21,12 @@
--echo # try to connect with '--ssl-ca' option using tilde home directoy
--echo # path substitution : should connect
---replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA
---exec $MYSQL --ssl-ca$mysql_test_dir_path/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_cipher'"
+--exec $MYSQL --ssl-ca$mysql_test_dir_path/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 "SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher'"
--echo # try to connect with '--ssl-key' option using tilde home directoy
--echo # path substitution : should connect
---replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA
---exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-key$mysql_test_dir_path/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test -e "SHOW STATUS LIKE 'Ssl_cipher'"
+--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-key$mysql_test_dir_path/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test -e "SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher'"
--echo # try to connect with '--ssl-cert' option using tilde home directoy
--echo # path substitution : should connect
---replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA
---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_path/std_data/client-cert.pem test -e "SHOW STATUS LIKE 'Ssl_cipher'"
+--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_path/std_data/client-cert.pem test -e "SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher'"
diff --git a/mysql-test/t/ssl_compress.test b/mysql-test/t/ssl_compress.test
index 28f3453c23e..588d4555db8 100644
--- a/mysql-test/t/ssl_compress.test
+++ b/mysql-test/t/ssl_compress.test
@@ -11,8 +11,7 @@
connect (ssl_compress_con,localhost,root,,,,,SSL COMPRESS);
# Check ssl turned on
---replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA DHE-RSA-CHACHA20-POLY1305 DHE-RSA-AES256-SHA
-SHOW STATUS LIKE 'Ssl_cipher';
+SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
# Check compression turned on
SHOW STATUS LIKE 'Compression';
@@ -21,8 +20,7 @@ SHOW STATUS LIKE 'Compression';
-- source include/common-tests.inc
# Check ssl turned on
---replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA DHE-RSA-CHACHA20-POLY1305 DHE-RSA-AES256-SHA
-SHOW STATUS LIKE 'Ssl_cipher';
+SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
# Check compression turned on
SHOW STATUS LIKE 'Compression';
diff --git a/mysql-test/t/ssl_timeout.test b/mysql-test/t/ssl_timeout.test
index 806b928aca0..430fe7130de 100644
--- a/mysql-test/t/ssl_timeout.test
+++ b/mysql-test/t/ssl_timeout.test
@@ -7,8 +7,7 @@
connect (ssl_con,localhost,root,,,,,SSL read_timeout=5);
--echo # Check ssl turned on
---replace_result DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES256-SHA DHE-RSA-CHACHA20-POLY1305 DHE-RSA-AES256-SHA
-SHOW STATUS LIKE 'Ssl_cipher';
+SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';
# --error CR_SERVER_LOST
--error 2013
diff --git a/mysql-test/t/stat_tables_innodb_debug.test b/mysql-test/t/stat_tables_innodb_debug.test
new file mode 100644
index 00000000000..f3652fc2312
--- /dev/null
+++ b/mysql-test/t/stat_tables_innodb_debug.test
@@ -0,0 +1,36 @@
+--source include/have_innodb.inc
+--source include/have_sequence.inc
+--source include/have_stat_tables.inc
+--source include/have_debug_sync.inc
+--source include/not_embedded.inc
+
+--echo #
+--echo # MDEV-7901: re-implement analyze table for low impact
+--echo #
+
+create table t1 (a int, b int, c int, key IDX1(a), key IDX2(a,b)) engine=innodb;
+insert into t1 select seq/10, seq/2, seq from seq_0_to_9;
+
+
+SET DEBUG_SYNC='statistics_collection_start1 SIGNAL analyzing WAIT_FOR written';
+
+send analyze table t1 persistent for all;
+connect (con1, localhost, root,,);
+--connection con1
+
+SET DEBUG_SYNC= 'now WAIT_FOR analyzing';
+
+select count(*) from t1;
+# insert will work even with MyISAM because it allow to append file
+insert into t1 values (333,333,333);
+# but update now hang for MyISAM bacause can't get lock (InnoDB/XtraDB works)
+update t1 set a=1;
+
+SET DEBUG_SYNC= 'now SIGNAL written';
+
+--connection default
+--reap
+select count(*) from t1;
+
+set debug_sync='RESET';
+drop table t1;
diff --git a/mysql-test/t/stat_tables_myisam_debug.test b/mysql-test/t/stat_tables_myisam_debug.test
new file mode 100644
index 00000000000..e8ef44325b9
--- /dev/null
+++ b/mysql-test/t/stat_tables_myisam_debug.test
@@ -0,0 +1,33 @@
+--source include/have_sequence.inc
+--source include/have_stat_tables.inc
+--source include/have_debug_sync.inc
+--source include/not_embedded.inc
+
+--echo #
+--echo # MDEV-7901: re-implement analyze table for low impact
+--echo #
+
+create table t1 (a int, b int, c int, key IDX1(a), key IDX2(a,b)) engine=myisam;
+insert into t1 select seq/10, seq/2, seq from seq_0_to_9;
+
+
+SET DEBUG_SYNC='statistics_collection_start1 SIGNAL analyzing WAIT_FOR written';
+
+send analyze table t1 persistent for all;
+connect (con1, localhost, root,,);
+--connection con1
+
+SET DEBUG_SYNC= 'now WAIT_FOR analyzing';
+
+select count(*) from t1;
+# insert will work even with MyISAM because it allow to append file
+insert into t1 values (333,333,333);
+
+SET DEBUG_SYNC= 'now SIGNAL written';
+
+--connection default
+--reap
+select count(*) from t1;
+
+set debug_sync='RESET';
+drop table t1;
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test
index 67af426f5fe..aaecaf020a0 100644
--- a/mysql-test/t/subselect.test
+++ b/mysql-test/t/subselect.test
@@ -6009,5 +6009,22 @@ SET NAMES utf8;
CREATE TABLE t1 (f VARCHAR(8)) ENGINE=MyISAM;
INSERT INTO t1 VALUES ('foo');
SELECT f FROM t1 WHERE f > ALL ( SELECT 'bar' UNION SELECT 'baz' );
+SELECT f FROM t1 WHERE f > ALL ( SELECT 'bar');
drop table t1;
SET NAMES default;
+
+--echo #
+--echo # MDEV-10045: Server crashes in Time_and_counter_tracker::incr_loops
+--echo #
+SET NAMES utf8;
+
+CREATE TABLE t1 (f1 VARCHAR(3), f2 INT UNSIGNED) ENGINE=MyISAM;
+CREATE TABLE t2 (f3 INT) ENGINE=MyISAM;
+
+SELECT * FROM t1, t2 WHERE f3 = f2 AND f1 > ANY ( SELECT 'foo' UNION SELECT 'bar' );
+SELECT * FROM t1, t2 WHERE f3 = f2 AND f1 > ANY ( SELECT 'foo');
+
+DROP TABLE t1, t2;
+SET NAMES default;
+
+--echo End of 10.1 tests
diff --git a/mysql-test/t/subselect_sj_mat.test b/mysql-test/t/subselect_sj_mat.test
index d2bafa86028..559b380a7dc 100644
--- a/mysql-test/t/subselect_sj_mat.test
+++ b/mysql-test/t/subselect_sj_mat.test
@@ -1925,3 +1925,15 @@ EXECUTE stmt;
DROP TABLE t1,t2,t3;
+--echo #
+--echo # MDEV-10389: Query returns different results on a debug vs non-debug build of the same revision
+--echo #
+CREATE TABLE t1 (i1 INT, i2 INT NOT NULL);
+INSERT INTO t1 VALUES (1,4),(2,6);
+
+SELECT * FROM t1 AS alias1
+WHERE alias1.i1 IN (
+ SELECT i1 FROM t1 WHERE alias1.i2 IN ( SELECT i2 FROM t1 HAVING i2 <> 7 )
+);
+DROP TABLE t1;
+
diff --git a/mysql-test/t/temp_table.test b/mysql-test/t/temp_table.test
index 2ae995446d6..7ba4de34ea9 100644
--- a/mysql-test/t/temp_table.test
+++ b/mysql-test/t/temp_table.test
@@ -321,6 +321,10 @@ REPAIR TABLE t1, t2, t3;
DROP TABLES t1, t2, t3;
+CREATE TEMPORARY TABLE t1 (a int);
+RENAME TABLE t1 TO t2;
+DROP TABLE t2;
+
#
# CREATE TEMPORARY TEMPORARY TABLE
#
@@ -535,6 +539,50 @@ CREATE TEMPORARY TABLE temp_t1 AS SELECT * FROM t1;
SELECT * FROM temp_t1;
DROP TABLE temp_t1, t1;
+--echo #
+--echo # ALTER TABLE RENAME & ENABLE/DISABLE KEYS (shortcuts)
+--echo #
+CREATE TEMPORARY TABLE t1(i INT PRIMARY KEY) ENGINE=MYISAM;
+INSERT INTO t1 VALUES(1);
+SELECT COUNT(*)=1 FROM t1;
+
+ALTER TABLE t1 RENAME t2;
+SELECT COUNT(*)=1 FROM t2;
+ALTER TABLE t2 RENAME t1;
+
+ALTER TABLE t1 DISABLE KEYS;
+ALTER TABLE t1 ENABLE KEYS;
+
+# LOCK TABLES is ignored for temporary tables.
+LOCK TABLES t1 WRITE;
+ALTER TABLE t1 RENAME t2;
+SELECT COUNT(*)=1 FROM t2;
+ALTER TABLE t2 RENAME t1;
+ALTER TABLE t1 DISABLE KEYS;
+ALTER TABLE t1 ENABLE KEYS;
+UNLOCK TABLES;
+
+LOCK TABLES t1 READ;
+ALTER TABLE t1 RENAME t2;
+SELECT COUNT(*)=1 FROM t2;
+ALTER TABLE t2 RENAME t1;
+ALTER TABLE t1 DISABLE KEYS;
+ALTER TABLE t1 ENABLE KEYS;
+UNLOCK TABLES;
+
+FLUSH TABLES WITH READ LOCK;
+ALTER TABLE t1 RENAME t2;
+SELECT COUNT(*)=1 FROM t2;
+ALTER TABLE t2 RENAME t1;
+ALTER TABLE t1 DISABLE KEYS;
+ALTER TABLE t1 ENABLE KEYS;
+UNLOCK TABLES;
+
+ALTER TABLE t1 RENAME t2, LOCK SHARED;
+ALTER TABLE t2 RENAME t1, LOCK EXCLUSIVE;
+
+DROP TABLE t1;
+
--echo # Cleanup
DROP DATABASE temp_db;
diff --git a/mysql-test/t/type_date.test b/mysql-test/t/type_date.test
index 71b1e76ac47..63c89f318fc 100644
--- a/mysql-test/t/type_date.test
+++ b/mysql-test/t/type_date.test
@@ -169,18 +169,8 @@ DROP TABLE t1;
#
CREATE TABLE t1 (a DATE, b INT, PRIMARY KEY (a,b));
-## The current sub test could fail (difference to expected result) if we
-## have just reached midnight.
-## (Bug#41776 type_date.test may fail if run around midnight)
-## Therefore we sleep a bit if we are too close to midnight.
-## The complete test itself needs in average less than 1 second.
-## Therefore a time_distance to midnight of 5 seconds should be sufficient.
-if (`SELECT CURTIME() > SEC_TO_TIME(24 * 3600 - 5)`)
-{
- # We are here when CURTIME() is between '23:59:56' and '23:59:59'.
- # So a sleep time of 5 seconds brings us between '00:00:01' and '00:00:04'.
- --real_sleep 5
-}
+
+SET timestamp=UNIX_TIMESTAMP('2016-07-21 14:48:18');
INSERT INTO t1 VALUES (DATE(NOW()), 1);
SELECT COUNT(*) FROM t1 WHERE a = NOW();
EXPLAIN SELECT COUNT(*) FROM t1 WHERE a = NOW();
@@ -192,6 +182,7 @@ EXPLAIN SELECT COUNT(*) FROM t1 WHERE a = NOW() AND b = 1;
ALTER TABLE t1 DROP PRIMARY KEY;
SELECT COUNT(*) FROM t1 WHERE a = NOW();
EXPLAIN SELECT COUNT(*) FROM t1 WHERE a = NOW();
+SET timestamp=DEFAULT;
DROP TABLE t1;
diff --git a/mysql-test/t/type_timestamp_hires.test b/mysql-test/t/type_timestamp_hires.test
index c51fb2fb247..0b05f81ef42 100644
--- a/mysql-test/t/type_timestamp_hires.test
+++ b/mysql-test/t/type_timestamp_hires.test
@@ -17,18 +17,26 @@ drop table t1;
#
# MDEV-438 Microseconds: Precision is ignored in CURRENT_TIMESTAMP(N) when it is given as a default column value
#
-create table t1 (a timestamp(5) default current_timestamp);
+create or replace table t1 (a timestamp(5) default current_timestamp);
show create table t1;
-drop table t1;
-create table t1 (a timestamp(5) default current_timestamp()); drop table t1;
-create table t1 (a timestamp(5) default current_timestamp(2));
+create or replace table t1 (a timestamp(5) default current_timestamp());
+show create table t1;
+create or replace table t1 (a timestamp(5) default current_timestamp(2));
+show create table t1;
+insert t1 () values ();
+select * from t1;
+create or replace table t1 (a timestamp(5) default current_timestamp(5));
+show create table t1;
+create or replace table t1 (a timestamp(5) default current_timestamp(6));
+show create table t1;
+create or replace table t1 (a timestamp(5) on update current_timestamp);
+show create table t1;
+create or replace table t1 (a timestamp(5) on update current_timestamp());
show create table t1;
-drop table t1;
-create table t1 (a timestamp(5) default current_timestamp(5)); drop table t1;
-create table t1 (a timestamp(5) default current_timestamp(6)); drop table t1;
-create table t1 (a timestamp(5) on update current_timestamp); drop table t1;
-create table t1 (a timestamp(5) on update current_timestamp()); drop table t1;
--error ER_INVALID_ON_UPDATE
-create table t1 (a timestamp(5) on update current_timestamp(3));
-create table t1 (a timestamp(5) on update current_timestamp(5)); drop table t1;
-create table t1 (a timestamp(5) on update current_timestamp(6)); drop table t1;
+create or replace table t1 (a timestamp(5) on update current_timestamp(3));
+create or replace table t1 (a timestamp(5) on update current_timestamp(5));
+show create table t1;
+create or replace table t1 (a timestamp(5) on update current_timestamp(6));
+show create table t1;
+drop table t1;
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test
index e2bc2168385..8992f77c563 100644
--- a/mysql-test/t/view.test
+++ b/mysql-test/t/view.test
@@ -5495,6 +5495,21 @@ alter table v1 check partition p1;
drop view v1;
drop table t1;
+
+--echo #
+--echo # MDEV-10419: crash in mariadb 10.1.16-MariaDB-1~trusty
+--echo #
+CREATE TABLE t1 (c1 CHAR(13));
+CREATE TABLE t2 (c2 CHAR(13));
+
+CREATE FUNCTION f() RETURNS INT RETURN 0;
+CREATE OR REPLACE VIEW v1 AS select f() from t1 where c1 in (select c2 from t2);
+DROP FUNCTION f;
+
+SHOW CREATE VIEW v1;
+
+drop view v1;
+drop table t1,t2;
--echo # -----------------------------------------------------------------
--echo # -- End of 5.5 tests.
--echo # -----------------------------------------------------------------
@@ -5984,6 +5999,26 @@ SELECT * FROM v1;
DROP VIEW v1;
DROP TABLE t1, t2, t3;
+
+--echo #
+--echo # MDEV-10035: DBUG_ASSERT on CREATE VIEW v1 AS SELECT * FROM t1
+--echo # FOR UPDATE
+--echo #
+
+CREATE TABLE t1 (a INT);
+insert into t1 values (1),(2);
+
+CREATE VIEW v1 AS SELECT * FROM t1 FOR UPDATE;
+SHOW CREATE VIEW v1;
+select * from v1;
+DROP VIEW v1;
+
+CREATE VIEW v1 AS SELECT * FROM t1 LOCK IN SHARE MODE;
+SHOW CREATE VIEW v1;
+select * from v1;
+DROP VIEW v1;
+
+DROP TABLE t1;
--echo #
--echo # End of 10.2 tests
--echo #
diff --git a/mysql-test/t/win.test b/mysql-test/t/win.test
index 09ddf41b4f0..2ede130156c 100644
--- a/mysql-test/t/win.test
+++ b/mysql-test/t/win.test
@@ -745,6 +745,24 @@ select
as cnt
from t1;
+select
+ pk, c,
+ sum(c) over (partition by c
+ order by pk
+ rows between 1 preceding
+ and 2 preceding)
+ as sum
+from t1;
+
+select
+ pk, c,
+ sum(c) over (partition by c
+ order by pk
+ rows between 2 following
+ and 1 following)
+ as sum
+from t1;
+
select
pk, c,
@@ -1089,14 +1107,8 @@ from
drop table t1;
---echo #
---echo # MDEV-9894: Assertion `0' failed in Window_func_runner::setup
---echo # return ER_NOT_SUPPORTED_YET for aggregates that are not yet supported
---echo # as window functions.
---echo #
create table t1 (i int);
insert into t1 values (1),(2);
---error ER_NOT_SUPPORTED_YET
SELECT MAX(i) OVER (PARTITION BY (i)) FROM t1;
drop table t1;
@@ -1201,3 +1213,20 @@ create view v1 as select 1 as i;
select rank() over (order by i) from v1;
drop view v1;
+--echo #
+--echo # MDEV-10097: Assertion `count > 0' failed in Item_sum_sum::add_helper(bool)
+--echo #
+CREATE TABLE `orders` (
+ `o_orderkey` int(11) NOT NULL,
+ `o_custkey` int(11) DEFAULT NULL,
+ PRIMARY KEY (`o_orderkey`)
+ ) DEFAULT CHARSET=latin1;
+
+INSERT INTO `orders` VALUES (59908,242);
+INSERT INTO `orders` VALUES (59940,238);
+
+SELECT o_custkey, avg(o_custkey) OVER (PARTITION BY abs(o_custkey)
+ ORDER BY o_custkey
+ RANGE BETWEEN 15 FOLLOWING
+ AND 15 FOLLOWING) from orders;
+DROP table orders;
diff --git a/mysql-test/t/win_min_max.test b/mysql-test/t/win_min_max.test
new file mode 100644
index 00000000000..1b05d3f6a16
--- /dev/null
+++ b/mysql-test/t/win_min_max.test
@@ -0,0 +1,49 @@
+create table t1 (
+ pk int primary key,
+ a int,
+ b int,
+ c real
+);
+
+
+insert into t1 values
+(101 , 0, 10, 1.1),
+(102 , 0, 10, 2.1),
+(103 , 1, 10, 3.1),
+(104 , 1, 10, 4.1),
+(108 , 2, 10, 5.1),
+(105 , 2, 20, 6.1),
+(106 , 2, 20, 7.1),
+(107 , 2, 20, 8.15),
+(109 , 4, 20, 9.15),
+(110 , 4, 20, 10.15),
+(111 , 5, NULL, 11.15),
+(112 , 5, 1, 12.25),
+(113 , 5, NULL, 13.35),
+(114 , 5, NULL, 14.50),
+(115 , 5, NULL, 15.65),
+(116 , 6, 1, NULL),
+(117 , 6, 1, 10),
+(118 , 6, 1, 1.1),
+(119 , 6, 1, NULL),
+(120 , 6, 1, NULL),
+(121 , 6, 1, NULL),
+(122 , 6, 1, 2.2),
+(123 , 6, 1, 20.1),
+(124 , 6, 1, -10.4),
+(125 , 6, 1, NULL),
+(126 , 6, 1, NULL),
+(127 , 6, 1, NULL);
+
+
+--sorted_result
+select pk, a, b, min(b) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING) as min,
+ max(b) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING) as max
+from t1;
+
+--sorted_result
+select pk, a, c, min(c) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING) as min,
+ max(c) over (partition by a order by pk ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING) as max
+from t1;
+
+drop table t1;
diff --git a/mysql-test/t/xtradb_mrr.test b/mysql-test/t/xtradb_mrr.test
index 260eb9f3955..d994c182ccc 100644
--- a/mysql-test/t/xtradb_mrr.test
+++ b/mysql-test/t/xtradb_mrr.test
@@ -33,8 +33,8 @@ insert into t2 select
from t1 A, t1 B, t1 C;
explain
-select count(length(a) + length(filler)) from t2 where a>='a-1000-a' and a <'a-1001-a';
-select count(length(a) + length(filler)) from t2 where a>='a-1000-a' and a <'a-1001-a';
+select count(length(a) + length(filler)) from t2 force index (a) where a>='a-1000-a' and a <'a-1001-a';
+select count(length(a) + length(filler)) from t2 force index (a) where a>='a-1000-a' and a <'a-1001-a';
drop table t2;
# Try a very big rowid
diff --git a/mysql-test/unstable-tests b/mysql-test/unstable-tests
new file mode 100644
index 00000000000..daba2ea8ae8
--- /dev/null
+++ b/mysql-test/unstable-tests
@@ -0,0 +1,355 @@
+##############################################################################
+#
+# List the test cases which, unlike tests from disabled.def files,
+# can still be run on the current tree meaningfully, but are known
+# or suspected to fail sporadically on different reasons.
+#
+# Most common reasons are either test failures observed in buildbot,
+# or recent modifications to the tests which make their stability
+# unknown.
+#
+# Tests included due to recent modifications are later removed from the
+# list, if during a certain period they do not fail (and are not
+# modified again). Tests included due to intermittent failures are
+# removed when corresponding bug reports are closed.
+#
+# Separate the test case name and the comment with ':'.
+#
+# <suitename>.<testcasename> : MDEV-xxxxx - <comment>
+#
+# '*' wildcard in testcase names is supported.
+#
+# To use the list, run MTR with --skip-test-list=unstable-tests option.
+#
+##############################################################################
+
+main.analyze_stmt_slow_query_log : MDEV-7558 - wrong result
+main.bootstrap : Modified on 2016-06-18 (MDEV-9969)
+main.create_delayed : MDEV-10605 - failed with timeout
+main.create_or_replace : Modified on 2016-06-23 (MDEV-9728)
+main.ctype_recoding : Modified on 2016-06-10 (MDEV-10181)
+main.ctype_utf8 : Modified on 2016-06-21 (merge)
+main.ctype_utf8mb4 : Modified on 2016-06-21 (merge)
+main.ctype_utf16le : MDEV-10675: timeout or extra warnings
+main.events_1 : Modified on 2016-06-21 (MDEV-9524)
+main.func_group : Modified on 2016-08-08 (MDEV-10468)
+main.func_in : Modified on 2016-06-20 (MDEV-10020)
+main.func_math : Modified on 2016-08-10 (merge)
+main.func_misc : Modified on 2016-08-10 (merge)
+main.grant2 : Modified on 2016-07-18 (MDEV-8569)
+main.help : Modified on 2016-06-21 (MDEV-9524)
+main.host_cache_size_functionality : MDEV-10606 - sporadic failure on shutdown
+main.index_intersect_innodb : MDEV-10643 - failed with timeout
+main.index_merge_innodb : MDEV-7142 - sporadic wrong execution plan
+main.information_schema_stats : Modified on 2016-07-25 (MDEV-10428)
+main.innodb_mysql_lock : MDEV-7861 - sporadic lock detection failure
+main.insert_innodb : Modified on 2016-06-14 (merge from upstream)
+main.loaddata : Modified on 2016-08-10 (merge)
+main.locale : Modified on 2016-06-21 (merge)
+main.mdev-504 : MDEV-10607 - sporadic "can't connect"
+main.mdev375 : MDEV-10607 - sporadic "can't connect"
+main.merge : MDEV-10607 - sporadic "can't connect"
+main.multi_update : Modified on 2016-06-20 (MDEV-5973)
+main.myisam_enable_keys-10506 : New test, added on 2016-08-10 (MDEV-10506)
+main.mysqlcheck : Modified on 2016-08-10 (merge)
+main.mysqldump : MDEV-10512 - sporadic assertion failure
+main.mysqltest : MDEV-9269 - fails on Alpha
+main.named_pipe : Modified on 2016-08-02 (MDEV-10383)
+main.openssl_1 : Modified on 2016-07-11 (MDEV-10211)
+main.order_by_optimizer_innodb : MDEV-10683 - wrong execution plan
+main.parser : Modified on 2016-06-21 (merge)
+main.pool_of_threads : MDEV-10100 - sporadic error on detecting max connections
+main.ps_1general : Modified on 2016-07-12 (merge)
+main.range : Modified on 2016-08-10 (merge)
+main.range_mrr_icp : Modified on 2016-08-10 (merge)
+main.query_cache : MDEV-10611 - sporadic mutex problem
+main.show_explain : MDEV-10674 - sporadic failure
+main.shutdown : MDEV-10612 - sporadic crashes
+main.sp-prelocking : Modified on 2016-08-10 (merge)
+main.sp-security : MDEV-10607 - sporadic "can't connect"
+main.ssl : MDEV-10211 - different ciphers on some platforms
+main.ssl_ca : Modified on 2016-07-11 (MDEV-10211)
+main.ssl_compress : Modified on 2016-07-11 (MDEV-10211)
+main.ssl_timeout : Modified on 2016-07-11 (MDEV-10211)
+main.stat_tables_par_innodb : MDEV-10515 - sporadic wrong results
+main.status : MDEV-8510 - sporadic wrong result
+main.status_user : Modified on 2016-06-20 (MDEV-8633)
+main.subselect : Modified in 10.1.17
+main.subselect_innodb : MDEV-10614 - sporadic wrong results
+main.subselect_sj_mat : Modified in 10.1.17
+main.temp_table : Modified on 2016-06-18 (MDEV-8569)
+main.type_date : Modified on 2016-08-10 (merge)
+main.type_datetime : Modified on 2016-06-16 (MDEV-9374)
+main.type_datetime_hires : MDEV-10687 - timeout
+main.view : Modified on 2016-08-10 (merge)
+main.xtradb_mrr : Modified on 2016-08-04 (MDEV-9946)
+
+#----------------------------------------------------------------
+
+archive.archive-big : MDEV-10615 - table is marked as crashed
+archive.discover : MDEV-10510 - table is marked as crashed
+
+#----------------------------------------------------------------
+
+binlog.binlog_commit_wait : MDEV-10150 - Error: too much time elapsed
+binlog.binlog_dmls_on_tmp_tables_readonly : New test, added on 2016-05-04 (upstream)
+binlog.binlog_xa_recover : MDEV-8517 - Extra checkpoint
+
+#----------------------------------------------------------------
+
+connect.tbl : MDEV-9844, MDEV-10179 - sporadic crashes, valgrind warnings, wrong results
+connect.jdbc : New test, added on 2016-07-15
+connect.jdbc-new : New test, added on 2016-07-14
+connect.jdbc-oracle : New test, added on 2016-07-13
+connect.jdbc-postgresql : New test, added on 2016-07-13
+
+#----------------------------------------------------------------
+
+galera.GAL-382 : New test, added in 10.1.17
+galera.MW-252 : New test, added in 10.1.17
+galera.MW-258 : New test, added in 10.1.17
+galera.MW-259 : New test, added in 10.1.17
+galera.MW-285 : New test, added in 10.1.17
+galera.MW-286 : New test, added in 10.1.17
+galera.MW-292 : New test, added in 10.1.17
+galera.MW-44 : New test, added in 10.1.17
+galera.galera#414 : New test, added in 10.1.17
+galera.galera_as_slave_autoinc : New test, added in 10.1.17
+galera.galera_as_slave_nonprim : Modified in 10.1.17
+galera.galera_bf_abort_flush_for_export : Modified in 10.1.17
+galera.galera_gcs_fc_limit : Modified in 10.1.17
+galera.galera_ist_recv_bind : New test, added in 10.1.17
+galera.galera_ist_restart_joiner : Modified in 10.1.17
+galera.galera_kill_ddl : Modified in 10.1.17
+galera.galera_parallel_simple : Modified in 10.1.17
+galera.galera_pc_ignore_sb : Modified in 10.1.17
+galera.galera_restart_nochanges : Modified in 10.1.17
+galera.galera_roles : Modified in 10.1.17
+galera.galera_rsu_wsrep_desync : Modified in 10.1.17
+galera.galera_split_brain : Modified in 10.1.17
+galera.galera_ssl_upgrade : Modified in 10.1.17
+galera.galera_suspend_slave : Modified in 10.1.17
+galera.galera_transaction_replay : Modified in 10.1.17
+galera.galera_var_dirty_reads : Modified in 10.1.17
+galera.galera_var_max_ws_rows : New test, added in 10.1.17
+galera.galera_var_max_ws_size : Modified in 10.1.17
+galera.mdev_10518 : New test, added in 10.1.17
+galera.mysql-wsrep#31 : Modified in 10.1.17
+
+galera_3nodes.galera_certification_ccc : Modified in 10.1.17
+galera_3nodes.galera_innobackupex_backup : Modified in 10.1.17
+galera_3nodes.galera_ist_gcache_rollover : Modified in 10.1.17
+galera_3nodes.galera_pc_bootstrap : Modified in 10.1.17
+galera_3nodes.galera_pc_weight : Modified in 10.1.17
+
+#----------------------------------------------------------------
+
+encryption.create_or_replace : MDEV-9359 - Assertion failure
+encryption.innodb-bad-key-shutdown : MDEV-9105 - valgrind warnings, assertion failures
+encryption.innodb_encryption_discard_import : MDEV-9099 - warnings, errors, crash
+encryption.innodb_encryption_filekeys : MDEV-9062 - timeouts
+encryption.innodb_first_page : MDEV-10689 - crashes
+encryption.innodb_onlinealter_encryption : MDEV-10099 - wrong results
+encryption.innodb-page_encryption : MDEV-10641 - mutex problem
+
+#----------------------------------------------------------------
+
+federated.federatedx : MDEV-10617 - Wrong checksum, timeouts
+federated.federated_innodb : MDEV-10617, MDEV-10417 - Wrong checksum, timeouts, fails on Mips
+federated.federated_partition : MDEV-10417 - Fails on Mips
+federated.federated_transactions : MDEV-10617, MDEV-10417 - Wrong checksum, timeouts, fails on Mips
+
+#----------------------------------------------------------------
+
+funcs_1.processlist_priv_no_prot : Include file modified on 2016-07-12 (merge)
+funcs_1.processlist_priv_ps : Include file modified on 2016-07-12 (merge)
+funcs_2.memory_charset : MDEV-10290 - timeout
+
+#----------------------------------------------------------------
+
+innodb.binlog_consistent : MDEV-10618 - Server fails to start
+innodb.innodb-alter-table : MDEV-10619 - Testcase timeout
+innodb.innodb-alter-tempfile : Modified on 2016-08-09 (MDEV-10469)
+innodb.innodb_blob_truncate : MDEV-10377 - Assertion failure
+innodb.innodb-bug-14068765 : MDEV-9105 - valgrind warnings, assertion failures
+innodb.innodb_corrupt_bit : Modified on 2016-06-21 (merge)
+innodb.innodb-bug-14084530 : MDEV-9105 - valgrind warnings, assertion failures
+innodb.innodb_bug30423 : MDEV-7311 - Wrong number of rows in the plan
+innodb.innodb-fk-warnings : Modified on 2016-07-18 (MDEV-8569)
+innodb.innodb-fkcheck : Modified on 2016-06-13 (MDEV-10083)
+innodb.innodb-page_compression_zip : MDEV-10641 - mutex problem
+innodb.innodb_stats : MDEV-10682 - wrong result
+innodb.innodb_sys_semaphore_waits : MDEV-10331 - wrong result
+innodb.innodb-wl5522 : MDEV-9105 - valgrind warnings, assertion failures
+innodb.innodb-wl5522-1 : MDEV-9105 - valgrind warnings, assertion failures
+innodb.innodb-wl5522-debug-zip : MDEV-10427 - Warning: database page corruption
+innodb.innodb-wl5522-zip : MDEV-9105 - valgrind warnings, assertion failures
+innodb.xa_recovery : MDEV-10685 - warnings
+
+#----------------------------------------------------------------
+
+innodb_zip.innodb_prefix_index_liftedlimit : MDEV-10686 - timeout
+
+#----------------------------------------------------------------
+
+mroonga/storage.column_datetime_32bit_2038 : Wrong result on Alpha
+mroonga/storage.column_datetime_32bit_before_unix_epoch : Wrong result on Alpha
+mroonga/storage.column_datetime_32bit_max : Wrong result on Alpha
+mroonga/storage.column_datetime_32bit_out_of_range : Wrong result on Alpha
+mroonga/storage.index_multiple_column_unique_date_32bit_equal : Wrong result on Alpha
+mroonga/storage.index_multiple_column_unique_date_order_32bit_desc : Wrong result on Alpha
+mroonga/storage.index_multiple_column_unique_datetime_index_read : MDEV-8643 - valgrind warnings
+mroonga/storage.repair_table_no_index_file : MDEV-9364 - wrong result
+
+#----------------------------------------------------------------
+
+multi_source.gtid : MDEV-10620, MDEV-10417 - Timeout in wait condition, fails on Mips
+multi_source.info_logs : MDEV-10042 - wrong result
+multi_source.multisource : MDEV-10417 - Fails on Mips
+multi_source.reset_slave : MDEV-10690 - wrong result
+multi_source.simple : MDEV-4633 - Wrong slave status output
+multi_source.status_vars : MDEV-4632 - failed while waiting for Slave_received_heartbeats
+
+#----------------------------------------------------------------
+
+parts.partition_float_myisam : MDEV-10621 - Testcase timeout
+parts.partition_int_myisam : MDEV-10621 - Testcase timeout
+
+#----------------------------------------------------------------
+
+perfschema.digest_table_full : Modified on 2016-06-21 (merge)
+perfschema.func_file_io : MDEV-5708 - fails for s390x
+perfschema.func_mutex : MDEV-5708 - fails for s390x
+perfschema.rpl_gtid_func : Modified on 2016-06-21 (merge)
+perfschema.setup_actors : MDEV-10679 - rare crash
+perfschema.sizing_low : Modified on 2016-04-26 (5.6.30 merge)
+perfschema.socket_summary_by_event_name_func : MDEV-10622 - Socket summary tables do not match
+perfschema.start_server_low_digest : Modified on 2016-06-21 (merge)
+perfschema.statement_digest : Modified on 2016-06-21 (merge)
+perfschema.statement_digest_consumers : Modified on 2016-06-21 (merge)
+perfschema.statement_digest_long_query : Modified on 2016-06-21 (merge)
+perfschema.table_name : New test, added on 2016-04-26 (5.6.30 merge)
+perfschema.threads_mysql : MDEV-10677 - sporadic wrong result
+
+#----------------------------------------------------------------
+
+plugins.feedback_plugin_send : MDEV-7932 - ssl failed for url
+plugins.pam : Modified on 2016-08-03 (MDEV-7329)
+plugins.pam_cleartext : Modified on 2016-08-03
+plugins.server_audit : MDEV-9562 - crashes on sol10-sparc
+plugins.thread_pool_server_audit : MDEV-9562 - crashes on sol10-sparc
+
+#----------------------------------------------------------------
+
+roles.rpl_grant_revoke_current_role-8638 : New test, added on 2016-06-20 (MDEV-8638)
+roles.set_role-9614 : New test, added on 2016-05-30 (MDEV-9614)
+
+#----------------------------------------------------------------
+
+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_index : MDEV-9501 - Warning: failed registering on master
+rpl.rpl_checksum_cache : MDEV-10626 - Testcase timeout
+rpl.rpl_circular_for_4_hosts : MDEV-10627 - Testcase timeout
+rpl.rpl_ddl : MDEV-10417 - Fails on Mips
+rpl.rpl_domain_id_filter_restart : MDEV-10684 - Wrong result
+rpl.rpl_gtid_basic : MDEV-10681 - server startup problem
+rpl.rpl_gtid_crash : MDEV-9501 - Warning: failed registering on master
+rpl.rpl_gtid_master_promote : MDEV-10628 - Timeout in sync_with_master
+rpl.rpl_gtid_mdev9033 : MDEV-10680 - warnings
+rpl.rpl_gtid_stop_start : MDEV-10629 - Crash on shutdown
+rpl.rpl_gtid_until : MDEV-10625 - warnings in error log
+rpl.rpl_ignore_table : Modified on 2016-06-22
+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_invoked_features : MDEV-10417 - Fails on Mips
+rpl.rpl_mdev6020 : MDEV-10630, MDEV-10417 - Timeouts, fails on Mips
+rpl.rpl_mdev6386 : MDEV-10631 - Wrong result on slave
+rpl.rpl_parallel : MDEV-10632, MDEV-10653 - Failures to sync, timeouts
+rpl.rpl_parallel_optimistic : MDEV-10511 - timeout
+rpl.rpl_parallel_temptable : MDEV-10356 - Crash in close_thread_tables
+rpl.rpl_partition_innodb : MDEV-10417 - Fails on Mips
+rpl.rpl_row_drop_create_temp_table : MDEV-10626 - Testcase timeout
+rpl.rpl_row_log_innodb : MDEV-10688 - Wrong result
+rpl.rpl_row_sp001 : MDEV-9329 - Fails on Ubuntu/s390x
+rpl.rpl_show_slave_hosts : MDEV-10681 - server startup problem
+rpl.rpl_semi_sync_uninstall_plugin : MDEV-7140 - Wrong plugin status
+rpl.rpl_slave_grp_exec : MDEV-10514 - Unexpected deadlock
+rpl.rpl_switch_stm_row_mixed : MDEV-10611 - Wrong usage of mutex
+rpl.rpl_sync : MDEV-10633 - Database page corruption
+rpl.rpl_temporary_error2 : MDEV-10634 - Wrong number of retries
+rpl.sec_behind_master-5114 : MDEV-8518 - Wrong value of Seconds_Behind_Master
+rpl.rpl_skip_replication : MDEV-9268 - Fails with timeout in sync_slave_with_master on Alpha
+
+#----------------------------------------------------------------
+
+spider.* : MDEV-9329 - tests are too memory-consuming
+
+spider/bg.direct_aggregate : MDEV-7098 - Trying to unlock mutex that wasn't locked
+spider/bg.direct_aggregate_part : MDEV-7098 - Trying to unlock mutex that wasn't locked
+spider/bg.ha : MDEV-7914, MDEV-9329 - Crash, failures on s390x
+spider/bg.ha_part : MDEV-9329 - Fails on Ubuntu/s390x
+spider/bg.spider_fixes : MDEV-7098, MDEV-9329 - Mutex problem, failures on s390x
+spider/bg.vp_fixes : MDEV-9329 - Fails on Ubuntu/s390x
+
+#----------------------------------------------------------------
+
+stress.ddl_innodb : MDEV-10635 - Testcase timeout
+
+#----------------------------------------------------------------
+
+sys_vars.autocommit_func2 : MDEV-9329 - Fails on Ubuntu/s390x
+sys_vars.general_log_file_basic : Modified on 2016-08-09 (MDEV-10465)
+sys_vars.keep_files_on_create_basic : MDEV-10676 - timeout
+sys_vars.slow_query_log_file_basic : Modified on 2016-08-09 (MDEV-10465)
+sys_vars.sysvars_innodb : MDEV-6958 - error-prone rdiffs
+sys_vars.sysvars_server_embedded : MDEV-6958 - error-prone rdiffs
+sys_vars.innodb_buffer_pool_dump_pct_basic : MDEV-10651 - sporadic failure on file_exists
+sys_vars.innodb_fatal_semaphore_wait_threshold : MDEV-10513 - crashes
+sys_vars.sysvars_wsrep : Modified in 10.1.17
+sys_vars.wsrep_max_ws_size_basic : Modified in 10.1.17
+
+#----------------------------------------------------------------
+
+tokudb.background_job_manager : MDEV-10327 - Assertion failure on server shutdown
+tokudb.cluster_filter : MDEV-10678 - Wrong execution plan
+tokudb.cluster_filter_hidden : MDEV-10678 - Wrong execution plan
+tokudb.cluster_filter_unpack_varchar : MDEV-10636 - Wrong execution plan
+tokudb.i_s_tokudb_lock_waits_released : Modified in 10.1.17
+tokudb.i_s_tokudb_locks_released : Modified in 10.1.17
+tokudb.* : MDEV-9891 - massive crashes on shutdown
+
+tokudb_alter_table.* : MDEV-9891 - massive crashes on shutdown
+
+tokudb_bugs.checkpoint_lock : MDEV-10637 - Wrong processlist output
+tokudb_bugs.checkpoint_lock_3 : MDEV-10637 - Wrong processlist output
+tokudb_bugs.* : MDEV-9891 - massive crashes on shutdown
+
+tokudb_parts.* : MDEV-9891 - massive crashes on shutdown
+
+rpl-tokudb.* : MDEV-9891 - massive crashes on shutdown, also modified on 2016-06-10 (Merge)
+
+tokudb_add_index.* : MDEV-9891 - massive crashes on shutdown
+tokudb_backup.* : MDEV-9891 - massive crashes on shutdown
+tokudb_mariadb.* : MDEV-9891 - massive crashes on shutdown
+tokudb_sys_vars.* : MDEV-9891 - massive crashes on shutdown
+tokudb_rpl.* : MDEV-9891 - massive crashes on shutdown
+
+#----------------------------------------------------------------
+
+unit.ma_test_loghandler : MDEV-10638 - record read not ok
+
+#----------------------------------------------------------------
+
+vcol.charsets : Added on 2016-06-23
+vcol.not_supported : MDEV-10639 - Testcase timeout
+vcol.vcol_keys_innodb : MDEV-10639 - Testcase timeout
+
+#----------------------------------------------------------------
+
+wsrep.* : MDEV-10041 - server crashes sporadically during bootstrap
+
+
diff --git a/mysql-test/valgrind.supp b/mysql-test/valgrind.supp
index c3e7d1c65ec..b2b264e17fa 100644
--- a/mysql-test/valgrind.supp
+++ b/mysql-test/valgrind.supp
@@ -1223,25 +1223,6 @@
}
{
- GitHub codership/mysql-wsrep#176
- Memcheck:Leak
- fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE
- fun:galera_parameters_get
- fun:_ZL24refresh_provider_optionsv
- fun:_Z29wsrep_provider_options_updateP7sys_varP3THD13enum_var_type
- fun:_ZN7sys_var6updateEP3THDP7set_var
- fun:_ZN7set_var6updateEP3THD
- fun:_Z17sql_set_variablesP3THDP4ListI12set_var_baseE
- fun:_Z21mysql_execute_commandP3THD
- fun:_Z11mysql_parseP3THDPcjP12Parser_state
- fun:_ZL17wsrep_mysql_parseP3THDPcjP12Parser_state
- fun:_Z16dispatch_command19enum_server_commandP3THDPcj
- fun:_Z10do_commandP3THD
- fun:_Z24do_handle_one_connectionP3THD
- fun:handle_one_connection
-}
-
-{
GitHub codership/galera#330
Memcheck:Leak
match-leak-kinds: reachable
@@ -1337,31 +1318,6 @@ g codership/mysql-wsrep/issues#176
{
codership/mysql-wsrep/issues#176
Memcheck:Leak
- fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE
-}
-
-{
- codership/mysql-wsrep/issues#176
- Memcheck:Leak
- fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE
- fun:galera_parameters_get
- fun:_ZL24refresh_provider_optionsv
- fun:_Z21wsrep_provider_updateP7sys_varP3THD13enum_var_type
- fun:_ZN7sys_var6updateEP3THDP7set_var
- fun:_ZN7set_var6updateEP3THD
- fun:_Z17sql_set_variablesP3THDP4ListI12set_var_baseE
- fun:_Z21mysql_execute_commandP3THD
- fun:_Z11mysql_parseP3THDPcjP12Parser_state
- fun:_ZL17wsrep_mysql_parseP3THDPcjP12Parser_state
- fun:_Z16dispatch_command19enum_server_commandP3THDPcj
- fun:_Z10do_commandP3THD
- fun:_Z24do_handle_one_connectionP3THD
- fun:handle_one_connection
-}
-
-{
- codership/mysql-wsrep/issues#176
- Memcheck:Leak
match-leak-kinds: reachable
fun:malloc
fun:DbugMalloc
@@ -1470,72 +1426,6 @@ g codership/mysql-wsrep/issues#176
}
{
- codership/mysql-wsrep/issues#176
- Memcheck:Leak
- match-leak-kinds: possible
- fun:malloc
- fun:strdup
- fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE
- fun:galera_parameters_get
- fun:_ZL24refresh_provider_optionsv
- fun:_Z29wsrep_provider_options_updateP7sys_varP3THD13enum_var_type
- fun:_ZN7sys_var6updateEP3THDP7set_var
- fun:_ZN7set_var6updateEP3THD
- fun:_Z17sql_set_variablesP3THDP4ListI12set_var_baseE
- fun:_Z21mysql_execute_commandP3THD
- fun:_Z11mysql_parseP3THDPcjP12Parser_state
- fun:_ZL17wsrep_mysql_parseP3THDPcjP12Parser_state
- fun:_Z16dispatch_command19enum_server_commandP3THDPcj
- fun:_Z10do_commandP3THD
- fun:_Z24do_handle_one_connectionP3THD
- fun:handle_one_connection
-}
-
-{
- codership/mysql-wsrep/issues#176
- Memcheck:Leak
- match-leak-kinds: definite
- fun:malloc
- fun:strdup
- fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE
- fun:galera_parameters_get
- fun:_ZL24refresh_provider_optionsv
- fun:_Z29wsrep_provider_options_updateP7sys_varP3THD13enum_var_type
- fun:_ZN7sys_var6updateEP3THDP7set_var
- fun:_ZN7set_var6updateEP3THD
- fun:_Z17sql_set_variablesP3THDP4ListI12set_var_baseE
- fun:_Z21mysql_execute_commandP3THD
- fun:_Z11mysql_parseP3THDPcjP12Parser_state
- fun:_ZL17wsrep_mysql_parseP3THDPcjP12Parser_state
- fun:_Z16dispatch_command19enum_server_commandP3THDPcj
- fun:_Z10do_commandP3THD
- fun:_Z24do_handle_one_connectionP3THD
- fun:handle_one_connection
-}
-
-{
- codership/mysql-wsrep/issues#176
- Memcheck:Leak
- match-leak-kinds: definite
- fun:malloc
- fun:strdup
- fun:_Z16wsrep_get_paramsRKN6galera10ReplicatorE
- fun:galera_parameters_get
- fun:_ZL24refresh_provider_optionsv
- fun:_Z21wsrep_provider_updateP7sys_varP3THD13enum_var_type
- fun:_ZN7sys_var6updateEP3THDP7set_var
- fun:_ZN7set_var6updateEP3THD
- fun:_Z17sql_set_variablesP3THDP4ListI12set_var_baseE
- fun:_Z21mysql_execute_commandP3THD
- fun:_Z11mysql_parseP3THDPcjP12Parser_state
- fun:_ZL17wsrep_mysql_parseP3THDPcjP12Parser_state
- fun:_Z16dispatch_command19enum_server_commandP3THDPcj
- fun:_Z10do_commandP3THD
- fun:_Z24do_handle_one_connectionP3THD
- fun:handle_one_connection
-}
-
-{
codership/galera#331
Memcheck:Leak
match-leak-kinds: reachable
diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt
index 0d404586569..5f4e9156fd2 100644
--- a/mysys/CMakeLists.txt
+++ b/mysys/CMakeLists.txt
@@ -71,7 +71,7 @@ ENDIF()
ADD_CONVENIENCE_LIBRARY(mysys ${MYSYS_SOURCES})
TARGET_LINK_LIBRARIES(mysys dbug strings mysys_ssl ${ZLIB_LIBRARY}
- ${LIBNSL} ${LIBM} ${LIBRT} ${LIBDL} ${LIBSOCKET} ${LIBEXECINFO})
+ ${LIBNSL} ${LIBM} ${LIBRT} ${LIBDL} ${LIBSOCKET} ${LIBEXECINFO} ${CRC32_VPMSUM_LIBRARY})
DTRACE_INSTRUMENT(mysys)
IF(HAVE_BFD_H)
diff --git a/mysys/charset-def.c b/mysys/charset-def.c
index defb5c0062d..58fe16f353f 100644
--- a/mysys/charset-def.c
+++ b/mysys/charset-def.c
@@ -184,12 +184,16 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
add_compiled_collation(&my_charset_filename);
add_compiled_collation(&my_charset_latin1);
+ add_compiled_collation(&my_charset_latin1_nopad);
add_compiled_collation(&my_charset_latin1_bin);
+ add_compiled_collation(&my_charset_latin1_nopad_bin);
add_compiled_collation(&my_charset_latin1_german2_ci);
#ifdef HAVE_CHARSET_big5
add_compiled_collation(&my_charset_big5_chinese_ci);
add_compiled_collation(&my_charset_big5_bin);
+ add_compiled_collation(&my_charset_big5_chinese_nopad_ci);
+ add_compiled_collation(&my_charset_big5_nopad_bin);
#endif
#ifdef HAVE_CHARSET_cp1250
@@ -199,6 +203,8 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
#ifdef HAVE_CHARSET_cp932
add_compiled_collation(&my_charset_cp932_japanese_ci);
add_compiled_collation(&my_charset_cp932_bin);
+ add_compiled_collation(&my_charset_cp932_japanese_nopad_ci);
+ add_compiled_collation(&my_charset_cp932_nopad_bin);
#endif
#ifdef HAVE_CHARSET_latin2
@@ -208,36 +214,50 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
#ifdef HAVE_CHARSET_eucjpms
add_compiled_collation(&my_charset_eucjpms_japanese_ci);
add_compiled_collation(&my_charset_eucjpms_bin);
+ add_compiled_collation(&my_charset_eucjpms_japanese_nopad_ci);
+ add_compiled_collation(&my_charset_eucjpms_nopad_bin);
#endif
#ifdef HAVE_CHARSET_euckr
add_compiled_collation(&my_charset_euckr_korean_ci);
add_compiled_collation(&my_charset_euckr_bin);
+ add_compiled_collation(&my_charset_euckr_korean_nopad_ci);
+ add_compiled_collation(&my_charset_euckr_nopad_bin);
#endif
#ifdef HAVE_CHARSET_gb2312
add_compiled_collation(&my_charset_gb2312_chinese_ci);
add_compiled_collation(&my_charset_gb2312_bin);
+ add_compiled_collation(&my_charset_gb2312_chinese_nopad_ci);
+ add_compiled_collation(&my_charset_gb2312_nopad_bin);
#endif
#ifdef HAVE_CHARSET_gbk
add_compiled_collation(&my_charset_gbk_chinese_ci);
add_compiled_collation(&my_charset_gbk_bin);
+ add_compiled_collation(&my_charset_gbk_chinese_nopad_ci);
+ add_compiled_collation(&my_charset_gbk_nopad_bin);
#endif
#ifdef HAVE_CHARSET_sjis
add_compiled_collation(&my_charset_sjis_japanese_ci);
add_compiled_collation(&my_charset_sjis_bin);
+ add_compiled_collation(&my_charset_sjis_japanese_nopad_ci);
+ add_compiled_collation(&my_charset_sjis_nopad_bin);
#endif
#ifdef HAVE_CHARSET_tis620
add_compiled_collation(&my_charset_tis620_thai_ci);
add_compiled_collation(&my_charset_tis620_bin);
+ add_compiled_collation(&my_charset_tis620_thai_nopad_ci);
+ add_compiled_collation(&my_charset_tis620_nopad_bin);
#endif
#ifdef HAVE_CHARSET_ucs2
add_compiled_collation(&my_charset_ucs2_general_ci);
add_compiled_collation(&my_charset_ucs2_bin);
+ add_compiled_collation(&my_charset_ucs2_general_nopad_ci);
+ add_compiled_collation(&my_charset_ucs2_nopad_bin);
add_compiled_collation(&my_charset_ucs2_general_mysql500_ci);
#ifdef HAVE_UCA_COLLATIONS
add_compiled_collation(&my_charset_ucs2_unicode_ci);
@@ -273,11 +293,15 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
#ifdef HAVE_CHARSET_ujis
add_compiled_collation(&my_charset_ujis_japanese_ci);
add_compiled_collation(&my_charset_ujis_bin);
+ add_compiled_collation(&my_charset_ujis_japanese_nopad_ci);
+ add_compiled_collation(&my_charset_ujis_nopad_bin);
#endif
#ifdef HAVE_CHARSET_utf8
add_compiled_collation(&my_charset_utf8_general_ci);
+ add_compiled_collation(&my_charset_utf8_general_nopad_ci);
add_compiled_collation(&my_charset_utf8_bin);
+ add_compiled_collation(&my_charset_utf8_nopad_bin);
add_compiled_collation(&my_charset_utf8_general_mysql500_ci);
#ifdef HAVE_UTF8_GENERAL_CS
add_compiled_collation(&my_charset_utf8_general_cs);
@@ -317,6 +341,8 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
#ifdef HAVE_CHARSET_utf8mb4
add_compiled_collation(&my_charset_utf8mb4_general_ci);
add_compiled_collation(&my_charset_utf8mb4_bin);
+ add_compiled_collation(&my_charset_utf8mb4_general_nopad_ci);
+ add_compiled_collation(&my_charset_utf8mb4_nopad_bin);
#ifdef HAVE_UCA_COLLATIONS
add_compiled_collation(&my_charset_utf8mb4_unicode_ci);
add_compiled_collation(&my_charset_utf8mb4_german2_uca_ci);
@@ -354,6 +380,10 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
add_compiled_collation(&my_charset_utf16_bin);
add_compiled_collation(&my_charset_utf16le_general_ci);
add_compiled_collation(&my_charset_utf16le_bin);
+ add_compiled_collation(&my_charset_utf16_general_nopad_ci);
+ add_compiled_collation(&my_charset_utf16_nopad_bin);
+ add_compiled_collation(&my_charset_utf16le_general_nopad_ci);
+ add_compiled_collation(&my_charset_utf16le_nopad_bin);
#ifdef HAVE_UCA_COLLATIONS
add_compiled_collation(&my_charset_utf16_unicode_ci);
add_compiled_collation(&my_charset_utf16_german2_uca_ci);
@@ -389,6 +419,8 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
#ifdef HAVE_CHARSET_utf32
add_compiled_collation(&my_charset_utf32_general_ci);
add_compiled_collation(&my_charset_utf32_bin);
+ add_compiled_collation(&my_charset_utf32_general_nopad_ci);
+ add_compiled_collation(&my_charset_utf32_nopad_bin);
#ifdef HAVE_UCA_COLLATIONS
add_compiled_collation(&my_charset_utf32_unicode_ci);
add_compiled_collation(&my_charset_utf32_german2_uca_ci);
diff --git a/mysys/charset.c b/mysys/charset.c
index e46fd16a5fb..2d9df9f47e4 100644
--- a/mysys/charset.c
+++ b/mysys/charset.c
@@ -123,13 +123,21 @@ static my_bool init_state_maps(struct charset_info_st *cs)
}
+static MY_COLLATION_HANDLER *get_simple_collation_handler_by_flags(uint flags)
+{
+ return flags & MY_CS_BINSORT ?
+ (flags & MY_CS_NOPAD ?
+ &my_collation_8bit_nopad_bin_handler :
+ &my_collation_8bit_bin_handler) :
+ (flags & MY_CS_NOPAD ?
+ &my_collation_8bit_simple_nopad_ci_handler :
+ &my_collation_8bit_simple_ci_handler);
+}
+
+
static void simple_cs_init_functions(struct charset_info_st *cs)
{
- if (cs->state & MY_CS_BINSORT)
- cs->coll= &my_collation_8bit_bin_handler;
- else
- cs->coll= &my_collation_8bit_simple_ci_handler;
-
+ cs->coll= get_simple_collation_handler_by_flags(cs->state);
cs->cset= &my_charset_8bit_handler;
}
@@ -197,13 +205,55 @@ err:
}
+static my_bool simple_8bit_charset_data_is_full(CHARSET_INFO *cs)
+{
+ return cs->ctype && cs->to_upper && cs->to_lower && cs->tab_to_uni;
+}
+
+
+/**
+ Inherit missing 8bit charset data from another collation.
+ Arrays pointed by refcs must be in the permanent memory already,
+ e.g. static memory, or allocated by my_once_xxx().
+*/
+static void
+inherit_charset_data(struct charset_info_st *cs, CHARSET_INFO *refcs)
+{
+ if (!cs->to_upper)
+ cs->to_upper= refcs->to_upper;
+ if (!cs->to_lower)
+ cs->to_lower= refcs->to_lower;
+ if (!cs->ctype)
+ cs->ctype= refcs->ctype;
+ if (!cs->tab_to_uni)
+ cs->tab_to_uni= refcs->tab_to_uni;
+}
+
+
+static my_bool simple_8bit_collation_data_is_full(CHARSET_INFO *cs)
+{
+ return cs->sort_order || (cs->state & MY_CS_BINSORT);
+}
+
+
+/**
+ Inherit 8bit simple collation data from another collation.
+ refcs->sort_order must be in the permanent memory already,
+ e.g. static memory, or allocated by my_once_xxx().
+*/
+static void
+inherit_collation_data(struct charset_info_st *cs, CHARSET_INFO *refcs)
+{
+ if (!simple_8bit_collation_data_is_full(cs))
+ cs->sort_order= refcs->sort_order;
+}
+
static my_bool simple_cs_is_full(CHARSET_INFO *cs)
{
- return ((cs->csname && cs->tab_to_uni && cs->ctype && cs->to_upper &&
- cs->to_lower) &&
- (cs->number && cs->name &&
- (cs->sort_order || (cs->state & MY_CS_BINSORT) )));
+ return cs->number && cs->csname && cs->name &&
+ simple_8bit_charset_data_is_full(cs) &&
+ (simple_8bit_collation_data_is_full(cs) || cs->tailoring);
}
@@ -297,7 +347,6 @@ static int add_collation(struct charset_info_st *cs)
}
else
{
- const uchar *sort_order= newcs->sort_order;
simple_cs_init_functions(newcs);
newcs->mbminlen= 1;
newcs->mbmaxlen= 1;
@@ -307,21 +356,6 @@ static int add_collation(struct charset_info_st *cs)
newcs->state |= MY_CS_LOADED;
}
newcs->state|= MY_CS_AVAILABLE;
-
- /*
- Check if case sensitive sort order: A < a < B.
- We need MY_CS_FLAG for regex library, and for
- case sensitivity flag for 5.0 client protocol,
- to support isCaseSensitive() method in JDBC driver
- */
- if (sort_order && sort_order['A'] < sort_order['a'] &&
- sort_order['a'] < sort_order['B'])
- newcs->state|= MY_CS_CSSORT;
-
- if (my_charset_is_8bit_pure_ascii(newcs))
- newcs->state|= MY_CS_PUREASCII;
- if (!my_charset_is_ascii_compatible(cs))
- newcs->state|= MY_CS_NONASCII;
}
}
else
@@ -352,7 +386,7 @@ static int add_collation(struct charset_info_st *cs)
cs->name= NULL;
cs->state= 0;
cs->sort_order= NULL;
- cs->state= 0;
+ cs->tailoring= NULL;
}
return MY_XML_OK;
}
@@ -647,6 +681,39 @@ const char *get_charset_name(uint charset_number)
}
+static CHARSET_INFO *inheritance_source_by_id(CHARSET_INFO *cs, uint refid)
+{
+ CHARSET_INFO *refcs;
+ return refid && refid != cs->number &&
+ (refcs= all_charsets[refid]) &&
+ (refcs->state & MY_CS_AVAILABLE) ? refcs : NULL;
+}
+
+
+static CHARSET_INFO *find_collation_data_inheritance_source(CHARSET_INFO *cs)
+{
+ const char *beg, *end;
+ if (cs->tailoring &&
+ !strncmp(cs->tailoring, "[import ", 8) &&
+ (end= strchr(cs->tailoring + 8, ']')) &&
+ (beg= cs->tailoring + 8) + MY_CS_NAME_SIZE > end)
+ {
+ char name[MY_CS_NAME_SIZE + 1];
+ memcpy(name, beg, end - beg);
+ name[end - beg]= '\0';
+ return inheritance_source_by_id(cs, get_collation_number(name));
+ }
+ return NULL;
+}
+
+
+static CHARSET_INFO *find_charset_data_inheritance_source(CHARSET_INFO *cs)
+{
+ uint refid= get_charset_number_internal(cs->csname, MY_CS_PRIMARY);
+ return inheritance_source_by_id(cs, refid);
+}
+
+
static CHARSET_INFO *
get_internal_charset(MY_CHARSET_LOADER *loader, uint cs_number, myf flags)
{
@@ -681,6 +748,19 @@ get_internal_charset(MY_CHARSET_LOADER *loader, uint cs_number, myf flags)
{
if (!(cs->state & MY_CS_READY))
{
+ if (!simple_8bit_charset_data_is_full(cs))
+ {
+ CHARSET_INFO *refcs= find_charset_data_inheritance_source(cs);
+ if (refcs)
+ inherit_charset_data(cs, refcs);
+ }
+ if (!simple_8bit_collation_data_is_full(cs))
+ {
+ CHARSET_INFO *refcl= find_collation_data_inheritance_source(cs);
+ if (refcl)
+ inherit_collation_data(cs, refcl);
+ }
+
if ((cs->cset->init && cs->cset->init(cs, loader)) ||
(cs->coll->init && cs->coll->init(cs, loader)))
{
diff --git a/mysys/checksum.c b/mysys/checksum.c
index a948785d935..40f2ace680d 100644
--- a/mysys/checksum.c
+++ b/mysys/checksum.c
@@ -30,7 +30,13 @@
ha_checksum my_checksum(ha_checksum crc, const uchar *pos, size_t length)
{
+#ifdef HAVE_CRC32_VPMSUM
+ extern unsigned int crc32ieee_vpmsum(unsigned int crc, const unsigned char *p,
+ unsigned long len);
+ crc= (ha_checksum) crc32ieee_vpmsum((uint) crc, pos, (uint) length);
+#else
crc= (ha_checksum) crc32((uint)crc, pos, (uint) length);
+#endif
DBUG_PRINT("info", ("crc: %lu", (ulong) crc));
return crc;
}
diff --git a/mysys/my_context.c b/mysys/my_context.c
index fd9415afc94..1368739ac35 100644
--- a/mysys/my_context.c
+++ b/mysys/my_context.c
@@ -696,30 +696,27 @@ my_context_destroy(struct my_context *c)
int
my_context_spawn(struct my_context *c, void (*f)(void *), void *d)
{
- void *current_fiber;
c->user_func= f;
c->user_arg= d;
+ return my_context_continue(c);
+}
+
+int
+my_context_continue(struct my_context *c)
+{
/*
This seems to be a common trick to run ConvertThreadToFiber() only on the
first occurence in a thread, in a way that works on multiple Windows
versions.
*/
- current_fiber= GetCurrentFiber();
+ void *current_fiber= GetCurrentFiber();
if (current_fiber == NULL || current_fiber == (void *)0x1e00)
current_fiber= ConvertThreadToFiber(c);
c->app_fiber= current_fiber;
DBUG_SWAP_CODE_STATE(&c->dbug_state);
SwitchToFiber(c->lib_fiber);
DBUG_SWAP_CODE_STATE(&c->dbug_state);
- return c->return_value;
-}
-int
-my_context_continue(struct my_context *c)
-{
- DBUG_SWAP_CODE_STATE(&c->dbug_state);
- SwitchToFiber(c->lib_fiber);
- DBUG_SWAP_CODE_STATE(&c->dbug_state);
return c->return_value;
}
diff --git a/mysys/my_crc32.c b/mysys/my_crc32.c
deleted file mode 100644
index 0981c75755d..00000000000
--- a/mysys/my_crc32.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Copyright (c) 2003, 2004 MySQL AB
- Use is subject to license terms
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- 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 Street, Fifth Floor, Boston, MA 02110-1301, USA */
-
-#include "mysys_priv.h"
-
-#ifndef HAVE_COMPRESS
-#undef DYNAMIC_CRC_TABLE
-#include "../zlib/crc32.c"
-#endif
-
diff --git a/mysys/stacktrace.c b/mysys/stacktrace.c
index 4cc767f924d..395659238b3 100644
--- a/mysys/stacktrace.c
+++ b/mysys/stacktrace.c
@@ -129,13 +129,32 @@ static int safe_print_str(const char *addr, int max_len)
#endif
-void my_safe_print_str(const char* val, int max_len)
+/*
+ Attempt to print a char * pointer as a string.
+
+ SYNOPSIS
+ Prints either until the end of string ('\0'), or max_len characters have
+ been printed.
+
+ RETURN VALUE
+ 0 Pointer was within the heap address space.
+ The string was printed fully, or until the end of the heap address space.
+ 1 Pointer is outside the heap address space. Printed as invalid.
+
+ NOTE
+ On some systems, we can have valid pointers outside the heap address space.
+ This is through the use of mmap inside malloc calls. When this function
+ returns 1, it does not mean 100% that the pointer is corrupted.
+*/
+
+int my_safe_print_str(const char* val, int max_len)
{
char *heap_end;
#ifdef __linux__
+ // Try and make use of /proc filesystem to safely print memory contents.
if (!safe_print_str(val, max_len))
- return;
+ return 0;
#endif
heap_end= (char*) sbrk(0);
@@ -143,12 +162,14 @@ void my_safe_print_str(const char* val, int max_len)
if (!PTR_SANE(val))
{
my_safe_printf_stderr("%s", "is an invalid pointer");
- return;
+ return 1;
}
for (; max_len && PTR_SANE(val) && *val; --max_len)
my_write_stderr((val++), 1);
my_safe_printf_stderr("%s", "\n");
+
+ return 0;
}
#if defined(HAVE_PRINTSTACK)
@@ -727,7 +748,7 @@ void my_write_core(int unused)
}
-void my_safe_print_str(const char *val, int len)
+int my_safe_print_str(const char *val, int len)
{
__try
{
@@ -737,6 +758,7 @@ void my_safe_print_str(const char *val, int len)
{
my_safe_printf_stderr("%s", "is an invalid string pointer");
}
+ return 0;
}
#endif /*__WIN__*/
diff --git a/plugin/auth_pam/auth_pam.c b/plugin/auth_pam/auth_pam.c
index 3e3462d3ba0..ac1b3b2da09 100644
--- a/plugin/auth_pam/auth_pam.c
+++ b/plugin/auth_pam/auth_pam.c
@@ -17,6 +17,7 @@
#define _GNU_SOURCE 1 /* for strndup */
#include <mysql/plugin_auth.h>
+#include <stdio.h>
#include <string.h>
#include <security/pam_appl.h>
#include <security/pam_modules.h>
@@ -44,6 +45,13 @@ char *strndup(const char *from, size_t length)
}
#endif
+#ifndef DBUG_OFF
+static char pam_debug = 0;
+#define PAM_DEBUG(X) do { if (pam_debug) { fprintf X; } } while(0)
+#else
+#define PAM_DEBUG(X) /* no-op */
+#endif
+
static int conv(int n, const struct pam_message **msg,
struct pam_response **resp, void *data)
{
@@ -91,12 +99,17 @@ static int conv(int n, const struct pam_message **msg,
4 means "password-like input, echo disabled"
C'est la vie. */
param->buf[0] = msg[i]->msg_style == PAM_PROMPT_ECHO_ON ? 2 : 4;
+ PAM_DEBUG((stderr, "PAM: conv: send(%.*s)\n", (int)(param->ptr - param->buf - 1), param->buf));
if (param->vio->write_packet(param->vio, param->buf, param->ptr - param->buf - 1))
return PAM_CONV_ERR;
pkt_len = param->vio->read_packet(param->vio, &pkt);
if (pkt_len < 0)
+ {
+ PAM_DEBUG((stderr, "PAM: conv: recv() ERROR\n"));
return PAM_CONV_ERR;
+ }
+ PAM_DEBUG((stderr, "PAM: conv: recv(%.*s)\n", pkt_len, pkt));
/* allocate and copy the reply to the response array */
if (!((*resp)[i].resp= strndup((char*) pkt, pkt_len)))
return PAM_CONV_ERR;
@@ -134,9 +147,16 @@ static int pam_auth(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info)
param.ptr = param.buf + 1;
param.vio = vio;
+ PAM_DEBUG((stderr, "PAM: pam_start(%s, %s)\n", service, info->user_name));
DO( pam_start(service, info->user_name, &pam_start_arg, &pamh) );
+
+ PAM_DEBUG((stderr, "PAM: pam_authenticate(0)\n"));
DO( pam_authenticate (pamh, 0) );
+
+ PAM_DEBUG((stderr, "PAM: pam_acct_mgmt(0)\n"));
DO( pam_acct_mgmt(pamh, 0) );
+
+ PAM_DEBUG((stderr, "PAM: pam_get_item(PAM_USER)\n"));
DO( pam_get_item(pamh, PAM_USER, (pam_get_item_3_arg) &new_username) );
if (new_username && strcmp(new_username, info->user_name))
@@ -145,6 +165,7 @@ static int pam_auth(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info)
end:
pam_end(pamh, status);
+ PAM_DEBUG((stderr, "PAM: status = %d user = %s\n", status, new_username));
return status == PAM_SUCCESS ? CR_OK : CR_ERROR;
}
@@ -163,8 +184,17 @@ static MYSQL_SYSVAR_BOOL(use_cleartext_plugin, use_cleartext_plugin,
"supports simple PAM policies that don't require anything besides "
"a password", NULL, NULL, 0);
+#ifndef DBUG_OFF
+static MYSQL_SYSVAR_BOOL(debug, pam_debug, PLUGIN_VAR_OPCMDARG,
+ "Log all PAM activity", NULL, NULL, 0);
+#endif
+
+
static struct st_mysql_sys_var* vars[] = {
MYSQL_SYSVAR(use_cleartext_plugin),
+#ifndef DBUG_OFF
+ MYSQL_SYSVAR(debug),
+#endif
NULL
};
diff --git a/plugin/aws_key_management/aws_key_management_plugin.cc b/plugin/aws_key_management/aws_key_management_plugin.cc
index 3913d2c3145..f4d3c7a52bc 100644
--- a/plugin/aws_key_management/aws_key_management_plugin.cc
+++ b/plugin/aws_key_management/aws_key_management_plugin.cc
@@ -582,6 +582,6 @@ maria_declare_plugin(aws_key_management)
NULL,
settings,
"1.0",
- MariaDB_PLUGIN_MATURITY_EXPERIMENTAL
+ MariaDB_PLUGIN_MATURITY_BETA
}
maria_declare_plugin_end;
diff --git a/plugin/cracklib_password_check/cracklib_password_check.c b/plugin/cracklib_password_check/cracklib_password_check.c
index c593173942d..7861d5fd83e 100644
--- a/plugin/cracklib_password_check/cracklib_password_check.c
+++ b/plugin/cracklib_password_check/cracklib_password_check.c
@@ -78,6 +78,6 @@ maria_declare_plugin(cracklib_password_check)
NULL,
sysvars,
"1.0",
- MariaDB_PLUGIN_MATURITY_GAMMA,
+ MariaDB_PLUGIN_MATURITY_STABLE
}
maria_declare_plugin_end;
diff --git a/plugin/file_key_management/file_key_management_plugin.cc b/plugin/file_key_management/file_key_management_plugin.cc
index 77344bc57ee..a1f1ed1fad4 100644
--- a/plugin/file_key_management/file_key_management_plugin.cc
+++ b/plugin/file_key_management/file_key_management_plugin.cc
@@ -192,6 +192,6 @@ maria_declare_plugin(file_key_management)
NULL, /* status variables */
settings,
"1.0",
- MariaDB_PLUGIN_MATURITY_GAMMA
+ MariaDB_PLUGIN_MATURITY_STABLE
}
maria_declare_plugin_end;
diff --git a/plugin/query_response_time/mysql-test/query_response_time/basic.result b/plugin/query_response_time/mysql-test/query_response_time/basic.result
index 86fba87e056..d2de1b23e5f 100644
--- a/plugin/query_response_time/mysql-test/query_response_time/basic.result
+++ b/plugin/query_response_time/mysql-test/query_response_time/basic.result
@@ -7,7 +7,7 @@ SHOW CREATE TABLE INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
Table Create Table
QUERY_RESPONSE_TIME CREATE TEMPORARY TABLE `QUERY_RESPONSE_TIME` (
`TIME` varchar(14) NOT NULL DEFAULT '',
- `COUNT` int(11) unsigned NOT NULL DEFAULT '0',
+ `COUNT` int(11) unsigned NOT NULL DEFAULT 0,
`TOTAL` varchar(14) NOT NULL DEFAULT ''
) ENGINE=MEMORY DEFAULT CHARSET=utf8
SELECT PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_TYPE, PLUGIN_AUTHOR, PLUGIN_DESCRIPTION, PLUGIN_LICENSE, PLUGIN_MATURITY FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME LIKE 'query_response_time%';;
@@ -24,4 +24,4 @@ PLUGIN_TYPE AUDIT
PLUGIN_AUTHOR Percona and Sergey Vojtovich
PLUGIN_DESCRIPTION Query Response Time Distribution Audit Plugin
PLUGIN_LICENSE GPL
-PLUGIN_MATURITY Gamma
+PLUGIN_MATURITY Stable
diff --git a/plugin/query_response_time/plugin.cc b/plugin/query_response_time/plugin.cc
index 37d52c3ce85..17d0cfe4138 100644
--- a/plugin/query_response_time/plugin.cc
+++ b/plugin/query_response_time/plugin.cc
@@ -159,6 +159,6 @@ maria_declare_plugin(query_response_time)
NULL,
NULL,
"1.0",
- MariaDB_PLUGIN_MATURITY_GAMMA
+ MariaDB_PLUGIN_MATURITY_STABLE
}
maria_declare_plugin_end;
diff --git a/plugin/simple_password_check/simple_password_check.c b/plugin/simple_password_check/simple_password_check.c
index 7ad8bfc811a..8b460c5ed9d 100644
--- a/plugin/simple_password_check/simple_password_check.c
+++ b/plugin/simple_password_check/simple_password_check.c
@@ -14,6 +14,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+#include <my_sys.h>
+#include <mysqld_error.h>
#include <mysql/plugin_password_validation.h>
#include <ctype.h>
#include <string.h>
@@ -49,15 +51,21 @@ static int validate(MYSQL_LEX_STRING *username, MYSQL_LEX_STRING *password)
others < min_others;
}
-
-static void
-fix_min_length(MYSQL_THD thd __attribute__((unused)),
- struct st_mysql_sys_var *var __attribute__((unused)),
- void *var_ptr, const void *save)
+static void fix_min_length(MYSQL_THD thd __attribute__((unused)),
+ struct st_mysql_sys_var *var __attribute__((unused)),
+ void *var_ptr, const void *save)
{
+ uint new_min_length;
*((unsigned int *)var_ptr)= *((unsigned int *)save);
- if (min_length < min_digits + 2 * min_letters + min_others)
- min_length= min_digits + 2 * min_letters + min_others;
+ new_min_length= min_digits + 2 * min_letters + min_others;
+ if (min_length < new_min_length)
+ {
+ my_printf_error(ER_TRUNCATED_WRONG_VALUE,
+ "Adjusted the value of simple_password_check_minimal_length "
+ "from %u to %u", ME_JUST_WARNING,
+ min_length, new_min_length);
+ min_length= new_min_length;
+ }
}
@@ -104,6 +112,6 @@ maria_declare_plugin(simple_password_check)
NULL,
sysvars,
"1.0",
- MariaDB_PLUGIN_MATURITY_GAMMA
+ MariaDB_PLUGIN_MATURITY_STABLE
}
maria_declare_plugin_end;
diff --git a/plugin/userstat/userstat.cc b/plugin/userstat/userstat.cc
index 69832f817c1..96d926ac908 100644
--- a/plugin/userstat/userstat.cc
+++ b/plugin/userstat/userstat.cc
@@ -61,7 +61,7 @@ maria_declare_plugin(userstat)
NULL,
NULL,
"2.0",
- MariaDB_PLUGIN_MATURITY_GAMMA
+ MariaDB_PLUGIN_MATURITY_STABLE
},
{
MYSQL_INFORMATION_SCHEMA_PLUGIN,
@@ -76,7 +76,7 @@ maria_declare_plugin(userstat)
NULL,
NULL,
"2.0",
- MariaDB_PLUGIN_MATURITY_GAMMA
+ MariaDB_PLUGIN_MATURITY_STABLE
}
maria_declare_plugin_end;
diff --git a/plugin/wsrep_info/plugin.cc b/plugin/wsrep_info/plugin.cc
index f9843cb6f39..023011f1d24 100644
--- a/plugin/wsrep_info/plugin.cc
+++ b/plugin/wsrep_info/plugin.cc
@@ -245,7 +245,7 @@ maria_declare_plugin(wsrep_info)
NULL, /* Status variables */
NULL, /* System variables */
"1.0", /* Version (string) */
- MariaDB_PLUGIN_MATURITY_GAMMA /* Maturity */
+ MariaDB_PLUGIN_MATURITY_STABLE /* Maturity */
},
{
MYSQL_INFORMATION_SCHEMA_PLUGIN,
@@ -260,7 +260,7 @@ maria_declare_plugin(wsrep_info)
NULL, /* Status variables */
NULL, /* System variables */
"1.0", /* Version (string) */
- MariaDB_PLUGIN_MATURITY_GAMMA /* Maturity */
+ MariaDB_PLUGIN_MATURITY_STABLE /* Maturity */
}
maria_declare_plugin_end;
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
index dd642487ede..2ef2a1758f7 100644
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -242,6 +242,14 @@ ELSE()
wsrep_sst_xtrabackup-v2
)
ENDIF()
+ IF (NOT WITHOUT_SERVER)
+ SET(SERVER_SCRIPTS
+ mysql_fix_extensions
+ mysqld_multi
+ mysqld_safe
+ mysqldumpslow
+ )
+ ENDIF()
# Configure this one, for testing, but do not install it.
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql_config.pl.in
${CMAKE_CURRENT_BINARY_DIR}/mysql_config.pl ESCAPE_QUOTES @ONLY)
@@ -249,7 +257,6 @@ ELSE()
SET(BIN_SCRIPTS
msql2mysql
mysql_config
- mysql_fix_extensions
mysql_setpermission
mysql_secure_installation
mysqlaccess
@@ -257,9 +264,7 @@ ELSE()
mysql_find_rows
mytop
mysqlhotcopy
- mysqldumpslow
- mysqld_multi
- mysqld_safe
+ ${SERVER_SCRIPTS}
${WSREP_BINARIES}
${SYSTEMD_SCRIPTS}
)
diff --git a/scripts/galera_recovery.sh b/scripts/galera_recovery.sh
index 0e5a42b1676..d734ceb7ac7 100644
--- a/scripts/galera_recovery.sh
+++ b/scripts/galera_recovery.sh
@@ -68,7 +68,8 @@ parse_arguments() {
wsrep_recover_position() {
# Redirect server's error log to the log file.
- eval /usr/sbin/mysqld $cmdline_args --user=$user --wsrep_recover 2> "$log_file"
+ eval /usr/sbin/mysqld $cmdline_args --user=$user --wsrep_recover \
+ --log-error="$log_file"
ret=$?
if [ $ret -ne 0 ]; then
# Something went wrong, let us also print the error log so that it
diff --git a/scripts/mysql_secure_installation.pl.in b/scripts/mysql_secure_installation.pl.in
index 188a6bd7104..32331c3d601 100644
--- a/scripts/mysql_secure_installation.pl.in
+++ b/scripts/mysql_secure_installation.pl.in
@@ -217,7 +217,7 @@ sub remove_remote_root {
sub remove_test_database {
print " - Dropping test database...\n";
- if (do_query("DROP DATABASE test;")) {
+ if (do_query("DROP DATABASE IF EXISTS test;")) {
print " ... Success!\n";
} else {
print " ... Failed! Not critical, keep moving...\n";
diff --git a/scripts/mysql_secure_installation.sh b/scripts/mysql_secure_installation.sh
index 82ea1b60a17..2c3b2f8dc8c 100644
--- a/scripts/mysql_secure_installation.sh
+++ b/scripts/mysql_secure_installation.sh
@@ -332,7 +332,7 @@ remove_remote_root() {
remove_test_database() {
echo " - Dropping test database..."
- do_query "DROP DATABASE test;"
+ do_query "DROP DATABASE IF EXISTS test;"
if [ $? -eq 0 ]; then
echo " ... Success!"
else
diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh
index 5f67507b577..f173a861e85 100644
--- a/scripts/wsrep_sst_common.sh
+++ b/scripts/wsrep_sst_common.sh
@@ -188,7 +188,7 @@ wsrep_log_info()
wsrep_cleanup_progress_file()
{
- [ -n "$SST_PROGRESS_FILE" ] && rm -f "$SST_PROGRESS_FILE" 2>/dev/null
+ [ -n "${SST_PROGRESS_FILE:-}" ] && rm -f "$SST_PROGRESS_FILE" 2>/dev/null || true
}
wsrep_check_program()
diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh
index 7e895aa4eb2..10d6896accd 100644
--- a/scripts/wsrep_sst_rsync.sh
+++ b/scripts/wsrep_sst_rsync.sh
@@ -222,7 +222,8 @@ then
[ "$OS" == "Linux" ] && count=$(grep -c processor /proc/cpuinfo)
[ "$OS" == "Darwin" -o "$OS" == "FreeBSD" ] && count=$(sysctl -n hw.ncpu)
- find . -maxdepth 1 -mindepth 1 -type d -print0 | xargs -I{} -0 -P $count \
+ find . -maxdepth 1 -mindepth 1 -type d -not -name "lost+found" -print0 | \
+ xargs -I{} -0 -P $count \
rsync --owner --group --perms --links --specials \
--ignore-times --inplace --recursive --delete --quiet \
$WHOLE_FILE_OPT --exclude '*/ib_logfile*' "$WSREP_SST_OPT_DATA"/{}/ \
diff --git a/scripts/wsrep_sst_xtrabackup-v2.sh b/scripts/wsrep_sst_xtrabackup-v2.sh
index a836d5e0edd..63febe556da 100644
--- a/scripts/wsrep_sst_xtrabackup-v2.sh
+++ b/scripts/wsrep_sst_xtrabackup-v2.sh
@@ -689,6 +689,7 @@ then
if [ $WSREP_SST_OPT_BYPASS -eq 0 ]
then
+ usrst=0
if [[ -z $sst_ver ]];then
wsrep_log_error "Upgrade joiner to 5.6.21 or higher for backup locks support"
wsrep_log_error "The joiner is not supported for this version of donor"
@@ -704,13 +705,14 @@ then
itmpdir=$(mktemp -d)
wsrep_log_info "Using $itmpdir as innobackupex temporary directory"
- if [ "$WSREP_SST_OPT_USER" != "(null)" ]; then
+ if [[ -n "${WSREP_SST_OPT_USER:-}" && "$WSREP_SST_OPT_USER" != "(null)" ]]; then
INNOEXTRA+=" --user=$WSREP_SST_OPT_USER"
+ usrst=1
fi
if [ -n "${WSREP_SST_OPT_PSWD:-}" ]; then
INNOEXTRA+=" --password=$WSREP_SST_OPT_PSWD"
- else
+ elif [[ $usrst -eq 1 ]];then
# Empty password, used for testing, debugging etc.
INNOEXTRA+=" --password="
fi
diff --git a/scripts/wsrep_sst_xtrabackup.sh b/scripts/wsrep_sst_xtrabackup.sh
index 2247edec7fd..22923ab3e88 100644
--- a/scripts/wsrep_sst_xtrabackup.sh
+++ b/scripts/wsrep_sst_xtrabackup.sh
@@ -436,15 +436,17 @@ then
if [ $WSREP_SST_OPT_BYPASS -eq 0 ]
then
+ usrst=0
TMPDIR="${TMPDIR:-/tmp}"
- if [ "$WSREP_SST_OPT_USER" != "(null)" ]; then
+ if [[ -n "${WSREP_SST_OPT_USER:-}" && "$WSREP_SST_OPT_USER" != "(null)" ]]; then
INNOEXTRA+=" --user=$WSREP_SST_OPT_USER"
+ usrst=1
fi
if [ -n "${WSREP_SST_OPT_PSWD:-}" ]; then
INNOEXTRA+=" --password=$WSREP_SST_OPT_PSWD"
- else
+ elif [[ $usrst -eq 1 ]];then
# Empty password, used for testing, debugging etc.
INNOEXTRA+=" --password="
fi
diff --git a/sql-bench/server-cfg.sh b/sql-bench/server-cfg.sh
index 892d301c70d..7e83b7365e3 100644
--- a/sql-bench/server-cfg.sh
+++ b/sql-bench/server-cfg.sh
@@ -204,6 +204,11 @@ sub new
$limits{'max_temporary_tables'}= $limits{"max_tables"};
$self->{'transactions'} = 1; # Transactions enabled
}
+ if (defined($main::opt_create_options) &&
+ $main::opt_create_options =~ /engine=tokudb/i)
+ {
+ $self->{'transactions'} = 1; # Transactions enabled
+ }
return $self;
}
diff --git a/sql-bench/test-table-elimination.sh b/sql-bench/test-table-elimination.sh
index 7772cab42b0..de440fc0633 100755
--- a/sql-bench/test-table-elimination.sh
+++ b/sql-bench/test-table-elimination.sh
@@ -305,6 +305,7 @@ if ($opt_lock_tables)
if (!$opt_skip_delete)
{
do_query($dbh,"drop table elim_facts, elim_attr1, elim_attr2" . $server->{'drop_attr'});
+ $dbh->do("drop view elim_current_facts");
}
if ($opt_fast && defined($server->{vacuum}))
diff --git a/sql-common/client.c b/sql-common/client.c
index fdb17a63ba5..c900ec6800f 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -3118,7 +3118,6 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
DBUG_RETURN(0);
mysql->methods= &client_methods;
- net->vio = 0; /* If something goes wrong */
mysql->client_flag=0; /* For handshake */
/* use default options */
@@ -3643,6 +3642,9 @@ error:
/* Free alloced memory */
end_server(mysql);
mysql_close_free(mysql);
+ if (!(client_flag & CLIENT_REMEMBER_OPTIONS) &&
+ !mysql->options.extension->async_context)
+ mysql_close_free_options(mysql);
}
DBUG_RETURN(0);
}
@@ -3713,7 +3715,7 @@ my_bool mysql_reconnect(MYSQL *mysql)
}
if (!mysql_real_connect(&tmp_mysql,mysql->host,mysql->user,mysql->passwd,
mysql->db, mysql->port, mysql->unix_socket,
- mysql->client_flag))
+ mysql->client_flag | CLIENT_REMEMBER_OPTIONS))
{
if (ctxt)
my_context_install_suspend_resume_hook(ctxt, NULL, NULL);
diff --git a/sql-common/my_time.c b/sql-common/my_time.c
index 28757a2c96c..7cf8692a3f6 100644
--- a/sql-common/my_time.c
+++ b/sql-common/my_time.c
@@ -224,7 +224,7 @@ my_bool check_datetime_range(const MYSQL_TIME *ltime)
ltime->minute > 59 || ltime->second > 59 ||
ltime->second_part > TIME_MAX_SECOND_PART ||
(ltime->hour >
- (ltime->time_type == MYSQL_TIMESTAMP_TIME ? TIME_MAX_HOUR : 23));
+ (uint) (ltime->time_type == MYSQL_TIMESTAMP_TIME ? TIME_MAX_HOUR : 23));
}
@@ -237,7 +237,7 @@ static void get_microseconds(ulong *val, MYSQL_TIME_STATUS *status,
if (get_digits(&tmp, number_of_fields, str, end, 6))
status->warnings|= MYSQL_TIME_WARN_TRUNCATED;
if ((status->precision= (*str - start)) < 6)
- *val= tmp * log_10_int[6 - (*str - start)];
+ *val= (ulong) (tmp * log_10_int[6 - (*str - start)]);
else
*val= tmp;
if (skip_digits(str, end))
diff --git a/sql-common/mysql_async.c b/sql-common/mysql_async.c
index 80b4f390641..decf48e0e69 100644
--- a/sql-common/mysql_async.c
+++ b/sql-common/mysql_async.c
@@ -455,7 +455,11 @@ MK_ASYNC_START_BODY(
parms.db= db;
parms.port= port;
parms.unix_socket= unix_socket;
- parms.client_flags= client_flags;
+ /*
+ async wrapper enforce the CLIENT_REMEMBER_OPTIONS flag to be
+ functional (otherwise it can't operate)
+ */
+ parms.client_flags= client_flags | CLIENT_REMEMBER_OPTIONS;
},
NULL,
r_ptr,
diff --git a/sql-common/pack.c b/sql-common/pack.c
index 4bb4a0b7a4e..5428feb623e 100644
--- a/sql-common/pack.c
+++ b/sql-common/pack.c
@@ -186,3 +186,25 @@ uchar *safe_net_store_length(uchar *packet, size_t packet_len, ulonglong length)
return packet+8;
}
+
+/**
+ The length of space required to store the resulting length-encoded integer
+ for the given number. This function can be used at places where one needs to
+ dynamically allocate the buffer for a given number to be stored as length-
+ encoded integer.
+
+ @param num [IN] the input number
+
+ @return length of buffer needed to store this number [1, 3, 4, 9].
+*/
+
+uint net_length_size(ulonglong num)
+{
+ if (num < (ulonglong) 251LL)
+ return 1;
+ if (num < (ulonglong) 65536LL)
+ return 3;
+ if (num < (ulonglong) 16777216LL)
+ return 4;
+ return 9;
+}
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
index 089d793b2b0..a18294e5ae3 100644
--- a/sql/CMakeLists.txt
+++ b/sql/CMakeLists.txt
@@ -95,7 +95,9 @@ SET (SQL_SOURCE
../sql-common/client_plugin.c
opt_range.cc opt_range.h opt_sum.cc
../sql-common/pack.c parse_file.cc password.c procedure.cc
- protocol.cc records.cc repl_failsafe.cc rpl_filter.cc set_var.cc
+ protocol.cc records.cc repl_failsafe.cc rpl_filter.cc
+ session_tracker.cc
+ set_var.cc
slave.cc sp.cc sp_cache.cc sp_head.cc sp_pcontext.cc
sp_rcontext.cc spatial.cc sql_acl.cc sql_analyse.cc sql_base.cc
sql_cache.cc sql_class.cc sql_client.cc sql_crypt.cc sql_crypt.h
diff --git a/sql/contributors.h b/sql/contributors.h
index 76674d654e5..f52d3243453 100644
--- a/sql/contributors.h
+++ b/sql/contributors.h
@@ -36,17 +36,16 @@ struct show_table_contributors_st {
*/
struct show_table_contributors_st show_table_contributors[]= {
- /* MariaDB foundation members, in contribution, size , time order */
- {"Booking.com", "http://www.booking.com", "Founding member of the MariaDB Foundation"},
- {"MariaDB Corporation", "https://mariadb.com", "Founding member of the MariaDB Foundation"},
- {"Auttomattic", "http://automattic.com", "Member of the MariaDB Foundation"},
- {"Visma", "http://visma.com", "Member of the MariaDB Foundation"},
- {"Nexedi", "http://www.nexedi.com", "Member of the MariaDB Foundation"},
- {"Acronis", "http://www.acronis.com", "Member of the MariaDB Foundation"},
-
- /* Smaller sponsors, newer per year */
- {"Verkkokauppa.com", "Finland", "Sponsor of the MariaDB Foundation"},
- {"Virtuozzo", "https://virtuozzo.com/", "Sponsor of the MariaDB Foundation"},
+ /* MariaDB foundation sponsors, in contribution, size , time order */
+ {"Booking.com", "http://www.booking.com", "Founding member, Platinum Sponsor of the MariaDB Foundation"},
+ {"MariaDB Corporation", "https://mariadb.com", "Founding member, Gold Sponsor of the MariaDB Foundation"},
+ {"Visma", "http://visma.com", "Gold Sponsor of the MariaDB Foundation"},
+ {"DBS", "http://dbs.com", "Gold Sponsor of the MariaDB Foundation"},
+ {"Nexedi", "https://www.nexedi.com", "Silver Sponsor of the MariaDB Foundation"},
+ {"Acronis", "http://www.acronis.com", "Silver Sponsor of the MariaDB Foundation"},
+ {"Auttomattic", "https://automattic.com", "Bronze Sponsor of the MariaDB Foundation"},
+ {"Verkkokauppa.com", "https://virtuozzo.com", "Bronze Sponsor of the MariaDB Foundation"},
+ {"Virtuozzo", "https://virtuozzo.com/", "Bronze Sponsor of the MariaDB Foundation"},
/* Sponsors of important features */
{"Google", "USA", "Sponsoring encryption, parallel replication and GTID"},
diff --git a/sql/field.cc b/sql/field.cc
index bd7f7c3f689..ba0ebb253f4 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -4920,12 +4920,12 @@ void Field_double::sql_type(String &res) const
field has NOW() as default and is updated when row changes, else it is
field which has 0 as default value and is not automatically updated.
TIMESTAMP_DN_FIELD - field with NOW() as default but not set on update
- automatically (TIMESTAMP DEFAULT NOW())
+ automatically (TIMESTAMP DEFAULT NOW()), not used in Field since 10.2.2
TIMESTAMP_UN_FIELD - field which is set on update automatically but has not
NOW() as default (but it may has 0 or some other const timestamp as
default) (TIMESTAMP ON UPDATE NOW()).
TIMESTAMP_DNUN_FIELD - field which has now() as default and is auto-set on
- update. (TIMESTAMP DEFAULT NOW() ON UPDATE NOW())
+ update. (TIMESTAMP DEFAULT NOW() ON UPDATE NOW()), not used in Field since 10.2.2
NONE - field which is not auto-set on update with some other than NOW()
default value (TIMESTAMP DEFAULT 0).
@@ -4956,8 +4956,8 @@ Field_timestamp::Field_timestamp(uchar *ptr_arg, uint32 len_arg,
this field will be automaticly updated on insert.
*/
flags|= TIMESTAMP_FLAG;
- if (unireg_check != TIMESTAMP_DN_FIELD)
- flags|= ON_UPDATE_NOW_FLAG;
+ flags|= ON_UPDATE_NOW_FLAG;
+ DBUG_ASSERT(unireg_check == TIMESTAMP_UN_FIELD);
}
}
@@ -9801,10 +9801,11 @@ bool check_expression(Virtual_column_info *vcol, const char *type,
ret= vcol->expr_item->walk(&Item::check_vcol_func_processor, 0, &res);
vcol->flags= res.errors;
- if (ret ||
- (res.errors &
- (VCOL_IMPOSSIBLE |
- (must_be_determinstic ? VCOL_NON_DETERMINISTIC | VCOL_TIME_FUNC: 0))))
+ uint filter= VCOL_IMPOSSIBLE;
+ if (must_be_determinstic)
+ filter|= VCOL_NOT_STRICTLY_DETERMINISTIC;
+
+ if (ret || (res.errors & filter))
{
my_error(ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED, MYF(0), res.name,
type, name);
@@ -9862,59 +9863,43 @@ bool Column_definition::check(THD *thd)
}
}
}
+
if (default_value && (flags & AUTO_INCREMENT_FLAG))
{
my_error(ER_INVALID_DEFAULT, MYF(0), field_name);
DBUG_RETURN(1);
}
- if (default_value && !default_value->expr_item->basic_const_item())
+ if (default_value && !default_value->expr_item->basic_const_item() &&
+ mysql_type_to_time_type(sql_type) == MYSQL_TIMESTAMP_DATETIME &&
+ default_value->expr_item->type() == Item::FUNC_ITEM)
{
- Item *def_expr= default_value->expr_item;
-
- unireg_check= Field::NONE;
/*
- NOW() for TIMESTAMP and DATETIME fields are handled as in MariaDB 10.1
- by marking them in unireg_check.
+ Special case: NOW() for TIMESTAMP and DATETIME fields are handled
+ as in MariaDB 10.1 by marking them in unireg_check.
*/
- if (def_expr->type() == Item::FUNC_ITEM &&
- (static_cast<Item_func*>(def_expr)->functype() ==
- Item_func::NOW_FUNC &&
- (mysql_type_to_time_type(sql_type) == MYSQL_TIMESTAMP_DATETIME)))
+ Item_func *fn= static_cast<Item_func*>(default_value->expr_item);
+ if (fn->functype() == Item_func::NOW_FUNC &&
+ (fn->decimals == 0 || fn->decimals >= length))
{
- /*
- We are not checking the number of decimals for timestamps
- to allow one to write (for historical reasons)
- TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP
- Instead we are going to use the number of decimals specifed by the
- column.
- */
default_value= 0;
- unireg_check= (on_update ?
- Field::TIMESTAMP_DNUN_FIELD : // for insertions and for updates.
- Field::TIMESTAMP_DN_FIELD); // only for insertions.
+ unireg_check= Field::TIMESTAMP_DN_FIELD;
}
- else if (on_update)
- unireg_check= Field::TIMESTAMP_UN_FIELD; // function default for updates
- }
- else
- {
- /* No function default for insertions. Either NULL or a constant. */
- if (on_update)
- unireg_check= Field::TIMESTAMP_UN_FIELD; // function default for updates
- else
- unireg_check= ((flags & AUTO_INCREMENT_FLAG) ?
- Field::NEXT_NUMBER : // Automatic increment.
- Field::NONE);
}
- if (on_update &&
- (mysql_type_to_time_type(sql_type) != MYSQL_TIMESTAMP_DATETIME ||
- on_update->decimals < length))
+ if (on_update)
{
- my_error(ER_INVALID_ON_UPDATE, MYF(0), field_name);
- DBUG_RETURN(TRUE);
+ if (mysql_type_to_time_type(sql_type) != MYSQL_TIMESTAMP_DATETIME ||
+ on_update->decimals < length)
+ {
+ my_error(ER_INVALID_ON_UPDATE, MYF(0), field_name);
+ DBUG_RETURN(TRUE);
+ }
+ unireg_check= unireg_check == Field::NONE ? Field::TIMESTAMP_UN_FIELD
+ : Field::TIMESTAMP_DNUN_FIELD;
}
+ else if (flags & AUTO_INCREMENT_FLAG)
+ unireg_check= Field::NEXT_NUMBER;
sign_len= flags & UNSIGNED_FLAG ? 0 : 1;
@@ -10497,8 +10482,8 @@ Column_definition::Column_definition(THD *thd, Field *old_field,
comment= old_field->comment;
decimals= old_field->decimals();
vcol_info= old_field->vcol_info;
- default_value= old_field->default_value;
- check_constraint= old_field->check_constraint;
+ default_value= orig_field ? orig_field->default_value : 0;
+ check_constraint= orig_field ? orig_field->check_constraint : 0;
option_list= old_field->option_list;
switch (sql_type) {
@@ -10576,40 +10561,24 @@ Column_definition::Column_definition(THD *thd, Field *old_field,
- The column didn't have a default expression
*/
if (!(flags & (NO_DEFAULT_VALUE_FLAG | BLOB_FLAG)) &&
- old_field->ptr != NULL &&
- orig_field != NULL &&
- !default_value)
+ old_field->ptr != NULL && orig_field != NULL)
{
- bool default_now= false;
- if (real_type_with_now_as_default(sql_type))
- {
- // The SQL type of the new field allows a function default:
- default_now= orig_field->has_insert_default_function();
- bool update_now= orig_field->has_update_default_function();
-
- if (default_now && update_now)
- unireg_check= Field::TIMESTAMP_DNUN_FIELD;
- else if (default_now)
- unireg_check= Field::TIMESTAMP_DN_FIELD;
- else if (update_now)
- unireg_check= Field::TIMESTAMP_UN_FIELD;
- }
- if (!default_now) // Give a constant default
+ if (orig_field->has_update_default_function())
+ unireg_check= Field::TIMESTAMP_UN_FIELD;
+
+ /* Get the value from default_values */
+ const uchar *dv= orig_field->table->s->default_values;
+ if (!default_value && !orig_field->is_null_in_record(dv))
{
- /* Get the value from default_values */
- const uchar *dv= orig_field->table->s->default_values;
- if (!orig_field->is_null_in_record(dv))
- {
- StringBuffer<MAX_FIELD_WIDTH> tmp(charset);
- String *res= orig_field->val_str(&tmp, orig_field->ptr_in_record(dv));
- char *pos= (char*) thd->strmake(res->ptr(), res->length());
- default_value= new (thd->mem_root) Virtual_column_info();
- default_value->expr_str.str= pos;
- default_value->expr_str.length= res->length();
- default_value->expr_item=
- new (thd->mem_root) Item_string(thd, pos, res->length(), charset);
- default_value->utf8= 0;
- }
+ StringBuffer<MAX_FIELD_WIDTH> tmp(charset);
+ String *res= orig_field->val_str(&tmp, orig_field->ptr_in_record(dv));
+ char *pos= (char*) thd->strmake(res->ptr(), res->length());
+ default_value= new (thd->mem_root) Virtual_column_info();
+ default_value->expr_str.str= pos;
+ default_value->expr_str.length= res->length();
+ default_value->expr_item=
+ new (thd->mem_root) Item_string(thd, pos, res->length(), charset);
+ default_value->utf8= 0;
}
}
}
diff --git a/sql/field.h b/sql/field.h
index 13a0e914845..f550dad1c6c 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -474,20 +474,6 @@ inline bool is_temporal_type_with_date(enum_field_types type)
/**
- Tests if a field real type can have "DEFAULT CURRENT_TIMESTAMP"
-
- @param type Field type, as returned by field->real_type().
- @retval true If field real type can have "DEFAULT CURRENT_TIMESTAMP".
- @retval false If field real type can not have "DEFAULT CURRENT_TIMESTAMP".
-*/
-inline bool real_type_with_now_as_default(enum_field_types type)
-{
- return type == MYSQL_TYPE_TIMESTAMP || type == MYSQL_TYPE_TIMESTAMP2 ||
- type == MYSQL_TYPE_DATETIME || type == MYSQL_TYPE_DATETIME2;
-}
-
-
-/**
Recognizer for concrete data type (called real_type for some reason),
returning true if it is one of the TIMESTAMP types.
*/
@@ -574,12 +560,19 @@ inline bool is_temporal_type_with_time(enum_field_types type)
}
}
-/* Bits for type of vcol expression */
-#define VCOL_DETERMINISTIC 0 /* Normal (no bit set) */
-#define VCOL_UNKNOWN 1 /* UDF used; Need fix_fields() to know */
+/*
+ Flags for Virtual_column_info. If none is set, the expression must be
+ a constant with no side-effects, so it's calculated at CREATE TABLE time,
+ stored in table->record[2], and not recalculated for every statement.
+*/
+#define VCOL_FIELD_REF 1
#define VCOL_NON_DETERMINISTIC 2
-#define VCOL_TIME_FUNC 4
-#define VCOL_IMPOSSIBLE 8
+#define VCOL_SESSION_FUNC 4 /* uses session data, e.g. USER or DAYNAME */
+#define VCOL_TIME_FUNC 8
+#define VCOL_IMPOSSIBLE 16
+
+#define VCOL_NOT_STRICTLY_DETERMINISTIC \
+ (VCOL_NON_DETERMINISTIC | VCOL_TIME_FUNC | VCOL_SESSION_FUNC)
/*
Virtual_column_info is the class to contain additional
@@ -921,16 +914,9 @@ public:
}
virtual void set_default();
- bool has_insert_default_function() const
- {
- return (unireg_check == TIMESTAMP_DN_FIELD ||
- unireg_check == TIMESTAMP_DNUN_FIELD);
- }
-
bool has_update_default_function() const
{
- return (unireg_check == TIMESTAMP_UN_FIELD ||
- unireg_check == TIMESTAMP_DNUN_FIELD);
+ return unireg_check == TIMESTAMP_UN_FIELD;
}
/*
@@ -2370,21 +2356,7 @@ public:
void sql_type(String &str) const;
bool zero_pack() const { return 0; }
virtual int set_time();
- virtual void set_default()
- {
- if (has_insert_default_function())
- set_time();
- else
- Field::set_default();
- }
virtual void set_explicit_default(Item *value);
- virtual int evaluate_insert_default_function()
- {
- int res= 0;
- if (has_insert_default_function())
- res= set_time();
- return res;
- }
virtual int evaluate_update_default_function()
{
int res= 0;
@@ -2814,20 +2786,6 @@ public:
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
{ return Field_datetime::get_TIME(ltime, ptr, fuzzydate); }
virtual int set_time();
- virtual void set_default()
- {
- if (has_insert_default_function())
- set_time();
- else
- Field::set_default();
- }
- virtual int evaluate_insert_default_function()
- {
- int res= 0;
- if (has_insert_default_function())
- res= set_time();
- return res;
- }
virtual int evaluate_update_default_function()
{
int res= 0;
@@ -3806,9 +3764,7 @@ public:
bool has_default_function() const
{
- return (unireg_check == Field::TIMESTAMP_DN_FIELD ||
- unireg_check == Field::TIMESTAMP_DNUN_FIELD ||
- unireg_check == Field::TIMESTAMP_UN_FIELD ||
+ return (unireg_check == Field::TIMESTAMP_UN_FIELD ||
unireg_check == Field::NEXT_NUMBER);
}
diff --git a/sql/handler.cc b/sql/handler.cc
index 7307afb6cd2..d7481f8e8ea 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -1359,7 +1359,8 @@ int ha_commit_trans(THD *thd, bool all)
uint rw_ha_count= ha_check_and_coalesce_trx_read_only(thd, ha_info, all);
/* rw_trans is TRUE when we in a transaction changing data */
- bool rw_trans= is_real_trans && (rw_ha_count > 0);
+ bool rw_trans= is_real_trans &&
+ (rw_ha_count > !thd->is_current_stmt_binlog_disabled());
MDL_request mdl_request;
DBUG_PRINT("info", ("is_real_trans: %d rw_trans: %d rw_ha_count: %d",
is_real_trans, rw_trans, rw_ha_count));
@@ -2735,6 +2736,15 @@ int handler::ha_index_next_same(uchar *buf, const uchar *key, uint keylen)
return result;
}
+
+bool handler::ha_was_semi_consistent_read()
+{
+ bool result= was_semi_consistent_read();
+ if (result)
+ increment_statistics(&SSV::ha_read_retry_count);
+ return result;
+}
+
/* Initialize handler for random reading, with error handling */
int handler::ha_rnd_init_with_error(bool scan)
@@ -5877,6 +5887,26 @@ int handler::ha_reset()
}
+static int check_wsrep_max_ws_rows()
+{
+#ifdef WITH_WSREP
+ if (wsrep_max_ws_rows)
+ {
+ THD *thd= current_thd;
+ thd->wsrep_affected_rows++;
+ if (thd->wsrep_exec_mode != REPL_RECV &&
+ thd->wsrep_affected_rows > wsrep_max_ws_rows)
+ {
+ trans_rollback_stmt(thd) || trans_rollback(thd);
+ my_message(ER_ERROR_DURING_COMMIT, "wsrep_max_ws_rows exceeded", MYF(0));
+ return ER_ERROR_DURING_COMMIT;
+ }
+ }
+#endif /* WITH_WSREP */
+ return 0;
+}
+
+
int handler::ha_write_row(uchar *buf)
{
int error;
@@ -5900,7 +5930,7 @@ int handler::ha_write_row(uchar *buf)
error= binlog_log_row(table, 0, buf, log_func);
}
DEBUG_SYNC_C("ha_write_row_end");
- DBUG_RETURN(error);
+ DBUG_RETURN(error ? error : check_wsrep_max_ws_rows());
}
@@ -5931,7 +5961,7 @@ int handler::ha_update_row(const uchar *old_data, uchar *new_data)
rows_changed++;
error= binlog_log_row(table, old_data, new_data, log_func);
}
- return error;
+ return error ? error : check_wsrep_max_ws_rows();
}
int handler::ha_delete_row(const uchar *buf)
@@ -5958,7 +5988,7 @@ int handler::ha_delete_row(const uchar *buf)
rows_changed++;
error= binlog_log_row(table, buf, 0, log_func);
}
- return error;
+ return error ? error : check_wsrep_max_ws_rows();
}
@@ -6089,7 +6119,10 @@ int ha_abort_transaction(THD *bf_thd, THD *victim_thd, my_bool signal)
DBUG_RETURN(0);
}
- THD_TRANS *trans= &victim_thd->transaction.all;
+ /* Try statement transaction if standard one is not set. */
+ THD_TRANS *trans= (victim_thd->transaction.all.ha_list) ?
+ &victim_thd->transaction.all : &victim_thd->transaction.stmt;
+
Ha_trx_info *ha_info= trans->ha_list, *ha_info_next;
for (; ha_info; ha_info= ha_info_next)
@@ -6097,8 +6130,8 @@ int ha_abort_transaction(THD *bf_thd, THD *victim_thd, my_bool signal)
handlerton *hton= ha_info->ht();
if (!hton->abort_transaction)
{
- /* Skip warning for binlog SE */
- if (hton->db_type != DB_TYPE_BINLOG)
+ /* Skip warning for binlog & wsrep. */
+ if (hton->db_type != DB_TYPE_BINLOG && hton != wsrep_hton)
{
WSREP_WARN("Cannot abort transaction.");
}
diff --git a/sql/handler.h b/sql/handler.h
index dbf05759dfc..fbb620c696c 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -3233,6 +3233,7 @@ public:
If this method returns nonzero, it will also signal the storage
engine that the next read will be a locking re-read of the row.
*/
+ bool ha_was_semi_consistent_read();
virtual bool was_semi_consistent_read() { return 0; }
/**
Tell the engine whether it should avoid unnecessary lock waits.
diff --git a/sql/item.cc b/sql/item.cc
index 2fb507cd720..d461386a696 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -57,6 +57,17 @@ bool cmp_items(Item *a, Item *b)
}
+/**
+ Set max_sum_func_level if it is needed
+*/
+inline void set_max_sum_func_level(THD *thd, SELECT_LEX *select)
+{
+ if (thd->lex->in_sum_func &&
+ thd->lex->in_sum_func->nest_level >= select->nest_level)
+ set_if_bigger(thd->lex->in_sum_func->max_sum_func_level,
+ select->nest_level - 1);
+}
+
/*****************************************************************************
** Item functions
*****************************************************************************/
@@ -488,6 +499,7 @@ Item::Item(THD *thd):
}
}
+
/**
Constructor used by Item_field, Item_ref & aggregate (sum)
functions.
@@ -956,8 +968,7 @@ bool Item_field::check_field_expression_processor(void *arg)
{
if (field->flags & NO_DEFAULT_VALUE_FLAG)
return 0;
- if ((field->default_value || field->has_insert_default_function() ||
- field->vcol_info))
+ if ((field->default_value && field->default_value->flags) || field->vcol_info)
{
Field *org_field= (Field*) arg;
if (field == org_field ||
@@ -2079,6 +2090,9 @@ bool DTCollation::aggregate(const DTCollation &dt, uint flags)
set(0, DERIVATION_NONE, 0);
return 1;
}
+ if (collation->state & MY_CS_BINSORT &&
+ dt.collation->state & MY_CS_BINSORT)
+ return 1;
if (collation->state & MY_CS_BINSORT)
return 0;
if (dt.collation->state & MY_CS_BINSORT)
@@ -2259,6 +2273,83 @@ bool Item_func_or_sum::agg_item_set_converter(const DTCollation &coll,
}
+/**
+ @brief
+ Building clone for Item_func_or_sum
+
+ @param thd thread handle
+ @param mem_root part of the memory for the clone
+
+ @details
+ This method gets copy of the current item and also
+ build clones for its referencies. For the referencies
+ build_copy is called again.
+
+ @retval
+ clone of the item
+ 0 if an error occured
+*/
+
+Item* Item_func_or_sum::build_clone(THD *thd, MEM_ROOT *mem_root)
+{
+ Item_func_or_sum *copy= (Item_func_or_sum *) get_copy(thd, mem_root);
+ if (!copy)
+ return 0;
+ if (arg_count > 2)
+ {
+ copy->args=
+ (Item**) alloc_root(mem_root, sizeof(Item*) * arg_count);
+ if (!copy->args)
+ return 0;
+ }
+ else if (arg_count > 0)
+ copy->args= copy->tmp_arg;
+
+
+ for (uint i= 0; i < arg_count; i++)
+ {
+ Item *arg_clone= args[i]->build_clone(thd, mem_root);
+ if (!arg_clone)
+ return 0;
+ copy->args[i]= arg_clone;
+ }
+ return copy;
+}
+
+
+/**
+ @brief
+ Building clone for Item_ref
+
+ @param thd thread handle
+ @param mem_root part of the memory for the clone
+
+ @details
+ This method gets copy of the current item and also
+ builds clone for its reference.
+
+ @retval
+ clone of the item
+ 0 if an error occured
+*/
+
+Item* Item_ref::build_clone(THD *thd, MEM_ROOT *mem_root)
+{
+ Item_ref *copy= (Item_ref *) get_copy(thd, mem_root);
+ if (!copy)
+ return 0;
+ copy->ref=
+ (Item**) alloc_root(mem_root, sizeof(Item*));
+ if (!copy->ref)
+ return 0;
+ Item *item_clone= (* ref)->build_clone(thd, mem_root);
+ if (!item_clone)
+ return 0;
+ *copy->ref= item_clone;
+ return copy;
+}
+
+
void Item_ident_for_show::make_field(THD *thd, Send_field *tmp_field)
{
tmp_field->table_name= tmp_field->org_table_name= table_name;
@@ -4961,6 +5052,11 @@ Item_field::fix_outer_field(THD *thd, Field **from_field, Item **reference)
if (rf->fix_fields(thd, reference) || rf->check_cols(1))
return -1;
+ /*
+ We can not "move" aggregate function in the place where
+ its arguments are not defined.
+ */
+ set_max_sum_func_level(thd, select);
mark_as_dependent(thd, last_checked_context->select_lex,
context->select_lex, rf,
rf);
@@ -4969,6 +5065,11 @@ Item_field::fix_outer_field(THD *thd, Field **from_field, Item **reference)
}
else
{
+ /*
+ We can not "move" aggregate function in the place where
+ its arguments are not defined.
+ */
+ set_max_sum_func_level(thd, select);
mark_as_dependent(thd, last_checked_context->select_lex,
context->select_lex,
this, (Item_ident*)*reference);
@@ -5100,6 +5201,11 @@ bool Item_field::fix_fields(THD *thd, Item **reference)
return(1);
}
+ /*
+ We can not "move" aggregate function in the place where
+ its arguments are not defined.
+ */
+ set_max_sum_func_level(thd, thd->lex->current_select);
set_field(new_field);
return 0;
}
@@ -5124,6 +5230,11 @@ bool Item_field::fix_fields(THD *thd, Item **reference)
select->parsing_place == IN_GROUP_BY &&
alias_name_used ? *rf->ref : rf);
+ /*
+ We can not "move" aggregate function in the place where
+ its arguments are not defined.
+ */
+ set_max_sum_func_level(thd, thd->lex->current_select);
return FALSE;
}
}
@@ -5220,6 +5331,8 @@ bool Item_field::fix_fields(THD *thd, Item **reference)
}
#endif
fixed= 1;
+ if (field->vcol_info)
+ fix_session_vcol_expr_for_read(thd, field, field->vcol_info);
if (thd->variables.sql_mode & MODE_ONLY_FULL_GROUP_BY &&
!outer_fixed && !thd->lex->in_sum_func &&
thd->lex->current_select->cur_pos_in_select_list != UNDEF_POS &&
@@ -6707,6 +6820,121 @@ Item *Item_field::update_value_transformer(THD *thd, uchar *select_arg)
}
+Item *Item_field::derived_field_transformer_for_having(THD *thd, uchar *arg)
+{
+ st_select_lex *sl= (st_select_lex *)arg;
+ table_map map= sl->master_unit()->derived->table->map;
+ if (!((Item_field*)this)->item_equal)
+ {
+ if (used_tables() == map)
+ {
+ Item_ref *rf=
+ new (thd->mem_root) Item_ref(thd, &sl->context,
+ NullS, NullS,
+ ((Item_field*) this)->field_name);
+ if (!rf)
+ return 0;
+ return rf;
+ }
+ }
+ else
+ {
+ Item_equal *cond= (Item_equal *) ((Item_field*)this)->item_equal;
+ Item_equal_fields_iterator li(*cond);
+ Item *item;
+ while ((item=li++))
+ {
+ if (item->used_tables() == map && item->real_item()->type() == FIELD_ITEM)
+ {
+ Item_ref *rf=
+ new (thd->mem_root) Item_ref(thd, &sl->context,
+ NullS, NullS,
+ ((Item_field*) (item->real_item()))->field_name);
+ if (!rf)
+ return 0;
+ return rf;
+ }
+ }
+ }
+ return this;
+}
+
+
+Item *Item_field::derived_field_transformer_for_where(THD *thd, uchar *arg)
+{
+ Item *producing_item;
+ st_select_lex *sl= (st_select_lex *)arg;
+ List_iterator_fast<Item> li(sl->item_list);
+ table_map map= sl->master_unit()->derived->table->map;
+ if (used_tables() == map)
+ {
+ uint field_no= ((Item_field*) this)->field->field_index;
+ for (uint i= 0; i <= field_no; i++)
+ producing_item= li++;
+ return producing_item->build_clone(thd, thd->mem_root);
+ }
+ else if (((Item_field*)this)->item_equal)
+ {
+ Item_equal *cond= (Item_equal *) ((Item_field*)this)->item_equal;
+ Item_equal_fields_iterator it(*cond);
+ Item *item;
+ while ((item=it++))
+ {
+ if (item->used_tables() == map && item->real_item()->type() == FIELD_ITEM)
+ {
+ Item_field *field_item= (Item_field *) (item->real_item());
+ li.rewind();
+ uint field_no= field_item->field->field_index;
+ for (uint i= 0; i <= field_no; i++)
+ producing_item= li++;
+ return producing_item->build_clone(thd, thd->mem_root);
+ }
+ }
+ }
+ return this;
+}
+
+
+Item *Item_field::derived_grouping_field_transformer_for_where(THD *thd,
+ uchar *arg)
+{
+ st_select_lex *sl= (st_select_lex *)arg;
+ List_iterator<Grouping_tmp_field> li(sl->grouping_tmp_fields);
+ Grouping_tmp_field *field;
+ table_map map= sl->master_unit()->derived->table->map;
+ if (used_tables() == map)
+ {
+ while ((field=li++))
+ {
+ if (((Item_field*) this)->field == field->tmp_field)
+ return field->producing_item->build_clone(thd, thd->mem_root);
+ }
+ }
+ else if (((Item_field*)this)->item_equal)
+ {
+ Item_equal *cond= (Item_equal *) ((Item_field*)this)->item_equal;
+ Item_equal_fields_iterator it(*cond);
+ Item *item;
+ while ((item=it++))
+ {
+ if (item->used_tables() == map && item->real_item()->type() == FIELD_ITEM)
+ {
+ Item_field *field_item= (Item_field *) (item->real_item());
+ li.rewind();
+ while ((field=li++))
+ {
+ if (field_item->field == field->tmp_field)
+ {
+ return field->producing_item->build_clone(thd, thd->mem_root);
+ }
+ }
+ }
+ }
+ }
+ return this;
+}
+
+
void Item_field::print(String *str, enum_query_type query_type)
{
if (field && field->table->const_table &&
@@ -8232,7 +8460,8 @@ bool Item_default_value::fix_fields(THD *thd, Item **items)
set_field(def_field);
if (field->default_value)
{
- if (field->default_value->expr_item) // it's NULL during CREATE TABLE
+ fix_session_vcol_expr_for_read(thd, field, field->default_value);
+ if (thd->mark_used_columns != MARK_COLUMNS_NONE)
field->default_value->expr_item->walk(&Item::register_field_in_read_map, 1, 0);
IF_DBUG(def_field->is_stat_field=1,); // a hack to fool ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED
}
@@ -8258,7 +8487,7 @@ void Item_default_value::print(String *str, enum_query_type query_type)
void Item_default_value::calculate()
{
- if (field->default_value || field->has_insert_default_function())
+ if (field->default_value)
field->set_default();
}
@@ -9907,7 +10136,7 @@ table_map Item_ref_null_helper::used_tables() const
#ifndef DBUG_OFF
/* Debugger help function */
-static char dbug_item_print_buf[256];
+static char dbug_item_print_buf[2048];
const char *dbug_print_item(Item *item)
{
@@ -9931,5 +10160,97 @@ const char *dbug_print_item(Item *item)
return "Couldn't fit into buffer";
}
+const char *dbug_print_select(SELECT_LEX *sl)
+{
+ char *buf= dbug_item_print_buf;
+ String str(buf, sizeof(dbug_item_print_buf), &my_charset_bin);
+ str.length(0);
+ if (!sl)
+ return "(SELECT_LEX*)NULL";
+
+ THD *thd= current_thd;
+ ulonglong save_option_bits= thd->variables.option_bits;
+ thd->variables.option_bits &= ~OPTION_QUOTE_SHOW_CREATE;
+
+ sl->print(thd, &str, QT_EXPLAIN);
+
+ thd->variables.option_bits= save_option_bits;
+
+ if (str.c_ptr() == buf)
+ return buf;
+ else
+ return "Couldn't fit into buffer";
+}
+
+const char *dbug_print_unit(SELECT_LEX_UNIT *un)
+{
+ char *buf= dbug_item_print_buf;
+ String str(buf, sizeof(dbug_item_print_buf), &my_charset_bin);
+ str.length(0);
+ if (!un)
+ return "(SELECT_LEX_UNIT*)NULL";
+
+ THD *thd= current_thd;
+ ulonglong save_option_bits= thd->variables.option_bits;
+ thd->variables.option_bits &= ~OPTION_QUOTE_SHOW_CREATE;
+
+ un->print(&str, QT_EXPLAIN);
+
+ thd->variables.option_bits= save_option_bits;
+
+ if (str.c_ptr() == buf)
+ return buf;
+ else
+ return "Couldn't fit into buffer";
+}
+
+
#endif /*DBUG_OFF*/
+bool Item_field::exclusive_dependence_on_table_processor(void *map)
+{
+ table_map tab_map= *((table_map *) map);
+ return !((used_tables() == tab_map ||
+ (item_equal && item_equal->used_tables() & tab_map)));
+}
+
+bool Item_field::exclusive_dependence_on_grouping_fields_processor(void *arg)
+{
+ st_select_lex *sl= (st_select_lex *)arg;
+ List_iterator<Grouping_tmp_field> li(sl->grouping_tmp_fields);
+ Grouping_tmp_field *field;
+ table_map map= sl->master_unit()->derived->table->map;
+ if (used_tables() == map)
+ {
+ while ((field=li++))
+ {
+ if (((Item_field*) this)->field == field->tmp_field)
+ return false;
+ }
+ }
+ else if (((Item_field*)this)->item_equal)
+ {
+ Item_equal *cond= (Item_equal *) ((Item_field*)this)->item_equal;
+ Item_equal_fields_iterator it(*cond);
+ Item *item;
+ while ((item=it++))
+ {
+ if (item->used_tables() == map && item->real_item()->type() == FIELD_ITEM)
+ {
+ li.rewind();
+ while ((field=li++))
+ {
+ if (((Item_field *)(item->real_item()))->field == field->tmp_field)
+ return false;
+ }
+ }
+ }
+ }
+ return true;
+}
+
+void Item::register_in(THD *thd)
+{
+ next= thd->free_list;
+ thd->free_list= this;
+}
diff --git a/sql/item.h b/sql/item.h
index e43b4d50e46..5b8254837e8 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -32,6 +32,8 @@ C_MODE_START
#include <ma_dyncol.h>
C_MODE_END
+const char *dbug_print_item(Item *item);
+
class Protocol;
struct TABLE_LIST;
void item_init(void); /* Init item functions */
@@ -89,6 +91,10 @@ bool mark_unsupported_function(const char *w1, const char *w2,
#define MY_COLL_ALLOW_CONV (MY_COLL_ALLOW_SUPERSET_CONV | MY_COLL_ALLOW_COERCIBLE_CONV)
#define MY_COLL_CMP_CONV (MY_COLL_ALLOW_CONV | MY_COLL_DISALLOW_NONE)
+#define NO_EXTRACTION_FL (1 << 6)
+#define FULL_EXTRACTION_FL (1 << 7)
+#define EXTRACTION_MASK (NO_EXTRACTION_FL | FULL_EXTRACTION_FL)
+
class DTCollation {
public:
CHARSET_INFO *collation;
@@ -591,7 +597,6 @@ class Item: public Value_source,
public Type_std_attributes,
public Type_handler
{
- Item(const Item &); /* Prevent use of these */
void operator=(Item &);
/**
The index in the JOIN::join_tab array of the JOIN_TAB this Item is attached
@@ -1110,6 +1115,7 @@ public:
virtual bool basic_const_item() const { return 0; }
/* cloning of constant items (0 if it is not const) */
virtual Item *clone_item(THD *thd) { return 0; }
+ virtual Item* build_clone(THD *thd, MEM_ROOT *mem_root) { return get_copy(thd, mem_root); }
virtual cond_result eq_cmp_result() const { return COND_OK; }
inline uint float_length(uint decimals_par) const
{ return decimals < FLOATING_POINT_DECIMALS ? (DBL_DIG+2+decimals_par) : DBL_DIG+8;}
@@ -1475,6 +1481,12 @@ public:
virtual bool exists2in_processor(void *opt_arg) { return 0; }
virtual bool find_selective_predicates_list_processor(void *opt_arg)
{ return 0; }
+ virtual bool exclusive_dependence_on_table_processor(void *map)
+ { return 0; }
+ virtual bool exclusive_dependence_on_grouping_fields_processor(void *arg)
+ { return 0; }
+
+ virtual Item *get_copy(THD *thd, MEM_ROOT *mem_root)=0;
/* To call bool function for all arguments */
struct bool_func_call_args
@@ -1679,6 +1691,13 @@ public:
{ return this; }
virtual Item *expr_cache_insert_transformer(THD *thd, uchar *unused)
{ return this; }
+ virtual Item *derived_field_transformer_for_having(THD *thd, uchar *arg)
+ { return this; }
+ virtual Item *derived_field_transformer_for_where(THD *thd, uchar *arg)
+ { return this; }
+ virtual Item *derived_grouping_field_transformer_for_where(THD *thd,
+ uchar *arg)
+ { return this; }
virtual bool expr_cache_is_needed(THD *) { return FALSE; }
virtual Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs);
bool needs_charset_converter(uint32 length, CHARSET_INFO *tocs)
@@ -1836,9 +1855,35 @@ public:
*/
virtual void under_not(Item_func_not * upper
__attribute__((unused))) {};
+
+
+ void register_in(THD *thd);
+
+ bool depends_only_on(table_map view_map)
+ { return marker & FULL_EXTRACTION_FL; }
+ int get_extraction_flag()
+ { return marker & EXTRACTION_MASK; }
+ void set_extraction_flag(int flags)
+ {
+ marker &= ~EXTRACTION_MASK;
+ marker|= flags;
+ }
+ void clear_extraction_flag()
+ {
+ marker &= ~EXTRACTION_MASK;
+ }
};
+template <class T>
+inline Item* get_item_copy (THD *thd, MEM_ROOT *mem_root, T* item)
+{
+ Item *copy= new (mem_root) T(*item);
+ copy->register_in(thd);
+ return copy;
+}
+
+
/**
Compare two Items for List<Item>::add_unique()
*/
@@ -2119,6 +2164,8 @@ public:
{ return this; }
bool append_for_log(THD *thd, String *str);
+
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root) { return 0; }
};
/*****************************************************************************
@@ -2165,6 +2212,7 @@ public:
purposes.
*/
virtual void print(String *str, enum_query_type query_type);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root) { return 0; }
private:
uint m_case_expr_id;
@@ -2245,6 +2293,8 @@ public:
{
return mark_unsupported_function("name_const()", arg, VCOL_IMPOSSIBLE);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_name_const>(thd, mem_root, this); }
};
class Item_num: public Item_basic_constant
@@ -2377,6 +2427,8 @@ public:
CHARSET_INFO *charset_for_protocol(void) const
{ return field->charset_for_protocol(); }
enum_field_types field_type() const { return MYSQL_TYPE_DOUBLE; }
+ Item* get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_ident_for_show>(thd, mem_root, this); }
};
@@ -2516,8 +2568,8 @@ public:
bool update_table_bitmaps_processor(void *arg);
bool switch_to_nullable_fields_processor(void *arg);
bool check_vcol_func_processor(void *arg)
- { // may be, a special flag VCOL_FIELD ?
- return mark_unsupported_function(field_name, arg, VCOL_UNKNOWN);
+ {
+ return mark_unsupported_function(field_name, arg, VCOL_FIELD_REF);
}
void cleanup();
Item_equal *get_item_equal() { return item_equal; }
@@ -2529,7 +2581,14 @@ public:
Item_field *field_for_view_update() { return this; }
int fix_outer_field(THD *thd, Field **field, Item **reference);
virtual Item *update_value_transformer(THD *thd, uchar *select_arg);
+ Item *derived_field_transformer_for_having(THD *thd, uchar *arg);
+ Item *derived_field_transformer_for_where(THD *thd, uchar *arg);
+ Item *derived_grouping_field_transformer_for_where(THD *thd, uchar *arg);
virtual void print(String *str, enum_query_type query_type);
+ bool exclusive_dependence_on_table_processor(void *map);
+ bool exclusive_dependence_on_grouping_fields_processor(void *arg);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_field>(thd, mem_root, this); }
bool is_outer_field() const
{
DBUG_ASSERT(fixed);
@@ -2622,6 +2681,8 @@ public:
Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs);
bool check_partition_func_processor(void *int_arg) {return FALSE;}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_null>(thd, mem_root, this); }
};
class Item_null_result :public Item_null
@@ -2783,6 +2844,8 @@ public:
bool append_for_log(THD *thd, String *str);
bool check_vcol_func_processor(void *int_arg) {return FALSE;}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root) { return 0; }
+
private:
virtual bool set_value(THD *thd, sp_rcontext *ctx, Item **it);
@@ -2831,6 +2894,8 @@ public:
{ return (uint) (max_length - MY_TEST(value < 0)); }
bool eq(const Item *item, bool binary_cmp) const
{ return int_eq(value, item); }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_int>(thd, mem_root, this); }
};
@@ -2847,6 +2912,8 @@ public:
virtual void print(String *str, enum_query_type query_type);
Item *neg(THD *thd);
uint decimal_precision() const { return max_length; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_uint>(thd, mem_root, this); }
};
@@ -2893,6 +2960,8 @@ public:
uint decimal_precision() const { return decimal_value.precision(); }
bool eq(const Item *, bool binary_cmp) const;
void set_decimal_value(my_decimal *value_par);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_decimal>(thd, mem_root, this); }
};
@@ -2941,6 +3010,8 @@ public:
virtual void print(String *str, enum_query_type query_type);
bool eq(const Item *item, bool binary_cmp) const
{ return real_eq(value, item); }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_float>(thd, mem_root, this); }
};
@@ -3130,6 +3201,9 @@ public:
}
return MYSQL_TYPE_STRING; // Not a temporal literal
}
+
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_string>(thd, mem_root, this); }
};
@@ -3358,6 +3432,8 @@ public:
}
enum Item_result cast_to_int_type() const { return INT_RESULT; }
void print(String *str, enum_query_type query_type);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_hex_hybrid>(thd, mem_root, this); }
};
@@ -3398,6 +3474,8 @@ public:
}
enum Item_result cast_to_int_type() const { return STRING_RESULT; }
void print(String *str, enum_query_type query_type);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_hex_string>(thd, mem_root, this); }
};
@@ -3479,6 +3557,8 @@ public:
void print(String *str, enum_query_type query_type);
Item *clone_item(THD *thd);
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_date_literal>(thd, mem_root, this); }
};
@@ -3498,6 +3578,8 @@ public:
void print(String *str, enum_query_type query_type);
Item *clone_item(THD *thd);
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_time_literal>(thd, mem_root, this); }
};
@@ -3519,6 +3601,8 @@ public:
void print(String *str, enum_query_type query_type);
Item *clone_item(THD *thd);
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_datetime_literal>(thd, mem_root, this); }
};
@@ -3879,6 +3963,7 @@ public:
virtual void fix_length_and_dec()= 0;
bool const_item() const { return const_item_cache; }
table_map used_tables() const { return used_tables_cache; }
+ Item* build_clone(THD *thd, MEM_ROOT *mem_root);
};
@@ -4054,6 +4139,8 @@ public:
DBUG_ASSERT(ref);
return (*ref)->is_outer_field();
}
+
+ Item* build_clone(THD *thd, MEM_ROOT *mem_root);
/**
Checks if the item tree that ref points to contains a subquery.
@@ -4062,6 +4149,8 @@ public:
{
return (*ref)->has_subquery();
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_ref>(thd, mem_root, this); }
};
@@ -4104,6 +4193,8 @@ public:
bool is_null();
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
virtual Ref_Type ref_type() { return DIRECT_REF; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_direct_ref>(thd, mem_root, this); }
};
@@ -4265,6 +4356,9 @@ public:
{
return mark_unsupported_function("cache", arg, VCOL_IMPOSSIBLE);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_cache_wrapper>(thd, mem_root, this); }
+ Item *build_clone(THD *thd, MEM_ROOT *mem_root) { return 0; }
};
@@ -4516,6 +4610,8 @@ public:
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
virtual void print(String *str, enum_query_type query_type);
table_map used_tables() const;
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_ref_null_helper>(thd, mem_root, this); }
};
/*
@@ -4675,6 +4771,8 @@ public:
longlong val_int();
void copy();
int save_in_field(Field *field, bool no_conversions);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_copy_string>(thd, mem_root, this); }
};
@@ -4697,6 +4795,8 @@ public:
return null_value ? 0 : cached_value;
}
virtual void copy();
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_copy_int>(thd, mem_root, this); }
};
@@ -4713,6 +4813,8 @@ public:
{
return null_value ? 0.0 : (double) (ulonglong) cached_value;
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_copy_uint>(thd, mem_root, this); }
};
@@ -4739,6 +4841,8 @@ public:
cached_value= item->val_real();
null_value= item->null_value;
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_copy_float>(thd, mem_root, this); }
};
@@ -4758,6 +4862,8 @@ public:
double val_real();
longlong val_int();
void copy();
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_copy_decimal>(thd, mem_root, this); }
};
@@ -4894,6 +5000,7 @@ public:
bool send(Protocol *protocol, String *buffer);
int save_in_field(Field *field_arg, bool no_conversions);
table_map used_tables() const { return (table_map)0L; }
+ Item_field *field_for_view_update() { return 0; }
bool walk(Item_processor processor, bool walk_subquery, void *args)
{
@@ -5182,6 +5289,8 @@ public:
enum Item_result result_type() const { return INT_RESULT; }
bool cache_value();
int save_in_field(Field *field, bool no_conversions);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_cache_int>(thd, mem_root, this); }
};
@@ -5206,6 +5315,8 @@ public:
Important when storing packed datetime values.
*/
Item *clone_item(THD *thd);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_cache_temporal>(thd, mem_root, this); }
};
@@ -5222,6 +5333,8 @@ public:
my_decimal *val_decimal(my_decimal *);
enum Item_result result_type() const { return REAL_RESULT; }
bool cache_value();
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_cache_real>(thd, mem_root, this); }
};
@@ -5238,6 +5351,8 @@ public:
my_decimal *val_decimal(my_decimal *);
enum Item_result result_type() const { return DECIMAL_RESULT; }
bool cache_value();
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_cache_decimal>(thd, mem_root, this); }
};
@@ -5264,6 +5379,8 @@ public:
CHARSET_INFO *charset() const { return value->charset(); };
int save_in_field(Field *field, bool no_conversions);
bool cache_value();
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_cache_str>(thd, mem_root, this); }
};
@@ -5287,6 +5404,8 @@ public:
*/
return Item::safe_charset_converter(thd, tocs);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_cache_str_for_nullif>(thd, mem_root, this); }
};
@@ -5358,6 +5477,8 @@ public:
}
bool cache_value();
virtual void set_null();
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_cache_row>(thd, mem_root, this); }
};
@@ -5413,6 +5534,7 @@ public:
static uint32 display_length(Item *item);
static enum_field_types get_real_type(Item *);
Field::geometry_type get_geometry_type() const { return geometry_type; };
+ Item* get_copy(THD *thd, MEM_ROOT *mem_root) { return 0; }
};
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index eafb6b1c91b..434442cffa9 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -4856,6 +4856,43 @@ void Item_cond::neg_arguments(THD *thd)
}
+/**
+ @brief
+ Building clone for Item_cond
+
+ @param thd thread handle
+ @param mem_root part of the memory for the clone
+
+ @details
+ This method gets copy of the current item and also
+ build clones for its elements. For this elements
+ build_copy is called again.
+
+ @retval
+ clone of the item
+ 0 if an error occured
+*/
+
+Item *Item_cond::build_clone(THD *thd, MEM_ROOT *mem_root)
+{
+ List_iterator_fast<Item> li(list);
+ Item *item;
+ Item_cond *copy= (Item_cond *) get_copy(thd, mem_root);
+ if (!copy)
+ return 0;
+ copy->list.empty();
+ while ((item= li++))
+ {
+ Item *arg_clone= item->build_clone(thd, mem_root);
+ if (!arg_clone)
+ return 0;
+ if (copy->list.push_back(arg_clone, mem_root))
+ return 0;
+ }
+ return copy;
+}
+
+
void Item_cond_and::mark_as_condition_AND_part(TABLE_LIST *embedding)
{
List_iterator<Item> li(list);
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index f899775ce88..6d432bd97f3 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -26,6 +26,7 @@
#include "item_func.h" /* Item_int_func, Item_bool_func */
#define PCRE_STATIC 1 /* Important on Windows */
#include "pcre.h" /* pcre header file */
+#include "item.h"
extern Item_result item_cmp_type(Item_result a,Item_result b);
inline Item_result item_cmp_type(const Item *a, const Item *b)
@@ -124,6 +125,7 @@ public:
comparators= 0;
}
friend class Item_func;
+ friend class Item_bool_rowready_func2;
};
@@ -244,6 +246,8 @@ public:
Item_func_istrue(THD *thd, Item *a): Item_func_truth(thd, a, true, true) {}
~Item_func_istrue() {}
virtual const char* func_name() const { return "istrue"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_istrue>(thd, mem_root, this); }
};
@@ -258,6 +262,8 @@ public:
Item_func_truth(thd, a, true, false) {}
~Item_func_isnottrue() {}
virtual const char* func_name() const { return "isnottrue"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_isnottrue>(thd, mem_root, this); }
};
@@ -271,6 +277,8 @@ public:
Item_func_isfalse(THD *thd, Item *a): Item_func_truth(thd, a, false, true) {}
~Item_func_isfalse() {}
virtual const char* func_name() const { return "isfalse"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_isfalse>(thd, mem_root, this); }
};
@@ -285,6 +293,8 @@ public:
Item_func_truth(thd, a, false, false) {}
~Item_func_isnotfalse() {}
virtual const char* func_name() const { return "isnotfalse"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_isnotfalse>(thd, mem_root, this); }
};
@@ -346,6 +356,8 @@ public:
void fix_after_pullout(st_select_lex *new_parent, Item **ref);
bool invisible_mode();
void reset_cache() { cache= NULL; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_in_optimizer>(thd, mem_root, this); }
};
@@ -499,6 +511,17 @@ public:
return add_key_fields_optimize_op(join, key_fields, and_level,
usable_tables, sargables, false);
}
+ Item *build_clone(THD *thd, MEM_ROOT *mem_root)
+ {
+ Item_bool_rowready_func2 *clone=
+ (Item_bool_rowready_func2 *) Item_func::build_clone(thd, mem_root);
+ if (clone)
+ {
+ clone->cmp.comparators= 0;
+ }
+ return clone;
+ }
+
};
/**
@@ -521,6 +544,8 @@ public:
Item_args::propagate_equal_fields(thd, Context_boolean(), cond);
return this;
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_xor>(thd, mem_root, this); }
};
class Item_func_not :public Item_bool_func
@@ -537,6 +562,8 @@ public:
Item *neg_transformer(THD *thd);
bool fix_fields(THD *, Item **);
virtual void print(String *str, enum_query_type query_type);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_not>(thd, mem_root, this); }
};
class Item_maxmin_subselect;
@@ -584,6 +611,8 @@ public:
void add_key_fields(JOIN *join, KEY_FIELD **key_fields,
uint *and_level, table_map usable_tables,
SARGABLE_PARAM **sargables);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_trig_cond>(thd, mem_root, this); }
};
class Item_func_not_all :public Item_func_not
@@ -659,6 +688,8 @@ public:
uint in_equality_no;
virtual uint exists2in_reserved_items() { return 1; };
friend class Arg_comparator;
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_eq>(thd, mem_root, this); }
};
class Item_func_equal :public Item_bool_rowready_func2
@@ -681,6 +712,8 @@ public:
return add_key_fields_optimize_op(join, key_fields, and_level,
usable_tables, sargables, true);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_equal>(thd, mem_root, this); }
};
@@ -695,6 +728,8 @@ public:
cond_result eq_cmp_result() const { return COND_TRUE; }
const char *func_name() const { return ">="; }
Item *negated_item(THD *thd);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_ge>(thd, mem_root, this); }
};
@@ -709,6 +744,8 @@ public:
cond_result eq_cmp_result() const { return COND_FALSE; }
const char *func_name() const { return ">"; }
Item *negated_item(THD *thd);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_gt>(thd, mem_root, this); }
};
@@ -723,6 +760,8 @@ public:
cond_result eq_cmp_result() const { return COND_TRUE; }
const char *func_name() const { return "<="; }
Item *negated_item(THD *thd);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_le>(thd, mem_root, this); }
};
@@ -737,6 +776,8 @@ public:
cond_result eq_cmp_result() const { return COND_FALSE; }
const char *func_name() const { return "<"; }
Item *negated_item(THD *thd);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_lt>(thd, mem_root, this); }
};
@@ -760,6 +801,8 @@ public:
Item *negated_item(THD *thd);
void add_key_fields(JOIN *join, KEY_FIELD **key_fields, uint *and_level,
table_map usable_tables, SARGABLE_PARAM **sargables);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_ne>(thd, mem_root, this); }
};
@@ -840,6 +883,8 @@ public:
cond);
return this;
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_between>(thd, mem_root, this); }
};
@@ -858,6 +903,8 @@ public:
agg_arg_charsets_for_comparison(cmp_collation, args, 2);
fix_char_length(2); // returns "1" or "0" or "-1"
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_strcmp>(thd, mem_root, this); }
};
@@ -888,6 +935,8 @@ public:
str->append(func_name());
print_args(str, 0, query_type);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_interval>(thd, mem_root, this); }
};
@@ -910,6 +959,8 @@ public:
}
const char *func_name() const { return "coalesce"; }
table_map not_null_tables() const { return 0; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_coalesce>(thd, mem_root, this); }
};
@@ -959,6 +1010,8 @@ public:
{
return Item_func_case_abbreviation2::decimal_precision2(args);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_ifnull>(thd, mem_root, this); }
};
@@ -982,6 +1035,8 @@ public:
const char *func_name() const { return "if"; }
bool eval_not_null_tables(void *opt_arg);
void fix_after_pullout(st_select_lex *new_parent, Item **ref);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_if>(thd, mem_root, this); }
private:
void cache_type_info(Item *source);
};
@@ -1057,6 +1112,8 @@ public:
cond, &args[2]);
return this;
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_nullif>(thd, mem_root, this); }
};
@@ -1240,7 +1297,6 @@ public:
item_dec->set_decimal_value(dec);
}
Item_result result_type() { return DECIMAL_RESULT; }
-
};
@@ -1499,6 +1555,19 @@ public:
void cleanup();
Item* propagate_equal_fields(THD *thd, const Context &ctx, COND_EQUAL *cond);
bool need_parentheses_in_default() { return true; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_case>(thd, mem_root, this); }
+ Item *build_clone(THD *thd, MEM_ROOT *mem_root)
+ {
+ Item_func_case *clone= (Item_func_case *) Item_func::build_clone(thd, mem_root);
+ if (clone)
+ {
+ clone->case_item= 0;
+ clone->arg_buffer= 0;
+ bzero(&clone->cmp_items, sizeof(cmp_items));
+ }
+ return clone;
+ }
};
/*
@@ -1595,6 +1664,18 @@ public:
bool eval_not_null_tables(void *opt_arg);
void fix_after_pullout(st_select_lex *new_parent, Item **ref);
bool count_sargable_conds(void *arg);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_in>(thd, mem_root, this); }
+ Item *build_clone(THD *thd, MEM_ROOT *mem_root)
+ {
+ Item_func_in *clone= (Item_func_in *) Item_func::build_clone(thd, mem_root);
+ if (clone)
+ {
+ clone->array= 0;
+ bzero(&clone->cmp_items, sizeof(cmp_items));
+ }
+ return clone;
+ }
};
class cmp_item_row :public cmp_item
@@ -1689,6 +1770,8 @@ public:
bool top_level);
table_map not_null_tables() const { return 0; }
Item *neg_transformer(THD *thd);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_isnull>(thd, mem_root, this); }
};
/* Functions used by HAVING for rewriting IN subquery */
@@ -1734,6 +1817,8 @@ public:
Item *neg_transformer(THD *thd);
virtual void print(String *str, enum_query_type query_type);
void top_level_item() { abort_on_null=1; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_isnotnull>(thd, mem_root, this); }
};
@@ -1873,6 +1958,9 @@ public:
void cleanup();
bool find_selective_predicates_list_processor(void *arg);
+
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_like>(thd, mem_root, this); }
};
@@ -1978,6 +2066,8 @@ public:
longlong val_int();
void fix_length_and_dec();
const char *func_name() const { return "regexp"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_regex>(thd, mem_root, this); }
virtual inline void print(String *str, enum_query_type query_type)
{
@@ -2005,6 +2095,8 @@ public:
longlong val_int();
void fix_length_and_dec();
const char *func_name() const { return "regexp_instr"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_regexp_instr>(thd, mem_root, this); }
};
@@ -2082,6 +2174,7 @@ public:
Item *compile(THD *thd, Item_analyzer analyzer, uchar **arg_p,
Item_transformer transformer, uchar *arg_t);
bool eval_not_null_tables(void *opt_arg);
+ Item *build_clone(THD *thd, MEM_ROOT *mem_root);
};
template <template<class> class LI, class T> class Item_equal_iterator;
@@ -2254,6 +2347,7 @@ public:
void set_context_field(Item_field *ctx_field) { context_field= ctx_field; }
void set_link_equal_fields(bool flag) { link_equal_fields= flag; }
+ Item* get_copy(THD *thd, MEM_ROOT *mem_root) { return 0; }
friend class Item_equal_fields_iterator;
bool count_sargable_conds(void *arg);
friend class Item_equal_iterator<List_iterator_fast,Item>;
@@ -2398,6 +2492,8 @@ public:
void add_key_fields(JOIN *join, KEY_FIELD **key_fields, uint *and_level,
table_map usable_tables, SARGABLE_PARAM **sargables);
SEL_TREE *get_mm_tree(RANGE_OPT_PARAM *param, Item **cond_ptr);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_cond_and>(thd, mem_root, this); }
};
inline bool is_cond_and(Item *item)
@@ -2422,6 +2518,8 @@ public:
table_map not_null_tables() const { return and_tables_cache; }
Item *copy_andor_structure(THD *thd);
Item *neg_transformer(THD *thd);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_cond_or>(thd, mem_root, this); }
};
class Item_func_dyncol_check :public Item_bool_func
@@ -2431,6 +2529,8 @@ public:
longlong val_int();
const char *func_name() const { return "column_check"; }
bool need_parentheses_in_default() { return false; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_dyncol_check>(thd, mem_root, this); }
};
class Item_func_dyncol_exists :public Item_bool_func
@@ -2441,6 +2541,8 @@ public:
longlong val_int();
const char *func_name() const { return "column_exists"; }
bool need_parentheses_in_default() { return false; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_dyncol_exists>(thd, mem_root, this); }
};
inline bool is_cond_or(Item *item)
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 7f8c89cc228..3b98dd0d345 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -2273,15 +2273,6 @@ longlong Item_func_bit_neg::val_int()
// Conversion functions
-void Item_func_integer::fix_length_and_dec()
-{
- max_length=args[0]->max_length - args[0]->decimals+1;
- uint tmp=float_length(decimals);
- set_if_smaller(max_length,tmp);
- decimals=0;
-}
-
-
void Item_func_int_val::fix_length_and_dec()
{
DBUG_ENTER("Item_func_int_val::fix_length_and_dec");
@@ -3885,7 +3876,7 @@ longlong Item_master_pos_wait::val_int()
longlong timeout = (arg_count>=3) ? args[2]->val_int() : 0 ;
String connection_name_buff;
LEX_STRING connection_name;
- Master_info *mi;
+ Master_info *mi= NULL;
if (arg_count >= 4)
{
String *con;
@@ -3905,8 +3896,9 @@ longlong Item_master_pos_wait::val_int()
connection_name= thd->variables.default_master_connection;
mysql_mutex_lock(&LOCK_active_mi);
- mi= master_info_index->get_master_info(&connection_name,
- Sql_condition::WARN_LEVEL_WARN);
+ if (master_info_index) // master_info_index is set to NULL on shutdown.
+ mi= master_info_index->get_master_info(&connection_name,
+ Sql_condition::WARN_LEVEL_WARN);
mysql_mutex_unlock(&LOCK_active_mi);
if (!mi)
goto err;
@@ -5854,7 +5846,7 @@ void Item_func_get_system_var::print(String *str, enum_query_type query_type)
bool Item_func_get_system_var::check_vcol_func_processor(void *arg)
{
- return mark_unsupported_function("@@", var->name.str, arg, VCOL_NON_DETERMINISTIC);
+ return mark_unsupported_function("@@", var->name.str, arg, VCOL_SESSION_FUNC);
}
enum Item_result Item_func_get_system_var::result_type() const
@@ -6957,3 +6949,6 @@ void Item_func_last_value::fix_length_and_dec()
Type_std_attributes::set(last_value);
maybe_null= last_value->maybe_null;
}
+
+
+
diff --git a/sql/item_func.h b/sql/item_func.h
index a909d93dbaa..ca7c4819012 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -613,8 +613,10 @@ public:
longlong val_int() { DBUG_ASSERT(fixed == 1); return value; }
bool check_vcol_func_processor(void *arg)
{
- return mark_unsupported_function(func_name(), "()", arg, VCOL_NON_DETERMINISTIC);
+ return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_connection_id>(thd, mem_root, this); }
};
@@ -640,6 +642,8 @@ public:
virtual void print(String *str, enum_query_type query_type);
uint decimal_precision() const { return args[0]->decimal_precision(); }
bool need_parentheses_in_default() { return true; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_signed>(thd, mem_root, this); }
};
@@ -658,6 +662,8 @@ public:
return value;
}
virtual void print(String *str, enum_query_type query_type);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_unsigned>(thd, mem_root, this); }
};
@@ -682,6 +688,8 @@ public:
const char *func_name() const { return "decimal_typecast"; }
virtual void print(String *str, enum_query_type query_type);
bool need_parentheses_in_default() { return true; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_decimal_typecast>(thd, mem_root, this); }
};
@@ -700,6 +708,8 @@ public:
const char *func_name() const { return "double_typecast"; }
virtual void print(String *str, enum_query_type query_type);
bool need_parentheses_in_default() { return true; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_double_typecast>(thd, mem_root, this); }
};
@@ -723,6 +733,8 @@ public:
longlong int_op();
double real_op();
my_decimal *decimal_op(my_decimal *);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_plus>(thd, mem_root, this); }
};
class Item_func_minus :public Item_func_additive_op
@@ -735,6 +747,8 @@ public:
double real_op();
my_decimal *decimal_op(my_decimal *);
void fix_length_and_dec();
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_minus>(thd, mem_root, this); }
};
@@ -750,6 +764,8 @@ public:
void result_precision();
bool check_partition_func_processor(void *int_arg) {return FALSE;}
bool check_vcol_func_processor(void *arg) { return FALSE;}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_mul>(thd, mem_root, this); }
};
@@ -764,6 +780,8 @@ public:
const char *func_name() const { return "/"; }
void fix_length_and_dec();
void result_precision();
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_div>(thd, mem_root, this); }
};
@@ -784,6 +802,8 @@ public:
bool check_partition_func_processor(void *int_arg) {return FALSE;}
bool check_vcol_func_processor(void *arg) { return FALSE;}
bool need_parentheses_in_default() { return true; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_int_div>(thd, mem_root, this); }
};
@@ -799,6 +819,8 @@ public:
void fix_length_and_dec();
bool check_partition_func_processor(void *int_arg) {return FALSE;}
bool check_vcol_func_processor(void *arg) { return FALSE;}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_mod>(thd, mem_root, this); }
};
@@ -816,6 +838,8 @@ public:
bool check_partition_func_processor(void *int_arg) {return FALSE;}
bool check_vcol_func_processor(void *arg) { return FALSE;}
bool need_parentheses_in_default() { return true; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_neg>(thd, mem_root, this); }
};
@@ -830,6 +854,8 @@ public:
void fix_length_and_dec();
bool check_partition_func_processor(void *int_arg) {return FALSE;}
bool check_vcol_func_processor(void *arg) { return FALSE;}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_abs>(thd, mem_root, this); }
};
// A class to handle logarithmic and trigonometric functions
@@ -852,6 +878,8 @@ public:
Item_func_exp(THD *thd, Item *a): Item_dec_func(thd, a) {}
double val_real();
const char *func_name() const { return "exp"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_exp>(thd, mem_root, this); }
};
@@ -861,6 +889,8 @@ public:
Item_func_ln(THD *thd, Item *a): Item_dec_func(thd, a) {}
double val_real();
const char *func_name() const { return "ln"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_ln>(thd, mem_root, this); }
};
@@ -871,6 +901,8 @@ public:
Item_func_log(THD *thd, Item *a, Item *b): Item_dec_func(thd, a, b) {}
double val_real();
const char *func_name() const { return "log"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_log>(thd, mem_root, this); }
};
@@ -880,6 +912,8 @@ public:
Item_func_log2(THD *thd, Item *a): Item_dec_func(thd, a) {}
double val_real();
const char *func_name() const { return "log2"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_log2>(thd, mem_root, this); }
};
@@ -889,6 +923,8 @@ public:
Item_func_log10(THD *thd, Item *a): Item_dec_func(thd, a) {}
double val_real();
const char *func_name() const { return "log10"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_log10>(thd, mem_root, this); }
};
@@ -898,6 +934,8 @@ public:
Item_func_sqrt(THD *thd, Item *a): Item_dec_func(thd, a) {}
double val_real();
const char *func_name() const { return "sqrt"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_sqrt>(thd, mem_root, this); }
};
@@ -907,6 +945,8 @@ public:
Item_func_pow(THD *thd, Item *a, Item *b): Item_dec_func(thd, a, b) {}
double val_real();
const char *func_name() const { return "pow"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_pow>(thd, mem_root, this); }
};
@@ -916,6 +956,8 @@ public:
Item_func_acos(THD *thd, Item *a): Item_dec_func(thd, a) {}
double val_real();
const char *func_name() const { return "acos"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_acos>(thd, mem_root, this); }
};
class Item_func_asin :public Item_dec_func
@@ -924,6 +966,8 @@ public:
Item_func_asin(THD *thd, Item *a): Item_dec_func(thd, a) {}
double val_real();
const char *func_name() const { return "asin"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_asin>(thd, mem_root, this); }
};
class Item_func_atan :public Item_dec_func
@@ -933,6 +977,8 @@ public:
Item_func_atan(THD *thd, Item *a, Item *b): Item_dec_func(thd, a, b) {}
double val_real();
const char *func_name() const { return "atan"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_atan>(thd, mem_root, this); }
};
class Item_func_cos :public Item_dec_func
@@ -941,6 +987,8 @@ public:
Item_func_cos(THD *thd, Item *a): Item_dec_func(thd, a) {}
double val_real();
const char *func_name() const { return "cos"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_cos>(thd, mem_root, this); }
};
class Item_func_sin :public Item_dec_func
@@ -949,6 +997,8 @@ public:
Item_func_sin(THD *thd, Item *a): Item_dec_func(thd, a) {}
double val_real();
const char *func_name() const { return "sin"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_sin>(thd, mem_root, this); }
};
class Item_func_tan :public Item_dec_func
@@ -957,6 +1007,8 @@ public:
Item_func_tan(THD *thd, Item *a): Item_dec_func(thd, a) {}
double val_real();
const char *func_name() const { return "tan"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_tan>(thd, mem_root, this); }
};
class Item_func_cot :public Item_dec_func
@@ -965,13 +1017,8 @@ public:
Item_func_cot(THD *thd, Item *a): Item_dec_func(thd, a) {}
double val_real();
const char *func_name() const { return "cot"; }
-};
-
-class Item_func_integer :public Item_int_func
-{
-public:
- inline Item_func_integer(THD *thd, Item *a): Item_int_func(thd, a) {}
- void fix_length_and_dec();
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_cot>(thd, mem_root, this); }
};
@@ -993,6 +1040,8 @@ public:
my_decimal *decimal_op(my_decimal *);
bool check_partition_func_processor(void *int_arg) {return FALSE;}
bool check_vcol_func_processor(void *arg) { return FALSE;}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_ceiling>(thd, mem_root, this); }
};
@@ -1006,6 +1055,8 @@ public:
my_decimal *decimal_op(my_decimal *);
bool check_partition_func_processor(void *int_arg) {return FALSE;}
bool check_vcol_func_processor(void *arg) { return FALSE;}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_floor>(thd, mem_root, this); }
};
/* This handles round and truncate */
@@ -1021,6 +1072,8 @@ public:
longlong int_op();
my_decimal *decimal_op(my_decimal *);
void fix_length_and_dec();
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_round>(thd, mem_root, this); }
};
@@ -1042,6 +1095,8 @@ public:
{
return mark_unsupported_function(func_name(), "()", arg, VCOL_NON_DETERMINISTIC);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_rand>(thd, mem_root, this); }
private:
void seed_random (Item * val);
};
@@ -1053,6 +1108,8 @@ public:
Item_func_sign(THD *thd, Item *a): Item_int_func(thd, a) {}
const char *func_name() const { return "sign"; }
longlong val_int();
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_sign>(thd, mem_root, this); }
};
@@ -1068,6 +1125,8 @@ public:
const char *func_name() const { return name; }
void fix_length_and_dec()
{ decimals= NOT_FIXED_DEC; max_length= float_length(decimals); }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_units>(thd, mem_root, this); }
};
@@ -1104,6 +1163,8 @@ class Item_func_min :public Item_func_min_max
public:
Item_func_min(THD *thd, List<Item> &list): Item_func_min_max(thd, list, 1) {}
const char *func_name() const { return "least"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_min>(thd, mem_root, this); }
};
class Item_func_max :public Item_func_min_max
@@ -1111,6 +1172,8 @@ class Item_func_max :public Item_func_min_max
public:
Item_func_max(THD *thd, List<Item> &list): Item_func_min_max(thd, list, -1) {}
const char *func_name() const { return "greatest"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_max>(thd, mem_root, this); }
};
@@ -1143,6 +1206,8 @@ public:
/* The item could be a NULL constant. */
null_value= args[0]->is_null();
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_rollup_const>(thd, mem_root, this); }
};
@@ -1154,6 +1219,8 @@ public:
longlong val_int();
const char *func_name() const { return "length"; }
void fix_length_and_dec() { max_length=10; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_length>(thd, mem_root, this); }
};
class Item_func_bit_length :public Item_func_length
@@ -1163,6 +1230,8 @@ public:
longlong val_int()
{ DBUG_ASSERT(fixed == 1); return Item_func_length::val_int()*8; }
const char *func_name() const { return "bit_length"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_bit_length>(thd, mem_root, this); }
};
class Item_func_char_length :public Item_int_func
@@ -1173,6 +1242,8 @@ public:
longlong val_int();
const char *func_name() const { return "char_length"; }
void fix_length_and_dec() { max_length=10; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_char_length>(thd, mem_root, this); }
};
class Item_func_coercibility :public Item_int_func
@@ -1186,6 +1257,8 @@ public:
Item* propagate_equal_fields(THD *thd, const Context &ctx, COND_EQUAL *cond)
{ return this; }
bool const_item() const { return true; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_coercibility>(thd, mem_root, this); }
};
class Item_func_locate :public Item_int_func
@@ -1199,6 +1272,8 @@ public:
longlong val_int();
void fix_length_and_dec();
virtual void print(String *str, enum_query_type query_type);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_locate>(thd, mem_root, this); }
};
@@ -1212,6 +1287,8 @@ public:
longlong val_int();
const char *func_name() const { return "field"; }
void fix_length_and_dec();
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_field>(thd, mem_root, this); }
};
@@ -1223,6 +1300,8 @@ public:
longlong val_int();
const char *func_name() const { return "ascii"; }
void fix_length_and_dec() { max_length=3; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_ascii>(thd, mem_root, this); }
};
class Item_func_ord :public Item_int_func
@@ -1232,6 +1311,8 @@ public:
Item_func_ord(THD *thd, Item *a): Item_int_func(thd, a) {}
longlong val_int();
const char *func_name() const { return "ord"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_ord>(thd, mem_root, this); }
};
class Item_func_find_in_set :public Item_int_func
@@ -1246,6 +1327,8 @@ public:
longlong val_int();
const char *func_name() const { return "find_in_set"; }
void fix_length_and_dec();
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_find_in_set>(thd, mem_root, this); }
};
/* Base class for all bit functions: '~', '|', '^', '&', '>>', '<<' */
@@ -1270,6 +1353,8 @@ public:
Item_func_bit_or(THD *thd, Item *a, Item *b): Item_func_bit(thd, a, b) {}
longlong val_int();
const char *func_name() const { return "|"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_bit_or>(thd, mem_root, this); }
};
class Item_func_bit_and :public Item_func_bit
@@ -1278,6 +1363,8 @@ public:
Item_func_bit_and(THD *thd, Item *a, Item *b): Item_func_bit(thd, a, b) {}
longlong val_int();
const char *func_name() const { return "&"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_bit_and>(thd, mem_root, this); }
};
class Item_func_bit_count :public Item_int_func
@@ -1287,6 +1374,8 @@ public:
longlong val_int();
const char *func_name() const { return "bit_count"; }
void fix_length_and_dec() { max_length=2; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_bit_count>(thd, mem_root, this); }
};
class Item_func_shift_left :public Item_func_bit
@@ -1295,6 +1384,8 @@ public:
Item_func_shift_left(THD *thd, Item *a, Item *b): Item_func_bit(thd, a, b) {}
longlong val_int();
const char *func_name() const { return "<<"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_shift_left>(thd, mem_root, this); }
};
class Item_func_shift_right :public Item_func_bit
@@ -1303,6 +1394,8 @@ public:
Item_func_shift_right(THD *thd, Item *a, Item *b): Item_func_bit(thd, a, b) {}
longlong val_int();
const char *func_name() const { return ">>"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_shift_right>(thd, mem_root, this); }
};
class Item_func_bit_neg :public Item_func_bit
@@ -1316,6 +1409,8 @@ public:
{
Item_func::print(str, query_type);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_bit_neg>(thd, mem_root, this); }
};
@@ -1338,6 +1433,8 @@ public:
{
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_last_insert_id>(thd, mem_root, this); }
};
@@ -1355,6 +1452,8 @@ public:
{
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_benchmark>(thd, mem_root, this); }
};
@@ -1377,6 +1476,8 @@ public:
{
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_sleep>(thd, mem_root, this); }
};
@@ -1470,7 +1571,7 @@ public:
virtual void print(String *str, enum_query_type query_type);
bool check_vcol_func_processor(void *arg)
{
- return mark_unsupported_function(func_name(), "()", arg, VCOL_UNKNOWN);
+ return mark_unsupported_function(func_name(), "()", arg, VCOL_NON_DETERMINISTIC);
}
};
@@ -1500,6 +1601,8 @@ class Item_func_udf_float :public Item_udf_func
String *val_str(String *str);
enum_field_types field_type() const { return MYSQL_TYPE_DOUBLE; }
void fix_length_and_dec() { fix_num_length_and_dec(); }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_udf_float>(thd, mem_root, this); }
};
@@ -1517,6 +1620,8 @@ public:
enum Item_result result_type () const { return INT_RESULT; }
enum_field_types field_type() const { return MYSQL_TYPE_LONGLONG; }
void fix_length_and_dec() { decimals= 0; max_length= 21; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_udf_int>(thd, mem_root, this); }
};
@@ -1534,6 +1639,8 @@ public:
enum Item_result result_type () const { return DECIMAL_RESULT; }
enum_field_types field_type() const { return MYSQL_TYPE_NEWDECIMAL; }
void fix_length_and_dec() { fix_num_length_and_dec(); }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_udf_decimal>(thd, mem_root, this); }
};
@@ -1572,6 +1679,8 @@ public:
enum Item_result result_type () const { return STRING_RESULT; }
enum_field_types field_type() const { return string_field_type(); }
void fix_length_and_dec();
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_udf_str>(thd, mem_root, this); }
};
#else /* Dummy functions to get sql_yacc.cc compiled */
@@ -1647,6 +1756,8 @@ class Item_func_get_lock :public Item_int_func
{
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_get_lock>(thd, mem_root, this); }
};
class Item_func_release_lock :public Item_int_func
@@ -1667,6 +1778,8 @@ public:
{
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_release_lock>(thd, mem_root, this); }
};
/* replication functions */
@@ -1687,6 +1800,8 @@ public:
{
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_master_pos_wait>(thd, mem_root, this); }
};
@@ -1703,6 +1818,8 @@ public:
{
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_master_gtid_wait>(thd, mem_root, this); }
};
@@ -1816,6 +1933,8 @@ public:
bool register_field_in_bitmap(void *arg);
bool set_entry(THD *thd, bool create_if_not_exists);
void cleanup();
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_set_user_var>(thd, mem_root, this); }
};
@@ -1842,6 +1961,8 @@ public:
table_map used_tables() const
{ return const_item() ? 0 : RAND_TABLE_BIT; }
bool eq(const Item *item, bool binary_cmp) const;
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_get_user_var>(thd, mem_root, this); }
private:
bool set_value(THD *thd, sp_rcontext *ctx, Item **it);
@@ -1881,6 +2002,8 @@ public:
void set_null_value(CHARSET_INFO* cs);
void set_value(const char *str, uint length, CHARSET_INFO* cs);
enum_field_types field_type() const { return MYSQL_TYPE_DOUBLE; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_user_var_as_out_param>(thd, mem_root, this); }
};
@@ -1935,6 +2058,8 @@ public:
void cleanup();
bool check_vcol_func_processor(void *arg);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_get_system_var>(thd, mem_root, this); }
};
@@ -1984,6 +2109,9 @@ public:
{
return mark_unsupported_function("match ... against()", arg, VCOL_IMPOSSIBLE);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_match>(thd, mem_root, this); }
+ Item *build_clone(THD *thd, MEM_ROOT *mem_root) { return 0; }
private:
/**
Check whether storage engine for given table,
@@ -2027,6 +2155,8 @@ public:
Item_func_bit_xor(THD *thd, Item *a, Item *b): Item_func_bit(thd, a, b) {}
longlong val_int();
const char *func_name() const { return "^"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_bit_xor>(thd, mem_root, this); }
};
class Item_func_is_free_lock :public Item_int_func
@@ -2041,6 +2171,8 @@ public:
{
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_is_free_lock>(thd, mem_root, this); }
};
class Item_func_is_used_lock :public Item_int_func
@@ -2055,6 +2187,8 @@ public:
{
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_is_used_lock>(thd, mem_root, this); }
};
/* For type casts */
@@ -2105,6 +2239,8 @@ public:
{
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_row_count>(thd, mem_root, this); }
};
@@ -2232,6 +2368,15 @@ public:
{
return TRUE;
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_sp>(thd, mem_root, this); }
+ Item *build_clone(THD *thd, MEM_ROOT *mem_root)
+ {
+ Item_func_sp *clone= (Item_func_sp *) Item_func::build_clone(thd, mem_root);
+ if (clone)
+ clone->sp_result_field= NULL;
+ return clone;
+ }
};
@@ -2246,6 +2391,8 @@ public:
{
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_found_rows>(thd, mem_root, this); }
};
@@ -2264,6 +2411,8 @@ public:
{
return mark_unsupported_function(func_name(), "()", arg, VCOL_NON_DETERMINISTIC);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_uuid_short>(thd, mem_root, this); }
};
@@ -2289,6 +2438,8 @@ public:
Item_func::update_used_tables();
maybe_null= last_value->maybe_null;
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_last_value>(thd, mem_root, this); }
};
diff --git a/sql/item_geofunc.h b/sql/item_geofunc.h
index 58e1d0a78fb..f96e570915e 100644
--- a/sql/item_geofunc.h
+++ b/sql/item_geofunc.h
@@ -51,6 +51,8 @@ public:
Item_geometry_func(thd, a, srid) {}
const char *func_name() const { return "st_geometryfromtext"; }
String *val_str(String *);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_geometry_from_text>(thd, mem_root, this); }
};
class Item_func_geometry_from_wkb: public Item_geometry_func
@@ -61,6 +63,8 @@ public:
Item_geometry_func(thd, a, srid) {}
const char *func_name() const { return "st_geometryfromwkb"; }
String *val_str(String *);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_geometry_from_wkb>(thd, mem_root, this); }
};
class Item_func_as_wkt: public Item_str_ascii_func
@@ -70,6 +74,8 @@ public:
const char *func_name() const { return "st_astext"; }
String *val_str_ascii(String *);
void fix_length_and_dec();
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_as_wkt>(thd, mem_root, this); }
};
class Item_func_as_wkb: public Item_geometry_func
@@ -79,6 +85,8 @@ public:
const char *func_name() const { return "st_aswkb"; }
String *val_str(String *);
enum_field_types field_type() const { return MYSQL_TYPE_BLOB; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_as_wkb>(thd, mem_root, this); }
};
class Item_func_geometry_type: public Item_str_ascii_func
@@ -93,6 +101,8 @@ public:
fix_length_and_charset(20, default_charset());
maybe_null= 1;
};
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_geometry_type>(thd, mem_root, this); }
};
@@ -125,6 +135,8 @@ public:
{}
const char *func_name() const { return "st_convexhull"; }
String *val_str(String *);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_convexhull>(thd, mem_root, this); }
};
@@ -135,6 +147,8 @@ public:
const char *func_name() const { return "st_centroid"; }
String *val_str(String *);
Field::geometry_type get_geometry_type() const;
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_centroid>(thd, mem_root, this); }
};
class Item_func_envelope: public Item_geometry_func
@@ -144,6 +158,8 @@ public:
const char *func_name() const { return "st_envelope"; }
String *val_str(String *);
Field::geometry_type get_geometry_type() const;
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_envelope>(thd, mem_root, this); }
};
@@ -175,6 +191,8 @@ public:
Item_func_boundary(THD *thd, Item *a): Item_geometry_func(thd, a) {}
const char *func_name() const { return "st_boundary"; }
String *val_str(String *);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_boundary>(thd, mem_root, this); }
};
@@ -187,6 +205,8 @@ public:
const char *func_name() const { return "point"; }
String *val_str(String *);
Field::geometry_type get_geometry_type() const;
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_point>(thd, mem_root, this); }
};
class Item_func_spatial_decomp: public Item_geometry_func
@@ -211,6 +231,8 @@ public:
}
}
String *val_str(String *);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_spatial_decomp>(thd, mem_root, this); }
};
class Item_func_spatial_decomp_n: public Item_geometry_func
@@ -235,6 +257,8 @@ public:
}
}
String *val_str(String *);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_spatial_decomp_n>(thd, mem_root, this); }
};
class Item_func_spatial_collection: public Item_geometry_func
@@ -268,6 +292,8 @@ public:
}
const char *func_name() const { return "st_multipoint"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_spatial_collection>(thd, mem_root, this); }
};
@@ -300,6 +326,7 @@ public:
usable_tables, sargables, false);
}
bool need_parentheses_in_default() { return false; }
+ Item *build_clone(THD *thd, MEM_ROOT *mem_root) { return 0; }
};
@@ -311,6 +338,8 @@ public:
{ }
longlong val_int();
const char *func_name() const;
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_spatial_mbr_rel>(thd, mem_root, this); }
};
@@ -325,6 +354,8 @@ public:
{ }
longlong val_int();
const char *func_name() const;
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_spatial_precise_rel>(thd, mem_root, this); }
};
@@ -341,6 +372,8 @@ public:
longlong val_int();
const char *func_name() const { return "st_relate"; }
bool need_parentheses_in_default() { return false; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_spatial_relate>(thd, mem_root, this); }
};
@@ -370,6 +403,8 @@ public:
{
Item_func::print(str, query_type);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_spatial_operation>(thd, mem_root, this); }
};
@@ -421,6 +456,8 @@ public:
Item_geometry_func(thd, obj, distance) {}
const char *func_name() const { return "st_buffer"; }
String *val_str(String *);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_buffer>(thd, mem_root, this); }
};
@@ -432,6 +469,8 @@ public:
const char *func_name() const { return "st_isempty"; }
void fix_length_and_dec() { maybe_null= 1; }
bool need_parentheses_in_default() { return false; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_isempty>(thd, mem_root, this); }
};
class Item_func_issimple: public Item_int_func
@@ -446,6 +485,8 @@ public:
const char *func_name() const { return "st_issimple"; }
void fix_length_and_dec() { decimals=0; max_length=2; }
uint decimal_precision() const { return 1; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_issimple>(thd, mem_root, this); }
};
class Item_func_isclosed: public Item_int_func
@@ -456,6 +497,8 @@ public:
const char *func_name() const { return "st_isclosed"; }
void fix_length_and_dec() { decimals=0; max_length=2; }
uint decimal_precision() const { return 1; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_isclosed>(thd, mem_root, this); }
};
class Item_func_isring: public Item_func_issimple
@@ -464,6 +507,8 @@ public:
Item_func_isring(THD *thd, Item *a): Item_func_issimple(thd, a) {}
longlong val_int();
const char *func_name() const { return "st_isring"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_isring>(thd, mem_root, this); }
};
class Item_func_dimension: public Item_int_func
@@ -474,6 +519,8 @@ public:
longlong val_int();
const char *func_name() const { return "st_dimension"; }
void fix_length_and_dec() { max_length= 10; maybe_null= 1; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_dimension>(thd, mem_root, this); }
};
class Item_func_x: public Item_real_func
@@ -488,6 +535,8 @@ public:
Item_real_func::fix_length_and_dec();
maybe_null= 1;
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_x>(thd, mem_root, this); }
};
@@ -503,6 +552,8 @@ public:
Item_real_func::fix_length_and_dec();
maybe_null= 1;
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_y>(thd, mem_root, this); }
};
@@ -514,6 +565,8 @@ public:
longlong val_int();
const char *func_name() const { return "st_numgeometries"; }
void fix_length_and_dec() { max_length= 10; maybe_null= 1; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_numgeometries>(thd, mem_root, this); }
};
@@ -525,6 +578,8 @@ public:
longlong val_int();
const char *func_name() const { return "st_numinteriorrings"; }
void fix_length_and_dec() { max_length= 10; maybe_null= 1; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_numinteriorring>(thd, mem_root, this); }
};
@@ -536,6 +591,8 @@ public:
longlong val_int();
const char *func_name() const { return "st_numpoints"; }
void fix_length_and_dec() { max_length= 10; maybe_null= 1; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_numpoints>(thd, mem_root, this); }
};
@@ -551,6 +608,8 @@ public:
Item_real_func::fix_length_and_dec();
maybe_null= 1;
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_area>(thd, mem_root, this); }
};
@@ -566,6 +625,8 @@ public:
Item_real_func::fix_length_and_dec();
maybe_null= 1;
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_glength>(thd, mem_root, this); }
};
@@ -577,6 +638,8 @@ public:
longlong val_int();
const char *func_name() const { return "srid"; }
void fix_length_and_dec() { max_length= 10; maybe_null= 1; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_srid>(thd, mem_root, this); }
};
@@ -591,6 +654,8 @@ public:
Item_func_distance(THD *thd, Item *a, Item *b): Item_real_func(thd, a, b) {}
double val_real();
const char *func_name() const { return "st_distance"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_distance>(thd, mem_root, this); }
};
@@ -605,6 +670,8 @@ public:
const char *func_name() const { return "st_pointonsurface"; }
String *val_str(String *);
Field::geometry_type get_geometry_type() const;
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_pointonsurface>(thd, mem_root, this); }
};
@@ -620,6 +687,8 @@ class Item_func_gis_debug: public Item_int_func
{
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_gis_debug>(thd, mem_root, this); }
};
#endif
diff --git a/sql/item_inetfunc.h b/sql/item_inetfunc.h
index f5a0596d860..741b9f7d997 100644
--- a/sql/item_inetfunc.h
+++ b/sql/item_inetfunc.h
@@ -37,6 +37,8 @@ public:
maybe_null= 1;
unsigned_flag= 1;
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_inet_aton>(thd, mem_root, this); }
};
@@ -57,6 +59,8 @@ public:
fix_length_and_charset(3 * 8 + 7, default_charset());
maybe_null= 1;
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_inet_ntoa>(thd, mem_root, this); }
};
@@ -124,6 +128,8 @@ public:
fix_length_and_charset(16, &my_charset_bin);
maybe_null= 1;
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_inet6_aton>(thd, mem_root, this); }
protected:
virtual bool calc_value(String *arg, String *buffer);
@@ -156,6 +162,8 @@ public:
maybe_null= 1;
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_inet6_ntoa>(thd, mem_root, this); }
protected:
virtual bool calc_value(String *arg, String *buffer);
@@ -176,6 +184,8 @@ public:
public:
virtual const char *func_name() const
{ return "is_ipv4"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_is_ipv4>(thd, mem_root, this); }
protected:
virtual bool calc_value(const String *arg);
@@ -196,6 +206,8 @@ public:
public:
virtual const char *func_name() const
{ return "is_ipv6"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_is_ipv6>(thd, mem_root, this); }
protected:
virtual bool calc_value(const String *arg);
@@ -216,6 +228,8 @@ public:
public:
virtual const char *func_name() const
{ return "is_ipv4_compat"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_is_ipv4_compat>(thd, mem_root, this); }
protected:
virtual bool calc_value(const String *arg);
@@ -236,6 +250,8 @@ public:
public:
virtual const char *func_name() const
{ return "is_ipv4_mapped"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_is_ipv4_mapped>(thd, mem_root, this); }
protected:
virtual bool calc_value(const String *arg);
diff --git a/sql/item_row.cc b/sql/item_row.cc
index a17d2507547..ddbb0736d54 100644
--- a/sql/item_row.cc
+++ b/sql/item_row.cc
@@ -160,3 +160,21 @@ void Item_row::bring_value()
for (uint i= 0; i < arg_count; i++)
args[i]->bring_value();
}
+
+
+Item* Item_row::build_clone(THD *thd, MEM_ROOT *mem_root)
+{
+ Item_row *copy= (Item_row *) get_copy(thd, mem_root);
+ if (!copy)
+ return 0;
+ copy->args= (Item**) alloc_root(mem_root, sizeof(Item*) * arg_count);
+ for (uint i= 0; i < arg_count; i++)
+ {
+ Item *arg_clone= args[i]->build_clone(thd, mem_root);
+ if (!arg_clone)
+ return 0;
+ copy->args[i]= arg_clone;
+ }
+ return copy;
+}
+
diff --git a/sql/item_row.h b/sql/item_row.h
index eb2686090e1..bbfebb56010 100644
--- a/sql/item_row.h
+++ b/sql/item_row.h
@@ -120,6 +120,9 @@ public:
bool null_inside() { return with_null; };
void bring_value();
bool check_vcol_func_processor(void *arg) {return FALSE; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_row>(thd, mem_root, this); }
+ Item *build_clone(THD *thd, MEM_ROOT *mem_root);
};
#endif /* ITEM_ROW_INCLUDED */
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index 3f5f0505d4c..bff31ec7b26 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -54,7 +54,6 @@
#include <base64.h>
#include <my_md5.h>
#include "sha1.h"
-#include <zlib.h>
C_MODE_START
#include "../mysys/my_static.h" // For soundex_map
C_MODE_END
@@ -2344,18 +2343,6 @@ void Item_func_decode::crypto_transform(String *res)
sql_crypt.decode((char*) res->ptr(),res->length());
}
-Item *Item_func_sysconst::safe_charset_converter(THD *thd,
- CHARSET_INFO *tocs)
-{
- /*
- In default, virtual functions or constraint expressions, the value
- of a sysconst is not constant
- */
- if (thd->in_stored_expression)
- return Item_str_func::safe_charset_converter(thd, tocs);
- return const_charset_converter(thd, tocs, true, fully_qualified_func_name());
-}
-
String *Item_func_database::val_str(String *str)
{
@@ -2377,69 +2364,55 @@ String *Item_func_database::val_str(String *str)
BUG#28086) binlog_format=MIXED, but is incorrectly replicated to ''
if binlog_format=STATEMENT.
*/
-
-bool Item_func_user::init(THD *thd, const char *user, const char *host)
+bool Item_func_user::init(const char *user, const char *host)
{
- DBUG_ENTER("Item_func_user::init");
DBUG_ASSERT(fixed == 1);
- /* Check if we have already calculated the value for this thread */
- if (thd->query_id == last_query_id)
- DBUG_RETURN(FALSE);
- DBUG_PRINT("enter", ("user: '%s' host: '%s'", user,host));
-
- last_query_id= thd->query_id;
- null_value= 0;
-
// For system threads (e.g. replication SQL thread) user may be empty
if (user)
{
- CHARSET_INFO *cs= system_charset_info;
+ CHARSET_INFO *cs= str_value.charset();
size_t res_length= (strlen(user)+strlen(host)+2) * cs->mbmaxlen;
- if (cached_value.alloc((uint) res_length))
+ if (str_value.alloc((uint) res_length))
{
null_value=1;
- DBUG_RETURN(TRUE);
+ return TRUE;
}
- cached_value.set_charset(cs);
- res_length=cs->cset->snprintf(cs, (char*)cached_value.ptr(),
- (uint) res_length,
+ res_length=cs->cset->snprintf(cs, (char*)str_value.ptr(), (uint) res_length,
"%s@%s", user, host);
- cached_value.length((uint) res_length);
- cached_value.mark_as_const();
+ str_value.length((uint) res_length);
+ str_value.mark_as_const();
}
- else
- cached_value.set("", 0, system_charset_info);
- DBUG_RETURN(FALSE);
+ return FALSE;
}
-String *Item_func_user::val_str(String *str)
-{
- THD *thd= current_thd;
- init(thd, thd->main_security_ctx.user, thd->main_security_ctx.host_or_ip);
- return null_value ? 0 : &cached_value;
-}
-String *Item_func_current_user::val_str(String *str)
+bool Item_func_user::fix_fields(THD *thd, Item **ref)
{
- THD *thd= current_thd;
- Security_context *ctx= (context->security_ctx ?
- context->security_ctx : thd->security_ctx);
- init(thd, ctx->priv_user, ctx->priv_host);
- return null_value ? 0 : &cached_value;
+ return (Item_func_sysconst::fix_fields(thd, ref) ||
+ init(thd->main_security_ctx.user,
+ thd->main_security_ctx.host_or_ip));
}
-bool Item_func_current_role::fix_fields(THD *thd, Item **ref)
+bool Item_func_current_user::fix_fields(THD *thd, Item **ref)
{
- return Item_func_sysconst::fix_fields(thd,ref) || init(thd);
+ if (Item_func_sysconst::fix_fields(thd, ref))
+ return TRUE;
+
+ Security_context *ctx= context && context->security_ctx
+ ? context->security_ctx : thd->security_ctx;
+ return init(ctx->priv_user, ctx->priv_host);
}
-bool Item_func_current_role::init(THD *thd)
+bool Item_func_current_role::fix_fields(THD *thd, Item **ref)
{
- Security_context *ctx= context->security_ctx
+ if (Item_func_sysconst::fix_fields(thd, ref))
+ return 1;
+
+ Security_context *ctx= context && context->security_ctx
? context->security_ctx : thd->security_ctx;
if (ctx->priv_role[0])
@@ -2448,22 +2421,14 @@ bool Item_func_current_role::init(THD *thd)
system_charset_info))
return 1;
+ null_value= maybe_null= 0;
+ str_value.mark_as_const();
return 0;
}
- null_value= 1;
+ null_value= maybe_null= 1;
return 0;
}
-String *Item_func_current_role::val_str(String *)
-{
- return (null_value ? 0 : &str_value);
-}
-
-int Item_func_current_role::save_in_field(Field *field, bool no_conversions)
-{
- return save_str_value_in_field(field, &str_value);
-}
-
void Item_func_soundex::fix_length_and_dec()
{
uint32 char_length= args[0]->max_char_length();
@@ -4154,7 +4119,7 @@ longlong Item_func_crc32::val_int()
return 0; /* purecov: inspected */
}
null_value=0;
- return (longlong) crc32(0L, (uchar*)res->ptr(), res->length());
+ return (longlong) my_checksum(0L, (uchar*)res->ptr(), res->length());
}
#ifdef HAVE_COMPRESS
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h
index b0f5064a190..25b63ebe73d 100644
--- a/sql/item_strfunc.h
+++ b/sql/item_strfunc.h
@@ -105,6 +105,8 @@ public:
String *val_str_ascii(String *);
void fix_length_and_dec();
const char *func_name() const { return "md5"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_md5>(thd, mem_root, this); }
};
@@ -114,7 +116,9 @@ public:
Item_func_sha(THD *thd, Item *a): Item_str_ascii_func(thd, a) {}
String *val_str_ascii(String *);
void fix_length_and_dec();
- const char *func_name() const { return "sha"; }
+ const char *func_name() const { return "sha"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_sha>(thd, mem_root, this); }
};
class Item_func_sha2 :public Item_str_ascii_func
@@ -124,6 +128,8 @@ public:
String *val_str_ascii(String *);
void fix_length_and_dec();
const char *func_name() const { return "sha2"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_sha2>(thd, mem_root, this); }
};
class Item_func_to_base64 :public Item_str_ascii_func
@@ -134,6 +140,8 @@ public:
String *val_str_ascii(String *);
void fix_length_and_dec();
const char *func_name() const { return "to_base64"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_to_base64>(thd, mem_root, this); }
};
class Item_func_from_base64 :public Item_str_func
@@ -144,6 +152,8 @@ public:
String *val_str(String *);
void fix_length_and_dec();
const char *func_name() const { return "from_base64"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_from_base64>(thd, mem_root, this); }
};
#include <my_crypt.h>
@@ -167,6 +177,8 @@ public:
Item_aes_crypt(thd, a, b) {}
void fix_length_and_dec();
const char *func_name() const { return "aes_encrypt"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_aes_encrypt>(thd, mem_root, this); }
};
class Item_func_aes_decrypt :public Item_aes_crypt
@@ -176,6 +188,8 @@ public:
Item_aes_crypt(thd, a, b) {}
void fix_length_and_dec();
const char *func_name() const { return "aes_decrypt"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_aes_decrypt>(thd, mem_root, this); }
};
@@ -188,6 +202,8 @@ public:
String *val_str(String *);
void fix_length_and_dec();
const char *func_name() const { return "concat"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_concat>(thd, mem_root, this); }
};
class Item_func_decode_histogram :public Item_str_func
@@ -204,6 +220,8 @@ public:
maybe_null= 1;
}
const char *func_name() const { return "decode_histogram"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_decode_histogram>(thd, mem_root, this); }
};
class Item_func_concat_ws :public Item_str_func
@@ -215,6 +233,8 @@ public:
void fix_length_and_dec();
const char *func_name() const { return "concat_ws"; }
table_map not_null_tables() const { return 0; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_concat_ws>(thd, mem_root, this); }
};
class Item_func_reverse :public Item_str_func
@@ -225,6 +245,8 @@ public:
String *val_str(String *);
void fix_length_and_dec();
const char *func_name() const { return "reverse"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_reverse>(thd, mem_root, this); }
};
@@ -237,6 +259,8 @@ public:
String *val_str(String *);
void fix_length_and_dec();
const char *func_name() const { return "replace"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_replace>(thd, mem_root, this); }
};
@@ -260,6 +284,8 @@ public:
String *val_str(String *str);
void fix_length_and_dec();
const char *func_name() const { return "regexp_replace"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_regexp_replace>(thd, mem_root, this); }
};
@@ -280,6 +306,8 @@ public:
String *val_str(String *str);
void fix_length_and_dec();
const char *func_name() const { return "regexp_substr"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_regexp_substr>(thd, mem_root, this); }
};
@@ -293,6 +321,8 @@ public:
String *val_str(String *);
void fix_length_and_dec();
const char *func_name() const { return "insert"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_insert>(thd, mem_root, this); }
};
@@ -314,6 +344,8 @@ public:
Item_func_lcase(THD *thd, Item *item): Item_str_conv(thd, item) {}
const char *func_name() const { return "lcase"; }
void fix_length_and_dec();
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_lcase>(thd, mem_root, this); }
};
class Item_func_ucase :public Item_str_conv
@@ -322,6 +354,8 @@ public:
Item_func_ucase(THD *thd, Item *item): Item_str_conv(thd, item) {}
const char *func_name() const { return "ucase"; }
void fix_length_and_dec();
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_ucase>(thd, mem_root, this); }
};
@@ -333,6 +367,8 @@ public:
String *val_str(String *);
void fix_length_and_dec();
const char *func_name() const { return "left"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_left>(thd, mem_root, this); }
};
@@ -344,6 +380,8 @@ public:
String *val_str(String *);
void fix_length_and_dec();
const char *func_name() const { return "right"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_right>(thd, mem_root, this); }
};
@@ -356,6 +394,8 @@ public:
String *val_str(String *);
void fix_length_and_dec();
const char *func_name() const { return "substr"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_substr>(thd, mem_root, this); }
};
@@ -368,6 +408,9 @@ public:
String *val_str(String *);
void fix_length_and_dec();
const char *func_name() const { return "substring_index"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_substr_index>(thd, mem_root, this); }
+
};
@@ -399,6 +442,8 @@ public:
const char *func_name() const { return "trim"; }
virtual void print(String *str, enum_query_type query_type);
virtual const char *mode_name() const { return "both"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_trim>(thd, mem_root, this); }
};
@@ -410,6 +455,8 @@ public:
String *val_str(String *);
const char *func_name() const { return "ltrim"; }
const char *mode_name() const { return "leading"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_ltrim>(thd, mem_root, this); }
};
@@ -421,6 +468,8 @@ public:
String *val_str(String *);
const char *func_name() const { return "rtrim"; }
const char *mode_name() const { return "trailing"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_rtrim>(thd, mem_root, this); }
};
@@ -458,6 +507,8 @@ public:
"password" : "old_password"); }
static char *alloc(THD *thd, const char *password, size_t pass_len,
enum PW_Alg al);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_password>(thd, mem_root, this); }
};
@@ -476,6 +527,8 @@ public:
max_length = args[0]->max_length + 9;
}
const char *func_name() const { return "des_encrypt"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_des_encrypt>(thd, mem_root, this); }
};
class Item_func_des_decrypt :public Item_str_func
@@ -494,6 +547,8 @@ public:
max_length-= 9U;
}
const char *func_name() const { return "des_decrypt"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_des_decrypt>(thd, mem_root, this); }
};
class Item_func_encrypt :public Item_str_func
@@ -521,6 +576,8 @@ public:
{
return FALSE;
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_encrypt>(thd, mem_root, this); }
};
#include "sql_crypt.h"
@@ -539,6 +596,8 @@ public:
String *val_str(String *);
void fix_length_and_dec();
const char *func_name() const { return "encode"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_encode>(thd, mem_root, this); }
protected:
virtual void crypto_transform(String *);
private:
@@ -552,6 +611,8 @@ class Item_func_decode :public Item_func_encode
public:
Item_func_decode(THD *thd, Item *a, Item *seed_arg): Item_func_encode(thd, a, seed_arg) {}
const char *func_name() const { return "decode"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_decode>(thd, mem_root, this); }
protected:
void crypto_transform(String *);
};
@@ -562,7 +623,10 @@ class Item_func_sysconst :public Item_str_func
public:
Item_func_sysconst(THD *thd): Item_str_func(thd)
{ collation.set(system_charset_info,DERIVATION_SYSCONST); }
- Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs);
+ Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs)
+ {
+ return const_charset_converter(thd, tocs, true, fully_qualified_func_name());
+ }
/*
Used to create correct Item name in new converted item in
safe_charset_converter, return string representation of this function
@@ -572,7 +636,7 @@ public:
bool check_vcol_func_processor(void *arg)
{
return mark_unsupported_function(fully_qualified_func_name(), arg,
- VCOL_NON_DETERMINISTIC);
+ VCOL_SESSION_FUNC);
}
};
@@ -589,21 +653,27 @@ public:
}
const char *func_name() const { return "database"; }
const char *fully_qualified_func_name() const { return "database()"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_database>(thd, mem_root, this); }
};
class Item_func_user :public Item_func_sysconst
{
protected:
- query_id_t last_query_id;
- String cached_value;
- bool init(THD *thd, const char *user, const char *host);
+ bool init (const char *user, const char *host);
public:
- Item_func_user(THD *thd): Item_func_sysconst(thd), last_query_id(0)
- {}
-
- String *val_str(String *);
+ Item_func_user(THD *thd): Item_func_sysconst(thd)
+ {
+ str_value.set("", 0, system_charset_info);
+ }
+ String *val_str(String *)
+ {
+ DBUG_ASSERT(fixed == 1);
+ return (null_value ? 0 : &str_value);
+ }
+ bool fix_fields(THD *thd, Item **ref);
void fix_length_and_dec()
{
max_length= (username_char_length +
@@ -611,6 +681,12 @@ public:
}
const char *func_name() const { return "user"; }
const char *fully_qualified_func_name() const { return "user()"; }
+ int save_in_field(Field *field, bool no_conversions)
+ {
+ return save_str_value_in_field(field, &str_value);
+ }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_user>(thd, mem_root, this); }
};
@@ -621,14 +697,14 @@ class Item_func_current_user :public Item_func_user
public:
Item_func_current_user(THD *thd, Name_resolution_context *context_arg):
Item_func_user(thd), context(context_arg) {}
- String *val_str(String *);
+ bool fix_fields(THD *thd, Item **ref);
const char *func_name() const { return "current_user"; }
const char *fully_qualified_func_name() const { return "current_user()"; }
- /* This is because of the stored Name_resolution_context */
bool check_vcol_func_processor(void *arg)
{
+ context= 0;
return mark_unsupported_function(fully_qualified_func_name(), arg,
- VCOL_IMPOSSIBLE);
+ VCOL_SESSION_FUNC);
}
};
@@ -642,21 +718,25 @@ public:
Item_func_sysconst(thd), context(context_arg) {}
bool fix_fields(THD *thd, Item **ref);
void fix_length_and_dec()
- {
- max_length= username_char_length * SYSTEM_CHARSET_MBMAXLEN;
- maybe_null=1;
- }
- bool init(THD *thd);
- int save_in_field(Field *field, bool no_conversions);
+ { max_length= username_char_length * SYSTEM_CHARSET_MBMAXLEN; }
+ int save_in_field(Field *field, bool no_conversions)
+ { return save_str_value_in_field(field, &str_value); }
const char *func_name() const { return "current_role"; }
const char *fully_qualified_func_name() const { return "current_role()"; }
- String *val_str(String *);
- /* This is because of the stored Name_resolution_context */
+ String *val_str(String *)
+ {
+ DBUG_ASSERT(fixed == 1);
+ return (null_value ? 0 : &str_value);
+ }
bool check_vcol_func_processor(void *arg)
{
+
+ context= 0;
return mark_unsupported_function(fully_qualified_func_name(), arg,
- VCOL_IMPOSSIBLE);
+ VCOL_SESSION_FUNC);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_current_role>(thd, mem_root, this); }
};
@@ -668,6 +748,8 @@ public:
String *val_str(String *);
void fix_length_and_dec();
const char *func_name() const { return "soundex"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_soundex>(thd, mem_root, this); }
};
@@ -680,6 +762,8 @@ public:
String *val_str(String *str);
void fix_length_and_dec();
const char *func_name() const { return "elt"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_elt>(thd, mem_root, this); }
};
@@ -692,6 +776,8 @@ public:
String *val_str(String *str);
void fix_length_and_dec();
const char *func_name() const { return "make_set"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_make_set>(thd, mem_root, this); }
};
@@ -710,6 +796,8 @@ public:
void fix_length_and_dec();
const char *func_name() const { return "format"; }
virtual void print(String *str, enum_query_type query_type);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_format>(thd, mem_root, this); }
};
@@ -727,6 +815,8 @@ public:
max_length= arg_count * 4;
}
const char *func_name() const { return "char"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_char>(thd, mem_root, this); }
};
@@ -739,6 +829,8 @@ public:
String *val_str(String *);
void fix_length_and_dec();
const char *func_name() const { return "repeat"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_repeat>(thd, mem_root, this); }
};
@@ -749,6 +841,8 @@ public:
String *val_str(String *);
void fix_length_and_dec();
const char *func_name() const { return "space"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_space>(thd, mem_root, this); }
};
@@ -763,8 +857,11 @@ public:
const char *func_name() const { return "binlog_gtid_pos"; }
bool check_vcol_func_processor(void *arg)
{
+
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_binlog_gtid_pos>(thd, mem_root, this); }
};
@@ -777,6 +874,8 @@ public:
String *val_str(String *);
void fix_length_and_dec();
const char *func_name() const { return "rpad"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_rpad>(thd, mem_root, this); }
};
@@ -789,6 +888,8 @@ public:
String *val_str(String *);
void fix_length_and_dec();
const char *func_name() const { return "lpad"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_lpad>(thd, mem_root, this); }
};
@@ -805,6 +906,8 @@ public:
max_length=64;
maybe_null= 1;
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_conv>(thd, mem_root, this); }
};
@@ -822,6 +925,8 @@ public:
decimals=0;
fix_char_length(args[0]->max_length * 2);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_hex>(thd, mem_root, this); }
};
class Item_func_unhex :public Item_str_func
@@ -841,6 +946,8 @@ public:
decimals=0;
max_length=(1+args[0]->max_length)/2;
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_unhex>(thd, mem_root, this); }
};
@@ -871,6 +978,8 @@ public:
Item_func_like_range_min(THD *thd, Item *a, Item *b):
Item_func_like_range(thd, a, b, true) { }
const char *func_name() const { return "like_range_min"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_like_range_min>(thd, mem_root, this); }
};
@@ -880,6 +989,8 @@ public:
Item_func_like_range_max(THD *thd, Item *a, Item *b):
Item_func_like_range(thd, a, b, false) { }
const char *func_name() const { return "like_range_max"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_like_range_max>(thd, mem_root, this); }
};
#endif
@@ -905,6 +1016,8 @@ public:
virtual void print(String *str, enum_query_type query_type);
const char *func_name() const { return "cast_as_binary"; }
bool need_parentheses_in_default() { return true; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_binary>(thd, mem_root, this); }
};
@@ -925,6 +1038,8 @@ public:
{
return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_load_file>(thd, mem_root, this); }
};
@@ -940,6 +1055,8 @@ class Item_func_export_set: public Item_str_func
String *val_str(String *str);
void fix_length_and_dec();
const char *func_name() const { return "export_set"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_export_set>(thd, mem_root, this); }
};
@@ -957,6 +1074,8 @@ public:
2 * collation.collation->mbmaxlen;
max_length= (uint32) MY_MIN(max_result_length, MAX_BLOB_WIDTH);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_quote>(thd, mem_root, this); }
};
class Item_func_conv_charset :public Item_str_func
@@ -1039,6 +1158,8 @@ public:
void fix_length_and_dec();
const char *func_name() const { return "convert"; }
virtual void print(String *str, enum_query_type query_type);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_conv_charset>(thd, mem_root, this); }
};
class Item_func_set_collation :public Item_str_func
@@ -1058,6 +1179,8 @@ public:
return args[0]->field_for_view_update();
}
bool need_parentheses_in_default() { return true; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_set_collation>(thd, mem_root, this); }
};
@@ -1085,6 +1208,8 @@ public:
:Item_func_expr_str_metadata(thd, a) { }
String *val_str(String *);
const char *func_name() const { return "charset"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_charset>(thd, mem_root, this); }
};
@@ -1095,6 +1220,8 @@ public:
:Item_func_expr_str_metadata(thd, a) {}
String *val_str(String *);
const char *func_name() const { return "collation"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_collation>(thd, mem_root, this); }
};
@@ -1127,6 +1254,8 @@ public:
}
Item* propagate_equal_fields(THD *thd, const Context &ctx, COND_EQUAL *cond)
{ return this; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_weight_string>(thd, mem_root, this); }
};
class Item_func_crc32 :public Item_int_func
@@ -1138,6 +1267,8 @@ public:
const char *func_name() const { return "crc32"; }
void fix_length_and_dec() { max_length=10; }
longlong val_int();
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_crc32>(thd, mem_root, this); }
};
class Item_func_uncompressed_length : public Item_int_func
@@ -1148,6 +1279,8 @@ public:
const char *func_name() const{return "uncompressed_length";}
void fix_length_and_dec() { max_length=10; maybe_null= true; }
longlong val_int();
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_uncompressed_length>(thd, mem_root, this); }
};
#ifdef HAVE_COMPRESS
@@ -1164,6 +1297,8 @@ public:
void fix_length_and_dec(){max_length= (args[0]->max_length*120)/100+12;}
const char *func_name() const{return "compress";}
String *val_str(String *) ZLIB_DEPENDED_FUNCTION
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_compress>(thd, mem_root, this); }
};
class Item_func_uncompress: public Item_str_func
@@ -1174,6 +1309,8 @@ public:
void fix_length_and_dec(){ maybe_null= 1; max_length= MAX_BLOB_WIDTH; }
const char *func_name() const{return "uncompress";}
String *val_str(String *) ZLIB_DEPENDED_FUNCTION
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_uncompress>(thd, mem_root, this); }
};
@@ -1193,6 +1330,8 @@ public:
{
return mark_unsupported_function(func_name(), "()", arg, VCOL_NON_DETERMINISTIC);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_uuid>(thd, mem_root, this); }
};
@@ -1214,6 +1353,8 @@ public:
String *val_str(String *);
virtual void print(String *str, enum_query_type query_type);
virtual enum Functype functype() const { return DYNCOL_FUNC; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_dyncol_create>(thd, mem_root, this); }
};
@@ -1226,6 +1367,8 @@ public:
const char *func_name() const{ return "column_add"; }
String *val_str(String *);
virtual void print(String *str, enum_query_type query_type);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_dyncol_add>(thd, mem_root, this); }
};
class Item_func_dyncol_json: public Item_str_func
@@ -1241,6 +1384,8 @@ public:
collation.set(&my_charset_bin);
decimals= 0;
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_dyncol_json>(thd, mem_root, this); }
};
/*
@@ -1281,6 +1426,8 @@ public:
bool get_dyn_value(THD *thd, DYNAMIC_COLUMN_VALUE *val, String *tmp);
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate);
void print(String *str, enum_query_type query_type);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_dyncol_get>(thd, mem_root, this); }
};
@@ -1291,6 +1438,8 @@ public:
void fix_length_and_dec() { maybe_null= 1; max_length= MAX_BLOB_WIDTH; };
const char *func_name() const{ return "column_list"; }
String *val_str(String *);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_dyncol_list>(thd, mem_root, this); }
};
#endif /* ITEM_STRFUNC_INCLUDED */
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index 8bb12ce0ac8..21c633333f1 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -54,7 +54,7 @@ Item_subselect::Item_subselect(THD *thd_arg):
have_to_be_excluded(0),
inside_first_fix_fields(0), done_first_fix_fields(FALSE),
expr_cache(0), forced_const(FALSE), substitution(0), engine(0), eliminated(FALSE),
- changed(0), is_correlated(FALSE)
+ changed(0), is_correlated(FALSE), with_recursive_reference(0)
{
DBUG_ENTER("Item_subselect::Item_subselect");
DBUG_PRINT("enter", ("this: 0x%lx", (ulong) this));
@@ -564,6 +564,21 @@ void Item_subselect::recalc_used_tables(st_select_lex *new_parent,
bool Item_subselect::is_expensive()
{
double examined_rows= 0;
+ bool all_are_simple= true;
+
+ /* check extremely simple select */
+ if (!unit->first_select()->next_select()) // no union
+ {
+ /*
+ such single selects works even without optimization because
+ can not makes loops
+ */
+ SELECT_LEX *sl= unit->first_select();
+ JOIN *join = sl->join;
+ if (join && !join->tables_list && !sl->first_inner_unit())
+ return false;
+ }
+
for (SELECT_LEX *sl= unit->first_select(); sl; sl= sl->next_select())
{
@@ -573,23 +588,27 @@ bool Item_subselect::is_expensive()
if (!cur_join)
return true;
- /* very simple subquery */
- if (!cur_join->tables_list && !sl->first_inner_unit())
- return false;
-
/*
If the subquery is not optimised or in the process of optimization
it supposed to be expensive
*/
- if (!cur_join->optimized)
+ if (cur_join->optimization_state != JOIN::OPTIMIZATION_DONE)
return true;
+ if (!cur_join->tables_list && !sl->first_inner_unit())
+ continue;
+
/*
Subqueries whose result is known after optimization are not expensive.
Such subqueries have all tables optimized away, thus have no join plan.
*/
if ((cur_join->zero_result_cause || !cur_join->tables_list))
- return false;
+ continue;
+
+ /*
+ This is not simple SELECT in union so we can not go by simple condition
+ */
+ all_are_simple= false;
/*
If a subquery is not optimized we cannot estimate its cost. A subquery is
@@ -610,7 +629,8 @@ bool Item_subselect::is_expensive()
examined_rows+= cur_join->get_examined_rows();
}
- return (examined_rows > thd->variables.expensive_subquery_limit);
+ return !all_are_simple &&
+ (examined_rows > thd->variables.expensive_subquery_limit);
}
@@ -785,7 +805,8 @@ bool Item_subselect::expr_cache_is_needed(THD *thd)
engine->cols() == 1 &&
optimizer_flag(thd, OPTIMIZER_SWITCH_SUBQUERY_CACHE) &&
!(engine->uncacheable() & (UNCACHEABLE_RAND |
- UNCACHEABLE_SIDEEFFECT)));
+ UNCACHEABLE_SIDEEFFECT)) &&
+ !with_recursive_reference);
}
@@ -824,7 +845,8 @@ bool Item_in_subselect::expr_cache_is_needed(THD *thd)
{
return (optimizer_flag(thd, OPTIMIZER_SWITCH_SUBQUERY_CACHE) &&
!(engine->uncacheable() & (UNCACHEABLE_RAND |
- UNCACHEABLE_SIDEEFFECT)));
+ UNCACHEABLE_SIDEEFFECT)) &&
+ !with_recursive_reference);
}
@@ -3678,7 +3700,7 @@ int subselect_single_select_engine::exec()
SELECT_LEX *save_select= thd->lex->current_select;
thd->lex->current_select= select_lex;
- if (!join->optimized)
+ if (join->optimization_state == JOIN::NOT_OPTIMIZED)
{
SELECT_LEX_UNIT *unit= select_lex->master_unit();
@@ -3828,7 +3850,7 @@ int subselect_uniquesubquery_engine::scan_table()
}
table->file->extra_opt(HA_EXTRA_CACHE,
- current_thd->variables.read_buff_size);
+ get_thd()->variables.read_buff_size);
table->null_row= 0;
for (;;)
{
@@ -4266,7 +4288,7 @@ table_map subselect_union_engine::upper_select_const_tables()
void subselect_single_select_engine::print(String *str,
enum_query_type query_type)
{
- select_lex->print(thd, str, query_type);
+ select_lex->print(get_thd(), str, query_type);
}
@@ -4797,6 +4819,7 @@ my_bitmap_init_memroot(MY_BITMAP *map, uint n_bits, MEM_ROOT *mem_root)
bool subselect_hash_sj_engine::init(List<Item> *tmp_columns, uint subquery_id)
{
+ THD *thd= get_thd();
select_union *result_sink;
/* Options to create_tmp_table. */
ulonglong tmp_create_options= thd->variables.option_bits | TMP_TABLE_ALL_COLUMNS;
@@ -5319,7 +5342,8 @@ int subselect_hash_sj_engine::exec()
*/
thd->lex->current_select= materialize_engine->select_lex;
/* The subquery should be optimized, and materialized only once. */
- DBUG_ASSERT(materialize_join->optimized && !is_materialized);
+ DBUG_ASSERT(materialize_join->optimization_state == JOIN::OPTIMIZATION_DONE &&
+ !is_materialized);
materialize_join->exec();
if ((res= MY_TEST(materialize_join->error || thd->is_fatal_error ||
thd->is_error())))
@@ -6030,6 +6054,7 @@ bool
subselect_rowid_merge_engine::init(MY_BITMAP *non_null_key_parts,
MY_BITMAP *partial_match_key_parts)
{
+ THD *thd= get_thd();
/* The length in bytes of the rowids (positions) of tmp_table. */
uint rowid_length= tmp_table->file->ref_length;
ha_rows row_count= tmp_table->file->stats.records;
@@ -6568,7 +6593,7 @@ bool subselect_table_scan_engine::partial_match()
}
tmp_table->file->extra_opt(HA_EXTRA_CACHE,
- current_thd->variables.read_buff_size);
+ get_thd()->variables.read_buff_size);
for (;;)
{
error= tmp_table->file->ha_rnd_next(tmp_table->record[0]);
diff --git a/sql/item_subselect.h b/sql/item_subselect.h
index c39735384ed..83340573e8a 100644
--- a/sql/item_subselect.h
+++ b/sql/item_subselect.h
@@ -126,7 +126,14 @@ public:
bool changed;
/* TRUE <=> The underlying SELECT is correlated w.r.t some ancestor select */
- bool is_correlated;
+ bool is_correlated;
+
+ /*
+ TRUE <=> the subquery contains a recursive reference in the FROM list
+ of one of its selects. In this case some of subquery optimization
+ strategies cannot be applied for the subquery;
+ */
+ bool with_recursive_reference;
enum subs_type {UNKNOWN_SUBS, SINGLEROW_SUBS,
EXISTS_SUBS, IN_SUBS, ALL_SUBS, ANY_SUBS};
@@ -250,6 +257,9 @@ public:
}
void init_expr_cache_tracker(THD *thd);
+
+ Item* build_clone(THD *thd, MEM_ROOT *mem_root) { return 0; }
+ Item* get_copy(THD *thd, MEM_ROOT *mem_root) { return 0; }
friend class select_result_interceptor;
@@ -755,7 +765,8 @@ public:
ROWID_MERGE_ENGINE, TABLE_SCAN_ENGINE};
subselect_engine(Item_subselect *si,
- select_result_interceptor *res)
+ select_result_interceptor *res):
+ thd(NULL)
{
result= res;
item= si;
@@ -771,7 +782,7 @@ public:
Should be called before prepare().
*/
void set_thd(THD *thd_arg);
- THD * get_thd() { return thd; }
+ THD * get_thd() { return thd ? thd : current_thd; }
virtual int prepare(THD *)= 0;
virtual void fix_length_and_dec(Item_cache** row)= 0;
/*
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index cc7a76213f0..83378c2e994 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -381,6 +381,16 @@ bool Item_sum::register_sum_func(THD *thd, Item **ref)
sl->master_unit()->item->with_sum_func= 1;
}
thd->lex->current_select->mark_as_dependent(thd, aggr_sel, NULL);
+
+ if ((thd->lex->describe & DESCRIBE_EXTENDED) && aggr_sel)
+ {
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
+ ER_WARN_AGGFUNC_DEPENDENCE,
+ ER_THD(thd, ER_WARN_AGGFUNC_DEPENDENCE),
+ func_name(),
+ thd->lex->current_select->select_number,
+ aggr_sel->select_number);
+ }
return FALSE;
}
@@ -1342,10 +1352,14 @@ void Item_sum_sum::add_helper(bool perform_removal)
{
if (perform_removal)
{
- DBUG_ASSERT(count > 0);
- my_decimal_sub(E_DEC_FATAL_ERROR, dec_buffs + (curr_dec_buff ^ 1),
- dec_buffs + curr_dec_buff, val);
- count--;
+ if (count > 0)
+ {
+ my_decimal_sub(E_DEC_FATAL_ERROR, dec_buffs + (curr_dec_buff ^ 1),
+ dec_buffs + curr_dec_buff, val);
+ count--;
+ }
+ else
+ DBUG_VOID_RETURN;
}
else
{
@@ -1359,7 +1373,7 @@ void Item_sum_sum::add_helper(bool perform_removal)
}
else
{
- if (perform_removal)
+ if (perform_removal && count > 0)
sum-= aggr->arg_val_real();
else
sum+= aggr->arg_val_real();
@@ -1367,8 +1381,10 @@ void Item_sum_sum::add_helper(bool perform_removal)
{
if (perform_removal)
{
- DBUG_ASSERT(count > 0);
- count--;
+ if (count > 0)
+ {
+ count--;
+ }
}
else
count++;
@@ -1422,7 +1438,7 @@ my_decimal *Item_sum_sum::val_decimal(my_decimal *val)
if (aggr)
aggr->endup();
if (Item_sum_sum::result_type() == DECIMAL_RESULT)
- return (dec_buffs + curr_dec_buff);
+ return null_value ? NULL : (dec_buffs + curr_dec_buff);
return val_decimal_from_real(val);
}
@@ -1588,7 +1604,8 @@ void Item_sum_count::remove()
DBUG_ASSERT(aggr->Aggrtype() == Aggregator::SIMPLE_AGGREGATOR);
if (aggr->arg_is_null(false))
return;
- count--;
+ if (count > 0)
+ count--;
}
longlong Item_sum_count::val_int()
@@ -1692,8 +1709,8 @@ void Item_sum_avg::remove()
Item_sum_sum::remove();
if (!aggr->arg_is_null(true))
{
- DBUG_ASSERT(count > 0);
- count--;
+ if (count > 0)
+ count--;
}
}
@@ -1756,6 +1773,8 @@ double Item_sum_std::val_real()
{
DBUG_ASSERT(fixed == 1);
double nr= Item_sum_variance::val_real();
+ if (my_isinf(nr))
+ return DBL_MAX;
DBUG_ASSERT(nr >= 0.0);
return sqrt(nr);
}
@@ -2178,6 +2197,9 @@ bool Item_sum_bit::clear_as_window()
bool Item_sum_bit::remove_as_window(ulonglong value)
{
DBUG_ASSERT(as_window_function);
+ if (num_values_added == 0)
+ return 0; // Nothing to remove.
+
for (int i= 0; i < NUM_BIT_COUNTERS; i++)
{
if (!bit_counters[i])
@@ -2188,7 +2210,7 @@ bool Item_sum_bit::remove_as_window(ulonglong value)
}
bit_counters[i]-= (value & (1 << i)) ? 1 : 0;
}
- DBUG_ASSERT(num_values_added > 0);
+
// Prevent overflow;
num_values_added = std::min(num_values_added, num_values_added - 1);
set_bits_from_counters();
diff --git a/sql/item_sum.h b/sql/item_sum.h
index 4cb5529e1ce..16835441125 100644
--- a/sql/item_sum.h
+++ b/sql/item_sum.h
@@ -543,7 +543,8 @@ public:
virtual void clear()= 0;
virtual bool add()= 0;
virtual bool setup(THD *thd) { return false; }
-
+
+ virtual bool supports_removal() const { return false; }
virtual void remove() { DBUG_ASSERT(0); }
virtual void cleanup();
@@ -768,6 +769,13 @@ public:
}
Item *copy_or_same(THD* thd);
void remove();
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_sum_sum>(thd, mem_root, this); }
+
+ bool supports_removal() const
+ {
+ return true;
+ }
private:
void add_helper(bool perform_removal);
@@ -825,6 +833,13 @@ class Item_sum_count :public Item_sum_int
return has_with_distinct() ? "count(distinct " : "count(";
}
Item *copy_or_same(THD* thd);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_sum_count>(thd, mem_root, this); }
+
+ bool supports_removal() const
+ {
+ return true;
+ }
};
@@ -872,6 +887,13 @@ public:
count= 0;
Item_sum_sum::cleanup();
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_sum_avg>(thd, mem_root, this); }
+
+ bool supports_removal() const
+ {
+ return true;
+ }
};
@@ -930,6 +952,8 @@ public:
count= 0;
Item_sum_num::cleanup();
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_sum_variance>(thd, mem_root, this); }
};
/*
@@ -949,6 +973,8 @@ class Item_sum_std :public Item_sum_variance
Item *result_item(THD *thd, Field *field);
const char *func_name() const { return "std("; }
Item *copy_or_same(THD* thd);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_sum_std>(thd, mem_root, this); }
};
// This class is a string or number function depending on num_func
@@ -1014,6 +1040,8 @@ public:
bool add();
const char *func_name() const { return "min("; }
Item *copy_or_same(THD* thd);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_sum_min>(thd, mem_root, this); }
};
@@ -1027,6 +1055,8 @@ public:
bool add();
const char *func_name() const { return "max("; }
Item *copy_or_same(THD* thd);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_sum_max>(thd, mem_root, this); }
};
@@ -1075,6 +1105,11 @@ public:
DBUG_ASSERT(0);
}
+ bool supports_removal() const
+ {
+ return true;
+ }
+
protected:
static const int NUM_BIT_COUNTERS= 64;
ulonglong reset_bits,bits;
@@ -1101,6 +1136,8 @@ public:
bool add();
const char *func_name() const { return "bit_or("; }
Item *copy_or_same(THD* thd);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_sum_or>(thd, mem_root, this); }
private:
void set_bits_from_counters();
@@ -1116,6 +1153,8 @@ public:
bool add();
const char *func_name() const { return "bit_and("; }
Item *copy_or_same(THD* thd);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_sum_and>(thd, mem_root, this); }
private:
void set_bits_from_counters();
@@ -1129,6 +1168,8 @@ public:
bool add();
const char *func_name() const { return "bit_xor("; }
Item *copy_or_same(THD* thd);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_sum_xor>(thd, mem_root, this); }
private:
void set_bits_from_counters();
@@ -1187,6 +1228,8 @@ public:
my_decimal *val_decimal(my_decimal *dec) { return val_decimal_from_real(dec); }
String *val_str(String *str) { return val_string_from_real(str); }
double val_real();
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_avg_field_double>(thd, mem_root, this); }
};
@@ -1206,6 +1249,8 @@ public:
longlong val_int() { return val_int_from_decimal(); }
String *val_str(String *str) { return val_string_from_decimal(str); }
my_decimal *val_decimal(my_decimal *);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_avg_field_decimal>(thd, mem_root, this); }
};
@@ -1226,6 +1271,8 @@ public:
bool is_null() { update_null_value(); return null_value; }
enum_field_types field_type() const { return MYSQL_TYPE_DOUBLE; }
enum Item_result result_type () const { return REAL_RESULT; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_variance_field>(thd, mem_root, this); }
};
@@ -1237,6 +1284,8 @@ public:
{ }
enum Type type() const { return FIELD_STD_ITEM; }
double val_real();
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_std_field>(thd, mem_root, this); }
};
@@ -1324,6 +1373,8 @@ class Item_sum_udf_float :public Item_udf_sum
enum_field_types field_type() const { return MYSQL_TYPE_DOUBLE; }
void fix_length_and_dec() { fix_num_length_and_dec(); }
Item *copy_or_same(THD* thd);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_sum_udf_float>(thd, mem_root, this); }
};
@@ -1345,6 +1396,8 @@ public:
enum_field_types field_type() const { return MYSQL_TYPE_LONGLONG; }
void fix_length_and_dec() { decimals=0; max_length=21; }
Item *copy_or_same(THD* thd);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_sum_udf_int>(thd, mem_root, this); }
};
@@ -1385,6 +1438,8 @@ public:
enum_field_types field_type() const { return string_field_type(); }
void fix_length_and_dec();
Item *copy_or_same(THD* thd);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_sum_udf_str>(thd, mem_root, this); }
};
@@ -1405,6 +1460,8 @@ public:
enum_field_types field_type() const { return MYSQL_TYPE_NEWDECIMAL; }
void fix_length_and_dec() { fix_num_length_and_dec(); }
Item *copy_or_same(THD* thd);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_sum_udf_decimal>(thd, mem_root, this); }
};
#else /* Dummy functions to get sql_yacc.cc compiled */
@@ -1598,6 +1655,8 @@ public:
virtual void print(String *str, enum_query_type query_type);
virtual bool change_context_processor(void *cntx)
{ context= (Name_resolution_context *)cntx; return FALSE; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_group_concat>(thd, mem_root, this); }
};
#endif /* ITEM_SUM_INCLUDED */
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index a4a694fe5eb..41dc96717fe 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -2201,26 +2201,26 @@ void Item_extract::fix_length_and_dec()
{
maybe_null=1; // If wrong date
switch (int_type) {
- case INTERVAL_YEAR: max_length=4; date_value=1; break;
- case INTERVAL_YEAR_MONTH: max_length=6; date_value=1; break;
- case INTERVAL_QUARTER: max_length=2; date_value=1; break;
- case INTERVAL_MONTH: max_length=2; date_value=1; break;
- case INTERVAL_WEEK: max_length=2; date_value=1; break;
- case INTERVAL_DAY: max_length=2; date_value=1; break;
- case INTERVAL_DAY_HOUR: max_length=9; date_value=0; break;
- case INTERVAL_DAY_MINUTE: max_length=11; date_value=0; break;
- case INTERVAL_DAY_SECOND: max_length=13; date_value=0; break;
- case INTERVAL_HOUR: max_length=2; date_value=0; break;
- case INTERVAL_HOUR_MINUTE: max_length=4; date_value=0; break;
- case INTERVAL_HOUR_SECOND: max_length=6; date_value=0; break;
- case INTERVAL_MINUTE: max_length=2; date_value=0; break;
- case INTERVAL_MINUTE_SECOND: max_length=4; date_value=0; break;
- case INTERVAL_SECOND: max_length=2; date_value=0; break;
- case INTERVAL_MICROSECOND: max_length=2; date_value=0; break;
- case INTERVAL_DAY_MICROSECOND: max_length=20; date_value=0; break;
- case INTERVAL_HOUR_MICROSECOND: max_length=13; date_value=0; break;
- case INTERVAL_MINUTE_MICROSECOND: max_length=11; date_value=0; break;
- case INTERVAL_SECOND_MICROSECOND: max_length=9; date_value=0; break;
+ case INTERVAL_YEAR: set_date_length(4); break; // YYYY
+ case INTERVAL_YEAR_MONTH: set_date_length(6); break; // YYYYMM
+ case INTERVAL_QUARTER: set_date_length(2); break; // 1..4
+ case INTERVAL_MONTH: set_date_length(2); break; // MM
+ case INTERVAL_WEEK: set_date_length(2); break; // 0..52
+ case INTERVAL_DAY: set_date_length(2); break; // DD
+ case INTERVAL_DAY_HOUR: set_time_length(4); break; // DDhh
+ case INTERVAL_DAY_MINUTE: set_time_length(6); break; // DDhhmm
+ case INTERVAL_DAY_SECOND: set_time_length(8); break; // DDhhmmss
+ case INTERVAL_HOUR: set_time_length(2); break; // hh
+ case INTERVAL_HOUR_MINUTE: set_time_length(4); break; // hhmm
+ case INTERVAL_HOUR_SECOND: set_time_length(6); break; // hhmmss
+ case INTERVAL_MINUTE: set_time_length(2); break; // mm
+ case INTERVAL_MINUTE_SECOND: set_time_length(4); break; // mmss
+ case INTERVAL_SECOND: set_time_length(2); break; // ss
+ case INTERVAL_MICROSECOND: set_time_length(6); break; // ffffff
+ case INTERVAL_DAY_MICROSECOND: set_time_length(14); break; // DDhhmmssffffff
+ case INTERVAL_HOUR_MICROSECOND: set_time_length(12); break; // hhmmssffffff
+ case INTERVAL_MINUTE_MICROSECOND: set_time_length(10); break; // mmssffffff
+ case INTERVAL_SECOND_MICROSECOND: set_time_length(8); break; // ssffffff
case INTERVAL_LAST: DBUG_ASSERT(0); break; /* purecov: deadcode */
}
}
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index 80e7c1010d0..a853c63128d 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -53,6 +53,8 @@ public:
{
max_length=6*MY_CHARSET_BIN_MB_MAXLEN;
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_period_add>(thd, mem_root, this); }
};
@@ -67,6 +69,8 @@ public:
decimals=0;
max_length=6*MY_CHARSET_BIN_MB_MAXLEN;
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_period_diff>(thd, mem_root, this); }
};
@@ -90,6 +94,8 @@ public:
{
return !has_date_args();
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_to_days>(thd, mem_root, this); }
};
@@ -123,6 +129,8 @@ public:
{
return !has_date_args();
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_to_seconds>(thd, mem_root, this); }
};
@@ -144,6 +152,8 @@ public:
{
return !has_date_args();
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_dayofmonth>(thd, mem_root, this); }
};
@@ -178,6 +188,8 @@ public:
{
return !has_date_args();
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_month>(thd, mem_root, this); }
};
@@ -196,8 +208,11 @@ public:
}
bool check_vcol_func_processor(void *arg)
{
- return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
+
+ return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_monthname>(thd, mem_root, this); }
};
@@ -219,6 +234,8 @@ public:
{
return !has_date_args();
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_dayofyear>(thd, mem_root, this); }
};
@@ -240,6 +257,8 @@ public:
{
return !has_time_args();
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_hour>(thd, mem_root, this); }
};
@@ -261,6 +280,8 @@ public:
{
return !has_time_args();
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_minute>(thd, mem_root, this); }
};
@@ -282,6 +303,8 @@ public:
{
return !has_date_args();
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_quarter>(thd, mem_root, this); }
};
@@ -303,6 +326,8 @@ public:
{
return !has_time_args();
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_second>(thd, mem_root, this); }
};
@@ -318,6 +343,8 @@ public:
max_length=2*MY_CHARSET_BIN_MB_MAXLEN;
maybe_null=1;
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_week>(thd, mem_root, this); }
};
class Item_func_yearweek :public Item_int_func
@@ -338,6 +365,8 @@ public:
{
return !has_date_args();
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_yearweek>(thd, mem_root, this); }
};
@@ -361,6 +390,8 @@ public:
{
return !has_date_args();
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_year>(thd, mem_root, this); }
};
@@ -396,6 +427,8 @@ public:
{
return !has_date_args();
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_weekday>(thd, mem_root, this); }
};
class Item_func_dayname :public Item_func_weekday
@@ -411,7 +444,7 @@ class Item_func_dayname :public Item_func_weekday
bool check_partition_func_processor(void *int_arg) {return TRUE;}
bool check_vcol_func_processor(void *arg)
{
- return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
+ return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC);
}
};
@@ -468,6 +501,8 @@ public:
}
longlong int_op();
my_decimal *decimal_op(my_decimal* buf);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_unix_timestamp>(thd, mem_root, this); }
};
@@ -487,6 +522,8 @@ public:
}
longlong int_op();
my_decimal *decimal_op(my_decimal* buf);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_time_to_sec>(thd, mem_root, this); }
};
@@ -625,6 +662,8 @@ public:
Item_func_curtime_local(THD *thd, uint dec): Item_func_curtime(thd, dec) {}
const char *func_name() const { return "curtime"; }
virtual void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_curtime_local>(thd, mem_root, this); }
};
@@ -634,6 +673,8 @@ public:
Item_func_curtime_utc(THD *thd, uint dec): Item_func_curtime(thd, dec) {}
const char *func_name() const { return "utc_time"; }
virtual void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_curtime_utc>(thd, mem_root, this); }
};
@@ -661,6 +702,8 @@ public:
Item_func_curdate_local(THD *thd): Item_func_curdate(thd) {}
const char *func_name() const { return "curdate"; }
void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_curdate_local>(thd, mem_root, this); }
};
@@ -670,6 +713,8 @@ public:
Item_func_curdate_utc(THD *thd): Item_func_curdate(thd) {}
const char *func_name() const { return "utc_date"; }
void store_now_in_TIME(THD* thd, MYSQL_TIME *now_time);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_curdate_utc>(thd, mem_root, this); }
};
@@ -703,6 +748,8 @@ public:
const char *func_name() const { return "now"; }
virtual void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time);
virtual enum Functype functype() const { return NOW_FUNC; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_now_local>(thd, mem_root, this); }
};
@@ -718,7 +765,8 @@ public:
return mark_unsupported_function(func_name(), "()", arg,
VCOL_TIME_FUNC | VCOL_NON_DETERMINISTIC);
}
-
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_now_utc>(thd, mem_root, this); }
};
@@ -741,6 +789,8 @@ public:
VCOL_TIME_FUNC | VCOL_NON_DETERMINISTIC);
}
virtual enum Functype functype() const { return SYSDATE_FUNC; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_sysdate_local>(thd, mem_root, this); }
};
@@ -756,6 +806,8 @@ public:
{
return has_date_args() || has_time_args();
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_from_days>(thd, mem_root, this); }
};
@@ -776,8 +828,10 @@ public:
bool eq(const Item *item, bool binary_cmp) const;
bool check_vcol_func_processor(void *arg)
{
- return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE);
+ return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_date_format>(thd, mem_root, this); }
};
@@ -789,6 +843,8 @@ class Item_func_from_unixtime :public Item_datetimefunc
const char *func_name() const { return "from_unixtime"; }
void fix_length_and_dec();
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_from_unixtime>(thd, mem_root, this); }
};
@@ -823,6 +879,8 @@ class Item_func_convert_tz :public Item_datetimefunc
void fix_length_and_dec();
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
void cleanup();
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_convert_tz>(thd, mem_root, this); }
};
@@ -837,6 +895,8 @@ public:
Item_timefunc::fix_length_and_dec();
}
const char *func_name() const { return "sec_to_time"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_sec_to_time>(thd, mem_root, this); }
};
@@ -855,16 +915,65 @@ public:
bool eq(const Item *item, bool binary_cmp) const;
void print(String *str, enum_query_type query_type);
bool need_parentheses_in_default() { return true; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_date_add_interval>(thd, mem_root, this); }
};
class Item_extract :public Item_int_func
{
bool date_value;
+ void set_date_length(uint32 length)
+ {
+ /*
+ Although DATE components (e.g. YEAR, YEAR_MONTH, QUARTER, MONTH, WEEK)
+ cannot have a sign, we should probably still add +1,
+ because all around the code we assume that max_length is sign inclusive.
+ Another options is to set unsigned_flag to "true".
+ */
+ max_length= length; //QQ: see above
+ date_value= true;
+ }
+ void set_time_length(uint32 length)
+ {
+ max_length= length + 1/*sign*/;
+ date_value= false;
+ }
public:
const interval_type int_type; // keep it public
Item_extract(THD *thd, interval_type type_arg, Item *a):
Item_int_func(thd, a), int_type(type_arg) {}
+ enum_field_types field_type() const
+ {
+ switch (int_type) {
+ case INTERVAL_YEAR:
+ case INTERVAL_YEAR_MONTH:
+ case INTERVAL_QUARTER:
+ case INTERVAL_MONTH:
+ case INTERVAL_WEEK:
+ case INTERVAL_DAY:
+ case INTERVAL_DAY_HOUR:
+ case INTERVAL_DAY_MINUTE:
+ case INTERVAL_DAY_SECOND:
+ case INTERVAL_HOUR:
+ case INTERVAL_HOUR_MINUTE:
+ case INTERVAL_HOUR_SECOND:
+ case INTERVAL_MINUTE:
+ case INTERVAL_MINUTE_SECOND:
+ case INTERVAL_SECOND:
+ case INTERVAL_MICROSECOND:
+ case INTERVAL_SECOND_MICROSECOND:
+ return MYSQL_TYPE_LONG;
+ case INTERVAL_DAY_MICROSECOND:
+ case INTERVAL_HOUR_MICROSECOND:
+ case INTERVAL_MINUTE_MICROSECOND:
+ return MYSQL_TYPE_LONGLONG;
+ case INTERVAL_LAST:
+ break;
+ }
+ DBUG_ASSERT(0);
+ return MYSQL_TYPE_LONGLONG;
+ }
longlong val_int();
enum Functype functype() const { return EXTRACT_FUNC; }
const char *func_name() const { return "extract"; }
@@ -909,6 +1018,11 @@ class Item_extract :public Item_int_func
}
return true;
}
+ Field *create_field_for_create_select(TABLE *table)
+ { return tmp_table_field_from_field_type(table, false, false); }
+
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_extract>(thd, mem_root, this); }
};
@@ -933,6 +1047,8 @@ public:
void fix_length_and_dec();
void print(String *str, enum_query_type query_type);
bool need_parentheses_in_default() { return true; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_char_typecast>(thd, mem_root, this); }
};
@@ -958,6 +1074,8 @@ public:
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
const char *cast_type() const { return "date"; }
enum_field_types field_type() const { return MYSQL_TYPE_DATE; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_date_typecast>(thd, mem_root, this); }
};
@@ -970,6 +1088,8 @@ public:
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
const char *cast_type() const { return "time"; }
enum_field_types field_type() const { return MYSQL_TYPE_TIME; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_time_typecast>(thd, mem_root, this); }
};
@@ -982,6 +1102,8 @@ public:
const char *cast_type() const { return "datetime"; }
enum_field_types field_type() const { return MYSQL_TYPE_DATETIME; }
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_datetime_typecast>(thd, mem_root, this); }
};
@@ -993,6 +1115,8 @@ public:
const char *func_name() const { return "makedate"; }
enum_field_types field_type() const { return MYSQL_TYPE_DATE; }
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_makedate>(thd, mem_root, this); }
};
@@ -1009,6 +1133,8 @@ public:
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
void print(String *str, enum_query_type query_type);
const char *func_name() const { return "add_time"; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_add_time>(thd, mem_root, this); }
};
class Item_func_timediff :public Item_timefunc
@@ -1023,6 +1149,8 @@ public:
Item_timefunc::fix_length_and_dec();
}
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_timediff>(thd, mem_root, this); }
};
class Item_func_maketime :public Item_timefunc
@@ -1038,6 +1166,8 @@ public:
}
const char *func_name() const { return "maketime"; }
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_maketime>(thd, mem_root, this); }
};
@@ -1058,6 +1188,8 @@ public:
{
return !has_time_args();
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_microsecond>(thd, mem_root, this); }
};
@@ -1075,6 +1207,8 @@ public:
maybe_null=1;
}
virtual void print(String *str, enum_query_type query_type);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_timestamp_diff>(thd, mem_root, this); }
};
@@ -1099,6 +1233,8 @@ public:
fix_length_and_charset(17, default_charset());
}
virtual void print(String *str, enum_query_type query_type);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_get_format>(thd, mem_root, this); }
};
@@ -1117,6 +1253,8 @@ public:
bool get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date);
const char *func_name() const { return "str_to_date"; }
void fix_length_and_dec();
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_str_to_date>(thd, mem_root, this); }
};
@@ -1126,6 +1264,8 @@ public:
Item_func_last_day(THD *thd, Item *a): Item_datefunc(thd, a) {}
const char *func_name() const { return "last_day"; }
bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_last_day>(thd, mem_root, this); }
};
#endif /* ITEM_TIMEFUNC_INCLUDED */
diff --git a/sql/item_windowfunc.cc b/sql/item_windowfunc.cc
index d157d545dad..c8ea979900c 100644
--- a/sql/item_windowfunc.cc
+++ b/sql/item_windowfunc.cc
@@ -41,7 +41,7 @@ Item_window_func::resolve_window_name(THD *thd)
return true;
}
- return false;
+ return false;
}
@@ -154,7 +154,7 @@ void Item_window_func::split_sum_func(THD *thd, Ref_ptr_array ref_pointer_array,
/*
- This must be called before advance_window() can be called.
+ This must be called before attempting to compute the window function values.
@detail
If we attempt to do it in fix_fields(), partition_fields will refer
@@ -162,30 +162,25 @@ void Item_window_func::split_sum_func(THD *thd, Ref_ptr_array ref_pointer_array,
We need it to refer to temp.table columns.
*/
-void Item_window_func::setup_partition_border_check(THD *thd)
-{
- partition_tracker.init(thd, window_spec->partition_list);
- window_func()->setup_window_func(thd, window_spec);
-}
-
-
void Item_sum_rank::setup_window_func(THD *thd, Window_spec *window_spec)
{
/* TODO: move this into Item_window_func? */
- peer_tracker.init(thd, window_spec->order_list);
+ peer_tracker = new Group_bound_tracker(thd, window_spec->order_list);
+ peer_tracker->init();
clear();
}
void Item_sum_dense_rank::setup_window_func(THD *thd, Window_spec *window_spec)
{
/* TODO: consider moving this && Item_sum_rank's implementation */
- peer_tracker.init(thd, window_spec->order_list);
+ peer_tracker = new Group_bound_tracker(thd, window_spec->order_list);
+ peer_tracker->init();
clear();
}
bool Item_sum_dense_rank::add()
{
- if (peer_tracker.check_if_next_group() || first_add)
+ if (peer_tracker->check_if_next_group() || first_add)
{
first_add= false;
dense_rank++;
@@ -198,7 +193,7 @@ bool Item_sum_dense_rank::add()
bool Item_sum_rank::add()
{
row_number++;
- if (peer_tracker.check_if_next_group())
+ if (peer_tracker->check_if_next_group())
{
/* Row value changed */
cur_rank= row_number;
@@ -206,25 +201,10 @@ bool Item_sum_rank::add()
return false;
}
-bool Item_window_func::check_if_partition_changed()
-{
- return partition_tracker.check_if_next_group();
-}
-
-void Item_window_func::advance_window()
-{
- if (check_if_partition_changed())
- {
- /* Next partition */
- window_func()->clear();
- }
- window_func()->add();
-}
-
bool Item_sum_percent_rank::add()
{
row_number++;
- if (peer_tracker.check_if_next_group())
+ if (peer_tracker->check_if_next_group())
{
/* Row value changed. */
cur_rank= row_number;
@@ -235,8 +215,7 @@ bool Item_sum_percent_rank::add()
void Item_sum_percent_rank::setup_window_func(THD *thd, Window_spec *window_spec)
{
/* TODO: move this into Item_window_func? */
- peer_tracker.init(thd, window_spec->order_list);
+ peer_tracker = new Group_bound_tracker(thd, window_spec->order_list);
+ peer_tracker->init();
clear();
}
-
-
diff --git a/sql/item_windowfunc.h b/sql/item_windowfunc.h
index 9d2fa135e29..433b3f6c4fd 100644
--- a/sql/item_windowfunc.h
+++ b/sql/item_windowfunc.h
@@ -12,25 +12,19 @@ int test_if_group_changed(List<Cached_item> &list);
/* A wrapper around test_if_group_changed */
class Group_bound_tracker
{
- List<Cached_item> group_fields;
- /*
- During the first check_if_next_group, the list of cached_items is not
- initialized. The compare function will return that the items match if
- the field's value is the same as the Cached_item's default value (0).
- This flag makes sure that we always return true during the first check.
-
- XXX This is better to be implemented within test_if_group_changed, but
- since it is used in other parts of the codebase, we keep it here for now.
- */
- bool first_check;
public:
- void init(THD *thd, SQL_I_List<ORDER> *list)
+
+ Group_bound_tracker(THD *thd, SQL_I_List<ORDER> *list)
{
for (ORDER *curr = list->first; curr; curr=curr->next)
{
Cached_item *tmp= new_Cached_item(thd, curr->item[0], TRUE);
group_fields.push_back(tmp);
}
+ }
+
+ void init()
+ {
first_check= true;
}
@@ -76,6 +70,19 @@ public:
}
return 0;
}
+
+private:
+ List<Cached_item> group_fields;
+ /*
+ During the first check_if_next_group, the list of cached_items is not
+ initialized. The compare function will return that the items match if
+ the field's value is the same as the Cached_item's default value (0).
+ This flag makes sure that we always return true during the first check.
+
+ XXX This is better to be implemented within test_if_group_changed, but
+ since it is used in other parts of the codebase, we keep it here for now.
+ */
+ bool first_check;
};
/*
@@ -92,19 +99,22 @@ class Item_sum_row_number: public Item_sum_int
longlong count;
public:
+
+ Item_sum_row_number(THD *thd)
+ : Item_sum_int(thd), count(0) {}
+
void clear()
{
count= 0;
}
- bool add()
+
+ bool add()
{
count++;
- return false;
+ return false;
}
- void update_field() {}
- Item_sum_row_number(THD *thd)
- : Item_sum_int(thd), count(0) {}
+ void update_field() {}
enum Sumfunctype sum_func() const
{
@@ -119,7 +129,9 @@ public:
{
return "row_number(";
}
-
+
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_sum_row_number>(thd, mem_root, this); }
};
@@ -145,9 +157,12 @@ class Item_sum_rank: public Item_sum_int
protected:
longlong row_number; // just ROW_NUMBER()
longlong cur_rank; // current value
-
- Group_bound_tracker peer_tracker;
+
+ Group_bound_tracker *peer_tracker;
public:
+
+ Item_sum_rank(THD *thd) : Item_sum_int(thd), peer_tracker(NULL) {}
+
void clear()
{
/* This is called on partition start */
@@ -168,10 +183,6 @@ public:
TODO: ^^ what does this do ? It is not called ever?
*/
-public:
- Item_sum_rank(THD *thd)
- : Item_sum_int(thd) {}
-
enum Sumfunctype sum_func () const
{
return RANK_FUNC;
@@ -183,11 +194,19 @@ public:
}
void setup_window_func(THD *thd, Window_spec *window_spec);
+
void cleanup()
{
- peer_tracker.cleanup();
+ if (peer_tracker)
+ {
+ peer_tracker->cleanup();
+ delete peer_tracker;
+ peer_tracker= NULL;
+ }
Item_sum_int::cleanup();
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_sum_rank>(thd, mem_root, this); }
};
@@ -214,7 +233,7 @@ class Item_sum_dense_rank: public Item_sum_int
{
longlong dense_rank;
bool first_add;
- Group_bound_tracker peer_tracker;
+ Group_bound_tracker *peer_tracker;
public:
/*
XXX(cvicentiu) This class could potentially be implemented in the rank
@@ -233,7 +252,7 @@ class Item_sum_dense_rank: public Item_sum_int
}
Item_sum_dense_rank(THD *thd)
- : Item_sum_int(thd), dense_rank(0), first_add(true) {}
+ : Item_sum_int(thd), dense_rank(0), first_add(true), peer_tracker(NULL) {}
enum Sumfunctype sum_func () const
{
return DENSE_RANK_FUNC;
@@ -248,9 +267,16 @@ class Item_sum_dense_rank: public Item_sum_int
void cleanup()
{
- peer_tracker.cleanup();
+ if (peer_tracker)
+ {
+ peer_tracker->cleanup();
+ delete peer_tracker;
+ peer_tracker= NULL;
+ }
Item_sum_int::cleanup();
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_sum_dense_rank>(thd, mem_root, this); }
};
/*
@@ -289,7 +315,7 @@ class Item_sum_percent_rank: public Item_sum_window_with_row_count
{
public:
Item_sum_percent_rank(THD *thd)
- : Item_sum_window_with_row_count(thd), cur_rank(1) {}
+ : Item_sum_window_with_row_count(thd), cur_rank(1), peer_tracker(NULL) {}
longlong val_int()
{
@@ -342,16 +368,23 @@ class Item_sum_percent_rank: public Item_sum_window_with_row_count
}
void setup_window_func(THD *thd, Window_spec *window_spec);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_sum_percent_rank>(thd, mem_root, this); }
private:
longlong cur_rank; // Current rank of the current row.
longlong row_number; // Value if this were ROW_NUMBER() function.
- Group_bound_tracker peer_tracker;
+ Group_bound_tracker *peer_tracker;
void cleanup()
{
- peer_tracker.cleanup();
+ if (peer_tracker)
+ {
+ peer_tracker->cleanup();
+ delete peer_tracker;
+ peer_tracker= NULL;
+ }
Item_sum_num::cleanup();
}
};
@@ -419,6 +452,9 @@ class Item_sum_cume_dist: public Item_sum_window_with_row_count
decimals = 10; // TODO-cvicentiu find out how many decimals the standard
// requires.
}
+
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_sum_cume_dist>(thd, mem_root, this); }
private:
ulonglong current_row_count_;
@@ -487,6 +523,9 @@ class Item_sum_ntile : public Item_sum_window_with_row_count
enum Item_result result_type () const { return INT_RESULT; }
enum_field_types field_type() const { return MYSQL_TYPE_LONGLONG; }
+
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_sum_ntile>(thd, mem_root, this); }
private:
longlong get_num_quantiles() { return args[0]->val_int(); }
@@ -502,12 +541,6 @@ public:
public:
Window_spec *window_spec;
- /*
- This stores the data about the partition we're currently in.
- advance_window() uses this to tell when we've left one partition and
- entered another
- */
- Group_bound_tracker partition_tracker;
public:
Item_window_func(THD *thd, Item_sum *win_func, LEX_STRING *win_name)
: Item_func_or_sum(thd, (Item *) win_func),
@@ -600,9 +633,6 @@ public:
*/
void setup_partition_border_check(THD *thd);
- void advance_window();
- bool check_if_partition_changed();
-
enum_field_types field_type() const
{
return ((Item_sum *) args[0])->field_type();
@@ -751,6 +781,8 @@ public:
bool fix_fields(THD *thd, Item **ref);
bool resolve_window_name(THD *thd);
+
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root) { return 0; }
};
diff --git a/sql/item_xmlfunc.cc b/sql/item_xmlfunc.cc
index bf5abc882f2..cbbdeea0205 100644
--- a/sql/item_xmlfunc.cc
+++ b/sql/item_xmlfunc.cc
@@ -250,6 +250,8 @@ public:
Item_nodeset_func(thd, pxml) {}
const char *func_name() const { return "xpath_rootelement"; }
String *val_nodeset(String *nodeset);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_nodeset_func_rootelement>(thd, mem_root, this); }
};
@@ -261,6 +263,8 @@ public:
Item_nodeset_func(thd, a, b, pxml) {}
const char *func_name() const { return "xpath_union"; }
String *val_nodeset(String *nodeset);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_nodeset_func_union>(thd, mem_root, this); }
};
@@ -293,6 +297,8 @@ public:
Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml) {}
const char *func_name() const { return "xpath_selfbyname"; }
String *val_nodeset(String *nodeset);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_nodeset_func_selfbyname>(thd, mem_root, this); }
};
@@ -305,6 +311,8 @@ public:
Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml) {}
const char *func_name() const { return "xpath_childbyname"; }
String *val_nodeset(String *nodeset);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_nodeset_func_childbyname>(thd, mem_root, this); }
};
@@ -319,6 +327,8 @@ public:
need_self(need_self_arg) {}
const char *func_name() const { return "xpath_descendantbyname"; }
String *val_nodeset(String *nodeset);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_nodeset_func_descendantbyname>(thd, mem_root, this); }
};
@@ -333,6 +343,8 @@ public:
need_self(need_self_arg) {}
const char *func_name() const { return "xpath_ancestorbyname"; }
String *val_nodeset(String *nodeset);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_nodeset_func_ancestorbyname>(thd, mem_root, this); }
};
@@ -345,6 +357,8 @@ public:
Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml) {}
const char *func_name() const { return "xpath_parentbyname"; }
String *val_nodeset(String *nodeset);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_nodeset_func_parentbyname>(thd, mem_root, this); }
};
@@ -357,6 +371,8 @@ public:
Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml) {}
const char *func_name() const { return "xpath_attributebyname"; }
String *val_nodeset(String *nodeset);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_nodeset_func_attributebyname>(thd, mem_root, this); }
};
@@ -372,6 +388,8 @@ public:
Item_nodeset_func(thd, a, b, pxml) {}
const char *func_name() const { return "xpath_predicate"; }
String *val_nodeset(String *nodeset);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_nodeset_func_predicate>(thd, mem_root, this); }
};
@@ -383,6 +401,8 @@ public:
Item_nodeset_func(thd, a, b, pxml) { }
const char *func_name() const { return "xpath_elementbyindex"; }
String *val_nodeset(String *nodeset);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_nodeset_func_elementbyindex>(thd, mem_root, this); }
};
@@ -422,6 +442,8 @@ public:
}
return args[0]->val_real() ? 1 : 0;
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_xpath_cast_bool>(thd, mem_root, this); }
};
@@ -434,6 +456,8 @@ public:
Item_xpath_cast_number(THD *thd, Item *a): Item_real_func(thd, a) {}
const char *func_name() const { return "xpath_cast_number"; }
virtual double val_real() { return args[0]->val_real(); }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_xpath_cast_number>(thd, mem_root, this); }
};
@@ -449,6 +473,8 @@ public:
String *val_nodeset(String *res)
{ return string_cache; }
void fix_length_and_dec() { max_length= MAX_BLOB_WIDTH; }
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_nodeset_context_cache>(thd, mem_root, this); }
};
@@ -468,6 +494,8 @@ public:
return ((MY_XPATH_FLT*)flt->ptr())->pos + 1;
return 0;
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_xpath_position>(thd, mem_root, this); }
};
@@ -489,6 +517,8 @@ public:
return predicate_supplied_context_size;
return res->length() / sizeof(MY_XPATH_FLT);
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_xpath_count>(thd, mem_root, this); }
};
@@ -532,6 +562,8 @@ public:
}
return sum;
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_xpath_sum>(thd, mem_root, this); }
};
@@ -608,6 +640,8 @@ public:
}
return 0;
}
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_nodeset_to_const_comparator>(thd, mem_root, this); }
};
diff --git a/sql/item_xmlfunc.h b/sql/item_xmlfunc.h
index ed12793742e..3c58955c96a 100644
--- a/sql/item_xmlfunc.h
+++ b/sql/item_xmlfunc.h
@@ -101,6 +101,8 @@ public:
Item_xml_str_func(thd, a, b) {}
const char *func_name() const { return "extractvalue"; }
String *val_str(String *);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_xml_extractvalue>(thd, mem_root, this); }
};
@@ -115,6 +117,8 @@ public:
Item_xml_str_func(thd, a, b, c) {}
const char *func_name() const { return "updatexml"; }
String *val_str(String *);
+ Item *get_copy(THD *thd, MEM_ROOT *mem_root)
+ { return get_item_copy<Item_func_xml_update>(thd, mem_root, this); }
};
#endif /* ITEM_XMLFUNC_INCLUDED */
diff --git a/sql/lock.cc b/sql/lock.cc
index 2e44786d6fe..8aebc1f30d9 100644
--- a/sql/lock.cc
+++ b/sql/lock.cc
@@ -90,6 +90,7 @@ extern HASH open_cache;
static int lock_external(THD *thd, TABLE **table,uint count);
static int unlock_external(THD *thd, TABLE **table,uint count);
+
/* Map the return value of thr_lock to an error from errmsg.txt */
static int thr_lock_errno_to_mysql[]=
{ 0, ER_LOCK_ABORTED, ER_LOCK_WAIT_TIMEOUT, ER_LOCK_DEADLOCK };
@@ -244,6 +245,39 @@ void reset_lock_data(MYSQL_LOCK *sql_lock, bool unlock)
/**
+ Scan array of tables for access types; update transaction tracker
+ accordingly.
+
+ @param thd The current thread.
+ @param tables An array of pointers to the tables to lock.
+ @param count The number of tables to lock.
+*/
+
+#ifndef EMBEDDED_LIBRARY
+static void track_table_access(THD *thd, TABLE **tables, size_t count)
+{
+ if (thd->variables.session_track_transaction_info > TX_TRACK_NONE)
+ {
+ Transaction_state_tracker *tst= (Transaction_state_tracker *)
+ thd->session_tracker.get_tracker(TRANSACTION_INFO_TRACKER);
+
+ while (count--)
+ {
+ TABLE *t= tables[count];
+
+ if (t)
+ tst->add_trx_state(thd, t->reginfo.lock_type,
+ t->file->has_transactions());
+ }
+ }
+}
+#else
+#define track_table_access(A,B,C)
+#endif //EMBEDDED_LIBRARY
+
+
+
+/**
Lock tables.
@param thd The current thread.
@@ -280,6 +314,9 @@ MYSQL_LOCK *mysql_lock_tables(THD *thd, TABLE **tables, uint count, uint flags)
my_free(sql_lock);
sql_lock= 0;
}
+
+ track_table_access(thd, tables, count);
+
DBUG_RETURN(sql_lock);
}
@@ -1036,10 +1073,21 @@ void Global_read_lock::unlock_global_read_lock(THD *thd)
thd->mdl_context.release_lock(m_mdl_blocks_commits_lock);
m_mdl_blocks_commits_lock= NULL;
#ifdef WITH_WSREP
- if (WSREP_ON)
+ if (WSREP(thd) || wsrep_node_is_donor())
{
wsrep_locked_seqno= WSREP_SEQNO_UNDEFINED;
wsrep->resume(wsrep);
+ /* resync here only if we did implicit desync earlier */
+ if (!wsrep_desync && wsrep_node_is_synced())
+ {
+ int ret = wsrep->resync(wsrep);
+ if (ret != WSREP_OK)
+ {
+ WSREP_WARN("resync failed %d for FTWRL: db: %s, query: %s", ret,
+ (thd->db ? thd->db : "(null)"), thd->query());
+ DBUG_VOID_RETURN;
+ }
+ }
}
#endif /* WITH_WSREP */
}
@@ -1079,14 +1127,11 @@ bool Global_read_lock::make_global_read_lock_block_commit(THD *thd)
DBUG_RETURN(0);
#ifdef WITH_WSREP
- if (WSREP_ON && m_mdl_blocks_commits_lock)
+ if (WSREP(thd) && m_mdl_blocks_commits_lock)
{
WSREP_DEBUG("GRL was in block commit mode when entering "
"make_global_read_lock_block_commit");
- thd->mdl_context.release_lock(m_mdl_blocks_commits_lock);
- m_mdl_blocks_commits_lock= NULL;
- wsrep_locked_seqno= WSREP_SEQNO_UNDEFINED;
- wsrep->resume(wsrep);
+ DBUG_RETURN(FALSE);
}
#endif /* WITH_WSREP */
@@ -1100,7 +1145,43 @@ bool Global_read_lock::make_global_read_lock_block_commit(THD *thd)
m_state= GRL_ACQUIRED_AND_BLOCKS_COMMIT;
#ifdef WITH_WSREP
- if (WSREP_ON)
+ /* Native threads should bail out before wsrep oprations to follow.
+ Donor servicing thread is an exception, it should pause provider but not desync,
+ as it is already desynced in donor state
+ */
+ if (!WSREP(thd) && !wsrep_node_is_donor())
+ {
+ DBUG_RETURN(FALSE);
+ }
+
+ /* if already desynced or donor, avoid double desyncing
+ if not in PC and synced, desyncing is not possible either
+ */
+ if (wsrep_desync || !wsrep_node_is_synced())
+ {
+ WSREP_DEBUG("desync set upfont, skipping implicit desync for FTWRL: %d",
+ wsrep_desync);
+ }
+ else
+ {
+ int rcode;
+ WSREP_DEBUG("running implicit desync for node");
+ rcode = wsrep->desync(wsrep);
+ if (rcode != WSREP_OK)
+ {
+ WSREP_WARN("FTWRL desync failed %d for schema: %s, query: %s",
+ rcode, (thd->db ? thd->db : "(null)"), thd->query());
+ my_message(ER_LOCK_DEADLOCK, "wsrep desync failed for FTWRL", MYF(0));
+ DBUG_RETURN(TRUE);
+ }
+ }
+
+ long long ret = wsrep->pause(wsrep);
+ if (ret >= 0)
+ {
+ wsrep_locked_seqno= ret;
+ }
+ else if (ret != -ENOSYS) /* -ENOSYS - no provider */
{
long long ret = wsrep->pause(wsrep);
if (ret >= 0)
diff --git a/sql/log.cc b/sql/log.cc
index fa8f10e5464..569942ac485 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -3144,6 +3144,22 @@ const char *MYSQL_LOG::generate_name(const char *log_name,
}
+/*
+ Print some additional information about addition/removal of
+ XID list entries.
+ TODO: Remove once MDEV-9510 is fixed.
+*/
+#ifdef WITH_WSREP
+#define WSREP_XID_LIST_ENTRY(X, Y) \
+ if (wsrep_debug) \
+ { \
+ char buf[FN_REFLEN]; \
+ strmake(buf, Y->binlog_name, Y->binlog_name_len); \
+ WSREP_DEBUG(X, buf, Y->binlog_id); \
+ }
+#else
+#define WSREP_XID_LIST_ENTRY(X, Y) do { } while(0)
+#endif
MYSQL_BIN_LOG::MYSQL_BIN_LOG(uint *sync_period)
:reset_master_pending(0), mark_xid_done_waiting(0),
@@ -3212,6 +3228,8 @@ void MYSQL_BIN_LOG::cleanup()
*/
DBUG_ASSERT(b->xid_count == 0);
DBUG_ASSERT(!binlog_xid_count_list.head());
+ WSREP_XID_LIST_ENTRY("MYSQL_BIN_LOG::cleanup(): Removing xid_list_entry "
+ "for %s (%lu)", b);
my_free(b);
}
@@ -3702,7 +3720,14 @@ bool MYSQL_BIN_LOG::open(const char *log_name,
new_xid_list_entry->binlog_id= current_binlog_id;
/* Remove any initial entries with no pending XIDs. */
while ((b= binlog_xid_count_list.head()) && b->xid_count == 0)
+ {
+ WSREP_XID_LIST_ENTRY("MYSQL_BIN_LOG::open(): Removing xid_list_entry for "
+ "%s (%lu)", b);
my_free(binlog_xid_count_list.get());
+ }
+ mysql_cond_broadcast(&COND_xid_list);
+ WSREP_XID_LIST_ENTRY("MYSQL_BIN_LOG::open(): Adding new xid_list_entry for "
+ "%s (%lu)", new_xid_list_entry);
binlog_xid_count_list.push_back(new_xid_list_entry);
mysql_mutex_unlock(&LOCK_xid_list);
@@ -4237,8 +4262,11 @@ err:
if (b->binlog_id == current_binlog_id)
break;
DBUG_ASSERT(b->xid_count == 0);
+ WSREP_XID_LIST_ENTRY("MYSQL_BIN_LOG::reset_logs(): Removing "
+ "xid_list_entry for %s (%lu)", b);
my_free(binlog_xid_count_list.get());
}
+ mysql_cond_broadcast(&COND_xid_list);
reset_master_pending--;
mysql_mutex_unlock(&LOCK_xid_list);
}
@@ -4249,6 +4277,26 @@ err:
}
+void MYSQL_BIN_LOG::wait_for_last_checkpoint_event()
+{
+ mysql_mutex_lock(&LOCK_xid_list);
+ for (;;)
+ {
+ if (binlog_xid_count_list.is_last(binlog_xid_count_list.head()))
+ break;
+ mysql_cond_wait(&COND_xid_list, &LOCK_xid_list);
+ }
+ mysql_mutex_unlock(&LOCK_xid_list);
+
+ /*
+ LOCK_xid_list and LOCK_log are chained, so the LOCK_log will only be
+ obtained after mark_xid_done() has written the last checkpoint event.
+ */
+ mysql_mutex_lock(&LOCK_log);
+ mysql_mutex_unlock(&LOCK_log);
+}
+
+
/**
Delete relay log files prior to rli->group_relay_log_name
(i.e. all logs which are not involved in a non-finished group
@@ -7699,7 +7747,7 @@ MYSQL_BIN_LOG::trx_group_commit_leader(group_commit_entry *leader)
last= current->next == NULL;
if (!current->error &&
RUN_HOOK(binlog_storage, after_sync,
- (current->thd, log_file_name,
+ (current->thd, current->cache_mngr->last_commit_pos_file,
current->cache_mngr->last_commit_pos_offset,
first, last)))
{
@@ -9405,7 +9453,7 @@ TC_LOG_BINLOG::mark_xid_done(ulong binlog_id, bool write_checkpoint)
*/
if (unlikely(reset_master_pending))
{
- mysql_cond_signal(&COND_xid_list);
+ mysql_cond_broadcast(&COND_xid_list);
mysql_mutex_unlock(&LOCK_xid_list);
DBUG_VOID_RETURN;
}
@@ -9443,8 +9491,7 @@ TC_LOG_BINLOG::mark_xid_done(ulong binlog_id, bool write_checkpoint)
mysql_mutex_lock(&LOCK_log);
mysql_mutex_lock(&LOCK_xid_list);
--mark_xid_done_waiting;
- if (unlikely(reset_master_pending))
- mysql_cond_signal(&COND_xid_list);
+ mysql_cond_broadcast(&COND_xid_list);
/* We need to reload current_binlog_id due to release/re-take of lock. */
current= current_binlog_id;
@@ -9459,6 +9506,8 @@ TC_LOG_BINLOG::mark_xid_done(ulong binlog_id, bool write_checkpoint)
DBUG_ASSERT(b);
if (b->binlog_id == current || b->xid_count > 0)
break;
+ WSREP_XID_LIST_ENTRY("TC_LOG_BINLOG::mark_xid_done(): Removing "
+ "xid_list_entry for %s (%lu)", b);
my_free(binlog_xid_count_list.get());
}
diff --git a/sql/log.h b/sql/log.h
index a74a01f9c67..8ddf8641cfa 100644
--- a/sql/log.h
+++ b/sql/log.h
@@ -791,6 +791,7 @@ public:
bool reset_logs(THD* thd, bool create_new_log,
rpl_gtid *init_state, uint32 init_state_len,
ulong next_log_number);
+ void wait_for_last_checkpoint_event();
void close(uint exiting);
void clear_inuse_flag_when_closing(File file);
diff --git a/sql/log_event.cc b/sql/log_event.cc
index b1cf6a9024a..9515e5c04a7 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -6025,7 +6025,6 @@ int Load_log_event::do_apply_event(NET* net, rpl_group_info *rgi,
new_db.str= (char *) rpl_filter->get_rewrite_db(db, &new_db.length);
thd->set_db(new_db.str, new_db.length);
DBUG_ASSERT(thd->query() == 0);
- thd->reset_query_inner(); // Should not be needed
thd->is_slave_error= 0;
clear_all_errors(thd, const_cast<Relay_log_info*>(rli));
diff --git a/sql/mdl.cc b/sql/mdl.cc
index cb616c30b1e..1d6b4f6ffc3 100644
--- a/sql/mdl.cc
+++ b/sql/mdl.cc
@@ -17,6 +17,7 @@
#include "sql_class.h"
#include "debug_sync.h"
#include "sql_array.h"
+#include "rpl_rli.h"
#include <lf.h>
#include <mysqld_error.h>
#include <mysql/plugin.h>
@@ -506,6 +507,10 @@ public:
bitmap_t hog_lock_types_bitmap() const
{ return m_strategy->hog_lock_types_bitmap(); }
+#ifndef DBUG_OFF
+ bool check_if_conflicting_replication_locks(MDL_context *ctx);
+#endif
+
/** List of granted tickets for this lock. */
Ticket_list m_granted;
/** Tickets for contexts waiting to acquire a lock. */
@@ -1977,6 +1982,55 @@ MDL_context::clone_ticket(MDL_request *mdl_request)
/**
+ Check if there is any conflicting lock that could cause this thread
+ to wait for another thread which is not ready to commit.
+ This is always an error, as the upper level of parallel replication
+ should not allow a scheduling of a conflicting DDL until all earlier
+ transactions has commited.
+
+ This function is only called for a slave using parallel replication
+ and trying to get an exclusive lock for the table.
+*/
+
+#ifndef DBUG_OFF
+bool MDL_lock::check_if_conflicting_replication_locks(MDL_context *ctx)
+{
+ Ticket_iterator it(m_granted);
+ MDL_ticket *conflicting_ticket;
+ rpl_group_info *rgi_slave= ctx->get_thd()->rgi_slave;
+
+ if (!rgi_slave->gtid_sub_id)
+ return 0;
+
+ while ((conflicting_ticket= it++))
+ {
+ if (conflicting_ticket->get_ctx() != ctx)
+ {
+ MDL_context *conflicting_ctx= conflicting_ticket->get_ctx();
+ rpl_group_info *conflicting_rgi_slave;
+ conflicting_rgi_slave= conflicting_ctx->get_thd()->rgi_slave;
+
+ /*
+ If the conflicting thread is another parallel replication
+ thread for the same master and it's not in commit stage, then
+ the current transaction has started too early and something is
+ seriously wrong.
+ */
+ if (conflicting_rgi_slave &&
+ conflicting_rgi_slave->gtid_sub_id &&
+ conflicting_rgi_slave->rli == rgi_slave->rli &&
+ conflicting_rgi_slave->current_gtid.domain_id ==
+ rgi_slave->current_gtid.domain_id &&
+ !conflicting_rgi_slave->did_mark_start_commit)
+ return 1; // Fatal error
+ }
+ }
+ return 0;
+}
+#endif
+
+
+/**
Acquire one lock with waiting for conflicting locks to go away if needed.
@param mdl_request [in/out] Lock request object for lock to be acquired
@@ -2036,6 +2090,19 @@ MDL_context::acquire_lock(MDL_request *mdl_request, double lock_wait_timeout)
if (lock->needs_notification(ticket) && lock_wait_timeout)
lock->notify_conflicting_locks(this);
+ /*
+ Ensure that if we are trying to get an exclusive lock for a slave
+ running parallel replication, then we are not blocked by another
+ parallel slave thread that is not committed. This should never happen as
+ the parallel replication scheduler should never schedule a DDL while
+ DML's are still running.
+ */
+ DBUG_ASSERT((mdl_request->type != MDL_INTENTION_EXCLUSIVE &&
+ mdl_request->type != MDL_EXCLUSIVE) ||
+ !(get_thd()->rgi_slave &&
+ get_thd()->rgi_slave->is_parallel_exec &&
+ lock->check_if_conflicting_replication_locks(this)));
+
mysql_prlock_unlock(&lock->m_rwlock);
will_wait_for(ticket);
@@ -2929,34 +2996,54 @@ bool MDL_context::has_explicit_locks()
}
#ifdef WITH_WSREP
-void MDL_ticket::wsrep_report(bool debug)
+static
+const char *wsrep_get_mdl_type_name(enum_mdl_type type)
{
- if (debug)
+ switch (type)
{
- const PSI_stage_info *psi_stage = m_lock->key.get_wait_state_name();
-
- WSREP_DEBUG("MDL ticket: type: %s space: %s db: %s name: %s (%s)",
- (get_type() == MDL_INTENTION_EXCLUSIVE) ? "intention exclusive" :
- ((get_type() == MDL_SHARED) ? "shared" :
- ((get_type() == MDL_SHARED_HIGH_PRIO ? "shared high prio" :
- ((get_type() == MDL_SHARED_READ) ? "shared read" :
- ((get_type() == MDL_SHARED_WRITE) ? "shared write" :
- ((get_type() == MDL_SHARED_NO_WRITE) ? "shared no write" :
- ((get_type() == MDL_SHARED_NO_READ_WRITE) ? "shared no read write" :
- ((get_type() == MDL_EXCLUSIVE) ? "exclusive" :
- "UNKNOWN")))))))),
- (m_lock->key.mdl_namespace() == MDL_key::GLOBAL) ? "GLOBAL" :
- ((m_lock->key.mdl_namespace() == MDL_key::SCHEMA) ? "SCHEMA" :
- ((m_lock->key.mdl_namespace() == MDL_key::TABLE) ? "TABLE" :
- ((m_lock->key.mdl_namespace() == MDL_key::TABLE) ? "FUNCTION" :
- ((m_lock->key.mdl_namespace() == MDL_key::TABLE) ? "PROCEDURE" :
- ((m_lock->key.mdl_namespace() == MDL_key::TABLE) ? "TRIGGER" :
- ((m_lock->key.mdl_namespace() == MDL_key::TABLE) ? "EVENT" :
- ((m_lock->key.mdl_namespace() == MDL_key::COMMIT) ? "COMMIT" :
- (char *)"UNKNOWN"))))))),
- m_lock->key.db_name(),
- m_lock->key.name(),
- psi_stage->m_name);
- }
+ case MDL_INTENTION_EXCLUSIVE : return "intention exclusive";
+ case MDL_SHARED : return "shared";
+ case MDL_SHARED_HIGH_PRIO : return "shared high prio";
+ case MDL_SHARED_READ : return "shared read";
+ case MDL_SHARED_WRITE : return "shared write";
+ case MDL_SHARED_UPGRADABLE : return "shared upgradable";
+ case MDL_SHARED_NO_WRITE : return "shared no write";
+ case MDL_SHARED_NO_READ_WRITE : return "shared no read write";
+ case MDL_EXCLUSIVE : return "exclusive";
+ default: break;
+ }
+ return "UNKNOWN";
+}
+
+static
+const char *wsrep_get_mdl_namespace_name(MDL_key::enum_mdl_namespace ns)
+{
+ switch (ns)
+ {
+ case MDL_key::GLOBAL : return "GLOBAL";
+ case MDL_key::SCHEMA : return "SCHEMA";
+ case MDL_key::TABLE : return "TABLE";
+ case MDL_key::FUNCTION : return "FUNCTION";
+ case MDL_key::PROCEDURE : return "PROCEDURE";
+ case MDL_key::TRIGGER : return "TRIGGER";
+ case MDL_key::EVENT : return "EVENT";
+ case MDL_key::COMMIT : return "COMMIT";
+ case MDL_key::USER_LOCK : return "USER_LOCK";
+ default: break;
+ }
+ return "UNKNOWN";
+}
+
+void MDL_ticket::wsrep_report(bool debug)
+{
+ if (!debug) return;
+
+ const PSI_stage_info *psi_stage= m_lock->key.get_wait_state_name();
+ WSREP_DEBUG("MDL ticket: type: %s space: %s db: %s name: %s (%s)",
+ wsrep_get_mdl_type_name(get_type()),
+ wsrep_get_mdl_namespace_name(m_lock->key.mdl_namespace()),
+ m_lock->key.db_name(),
+ m_lock->key.name(),
+ psi_stage->m_name);
}
#endif /* WITH_WSREP */
diff --git a/sql/multi_range_read.cc b/sql/multi_range_read.cc
index 6e8428f1aad..5de9b4a9eec 100644
--- a/sql/multi_range_read.cc
+++ b/sql/multi_range_read.cc
@@ -261,7 +261,7 @@ int handler::multi_range_read_next(range_id_t *range_info)
}
else
{
- if (was_semi_consistent_read())
+ if (ha_was_semi_consistent_read())
{
/*
The following assignment is redundant, but for extra safety and to
diff --git a/sql/my_json_writer.cc b/sql/my_json_writer.cc
index e97db210da7..d36fdd1192a 100644
--- a/sql/my_json_writer.cc
+++ b/sql/my_json_writer.cc
@@ -330,6 +330,8 @@ void Single_line_formatting_helper::flush_on_one_line()
ptr++;
}
owner->output.append(']');
+ /* We've printed out the contents of the buffer, mark it as empty */
+ buf_ptr= buffer;
}
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index fa8f143335d..18d8d807d90 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -383,7 +383,7 @@ static bool binlog_format_used= false;
LEX_STRING opt_init_connect, opt_init_slave;
mysql_cond_t COND_thread_cache;
static mysql_cond_t COND_flush_thread_cache;
-mysql_cond_t COND_slave_init;
+mysql_cond_t COND_slave_background;
static DYNAMIC_ARRAY all_options;
/* Global variables */
@@ -400,7 +400,6 @@ bool opt_error_log= IF_WIN(1,0);
bool opt_disable_networking=0, opt_skip_show_db=0;
bool opt_skip_name_resolve=0;
my_bool opt_character_set_client_handshake= 1;
-bool server_id_supplied = 0;
bool opt_endinfo, using_udf_functions;
my_bool locked_in_memory;
bool opt_using_transactions;
@@ -530,7 +529,7 @@ ulong extra_max_connections;
uint max_digest_length= 0;
ulong slave_retried_transactions;
ulonglong slave_skipped_errors;
-ulong feature_files_opened_with_delayed_keys;
+ulong feature_files_opened_with_delayed_keys= 0, feature_check_constraint= 0;
ulonglong denied_connections;
my_decimal decimal_zero;
@@ -691,6 +690,14 @@ THD *next_global_thread(THD *thd)
}
struct system_variables global_system_variables;
+/**
+ Following is just for options parsing, used with a difference against
+ global_system_variables.
+
+ TODO: something should be done to get rid of following variables
+*/
+const char *current_dbug_option="";
+
struct system_variables max_system_variables;
struct system_status_var global_status_var;
@@ -747,7 +754,7 @@ mysql_mutex_t
LOCK_crypt,
LOCK_global_system_variables,
LOCK_user_conn, LOCK_slave_list, LOCK_active_mi,
- LOCK_connection_count, LOCK_error_messages, LOCK_slave_init;
+ LOCK_connection_count, LOCK_error_messages, LOCK_slave_background;
mysql_mutex_t LOCK_stats, LOCK_global_user_client_stats,
LOCK_global_table_stats, LOCK_global_index_stats;
@@ -930,7 +937,7 @@ PSI_mutex_key key_LOCK_gtid_waiting;
PSI_mutex_key key_LOCK_after_binlog_sync;
PSI_mutex_key key_LOCK_prepare_ordered, key_LOCK_commit_ordered,
- key_LOCK_slave_init;
+ key_LOCK_slave_background;
PSI_mutex_key key_TABLE_SHARE_LOCK_share;
static PSI_mutex_info all_server_mutexes[]=
@@ -996,7 +1003,7 @@ static PSI_mutex_info all_server_mutexes[]=
{ &key_LOCK_prepare_ordered, "LOCK_prepare_ordered", PSI_FLAG_GLOBAL},
{ &key_LOCK_after_binlog_sync, "LOCK_after_binlog_sync", PSI_FLAG_GLOBAL},
{ &key_LOCK_commit_ordered, "LOCK_commit_ordered", PSI_FLAG_GLOBAL},
- { &key_LOCK_slave_init, "LOCK_slave_init", PSI_FLAG_GLOBAL},
+ { &key_LOCK_slave_background, "LOCK_slave_background", PSI_FLAG_GLOBAL},
{ &key_LOG_INFO_lock, "LOG_INFO::lock", 0},
{ &key_LOCK_thread_count, "LOCK_thread_count", PSI_FLAG_GLOBAL},
{ &key_LOCK_thread_cache, "LOCK_thread_cache", PSI_FLAG_GLOBAL},
@@ -1053,7 +1060,7 @@ PSI_cond_key key_TC_LOG_MMAP_COND_queue_busy;
PSI_cond_key key_COND_rpl_thread_queue, key_COND_rpl_thread,
key_COND_rpl_thread_stop, key_COND_rpl_thread_pool,
key_COND_parallel_entry, key_COND_group_commit_orderer,
- key_COND_prepare_ordered, key_COND_slave_init;
+ key_COND_prepare_ordered, key_COND_slave_background;
PSI_cond_key key_COND_wait_gtid, key_COND_gtid_ignore_duplicates;
static PSI_cond_info all_server_conds[]=
@@ -1103,7 +1110,7 @@ static PSI_cond_info all_server_conds[]=
{ &key_COND_parallel_entry, "COND_parallel_entry", 0},
{ &key_COND_group_commit_orderer, "COND_group_commit_orderer", 0},
{ &key_COND_prepare_ordered, "COND_prepare_ordered", 0},
- { &key_COND_slave_init, "COND_slave_init", 0},
+ { &key_COND_slave_background, "COND_slave_background", 0},
{ &key_COND_start_thread, "COND_start_thread", PSI_FLAG_GLOBAL},
{ &key_COND_wait_gtid, "COND_wait_gtid", 0},
{ &key_COND_gtid_ignore_duplicates, "COND_gtid_ignore_duplicates", 0}
@@ -1112,7 +1119,7 @@ static PSI_cond_info all_server_conds[]=
PSI_thread_key key_thread_bootstrap, key_thread_delayed_insert,
key_thread_handle_manager, key_thread_main,
key_thread_one_connection, key_thread_signal_hand,
- key_thread_slave_init, key_rpl_parallel_thread;
+ key_thread_slave_background, key_rpl_parallel_thread;
static PSI_thread_info all_server_threads[]=
{
@@ -1138,7 +1145,7 @@ static PSI_thread_info all_server_threads[]=
{ &key_thread_main, "main", PSI_FLAG_GLOBAL},
{ &key_thread_one_connection, "one_connection", 0},
{ &key_thread_signal_hand, "signal_handler", PSI_FLAG_GLOBAL},
- { &key_thread_slave_init, "slave_init", PSI_FLAG_GLOBAL},
+ { &key_thread_slave_background, "slave_background", PSI_FLAG_GLOBAL},
{ &key_rpl_parallel_thread, "rpl_parallel_thread", 0}
};
@@ -1464,7 +1471,6 @@ my_bool plugins_are_initialized= FALSE;
#ifndef DBUG_OFF
static const char* default_dbug_option;
#endif
-const char *current_dbug_option="";
#ifdef HAVE_LIBWRAP
const char *libwrapName= NULL;
int allow_severity = LOG_INFO;
@@ -2345,8 +2351,8 @@ static void clean_up_mutexes()
mysql_cond_destroy(&COND_prepare_ordered);
mysql_mutex_destroy(&LOCK_after_binlog_sync);
mysql_mutex_destroy(&LOCK_commit_ordered);
- mysql_mutex_destroy(&LOCK_slave_init);
- mysql_cond_destroy(&COND_slave_init);
+ mysql_mutex_destroy(&LOCK_slave_background);
+ mysql_cond_destroy(&COND_slave_background);
DBUG_VOID_RETURN;
}
@@ -2755,26 +2761,17 @@ static void network_init(void)
saPipeSecurity.lpSecurityDescriptor = &sdPipeDescriptor;
saPipeSecurity.bInheritHandle = FALSE;
if ((hPipe= CreateNamedPipe(pipe_name,
- PIPE_ACCESS_DUPLEX|FILE_FLAG_OVERLAPPED,
- PIPE_TYPE_BYTE |
- PIPE_READMODE_BYTE |
- PIPE_WAIT,
- PIPE_UNLIMITED_INSTANCES,
- (int) global_system_variables.net_buffer_length,
- (int) global_system_variables.net_buffer_length,
- NMPWAIT_USE_DEFAULT_WAIT,
- &saPipeSecurity)) == INVALID_HANDLE_VALUE)
- {
- LPVOID lpMsgBuf;
- int error=GetLastError();
- FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM,
- NULL, error, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPTSTR) &lpMsgBuf, 0, NULL );
- sql_perror((char *)lpMsgBuf);
- LocalFree(lpMsgBuf);
- unireg_abort(1);
- }
+ PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED | FILE_FLAG_FIRST_PIPE_INSTANCE,
+ PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT,
+ PIPE_UNLIMITED_INSTANCES,
+ (int) global_system_variables.net_buffer_length,
+ (int) global_system_variables.net_buffer_length,
+ NMPWAIT_USE_DEFAULT_WAIT,
+ &saPipeSecurity)) == INVALID_HANDLE_VALUE)
+ {
+ sql_perror("Create named pipe failed");
+ unireg_abort(1);
+ }
}
#endif
@@ -4334,11 +4331,23 @@ static int init_common_variables()
if (get_options(&remaining_argc, &remaining_argv))
return 1;
- set_server_version();
+ if (IS_SYSVAR_AUTOSIZE(&server_version_ptr))
+ set_server_version(server_version, sizeof(server_version));
if (!opt_abort)
- sql_print_information("%s (mysqld %s) starting as process %lu ...",
- my_progname, server_version, (ulong) getpid());
+ {
+ if (IS_SYSVAR_AUTOSIZE(&server_version_ptr))
+ sql_print_information("%s (mysqld %s) starting as process %lu ...",
+ my_progname, server_version, (ulong) getpid());
+ else
+ {
+ char real_server_version[SERVER_VERSION_LENGTH];
+ set_server_version(real_server_version, sizeof(real_server_version));
+ sql_print_information("%s (mysqld %s as %s) starting as process %lu ...",
+ my_progname, real_server_version, server_version,
+ (ulong) getpid());
+ }
+ }
#ifndef EMBEDDED_LIBRARY
if (opt_abort && !opt_verbose)
@@ -4729,9 +4738,9 @@ static int init_thread_environment()
MY_MUTEX_INIT_SLOW);
mysql_mutex_init(key_LOCK_commit_ordered, &LOCK_commit_ordered,
MY_MUTEX_INIT_SLOW);
- mysql_mutex_init(key_LOCK_slave_init, &LOCK_slave_init,
+ mysql_mutex_init(key_LOCK_slave_background, &LOCK_slave_background,
MY_MUTEX_INIT_SLOW);
- mysql_cond_init(key_COND_slave_init, &COND_slave_init, NULL);
+ mysql_cond_init(key_COND_slave_background, &COND_slave_background, NULL);
#ifdef HAVE_OPENSSL
mysql_mutex_init(key_LOCK_des_key_file,
@@ -4965,8 +4974,7 @@ static int init_server_components()
all things are initialized so that unireg_abort() doesn't fail
*/
mdl_init();
- tdc_init();
- if (hostname_cache_init())
+ if (tdc_init() || hostname_cache_init())
unireg_abort(1);
query_cache_set_min_res_unit(query_cache_min_res_unit);
@@ -5279,6 +5287,17 @@ static int init_server_components()
}
plugins_are_initialized= TRUE; /* Don't separate from init function */
+#ifndef EMBEDDED_LIBRARY
+ {
+ if (Session_tracker::server_boot_verify(system_charset_info))
+ {
+ sql_print_error("The variable session_track_system_variables has "
+ "invalid values.");
+ unireg_abort(1);
+ }
+ }
+#endif //EMBEDDED_LIBRARY
+
/* we do want to exit if there are any other unknown options */
if (remaining_argc > 1)
{
@@ -5831,17 +5850,6 @@ int mysqld_main(int argc, char **argv)
if (WSREP_ON && wsrep_check_opts())
global_system_variables.wsrep_on= 0;
- if (opt_bin_log && !global_system_variables.server_id)
- {
- SYSVAR_AUTOSIZE(global_system_variables.server_id, ::server_id= 1);
-#ifdef EXTRA_DEBUG
- sql_print_warning("You have enabled the binary log, but you haven't set "
- "server-id to a non-zero value: we force server id to 1; "
- "updates will be logged to the binary log, but "
- "connections from slaves will not be accepted.");
-#endif
- }
-
/*
The subsequent calls may take a long time : e.g. innodb log read.
Thus set the long running service control manager timeout
@@ -6288,7 +6296,8 @@ int mysqld_main(int argc, char **argv)
/**
Execute all commands from a file. Used by the mysql_install_db script to
- create MySQL privilege tables without having to start a full MySQL server.
+ create MySQL privilege tables without having to start a full MySQL server
+ and by read_init_file() if mysqld was started with the option --init-file.
*/
static void bootstrap(MYSQL_FILE *file)
@@ -7633,7 +7642,6 @@ struct my_option my_long_options[]=
MYSQL_TO_BE_IMPLEMENTED_OPTION("eq-range-index-dive-limit"),
MYSQL_COMPATIBILITY_OPTION("server-id-bits"),
MYSQL_TO_BE_IMPLEMENTED_OPTION("slave-rows-search-algorithms"), // HAVE_REPLICATION
- MYSQL_COMPATIBILITY_OPTION("table-open-cache-instances"),
MYSQL_TO_BE_IMPLEMENTED_OPTION("slave-allow-batching"), // HAVE_REPLICATION
MYSQL_COMPATIBILITY_OPTION("slave-checkpoint-period"), // HAVE_REPLICATION
MYSQL_COMPATIBILITY_OPTION("slave-checkpoint-group"), // HAVE_REPLICATION
@@ -7753,7 +7761,10 @@ static int show_slaves_running(THD *thd, SHOW_VAR *var, char *buff)
var->value= buff;
mysql_mutex_lock(&LOCK_active_mi);
- *((longlong *)buff)= master_info_index->any_slave_sql_running();
+ if (master_info_index)
+ *((longlong *)buff)= master_info_index->any_slave_sql_running();
+ else
+ *((longlong *)buff)= 0;
mysql_mutex_unlock(&LOCK_active_mi);
return 0;
@@ -8387,9 +8398,11 @@ SHOW_VAR status_vars[]= {
{"Delayed_errors", (char*) &delayed_insert_errors, SHOW_LONG},
{"Delayed_insert_threads", (char*) &delayed_insert_threads, SHOW_LONG_NOFLUSH},
{"Delayed_writes", (char*) &delayed_insert_writes, SHOW_LONG},
+ {"Delete_scan", (char*) offsetof(STATUS_VAR, delete_scan_count), SHOW_LONG_STATUS},
{"Empty_queries", (char*) offsetof(STATUS_VAR, empty_queries), SHOW_LONG_STATUS},
{"Executed_events", (char*) &executed_events, SHOW_LONG_NOFLUSH },
{"Executed_triggers", (char*) offsetof(STATUS_VAR, executed_triggers), SHOW_LONG_STATUS},
+ {"Feature_check_constraint", (char*) &feature_check_constraint, SHOW_LONG },
{"Feature_delay_key_write", (char*) &feature_files_opened_with_delayed_keys, SHOW_LONG },
{"Feature_dynamic_columns", (char*) offsetof(STATUS_VAR, feature_dynamic_columns), SHOW_LONG_STATUS},
{"Feature_fulltext", (char*) offsetof(STATUS_VAR, feature_fulltext), SHOW_LONG_STATUS},
@@ -8415,6 +8428,7 @@ SHOW_VAR status_vars[]= {
{"Handler_read_last", (char*) offsetof(STATUS_VAR, ha_read_last_count), SHOW_LONG_STATUS},
{"Handler_read_next", (char*) offsetof(STATUS_VAR, ha_read_next_count), SHOW_LONG_STATUS},
{"Handler_read_prev", (char*) offsetof(STATUS_VAR, ha_read_prev_count), SHOW_LONG_STATUS},
+ {"Handler_read_retry", (char*) offsetof(STATUS_VAR, ha_read_retry_count), SHOW_LONG_STATUS},
{"Handler_read_rnd", (char*) offsetof(STATUS_VAR, ha_read_rnd_count), SHOW_LONG_STATUS},
{"Handler_read_rnd_deleted", (char*) offsetof(STATUS_VAR, ha_read_rnd_deleted_count), SHOW_LONG_STATUS},
{"Handler_read_rnd_next", (char*) offsetof(STATUS_VAR, ha_read_rnd_next_count), SHOW_LONG_STATUS},
@@ -8536,6 +8550,7 @@ SHOW_VAR status_vars[]= {
{"Threads_connected", (char*) &connection_count, SHOW_INT},
{"Threads_created", (char*) &thread_created, SHOW_LONG_NOFLUSH},
{"Threads_running", (char*) &thread_running, SHOW_INT},
+ {"Update_scan", (char*) offsetof(STATUS_VAR, update_scan_count), SHOW_LONG_STATUS},
{"Uptime", (char*) &show_starttime, SHOW_SIMPLE_FUNC},
#ifdef ENABLED_PROFILING
{"Uptime_since_flush_status",(char*) &show_flushstatustime, SHOW_SIMPLE_FUNC},
@@ -8564,7 +8579,8 @@ static bool add_many_options(DYNAMIC_ARRAY *options, my_option *list,
#ifndef EMBEDDED_LIBRARY
static void print_version(void)
{
- set_server_version();
+ if (IS_SYSVAR_AUTOSIZE(&server_version_ptr))
+ set_server_version(server_version, sizeof(server_version));
printf("%s Ver %s for %s on %s (%s)\n",my_progname,
server_version,SYSTEM_TYPE,MACHINE_TYPE, MYSQL_COMPILATION_COMMENT);
@@ -8706,7 +8722,6 @@ static int mysql_init_variables(void)
mqh_used= 0;
kill_in_progress= 0;
cleanup_done= 0;
- server_id_supplied= 0;
test_flags= select_errors= dropping_tables= ha_open_options=0;
thread_count= thread_running= kill_cached_threads= wake_thread= 0;
service_thread_count= 0;
@@ -9175,7 +9190,6 @@ mysqld_get_one_option(int optid, const struct my_option *opt, char *argument)
opt_noacl=opt_bootstrap=1;
break;
case OPT_SERVER_ID:
- server_id_supplied = 1;
::server_id= global_system_variables.server_id;
break;
case OPT_LOWER_CASE_TABLE_NAMES:
@@ -9675,24 +9689,17 @@ static int get_options(int *argc_ptr, char ***argv_ptr)
(MYSQL_SERVER_SUFFIX is set by the compilation environment)
*/
-void set_server_version(void)
+void set_server_version(char *buf, size_t size)
{
- if (!IS_SYSVAR_AUTOSIZE(&server_version_ptr))
- return;
- char *version_end= server_version+sizeof(server_version)-1;
- char *end= strxnmov(server_version, sizeof(server_version)-1,
- MYSQL_SERVER_VERSION,
- MYSQL_SERVER_SUFFIX_STR, NullS);
-#ifdef EMBEDDED_LIBRARY
- end= strnmov(end, "-embedded", (version_end-end));
-#endif
-#ifndef DBUG_OFF
- if (!strstr(MYSQL_SERVER_SUFFIX_STR, "-debug"))
- end= strnmov(end, "-debug", (version_end-end));
-#endif
- if (opt_log || global_system_variables.sql_log_slow || opt_bin_log)
- strnmov(end, "-log", (version_end-end)); // This may slow down system
- *end= 0;
+ bool is_log= opt_log || global_system_variables.sql_log_slow || opt_bin_log;
+ bool is_debug= IF_DBUG(!strstr(MYSQL_SERVER_SUFFIX_STR, "-debug"), 0);
+ strxnmov(buf, size - 1,
+ MYSQL_SERVER_VERSION,
+ MYSQL_SERVER_SUFFIX_STR,
+ IF_EMBEDDED("-embedded", ""),
+ is_debug ? "-debug" : "",
+ is_log ? "-log" : "",
+ NullS);
}
@@ -10150,11 +10157,6 @@ PSI_stage_info stage_waiting_for_the_next_event_in_relay_log= { 0, "Waiting for
PSI_stage_info stage_waiting_for_the_slave_thread_to_advance_position= { 0, "Waiting for the slave SQL thread to advance position", 0};
PSI_stage_info stage_waiting_to_finalize_termination= { 0, "Waiting to finalize termination", 0};
PSI_stage_info stage_waiting_to_get_readlock= { 0, "Waiting to get readlock", 0};
-PSI_stage_info stage_slave_waiting_workers_to_exit= { 0, "Waiting for workers to exit", 0};
-PSI_stage_info stage_slave_waiting_worker_to_release_partition= { 0, "Waiting for Slave Worker to release partition", 0};
-PSI_stage_info stage_slave_waiting_worker_to_free_events= { 0, "Waiting for Slave Workers to free pending events", 0};
-PSI_stage_info stage_slave_waiting_worker_queue= { 0, "Waiting for Slave Worker queue", 0};
-PSI_stage_info stage_slave_waiting_event_from_coordinator= { 0, "Waiting for an event from Coordinator", 0};
PSI_stage_info stage_binlog_waiting_background_tasks= { 0, "Waiting for background binlog tasks", 0};
PSI_stage_info stage_binlog_processing_checkpoint_notify= { 0, "Processing binlog checkpoint notification", 0};
PSI_stage_info stage_binlog_stopping_background_thread= { 0, "Stopping binlog background thread", 0};
@@ -10169,6 +10171,9 @@ PSI_stage_info stage_waiting_for_rpl_thread_pool= { 0, "Waiting while replicatio
PSI_stage_info stage_master_gtid_wait_primary= { 0, "Waiting in MASTER_GTID_WAIT() (primary waiter)", 0};
PSI_stage_info stage_master_gtid_wait= { 0, "Waiting in MASTER_GTID_WAIT()", 0};
PSI_stage_info stage_gtid_wait_other_connection= { 0, "Waiting for other master connection to process GTID received on multiple master connections", 0};
+PSI_stage_info stage_slave_background_process_request= { 0, "Processing requests", 0};
+PSI_stage_info stage_slave_background_wait_request= { 0, "Waiting for requests", 0};
+PSI_stage_info stage_waiting_for_deadlock_kill= { 0, "Waiting for parallel replication deadlock handling to complete", 0};
#ifdef HAVE_PSI_INTERFACE
@@ -10250,11 +10255,6 @@ PSI_stage_info *all_server_stages[]=
& stage_setup,
& stage_show_explain,
& stage_slave_has_read_all_relay_log,
- & stage_slave_waiting_event_from_coordinator,
- & stage_slave_waiting_worker_queue,
- & stage_slave_waiting_worker_to_free_events,
- & stage_slave_waiting_worker_to_release_partition,
- & stage_slave_waiting_workers_to_exit,
& stage_sorting,
& stage_sorting_for_group,
& stage_sorting_for_order,
@@ -10298,7 +10298,10 @@ PSI_stage_info *all_server_stages[]=
& stage_waiting_to_get_readlock,
& stage_master_gtid_wait_primary,
& stage_master_gtid_wait,
- & stage_gtid_wait_other_connection
+ & stage_gtid_wait_other_connection,
+ & stage_slave_background_process_request,
+ & stage_slave_background_wait_request,
+ & stage_waiting_for_deadlock_kill
};
PSI_socket_key key_socket_tcpip, key_socket_unix, key_socket_client_connection;
diff --git a/sql/mysqld.h b/sql/mysqld.h
index 6783eeff810..83d723c6ab7 100644
--- a/sql/mysqld.h
+++ b/sql/mysqld.h
@@ -107,7 +107,7 @@ extern CHARSET_INFO *error_message_charset_info;
extern CHARSET_INFO *character_set_filesystem;
extern MY_BITMAP temp_pool;
-extern bool opt_large_files, server_id_supplied;
+extern bool opt_large_files;
extern bool opt_update_log, opt_bin_log, opt_error_log;
extern my_bool opt_log, opt_bootstrap;
extern my_bool opt_backup_history_log;
@@ -342,8 +342,8 @@ extern PSI_cond_key key_COND_wait_gtid, key_COND_gtid_ignore_duplicates;
extern PSI_thread_key key_thread_bootstrap, key_thread_delayed_insert,
key_thread_handle_manager, key_thread_kill_server, key_thread_main,
- key_thread_one_connection, key_thread_signal_hand, key_thread_slave_init,
- key_rpl_parallel_thread;
+ key_thread_one_connection, key_thread_signal_hand,
+ key_thread_slave_background, key_rpl_parallel_thread;
extern PSI_file_key key_file_binlog, key_file_binlog_index, key_file_casetest,
key_file_dbopt, key_file_des_key_file, key_file_ERRMSG, key_select_to_file,
@@ -475,11 +475,6 @@ extern PSI_stage_info stage_waiting_for_the_next_event_in_relay_log;
extern PSI_stage_info stage_waiting_for_the_slave_thread_to_advance_position;
extern PSI_stage_info stage_waiting_to_finalize_termination;
extern PSI_stage_info stage_waiting_to_get_readlock;
-extern PSI_stage_info stage_slave_waiting_worker_to_release_partition;
-extern PSI_stage_info stage_slave_waiting_worker_to_free_events;
-extern PSI_stage_info stage_slave_waiting_worker_queue;
-extern PSI_stage_info stage_slave_waiting_event_from_coordinator;
-extern PSI_stage_info stage_slave_waiting_workers_to_exit;
extern PSI_stage_info stage_binlog_waiting_background_tasks;
extern PSI_stage_info stage_binlog_processing_checkpoint_notify;
extern PSI_stage_info stage_binlog_stopping_background_thread;
@@ -494,6 +489,9 @@ extern PSI_stage_info stage_waiting_for_rpl_thread_pool;
extern PSI_stage_info stage_master_gtid_wait_primary;
extern PSI_stage_info stage_master_gtid_wait;
extern PSI_stage_info stage_gtid_wait_other_connection;
+extern PSI_stage_info stage_slave_background_process_request;
+extern PSI_stage_info stage_slave_background_wait_request;
+extern PSI_stage_info stage_waiting_for_deadlock_kill;
#ifdef HAVE_PSI_STATEMENT_INTERFACE
/**
@@ -563,7 +561,7 @@ extern mysql_mutex_t
LOCK_slave_list, LOCK_active_mi, LOCK_manager,
LOCK_global_system_variables, LOCK_user_conn,
LOCK_prepared_stmt_count, LOCK_error_messages, LOCK_connection_count,
- LOCK_slave_init;
+ LOCK_slave_background;
extern MYSQL_PLUGIN_IMPORT mysql_mutex_t LOCK_thread_count;
extern mysql_mutex_t LOCK_start_thread;
#ifdef HAVE_OPENSSL
@@ -576,7 +574,7 @@ extern mysql_rwlock_t LOCK_grant, LOCK_sys_init_connect, LOCK_sys_init_slave;
extern mysql_rwlock_t LOCK_system_variables_hash;
extern mysql_cond_t COND_thread_count, COND_start_thread;
extern mysql_cond_t COND_manager;
-extern mysql_cond_t COND_slave_init;
+extern mysql_cond_t COND_slave_background;
extern int32 thread_running;
extern int32 thread_count, service_thread_count;
@@ -774,7 +772,7 @@ inline void dec_thread_running()
thread_safe_decrement32(&thread_running);
}
-extern void set_server_version(void);
+extern void set_server_version(char *buf, size_t size);
#if defined(MYSQL_DYNAMIC_PLUGIN) && defined(_WIN32)
extern "C" THD *_current_thd_noinline();
diff --git a/sql/net_serv.cc b/sql/net_serv.cc
index f0284462206..fccc947f3f1 100644
--- a/sql/net_serv.cc
+++ b/sql/net_serv.cc
@@ -117,7 +117,6 @@ extern my_bool thd_net_is_killed();
#endif
#define TEST_BLOCKING 8
-#define MAX_PACKET_LENGTH (256L*256L*256L-1)
static my_bool net_write_buff(NET *, const uchar *, ulong);
@@ -553,7 +552,7 @@ net_write_buff(NET *net, const uchar *packet, ulong len)
left_length= (ulong) (net->buff_end - net->write_pos);
#ifdef DEBUG_DATA_PACKETS
- DBUG_DUMP("data", packet, len);
+ DBUG_DUMP("data_written", packet, len);
#endif
if (len > left_length)
{
@@ -642,7 +641,8 @@ net_real_write(NET *net,const uchar *packet, size_t len)
}
memcpy(b+header_length,packet,len);
- if (my_compress(b+header_length, &len, &complen))
+ /* Don't compress error packets (compress == 2) */
+ if (net->compress == 2 || my_compress(b+header_length, &len, &complen))
complen=0;
int3store(&b[NET_HEADER_SIZE],complen);
int3store(b,len);
@@ -653,7 +653,7 @@ net_real_write(NET *net,const uchar *packet, size_t len)
#endif /* HAVE_COMPRESS */
#ifdef DEBUG_DATA_PACKETS
- DBUG_DUMP("data", packet, len);
+ DBUG_DUMP("data_written", packet, len);
#endif
#ifndef NO_ALARM
@@ -843,6 +843,7 @@ my_real_read(NET *net, size_t *complen,
size_t length;
uint i,retry_count=0;
ulong len=packet_error;
+ my_bool expect_error_packet __attribute__((unused))= 0;
thr_alarm_t alarmed;
#ifndef NO_ALARM
ALARM alarm_buff;
@@ -891,6 +892,7 @@ my_real_read(NET *net, size_t *complen,
if (i== 0 && thd_net_is_killed())
{
+ DBUG_PRINT("info", ("thd is killed"));
len= packet_error;
net->error= 0;
net->last_errno= ER_CONNECTION_KILLED;
@@ -960,39 +962,34 @@ my_real_read(NET *net, size_t *complen,
pos+= length;
update_statistics(thd_increment_bytes_received(net->thd, length));
}
+
+#ifdef DEBUG_DATA_PACKETS
+ DBUG_DUMP("data_read", net->buff+net->where_b, length);
+#endif
if (i == 0)
{ /* First parts is packet length */
ulong helping;
+#ifndef DEBUG_DATA_PACKETS
DBUG_DUMP("packet_header", net->buff+net->where_b,
NET_HEADER_SIZE);
+#endif
if (net->buff[net->where_b + 3] != (uchar) net->pkt_nr)
- {
- if (net->buff[net->where_b] != (uchar) 255)
- {
- DBUG_PRINT("error",
- ("Packets out of order (Found: %d, expected %u)",
- (int) net->buff[net->where_b + 3],
- net->pkt_nr));
- /*
- We don't make noise server side, since the client is expected
- to break the protocol for e.g. --send LOAD DATA .. LOCAL where
- the server expects the client to send a file, but the client
- may reply with a new command instead.
- */
+ {
#ifndef MYSQL_SERVER
- EXTRA_DEBUG_fflush(stdout);
- EXTRA_DEBUG_fprintf(stderr,"Error: Packets out of order (Found: %d, expected %d)\n",
- (int) net->buff[net->where_b + 3],
- (uint) (uchar) net->pkt_nr);
- EXTRA_DEBUG_fflush(stderr);
+ if (net->buff[net->where_b + 3] == (uchar) (net->pkt_nr -1))
+ {
+ /*
+ If the server was killed then the server may have missed the
+ last sent client packet and the packet numbering may be one off.
+ */
+ DBUG_PRINT("warning", ("Found possible out of order packets"));
+ expect_error_packet= 1;
+ }
+ else
#endif
- }
- len= packet_error;
- /* Not a NET error on the client. XXX: why? */
- MYSQL_SERVER_my_error(ER_NET_PACKETS_OUT_OF_ORDER, MYF(0));
- goto end;
- }
- net->compress_pkt_nr= ++net->pkt_nr;
+ goto packets_out_of_order;
+ }
+ net->compress_pkt_nr= ++net->pkt_nr;
#ifdef HAVE_COMPRESS
if (net->compress)
{
@@ -1040,6 +1037,21 @@ my_real_read(NET *net, size_t *complen,
}
#endif
}
+#ifndef MYSQL_SERVER
+ else if (expect_error_packet)
+ {
+ /*
+ This check is safe both for compressed and not compressed protocol
+ as for the compressed protocol errors are not compressed anymore.
+ */
+ if (net->buff[net->where_b] != (uchar) 255)
+ {
+ /* Restore pkt_nr to original value */
+ net->pkt_nr--;
+ goto packets_out_of_order;
+ }
+ }
+#endif
}
end:
@@ -1053,7 +1065,7 @@ end:
net->reading_or_writing=0;
#ifdef DEBUG_DATA_PACKETS
if (len != packet_error)
- DBUG_DUMP("data", net->buff+net->where_b, len);
+ DBUG_DUMP("data_read", net->buff+net->where_b, len);
#endif
#ifdef MYSQL_SERVER
if (server_extension != NULL)
@@ -1064,9 +1076,35 @@ end:
}
#endif
return(len);
+
+packets_out_of_order:
+ {
+ DBUG_PRINT("error",
+ ("Packets out of order (Found: %d, expected %u)",
+ (int) net->buff[net->where_b + 3],
+ net->pkt_nr));
+ DBUG_ASSERT(0);
+ /*
+ We don't make noise server side, since the client is expected
+ to break the protocol for e.g. --send LOAD DATA .. LOCAL where
+ the server expects the client to send a file, but the client
+ may reply with a new command instead.
+ */
+#ifndef MYSQL_SERVER
+ EXTRA_DEBUG_fflush(stdout);
+ EXTRA_DEBUG_fprintf(stderr,"Error: Packets out of order (Found: %d, expected %d)\n",
+ (int) net->buff[net->where_b + 3],
+ (uint) (uchar) net->pkt_nr);
+ EXTRA_DEBUG_fflush(stderr);
+#endif
+ len= packet_error;
+ MYSQL_SERVER_my_error(ER_NET_PACKETS_OUT_OF_ORDER, MYF(0));
+ goto end;
+ }
}
+
/* Old interface. See my_net_read_packet() for function description */
#undef my_net_read
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index bd191f715e0..3ea9f4e5db9 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -2428,8 +2428,6 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
scan_time= read_time= DBL_MAX;
if (limit < records)
read_time= (double) records + scan_time + 1; // Force to use index
- else if (read_time <= 2.0 && !force_quick_range)
- DBUG_RETURN(0); /* No need for quick select */
possible_keys.clear_all();
@@ -2699,7 +2697,6 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
thd->no_errors=0;
}
-
DBUG_EXECUTE("info", print_quick(quick, &needed_reg););
/*
@@ -10377,8 +10374,10 @@ get_quick_keys(PARAM *param,QUICK_RANGE_SELECT *quick,KEY_PART *key,
KEY *table_key=quick->head->key_info+quick->index;
flag=EQ_RANGE;
if ((table_key->flags & HA_NOSAME) &&
+ min_part == key_tree->part &&
key_tree->part == table_key->user_defined_key_parts-1)
{
+ DBUG_ASSERT(min_part == max_part);
if ((table_key->flags & HA_NULL_PART_KEY) &&
null_part_in_key(key,
param->min_key,
@@ -11904,8 +11903,6 @@ void QUICK_ROR_UNION_SELECT::add_used_key_part_to_set(MY_BITMAP *col_set)
*******************************************************************************/
static inline uint get_field_keypart(KEY *index, Field *field);
-static inline SEL_ARG * get_index_range_tree(uint index, SEL_TREE* range_tree,
- PARAM *param, uint *param_idx);
static bool get_sel_arg_for_keypart(Field *field, SEL_ARG *index_range_tree,
SEL_ARG **cur_range);
static bool get_constant_key_infix(KEY *index_info, SEL_ARG *index_range_tree,
@@ -12179,8 +12176,6 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
(GA1,GA2) are all TRUE. If there is more than one such index, select the
first one. Here we set the variables: group_prefix_len and index_info.
*/
- KEY *cur_index_info= table->key_info;
- KEY *cur_index_info_end= cur_index_info + table->s->keys;
/* Cost-related variables for the best index so far. */
double best_read_cost= DBL_MAX;
ha_rows best_records= 0;
@@ -12192,11 +12187,12 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
uint max_key_part;
SEL_ARG *cur_index_tree= NULL;
ha_rows cur_quick_prefix_records= 0;
- uint cur_param_idx=MAX_KEY;
- for (uint cur_index= 0 ; cur_index_info != cur_index_info_end ;
- cur_index_info++, cur_index++)
+ // We go through allowed indexes
+ for (uint cur_param_idx= 0; cur_param_idx < param->keys ; ++cur_param_idx)
{
+ const uint cur_index= param->real_keynr[cur_param_idx];
+ KEY *const cur_index_info= &table->key_info[cur_index];
KEY_PART_INFO *cur_part;
KEY_PART_INFO *end_part; /* Last part for loops. */
/* Last index part. */
@@ -12219,7 +12215,8 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
(was also: "Exclude UNIQUE indexes ..." but this was removed because
there are cases Loose Scan over a multi-part index is useful).
*/
- if (!table->covering_keys.is_set(cur_index))
+ if (!table->covering_keys.is_set(cur_index) ||
+ !table->keys_in_use_for_group_by.is_set(cur_index))
continue;
/*
@@ -12398,9 +12395,7 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
{
if (tree)
{
- uint dummy;
- SEL_ARG *index_range_tree= get_index_range_tree(cur_index, tree, param,
- &dummy);
+ SEL_ARG *index_range_tree= tree->keys[cur_param_idx];
if (!get_constant_key_infix(cur_index_info, index_range_tree,
first_non_group_part, min_max_arg_part,
last_part, thd, cur_key_infix,
@@ -12464,9 +12459,7 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
*/
if (tree && min_max_arg_item)
{
- uint dummy;
- SEL_ARG *index_range_tree= get_index_range_tree(cur_index, tree, param,
- &dummy);
+ SEL_ARG *index_range_tree= tree->keys[cur_param_idx];
SEL_ARG *cur_range= NULL;
if (get_sel_arg_for_keypart(min_max_arg_part->field,
index_range_tree, &cur_range) ||
@@ -12484,9 +12477,7 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
/* Compute the cost of using this index. */
if (tree)
{
- /* Find the SEL_ARG sub-tree that corresponds to the chosen index. */
- cur_index_tree= get_index_range_tree(cur_index, tree, param,
- &cur_param_idx);
+ cur_index_tree= tree->keys[cur_param_idx];
/* Check if this range tree can be used for prefix retrieval. */
Cost_estimate dummy_cost;
uint mrr_flags= HA_MRR_USE_DEFAULT_IMPL;
@@ -13020,44 +13011,6 @@ get_field_keypart(KEY *index, Field *field)
/*
- Find the SEL_ARG sub-tree that corresponds to the chosen index.
-
- SYNOPSIS
- get_index_range_tree()
- index [in] The ID of the index being looked for
- range_tree[in] Tree of ranges being searched
- param [in] PARAM from SQL_SELECT::test_quick_select
- param_idx [out] Index in the array PARAM::key that corresponds to 'index'
-
- DESCRIPTION
-
- A SEL_TREE contains range trees for all usable indexes. This procedure
- finds the SEL_ARG sub-tree for 'index'. The members of a SEL_TREE are
- ordered in the same way as the members of PARAM::key, thus we first find
- the corresponding index in the array PARAM::key. This index is returned
- through the variable param_idx, to be used later as argument of
- check_quick_select().
-
- RETURN
- Pointer to the SEL_ARG subtree that corresponds to index.
-*/
-
-SEL_ARG * get_index_range_tree(uint index, SEL_TREE* range_tree, PARAM *param,
- uint *param_idx)
-{
- uint idx= 0; /* Index nr in param->key_parts */
- while (idx < param->keys)
- {
- if (index == param->real_keynr[idx])
- break;
- idx++;
- }
- *param_idx= idx;
- return(range_tree->keys[idx]);
-}
-
-
-/*
Compute the cost of a quick_group_min_max_select for a particular index.
SYNOPSIS
diff --git a/sql/opt_range_mrr.cc b/sql/opt_range_mrr.cc
index 729c491a6f1..fbccb7c4e1d 100644
--- a/sql/opt_range_mrr.cc
+++ b/sql/opt_range_mrr.cc
@@ -278,14 +278,14 @@ walk_up_n_right:
(1) - range analysis is used for estimating condition selectivity
(2) - This is a unique key, and we have conditions for all its
user-defined key parts.
- (3) - The table uses extended keys, and we have conditions for
- all key parts.
+ (3) - The table uses extended keys, this key covers all components,
+ and we have conditions for all key parts.
*/
if (!(cur->min_key_flag & ~NULL_RANGE) && !cur->max_key_flag &&
(!key_info || // (1)
((uint)key_tree->part+1 == key_info->user_defined_key_parts && // (2)
key_info->flags & HA_NOSAME) || // (2)
- (seq->param->table->s->use_ext_keys && // (3)
+ ((key_info->flags & HA_EXT_NOSAME) && // (3)
(uint)key_tree->part+1 == key_info->ext_key_parts) // (3)
) &&
range->start_key.length == range->end_key.length &&
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc
index a835c5824ff..a09826ac2f0 100644
--- a/sql/opt_subselect.cc
+++ b/sql/opt_subselect.cc
@@ -512,6 +512,7 @@ bool is_materialization_applicable(THD *thd, Item_in_subselect *in_subs,
(Subquery is correlated to the immediate outer query &&
Subquery !contains {GROUP BY, ORDER BY [LIMIT],
aggregate functions}) && subquery predicate is not under "NOT IN"))
+ 5. Subquery does not contain recursive references
A note about prepared statements: we want the if-branch to be taken on
PREPARE and each EXECUTE. The rewrites are only done once, but we need
@@ -528,7 +529,8 @@ bool is_materialization_applicable(THD *thd, Item_in_subselect *in_subs,
OPTIMIZER_SWITCH_PARTIAL_MATCH_ROWID_MERGE) || //3
optimizer_flag(thd,
OPTIMIZER_SWITCH_PARTIAL_MATCH_TABLE_SCAN)) && //3
- !in_subs->is_correlated) //4
+ !in_subs->is_correlated && //4
+ !in_subs->with_recursive_reference) //5
{
return TRUE;
}
@@ -1558,7 +1560,12 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred)
{
tl->set_tablenr(table_no);
if (tl->is_jtbm())
+ {
tl->jtbm_table_no= table_no;
+ Item *dummy= tl->jtbm_subselect;
+ tl->jtbm_subselect->fix_after_pullout(parent_lex, &dummy);
+ DBUG_ASSERT(dummy == tl->jtbm_subselect);
+ }
SELECT_LEX *old_sl= tl->select_lex;
tl->select_lex= parent_join->select_lex;
for (TABLE_LIST *emb= tl->embedding;
diff --git a/sql/partition_element.h b/sql/partition_element.h
index 308a4d6ddd2..b979b7a58e6 100644
--- a/sql/partition_element.h
+++ b/sql/partition_element.h
@@ -65,7 +65,7 @@ typedef struct p_column_list_val
Item* item_expression;
partition_info *part_info;
uint partition_id;
- bool max_value;
+ bool max_value; // MAXVALUE for RANGE type or DEFAULT value for LIST type
bool null_value;
char fixed;
} part_column_list_val;
diff --git a/sql/partition_info.cc b/sql/partition_info.cc
index 4f297c630ad..9d31667a6a8 100644
--- a/sql/partition_info.cc
+++ b/sql/partition_info.cc
@@ -1472,6 +1472,8 @@ bool partition_info::check_list_constants(THD *thd)
List_iterator<partition_element> list_func_it(partitions);
DBUG_ENTER("partition_info::check_list_constants");
+ DBUG_ASSERT(part_type == LIST_PARTITION);
+
num_list_values= 0;
/*
We begin by calculating the number of list values that have been
@@ -1503,21 +1505,15 @@ bool partition_info::check_list_constants(THD *thd)
has_null_part_id= i;
found_null= TRUE;
}
- List_iterator<part_elem_value> list_val_it1(part_def->list_val_list);
- while (list_val_it1++)
- num_list_values++;
+ num_list_values+= part_def->list_val_list.elements;
} while (++i < num_parts);
list_func_it.rewind();
num_column_values= part_field_list.elements;
size_entries= column_list ?
(num_column_values * sizeof(part_column_list_val)) :
sizeof(LIST_PART_ENTRY);
- ptr= thd->calloc((num_list_values+1) * size_entries);
- if (unlikely(ptr == NULL))
- {
- mem_alloc_error(num_list_values * size_entries);
+ if (unlikely(!(ptr= thd->calloc((num_list_values+1) * size_entries))))
goto end;
- }
if (column_list)
{
part_column_list_val *loc_list_col_array;
@@ -1528,6 +1524,13 @@ bool partition_info::check_list_constants(THD *thd)
do
{
part_def= list_func_it++;
+ if (part_def->max_value)
+ {
+ // DEFAULT is not a real value so let's exclude it from sorting.
+ DBUG_ASSERT(num_list_values);
+ num_list_values--;
+ continue;
+ }
List_iterator<part_elem_value> list_val_it2(part_def->list_val_list);
while ((list_value= list_val_it2++))
{
@@ -1557,6 +1560,13 @@ bool partition_info::check_list_constants(THD *thd)
do
{
part_def= list_func_it++;
+ if (part_def->max_value && part_type == LIST_PARTITION)
+ {
+ // DEFAULT is not a real value so let's exclude it from sorting.
+ DBUG_ASSERT(num_list_values);
+ num_list_values--;
+ continue;
+ }
List_iterator<part_elem_value> list_val_it2(part_def->list_val_list);
while ((list_value= list_val_it2++))
{
@@ -2287,11 +2297,19 @@ int partition_info::add_max_value(THD *thd)
DBUG_ENTER("partition_info::add_max_value");
part_column_list_val *col_val;
- if (!(col_val= add_column_value(thd)))
+ /*
+ Makes for LIST COLUMNS 'num_columns' DEFAULT tuples, 1 tuple for RANGEs
+ */
+ uint max_val= (num_columns && part_type == LIST_PARTITION) ?
+ num_columns : 1;
+ for (uint i= 0; i < max_val; i++)
{
- DBUG_RETURN(TRUE);
+ if (!(col_val= add_column_value(thd)))
+ {
+ DBUG_RETURN(TRUE);
+ }
+ col_val->max_value= TRUE;
}
- col_val->max_value= TRUE;
DBUG_RETURN(FALSE);
}
@@ -2566,8 +2584,7 @@ int partition_info::reorganize_into_single_field_col_val(THD *thd)
*/
int partition_info::fix_partition_values(THD *thd,
part_elem_value *val,
- partition_element *part_elem,
- uint part_id)
+ partition_element *part_elem)
{
part_column_list_val *col_val= val->col_val_array;
DBUG_ENTER("partition_info::fix_partition_values");
@@ -2576,59 +2593,31 @@ int partition_info::fix_partition_values(THD *thd,
{
DBUG_RETURN(FALSE);
}
- if (val->added_items != 1)
- {
- my_error(ER_PARTITION_COLUMN_LIST_ERROR, MYF(0));
- DBUG_RETURN(TRUE);
- }
- if (col_val->max_value)
+
+ Item *item_expr= col_val->item_expression;
+ if ((val->null_value= item_expr->null_value))
{
- /* The parser ensures we're not LIST partitioned here */
- DBUG_ASSERT(part_type == RANGE_PARTITION);
- if (defined_max_value)
- {
- my_error(ER_PARTITION_MAXVALUE_ERROR, MYF(0));
- DBUG_RETURN(TRUE);
- }
- if (part_id == (num_parts - 1))
+ if (part_elem->has_null_value)
{
- defined_max_value= TRUE;
- part_elem->max_value= TRUE;
- part_elem->range_value= LONGLONG_MAX;
- }
- else
- {
- my_error(ER_PARTITION_MAXVALUE_ERROR, MYF(0));
+ my_error(ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR, MYF(0));
DBUG_RETURN(TRUE);
}
+ part_elem->has_null_value= TRUE;
}
- else
+ else if (item_expr->result_type() != INT_RESULT)
{
- Item *item_expr= col_val->item_expression;
- if ((val->null_value= item_expr->null_value))
- {
- if (part_elem->has_null_value)
- {
- my_error(ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR, MYF(0));
- DBUG_RETURN(TRUE);
- }
- part_elem->has_null_value= TRUE;
- }
- else if (item_expr->result_type() != INT_RESULT)
+ my_error(ER_VALUES_IS_NOT_INT_TYPE_ERROR, MYF(0),
+ part_elem->partition_name);
+ DBUG_RETURN(TRUE);
+ }
+ if (part_type == RANGE_PARTITION)
+ {
+ if (part_elem->has_null_value)
{
- my_error(ER_VALUES_IS_NOT_INT_TYPE_ERROR, MYF(0),
- part_elem->partition_name);
+ my_error(ER_NULL_IN_VALUES_LESS_THAN, MYF(0));
DBUG_RETURN(TRUE);
}
- if (part_type == RANGE_PARTITION)
- {
- if (part_elem->has_null_value)
- {
- my_error(ER_NULL_IN_VALUES_LESS_THAN, MYF(0));
- DBUG_RETURN(TRUE);
- }
- part_elem->range_value= val->value;
- }
+ part_elem->range_value= val->value;
}
col_val->fixed= 2;
DBUG_RETURN(FALSE);
@@ -2828,6 +2817,7 @@ bool partition_info::fix_parser_data(THD *thd)
key_algorithm == KEY_ALGORITHM_NONE)
key_algorithm= KEY_ALGORITHM_55;
}
+ defined_max_value= FALSE; // in case it already set (CREATE TABLE LIKE)
do
{
part_elem= it++;
@@ -2835,16 +2825,60 @@ bool partition_info::fix_parser_data(THD *thd)
num_elements= part_elem->list_val_list.elements;
DBUG_ASSERT(part_type == RANGE_PARTITION ?
num_elements == 1U : TRUE);
+
for (j= 0; j < num_elements; j++)
{
part_elem_value *val= list_val_it++;
- if (column_list)
+
+ if (val->added_items != (column_list ? num_columns : 1))
+ {
+ my_error(ER_PARTITION_COLUMN_LIST_ERROR, MYF(0));
+ DBUG_RETURN(TRUE);
+ }
+
+ /*
+ Check the last MAX_VALUE for range partitions and DEFAULT value
+ for LIST partitions.
+ Both values are marked with defined_max_value and
+ default_partition_id.
+
+ This is a max_value/default is max_value is set and this is
+ a normal RANGE (no column list) or if it's a LIST partition:
+
+ PARTITION p3 VALUES LESS THAN MAXVALUE
+ or
+ PARTITION p3 VALUES DEFAULT
+ */
+ if (val->added_items && val->col_val_array[0].max_value &&
+ (!column_list || part_type == LIST_PARTITION))
{
- if (val->added_items != num_columns)
+ DBUG_ASSERT(part_type == RANGE_PARTITION ||
+ part_type == LIST_PARTITION);
+ if (defined_max_value)
+ {
+ my_error((part_type == RANGE_PARTITION) ?
+ ER_PARTITION_MAXVALUE_ERROR :
+ ER_PARTITION_DEFAULT_ERROR, MYF(0));
+ DBUG_RETURN(TRUE);
+ }
+
+ /* For RANGE PARTITION MAX_VALUE must be last */
+ if (i != (num_parts - 1) &&
+ part_type != LIST_PARTITION)
{
- my_error(ER_PARTITION_COLUMN_LIST_ERROR, MYF(0));
+ my_error(ER_PARTITION_MAXVALUE_ERROR, MYF(0));
DBUG_RETURN(TRUE);
}
+
+ defined_max_value= TRUE;
+ default_partition_id= i;
+ part_elem->max_value= TRUE;
+ part_elem->range_value= LONGLONG_MAX;
+ continue;
+ }
+
+ if (column_list)
+ {
for (k= 0; k < num_columns; k++)
{
part_column_list_val *col_val= &val->col_val_array[k];
@@ -2857,10 +2891,8 @@ bool partition_info::fix_parser_data(THD *thd)
}
else
{
- if (fix_partition_values(thd, val, part_elem, i))
- {
+ if (fix_partition_values(thd, val, part_elem))
DBUG_RETURN(TRUE);
- }
if (val->null_value)
{
/*
diff --git a/sql/partition_info.h b/sql/partition_info.h
index 5181e19d568..66579be6384 100644
--- a/sql/partition_info.h
+++ b/sql/partition_info.h
@@ -202,6 +202,7 @@ public:
uint num_full_part_fields;
uint has_null_part_id;
+ uint32 default_partition_id;
/*
This variable is used to calculate the partition id when using
LINEAR KEY/HASH. This functionality is kept in the MySQL Server
@@ -230,6 +231,10 @@ public:
bool use_default_num_subpartitions;
bool default_partitions_setup;
bool defined_max_value;
+ inline bool has_default_partititon()
+ {
+ return (part_type == LIST_PARTITION && defined_max_value);
+ }
bool list_of_part_fields; // KEY or COLUMNS PARTITIONING
bool list_of_subpart_fields; // KEY SUBPARTITIONING
bool linear_hash_ind; // LINEAR HASH/KEY
@@ -323,8 +328,7 @@ public:
Item* get_column_item(Item *item, Field *field);
int fix_partition_values(THD *thd,
part_elem_value *val,
- partition_element *part_elem,
- uint part_id);
+ partition_element *part_elem);
bool fix_column_value_functions(THD *thd,
part_elem_value *val,
uint part_id);
@@ -399,6 +403,7 @@ static inline void init_single_partition_iterator(uint32 part_id,
part_iter->part_nums.start= part_iter->part_nums.cur= part_id;
part_iter->part_nums.end= part_id+1;
part_iter->ret_null_part= part_iter->ret_null_part_orig= FALSE;
+ part_iter->ret_default_part= part_iter->ret_default_part_orig= FALSE;
part_iter->get_next= get_next_partition_id_range;
}
@@ -410,6 +415,7 @@ void init_all_partitions_iterator(partition_info *part_info,
part_iter->part_nums.start= part_iter->part_nums.cur= 0;
part_iter->part_nums.end= part_info->num_parts;
part_iter->ret_null_part= part_iter->ret_null_part_orig= FALSE;
+ part_iter->ret_default_part= part_iter->ret_default_part_orig= FALSE;
part_iter->get_next= get_next_partition_id_range;
}
diff --git a/sql/procedure.h b/sql/procedure.h
index be631675d5c..b9d5066bb3d 100644
--- a/sql/procedure.h
+++ b/sql/procedure.h
@@ -58,6 +58,7 @@ public:
DBUG_ASSERT(0); // impossible
return mark_unsupported_function("proc", arg, VCOL_IMPOSSIBLE);
}
+ Item* get_copy(THD *thd, MEM_ROOT *mem_root) { return 0; }
};
class Item_proc_real :public Item_proc
diff --git a/sql/protocol.cc b/sql/protocol.cc
index 608ec553da0..be73c94c9b2 100644
--- a/sql/protocol.cc
+++ b/sql/protocol.cc
@@ -35,7 +35,8 @@ static const unsigned int PACKET_BUFFER_EXTRA_ALLOC= 1024;
/* Declared non-static only because of the embedded library. */
bool net_send_error_packet(THD *, uint, const char *, const char *);
/* Declared non-static only because of the embedded library. */
-bool net_send_ok(THD *, uint, uint, ulonglong, ulonglong, const char *, bool);
+bool net_send_ok(THD *, uint, uint, ulonglong, ulonglong, const char *,
+ bool, bool);
/* Declared non-static only because of the embedded library. */
bool net_send_eof(THD *thd, uint server_status, uint statement_warn_count);
#ifndef EMBEDDED_LIBRARY
@@ -197,7 +198,8 @@ bool net_send_error(THD *thd, uint sql_errno, const char *err,
@param affected_rows Number of rows changed by statement
@param id Auto_increment id for first row (if used)
@param message Message to send to the client (Used by mysql_status)
-
+ @param is_eof this called instead of old EOF packet
+
@return
@retval FALSE The message was successfully sent
@retval TRUE An error occurred and the messages wasn't sent properly
@@ -209,10 +211,14 @@ bool
net_send_ok(THD *thd,
uint server_status, uint statement_warn_count,
ulonglong affected_rows, ulonglong id, const char *message,
+ bool is_eof,
bool skip_flush)
{
NET *net= &thd->net;
- uchar buff[MYSQL_ERRMSG_SIZE+10],*pos;
+ StringBuffer<MYSQL_ERRMSG_SIZE + 10> store;
+
+ bool state_changed= false;
+
bool error= FALSE;
DBUG_ENTER("net_send_ok");
@@ -222,38 +228,67 @@ net_send_ok(THD *thd,
DBUG_RETURN(FALSE);
}
- buff[0]=0; // No fields
- pos=net_store_length(buff+1,affected_rows);
- pos=net_store_length(pos, id);
+ /*
+ OK send instead of EOF still require 0xFE header, but OK packet content.
+ */
+ if (is_eof)
+ {
+ DBUG_ASSERT(thd->client_capabilities & CLIENT_DEPRECATE_EOF);
+ store.q_append((char)254);
+ }
+ else
+ store.q_append('\0');
+
+ /* affected rows */
+ store.q_net_store_length(affected_rows);
+
+ /* last insert id */
+ store.q_net_store_length(id);
+
if (thd->client_capabilities & CLIENT_PROTOCOL_41)
{
DBUG_PRINT("info",
("affected_rows: %lu id: %lu status: %u warning_count: %u",
- (ulong) affected_rows,
+ (ulong) affected_rows,
(ulong) id,
(uint) (server_status & 0xffff),
(uint) statement_warn_count));
- int2store(pos, server_status);
- pos+=2;
+ store.q_append2b(server_status);
/* We can only return up to 65535 warnings in two bytes */
uint tmp= MY_MIN(statement_warn_count, 65535);
- int2store(pos, tmp);
- pos+= 2;
+ store.q_append2b(tmp);
}
else if (net->return_status) // For 4.0 protocol
{
- int2store(pos, server_status);
- pos+=2;
+ store.q_append2b(server_status);
}
thd->get_stmt_da()->set_overwrite_status(true);
- if (message && message[0])
- pos= net_store_data(pos, (uchar*) message, strlen(message));
- error= my_net_write(net, buff, (size_t) (pos-buff));
- if (!error && !skip_flush)
+ state_changed=
+ (thd->client_capabilities & CLIENT_SESSION_TRACK) &&
+ (server_status & SERVER_SESSION_STATE_CHANGED);
+
+ if (state_changed || (message && message[0]))
+ {
+ DBUG_ASSERT(safe_strlen(message) <= MYSQL_ERRMSG_SIZE);
+ store.q_net_store_data((uchar*) safe_str(message), safe_strlen(message));
+ }
+
+ if (unlikely(state_changed))
+ {
+ store.set_charset(thd->variables.collation_database);
+
+ thd->session_tracker.store(thd, &store);
+ }
+
+ DBUG_ASSERT(store.length() <= MAX_PACKET_LENGTH);
+
+ error= my_net_write(net, (const unsigned char*)store.ptr(), store.length());
+ if (!error && (!skip_flush || is_eof))
error= net_flush(net);
+ thd->server_status&= ~SERVER_SESSION_STATE_CHANGED;
thd->get_stmt_da()->set_overwrite_status(false);
DBUG_PRINT("info", ("OK sent, so no more error sending allowed"));
@@ -261,6 +296,7 @@ net_send_ok(THD *thd,
DBUG_RETURN(error);
}
+
static uchar eof_buff[1]= { (uchar) 254 }; /* Marker for end of fields */
/**
@@ -292,6 +328,22 @@ net_send_eof(THD *thd, uint server_status, uint statement_warn_count)
NET *net= &thd->net;
bool error= FALSE;
DBUG_ENTER("net_send_eof");
+
+ /*
+ Check if client understand new format packets (OK instead of EOF)
+
+ Normally end of statement reply is signaled by OK packet, but in case
+ of binlog dump request an EOF packet is sent instead. Also, old clients
+ expect EOF packet instead of OK
+ */
+ if ((thd->client_capabilities & CLIENT_DEPRECATE_EOF) &&
+ (thd->get_command() != COM_BINLOG_DUMP ))
+ {
+ error= net_send_ok(thd, server_status, statement_warn_count, 0, 0, NULL,
+ true, false);
+ DBUG_RETURN(error);
+ }
+
/* Set to TRUE if no active vio, to work well in case of --init-file */
if (net->vio != 0)
{
@@ -374,7 +426,8 @@ bool net_send_error_packet(THD *thd, uint sql_errno, const char *err,
uint error;
char converted_err[MYSQL_ERRMSG_SIZE];
char buff[2+1+SQLSTATE_LENGTH+MYSQL_ERRMSG_SIZE], *pos;
-
+ my_bool ret;
+ uint8 save_compress;
DBUG_ENTER("send_error_packet");
if (net->vio == 0)
@@ -402,8 +455,16 @@ bool net_send_error_packet(THD *thd, uint sql_errno, const char *err,
/* Converted error message is always null-terminated. */
length= (uint) (strmake(pos, converted_err, MYSQL_ERRMSG_SIZE - 1) - buff);
- DBUG_RETURN(net_write_command(net,(uchar) 255, (uchar*) "", 0, (uchar*) buff,
- length));
+ /*
+ Ensure that errors are not compressed. This is to ensure we can
+ detect out of bands error messages in the client
+ */
+ if ((save_compress= net->compress))
+ net->compress= 2;
+ ret= net_write_command(net,(uchar) 255, (uchar*) "", 0, (uchar*) buff,
+ length);
+ net->compress= save_compress;
+ DBUG_RETURN(ret);
}
#endif /* EMBEDDED_LIBRARY */
@@ -546,9 +607,9 @@ bool Protocol::send_ok(uint server_status, uint statement_warn_count,
const char *message, bool skip_flush)
{
DBUG_ENTER("Protocol::send_ok");
- const bool retval=
+ const bool retval=
net_send_ok(thd, server_status, statement_warn_count,
- affected_rows, last_insert_id, message, skip_flush);
+ affected_rows, last_insert_id, message, false, skip_flush);
DBUG_RETURN(retval);
}
@@ -562,7 +623,7 @@ bool Protocol::send_ok(uint server_status, uint statement_warn_count,
bool Protocol::send_eof(uint server_status, uint statement_warn_count)
{
DBUG_ENTER("Protocol::send_eof");
- const bool retval= net_send_eof(thd, server_status, statement_warn_count);
+ bool retval= net_send_eof(thd, server_status, statement_warn_count);
DBUG_RETURN(retval);
}
@@ -862,14 +923,19 @@ bool Protocol::send_result_set_metadata(List<Item> *list, uint flags)
if (flags & SEND_EOF)
{
- /*
- Mark the end of meta-data result set, and store thd->server_status,
- to show that there is no cursor.
- Send no warning information, as it will be sent at statement end.
- */
- if (write_eof_packet(thd, &thd->net, thd->server_status,
- thd->get_stmt_da()->current_statement_warn_count()))
- DBUG_RETURN(1);
+
+ /* if it is new client do not send EOF packet */
+ if (!(thd->client_capabilities & CLIENT_DEPRECATE_EOF))
+ {
+ /*
+ Mark the end of meta-data result set, and store thd->server_status,
+ to show that there is no cursor.
+ Send no warning information, as it will be sent at statement end.
+ */
+ if (write_eof_packet(thd, &thd->net, thd->server_status,
+ thd->get_stmt_da()->current_statement_warn_count()))
+ DBUG_RETURN(1);
+ }
}
DBUG_RETURN(prepare_for_send(list->elements));
@@ -1505,6 +1571,7 @@ bool Protocol_binary::store_time(MYSQL_TIME *tm, int decimals)
bool Protocol_binary::send_out_parameters(List<Item_param> *sp_params)
{
+ bool ret;
if (!(thd->client_capabilities & CLIENT_PS_MULTI_RESULTS))
{
/* The client does not support OUT-parameters. */
@@ -1558,8 +1625,7 @@ bool Protocol_binary::send_out_parameters(List<Item_param> *sp_params)
/* Restore THD::server_status. */
thd->server_status&= ~SERVER_PS_OUT_PARAMS;
- /* Send EOF-packet. */
- net_send_eof(thd, thd->server_status, 0);
+ ret= net_send_eof(thd, thd->server_status, 0);
/*
Reset SERVER_MORE_RESULTS_EXISTS bit, because this is the last packet
@@ -1567,5 +1633,5 @@ bool Protocol_binary::send_out_parameters(List<Item_param> *sp_params)
*/
thd->server_status&= ~SERVER_MORE_RESULTS_EXISTS;
- return FALSE;
+ return ret ? FALSE : TRUE;
}
diff --git a/sql/rpl_mi.cc b/sql/rpl_mi.cc
index 02dbac46eb5..6048d26998b 100644
--- a/sql/rpl_mi.cc
+++ b/sql/rpl_mi.cc
@@ -1233,8 +1233,6 @@ Master_info_index::get_master_info(const LEX_STRING *connection_name,
connection_name->str));
mysql_mutex_assert_owner(&LOCK_active_mi);
- if (!this) // master_info_index is set to NULL on server shutdown
- DBUG_RETURN(NULL);
/* Make name lower case for comparison */
res= strmake(buff, connection_name->str, connection_name->length);
@@ -1388,8 +1386,6 @@ bool Master_info_index::give_error_if_slave_running()
{
DBUG_ENTER("give_error_if_slave_running");
mysql_mutex_assert_owner(&LOCK_active_mi);
- if (!this) // master_info_index is set to NULL on server shutdown
- DBUG_RETURN(TRUE);
for (uint i= 0; i< master_info_hash.records; ++i)
{
@@ -1420,8 +1416,7 @@ uint Master_info_index::any_slave_sql_running()
{
uint count= 0;
DBUG_ENTER("any_slave_sql_running");
- if (!this) // master_info_index is set to NULL on server shutdown
- DBUG_RETURN(count);
+ mysql_mutex_assert_owner(&LOCK_active_mi);
for (uint i= 0; i< master_info_hash.records; ++i)
{
diff --git a/sql/rpl_parallel.cc b/sql/rpl_parallel.cc
index 18c83608cd3..8cd7474cb73 100644
--- a/sql/rpl_parallel.cc
+++ b/sql/rpl_parallel.cc
@@ -107,6 +107,25 @@ handle_queued_pos_update(THD *thd, rpl_parallel_thread::queued_event *qev)
}
+/*
+ Wait for any pending deadlock kills. Since deadlock kills happen
+ asynchronously, we need to be sure they will be completed before starting a
+ new transaction. Otherwise the new transaction might suffer a spurious kill.
+*/
+static void
+wait_for_pending_deadlock_kill(THD *thd, rpl_group_info *rgi)
+{
+ PSI_stage_info old_stage;
+
+ mysql_mutex_lock(&thd->LOCK_wakeup_ready);
+ thd->ENTER_COND(&thd->COND_wakeup_ready, &thd->LOCK_wakeup_ready,
+ &stage_waiting_for_deadlock_kill, &old_stage);
+ while (rgi->killed_for_retry == rpl_group_info::RETRY_KILL_PENDING)
+ mysql_cond_wait(&thd->COND_wakeup_ready, &thd->LOCK_wakeup_ready);
+ thd->EXIT_COND(&old_stage);
+}
+
+
static void
finish_event_group(rpl_parallel_thread *rpt, uint64 sub_id,
rpl_parallel_entry *entry, rpl_group_info *rgi)
@@ -212,6 +231,8 @@ finish_event_group(rpl_parallel_thread *rpt, uint64 sub_id,
entry->stop_on_error_sub_id= sub_id;
mysql_mutex_unlock(&entry->LOCK_parallel_entry);
+ if (rgi->killed_for_retry == rpl_group_info::RETRY_KILL_PENDING)
+ wait_for_pending_deadlock_kill(thd, rgi);
thd->clear_error();
thd->reset_killed();
/*
@@ -307,6 +328,7 @@ do_gco_wait(rpl_group_info *rgi, group_commit_orderer *gco,
&stage_waiting_for_prior_transaction_to_start_commit,
old_stage);
*did_enter_cond= true;
+ thd->set_time_for_next_stage();
do
{
if (thd->check_killed() && !rgi->worker_error)
@@ -369,6 +391,7 @@ do_ftwrl_wait(rpl_group_info *rgi,
thd->ENTER_COND(&entry->COND_parallel_entry, &entry->LOCK_parallel_entry,
&stage_waiting_for_ftwrl, old_stage);
*did_enter_cond= true;
+ thd->set_time_for_next_stage();
do
{
if (entry->force_abort || rgi->worker_error)
@@ -417,8 +440,11 @@ pool_mark_busy(rpl_parallel_thread_pool *pool, THD *thd)
*/
mysql_mutex_lock(&pool->LOCK_rpl_thread_pool);
if (thd)
+ {
thd->ENTER_COND(&pool->COND_rpl_thread_pool, &pool->LOCK_rpl_thread_pool,
&stage_waiting_for_rpl_thread_pool, &old_stage);
+ thd->set_time_for_next_stage();
+ }
while (pool->busy)
{
if (thd && thd->check_killed())
@@ -534,6 +560,7 @@ rpl_pause_for_ftwrl(THD *thd)
e->pause_sub_id= e->largest_started_sub_id;
thd->ENTER_COND(&e->COND_parallel_entry, &e->LOCK_parallel_entry,
&stage_waiting_for_ftwrl_threads_to_pause, &old_stage);
+ thd->set_time_for_next_stage();
while (e->pause_sub_id < (uint64)ULONGLONG_MAX &&
e->last_committed_sub_id < e->pause_sub_id &&
!err)
@@ -604,7 +631,6 @@ convert_kill_to_deadlock_error(rpl_group_info *rgi)
{
thd->clear_error();
my_error(ER_LOCK_DEADLOCK, MYF(0));
- rgi->killed_for_retry= false;
thd->reset_killed();
}
}
@@ -695,14 +721,16 @@ do_retry:
thd->wait_for_commit_ptr->unregister_wait_for_prior_commit();
DBUG_EXECUTE_IF("inject_mdev8031", {
/* Simulate that we get deadlock killed at this exact point. */
- rgi->killed_for_retry= true;
+ rgi->killed_for_retry= rpl_group_info::RETRY_KILL_KILLED;
mysql_mutex_lock(&thd->LOCK_thd_data);
thd->killed= KILL_CONNECTION;
mysql_mutex_unlock(&thd->LOCK_thd_data);
});
rgi->cleanup_context(thd, 1);
+ wait_for_pending_deadlock_kill(thd, rgi);
thd->reset_killed();
thd->clear_error();
+ rgi->killed_for_retry = rpl_group_info::RETRY_KILL_NONE;
/*
If we retry due to a deadlock kill that occurred during the commit step, we
@@ -841,7 +869,7 @@ do_retry:
{
/* Simulate that we get deadlock killed during open_binlog(). */
thd->reset_for_next_command();
- rgi->killed_for_retry= true;
+ rgi->killed_for_retry= rpl_group_info::RETRY_KILL_KILLED;
mysql_mutex_lock(&thd->LOCK_thd_data);
thd->killed= KILL_CONNECTION;
mysql_mutex_unlock(&thd->LOCK_thd_data);
@@ -995,7 +1023,6 @@ handle_rpl_parallel_thread(void *arg)
*/
thd->variables.tx_isolation= ISO_REPEATABLE_READ;
-
mysql_mutex_lock(&rpt->LOCK_rpl_thread);
rpt->thd= thd;
@@ -1005,8 +1032,10 @@ handle_rpl_parallel_thread(void *arg)
rpt->running= true;
mysql_cond_signal(&rpt->COND_rpl_thread);
+ thd->set_command(COM_SLAVE_WORKER);
while (!rpt->stop)
{
+ uint wait_count= 0;
rpl_parallel_thread::queued_event *qev, *next_qev;
thd->ENTER_COND(&rpt->COND_rpl_thread, &rpt->LOCK_rpl_thread,
@@ -1025,7 +1054,11 @@ handle_rpl_parallel_thread(void *arg)
(rpt->current_owner && !in_event_group) ||
(rpt->current_owner && group_rgi->parallel_entry->force_abort) ||
rpt->stop))
+ {
+ if (!wait_count++)
+ thd->set_time_for_next_stage();
mysql_cond_wait(&rpt->COND_rpl_thread, &rpt->LOCK_rpl_thread);
+ }
rpt->dequeue1(events);
thd->EXIT_COND(&old_stage);
@@ -1736,7 +1769,7 @@ rpl_parallel_thread::get_rgi(Relay_log_info *rli, Gtid_log_event *gtid_ev,
rgi->relay_log= rli->last_inuse_relaylog;
rgi->retry_start_offset= rli->future_event_relay_log_pos-event_size;
rgi->retry_event_count= 0;
- rgi->killed_for_retry= false;
+ rgi->killed_for_retry= rpl_group_info::RETRY_KILL_NONE;
return rgi;
}
diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc
index c1a1c440922..de6e37aecaf 100644
--- a/sql/rpl_rli.cc
+++ b/sql/rpl_rli.cc
@@ -1939,8 +1939,8 @@ rpl_group_info::mark_start_commit_no_lock()
{
if (did_mark_start_commit)
return;
- mark_start_commit_inner(parallel_entry, gco, this);
did_mark_start_commit= true;
+ mark_start_commit_inner(parallel_entry, gco, this);
}
@@ -1951,12 +1951,12 @@ rpl_group_info::mark_start_commit()
if (did_mark_start_commit)
return;
+ did_mark_start_commit= true;
e= this->parallel_entry;
mysql_mutex_lock(&e->LOCK_parallel_entry);
mark_start_commit_inner(e, gco, this);
mysql_mutex_unlock(&e->LOCK_parallel_entry);
- did_mark_start_commit= true;
}
@@ -1999,12 +1999,12 @@ rpl_group_info::unmark_start_commit()
if (!did_mark_start_commit)
return;
+ did_mark_start_commit= false;
e= this->parallel_entry;
mysql_mutex_lock(&e->LOCK_parallel_entry);
--e->count_committing_event_groups;
mysql_mutex_unlock(&e->LOCK_parallel_entry);
- did_mark_start_commit= false;
}
diff --git a/sql/rpl_rli.h b/sql/rpl_rli.h
index c5b495cbc30..c8673db7f73 100644
--- a/sql/rpl_rli.h
+++ b/sql/rpl_rli.h
@@ -713,7 +713,12 @@ struct rpl_group_info
*/
SPECULATE_WAIT
} speculation;
- bool killed_for_retry;
+ enum enum_retry_killed {
+ RETRY_KILL_NONE = 0,
+ RETRY_KILL_PENDING,
+ RETRY_KILL_KILLED
+ };
+ uchar killed_for_retry;
rpl_group_info(Relay_log_info *rli_);
~rpl_group_info();
diff --git a/sql/session_tracker.cc b/sql/session_tracker.cc
new file mode 100644
index 00000000000..3272d2a41f0
--- /dev/null
+++ b/sql/session_tracker.cc
@@ -0,0 +1,1710 @@
+/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2016, 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-1301 USA */
+
+
+#ifndef EMBEDDED_LIBRARY
+#include "sql_plugin.h"
+#include "session_tracker.h"
+
+#include "hash.h"
+#include "table.h"
+#include "rpl_gtid.h"
+#include "sql_class.h"
+#include "sql_show.h"
+#include "sql_plugin.h"
+#include "set_var.h"
+
+void State_tracker::mark_as_changed(THD *thd, LEX_CSTRING *tracked_item_name)
+{
+ m_changed= true;
+ thd->lex->safe_to_cache_query= 0;
+ thd->server_status|= SERVER_SESSION_STATE_CHANGED;
+}
+
+
+class Not_implemented_tracker : public State_tracker
+{
+public:
+ bool enable(THD *thd)
+ { return false; }
+ bool update(THD *, set_var *)
+ { return false; }
+ bool store(THD *, String *)
+ { return false; }
+ void mark_as_changed(THD *, LEX_CSTRING *tracked_item_name)
+ {}
+
+};
+
+/**
+ Session_sysvars_tracker
+
+ This is a tracker class that enables & manages the tracking of session
+ system variables. It internally maintains a hash of user supplied variable
+ references and a boolean field to store if the variable was changed by the
+ last statement.
+*/
+
+class Session_sysvars_tracker : public State_tracker
+{
+private:
+
+ struct sysvar_node_st {
+ sys_var *m_svar;
+ bool *test_load;
+ bool m_changed;
+ };
+
+ class vars_list
+ {
+ private:
+ /**
+ Registered system variables. (@@session_track_system_variables)
+ A hash to store the name of all the system variables specified by the
+ user.
+ */
+ HASH m_registered_sysvars;
+ /** Size of buffer for string representation */
+ size_t buffer_length;
+ myf m_mem_flag;
+ /**
+ If TRUE then we want to check all session variable.
+ */
+ bool track_all;
+ void init()
+ {
+ my_hash_init(&m_registered_sysvars,
+ &my_charset_bin,
+ 4, 0, 0, (my_hash_get_key) sysvars_get_key,
+ my_free, MYF(HASH_UNIQUE |
+ ((m_mem_flag & MY_THREAD_SPECIFIC) ?
+ HASH_THREAD_SPECIFIC : 0)));
+ }
+ void free_hash()
+ {
+ if (my_hash_inited(&m_registered_sysvars))
+ {
+ my_hash_free(&m_registered_sysvars);
+ }
+ }
+
+ uchar* search(const sys_var *svar)
+ {
+ return (my_hash_search(&m_registered_sysvars, (const uchar *)&svar,
+ sizeof(sys_var *)));
+ }
+
+ public:
+ vars_list() :
+ buffer_length(0)
+ {
+ m_mem_flag= current_thd ? MY_THREAD_SPECIFIC : 0;
+ init();
+ }
+
+ size_t get_buffer_length()
+ {
+ DBUG_ASSERT(buffer_length != 0); // asked earlier then should
+ return buffer_length;
+ }
+ ~vars_list()
+ {
+ /* free the allocated hash. */
+ if (my_hash_inited(&m_registered_sysvars))
+ {
+ my_hash_free(&m_registered_sysvars);
+ }
+ }
+
+ uchar* insert_or_search(sysvar_node_st *node, const sys_var *svar)
+ {
+ uchar *res;
+ res= search(svar);
+ if (!res)
+ {
+ if (track_all)
+ {
+ insert(node, svar, m_mem_flag);
+ return search(svar);
+ }
+ }
+ return res;
+ }
+
+ bool insert(sysvar_node_st *node, const sys_var *svar, myf mem_flag);
+ void reinit();
+ void reset();
+ inline bool is_enabled()
+ {
+ return track_all || m_registered_sysvars.records;
+ }
+ void copy(vars_list* from, THD *thd);
+ bool parse_var_list(THD *thd, LEX_STRING var_list, bool throw_error,
+ CHARSET_INFO *char_set, bool take_mutex);
+ bool construct_var_list(char *buf, size_t buf_len);
+ bool store(THD *thd, String *buf);
+ };
+ /**
+ Two objects of vars_list type are maintained to manage
+ various operations.
+ */
+ vars_list *orig_list, *tool_list;
+
+public:
+ Session_sysvars_tracker()
+ {
+ orig_list= new (std::nothrow) vars_list();
+ tool_list= new (std::nothrow) vars_list();
+ }
+
+ ~Session_sysvars_tracker()
+ {
+ if (orig_list)
+ delete orig_list;
+ if (tool_list)
+ delete tool_list;
+ }
+
+ size_t get_buffer_length()
+ {
+ return orig_list->get_buffer_length();
+ }
+ bool construct_var_list(char *buf, size_t buf_len)
+ {
+ return orig_list->construct_var_list(buf, buf_len);
+ }
+
+ /**
+ Method used to check the validity of string provided
+ for session_track_system_variables during the server
+ startup.
+ */
+ static bool server_init_check(THD *thd, CHARSET_INFO *char_set,
+ LEX_STRING var_list)
+ {
+ return check_var_list(thd, var_list, false, char_set, false);
+ }
+
+ static bool server_init_process(THD *thd, CHARSET_INFO *char_set,
+ LEX_STRING var_list)
+ {
+ vars_list dummy;
+ bool result;
+ result= dummy.parse_var_list(thd, var_list, false, char_set, false);
+ if (!result)
+ dummy.construct_var_list(var_list.str, var_list.length + 1);
+ return result;
+ }
+
+ void reset();
+ bool enable(THD *thd);
+ bool check_str(THD *thd, LEX_STRING *val);
+ bool update(THD *thd, set_var *var);
+ bool store(THD *thd, String *buf);
+ void mark_as_changed(THD *thd, LEX_CSTRING *tracked_item_name);
+ /* callback */
+ static uchar *sysvars_get_key(const char *entry, size_t *length,
+ my_bool not_used __attribute__((unused)));
+
+ // hash iterators
+ static my_bool name_array_filler(void *ptr, void *data_ptr);
+ static my_bool store_variable(void *ptr, void *data_ptr);
+ static my_bool reset_variable(void *ptr, void *data_ptr);
+
+ static bool check_var_list(THD *thd, LEX_STRING var_list, bool throw_error,
+ CHARSET_INFO *char_set, bool take_mutex);
+};
+
+
+
+/**
+ Current_schema_tracker,
+
+ This is a tracker class that enables & manages the tracking of current
+ schema for a particular connection.
+*/
+
+class Current_schema_tracker : public State_tracker
+{
+private:
+ bool schema_track_inited;
+ void reset();
+
+public:
+
+ Current_schema_tracker()
+ {
+ schema_track_inited= false;
+ }
+
+ bool enable(THD *thd)
+ { return update(thd, NULL); }
+ bool update(THD *thd, set_var *var);
+ bool store(THD *thd, String *buf);
+};
+
+/*
+ Session_state_change_tracker
+
+ This is a boolean tracker class that will monitor any change that contributes
+ to a session state change.
+ Attributes that contribute to session state change include:
+ - Successful change to System variables
+ - User defined variables assignments
+ - temporary tables created, altered or deleted
+ - prepared statements added or removed
+ - change in current database
+ - change of current role
+*/
+
+class Session_state_change_tracker : public State_tracker
+{
+private:
+
+ void reset();
+
+public:
+ Session_state_change_tracker();
+ bool enable(THD *thd)
+ { return update(thd, NULL); };
+ bool update(THD *thd, set_var *var);
+ bool store(THD *thd, String *buf);
+ bool is_state_changed(THD*);
+};
+
+
+/* To be used in expanding the buffer. */
+static const unsigned int EXTRA_ALLOC= 1024;
+
+
+void Session_sysvars_tracker::vars_list::reinit()
+{
+ buffer_length= 0;
+ track_all= 0;
+ if (m_registered_sysvars.records)
+ my_hash_reset(&m_registered_sysvars);
+}
+
+/**
+ Copy the given list.
+
+ @param from Source vars_list object.
+ @param thd THD handle to retrive the charset in use.
+
+ @retval true there is something to track
+ @retval false nothing to track
+*/
+
+void Session_sysvars_tracker::vars_list::copy(vars_list* from, THD *thd)
+{
+ reinit();
+ track_all= from->track_all;
+ free_hash();
+ buffer_length= from->buffer_length;
+ m_registered_sysvars= from->m_registered_sysvars;
+ from->init();
+}
+
+/**
+ Inserts the variable to be tracked into m_registered_sysvars hash.
+
+ @param node Node to be inserted.
+ @param svar address of the system variable
+
+ @retval false success
+ @retval true error
+*/
+
+bool Session_sysvars_tracker::vars_list::insert(sysvar_node_st *node,
+ const sys_var *svar,
+ myf mem_flag)
+{
+ if (!node)
+ {
+ if (!(node= (sysvar_node_st *) my_malloc(sizeof(sysvar_node_st),
+ MYF(MY_WME | mem_flag))))
+ {
+ reinit();
+ return true;
+ }
+ }
+
+ node->m_svar= (sys_var *)svar;
+ node->test_load= node->m_svar->test_load;
+ node->m_changed= false;
+ if (my_hash_insert(&m_registered_sysvars, (uchar *) node))
+ {
+ my_free(node);
+ if (!search((sys_var *)svar))
+ {
+ //EOF (error is already reported)
+ reinit();
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ Parse the specified system variables list.
+
+ @Note In case of invalid entry a warning is raised per invalid entry.
+ This is done in order to handle 'potentially' valid system
+ variables from uninstalled plugins which might get installed in
+ future.
+
+
+ @param thd [IN] The thd handle.
+ @param var_list [IN] System variable list.
+ @param throw_error [IN] bool when set to true, returns an error
+ in case of invalid/duplicate values.
+ @param char_set [IN] charecter set information used for string
+ manipulations.
+ @param take_mutex [IN] take LOCK_plugin
+
+ @return
+ true Error
+ false Success
+*/
+bool Session_sysvars_tracker::vars_list::parse_var_list(THD *thd,
+ LEX_STRING var_list,
+ bool throw_error,
+ CHARSET_INFO *char_set,
+ bool take_mutex)
+{
+ const char separator= ',';
+ char *token, *lasts= NULL;
+ size_t rest= var_list.length;
+ reinit();
+
+ if (!var_list.str || var_list.length == 0)
+ {
+ buffer_length= 1;
+ return false;
+ }
+
+ if(!strcmp(var_list.str,(const char *)"*"))
+ {
+ track_all= true;
+ buffer_length= 2;
+ return false;
+ }
+
+ buffer_length= var_list.length + 1;
+ token= var_list.str;
+
+ track_all= false;
+ /*
+ If Lock to the plugin mutex is not acquired here itself, it results
+ in having to acquire it multiple times in find_sys_var_ex for each
+ token value. Hence the mutex is handled here to avoid a performance
+ overhead.
+ */
+ if (!thd || take_mutex)
+ mysql_mutex_lock(&LOCK_plugin);
+ for (;;)
+ {
+ sys_var *svar;
+ LEX_STRING var;
+
+ lasts= (char *) memchr(token, separator, rest);
+
+ var.str= token;
+ if (lasts)
+ {
+ var.length= (lasts - token);
+ rest-= var.length + 1;
+ }
+ else
+ var.length= rest;
+
+ /* Remove leading/trailing whitespace. */
+ trim_whitespace(char_set, &var);
+
+ if(!strcmp(var.str,(const char *)"*"))
+ {
+ track_all= true;
+ }
+ else if ((svar=
+ find_sys_var_ex(thd, var.str, var.length, throw_error, true)))
+ {
+ if (insert(NULL, svar, m_mem_flag) == TRUE)
+ goto error;
+ }
+ else if (throw_error && thd)
+ {
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_WRONG_VALUE_FOR_VAR,
+ "%.*s is not a valid system variable and will"
+ "be ignored.", (int)var.length, token);
+ }
+ else
+ goto error;
+
+ if (lasts)
+ token= lasts + 1;
+ else
+ break;
+ }
+ if (!thd || take_mutex)
+ mysql_mutex_unlock(&LOCK_plugin);
+
+ return false;
+
+error:
+ if (!thd || take_mutex)
+ mysql_mutex_unlock(&LOCK_plugin);
+ return true;
+}
+
+
+bool Session_sysvars_tracker::check_var_list(THD *thd,
+ LEX_STRING var_list,
+ bool throw_error,
+ CHARSET_INFO *char_set,
+ bool take_mutex)
+{
+ const char separator= ',';
+ char *token, *lasts= NULL;
+ size_t rest= var_list.length;
+
+ if (!var_list.str || var_list.length == 0 ||
+ !strcmp(var_list.str,(const char *)"*"))
+ {
+ return false;
+ }
+
+ token= var_list.str;
+
+ /*
+ If Lock to the plugin mutex is not acquired here itself, it results
+ in having to acquire it multiple times in find_sys_var_ex for each
+ token value. Hence the mutex is handled here to avoid a performance
+ overhead.
+ */
+ if (!thd || take_mutex)
+ mysql_mutex_lock(&LOCK_plugin);
+ for (;;)
+ {
+ LEX_STRING var;
+
+ lasts= (char *) memchr(token, separator, rest);
+
+ var.str= token;
+ if (lasts)
+ {
+ var.length= (lasts - token);
+ rest-= var.length + 1;
+ }
+ else
+ var.length= rest;
+
+ /* Remove leading/trailing whitespace. */
+ trim_whitespace(char_set, &var);
+
+ if(!strcmp(var.str,(const char *)"*") &&
+ !find_sys_var_ex(thd, var.str, var.length, throw_error, true))
+ {
+ if (throw_error && take_mutex && thd)
+ {
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_WRONG_VALUE_FOR_VAR,
+ "%.*s is not a valid system variable and will"
+ "be ignored.", (int)var.length, token);
+ }
+ else
+ {
+ if (!thd || take_mutex)
+ mysql_mutex_unlock(&LOCK_plugin);
+ return true;
+ }
+ }
+
+ if (lasts)
+ token= lasts + 1;
+ else
+ break;
+ }
+ if (!thd || take_mutex)
+ mysql_mutex_unlock(&LOCK_plugin);
+
+ return false;
+}
+
+struct name_array_filler_data
+{
+ LEX_CSTRING **names;
+ uint idx;
+
+};
+
+/** Collects variable references into array */
+my_bool Session_sysvars_tracker::name_array_filler(void *ptr,
+ void *data_ptr)
+{
+ Session_sysvars_tracker::sysvar_node_st *node=
+ (Session_sysvars_tracker::sysvar_node_st *)ptr;
+ name_array_filler_data *data= (struct name_array_filler_data *)data_ptr;
+ if (*node->test_load)
+ data->names[data->idx++]= &node->m_svar->name;
+ return FALSE;
+}
+
+/* Sorts variable references array */
+static int name_array_sorter(const void *a, const void *b)
+{
+ LEX_CSTRING **an= (LEX_CSTRING **)a, **bn=(LEX_CSTRING **)b;
+ size_t min= MY_MIN((*an)->length, (*bn)->length);
+ int res= strncmp((*an)->str, (*bn)->str, min);
+ if (res == 0)
+ res= ((int)(*bn)->length)- ((int)(*an)->length);
+ return res;
+}
+
+/**
+ Construct variable list by internal hash with references
+*/
+
+bool Session_sysvars_tracker::vars_list::construct_var_list(char *buf,
+ size_t buf_len)
+{
+ struct name_array_filler_data data;
+ size_t left= buf_len;
+ size_t names_size= m_registered_sysvars.records * sizeof(LEX_CSTRING *);
+ const char separator= ',';
+
+ if (unlikely(buf_len < 1))
+ return true;
+
+ if (unlikely(track_all))
+ {
+ if (buf_len < 2)
+ return true;
+ buf[0]= '*';
+ buf[1]= '\0';
+ return false;
+ }
+
+ if (m_registered_sysvars.records == 0)
+ {
+ buf[0]= '\0';
+ return false;
+ }
+
+ data.names= (LEX_CSTRING**)my_safe_alloca(names_size);
+
+ if (unlikely(!data.names))
+ return true;
+
+ data.idx= 0;
+
+ mysql_mutex_lock(&LOCK_plugin);
+ my_hash_iterate(&m_registered_sysvars, &name_array_filler, &data);
+ DBUG_ASSERT(data.idx <= m_registered_sysvars.records);
+
+ /*
+ We check number of records again here because number of variables
+ could be reduced in case of plugin unload.
+ */
+ if (m_registered_sysvars.records == 0)
+ {
+ mysql_mutex_unlock(&LOCK_plugin);
+ buf[0]= '\0';
+ return false;
+ }
+
+ my_qsort(data.names, data.idx, sizeof(LEX_CSTRING *),
+ &name_array_sorter);
+
+ for(uint i= 0; i < data.idx; i++)
+ {
+ LEX_CSTRING *nm= data.names[i];
+ size_t ln= nm->length + 1;
+ if (ln > left)
+ {
+ mysql_mutex_unlock(&LOCK_plugin);
+ my_safe_afree(data.names, names_size);
+ return true;
+ }
+ memcpy(buf, nm->str, nm->length);
+ buf[nm->length]= separator;
+ buf+= ln;
+ left-= ln;
+ }
+ mysql_mutex_unlock(&LOCK_plugin);
+
+ buf--; buf[0]= '\0';
+ my_safe_afree(data.names, names_size);
+
+ return false;
+}
+
+/**
+ Enable session tracker by parsing global value of tracked variables.
+
+ @param thd [IN] The thd handle.
+
+ @retval true Error
+ @retval false Success
+*/
+
+bool Session_sysvars_tracker::enable(THD *thd)
+{
+ mysql_mutex_lock(&LOCK_plugin);
+ LEX_STRING tmp;
+ tmp.str= global_system_variables.session_track_system_variables;
+ tmp.length= safe_strlen(tmp.str);
+ if (tool_list->parse_var_list(thd, tmp,
+ true, thd->charset(), false) == true)
+ {
+ mysql_mutex_unlock(&LOCK_plugin);
+ return true;
+ }
+ mysql_mutex_unlock(&LOCK_plugin);
+ orig_list->copy(tool_list, thd);
+ m_enabled= true;
+
+ return false;
+}
+
+
+/**
+ Check system variable name(s).
+
+ @note This function is called from the ON_CHECK() function of the
+ session_track_system_variables' sys_var class.
+
+ @param thd [IN] The thd handle.
+ @param var [IN] A pointer to set_var holding the specified list of
+ system variable names.
+
+ @retval true Error
+ @retval false Success
+*/
+
+inline bool Session_sysvars_tracker::check_str(THD *thd, LEX_STRING *val)
+{
+ return Session_sysvars_tracker::check_var_list(thd, *val, true,
+ thd->charset(), true);
+}
+
+
+/**
+ Once the value of the @@session_track_system_variables has been
+ successfully updated, this function calls
+ Session_sysvars_tracker::vars_list::copy updating the hash in orig_list
+ which represents the system variables to be tracked.
+
+ @note This function is called from the ON_UPDATE() function of the
+ session_track_system_variables' sys_var class.
+
+ @param thd [IN] The thd handle.
+
+ @retval true Error
+ @retval false Success
+*/
+
+bool Session_sysvars_tracker::update(THD *thd, set_var *var)
+{
+ /*
+ We are doing via tool list because there possible errors with memory
+ in this case value will be unchanged.
+ */
+ tool_list->reinit();
+ if (tool_list->parse_var_list(thd, var->save_result.string_value, true,
+ thd->charset(), true))
+ return true;
+ orig_list->copy(tool_list, thd);
+ return false;
+}
+
+
+/*
+ Function and structure to support storing variables from hash to the buffer.
+*/
+
+struct st_store_variable_param
+{
+ THD *thd;
+ String *buf;
+};
+
+my_bool Session_sysvars_tracker::store_variable(void *ptr, void *data_ptr)
+{
+ Session_sysvars_tracker::sysvar_node_st *node=
+ (Session_sysvars_tracker::sysvar_node_st *)ptr;
+ if (node->m_changed)
+ {
+ THD *thd= ((st_store_variable_param *)data_ptr)->thd;
+ String *buf= ((st_store_variable_param *)data_ptr)->buf;
+ char val_buf[SHOW_VAR_FUNC_BUFF_SIZE];
+ SHOW_VAR show;
+ CHARSET_INFO *charset;
+ size_t val_length, length;
+ mysql_mutex_lock(&LOCK_plugin);
+ if (!*node->test_load)
+ {
+ mysql_mutex_unlock(&LOCK_plugin);
+ return false;
+ }
+ sys_var *svar= node->m_svar;
+ bool is_plugin= svar->cast_pluginvar();
+ if (!is_plugin)
+ mysql_mutex_unlock(&LOCK_plugin);
+
+ /* As its always system variable. */
+ show.type= SHOW_SYS;
+ show.name= svar->name.str;
+ show.value= (char *) svar;
+
+ const char *value= get_one_variable(thd, &show, OPT_SESSION, SHOW_SYS, NULL,
+ &charset, val_buf, &val_length);
+ if (is_plugin)
+ mysql_mutex_unlock(&LOCK_plugin);
+
+ length= net_length_size(svar->name.length) +
+ svar->name.length +
+ net_length_size(val_length) +
+ val_length;
+
+ compile_time_assert(SESSION_TRACK_SYSTEM_VARIABLES < 251);
+ if (unlikely((1 + net_length_size(length) + length + buf->length() >=
+ MAX_PACKET_LENGTH) ||
+ buf->reserve(1 + net_length_size(length) + length,
+ EXTRA_ALLOC)))
+ return true;
+
+
+ /* Session state type (SESSION_TRACK_SYSTEM_VARIABLES) */
+ buf->q_append((char)SESSION_TRACK_SYSTEM_VARIABLES);
+
+ /* Length of the overall entity. */
+ buf->q_net_store_length((ulonglong)length);
+
+ /* System variable's name (length-encoded string). */
+ buf->q_net_store_data((const uchar*)svar->name.str, svar->name.length);
+
+ /* System variable's value (length-encoded string). */
+ buf->q_net_store_data((const uchar*)value, val_length);
+ }
+ return false;
+}
+
+bool Session_sysvars_tracker::vars_list::store(THD *thd, String *buf)
+{
+ st_store_variable_param data= {thd, buf};
+ return my_hash_iterate(&m_registered_sysvars, &store_variable, &data);
+}
+
+/**
+ Store the data for changed system variables in the specified buffer.
+ Once the data is stored, we reset the flags related to state-change
+ (see reset()).
+
+ @param thd [IN] The thd handle.
+ @paran buf [INOUT] Buffer to store the information to.
+
+ @retval true Error
+ @retval false Success
+*/
+
+bool Session_sysvars_tracker::store(THD *thd, String *buf)
+{
+ if (!orig_list->is_enabled())
+ return false;
+
+ if (orig_list->store(thd, buf))
+ return true;
+
+ reset();
+
+ return false;
+}
+
+
+/**
+ Mark the system variable as changed.
+
+ @param [IN] pointer on a variable
+*/
+
+void Session_sysvars_tracker::mark_as_changed(THD *thd,
+ LEX_CSTRING *var)
+{
+ sysvar_node_st *node= NULL;
+ sys_var *svar= (sys_var *)var;
+ /*
+ Check if the specified system variable is being tracked, if so
+ mark it as changed and also set the class's m_changed flag.
+ */
+ if (orig_list->is_enabled() &&
+ (node= (sysvar_node_st *) (orig_list->insert_or_search(node, svar))))
+ {
+ node->m_changed= true;
+ State_tracker::mark_as_changed(thd, var);
+ }
+}
+
+
+/**
+ Supply key to a hash.
+
+ @param entry [IN] A single entry.
+ @param length [OUT] Length of the key.
+ @param not_used Unused.
+
+ @return Pointer to the key buffer.
+*/
+
+uchar *Session_sysvars_tracker::sysvars_get_key(const char *entry,
+ size_t *length,
+ my_bool not_used __attribute__((unused)))
+{
+ *length= sizeof(sys_var *);
+ return (uchar *) &(((sysvar_node_st *) entry)->m_svar);
+}
+
+
+/* Function to support resetting hash nodes for the variables */
+
+my_bool Session_sysvars_tracker::reset_variable(void *ptr,
+ void *data_ptr)
+{
+ ((Session_sysvars_tracker::sysvar_node_st *)ptr)->m_changed= false;
+ return false;
+}
+
+void Session_sysvars_tracker::vars_list::reset()
+{
+ my_hash_iterate(&m_registered_sysvars, &reset_variable, NULL);
+}
+
+/**
+ Prepare/reset the m_registered_sysvars hash for next statement.
+*/
+
+void Session_sysvars_tracker::reset()
+{
+
+ orig_list->reset();
+ m_changed= false;
+}
+
+static Session_sysvars_tracker* sysvar_tracker(THD *thd)
+{
+ return (Session_sysvars_tracker*)
+ thd->session_tracker.get_tracker(SESSION_SYSVARS_TRACKER);
+}
+
+bool sysvartrack_validate_value(THD *thd, const char *str, size_t len)
+{
+ LEX_STRING tmp= {(char *)str, len};
+ return Session_sysvars_tracker::server_init_check(thd, system_charset_info,
+ tmp);
+}
+bool sysvartrack_reprint_value(THD *thd, char *str, size_t len)
+{
+ LEX_STRING tmp= {str, len};
+ return Session_sysvars_tracker::server_init_process(thd,
+ system_charset_info,
+ tmp);
+}
+bool sysvartrack_update(THD *thd, set_var *var)
+{
+ return sysvar_tracker(thd)->update(thd, var);
+}
+size_t sysvartrack_value_len(THD *thd)
+{
+ return sysvar_tracker(thd)->get_buffer_length();
+}
+bool sysvartrack_value_construct(THD *thd, char *val, size_t len)
+{
+ return sysvar_tracker(thd)->construct_var_list(val, len);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+/**
+ Enable/disable the tracker based on @@session_track_schema's value.
+
+ @param thd [IN] The thd handle.
+
+ @return
+ false (always)
+*/
+
+bool Current_schema_tracker::update(THD *thd, set_var *)
+{
+ m_enabled= thd->variables.session_track_schema;
+ return false;
+}
+
+
+/**
+ Store the schema name as length-encoded string in the specified buffer.
+
+ @param thd [IN] The thd handle.
+ @paran buf [INOUT] Buffer to store the information to.
+
+ @reval false Success
+ @retval true Error
+*/
+
+bool Current_schema_tracker::store(THD *thd, String *buf)
+{
+ ulonglong db_length, length;
+
+ /*
+ Protocol made (by unknown reasons) redundant:
+ It saves length of database name and name of database name +
+ length of saved length of database length.
+ */
+ length= db_length= thd->db_length;
+ length += net_length_size(length);
+
+ compile_time_assert(SESSION_TRACK_SCHEMA < 251);
+ compile_time_assert(NAME_LEN < 251);
+ DBUG_ASSERT(length < 251);
+ if (unlikely((1 + 1 + length + buf->length() >= MAX_PACKET_LENGTH) ||
+ buf->reserve(1 + 1 + length, EXTRA_ALLOC)))
+ return true;
+
+ /* Session state type (SESSION_TRACK_SCHEMA) */
+ buf->q_append((char)SESSION_TRACK_SCHEMA);
+
+ /* Length of the overall entity. */
+ buf->q_net_store_length(length);
+
+ /* Length and current schema name */
+ buf->q_net_store_data((const uchar *)thd->db, thd->db_length);
+
+ reset();
+
+ return false;
+}
+
+
+/**
+ Reset the m_changed flag for next statement.
+
+ @return void
+*/
+
+void Current_schema_tracker::reset()
+{
+ m_changed= false;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+
+
+Transaction_state_tracker::Transaction_state_tracker()
+{
+ m_enabled = false;
+ tx_changed = TX_CHG_NONE;
+ tx_curr_state =
+ tx_reported_state= TX_EMPTY;
+ tx_read_flags = TX_READ_INHERIT;
+ tx_isol_level = TX_ISOL_INHERIT;
+}
+
+/**
+ Enable/disable the tracker based on @@session_track_transaction_info.
+
+ @param thd [IN] The thd handle.
+
+ @retval true if updating the tracking level failed
+ @retval false otherwise
+*/
+
+bool Transaction_state_tracker::update(THD *thd, set_var *)
+{
+ if (thd->variables.session_track_transaction_info != TX_TRACK_NONE)
+ {
+ /*
+ If we only just turned reporting on (rather than changing between
+ state and characteristics reporting), start from a defined state.
+ */
+ if (!m_enabled)
+ {
+ tx_curr_state =
+ tx_reported_state = TX_EMPTY;
+ tx_changed |= TX_CHG_STATE;
+ m_enabled= true;
+ }
+ if (thd->variables.session_track_transaction_info == TX_TRACK_CHISTICS)
+ tx_changed |= TX_CHG_CHISTICS;
+ mark_as_changed(thd, NULL);
+ }
+ else
+ m_enabled= false;
+
+ return false;
+}
+
+
+/**
+ Store the transaction state (and, optionally, characteristics)
+ as length-encoded string in the specified buffer. Once the data
+ is stored, we reset the flags related to state-change (see reset()).
+
+
+ @param thd [IN] The thd handle.
+ @paran buf [INOUT] Buffer to store the information to.
+
+ @retval false Success
+ @retval true Error
+*/
+
+static LEX_CSTRING isol[]= {
+ { STRING_WITH_LEN("READ UNCOMMITTED") },
+ { STRING_WITH_LEN("READ COMMITTED") },
+ { STRING_WITH_LEN("REPEATABLE READ") },
+ { STRING_WITH_LEN("SERIALIZABLE") }
+};
+
+bool Transaction_state_tracker::store(THD *thd, String *buf)
+{
+ /* STATE */
+ if (tx_changed & TX_CHG_STATE)
+ {
+ if (unlikely((11 + buf->length() >= MAX_PACKET_LENGTH) ||
+ buf->reserve(11, EXTRA_ALLOC)))
+ return true;
+
+ buf->q_append((char)SESSION_TRACK_TRANSACTION_STATE);
+
+ buf->q_append((char)9); // whole packet length
+ buf->q_append((char)8); // results length
+
+ buf->q_append((char)((tx_curr_state & TX_EXPLICIT) ? 'T' :
+ ((tx_curr_state & TX_IMPLICIT) ? 'I' : '_')));
+ buf->q_append((char)((tx_curr_state & TX_READ_UNSAFE) ? 'r' : '_'));
+ buf->q_append((char)(((tx_curr_state & TX_READ_TRX) ||
+ (tx_curr_state & TX_WITH_SNAPSHOT)) ? 'R' : '_'));
+ buf->q_append((char)((tx_curr_state & TX_WRITE_UNSAFE) ? 'w' : '_'));
+ buf->q_append((char)((tx_curr_state & TX_WRITE_TRX) ? 'W' : '_'));
+ buf->q_append((char)((tx_curr_state & TX_STMT_UNSAFE) ? 's' : '_'));
+ buf->q_append((char)((tx_curr_state & TX_RESULT_SET) ? 'S' : '_'));
+ buf->q_append((char)((tx_curr_state & TX_LOCKED_TABLES) ? 'L' : '_'));
+ }
+
+ /* CHARACTERISTICS -- How to restart the transaction */
+
+ if ((thd->variables.session_track_transaction_info == TX_TRACK_CHISTICS) &&
+ (tx_changed & TX_CHG_CHISTICS))
+ {
+ bool is_xa= (thd->transaction.xid_state.xa_state != XA_NOTR);
+ size_t start;
+
+ /* 2 length by 1 byte and code */
+ if (unlikely((1 + 1 + 1 + 110 + buf->length() >= MAX_PACKET_LENGTH) ||
+ buf->reserve(1 + 1 + 1, EXTRA_ALLOC)))
+ return true;
+
+ compile_time_assert(SESSION_TRACK_TRANSACTION_CHARACTERISTICS < 251);
+ /* Session state type (SESSION_TRACK_TRANSACTION_CHARACTERISTICS) */
+ buf->q_append((char)SESSION_TRACK_TRANSACTION_CHARACTERISTICS);
+
+ /* placeholders for lengths. will be filled in at the end */
+ buf->q_append('\0');
+ buf->q_append('\0');
+
+ start= buf->length();
+
+ {
+ /*
+ We have four basic replay scenarios:
+
+ a) SET TRANSACTION was used, but before an actual transaction
+ was started, the load balancer moves the connection elsewhere.
+ In that case, the same one-shots should be set up in the
+ target session. (read-only/read-write; isolation-level)
+
+ b) The initial transaction has begun; the relevant characteristics
+ are the session defaults, possibly overridden by previous
+ SET TRANSACTION statements, possibly overridden or extended
+ by options passed to the START TRANSACTION statement.
+ If the load balancer wishes to move this transaction,
+ it needs to be replayed with the correct characteristics.
+ (read-only/read-write from SET or START;
+ isolation-level from SET only, snapshot from START only)
+
+ c) A subsequent transaction started with START TRANSACTION
+ (which is legal syntax in lieu of COMMIT AND CHAIN in MySQL)
+ may add/modify the current one-shots:
+
+ - It may set up a read-only/read-write one-shot.
+ This one-shot will override the value used in the previous
+ transaction (whether that came from the default or a one-shot),
+ and, like all one-shots currently do, it will carry over into
+ any subsequent transactions that don't explicitly override them
+ in turn. This behavior is not guaranteed in the docs and may
+ change in the future, but the tracker item should correctly
+ reflect whatever behavior a given version of mysqld implements.
+
+ - It may also set up a WITH CONSISTENT SNAPSHOT one-shot.
+ This one-shot does not currently carry over into subsequent
+ transactions (meaning that with "traditional syntax", WITH
+ CONSISTENT SNAPSHOT can only be requested for the first part
+ of a transaction chain). Again, the tracker item should reflect
+ mysqld behavior.
+
+ d) A subsequent transaction started using COMMIT AND CHAIN
+ (or, for that matter, BEGIN WORK, which is currently
+ legal and equivalent syntax in MySQL, or START TRANSACTION
+ sans options) will re-use any one-shots set up so far
+ (with SET before the first transaction started, and with
+ all subsequent STARTs), except for WITH CONSISTANT SNAPSHOT,
+ which will never be chained and only applies when explicitly
+ given.
+
+ It bears noting that if we switch sessions in a follow-up
+ transaction, SET TRANSACTION would be illegal in the old
+ session (as a transaction is active), whereas in the target
+ session which is being prepared, it should be legal, as no
+ transaction (chain) should have started yet.
+
+ Therefore, we are free to generate SET TRANSACTION as a replay
+ statement even for a transaction that isn't the first in an
+ ongoing chain. Consider
+
+ SET TRANSACTION ISOLATION LEVEL READ UNCOMMITED;
+ START TRANSACTION READ ONLY, WITH CONSISTENT SNAPSHOT;
+ # work
+ COMMIT AND CHAIN;
+
+ If we switch away at this point, the replay in the new session
+ needs to be
+
+ SET TRANSACTION ISOLATION LEVEL READ UNCOMMITED;
+ START TRANSACTION READ ONLY;
+
+ When a transaction ends (COMMIT/ROLLBACK sans CHAIN), all
+ per-transaction characteristics are reset to the session's
+ defaults.
+
+ This also holds for a transaction ended implicitly! (transaction.cc)
+ Once again, the aim is to have the tracker item reflect on a
+ given mysqld's actual behavior.
+ */
+
+ /*
+ "ISOLATION LEVEL"
+ Only legal in SET TRANSACTION, so will always be replayed as such.
+ */
+ if (tx_isol_level != TX_ISOL_INHERIT)
+ {
+ /*
+ Unfortunately, we can't re-use tx_isolation_names /
+ tx_isolation_typelib as it hyphenates its items.
+ */
+ buf->append(STRING_WITH_LEN("SET TRANSACTION ISOLATION LEVEL "));
+ buf->append(isol[tx_isol_level - 1].str, isol[tx_isol_level - 1].length);
+ buf->append(STRING_WITH_LEN("; "));
+ }
+
+ /*
+ Start transaction will usually result in TX_EXPLICIT (transaction
+ started, but no data attached yet), except when WITH CONSISTENT
+ SNAPSHOT, in which case we may have data pending.
+ If it's an XA transaction, we don't go through here so we can
+ first print the trx access mode ("SET TRANSACTION READ ...")
+ separately before adding XA START (whereas with START TRANSACTION,
+ we can merge the access mode into the same statement).
+ */
+ if ((tx_curr_state & TX_EXPLICIT) && !is_xa)
+ {
+ buf->append(STRING_WITH_LEN("START TRANSACTION"));
+
+ /*
+ "WITH CONSISTENT SNAPSHOT"
+ Defaults to no, can only be enabled.
+ Only appears in START TRANSACTION.
+ */
+ if (tx_curr_state & TX_WITH_SNAPSHOT)
+ {
+ buf->append(STRING_WITH_LEN(" WITH CONSISTENT SNAPSHOT"));
+ if (tx_read_flags != TX_READ_INHERIT)
+ buf->append(STRING_WITH_LEN(","));
+ }
+
+ /*
+ "READ WRITE / READ ONLY" can be set globally, per-session,
+ or just for one transaction.
+
+ The latter case can take the form of
+ START TRANSACTION READ (WRITE|ONLY), or of
+ SET TRANSACTION READ (ONLY|WRITE).
+ (Both set thd->read_only for the upcoming transaction;
+ it will ultimately be re-set to the session default.)
+
+ As the regular session-variable tracker does not monitor the one-shot,
+ we'll have to do it here.
+
+ If READ is flagged as set explicitly (rather than just inherited
+ from the session's default), we'll get the actual bool from the THD.
+ */
+ if (tx_read_flags != TX_READ_INHERIT)
+ {
+ if (tx_read_flags == TX_READ_ONLY)
+ buf->append(STRING_WITH_LEN(" READ ONLY"));
+ else
+ buf->append(STRING_WITH_LEN(" READ WRITE"));
+ }
+ buf->append(STRING_WITH_LEN("; "));
+ }
+ else if (tx_read_flags != TX_READ_INHERIT)
+ {
+ /*
+ "READ ONLY" / "READ WRITE"
+ We could transform this to SET TRANSACTION even when it occurs
+ in START TRANSACTION, but for now, we'll resysynthesize the original
+ command as closely as possible.
+ */
+ buf->append(STRING_WITH_LEN("SET TRANSACTION "));
+ if (tx_read_flags == TX_READ_ONLY)
+ buf->append(STRING_WITH_LEN("READ ONLY; "));
+ else
+ buf->append(STRING_WITH_LEN("READ WRITE; "));
+ }
+
+ if ((tx_curr_state & TX_EXPLICIT) && is_xa)
+ {
+ XID *xid= &thd->transaction.xid_state.xid;
+ long glen, blen;
+
+ buf->append(STRING_WITH_LEN("XA START"));
+
+ if ((glen= xid->gtrid_length) > 0)
+ {
+ buf->append(STRING_WITH_LEN(" '"));
+ buf->append(xid->data, glen);
+
+ if ((blen= xid->bqual_length) > 0)
+ {
+ buf->append(STRING_WITH_LEN("','"));
+ buf->append(xid->data + glen, blen);
+ }
+ buf->append(STRING_WITH_LEN("'"));
+
+ if (xid->formatID != 1)
+ {
+ buf->append(STRING_WITH_LEN(","));
+ buf->append_ulonglong(xid->formatID);
+ }
+ }
+
+ buf->append(STRING_WITH_LEN("; "));
+ }
+
+ // discard trailing space
+ if (buf->length() > start)
+ buf->length(buf->length() - 1);
+ }
+
+ {
+ ulonglong length= buf->length() - start;
+ uchar *place= (uchar *)(buf->ptr() + (start - 2));
+ DBUG_ASSERT(length < 249); // in fact < 110
+ DBUG_ASSERT(start >= 3);
+
+ DBUG_ASSERT((place - 1)[0] == SESSION_TRACK_TRANSACTION_CHARACTERISTICS);
+ /* Length of the overall entity. */
+ place[0]= length + 1;
+ /* Transaction characteristics (length-encoded string). */
+ place[1]= length;
+ }
+ }
+
+ reset();
+
+ return false;
+}
+
+
+/**
+ Reset the m_changed flag for next statement.
+*/
+
+void Transaction_state_tracker::reset()
+{
+ m_changed= false;
+ tx_reported_state= tx_curr_state;
+ tx_changed= TX_CHG_NONE;
+}
+
+
+/**
+ Helper function: turn table info into table access flag.
+ Accepts table lock type and engine type flag (transactional/
+ non-transactional), and returns the corresponding access flag
+ out of TX_READ_TRX, TX_READ_UNSAFE, TX_WRITE_TRX, TX_WRITE_UNSAFE.
+
+ @param thd [IN] The thd handle
+ @param set [IN] The table's access/lock type
+ @param set [IN] Whether the table's engine is transactional
+
+ @return The table access flag
+*/
+
+enum_tx_state Transaction_state_tracker::calc_trx_state(THD *thd,
+ thr_lock_type l,
+ bool has_trx)
+{
+ enum_tx_state s;
+ bool read= (l <= TL_READ_NO_INSERT);
+
+ if (read)
+ s= has_trx ? TX_READ_TRX : TX_READ_UNSAFE;
+ else
+ s= has_trx ? TX_WRITE_TRX : TX_WRITE_UNSAFE;
+
+ return s;
+}
+
+
+/**
+ Register the end of an (implicit or explicit) transaction.
+
+ @param thd [IN] The thd handle
+*/
+void Transaction_state_tracker::end_trx(THD *thd)
+{
+ DBUG_ASSERT(thd->variables.session_track_transaction_info > TX_TRACK_NONE);
+
+ if ((!m_enabled) || (thd->state_flags & Open_tables_state::BACKUPS_AVAIL))
+ return;
+
+ if (tx_curr_state != TX_EMPTY)
+ {
+ if (tx_curr_state & TX_EXPLICIT)
+ tx_changed |= TX_CHG_CHISTICS;
+ tx_curr_state &= TX_LOCKED_TABLES;
+ }
+ update_change_flags(thd);
+}
+
+
+/**
+ Clear flags pertaining to the current statement or transaction.
+ May be called repeatedly within the same execution cycle.
+
+ @param thd [IN] The thd handle.
+ @param set [IN] The flags to clear
+*/
+
+void Transaction_state_tracker::clear_trx_state(THD *thd, uint clear)
+{
+ if ((!m_enabled) || (thd->state_flags & Open_tables_state::BACKUPS_AVAIL))
+ return;
+
+ tx_curr_state &= ~clear;
+ update_change_flags(thd);
+}
+
+
+/**
+ Add flags pertaining to the current statement or transaction.
+ May be called repeatedly within the same execution cycle,
+ e.g. to add access info for more tables.
+
+ @param thd [IN] The thd handle.
+ @param set [IN] The flags to add
+*/
+
+void Transaction_state_tracker::add_trx_state(THD *thd, uint add)
+{
+ if ((!m_enabled) || (thd->state_flags & Open_tables_state::BACKUPS_AVAIL))
+ return;
+
+ if (add == TX_EXPLICIT)
+ {
+ /* Always send characteristic item (if tracked), always replace state. */
+ tx_changed |= TX_CHG_CHISTICS;
+ tx_curr_state = TX_EXPLICIT;
+ }
+
+ /*
+ If we're not in an implicit or explicit transaction, but
+ autocommit==0 and tables are accessed, we flag "implicit transaction."
+ */
+ else if (!(tx_curr_state & (TX_EXPLICIT|TX_IMPLICIT)) &&
+ (thd->variables.option_bits & OPTION_NOT_AUTOCOMMIT) &&
+ (add &
+ (TX_READ_TRX | TX_READ_UNSAFE | TX_WRITE_TRX | TX_WRITE_UNSAFE)))
+ tx_curr_state |= TX_IMPLICIT;
+
+ /*
+ Only flag state when in transaction or LOCK TABLES is added.
+ */
+ if ((tx_curr_state & (TX_EXPLICIT | TX_IMPLICIT)) ||
+ (add & TX_LOCKED_TABLES))
+ tx_curr_state |= add;
+
+ update_change_flags(thd);
+}
+
+
+/**
+ Add "unsafe statement" flag if applicable.
+
+ @param thd [IN] The thd handle.
+ @param set [IN] The flags to add
+*/
+
+void Transaction_state_tracker::add_trx_state_from_thd(THD *thd)
+{
+ if (m_enabled)
+ {
+ if (thd->lex->is_stmt_unsafe())
+ add_trx_state(thd, TX_STMT_UNSAFE);
+ }
+}
+
+
+/**
+ Set read flags (read only/read write) pertaining to the next
+ transaction.
+
+ @param thd [IN] The thd handle.
+ @param set [IN] The flags to set
+*/
+
+void Transaction_state_tracker::set_read_flags(THD *thd,
+ enum enum_tx_read_flags flags)
+{
+ if (m_enabled && (tx_read_flags != flags))
+ {
+ tx_read_flags = flags;
+ tx_changed |= TX_CHG_CHISTICS;
+ mark_as_changed(thd, NULL);
+ }
+}
+
+
+/**
+ Set isolation level pertaining to the next transaction.
+
+ @param thd [IN] The thd handle.
+ @param set [IN] The isolation level to set
+*/
+
+void Transaction_state_tracker::set_isol_level(THD *thd,
+ enum enum_tx_isol_level level)
+{
+ if (m_enabled && (tx_isol_level != level))
+ {
+ tx_isol_level = level;
+ tx_changed |= TX_CHG_CHISTICS;
+ mark_as_changed(thd, NULL);
+ }
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+
+Session_state_change_tracker::Session_state_change_tracker()
+{
+ m_changed= false;
+}
+
+/**
+ @Enable/disable the tracker based on @@session_track_state_change value.
+
+ @param thd [IN] The thd handle.
+ @return false (always)
+
+**/
+
+bool Session_state_change_tracker::update(THD *thd, set_var *)
+{
+ m_enabled= thd->variables.session_track_state_change;
+ return false;
+}
+
+/**
+ Store the '1' in the specified buffer when state is changed.
+
+ @param thd [IN] The thd handle.
+ @paran buf [INOUT] Buffer to store the information to.
+
+ @reval false Success
+ @retval true Error
+**/
+
+bool Session_state_change_tracker::store(THD *thd, String *buf)
+{
+ if (unlikely((1 + 1 + 1 + buf->length() >= MAX_PACKET_LENGTH) ||
+ buf->reserve(1 + 1 + 1, EXTRA_ALLOC)))
+ return true;
+
+ compile_time_assert(SESSION_TRACK_STATE_CHANGE < 251);
+ /* Session state type (SESSION_TRACK_STATE_CHANGE) */
+ buf->q_append((char)SESSION_TRACK_STATE_CHANGE);
+
+ /* Length of the overall entity (1 byte) */
+ buf->q_append('\1');
+
+ DBUG_ASSERT(is_state_changed(thd));
+ buf->q_append('1');
+
+ reset();
+
+ return false;
+}
+
+
+/**
+ Reset the m_changed flag for next statement.
+*/
+
+void Session_state_change_tracker::reset()
+{
+ m_changed= false;
+}
+
+
+/**
+ Find if there is a session state change.
+*/
+
+bool Session_state_change_tracker::is_state_changed(THD *)
+{
+ return m_changed;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
+/**
+ @brief Initialize session tracker objects.
+*/
+
+Session_tracker::Session_tracker()
+{
+ /* track data ID fit into one byte in net coding */
+ compile_time_assert(SESSION_TRACK_always_at_the_end < 251);
+ /* one tracker could serv several tracking data */
+ compile_time_assert((uint)SESSION_TRACK_always_at_the_end >=
+ (uint)SESSION_TRACKER_END);
+
+ for (int i= 0; i < SESSION_TRACKER_END; i++)
+ m_trackers[i]= NULL;
+}
+
+
+/**
+ @brief Enables the tracker objects.
+
+ @param thd [IN] The thread handle.
+
+ @return void
+*/
+
+void Session_tracker::enable(THD *thd)
+{
+ /*
+ Originally and correctly this allocation was in the constructor and
+ deallocation in the destructor, but in this case memory counting
+ system works incorrectly (for example in INSERT DELAYED thread)
+ */
+ deinit();
+ m_trackers[SESSION_SYSVARS_TRACKER]=
+ new (std::nothrow) Session_sysvars_tracker();
+ m_trackers[CURRENT_SCHEMA_TRACKER]=
+ new (std::nothrow) Current_schema_tracker;
+ m_trackers[SESSION_STATE_CHANGE_TRACKER]=
+ new (std::nothrow) Session_state_change_tracker;
+ m_trackers[SESSION_GTIDS_TRACKER]=
+ new (std::nothrow) Not_implemented_tracker;
+ m_trackers[TRANSACTION_INFO_TRACKER]=
+ new (std::nothrow) Transaction_state_tracker;
+
+ for (int i= 0; i < SESSION_TRACKER_END; i++)
+ m_trackers[i]->enable(thd);
+}
+
+
+/**
+ Method called during the server startup to verify the contents
+ of @@session_track_system_variables.
+
+ @retval false Success
+ @retval true Failure
+*/
+
+bool Session_tracker::server_boot_verify(CHARSET_INFO *char_set)
+{
+ bool result;
+ LEX_STRING tmp;
+ tmp.str= global_system_variables.session_track_system_variables;
+ tmp.length= safe_strlen(tmp.str);
+ result=
+ Session_sysvars_tracker::server_init_check(NULL, char_set, tmp);
+ return result;
+}
+
+
+/**
+ @brief Store all change information in the specified buffer.
+
+ @param thd [IN] The thd handle.
+ @param buf [OUT] Reference to the string buffer to which the state
+ change data needs to be written.
+*/
+
+void Session_tracker::store(THD *thd, String *buf)
+{
+ size_t start;
+
+ /*
+ Probably most track result will fit in 251 byte so lets made it at
+ least efficient. We allocate 1 byte for length and then will move
+ string if there is more.
+ */
+ buf->append('\0');
+ start= buf->length();
+
+ /* Get total length. */
+ for (int i= 0; i < SESSION_TRACKER_END; i++)
+ {
+ if (m_trackers[i]->is_changed() &&
+ m_trackers[i]->store(thd, buf))
+ {
+ buf->length(start); // it is safer to have 0-length block in case of error
+ return;
+ }
+ }
+
+ size_t length= buf->length() - start;
+ uchar *data= (uchar *)(buf->ptr() + start);
+ uint size;
+
+ if ((size= net_length_size(length)) != 1)
+ {
+ if (buf->reserve(size - 1, EXTRA_ALLOC))
+ {
+ buf->length(start); // it is safer to have 0-length block in case of error
+ return;
+ }
+ memmove(data + (size - 1), data, length);
+ }
+
+ net_store_length(data - 1, length);
+}
+
+#endif //EMBEDDED_LIBRARY
diff --git a/sql/session_tracker.h b/sql/session_tracker.h
new file mode 100644
index 00000000000..3f73b5dc705
--- /dev/null
+++ b/sql/session_tracker.h
@@ -0,0 +1,304 @@
+#ifndef SESSION_TRACKER_INCLUDED
+#define SESSION_TRACKER_INCLUDED
+
+/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2016, 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-1301 USA */
+
+#include "m_string.h"
+#include "thr_lock.h"
+
+#ifndef EMBEDDED_LIBRARY
+/* forward declarations */
+class THD;
+class set_var;
+class String;
+
+
+enum enum_session_tracker
+{
+ SESSION_SYSVARS_TRACKER, /* Session system variables */
+ CURRENT_SCHEMA_TRACKER, /* Current schema */
+ SESSION_STATE_CHANGE_TRACKER,
+ SESSION_GTIDS_TRACKER, /* Tracks GTIDs */
+ TRANSACTION_INFO_TRACKER, /* Transaction state */
+ SESSION_TRACKER_END /* must be the last */
+};
+
+/**
+ State_tracker
+
+ An abstract class that defines the interface for any of the server's
+ 'session state change tracker'. A tracker, however, is a sub- class of
+ this class which takes care of tracking the change in value of a part-
+ icular session state type and thus defines various methods listed in this
+ interface. The change information is later serialized and transmitted to
+ the client through protocol's OK packet.
+
+ Tracker system variables :-
+ A tracker is normally mapped to a system variable. So in order to enable,
+ disable or modify the sub-entities of a tracker, the user needs to modify
+ the respective system variable either through SET command or via command
+ line option. As required in system variable handling, this interface also
+ includes two functions to help in the verification of the supplied value
+ (ON_UPDATE) of the tracker system variable, namely - update().
+*/
+
+class State_tracker
+{
+protected:
+ /**
+ Is tracking enabled for a particular session state type ?
+
+ @note: it is a cache of the corresponding thd->variables.session_track_xxx
+ variable
+ */
+ bool m_enabled;
+
+ /** Has the session state type changed ? */
+ bool m_changed;
+
+public:
+ /** Constructor */
+ State_tracker() : m_enabled(false), m_changed(false)
+ {}
+
+ /** Destructor */
+ virtual ~State_tracker()
+ {}
+
+ /** Getters */
+ bool is_enabled() const
+ { return m_enabled; }
+
+ bool is_changed() const
+ { return m_changed; }
+
+ /** Called in the constructor of THD*/
+ virtual bool enable(THD *thd)= 0;
+
+ /** To be invoked when the tracker's system variable is updated (ON_UPDATE).*/
+ virtual bool update(THD *thd, set_var *var)= 0;
+
+ /** Store changed data into the given buffer. */
+ virtual bool store(THD *thd, String *buf)= 0;
+
+ /** Mark the entity as changed. */
+ virtual void mark_as_changed(THD *thd, LEX_CSTRING *name);
+};
+
+bool sysvartrack_validate_value(THD *thd, const char *str, size_t len);
+bool sysvartrack_reprint_value(THD *thd, char *str, size_t len);
+bool sysvartrack_update(THD *thd, set_var *var);
+size_t sysvartrack_value_len(THD *thd);
+bool sysvartrack_value_construct(THD *thd, char *val, size_t len);
+
+
+/**
+ Session_tracker
+
+ This class holds an object each for all tracker classes and provides
+ methods necessary for systematic detection and generation of session
+ state change information.
+*/
+
+class Session_tracker
+{
+private:
+ State_tracker *m_trackers[SESSION_TRACKER_END];
+
+ /* The following two functions are private to disable copying. */
+ Session_tracker(Session_tracker const &other)
+ {
+ DBUG_ASSERT(FALSE);
+ }
+ Session_tracker& operator= (Session_tracker const &rhs)
+ {
+ DBUG_ASSERT(FALSE);
+ return *this;
+ }
+
+public:
+
+ Session_tracker();
+ ~Session_tracker()
+ {
+ deinit();
+ }
+
+ /* trick to make happy memory accounting system */
+ void deinit()
+ {
+ for (int i= 0; i < SESSION_TRACKER_END; i++)
+ {
+ if (m_trackers[i])
+ delete m_trackers[i];
+ m_trackers[i]= NULL;
+ }
+ }
+
+ void enable(THD *thd);
+ static bool server_boot_verify(CHARSET_INFO *char_set);
+
+ /** Returns the pointer to the tracker object for the specified tracker. */
+ inline State_tracker *get_tracker(enum_session_tracker tracker) const
+ {
+ return m_trackers[tracker];
+ }
+
+ inline void mark_as_changed(THD *thd, enum enum_session_tracker tracker,
+ LEX_CSTRING *data)
+ {
+ if (m_trackers[tracker]->is_enabled())
+ m_trackers[tracker]->mark_as_changed(thd, data);
+ }
+
+
+ void store(THD *thd, String *main_buf);
+};
+
+
+/*
+ Transaction_state_tracker
+*/
+
+/**
+ Transaction state (no transaction, transaction active, work attached, etc.)
+*/
+enum enum_tx_state {
+ TX_EMPTY = 0, ///< "none of the below"
+ TX_EXPLICIT = 1, ///< an explicit transaction is active
+ TX_IMPLICIT = 2, ///< an implicit transaction is active
+ TX_READ_TRX = 4, ///< transactional reads were done
+ TX_READ_UNSAFE = 8, ///< non-transaction reads were done
+ TX_WRITE_TRX = 16, ///< transactional writes were done
+ TX_WRITE_UNSAFE = 32, ///< non-transactional writes were done
+ TX_STMT_UNSAFE = 64, ///< "unsafe" (non-deterministic like UUID()) stmts
+ TX_RESULT_SET = 128, ///< result set was sent
+ TX_WITH_SNAPSHOT= 256, ///< WITH CONSISTENT SNAPSHOT was used
+ TX_LOCKED_TABLES= 512 ///< LOCK TABLES is active
+};
+
+
+/**
+ Transaction access mode
+*/
+enum enum_tx_read_flags {
+ TX_READ_INHERIT = 0, ///< not explicitly set, inherit session.tx_read_only
+ TX_READ_ONLY = 1, ///< START TRANSACTION READ ONLY, or tx_read_only=1
+ TX_READ_WRITE = 2, ///< START TRANSACTION READ WRITE, or tx_read_only=0
+};
+
+
+/**
+ Transaction isolation level
+*/
+enum enum_tx_isol_level {
+ TX_ISOL_INHERIT = 0, ///< not explicitly set, inherit session.tx_isolation
+ TX_ISOL_UNCOMMITTED = 1,
+ TX_ISOL_COMMITTED = 2,
+ TX_ISOL_REPEATABLE = 3,
+ TX_ISOL_SERIALIZABLE= 4
+};
+
+
+/**
+ Transaction tracking level
+*/
+enum enum_session_track_transaction_info {
+ TX_TRACK_NONE = 0, ///< do not send tracker items on transaction info
+ TX_TRACK_STATE = 1, ///< track transaction status
+ TX_TRACK_CHISTICS = 2 ///< track status and characteristics
+};
+
+
+/**
+ This is a tracker class that enables & manages the tracking of
+ current transaction info for a particular connection.
+*/
+
+class Transaction_state_tracker : public State_tracker
+{
+private:
+ /** Helper function: turn table info into table access flag */
+ enum_tx_state calc_trx_state(THD *thd, thr_lock_type l, bool has_trx);
+public:
+ /** Constructor */
+ Transaction_state_tracker();
+ bool enable(THD *thd)
+ { return update(thd, NULL); }
+ bool update(THD *thd, set_var *var);
+ bool store(THD *thd, String *buf);
+
+ /** Change transaction characteristics */
+ void set_read_flags(THD *thd, enum enum_tx_read_flags flags);
+ void set_isol_level(THD *thd, enum enum_tx_isol_level level);
+
+ /** Change transaction state */
+ void clear_trx_state(THD *thd, uint clear);
+ void add_trx_state(THD *thd, uint add);
+ void inline add_trx_state(THD *thd, thr_lock_type l, bool has_trx)
+ {
+ add_trx_state(thd, calc_trx_state(thd, l, has_trx));
+ }
+ void add_trx_state_from_thd(THD *thd);
+ void end_trx(THD *thd);
+
+
+private:
+ enum enum_tx_changed {
+ TX_CHG_NONE = 0, ///< no changes from previous stmt
+ TX_CHG_STATE = 1, ///< state has changed from previous stmt
+ TX_CHG_CHISTICS = 2 ///< characteristics have changed from previous stmt
+ };
+
+ /** any trackable changes caused by this statement? */
+ uint tx_changed;
+
+ /** transaction state */
+ uint tx_curr_state, tx_reported_state;
+
+ /** r/w or r/o set? session default? */
+ enum enum_tx_read_flags tx_read_flags;
+
+ /** isolation level */
+ enum enum_tx_isol_level tx_isol_level;
+
+ void reset();
+
+ inline void update_change_flags(THD *thd)
+ {
+ tx_changed &= ~TX_CHG_STATE;
+ tx_changed |= (tx_curr_state != tx_reported_state) ? TX_CHG_STATE : 0;
+ if (tx_changed != TX_CHG_NONE)
+ mark_as_changed(thd, NULL);
+ }
+};
+
+#define TRANSACT_TRACKER(X) \
+ do { if (thd->variables.session_track_transaction_info > TX_TRACK_NONE) \
+ {((Transaction_state_tracker *) \
+ thd->session_tracker.get_tracker(TRANSACTION_INFO_TRACKER)) \
+ ->X; } } while(0)
+#define SESSION_TRACKER_CHANGED(A,B,C) \
+ thd->session_tracker.mark_as_changed(A,B,C)
+#else
+
+#define TRANSACT_TRACKER(X) do{}while(0)
+#define SESSION_TRACKER_CHANGED(A,B,C) do{}while(0)
+
+#endif //EMBEDDED_LIBRARY
+
+#endif /* SESSION_TRACKER_INCLUDED */
diff --git a/sql/set_var.cc b/sql/set_var.cc
index b178681e952..26eb5127a0b 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -115,6 +115,9 @@ void sys_var_end()
DBUG_VOID_RETURN;
}
+
+static bool static_test_load= TRUE;
+
/**
sys_var constructor
@@ -184,6 +187,8 @@ sys_var::sys_var(sys_var_chain *chain, const char *name_arg,
else
chain->first= this;
chain->last= this;
+
+ test_load= &static_test_load;
}
bool sys_var::update(THD *thd, set_var *var)
@@ -204,8 +209,28 @@ bool sys_var::update(THD *thd, set_var *var)
(on_update && on_update(this, thd, OPT_GLOBAL));
}
else
- return session_update(thd, var) ||
+ {
+ bool ret= session_update(thd, var) ||
(on_update && on_update(this, thd, OPT_SESSION));
+
+ /*
+ Make sure we don't session-track variables that are not actually
+ part of the session. tx_isolation and and tx_read_only for example
+ exist as GLOBAL, SESSION, and one-shot ("for next transaction only").
+ */
+ if ((var->type == OPT_SESSION) && (!ret))
+ {
+ SESSION_TRACKER_CHANGED(thd, SESSION_SYSVARS_TRACKER,
+ (LEX_CSTRING*)var->var);
+ /*
+ Here MySQL sends variable name to avoid reporting change of
+ the tracker itself, but we decided that it is not needed
+ */
+ SESSION_TRACKER_CHANGED(thd, SESSION_STATE_CHANGE_TRACKER, NULL);
+ }
+
+ return ret;
+ }
}
uchar *sys_var::session_value_ptr(THD *thd, const LEX_STRING *base)
@@ -867,6 +892,8 @@ int set_var_user::update(THD *thd)
MYF(0));
return -1;
}
+
+ SESSION_TRACKER_CHANGED(thd, SESSION_STATE_CHANGE_TRACKER, NULL);
return 0;
}
@@ -914,7 +941,11 @@ int set_var_role::check(THD *thd)
int set_var_role::update(THD *thd)
{
#ifndef NO_EMBEDDED_ACCESS_CHECKS
- return acl_setrole(thd, role.str, access);
+ int res= acl_setrole(thd, role.str, access);
+ if (!res)
+ thd->session_tracker.mark_as_changed(thd, SESSION_STATE_CHANGE_TRACKER,
+ NULL);
+ return res;
#else
return 0;
#endif
@@ -968,6 +999,33 @@ int set_var_collation_client::update(THD *thd)
{
thd->update_charset(character_set_client, collation_connection,
character_set_results);
+
+ /* Mark client collation variables as changed */
+#ifndef EMBEDDED_LIBRARY
+ if (thd->session_tracker.get_tracker(SESSION_SYSVARS_TRACKER)->is_enabled())
+ {
+ sys_var *svar;
+ mysql_mutex_lock(&LOCK_plugin);
+ if ((svar= find_sys_var_ex(thd, "character_set_client",
+ sizeof("character_set_client") - 1,
+ false, true)))
+ thd->session_tracker.get_tracker(SESSION_SYSVARS_TRACKER)->
+ mark_as_changed(thd, (LEX_CSTRING*)svar);
+ if ((svar= find_sys_var_ex(thd, "character_set_results",
+ sizeof("character_set_results") - 1,
+ false, true)))
+ thd->session_tracker.get_tracker(SESSION_SYSVARS_TRACKER)->
+ mark_as_changed(thd, (LEX_CSTRING*)svar);
+ if ((svar= find_sys_var_ex(thd, "character_set_connection",
+ sizeof("character_set_connection") - 1,
+ false, true)))
+ thd->session_tracker.get_tracker(SESSION_SYSVARS_TRACKER)->
+ mark_as_changed(thd, (LEX_CSTRING*)svar);
+ mysql_mutex_unlock(&LOCK_plugin);
+ }
+ thd->session_tracker.mark_as_changed(thd, SESSION_STATE_CHANGE_TRACKER, NULL);
+#endif //EMBEDDED_LIBRARY
+
thd->protocol_text.init(thd);
thd->protocol_binary.init(thd);
return 0;
diff --git a/sql/set_var.h b/sql/set_var.h
index 060a4e1a57c..ba8027edc72 100644
--- a/sql/set_var.h
+++ b/sql/set_var.h
@@ -48,6 +48,7 @@ struct sys_var_chain
int mysql_add_sys_var_chain(sys_var *chain);
int mysql_del_sys_var_chain(sys_var *chain);
+
/**
A class representing one system variable - that is something
that can be accessed as @@global.variable_name or @@session.variable_name,
@@ -60,6 +61,7 @@ class sys_var: protected Value_source // for double_from_string_with_check
public:
sys_var *next;
LEX_CSTRING name;
+ bool *test_load;
enum flag_enum { GLOBAL, SESSION, ONLY_SESSION, SCOPE_MASK=1023,
READONLY=1024, ALLOCATED=2048, PARSE_EARLY=4096,
NO_SET_STATEMENT=8192, AUTO_SET=16384};
@@ -240,6 +242,9 @@ protected:
uchar *global_var_ptr()
{ return ((uchar*)&global_system_variables) + offset; }
+
+ friend class Session_sysvars_tracker;
+ friend class Session_tracker;
};
#include "sql_plugin.h" /* SHOW_HA_ROWS, SHOW_MY_BOOL */
@@ -385,7 +390,7 @@ extern SHOW_COMP_OPTION have_openssl;
SHOW_VAR* enumerate_sys_vars(THD *thd, bool sorted, enum enum_var_type type);
int fill_sysvars(THD *thd, TABLE_LIST *tables, COND *cond);
-sys_var *find_sys_var(THD *thd, const char *str, uint length=0);
+sys_var *find_sys_var(THD *thd, const char *str, size_t length=0);
int sql_set_variables(THD *thd, List<set_var_base> *var_list, bool free);
#define SYSVAR_AUTOSIZE(VAR,VAL) \
diff --git a/sql/share/charsets/Index.xml b/sql/share/charsets/Index.xml
index 9764d629625..912d196cc3c 100644
--- a/sql/share/charsets/Index.xml
+++ b/sql/share/charsets/Index.xml
@@ -67,6 +67,12 @@ To make maintaining easier please:
<collation name="latin2_hungarian_ci" id="21" order="Hungarian"/>
<collation name="latin2_croatian_ci" id="27" order="Croatian"/>
<collation name="latin2_bin" id="77" order="Binary" flag="binary"/>
+ <collation name="latin2_general_nopad_ci" id="1033" flag="nopad">
+ <rules>
+ <import source="latin2_general_ci"/>
+ </rules>
+ </collation>
+ <collation name="latin2_nopad_bin" id="1101" flag="binary" flag="nopad"/>
</charset>
<charset name="dec8">
@@ -83,6 +89,12 @@ To make maintaining easier please:
<order>Portuguese</order>
<order>Spanish</order>
</collation>
+ <collation name="dec8_swedish_nopad_ci" id="1027" flag="nopad">
+ <rules>
+ <import source="dec8_swedish_ci"/>
+ </rules>
+ </collation>
+ <collation name="dec8_nopad_bin" id="1093" flag="binary" flag="nopad"/>
</charset>
<charset name="cp850">
@@ -102,6 +114,12 @@ To make maintaining easier please:
<order>Spanish</order>
</collation>
<collation name="cp850_bin" id="80" order="Binary" flag="binary"/>
+ <collation name="cp850_general_nopad_ci" id="1028" flag="nopad">
+ <rules>
+ <import source="cp850_general_ci"/>
+ </rules>
+ </collation>
+ <collation name="cp850_nopad_bin" id="1104" flag="binary" flag="nopad"/>
</charset>
<charset name="latin1">
@@ -163,6 +181,12 @@ To make maintaining easier please:
<order>Portuguese</order>
<order>Spanish</order>
</collation>
+ <collation name="hp8_english_nopad_ci" id="1030" flag="nopad">
+ <rules>
+ <import source="hp8_english_ci"/>
+ </rules>
+ </collation>
+ <collation name="hp8_nopad_bin" id="1096" flag="binary" flag="nopad"/>
</charset>
<charset name="koi8r">
@@ -172,6 +196,12 @@ To make maintaining easier please:
<alias>cskoi8r</alias>
<collation name="koi8r_general_ci" id="7" order="Russian" flag="primary"/>
<collation name="koi8r_bin" id="74" order="Binary" flag="binary"/>
+ <collation name="koi8r_general_nopad_ci" id="1031" flag="nopad">
+ <rules>
+ <import source="koi8r_general_ci"/>
+ </rules>
+ </collation>
+ <collation name="koi8r_nopad_bin" id="1098" flag="binary" flag="nopad"/>
</charset>
<charset name="swe7">
@@ -180,6 +210,12 @@ To make maintaining easier please:
<alias>iso-646-se</alias>
<collation name="swe7_swedish_ci" id="10" order="Swedish" flag="primary"/>
<collation name="swe7_bin" id="82" order="Binary" flag="binary"/>
+ <collation name="swe7_swedish_nopad_ci" id="1034" flag="nopad">
+ <rules>
+ <import source="swe7_swedish_ci"/>
+ </rules>
+ </collation>
+ <collation name="swe7_nopad_bin" id="1106" flag="binary" flag="nopad"/>
</charset>
<charset name="ascii">
@@ -192,6 +228,12 @@ To make maintaining easier please:
<alias>iso646-us</alias>
<collation name="ascii_general_ci" id="11" order="English" flag="primary"/>
<collation name="ascii_bin" id="65" order="Binary" flag="binary"/>
+ <collation name="ascii_general_nopad_ci" id="1035" flag="nopad">
+ <rules>
+ <import source="ascii_general_ci"/>
+ </rules>
+ </collation>
+ <collation name="ascii_nopad_bin" id="1089" flag="binary" flag="nopad"/>
</charset>
<charset name="ujis">
@@ -259,6 +301,12 @@ To make maintaining easier please:
<order>Mongolian</order>
<order>Ukrainian</order>
</collation>
+ <collation name="cp1251_general_nopad_ci" id="1075" flag="nopad">
+ <rules>
+ <import source="cp1251_general_ci"/>
+ </rules>
+ </collation>
+ <collation name="cp1251_nopad_bin" id="1074" flag="binary" flag="nopad"/>
</charset>
<charset name="hebrew">
@@ -269,6 +317,12 @@ To make maintaining easier please:
<alias>iso-ir-138</alias>
<collation name="hebrew_general_ci" id="16" order="Hebrew" flag="primary"/>
<collation name="hebrew_bin" id="71" order="Binary" flag="binary"/>
+ <collation name="hebrew_general_nopad_ci" id="1040" flag="nopad">
+ <rules>
+ <import source="hebrew_general_ci"/>
+ </rules>
+ </collation>
+ <collation name="hebrew_nopad_bin" id="1095" flag="binary" flag="nopad"/>
</charset>
<charset name="tis620">
@@ -319,6 +373,12 @@ To make maintaining easier please:
<order>Lithuanian</order>
</collation>
<collation name="latin7_bin" id="79" order="Binary" flag="binary"/>
+ <collation name="latin7_general_nopad_ci" id="1065" flag="nopad">
+ <rules>
+ <import source="latin7_general_ci"/>
+ </rules>
+ </collation>
+ <collation name="latin7_nopad_bin" id="1103" flag="binary" flag="nopad"/>
</charset>
<charset name="koi8u">
@@ -327,6 +387,12 @@ To make maintaining easier please:
<alias>koi8-u</alias>
<collation name="koi8u_general_ci" id="22" order="Ukranian" flag="primary"/>
<collation name="koi8u_bin" id="75" order="Binary" flag="binary"/>
+ <collation name="koi8u_general_nopad_ci" id="1046" flag="nopad">
+ <rules>
+ <import source="koi8u_general_ci"/>
+ </rules>
+ </collation>
+ <collation name="koi8u_nopad_bin" id="1099" flag="binary" flag="nopad"/>
</charset>
<charset name="gb2312">
@@ -354,6 +420,12 @@ To make maintaining easier please:
<alias>iso-ir-126</alias>
<collation name="greek_general_ci" id="25" order="Greek" flag="primary"/>
<collation name="greek_bin" id="70" order="Binary" flag="binary"/>
+ <collation name="greek_general_nopad_ci" id="1049" flag="nopad">
+ <rules>
+ <import source="greek_general_ci"/>
+ </rules>
+ </collation>
+ <collation name="greek_nopad_bin" id="1094" flag="binary" flag="nopad"/>
</charset>
<charset name="cp1250">
@@ -380,6 +452,12 @@ To make maintaining easier please:
<flag>compiled</flag>
</collation>
<collation name="cp1250_bin" id="66" order="Binary" flag="binary"/>
+ <collation name="cp1250_general_nopad_ci" id="1050" flag="nopad">
+ <rules>
+ <import source="cp1250_general_ci"/>
+ </rules>
+ </collation>
+ <collation name="cp1250_nopad_bin" id="1090" flag="binary" flag="nopad"/>
</charset>
<charset name="gbk">
@@ -407,6 +485,12 @@ To make maintaining easier please:
<order>Latvian</order>
<order>Lithuanian</order>
</collation>
+ <collation name="cp1257_general_nopad_ci" id="1083" flag="nopad">
+ <rules>
+ <import source="cp1257_general_ci"/>
+ </rules>
+ </collation>
+ <collation name="cp1257_nopad_bin" id="1082" flag="binary" flag="nopad"/>
<!--collation name="cp1257_ci" id="60"/-->
<!--collation name="cp1257_cs" id="61"/-->
</charset>
@@ -422,6 +506,12 @@ To make maintaining easier please:
<alias>turkish</alias>
<collation name="latin5_turkish_ci" id="30" order="Turkish" flag="primary"/>
<collation name="latin5_bin" id="78" order="Binary" flag="binary"/>
+ <collation name="latin5_turkish_nopad_ci" id="1054" flag="nopad">
+ <rules>
+ <import source="latin5_turkish_ci"/>
+ </rules>
+ </collation>
+ <collation name="latin5_nopad_bin" id="1102" flag="binary" flag="nopad"/>
</charset>
<charset name="armscii8">
@@ -430,6 +520,12 @@ To make maintaining easier please:
<alias>armscii-8</alias>
<collation name="armscii8_general_ci" id="32" order="Armenian" flag="primary"/>
<collation name="armscii8_bin" id="64" order="Binary" flag="binary"/>
+ <collation name="armscii8_general_nopad_ci" id="1056" flag="nopad">
+ <rules>
+ <import source="armscii8_general_ci"/>
+ </rules>
+ </collation>
+ <collation name="armscii8_nopad_bin" id="1088" flag="binary" flag="nopad"/>
</charset>
<charset name="utf8">
@@ -468,6 +564,12 @@ To make maintaining easier please:
<alias>DOSCyrillicRussian</alias>
<collation name="cp866_general_ci" id="36" order="Russian" flag="primary"/>
<collation name="cp866_bin" id="68" order="Binary" flag="binary"/>
+ <collation name="cp866_general_nopad_ci" id="1060" flag="nopad">
+ <rules>
+ <import source="cp866_general_ci"/>
+ </rules>
+ </collation>
+ <collation name="cp866_nopad_bin" id="1092" flag="binary" flag="nopad"/>
</charset>
<charset name="keybcs2">
@@ -475,6 +577,12 @@ To make maintaining easier please:
<description>DOS Kamenicky Czech-Slovak</description>
<collation name="keybcs2_general_ci" id="37" order="Czech" flag="primary"/>
<collation name="keybcs2_bin" id="73" order="Binary" flag="binary"/>
+ <collation name="keybcs2_general_nopad_ci" id="1061" flag="nopad">
+ <rules>
+ <import source="keybcs2_general_ci"/>
+ </rules>
+ </collation>
+ <collation name="keybcs2_nopad_bin" id="1097" flag="binary" flag="nopad"/>
</charset>
<charset name="macce">
@@ -491,6 +599,12 @@ To make maintaining easier please:
<order>Sorbian</order>
</collation>
<collation name="macce_bin" id="43" order="Binary" flag="binary"/>
+ <collation name="macce_general_nopad_ci" id="1062" flag="nopad">
+ <rules>
+ <import source="macce_general_ci"/>
+ </rules>
+ </collation>
+ <collation name="macce_nopad_bin" id="1067" flag="binary" flag="nopad"/>
</charset>
<charset name="macroman">
@@ -513,6 +627,12 @@ To make maintaining easier please:
<!--collation name="macroman_ci" id="54"/-->
<!--collation name="macroman_ci_ai" id="55"/-->
<!--collation name="macroman_cs" id="56"/-->
+ <collation name="macroman_general_nopad_ci" id="1063" flag="nopad">
+ <rules>
+ <import source="macroman_general_ci"/>
+ </rules>
+ </collation>
+ <collation name="macroman_nopad_bin" id="1077" flag="binary" flag="nopad"/>
</charset>
<charset name="cp852">
@@ -531,6 +651,12 @@ To make maintaining easier please:
<order>Sorbian</order>
</collation>
<collation name="cp852_bin" id="81" order="Binary" flag="binary"/>
+ <collation name="cp852_general_nopad_ci" id="1064" flag="nopad">
+ <rules>
+ <import source="cp852_general_ci"/>
+ </rules>
+ </collation>
+ <collation name="cp852_nopad_bin" id="1105" flag="binary" flag="nopad"/>
</charset>
<charset name="cp1256">
@@ -545,6 +671,12 @@ To make maintaining easier please:
<order>Pakistani</order>
<order>Urdu</order>
</collation>
+ <collation name="cp1256_general_nopad_ci" id="1081" flag="nopad">
+ <rules>
+ <import source="cp1256_general_ci"/>
+ </rules>
+ </collation>
+ <collation name="cp1256_nopad_bin" id="1091" flag="binary" flag="nopad"/>
</charset>
<charset name="geostd8">
@@ -552,6 +684,12 @@ To make maintaining easier please:
<description>GEOSTD8 Georgian</description>
<collation name="geostd8_general_ci" id="92" order="Georgian" flag="primary"/>
<collation name="geostd8_bin" id="93" order="Binary" flag="binary"/>
+ <collation name="geostd8_general_nopad_ci" id="1116" flag="nopad">
+ <rules>
+ <import source="geostd8_general_ci"/>
+ </rules>
+ </collation>
+ <collation name="geostd8_nopad_bin" id="1117" flag="binary" flag="nopad"/>
</charset>
<charset name="binary">
@@ -596,4 +734,3 @@ To make maintaining easier please:
</charset>
</charsets>
-
diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt
index fe6290faa94..4d3861b2936 100644
--- a/sql/share/errmsg-utf8.txt
+++ b/sql/share/errmsg-utf8.txt
@@ -4064,21 +4064,21 @@ ER_LOCK_OR_ACTIVE_TRANSACTION
swe "Kan inte utföra kommandot emedan du har en låst tabell eller an aktiv transaktion"
ukr "Ðе можу виконати подану команду тому, що Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ Ð·Ð°Ð±Ð»Ð¾ÐºÐ¾Ð²Ð°Ð½Ð° або виконуєтьÑÑ Ñ‚Ñ€Ð°Ð½Ð·Ð°ÐºÑ†Ñ–Ñ"
ER_UNKNOWN_SYSTEM_VARIABLE
- cze "Neznámá systémová proměnná '%-.64s'"
- dan "Ukendt systemvariabel '%-.64s'"
- nla "Onbekende systeem variabele '%-.64s'"
- eng "Unknown system variable '%-.64s'"
- est "Tundmatu süsteemne muutuja '%-.64s'"
- fre "Variable système '%-.64s' inconnue"
- ger "Unbekannte Systemvariable '%-.64s'"
- ita "Variabile di sistema '%-.64s' sconosciuta"
- jpn "'%-.64s' ã¯ä¸æ˜Žãªã‚·ã‚¹ãƒ†ãƒ å¤‰æ•°ã§ã™ã€‚"
- por "Variável de sistema '%-.64s' desconhecida"
- rus "ÐеизвеÑÑ‚Ð½Ð°Ñ ÑиÑÑ‚ÐµÐ¼Ð½Ð°Ñ Ð¿ÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ '%-.64s'"
- serbian "Nepoznata sistemska promenljiva '%-.64s'"
- spa "Desconocida variable de sistema '%-.64s'"
- swe "Okänd systemvariabel: '%-.64s'"
- ukr "Ðевідома ÑиÑтемна змінна '%-.64s'"
+ cze "Neznámá systémová proměnná '%-.*s'"
+ dan "Ukendt systemvariabel '%-.*s'"
+ nla "Onbekende systeem variabele '%-.*s'"
+ eng "Unknown system variable '%-.*s'"
+ est "Tundmatu süsteemne muutuja '%-.*s'"
+ fre "Variable système '%-.*s' inconnue"
+ ger "Unbekannte Systemvariable '%-.*s'"
+ ita "Variabile di sistema '%-.*s' sconosciuta"
+ jpn "'%-.*s' ã¯ä¸æ˜Žãªã‚·ã‚¹ãƒ†ãƒ å¤‰æ•°ã§ã™ã€‚"
+ por "Variável de sistema '%-.*s' desconhecida"
+ rus "ÐеизвеÑÑ‚Ð½Ð°Ñ ÑиÑÑ‚ÐµÐ¼Ð½Ð°Ñ Ð¿ÐµÑ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ '%-.*s'"
+ serbian "Nepoznata sistemska promenljiva '%-.*s'"
+ spa "Desconocida variable de sistema '%-.*s'"
+ swe "Okänd systemvariabel: '%-.*s'"
+ ukr "Ðевідома ÑиÑтемна змінна '%-.*s'"
ER_CRASHED_ON_USAGE
cze "Tabulka '%-.192s' je oznaÄena jako poruÅ¡ená a mÄ›la by být opravena"
dan "Tabellen '%-.192s' er markeret med fejl og bør repareres"
@@ -6762,8 +6762,8 @@ ER_FK_CANNOT_OPEN_PARENT
ER_FK_INCORRECT_OPTION
eng "Failed to add the foreign key constraint on table '%s'. Incorrect options in FOREIGN KEY constraint '%s'"
-ER_FK_DUP_NAME
- eng "Duplicate foreign key constraint name '%s'"
+ER_DUP_CONSTRAINT_NAME
+ eng "Duplicate %s constraint name '%s'"
ER_PASSWORD_FORMAT
eng "The password hash doesn't have the expected format. Check if the correct password algorithm is being used with the PASSWORD() function."
@@ -7139,6 +7139,9 @@ ER_KILL_QUERY_DENIED_ERROR
ER_NO_EIS_FOR_FIELD
eng "Engine-independent statistics are not collected for column '%s'"
ukr "Ðезалежна від типу таблиці ÑтатиÑтика не збираєтьÑÑ Ð´Ð»Ñ ÑÑ‚Ð¾Ð²Ð±Ñ†Ñ '%s'"
+ER_WARN_AGGFUNC_DEPENDENCE
+ eng "Aggregate function '%-.192s)' of SELECT #%d belongs to SELECT #%d"
+ ukr "Ðгрегатна Ñ„ÑƒÐ½ÐºÑ†Ñ–Ñ '%-.192s)' з SELECTу #%d належить до SELECTу #%d"
#
# Internal errors, not used
@@ -7167,14 +7170,20 @@ ER_BAD_COMMAND_IN_MULTI
ukr "Команда '%s' не дозволена Ð´Ð»Ñ COM_MULTI"
ER_WITH_COL_WRONG_LIST
eng "WITH column list and SELECT field list have different column counts"
+ER_TOO_MANY_DEFINITIONS_IN_WITH_CLAUSE
+ eng "Too many WITH elements in WITH clause"
ER_DUP_QUERY_NAME
eng "Duplicate query name in WITH clause"
-ER_WRONG_ORDER_IN_WITH_CLAUSE
- eng "The definition of the table '%s' refers to the table '%s' defined later in a non-recursive WITH clause"
-ER_RECURSIVE_QUERY_IN_WITH_CLAUSE
- eng "Recursive queries in WITH clause are not supported yet"
+ER_RECURSIVE_WITHOUT_ANCHORS
+ eng "No anchors for recursive WITH element '%s'"
+ER_UNACCEPTABLE_MUTUAL_RECURSION
+ eng "Unacceptable mutual recursion with anchored table '%s'"
+ER_REF_TO_RECURSIVE_WITH_TABLE_IN_DERIVED
+ eng "Reference to recursive WITH table '%s' in materialized derived"
+ER_NOT_STANDARDS_COMPLIANT_RECURSIVE
+ eng "Restrictions imposed on recursive definitions are violated for table '%s'"R_WRONG_WINDOW_SPEC_NAME
ER_WRONG_WINDOW_SPEC_NAME
- eng "Window specification with name '%s' is not defined"
+ eng "Window specification with name '%s' is not defined"
ER_DUP_WINDOW_NAME
eng "Multiple window specifications with the same name '%s'"
ER_PARTITION_LIST_IN_REFERENCING_WINDOW_SPEC
@@ -7218,3 +7227,6 @@ ER_CALCULATING_DEFAULT_VALUE
eng "Got an error when calculating default value for %`s"
ER_EXPRESSION_REFERS_TO_UNINIT_FIELD 01000
eng "Expression for field %`-.64s is refering to uninitialized field %`s"
+ER_PARTITION_DEFAULT_ERROR
+ eng "Only one DEFAULT partition allowed"
+ ukr "ПрипуÑтимо мати тільки один DEFAULT розділ"
diff --git a/sql/signal_handler.cc b/sql/signal_handler.cc
index bbe714fc5b4..f9478134ab4 100644
--- a/sql/signal_handler.cc
+++ b/sql/signal_handler.cc
@@ -65,6 +65,12 @@ extern "C" sig_handler handle_fatal_signal(int sig)
#ifdef HAVE_STACKTRACE
THD *thd;
#endif
+ /*
+ This flag remembers if the query pointer was found invalid.
+ We will try and print the query at the end of the signal handler, in case
+ we're wrong.
+ */
+ bool print_invalid_query_pointer= false;
if (segfaulted)
{
@@ -107,6 +113,7 @@ extern "C" sig_handler handle_fatal_signal(int sig)
"diagnose the problem, but since we have already crashed, \n"
"something is definitely wrong and this may fail.\n\n");
+ set_server_version(server_version, sizeof(server_version));
my_safe_printf_stderr("Server version: %s\n", server_version);
if (dflt_key_cache)
@@ -200,7 +207,12 @@ extern "C" sig_handler handle_fatal_signal(int sig)
"Some pointers may be invalid and cause the dump to abort.\n");
my_safe_printf_stderr("Query (%p): ", thd->query());
- my_safe_print_str(thd->query(), MY_MIN(65536U, thd->query_length()));
+ if (my_safe_print_str(thd->query(), MY_MIN(65536U, thd->query_length())))
+ {
+ // Query was found invalid. We will try to print it at the end.
+ print_invalid_query_pointer= true;
+ }
+
my_safe_printf_stderr("\nConnection ID (thread ID): %lu\n",
(ulong) thd->thread_id);
my_safe_printf_stderr("Status: %s\n\n", kreason);
@@ -264,6 +276,16 @@ extern "C" sig_handler handle_fatal_signal(int sig)
"\"mlockall\" bugs.\n");
}
+ if (print_invalid_query_pointer)
+ {
+ my_safe_printf_stderr(
+ "\nWe think the query pointer is invalid, but we will try "
+ "to print it anyway. \n"
+ "Query: ");
+ my_write_stderr(thd->query(), MY_MIN(65536U, thd->query_length()));
+ my_safe_printf_stderr("\n\n");
+ }
+
#ifdef HAVE_WRITE_CORE
if (test_flags & TEST_CORE_ON_SIGNAL)
{
diff --git a/sql/slave.cc b/sql/slave.cc
index d83bafa5b3d..08cbf9acb6a 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -283,18 +283,27 @@ static void init_slave_psi_keys(void)
#endif /* HAVE_PSI_INTERFACE */
-static bool slave_init_thread_running;
+static bool slave_background_thread_running;
+static bool slave_background_thread_stop;
+static bool slave_background_thread_gtid_loaded;
+
+struct slave_background_kill_t {
+ slave_background_kill_t *next;
+ THD *to_kill;
+} *slave_background_kill_list;
pthread_handler_t
-handle_slave_init(void *arg __attribute__((unused)))
+handle_slave_background(void *arg __attribute__((unused)))
{
THD *thd;
+ PSI_stage_info old_stage;
+ bool stop;
my_thread_init();
thd= new THD(next_thread_id());
thd->thread_stack= (char*) &thd; /* Set approximate stack start */
- thd->system_thread = SYSTEM_THREAD_SLAVE_INIT;
+ thd->system_thread = SYSTEM_THREAD_SLAVE_BACKGROUND;
thread_safe_increment32(&service_thread_count);
thd->store_globals();
thd->security_ctx->skip_grants();
@@ -307,49 +316,137 @@ handle_slave_init(void *arg __attribute__((unused)))
rpl_gtid_slave_state_table_name.str,
thd->get_stmt_da()->sql_errno(),
thd->get_stmt_da()->message());
- delete thd;
- thread_safe_decrement32(&service_thread_count);
- /* Signal run_slave_init_thread() that we are done */
+ mysql_mutex_lock(&LOCK_slave_background);
+ slave_background_thread_gtid_loaded= true;
+ mysql_cond_broadcast(&COND_slave_background);
- mysql_mutex_lock(&LOCK_start_thread);
- slave_init_thread_running= false;
- mysql_cond_broadcast(&COND_start_thread);
- mysql_mutex_unlock(&LOCK_start_thread);
+ THD_STAGE_INFO(thd, stage_slave_background_process_request);
+ do
+ {
+ slave_background_kill_t *kill_list;
+
+ thd->ENTER_COND(&COND_slave_background, &LOCK_slave_background,
+ &stage_slave_background_wait_request,
+ &old_stage);
+ for (;;)
+ {
+ stop= abort_loop || thd->killed || slave_background_thread_stop;
+ kill_list= slave_background_kill_list;
+ if (stop || kill_list)
+ break;
+ mysql_cond_wait(&COND_slave_background, &LOCK_slave_background);
+ }
+
+ slave_background_kill_list= NULL;
+ thd->EXIT_COND(&old_stage);
+
+ while (kill_list)
+ {
+ slave_background_kill_t *p = kill_list;
+ THD *to_kill= p->to_kill;
+ kill_list= p->next;
+
+ mysql_mutex_lock(&to_kill->LOCK_thd_data);
+ to_kill->awake(KILL_CONNECTION);
+ mysql_mutex_unlock(&to_kill->LOCK_thd_data);
+ mysql_mutex_lock(&to_kill->LOCK_wakeup_ready);
+ to_kill->rgi_slave->killed_for_retry=
+ rpl_group_info::RETRY_KILL_KILLED;
+ mysql_cond_broadcast(&to_kill->COND_wakeup_ready);
+ mysql_mutex_unlock(&to_kill->LOCK_wakeup_ready);
+ my_free(p);
+ }
+ mysql_mutex_lock(&LOCK_slave_background);
+ } while (!stop);
+
+ slave_background_thread_running= false;
+ mysql_cond_broadcast(&COND_slave_background);
+ mysql_mutex_unlock(&LOCK_slave_background);
+
+ delete thd;
+ thread_safe_decrement32(&service_thread_count);
+ signal_thd_deleted();
my_thread_end();
return 0;
}
+
+void
+slave_background_kill_request(THD *to_kill)
+{
+ if (to_kill->rgi_slave->killed_for_retry)
+ return; // Already deadlock killed.
+ slave_background_kill_t *p=
+ (slave_background_kill_t *)my_malloc(sizeof(*p), MYF(MY_WME));
+ if (p)
+ {
+ p->to_kill= to_kill;
+ to_kill->rgi_slave->killed_for_retry=
+ rpl_group_info::RETRY_KILL_PENDING;
+ mysql_mutex_lock(&LOCK_slave_background);
+ p->next= slave_background_kill_list;
+ slave_background_kill_list= p;
+ mysql_cond_signal(&COND_slave_background);
+ mysql_mutex_unlock(&LOCK_slave_background);
+ }
+}
+
+
/*
- Start the slave init thread.
+ Start the slave background thread.
- This thread is used to load the GTID state from mysql.gtid_slave_pos at
- server start; reading from table requires valid THD, which is otherwise not
- available during server init.
+ This thread is currently used for two purposes:
+
+ 1. To load the GTID state from mysql.gtid_slave_pos at server start; reading
+ from table requires valid THD, which is otherwise not available during
+ server init.
+
+ 2. To kill worker thread transactions during parallel replication, when a
+ storage engine attempts to take an errorneous conflicting lock that would
+ cause a deadlock. Killing is done asynchroneously, as the kill may not
+ be safe within the context of a callback from inside storage engine
+ locking code.
*/
static int
-run_slave_init_thread()
+start_slave_background_thread()
{
pthread_t th;
- slave_init_thread_running= true;
- if (mysql_thread_create(key_thread_slave_init, &th, &connection_attrib,
- handle_slave_init, NULL))
+ slave_background_thread_running= true;
+ slave_background_thread_stop= false;
+ slave_background_thread_gtid_loaded= false;
+ if (mysql_thread_create(key_thread_slave_background,
+ &th, &connection_attrib, handle_slave_background,
+ NULL))
{
sql_print_error("Failed to create thread while initialising slave");
return 1;
}
- mysql_mutex_lock(&LOCK_start_thread);
- while (slave_init_thread_running)
- mysql_cond_wait(&COND_start_thread, &LOCK_start_thread);
- mysql_mutex_unlock(&LOCK_start_thread);
+ mysql_mutex_lock(&LOCK_slave_background);
+ while (!slave_background_thread_gtid_loaded)
+ mysql_cond_wait(&COND_slave_background, &LOCK_slave_background);
+ mysql_mutex_unlock(&LOCK_slave_background);
+
return 0;
}
+static void
+stop_slave_background_thread()
+{
+ mysql_mutex_lock(&LOCK_slave_background);
+ slave_background_thread_stop= true;
+ mysql_cond_broadcast(&COND_slave_background);
+ while (slave_background_thread_running)
+ mysql_cond_wait(&COND_slave_background, &LOCK_slave_background);
+ mysql_mutex_unlock(&LOCK_slave_background);
+}
+
+
/* Initialize slave structures */
int init_slave()
@@ -361,7 +458,7 @@ int init_slave()
init_slave_psi_keys();
#endif
- if (run_slave_init_thread())
+ if (start_slave_background_thread())
return 1;
if (global_rpl_thread_pool.init(opt_slave_parallel_threads))
@@ -647,6 +744,7 @@ int terminate_slave_threads(Master_info* mi,int thread_mask,bool skip_lock)
mysql_mutex_unlock(log_lock);
}
if (opt_slave_parallel_threads > 0 &&
+ master_info_index &&// master_info_index is set to NULL on server shutdown
!master_info_index->any_slave_sql_running())
rpl_parallel_inactivate_pool(&global_rpl_thread_pool);
if (thread_mask & (SLAVE_IO|SLAVE_FORCE_ALL))
@@ -1000,6 +1098,9 @@ void end_slave()
master_info_index= 0;
active_mi= 0;
mysql_mutex_unlock(&LOCK_active_mi);
+
+ stop_slave_background_thread();
+
global_rpl_thread_pool.destroy();
free_all_rpl_filters();
DBUG_VOID_RETURN;
@@ -4111,6 +4212,7 @@ connected:
}
DBUG_PRINT("info",("Starting reading binary log from master"));
+ thd->set_command(COM_SLAVE_IO);
while (!io_slave_killed(mi))
{
THD_STAGE_INFO(thd, stage_requesting_binlog_dump);
@@ -4604,11 +4706,11 @@ pthread_handler_t handle_slave_sql(void *arg)
{
rli->report(ERROR_LEVEL, ER_SLAVE_FATAL_ERROR, NULL,
"Error initializing relay log position: %s", errmsg);
- goto err;
+ goto err_before_start;
}
rli->reset_inuse_relaylog();
if (rli->alloc_inuse_relaylog(rli->group_relay_log_name))
- goto err;
+ goto err_before_start;
strcpy(rli->future_event_master_log_name, rli->group_master_log_name);
THD_CHECK_SENTRY(thd);
@@ -4733,6 +4835,7 @@ pthread_handler_t handle_slave_sql(void *arg)
/* Read queries from the IO/THREAD until this thread is killed */
+ thd->set_command(COM_SLAVE_SQL);
while (!sql_slave_killed(serial_rgi))
{
THD_STAGE_INFO(thd, stage_reading_event_from_the_relay_log);
@@ -4785,6 +4888,7 @@ pthread_handler_t handle_slave_sql(void *arg)
}
}
+ err:
if (mi->using_parallel())
rli->parallel.wait_for_done(thd, rli);
@@ -4802,15 +4906,7 @@ pthread_handler_t handle_slave_sql(void *arg)
rli->group_master_log_pos, tmp.c_ptr_safe());
}
- err:
-
- /*
- Once again, in case we aborted with an error and skipped the first one.
- (We want the first one to be before the printout of stop position to
- get the correct position printed.)
- */
- if (mi->using_parallel())
- rli->parallel.wait_for_done(thd, rli);
+ err_before_start:
/*
Some events set some playgrounds, which won't be cleared because thread
@@ -6210,9 +6306,9 @@ static int connect_to_master(THD* thd, MYSQL* mysql, Master_info* mi,
#ifndef DBUG_OFF
mi->events_till_disconnect = disconnect_slave_event_count;
#endif
- ulong client_flag= 0;
+ ulong client_flag= CLIENT_REMEMBER_OPTIONS;
if (opt_slave_compressed_protocol)
- client_flag=CLIENT_COMPRESS; /* We will use compression */
+ client_flag|= CLIENT_COMPRESS; /* We will use compression */
mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT, (char *) &slave_net_timeout);
mysql_options(mysql, MYSQL_OPT_READ_TIMEOUT, (char *) &slave_net_timeout);
diff --git a/sql/slave.h b/sql/slave.h
index 7f412c1091c..e8a925ce560 100644
--- a/sql/slave.h
+++ b/sql/slave.h
@@ -250,6 +250,7 @@ pthread_handler_t handle_slave_io(void *arg);
void slave_output_error_info(rpl_group_info *rgi, THD *thd);
pthread_handler_t handle_slave_sql(void *arg);
bool net_request_file(NET* net, const char* fname);
+void slave_background_kill_request(THD *to_kill);
extern bool volatile abort_loop;
extern Master_info *active_mi; /* active_mi for multi-master */
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 6b048cec68b..41006f07a0a 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -2048,6 +2048,8 @@ sp_head::execute_procedure(THD *thd, List<Item> *args)
break;
}
}
+
+ TRANSACT_TRACKER(add_trx_state_from_thd(thd));
}
/*
@@ -2977,6 +2979,18 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp,
reinit_stmt_before_use(thd, m_lex);
+#ifndef EMBEDDED_LIBRARY
+ /*
+ If there was instruction which changed tracking state,
+ the result of changed tracking state send to client in OK packed.
+ So it changes result sent to client and probably can be different
+ independent on query text. So we can't cache such results.
+ */
+ if ((thd->client_capabilities & CLIENT_SESSION_TRACK) &&
+ (thd->server_status & SERVER_SESSION_STATE_CHANGED))
+ thd->lex->safe_to_cache_query= 0;
+#endif
+
if (open_tables)
res= instr->exec_open_and_lock_tables(thd, m_lex->query_tables);
@@ -3053,6 +3067,9 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp,
what is needed from the substatement gained
*/
thd->transaction.stmt.modified_non_trans_table |= parent_modified_non_trans_table;
+
+ TRANSACT_TRACKER(add_trx_state_from_thd(thd));
+
/*
Unlike for PS we should not call Item's destructors for newly created
items after execution of each instruction in stored routine. This is
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 37e6e769a89..f0f96d340cc 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -31,7 +31,7 @@
#include "sql_base.h" // close_mysql_tables
#include "key.h" // key_copy, key_cmp_if_same, key_restore
#include "sql_show.h" // append_identifier
-#include "sql_table.h" // build_table_filename
+#include "sql_table.h" // write_bin_log
#include "hash_filo.h"
#include "sql_parse.h" // check_access
#include "sql_view.h" // VIEW_ANY_ACL
@@ -2009,8 +2009,7 @@ bool acl_getroot(Security_context *sctx, char *user, char *host,
sctx->master_access= acl_role->access;
if (acl_role->user.str)
- strmake_buf(sctx->priv_user, user);
- sctx->priv_host[0]= 0;
+ strmake_buf(sctx->priv_role, user);
}
}
@@ -2796,7 +2795,7 @@ bool change_password(THD *thd, LEX_USER *user)
if (WSREP(thd) && !IF_WSREP(thd->wsrep_applier, 0))
{
- thd->set_query_inner(buff, query_length, system_charset_info);
+ thd->set_query(buff, query_length, system_charset_info);
WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, (char*)"user", NULL);
}
@@ -2857,7 +2856,7 @@ error: // this label is used in WSREP_TO_ISOLATION_BEGIN
{
WSREP_TO_ISOLATION_END;
- thd->set_query_inner(query_save);
+ thd->set_query(query_save);
thd->wsrep_exec_mode = LOCAL_STATE;
}
#endif /* WITH_WSREP */
@@ -2921,7 +2920,7 @@ int acl_set_default_role(THD *thd, const char *host, const char *user,
if (WSREP(thd) && !IF_WSREP(thd->wsrep_applier, 0))
{
- thd->set_query_inner(buff, query_length, system_charset_info);
+ thd->set_query(buff, query_length, system_charset_info);
WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, (char*)"user", NULL);
}
@@ -3008,7 +3007,7 @@ error: // this label is used in WSREP_TO_ISOLATION_END
{
WSREP_TO_ISOLATION_END;
- thd->set_query_inner(query_save);
+ thd->set_query(query_save);
thd->wsrep_exec_mode = LOCAL_STATE;
}
#endif /* WITH_WSREP */
@@ -7162,7 +7161,7 @@ bool check_column_grant_in_table_ref(THD *thd, TABLE_LIST * table_ref,
GRANT_INFO *grant;
const char *db_name;
const char *table_name;
- Security_context *sctx= MY_TEST(table_ref->security_ctx) ?
+ Security_context *sctx= table_ref->security_ctx ?
table_ref->security_ctx : thd->security_ctx;
if (table_ref->view || table_ref->field_translation)
@@ -11078,7 +11077,7 @@ void fill_effective_table_privileges(THD *thd, GRANT_INFO *grant,
/* global privileges */
grant->privilege= sctx->master_access;
- if (!sctx->priv_user[0])
+ if (!sctx->priv_user[0] && !sctx->priv_role[0])
{
DBUG_PRINT("info", ("privilege 0x%lx", grant->privilege));
DBUG_VOID_RETURN; // it is slave
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc
index 578b78d8f35..ed23d9cccd6 100644
--- a/sql/sql_admin.cc
+++ b/sql/sql_admin.cc
@@ -296,6 +296,97 @@ static inline bool table_not_corrupt_error(uint sql_errno)
}
+static bool open_only_one_table(THD* thd, TABLE_LIST* table,
+ bool repair_table_use_frm,
+ bool is_view_operator_func)
+{
+ LEX *lex= thd->lex;
+ SELECT_LEX *select= &lex->select_lex;
+ TABLE_LIST *save_next_global, *save_next_local;
+ bool open_error;
+ save_next_global= table->next_global;
+ table->next_global= 0;
+ save_next_local= table->next_local;
+ table->next_local= 0;
+ select->table_list.first= table;
+ /*
+ Time zone tables and SP tables can be add to lex->query_tables list,
+ so it have to be prepared.
+ TODO: Investigate if we can put extra tables into argument instead of
+ using lex->query_tables
+ */
+ lex->query_tables= table;
+ lex->query_tables_last= &table->next_global;
+ lex->query_tables_own_last= 0;
+
+ /*
+ CHECK TABLE command is allowed for views as well. Check on alter flags
+ to differentiate from ALTER TABLE...CHECK PARTITION on which view is not
+ allowed.
+ */
+ if (lex->alter_info.flags & Alter_info::ALTER_ADMIN_PARTITION ||
+ !is_view_operator_func)
+ {
+ table->required_type=FRMTYPE_TABLE;
+ DBUG_ASSERT(!lex->only_view);
+ }
+ else if (lex->only_view)
+ {
+ table->required_type= FRMTYPE_VIEW;
+ }
+ else if (!lex->only_view && lex->sql_command == SQLCOM_REPAIR)
+ {
+ table->required_type= FRMTYPE_TABLE;
+ }
+
+ if (lex->sql_command == SQLCOM_CHECK ||
+ lex->sql_command == SQLCOM_REPAIR ||
+ lex->sql_command == SQLCOM_ANALYZE ||
+ lex->sql_command == SQLCOM_OPTIMIZE)
+ thd->prepare_derived_at_open= TRUE;
+ if (!thd->locked_tables_mode && repair_table_use_frm)
+ {
+ /*
+ If we're not under LOCK TABLES and we're executing REPAIR TABLE
+ USE_FRM, we need to ignore errors from open_and_lock_tables().
+ REPAIR TABLE USE_FRM is a heavy weapon used when a table is
+ critically damaged, so open_and_lock_tables() will most likely
+ report errors. Those errors are not interesting for the user
+ because it's already known that the table is badly damaged.
+ */
+
+ Diagnostics_area *da= thd->get_stmt_da();
+ Warning_info tmp_wi(thd->query_id, false, true);
+
+ da->push_warning_info(&tmp_wi);
+
+ open_error= (thd->open_temporary_tables(table) ||
+ open_and_lock_tables(thd, table, TRUE, 0));
+
+ da->pop_warning_info();
+ }
+ else
+ {
+ /*
+ It's assumed that even if it is REPAIR TABLE USE_FRM, the table
+ can be opened if we're under LOCK TABLES (otherwise LOCK TABLES
+ would fail). Thus, the only errors we could have from
+ open_and_lock_tables() are logical ones, like incorrect locking
+ mode. It does make sense for the user to see such errors.
+ */
+
+ open_error= (thd->open_temporary_tables(table) ||
+ open_and_lock_tables(thd, table, TRUE, 0));
+ }
+ thd->prepare_derived_at_open= FALSE;
+
+ table->next_global= save_next_global;
+ table->next_local= save_next_local;
+
+ return open_error;
+}
+
+
/*
RETURN VALUES
FALSE Message sent to net (admin operation went ok)
@@ -317,7 +408,6 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
HA_CHECK_OPT *))
{
TABLE_LIST *table;
- SELECT_LEX *select= &thd->lex->select_lex;
List<Item> field_list;
Item *item;
Protocol *protocol= thd->protocol;
@@ -392,85 +482,9 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
/* open only one table from local list of command */
while (1)
{
- TABLE_LIST *save_next_global, *save_next_local;
- save_next_global= table->next_global;
- table->next_global= 0;
- save_next_local= table->next_local;
- table->next_local= 0;
- select->table_list.first= table;
- /*
- Time zone tables and SP tables can be add to lex->query_tables list,
- so it have to be prepared.
- TODO: Investigate if we can put extra tables into argument instead of
- using lex->query_tables
- */
- lex->query_tables= table;
- lex->query_tables_last= &table->next_global;
- lex->query_tables_own_last= 0;
-
- /*
- CHECK TABLE command is allowed for views as well. Check on alter flags
- to differentiate from ALTER TABLE...CHECK PARTITION on which view is not
- allowed.
- */
- if (lex->alter_info.flags & Alter_info::ALTER_ADMIN_PARTITION ||
- view_operator_func == NULL)
- {
- table->required_type=FRMTYPE_TABLE;
- DBUG_ASSERT(!lex->only_view);
- }
- else if (lex->only_view)
- {
- table->required_type= FRMTYPE_VIEW;
- }
- else if (!lex->only_view && lex->sql_command == SQLCOM_REPAIR)
- {
- table->required_type= FRMTYPE_TABLE;
- }
-
- if (lex->sql_command == SQLCOM_CHECK ||
- lex->sql_command == SQLCOM_REPAIR ||
- lex->sql_command == SQLCOM_ANALYZE ||
- lex->sql_command == SQLCOM_OPTIMIZE)
- thd->prepare_derived_at_open= TRUE;
- if (!thd->locked_tables_mode && repair_table_use_frm)
- {
- /*
- If we're not under LOCK TABLES and we're executing REPAIR TABLE
- USE_FRM, we need to ignore errors from open_and_lock_tables().
- REPAIR TABLE USE_FRM is a heavy weapon used when a table is
- critically damaged, so open_and_lock_tables() will most likely
- report errors. Those errors are not interesting for the user
- because it's already known that the table is badly damaged.
- */
-
- Diagnostics_area *da= thd->get_stmt_da();
- Warning_info tmp_wi(thd->query_id, false, true);
-
- da->push_warning_info(&tmp_wi);
-
- open_error= (thd->open_temporary_tables(table) ||
- open_and_lock_tables(thd, table, TRUE, 0));
-
- da->pop_warning_info();
- }
- else
- {
- /*
- It's assumed that even if it is REPAIR TABLE USE_FRM, the table
- can be opened if we're under LOCK TABLES (otherwise LOCK TABLES
- would fail). Thus, the only errors we could have from
- open_and_lock_tables() are logical ones, like incorrect locking
- mode. It does make sense for the user to see such errors.
- */
-
- open_error= (thd->open_temporary_tables(table) ||
- open_and_lock_tables(thd, table, TRUE, 0));
- }
- thd->prepare_derived_at_open= FALSE;
-
- table->next_global= save_next_global;
- table->next_local= save_next_local;
+ open_error= open_only_one_table(thd, table,
+ repair_table_use_frm,
+ (view_operator_func != NULL));
thd->open_options&= ~extra_open_options;
/*
@@ -711,7 +725,6 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
if (operator_func == &handler::ha_analyze)
{
TABLE *tab= table->table;
- Field **field_ptr= tab->field;
if (lex->with_persistent_for_clause &&
tab->s->table_category != TABLE_CATEGORY_USER)
@@ -723,58 +736,6 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
(get_use_stat_tables_mode(thd) > NEVER ||
lex->with_persistent_for_clause));
- if (collect_eis)
- {
- if (!lex->column_list)
- {
- bitmap_clear_all(tab->read_set);
- for (uint fields= 0; *field_ptr; field_ptr++, fields++)
- {
- enum enum_field_types type= (*field_ptr)->type();
- if (type < MYSQL_TYPE_MEDIUM_BLOB ||
- type > MYSQL_TYPE_BLOB)
- bitmap_set_bit(tab->read_set, fields);
- else if (collect_eis)
- push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
- ER_NO_EIS_FOR_FIELD,
- ER_THD(thd, ER_NO_EIS_FOR_FIELD),
- (*field_ptr)->field_name);
- }
- }
- else
- {
- int pos;
- LEX_STRING *column_name;
- List_iterator_fast<LEX_STRING> it(*lex->column_list);
-
- bitmap_clear_all(tab->read_set);
- while ((column_name= it++))
- {
- if (tab->s->fieldnames.type_names == 0 ||
- (pos= find_type(&tab->s->fieldnames, column_name->str,
- column_name->length, 1)) <= 0)
- {
- compl_result_code= result_code= HA_ADMIN_INVALID;
- break;
- }
- pos--;
- enum enum_field_types type= tab->field[pos]->type();
- if (type < MYSQL_TYPE_MEDIUM_BLOB ||
- type > MYSQL_TYPE_BLOB)
- bitmap_set_bit(tab->read_set, pos);
- else if (collect_eis)
- push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
- ER_NO_EIS_FOR_FIELD,
- ER_THD(thd, ER_NO_EIS_FOR_FIELD),
- column_name->str);
- }
- tab->file->column_bitmaps_signal();
- }
- }
- else
- {
- DBUG_ASSERT(!lex->column_list);
- }
if (!lex->index_list)
{
@@ -812,7 +773,77 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
if (compl_result_code == HA_ADMIN_OK && collect_eis)
{
- if (!(compl_result_code=
+ /*
+ Here we close and reopen table in read mode because operation of
+ collecting statistics is long and it will be better do not block
+ the table completely.
+ InnoDB/XtraDB will allow read/write and MyISAM read/insert.
+ */
+ trans_commit_stmt(thd);
+ trans_commit(thd);
+ thd->open_options|= extra_open_options;
+ close_thread_tables(thd);
+ table->table= NULL;
+ thd->mdl_context.release_transactional_locks();
+ table->mdl_request.init(MDL_key::TABLE, table->db, table->table_name,
+ MDL_SHARED_NO_READ_WRITE, MDL_TRANSACTION);
+ table->mdl_request.set_type(MDL_SHARED_READ);
+
+ table->lock_type= TL_READ;
+ DBUG_ASSERT(view_operator_func == NULL);
+ open_error= open_only_one_table(thd, table,
+ repair_table_use_frm, FALSE);
+ thd->open_options&= ~extra_open_options;
+
+ TABLE *tab= table->table;
+ Field **field_ptr= tab->field;
+ if (!lex->column_list)
+ {
+ bitmap_clear_all(tab->read_set);
+ for (uint fields= 0; *field_ptr; field_ptr++, fields++)
+ {
+ enum enum_field_types type= (*field_ptr)->type();
+ if (type < MYSQL_TYPE_MEDIUM_BLOB ||
+ type > MYSQL_TYPE_BLOB)
+ bitmap_set_bit(tab->read_set, fields);
+ else
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_NO_EIS_FOR_FIELD,
+ ER_THD(thd, ER_NO_EIS_FOR_FIELD),
+ (*field_ptr)->field_name);
+ }
+ }
+ else
+ {
+ int pos;
+ LEX_STRING *column_name;
+ List_iterator_fast<LEX_STRING> it(*lex->column_list);
+
+ bitmap_clear_all(tab->read_set);
+ while ((column_name= it++))
+ {
+ if (tab->s->fieldnames.type_names == 0 ||
+ (pos= find_type(&tab->s->fieldnames, column_name->str,
+ column_name->length, 1)) <= 0)
+ {
+ compl_result_code= result_code= HA_ADMIN_INVALID;
+ break;
+ }
+ pos--;
+ enum enum_field_types type= tab->field[pos]->type();
+ if (type < MYSQL_TYPE_MEDIUM_BLOB ||
+ type > MYSQL_TYPE_BLOB)
+ bitmap_set_bit(tab->read_set, pos);
+ else
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_NO_EIS_FOR_FIELD,
+ ER_THD(thd, ER_NO_EIS_FOR_FIELD),
+ column_name->str);
+ }
+ tab->file->column_bitmaps_signal();
+ }
+ if (!open_error &&
+ !(compl_result_code=
alloc_statistics_for_table(thd, table->table)) &&
!(compl_result_code=
collect_statistics_for_table(thd, table->table)))
diff --git a/sql/sql_alter.h b/sql/sql_alter.h
index 9e5fbaa425f..faba3a14a1b 100644
--- a/sql/sql_alter.h
+++ b/sql/sql_alter.h
@@ -174,6 +174,8 @@ public:
List<Key> key_list;
// List of columns, used by both CREATE and ALTER TABLE.
List<Create_field> create_list;
+
+ static const uint CHECK_CONSTRAINT_IF_NOT_EXISTS= 1;
List<Virtual_column_info> check_constraint_list;
// Type of ALTER TABLE operation.
uint flags;
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 3481bf1a2d3..d3832a7068e 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2015, Oracle and/or its affiliates.
+/* Copyright (c) 2000, 2016, Oracle and/or its affiliates.
Copyright (c) 2010, 2016, MariaDB
This program is free software; you can redistribute it and/or modify
@@ -638,6 +638,8 @@ close_all_tables_for_name(THD *thd, TABLE_SHARE *share,
ha_extra_function extra,
TABLE *skip_table)
{
+ DBUG_ASSERT(!share->tmp_table);
+
char key[MAX_DBKEY_LENGTH];
uint key_length= share->table_cache_key.length;
const char *db= key;
@@ -876,8 +878,7 @@ void close_thread_table(THD *thd, TABLE **table_ptr)
Do this *before* entering the TABLE_SHARE::tdc.LOCK_table_share
critical section.
*/
- if (table->file != NULL)
- MYSQL_UNBIND_TABLE(table->file);
+ MYSQL_UNBIND_TABLE(table->file);
tc_release_table(table);
DBUG_VOID_RETURN;
@@ -1173,6 +1174,7 @@ bool wait_while_table_is_used(THD *thd, TABLE *table,
enum ha_extra_function function)
{
DBUG_ENTER("wait_while_table_is_used");
+ DBUG_ASSERT(!table->s->tmp_table);
DBUG_PRINT("enter", ("table: '%s' share: 0x%lx db_stat: %u version: %lu",
table->s->table_name.str, (ulong) table->s,
table->db_stat, table->s->tdc->version));
@@ -2090,6 +2092,9 @@ Locked_tables_list::init_locked_tables(THD *thd)
return TRUE;
}
}
+
+ TRANSACT_TRACKER(add_trx_state(thd, TX_LOCKED_TABLES));
+
thd->enter_locked_tables_mode(LTM_LOCK_TABLES);
return FALSE;
@@ -2130,6 +2135,8 @@ Locked_tables_list::unlock_locked_tables(THD *thd)
}
thd->leave_locked_tables_mode();
+ TRANSACT_TRACKER(clear_trx_state(thd, TX_LOCKED_TABLES));
+
DBUG_ASSERT(thd->transaction.stmt.is_empty());
close_thread_tables(thd);
@@ -4203,6 +4210,15 @@ handle_view(THD *thd, Query_tables_list *prelocking_ctx,
&table_list->view->sroutines_list,
table_list->top_table());
}
+
+ /*
+ If a trigger was defined on one of the associated tables then assign the
+ 'trg_event_map' value of the view to the next table in table_list. When a
+ Stored function is invoked, all the associated tables including the tables
+ associated with the trigger are prelocked.
+ */
+ if (table_list->trg_event_map && table_list->next_global)
+ table_list->next_global->trg_event_map= table_list->trg_event_map;
return FALSE;
}
@@ -4351,6 +4367,13 @@ static bool check_lock_and_start_stmt(THD *thd,
table_list->table->file->print_error(error, MYF(0));
DBUG_RETURN(1);
}
+
+ /*
+ Record in transaction state tracking
+ */
+ TRANSACT_TRACKER(add_trx_state(thd, lock_type,
+ table_list->table->file->has_transactions()));
+
DBUG_RETURN(0);
}
@@ -4684,6 +4707,45 @@ static void mark_real_tables_as_free_for_reuse(TABLE_LIST *table_list)
}
+static bool fix_all_session_vcol_exprs(THD *thd, TABLE_LIST *tables)
+{
+ Security_context *save_security_ctx= thd->security_ctx;
+ TABLE_LIST *first_not_own= thd->lex->first_not_own_table();
+ DBUG_ENTER("fix_session_vcol_expr");
+
+ for (TABLE_LIST *table= tables; table && table != first_not_own;
+ table= table->next_global)
+ {
+ TABLE *t= table->table;
+ if (!table->placeholder() && t->s->vcols_need_refixing &&
+ table->lock_type >= TL_WRITE_ALLOW_WRITE)
+ {
+ if (table->security_ctx)
+ thd->security_ctx= table->security_ctx;
+
+ for (Field **vf= t->vfield; vf && *vf; vf++)
+ if (fix_session_vcol_expr(thd, (*vf)->vcol_info))
+ goto err;
+
+ for (Field **df= t->default_field; df && *df; df++)
+ if ((*df)->default_value &&
+ fix_session_vcol_expr(thd, (*df)->default_value))
+ goto err;
+
+ for (Virtual_column_info **cc= t->check_constraints; cc && *cc; cc++)
+ if (fix_session_vcol_expr(thd, (*cc)))
+ goto err;
+
+ thd->security_ctx= save_security_ctx;
+ }
+ }
+ DBUG_RETURN(0);
+err:
+ thd->security_ctx= save_security_ctx;
+ DBUG_RETURN(1);
+}
+
+
/**
Lock all tables in a list.
@@ -4845,7 +4907,11 @@ bool lock_tables(THD *thd, TABLE_LIST *tables, uint count,
}
}
- DBUG_RETURN(thd->decide_logging_format(tables));
+ bool res= fix_all_session_vcol_exprs(thd, tables);
+ if (!res)
+ res= thd->decide_logging_format(tables);
+
+ DBUG_RETURN(res);
}
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index 06c5f992939..8ff4684f0ff 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -1381,6 +1381,21 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used)
DBUG_VOID_RETURN;
}
+ /*
+ Do not store queries while tracking transaction state.
+ The tracker already flags queries that actually have
+ transaction tracker items, but this will make behavior
+ more straight forward.
+ */
+#ifndef EMBEDDED_LIBRARY
+ if (thd->variables.session_track_transaction_info != TX_TRACK_NONE)
+ {
+ DBUG_PRINT("qcache", ("Do not work with transaction tracking"));
+ DBUG_VOID_RETURN;
+ }
+#endif //EMBEDDED_LIBRARY
+
+
/* The following assert fails if we haven't called send_result_to_client */
DBUG_ASSERT(thd->base_query.is_alloced() ||
thd->base_query.ptr() == thd->query());
@@ -1719,6 +1734,20 @@ Query_cache::send_result_to_client(THD *thd, char *org_sql, uint query_length)
goto err;
}
+ /*
+ Don't allow serving from Query_cache while tracking transaction
+ state. This is a safeguard in case an otherwise matching query
+ was added to the cache before tracking was turned on.
+ */
+#ifndef EMBEDDED_LIBRARY
+ if (thd->variables.session_track_transaction_info != TX_TRACK_NONE)
+ {
+ DBUG_PRINT("qcache", ("Do not work with transaction tracking"));
+ goto err;
+ }
+#endif //EMBEDDED_LIBRARY
+
+
thd->query_cache_is_applicable= 1;
sql= org_sql; sql_end= sql + query_length;
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 9710ea8bbe3..6433786a079 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -870,7 +870,7 @@ THD::THD(my_thread_id id, bool is_wsrep_applier)
is_fatal_sub_stmt_error(false),
rand_used(0),
time_zone_used(0),
- in_lock_tables(0), in_stored_expression(0),
+ in_lock_tables(0),
bootstrap(0),
derived_tables_processing(FALSE),
waiting_on_group_commit(FALSE), has_waiter(FALSE),
@@ -1018,6 +1018,7 @@ THD::THD(my_thread_id id, bool is_wsrep_applier)
wsrep_TOI_pre_query_len = 0;
wsrep_info[sizeof(wsrep_info) - 1] = '\0'; /* make sure it is 0-terminated */
wsrep_sync_wait_gtid = WSREP_GTID_UNDEFINED;
+ wsrep_affected_rows = 0;
#endif
/* Call to init() below requires fully initialized Open_tables_state. */
reset_open_tables_state(this);
@@ -1448,6 +1449,7 @@ void THD::init(void)
wsrep_TOI_pre_query = NULL;
wsrep_TOI_pre_query_len = 0;
wsrep_sync_wait_gtid = WSREP_GTID_UNDEFINED;
+ wsrep_affected_rows = 0;
#endif /* WITH_WSREP */
if (variables.sql_log_bin)
@@ -1465,6 +1467,11 @@ void THD::init(void)
/* Initialize the Debug Sync Facility. See debug_sync.cc. */
debug_sync_init_thread(this);
#endif /* defined(ENABLED_DEBUG_SYNC) */
+
+#ifndef EMBEDDED_LIBRARY
+ session_tracker.enable(this);
+#endif //EMBEDDED_LIBRARY
+
apc_target.init(&LOCK_thd_data);
DBUG_VOID_RETURN;
}
@@ -1661,7 +1668,9 @@ void THD::free_connection()
/* close all prepared statements, to save memory */
stmt_map.reset();
free_connection_done= 1;
+#if defined(ENABLED_PROFILING)
profiling.restart(); // Reset profiling
+#endif
}
/*
@@ -1686,7 +1695,9 @@ void THD::reset_for_reuse()
abort_on_warning= 0;
free_connection_done= 0;
m_command= COM_CONNECT;
+#if defined(ENABLED_PROFILING)
profiling.reset();
+#endif
#ifdef SIGNAL_WITH_VIO_CLOSE
active_vio = 0;
#endif
@@ -1759,6 +1770,12 @@ THD::~THD()
lf_hash_put_pins(xid_hash_pins);
/* Ensure everything is freed */
status_var.local_memory_used-= sizeof(THD);
+
+ /* trick to make happy memory accounting system */
+#ifndef EMBEDDED_LIBRARY
+ session_tracker.deinit();
+#endif //EMBEDDED_LIBRARY
+
if (status_var.local_memory_used != 0)
{
DBUG_PRINT("error", ("memory_used: %lld", status_var.local_memory_used));
@@ -2296,6 +2313,8 @@ void THD::cleanup_after_query()
#ifdef WITH_WSREP
wsrep_sync_wait_gtid= WSREP_GTID_UNDEFINED;
+ if (!in_active_multi_stmt_transaction())
+ wsrep_affected_rows= 0;
#endif /* WITH_WSREP */
DBUG_VOID_RETURN;
@@ -2334,7 +2353,7 @@ bool THD::convert_string(LEX_STRING *to, CHARSET_INFO *to_cs,
to->length= copy_and_convert((char*) to->str, new_length, to_cs,
from, from_length, from_cs, &errors);
to->str[to->length]= 0; // Safety
- if (errors && in_stored_expression)
+ if (errors && lex->parse_vcol_expr)
{
my_error(ER_BAD_DATA, MYF(0),
ErrConvString(from, from_length, from_cs).ptr(),
@@ -4665,13 +4684,88 @@ thd_report_wait_for(MYSQL_THD thd, MYSQL_THD other_thd)
cause replication to rollback (and later re-try) the other transaction,
releasing the lock for this transaction so replication can proceed.
*/
- other_rgi->killed_for_retry= true;
+ other_rgi->killed_for_retry= rpl_group_info::RETRY_KILL_KILLED;
mysql_mutex_lock(&other_thd->LOCK_thd_data);
other_thd->awake(KILL_CONNECTION);
mysql_mutex_unlock(&other_thd->LOCK_thd_data);
}
/*
+ Used by storage engines (currently TokuDB) to report that one transaction
+ THD is about to go to wait for a transactional lock held by another
+ transactions OTHER_THD.
+
+ This is used for parallel replication, where transactions are required to
+ commit in the same order on the slave as they did on the master. If the
+ transactions on the slave encounter lock conflicts on the slave that did not
+ exist on the master, this can cause deadlocks. This is primarily used in
+ optimistic (and aggressive) modes.
+
+ Normally, such conflicts will not occur in conservative mode, because the
+ same conflict would have prevented the two transactions from committing in
+ parallel on the master, thus preventing them from running in parallel on the
+ slave in the first place. However, it is possible in case when the optimizer
+ chooses a different plan on the slave than on the master (eg. table scan
+ instead of index scan).
+
+ InnoDB/XtraDB reports lock waits using this call. If a lock wait causes a
+ deadlock with the pre-determined commit order, we kill the later transaction,
+ and later re-try it, to resolve the deadlock.
+
+ This call need only receive reports about waits for locks that will remain
+ until the holding transaction commits. InnoDB/XtraDB auto-increment locks,
+ for example, are released earlier, and so need not be reported. (Such false
+ positives are not harmful, but could lead to unnecessary kill and retry, so
+ best avoided).
+
+ Returns 1 if the OTHER_THD will be killed to resolve deadlock, 0 if not. The
+ actual kill will happen later, asynchronously from another thread. The
+ caller does not need to take any actions on the return value if the
+ handlerton kill_query method is implemented to abort the to-be-killed
+ transaction.
+*/
+extern "C" int
+thd_rpl_deadlock_check(MYSQL_THD thd, MYSQL_THD other_thd)
+{
+ rpl_group_info *rgi;
+ rpl_group_info *other_rgi;
+
+ if (!thd)
+ return 0;
+ DEBUG_SYNC(thd, "thd_report_wait_for");
+ thd->transaction.stmt.mark_trans_did_wait();
+ if (!other_thd)
+ return 0;
+ binlog_report_wait_for(thd, other_thd);
+ rgi= thd->rgi_slave;
+ other_rgi= other_thd->rgi_slave;
+ if (!rgi || !other_rgi)
+ return 0;
+ if (!rgi->is_parallel_exec)
+ return 0;
+ if (rgi->rli != other_rgi->rli)
+ return 0;
+ if (!rgi->gtid_sub_id || !other_rgi->gtid_sub_id)
+ return 0;
+ if (rgi->current_gtid.domain_id != other_rgi->current_gtid.domain_id)
+ return 0;
+ if (rgi->gtid_sub_id > other_rgi->gtid_sub_id)
+ return 0;
+ /*
+ This transaction is about to wait for another transaction that is required
+ by replication binlog order to commit after. This would cause a deadlock.
+
+ So send a kill to the other transaction, with a temporary error; this will
+ cause replication to rollback (and later re-try) the other transaction,
+ releasing the lock for this transaction so replication can proceed.
+ */
+#ifdef HAVE_REPLICATION
+ slave_background_kill_request(other_thd);
+#endif
+ return 1;
+}
+
+/*
This function is called from InnoDB/XtraDB to check if the commit order of
two transactions has already been decided by the upper layer. This happens
in parallel replication, where the commit order is forced to be the same on
@@ -5267,7 +5361,11 @@ void THD::get_definer(LEX_USER *definer, bool role)
{
binlog_invoker(role);
#if !defined(MYSQL_CLIENT) && defined(HAVE_REPLICATION)
+#ifdef WITH_WSREP
+ if ((wsrep_applier || slave_thread) && has_invoker())
+#else
if (slave_thread && has_invoker())
+#endif
{
definer->user = invoker_user;
definer->host= invoker_host;
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 5a24a2ed2a4..2240b5fe0a9 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -46,6 +46,7 @@
#include <mysql/psi/mysql_idle.h>
#include <mysql/psi/mysql_table.h>
#include <mysql_com_server.h>
+#include "session_tracker.h"
extern "C"
void set_thd_stage_info(void *thd,
@@ -566,6 +567,7 @@ typedef struct system_variables
ulong max_allowed_packet;
ulong max_error_count;
ulong max_length_for_sort_data;
+ ulong max_recursive_iterations;
ulong max_sort_length;
ulong max_tmp_tables;
ulong max_insert_delayed_threads;
@@ -636,6 +638,7 @@ typedef struct system_variables
my_bool old_alter_table;
my_bool old_passwords;
my_bool big_tables;
+ my_bool only_standards_compliant_cte;
my_bool query_cache_strip_comments;
my_bool sql_log_slow;
my_bool sql_log_bin;
@@ -689,6 +692,11 @@ typedef struct system_variables
my_bool pseudo_slave_mode;
+ char *session_track_system_variables;
+ ulong session_track_transaction_info;
+ my_bool session_track_schema;
+ my_bool session_track_state_change;
+
} SV;
/**
@@ -723,9 +731,11 @@ typedef struct system_status_var
ulong ha_read_key_count;
ulong ha_read_next_count;
ulong ha_read_prev_count;
+ ulong ha_read_retry_count;
ulong ha_read_rnd_count;
ulong ha_read_rnd_next_count;
ulong ha_read_rnd_deleted_count;
+
/*
This number doesn't include calls to the default implementation and
calls made by range access. The intent is to count only calls made by
@@ -759,6 +769,8 @@ typedef struct system_status_var
ulong select_range_count_;
ulong select_range_check_count_;
ulong select_scan_count_;
+ ulong update_scan_count;
+ ulong delete_scan_count;
ulong executed_triggers;
ulong long_query_count;
ulong filesort_merge_passes_;
@@ -824,8 +836,7 @@ typedef struct system_status_var
Global status variables
*/
-extern ulong feature_files_opened_with_delayed_keys;
-
+extern ulong feature_files_opened_with_delayed_keys, feature_check_constraint;
void add_to_status(STATUS_VAR *to_var, STATUS_VAR *from_var);
@@ -1519,7 +1530,7 @@ enum enum_thread_type
SYSTEM_THREAD_EVENT_SCHEDULER= 8,
SYSTEM_THREAD_EVENT_WORKER= 16,
SYSTEM_THREAD_BINLOG_BACKGROUND= 32,
- SYSTEM_THREAD_SLAVE_INIT= 64
+ SYSTEM_THREAD_SLAVE_BACKGROUND= 64
};
inline char const *
@@ -1534,7 +1545,7 @@ show_system_thread(enum_thread_type thread)
RETURN_NAME_AS_STRING(SYSTEM_THREAD_SLAVE_SQL);
RETURN_NAME_AS_STRING(SYSTEM_THREAD_EVENT_SCHEDULER);
RETURN_NAME_AS_STRING(SYSTEM_THREAD_EVENT_WORKER);
- RETURN_NAME_AS_STRING(SYSTEM_THREAD_SLAVE_INIT);
+ RETURN_NAME_AS_STRING(SYSTEM_THREAD_SLAVE_BACKGROUND);
default:
sprintf(buf, "<UNKNOWN SYSTEM THREAD: %d>", thread);
return buf;
@@ -2859,7 +2870,7 @@ public:
bool query_start_sec_part_used;
/* for IS NULL => = last_insert_id() fix in remove_eq_conds() */
bool substitute_null_with_insert_id;
- bool in_lock_tables, in_stored_expression;
+ bool in_lock_tables;
bool bootstrap, cleanup_done, free_connection_done;
/** is set if some thread specific value(s) used in a statement. */
@@ -3177,12 +3188,12 @@ public:
set_start_time();
start_utime= utime_after_lock= microsecond_interval_timer();
}
- inline void set_time(my_hrtime_t t)
+ inline void set_time(my_hrtime_t t)
{
user_time= t;
set_time();
}
- inline void set_time(my_time_t t, ulong sec_part)
+ inline void set_time(my_time_t t, ulong sec_part)
{
my_hrtime_t hrtime= { hrtime_from_time(t) + sec_part };
set_time(hrtime);
@@ -3195,6 +3206,12 @@ public:
}
ulonglong current_utime() { return microsecond_interval_timer(); }
+ /* Tell SHOW PROCESSLIST to show time from this point */
+ inline void set_time_for_next_stage()
+ {
+ utime_after_query= current_utime();
+ }
+
/**
Update server status after execution of a top level statement.
Currently only checks if a query was slow, and assigns
@@ -3204,7 +3221,7 @@ public:
*/
void update_server_status()
{
- utime_after_query= current_utime();
+ set_time_for_next_stage();
if (utime_after_query > utime_after_lock + variables.long_query_time)
server_status|= SERVER_QUERY_WAS_SLOW;
}
@@ -4050,6 +4067,9 @@ private:
LEX_STRING invoker_host;
public:
+#ifndef EMBEDDED_LIBRARY
+ Session_tracker session_tracker;
+#endif //EMBEDDED_LIBRARY
/*
Flag, mutex and condition for a thread to wait for a signal from another
thread.
@@ -4194,6 +4214,7 @@ public:
*/
bool wsrep_ignore_table;
wsrep_gtid_t wsrep_sync_wait_gtid;
+ ulong wsrep_affected_rows;
#endif /* WITH_WSREP */
/* Handling of timeouts for commands */
@@ -4283,6 +4304,8 @@ my_eof(THD *thd)
{
thd->set_row_count_func(-1);
thd->get_stmt_da()->set_eof_status(thd);
+
+ TRANSACT_TRACKER(add_trx_state(thd, TX_RESULT_SET));
}
#define tmp_disable_binlog(A) \
@@ -4367,6 +4390,7 @@ protected:
/* Something used only by the parser: */
public:
select_result(THD *thd_arg): select_result_sink(thd_arg) {}
+ void set_unit(SELECT_LEX_UNIT *unit_arg) { unit= unit_arg; }
virtual ~select_result() {};
/**
Change wrapped select_result.
@@ -4811,6 +4835,7 @@ public:
}
};
+
class select_union :public select_result_interceptor
{
public:
@@ -4848,6 +4873,30 @@ public:
};
+class select_union_recursive :public select_union
+{
+ public:
+ /* The temporary table with the new records generated by one iterative step */
+ TABLE *incr_table;
+ /* One of tables from the list rec_tables (determined dynamically) */
+ TABLE *first_rec_table_to_update;
+ /* The temporary tables used for recursive table references */
+ List<TABLE> rec_tables;
+
+ select_union_recursive(THD *thd_arg):
+ select_union(thd_arg),
+ incr_table(0), first_rec_table_to_update(0) {};
+
+ int send_data(List<Item> &items);
+ bool create_result_table(THD *thd, List<Item> *column_types,
+ bool is_distinct, ulonglong options,
+ const char *alias,
+ bool bit_fields_as_long,
+ bool create_table,
+ bool keep_row_order= FALSE);
+ void cleanup();
+};
+
/**
UNION result that is passed directly to the receiving select_result
without filling a temporary table.
diff --git a/sql/sql_cte.cc b/sql/sql_cte.cc
index 77f0bcf04ba..f6447b29827 100644
--- a/sql/sql_cte.cc
+++ b/sql/sql_cte.cc
@@ -3,6 +3,39 @@
#include "sql_cte.h"
#include "sql_view.h" // for make_valid_column_names
#include "sql_parse.h"
+#include "sql_select.h"
+
+
+/**
+ @brief
+ Add a new element to this with clause
+
+ @param elem The with element to add to this with clause
+
+ @details
+ The method adds the with element 'elem' to the elements
+ in this with clause. The method reports an error if
+ the number of the added element exceeds the value
+ of the constant max_number_of_elements_in_with_clause.
+
+ @retval
+ true if an error is reported
+ false otherwise
+*/
+
+bool With_clause::add_with_element(With_element *elem)
+{
+ if (with_list.elements == max_number_of_elements_in_with_clause)
+ {
+ my_error(ER_TOO_MANY_DEFINITIONS_IN_WITH_CLAUSE, MYF(0));
+ return true;
+ }
+ elem->owner= this;
+ elem->number= with_list.elements;
+ elem->spec->with_element= elem;
+ with_list.link_in_list(elem, &elem->next);
+ return false;
+}
/**
@@ -13,8 +46,12 @@
with_clauses_list Pointer to the first clause in the list
@details
- The procedure just calls the method With_clause::check_dependencies
- for each member of the given list.
+ For each with clause from the given list the procedure finds all
+ dependencies between tables defined in the clause by calling the
+ method With_clause::checked_dependencies.
+ Additionally, based on the info collected by this method the procedure
+ finds anchors for each recursive definition and moves them at the head
+ of the definition.
@retval
false on success
@@ -29,6 +66,9 @@ bool check_dependencies_in_with_clauses(With_clause *with_clauses_list)
{
if (with_clause->check_dependencies())
return true;
+ if (with_clause->check_anchors())
+ return true;
+ with_clause->move_anchors_ahead();
}
return false;
}
@@ -39,18 +79,13 @@ bool check_dependencies_in_with_clauses(With_clause *with_clauses_list)
Check dependencies between tables defined in this with clause
@details
- The method performs the following actions for this with clause:
-
- 1. Test for definitions of the tables with the same name.
- 2. For each table T defined in this with clause look for tables
- from the same with clause that are used in the query that
- specifies T and set the dependencies of T on these tables
- in dependency_map.
- 3. Build the transitive closure of the above direct dependencies
- to find out all recursive definitions.
- 4. If this with clause is not specified as recursive then
- for each with table T defined in this with clause check whether
- it is used in any definition that follows the definition of T.
+ The method performs the following for this with clause:
+ - checks that there are no definitions of the tables with the same name
+ - for each table T defined in this with clause looks for the tables
+ from the same with clause that are used in the query that specifies T
+ and set the dependencies of T on these tables in a bitmap.
+ - builds the transitive closure of the above direct dependencies
+ to find out all recursive definitions.
@retval
true if an error is reported
@@ -64,18 +99,18 @@ bool With_clause::check_dependencies()
/*
Look for for definitions with the same query name.
When found report an error and return true immediately.
- For each table T defined in this with clause look for all other tables from
- the same with with clause that are used in the specification of T.
+ For each table T defined in this with clause look for all other tables
+ from the same with clause that are used in the specification of T.
For each such table set the dependency bit in the dependency map of
- with element for T.
+ the with element for T.
*/
- for (With_element *with_elem= first_elem;
- with_elem != NULL;
- with_elem= with_elem->next_elem)
+ for (With_element *with_elem= with_list.first;
+ with_elem;
+ with_elem= with_elem->next)
{
- for (With_element *elem= first_elem;
+ for (With_element *elem= with_list.first;
elem != with_elem;
- elem= elem->next_elem)
+ elem= elem->next)
{
if (my_strcasecmp(system_charset_info, with_elem->query_name->str,
elem->query_name->str) == 0)
@@ -84,106 +119,81 @@ bool With_clause::check_dependencies()
return true;
}
}
- with_elem->check_dependencies_in_unit(with_elem->spec);
+ if (with_elem->check_dependencies_in_spec())
+ return true;
}
/* Build the transitive closure of the direct dependencies found above */
- for (With_element *with_elem= first_elem;
- with_elem != NULL;
- with_elem= with_elem->next_elem)
+ for (With_element *with_elem= with_list.first;
+ with_elem;
+ with_elem= with_elem->next)
+ with_elem->derived_dep_map= with_elem->base_dep_map;
+ for (With_element *with_elem= with_list.first;
+ with_elem;
+ with_elem= with_elem->next)
{
table_map with_elem_map= with_elem->get_elem_map();
- for (With_element *elem= first_elem; elem != NULL; elem= elem->next_elem)
+ for (With_element *elem= with_list.first; elem; elem= elem->next)
{
- if (elem->dependency_map & with_elem_map)
- elem->dependency_map |= with_elem->dependency_map;
+ if (elem->derived_dep_map & with_elem_map)
+ elem->derived_dep_map |= with_elem->derived_dep_map;
}
}
/*
- Mark those elements where tables are defined with direct or indirect recursion.
- Report an error when recursion (direct or indirect) is used to define a table.
+ Mark those elements where tables are defined with direct or indirect
+ make recursion.
*/
- for (With_element *with_elem= first_elem;
- with_elem != NULL;
- with_elem= with_elem->next_elem)
+ for (With_element *with_elem= with_list.first;
+ with_elem;
+ with_elem= with_elem->next)
{
- if (with_elem->dependency_map & with_elem->get_elem_map())
+ if (with_elem->derived_dep_map & with_elem->get_elem_map())
with_elem->is_recursive= true;
}
- for (With_element *with_elem= first_elem;
- with_elem != NULL;
- with_elem= with_elem->next_elem)
- {
- if (with_elem->is_recursive)
- {
- my_error(ER_RECURSIVE_QUERY_IN_WITH_CLAUSE, MYF(0),
- with_elem->query_name->str);
- return true;
- }
- }
-
- if (!with_recursive)
- {
- /*
- For each with table T defined in this with clause check whether
- it is used in any definition that follows the definition of T.
- */
- for (With_element *with_elem= first_elem;
- with_elem != NULL;
- with_elem= with_elem->next_elem)
- {
- With_element *checked_elem= with_elem->next_elem;
- for (uint i = with_elem->number+1;
- i < elements;
- i++, checked_elem= checked_elem->next_elem)
- {
- if (with_elem->check_dependency_on(checked_elem))
- {
- my_error(ER_WRONG_ORDER_IN_WITH_CLAUSE, MYF(0),
- with_elem->query_name->str, checked_elem->query_name->str);
- return true;
- }
- }
- }
- }
dependencies_are_checked= true;
return false;
}
+/*
+ This structure describes an element of the stack of embedded units.
+ The stack is used when looking for a definition of a table in
+ with clauses. The definition can be found only in the scopes
+ of the with clauses attached to the units from the stack.
+ The with clauses are looked through from starting from the top
+ element of the stack.
+*/
+
+struct st_unit_ctxt_elem
+{
+ st_unit_ctxt_elem *prev; // the previous element of the stack
+ st_select_lex_unit *unit;
+};
+
+
/**
@brief
- Check dependencies on the sibling with tables used in the given unit
-
- @param unit The unit where the siblings are to be searched for
+ Find the dependencies of this element on its siblings in its specification
@details
- The method recursively looks through all from lists encountered
- the given unit. If it finds a reference to a table that is
- defined in the same with clause to which this element belongs
- the method set the bit of dependency on this table in the
- dependency_map of this element.
+ For each table reference ref(T) from the FROM list of every select sl
+ immediately contained in the specification query of this element this
+ method searches for the definition of T in the the with clause which
+ this element belongs to. If such definition is found then the dependency
+ on it is set in sl->with_dep and in this->base_dep_map.
*/
-void With_element::check_dependencies_in_unit(st_select_lex_unit *unit)
-{
- st_select_lex *sl= unit->first_select();
- for (; sl; sl= sl->next_select())
+bool With_element::check_dependencies_in_spec()
+{
+ for (st_select_lex *sl= spec->first_select(); sl; sl= sl->next_select())
{
- for (TABLE_LIST *tbl= sl->table_list.first; tbl; tbl= tbl->next_local)
- {
- if (!tbl->with)
- tbl->with= owner->find_table_def(tbl);
- if (!tbl->with && tbl->select_lex)
- tbl->with= tbl->select_lex->find_table_def_in_with_clauses(tbl);
- if (tbl->with && tbl->with->owner== this->owner)
- set_dependency_on(tbl->with);
- }
- st_select_lex_unit *inner_unit= sl->first_inner_unit();
- for (; inner_unit; inner_unit= inner_unit->next_unit())
- check_dependencies_in_unit(inner_unit);
+ st_unit_ctxt_elem ctxt0= {NULL, owner->owner};
+ st_unit_ctxt_elem ctxt1= {&ctxt0, spec};
+ check_dependencies_in_select(sl, &ctxt1, false, &sl->with_dep);
+ base_dep_map|= sl->with_dep;
}
+ return false;
}
@@ -192,6 +202,7 @@ void With_element::check_dependencies_in_unit(st_select_lex_unit *unit)
Search for the definition of a table among the elements of this with clause
@param table The reference to the table that is looked for
+ @param barrier The barrier with element for the search
@details
The function looks through the elements of this with clause trying to find
@@ -204,14 +215,17 @@ void With_element::check_dependencies_in_unit(st_select_lex_unit *unit)
NULL - otherwise
*/
-With_element *With_clause::find_table_def(TABLE_LIST *table)
+With_element *With_clause::find_table_def(TABLE_LIST *table,
+ With_element *barrier)
{
- for (With_element *with_elem= first_elem;
- with_elem != NULL;
- with_elem= with_elem->next_elem)
+ for (With_element *with_elem= with_list.first;
+ with_elem != barrier;
+ with_elem= with_elem->next)
{
- if (my_strcasecmp(system_charset_info, with_elem->query_name->str, table->table_name) == 0)
+ if (my_strcasecmp(system_charset_info, with_elem->query_name->str,
+ table->table_name) == 0)
{
+ table->set_derived();
return with_elem;
}
}
@@ -221,6 +235,399 @@ With_element *With_clause::find_table_def(TABLE_LIST *table)
/**
@brief
+ Search for the definition of a table in with clauses
+
+ @param tbl The reference to the table that is looked for
+ @param ctxt The context describing in what with clauses of the upper
+ levels the table has to be searched for.
+
+ @details
+ The function looks for the definition of the table tbl in the definitions
+ of the with clauses from the upper levels specified by the parameter ctxt.
+ When it encounters the element with the same query name as the table's name
+ it returns this element. If no such definitions are found the function
+ returns NULL.
+
+ @retval
+ found with element if the search succeeded
+ NULL - otherwise
+*/
+
+With_element *find_table_def_in_with_clauses(TABLE_LIST *tbl,
+ st_unit_ctxt_elem *ctxt)
+{
+ With_element *barrier= NULL;
+ for (st_unit_ctxt_elem *unit_ctxt_elem= ctxt;
+ unit_ctxt_elem;
+ unit_ctxt_elem= unit_ctxt_elem->prev)
+ {
+ st_select_lex_unit *unit= unit_ctxt_elem->unit;
+ With_clause *with_clause= unit->with_clause;
+ if (with_clause &&
+ (tbl->with= with_clause->find_table_def(tbl, barrier)))
+ return tbl->with;
+ barrier= NULL;
+ if (unit->with_element && !unit->with_element->get_owner()->with_recursive)
+ {
+ /*
+ This unit is the specification if the with element unit->with_element.
+ The with element belongs to a with clause without the specifier RECURSIVE.
+ So when searching for the matching definition of tbl this with clause must
+ be looked up to this with element
+ */
+ barrier= unit->with_element;
+ }
+ }
+ return NULL;
+}
+
+
+/**
+ @brief
+ Find the dependencies of this element on its siblings in a select
+
+ @param sl The select where to look for the dependencies
+ @param ctxt The structure specifying the scope of the definitions
+ of the with elements of the upper levels
+ @param in_sbq if true mark dependencies found in subqueries in
+ this->sq_dep_map
+ @param dep_map IN/OUT The bit where to mark the found dependencies
+
+ @details
+ For each table reference ref(T) from the FROM list of the select sl
+ the method searches in with clauses for the definition of the table T.
+ If the found definition belongs to the same with clause as this with
+ element then the method set dependency on T in the in/out parameter
+ dep_map, add if required - in this->sq_dep_map.
+ The parameter ctxt describes the proper context for the search
+ of the definition of T.
+*/
+
+void With_element::check_dependencies_in_select(st_select_lex *sl,
+ st_unit_ctxt_elem *ctxt,
+ bool in_subq,
+ table_map *dep_map)
+{
+ With_clause *with_clause= sl->get_with_clause();
+ for (TABLE_LIST *tbl= sl->table_list.first; tbl; tbl= tbl->next_local)
+ {
+ if (tbl->derived || tbl->nested_join)
+ continue;
+ tbl->with_internal_reference_map= 0;
+ /*
+ If there is a with clause attached to the unit containing sl
+ look first for the definition of tbl in this with clause.
+ If such definition is not found there look in the with
+ clauses of the upper levels.
+ If the definition of tbl is found somewhere in with clauses
+ then tbl->with is set to point to this definition
+ */
+ if (with_clause && !tbl->with)
+ tbl->with= with_clause->find_table_def(tbl, NULL);
+ if (!tbl->with)
+ tbl->with= find_table_def_in_with_clauses(tbl, ctxt);
+
+ if (tbl->with && tbl->with->owner== this->owner)
+ {
+ /*
+ The found definition T of tbl belongs to the same
+ with clause as this with element. In this case:
+ - set the dependence on T in the bitmap dep_map
+ - set tbl->with_internal_reference_map with
+ the bitmap for this definition
+ - set the dependence on T in the bitmap this->sq_dep_map
+ if needed
+ */
+ *dep_map|= tbl->with->get_elem_map();
+ tbl->with_internal_reference_map= get_elem_map();
+ if (in_subq)
+ sq_dep_map|= tbl->with->get_elem_map();
+ }
+ }
+ /* Now look for the dependencies in the subqueries of sl */
+ st_select_lex_unit *inner_unit= sl->first_inner_unit();
+ for (; inner_unit; inner_unit= inner_unit->next_unit())
+ check_dependencies_in_unit(inner_unit, ctxt, in_subq, dep_map);
+}
+
+
+/**
+ @brief
+ Find the dependencies of this element on its siblings in a unit
+
+ @param unit The unit where to look for the dependencies
+ @param ctxt The structure specifying the scope of the definitions
+ of the with elements of the upper levels
+ @param in_sbq if true mark dependencies found in subqueries in
+ this->sq_dep_map
+ @param dep_map IN/OUT The bit where to mark the found dependencies
+
+ @details
+ This method searches in the unit 'unit' for the the references in FROM
+ lists of all selects contained in this unit and in the with clause
+ attached to this unit that refer to definitions of tables from the
+ same with clause as this element.
+ If such definitions are found then the dependencies on them are
+ set in the in/out parameter dep_map and optionally in this->sq_dep_map.
+ The parameter ctxt describes the proper context for the search.
+*/
+
+void With_element::check_dependencies_in_unit(st_select_lex_unit *unit,
+ st_unit_ctxt_elem *ctxt,
+ bool in_subq,
+ table_map *dep_map)
+{
+ if (unit->with_clause)
+ check_dependencies_in_with_clause(unit->with_clause, ctxt, in_subq, dep_map);
+ in_subq |= unit->item != NULL;
+ st_unit_ctxt_elem unit_ctxt_elem= {ctxt, unit};
+ st_select_lex *sl= unit->first_select();
+ for (; sl; sl= sl->next_select())
+ {
+ check_dependencies_in_select(sl, &unit_ctxt_elem, in_subq, dep_map);
+ }
+}
+
+
+/**
+ @brief
+ Find the dependencies of this element on its siblings in a with clause
+
+ @param witt_clause The with clause where to look for the dependencies
+ @param ctxt The structure specifying the scope of the definitions
+ of the with elements of the upper levels
+ @param in_sbq if true mark dependencies found in subqueries in
+ this->sq_dep_map
+ @param dep_map IN/OUT The bit where to mark the found dependencies
+
+ @details
+ This method searches in the with_clause for the the references in FROM
+ lists of all selects contained in the specifications of the with elements
+ from this with_clause that refer to definitions of tables from the
+ same with clause as this element.
+ If such definitions are found then the dependencies on them are
+ set in the in/out parameter dep_map and optionally in this->sq_dep_map.
+ The parameter ctxt describes the proper context for the search.
+*/
+
+void
+With_element::check_dependencies_in_with_clause(With_clause *with_clause,
+ st_unit_ctxt_elem *ctxt,
+ bool in_subq,
+ table_map *dep_map)
+{
+ for (With_element *with_elem= with_clause->with_list.first;
+ with_elem;
+ with_elem= with_elem->next)
+ {
+ check_dependencies_in_unit(with_elem->spec, ctxt, in_subq, dep_map);
+ }
+}
+
+
+/**
+ @brief
+ Find mutually recursive with elements and check that they have ancors
+
+ @details
+ This method performs the following:
+ - for each recursive with element finds all mutually recursive with it
+ - links each group of mutually recursive with elements into a ring chain
+ - checks that every group of mutually recursive with elements contains
+ at least one anchor
+ - checks that after removing any with element with anchor the remaining
+ with elements mutually recursive with the removed one are not recursive
+ anymore
+
+ @retval
+ true if an error is reported
+ false otherwise
+*/
+
+bool With_clause::check_anchors()
+{
+ for (With_element *with_elem= with_list.first;
+ with_elem;
+ with_elem= with_elem->next)
+ {
+ if (!with_elem->is_recursive)
+ continue;
+
+ /*
+ It with_elem is recursive with element find all elements mutually recursive
+ with it (any recursive element is mutually recursive with itself). Mark all
+ these elements in the bitmap->mutually_recursive. Also link all these
+ elements into a ring chain.
+ */
+ if (!with_elem->next_mutually_recursive)
+ {
+ With_element *last_mutually_recursive= with_elem;
+ table_map with_elem_dep= with_elem->derived_dep_map;
+ table_map with_elem_map= with_elem->get_elem_map();
+ for (With_element *elem= with_elem; elem; elem= elem->next)
+ {
+ if (!elem->is_recursive)
+ continue;
+
+ if (elem == with_elem ||
+ ((elem->derived_dep_map & with_elem_map) &&
+ (with_elem_dep & elem->get_elem_map())))
+ {
+ elem->next_mutually_recursive= with_elem;
+ last_mutually_recursive->next_mutually_recursive= elem;
+ last_mutually_recursive= elem;
+ with_elem->mutually_recursive|= elem->get_elem_map();
+ }
+ }
+ for (With_element *elem= with_elem->next_mutually_recursive;
+ elem != with_elem;
+ elem= elem->next_mutually_recursive)
+ elem->mutually_recursive= with_elem->mutually_recursive;
+ }
+
+ /*
+ For each select from the specification of 'with_elem' check whether
+ it is an anchor i.e. does not depend on any with elements mutually
+ recursive with 'with_elem".
+ */
+ for (st_select_lex *sl= with_elem->spec->first_select();
+ sl;
+ sl= sl->next_select())
+ {
+ if (with_elem->is_anchor(sl))
+ {
+ with_elem->with_anchor= true;
+ break;
+ }
+ }
+ }
+
+ /*
+ Check that for any group of mutually recursive with elements
+ - there is at least one anchor
+ - after removing any with element with anchor the remaining with elements
+ mutually recursive with the removed one are not recursive anymore
+ */
+ for (With_element *with_elem= with_list.first;
+ with_elem;
+ with_elem= with_elem->next)
+ {
+ if (!with_elem->is_recursive)
+ continue;
+
+ if (!with_elem->with_anchor)
+ {
+ /*
+ Check that the other with elements mutually recursive with 'with_elem'
+ contain at least one anchor.
+ */
+ With_element *elem= with_elem;
+ while ((elem= elem->get_next_mutually_recursive()) != with_elem)
+ {
+ if (elem->with_anchor)
+ break;
+ }
+ if (elem == with_elem)
+ {
+ my_error(ER_RECURSIVE_WITHOUT_ANCHORS, MYF(0),
+ with_elem->query_name->str);
+ return true;
+ }
+ }
+ else
+ {
+ /* 'with_elem' is a with element with an anchor */
+ With_element *elem= with_elem;
+ /*
+ For the other with elements mutually recursive with 'with_elem'
+ set dependency bits between those elements in the field work_dep_map
+ and build transitive closure of these dependencies
+ */
+ while ((elem= elem->get_next_mutually_recursive()) != with_elem)
+ elem->work_dep_map= elem->base_dep_map & elem->mutually_recursive;
+ elem= with_elem;
+ while ((elem= elem->get_next_mutually_recursive()) != with_elem)
+ {
+ table_map elem_map= elem->get_elem_map();
+ With_element *el= with_elem;
+ while ((el= el->get_next_mutually_recursive()) != with_elem)
+ {
+ if (el->work_dep_map & elem_map)
+ el->work_dep_map|= elem->work_dep_map;
+ }
+ }
+ /* If the transitive closure displays any cycle report an arror */
+ elem= with_elem;
+ while ((elem= elem->get_next_mutually_recursive()) != with_elem)
+ {
+ if (elem->work_dep_map & elem->get_elem_map())
+ {
+ my_error(ER_UNACCEPTABLE_MUTUAL_RECURSION, MYF(0),
+ with_elem->query_name->str);
+ return true;
+ }
+ }
+ }
+ }
+
+ return false;
+}
+
+
+/**
+ @brief
+ Move anchors at the beginning of the specifications for with elements
+
+ @details
+ This method moves anchors at the beginning of the specifications for
+ all recursive with elements.
+*/
+
+void With_clause::move_anchors_ahead()
+{
+ for (With_element *with_elem= with_list.first;
+ with_elem;
+ with_elem= with_elem->next)
+ {
+ if (with_elem->is_recursive)
+ with_elem->move_anchors_ahead();
+ }
+}
+
+
+/**
+ @brief
+ Move anchors at the beginning of the specification of this with element
+
+ @details
+ If the specification of this with element contains anchors the method
+ moves them at the very beginning of the specification.
+*/
+
+void With_element::move_anchors_ahead()
+{
+ st_select_lex *next_sl;
+ st_select_lex *new_pos= spec->first_select();
+ st_select_lex *last_sl;
+ new_pos->linkage= UNION_TYPE;
+ for (st_select_lex *sl= new_pos; sl; sl= next_sl)
+ {
+ next_sl= sl->next_select();
+ if (is_anchor(sl))
+ {
+ sl->move_node(new_pos);
+ new_pos= sl->next_select();
+ }
+ last_sl= sl;
+ }
+ if (spec->union_distinct)
+ spec->union_distinct= last_sl;
+ first_recursive= new_pos;
+}
+
+
+/**
+ @brief
Perform context analysis for all unreferenced tables defined in with clause
@param thd The context of the statement containing this with clause
@@ -237,9 +644,9 @@ With_element *With_clause::find_table_def(TABLE_LIST *table)
bool With_clause::prepare_unreferenced_elements(THD *thd)
{
- for (With_element *with_elem= first_elem;
- with_elem != NULL;
- with_elem= with_elem->next_elem)
+ for (With_element *with_elem= with_list.first;
+ with_elem;
+ with_elem= with_elem->next)
{
if (!with_elem->is_referenced() && with_elem->prepare_unreferenced(thd))
return true;
@@ -258,9 +665,9 @@ bool With_clause::prepare_unreferenced_elements(THD *thd)
@param spec_end The end of the specification in the input string
@details
- The method creates for a string copy of the specification used in this element.
- The method is called when the element is parsed. The copy may be used to
- create clones of the specification whenever they are needed.
+ The method creates for a string copy of the specification used in this
+ element. The method is called when the element is parsed. The copy may be
+ used to create clones of the specification whenever they are needed.
@retval
false on success
@@ -438,8 +845,8 @@ With_element::rename_columns_of_derived_unit(THD *thd,
item->is_autogenerated_name= false;
}
}
-
- make_valid_column_names(thd, select->item_list);
+ else
+ make_valid_column_names(thd, select->item_list);
unit->columns_are_renamed= true;
@@ -486,6 +893,12 @@ bool With_element::prepare_unreferenced(THD *thd)
}
+bool With_element::is_anchor(st_select_lex *sel)
+{
+ return !(mutually_recursive & sel->with_dep);
+}
+
+
/**
@brief
Search for the definition of the given table referred in this select node
@@ -493,10 +906,10 @@ bool With_element::prepare_unreferenced(THD *thd)
@param table reference to the table whose definition is searched for
@details
- The method looks for the definition the table whose reference is occurred
+ The method looks for the definition of the table whose reference is occurred
in the FROM list of this select node. First it searches for it in the
with clause attached to the unit this select node belongs to. If such a
- definition is not found there the embedding units are looked through.
+ definition is not found then the embedding units are looked through.
@retval
pointer to the found definition if the search has been successful
@@ -505,17 +918,27 @@ bool With_element::prepare_unreferenced(THD *thd)
With_element *st_select_lex::find_table_def_in_with_clauses(TABLE_LIST *table)
{
+ st_select_lex_unit *master_unit= NULL;
With_element *found= NULL;
for (st_select_lex *sl= this;
sl;
- sl= sl->master_unit()->outer_select())
+ sl= master_unit->outer_select())
{
+ With_element *with_elem= sl->get_with_element();
+ /*
+ If sl->master_unit() is the spec of a with element then the search for
+ a definition was already done by With_element::check_dependencies_in_spec
+ and it was unsuccesful.
+ */
+ if (with_elem)
+ break;
With_clause *with_clause=sl->get_with_clause();
- if (with_clause && (found= with_clause->find_table_def(table)))
- return found;
+ if (with_clause && (found= with_clause->find_table_def(table,NULL)))
+ break;
+ master_unit= sl->master_unit();
/* Do not look for the table's definition beyond the scope of the view */
- if (sl->master_unit()->is_view)
- break;
+ if (master_unit->is_view)
+ break;
}
return found;
}
@@ -540,7 +963,7 @@ With_element *st_select_lex::find_table_def_in_with_clauses(TABLE_LIST *table)
bool TABLE_LIST::set_as_with_table(THD *thd, With_element *with_elem)
{
with= with_elem;
- if (!with_elem->is_referenced())
+ if (!with_elem->is_referenced() || with_elem->is_recursive)
derived= with_elem->spec;
else
{
@@ -553,6 +976,268 @@ bool TABLE_LIST::set_as_with_table(THD *thd, With_element *with_elem)
}
+bool TABLE_LIST::is_recursive_with_table()
+{
+ return with && with->is_recursive;
+}
+
+
+/*
+ A reference to a with table T is recursive if it occurs somewhere
+ in the query specifying T or in the query specifying one of the tables
+ mutually recursive with T.
+*/
+
+bool TABLE_LIST::is_with_table_recursive_reference()
+{
+ return (with_internal_reference_map &&
+ (with->get_mutually_recursive() & with_internal_reference_map));
+}
+
+
+/*
+ Specifications of with tables with recursive table references
+ in non-mergeable derived tables are not allowed in this
+ implementation.
+*/
+
+
+/*
+ We say that the specification of a with table T is restricted
+ if all below is true.
+ 1. Any immediate select of the specification contains at most one
+ recursive table reference taking into account table references
+ from mergeable derived tables.
+ 2. Any recursive table reference is not an inner operand of an
+ outer join operation used in an immediate select of the
+ specification.
+ 3. Any immediate select from the specification of T does not
+ contain aggregate functions.
+ 4. The specification of T does not contain recursive table references.
+
+ If the specification of T is not restricted we call the corresponding
+ with element unrestricted.
+
+ The SQL standards allows only with elements with restricted specification.
+ By default we comply with the standards here.
+
+ Yet we allow unrestricted specification if the status variable
+ 'standards_compliant_cte' set to 'off'(0).
+*/
+
+
+/**
+ @brief
+ Check if this select makes the including specification unrestricted
+
+ @param
+ only_standards_compliant true if the system variable
+ 'standards_compliant_cte' is set to 'on'
+ @details
+ This method checks whether the conditions 1-4 (see the comment above)
+ are satisfied for this select. If not then mark this element as
+ unrestricted and report an error if 'only_standards_compliant' is true.
+
+ @retval
+ true if an error is reported
+ false otherwise
+*/
+
+bool st_select_lex::check_unrestricted_recursive(bool only_standards_compliant)
+{
+ With_element *with_elem= get_with_element();
+ if (!with_elem ||!with_elem->is_recursive)
+ {
+ /*
+ If this select is not from the specifiocation of a with elememt or
+ if this not a recursive with element then there is nothing to check.
+ */
+ return false;
+ }
+
+ /* Check conditions 1-2 for restricted specification*/
+ table_map unrestricted= 0;
+ table_map encountered= 0;
+ if (with_elem->check_unrestricted_recursive(this,
+ unrestricted,
+ encountered))
+ return true;
+ with_elem->get_owner()->add_unrestricted(unrestricted);
+
+
+ /* Check conditions 3-4 for restricted specification*/
+ if (with_sum_func ||
+ (with_elem->contains_sq_with_recursive_reference()))
+ with_elem->get_owner()->add_unrestricted(
+ with_elem->get_mutually_recursive());
+
+ /* Report an error on unrestricted specification if this is required */
+ if (only_standards_compliant && with_elem->is_unrestricted())
+ {
+ my_error(ER_NOT_STANDARDS_COMPLIANT_RECURSIVE,
+ MYF(0), with_elem->query_name->str);
+ return true;
+ }
+
+ return false;
+}
+
+
+/**
+ @brief
+ Check if a select from the spec of this with element is partially restricted
+
+ @param
+ sel select from the specification of this element where to check
+ whether conditions 1-2 are satisfied
+ unrestricted IN/OUT bitmap where to mark unrestricted specs
+ encountered IN/OUT bitmap where to mark encountered recursive references
+ @details
+ This method checks whether the conditions 1-2 (see the comment above)
+ are satisfied for the select sel.
+ This method is called recursively for derived tables.
+
+ @retval
+ true if an error is reported
+ false otherwise
+*/
+
+bool With_element::check_unrestricted_recursive(st_select_lex *sel,
+ table_map &unrestricted,
+ table_map &encountered)
+{
+ /* Check conditions 1-for restricted specification*/
+ List_iterator<TABLE_LIST> ti(sel->leaf_tables);
+ TABLE_LIST *tbl;
+ while ((tbl= ti++))
+ {
+ st_select_lex_unit *unit= tbl->get_unit();
+ if (unit)
+ {
+ if(!tbl->is_with_table())
+ {
+ if (tbl->is_materialized_derived())
+ {
+ table_map dep_map;
+ check_dependencies_in_unit(unit, NULL, false, &dep_map);
+ if (dep_map & get_elem_map())
+ {
+ my_error(ER_REF_TO_RECURSIVE_WITH_TABLE_IN_DERIVED,
+ MYF(0), query_name->str);
+ return true;
+ }
+ }
+ if (check_unrestricted_recursive(unit->first_select(),
+ unrestricted,
+ encountered))
+ return true;
+ }
+ if (!(tbl->is_recursive_with_table() && unit->with_element->owner == owner))
+ continue;
+ With_element *with_elem= unit->with_element;
+ if (encountered & with_elem->get_elem_map())
+ unrestricted|= with_elem->mutually_recursive;
+ else
+ encountered|= with_elem->get_elem_map();
+ }
+ }
+ for (With_element *with_elem= sel->get_with_element()->owner->with_list.first;
+ with_elem;
+ with_elem= with_elem->next)
+ {
+ if (!with_elem->is_recursive && (unrestricted & with_elem->get_elem_map()))
+ continue;
+ if (encountered & with_elem->get_elem_map())
+ {
+ uint cnt= 0;
+ table_map encountered_mr= encountered & with_elem->mutually_recursive;
+ for (table_map map= encountered_mr >> with_elem->number;
+ map != 0;
+ map>>= 1)
+ {
+ if (map & 1)
+ {
+ if (cnt)
+ {
+ unrestricted|= with_elem->mutually_recursive;
+ break;
+ }
+ else
+ cnt++;
+ }
+ }
+ }
+ }
+
+
+ /* Check conditions 2 for restricted specification*/
+ ti.rewind();
+ while ((tbl= ti++))
+ {
+ for (TABLE_LIST *tab= tbl; tab; tab= tab->embedding)
+ {
+ if (tab->outer_join & (JOIN_TYPE_LEFT | JOIN_TYPE_RIGHT))
+ {
+ unrestricted|= mutually_recursive;
+ break;
+ }
+ }
+ }
+ return false;
+}
+
+
+/**
+ @brief
+ Check subqueries with recursive table references from FROM list of this select
+
+ @details
+ For each recursive table reference from the FROM list of this select
+ this method checks:
+ - whether this reference is within a materialized derived table and
+ if so it report an error
+ - whether this reference is within a subquery and if so it set a flag
+ in this subquery that disallows some optimization strategies for
+ this subquery.
+
+ @retval
+ true if an error is reported
+ false otherwise
+*/
+
+bool st_select_lex::check_subqueries_with_recursive_references()
+{
+ st_select_lex_unit *sl_master= master_unit();
+ List_iterator<TABLE_LIST> ti(leaf_tables);
+ TABLE_LIST *tbl;
+ while ((tbl= ti++))
+ {
+ if (!(tbl->is_with_table_recursive_reference() && sl_master->item))
+ continue;
+ With_element *with_elem= tbl->with;
+ bool check_embedding_materialized_derived= true;
+ for (st_select_lex *sl= this; sl; sl= sl_master->outer_select())
+ {
+ sl_master= sl->master_unit();
+ if (with_elem->get_owner() == sl_master->with_clause)
+ check_embedding_materialized_derived= false;
+ if (check_embedding_materialized_derived && !sl_master->with_element &&
+ sl_master->derived && sl_master->derived->is_materialized_derived())
+ {
+ my_error(ER_REF_TO_RECURSIVE_WITH_TABLE_IN_DERIVED,
+ MYF(0), with_elem->query_name->str);
+ return true;
+ }
+ if (!sl_master->item)
+ continue;
+ Item_subselect *subq= (Item_subselect *) sl_master->item;
+ subq->with_recursive_reference= true;
+ }
+ }
+ return false;
+}
+
+
/**
@brief
Print this with clause
@@ -567,15 +1252,15 @@ bool TABLE_LIST::set_as_with_table(THD *thd, With_element *with_elem)
void With_clause::print(String *str, enum_query_type query_type)
{
- str->append(STRING_WITH_LEN("WITH "));
+ str->append(STRING_WITH_LEN("with "));
if (with_recursive)
- str->append(STRING_WITH_LEN("RECURSIVE "));
- for (With_element *with_elem= first_elem;
- with_elem != NULL;
- with_elem= with_elem->next_elem)
+ str->append(STRING_WITH_LEN("recursive "));
+ for (With_element *with_elem= with_list.first;
+ with_elem;
+ with_elem= with_elem->next)
{
with_elem->print(str, query_type);
- if (with_elem != first_elem)
+ if (with_elem != with_list.first)
str->append(", ");
}
}
@@ -596,9 +1281,30 @@ void With_clause::print(String *str, enum_query_type query_type)
void With_element::print(String *str, enum_query_type query_type)
{
str->append(query_name);
- str->append(STRING_WITH_LEN(" AS "));
+ str->append(STRING_WITH_LEN(" as "));
str->append('(');
spec->print(str, query_type);
str->append(')');
}
+
+bool With_element::instantiate_tmp_tables()
+{
+ List_iterator_fast<TABLE> li(rec_result->rec_tables);
+ TABLE *rec_table;
+ while ((rec_table= li++))
+ {
+ if (!rec_table->is_created() &&
+ instantiate_tmp_table(rec_table,
+ rec_result->tmp_table_param.keyinfo,
+ rec_result->tmp_table_param.start_recinfo,
+ &rec_result->tmp_table_param.recinfo,
+ 0))
+ return true;
+
+ rec_table->file->extra(HA_EXTRA_WRITE_CACHE);
+ rec_table->file->extra(HA_EXTRA_IGNORE_DUP_KEY);
+ }
+ return false;
+}
+
diff --git a/sql/sql_cte.h b/sql/sql_cte.h
index 761d01ccd7f..89223170261 100644
--- a/sql/sql_cte.h
+++ b/sql/sql_cte.h
@@ -2,32 +2,57 @@
#define SQL_CTE_INCLUDED
#include "sql_list.h"
#include "sql_lex.h"
+#include "sql_select.h"
-class With_clause;
+class select_union;
+struct st_unit_ctxt_elem;
-/**
- @class With_clause
- @brief Set of with_elements
- It has a reference to the first with element from this with clause.
- This reference allows to navigate through all the elements of the with clause.
- It contains a reference to the unit to which this with clause is attached.
- It also contains a flag saying whether this with clause was specified as recursive.
-*/
+/**
+ @class With_element
+ @brief Definition of a CTE table
+
+ It contains a reference to the name of the table introduced by this with element,
+ and a reference to the unit that specificies this table. Also it contains
+ a reference to the with clause to which this element belongs to.
+*/
class With_element : public Sql_alloc
{
private:
With_clause *owner; // with clause this object belongs to
- With_element *next_elem; // next element in the with clause
+ With_element *next; // next element in the with clause
uint number; // number of the element in the with clause (starting from 0)
+ table_map elem_map; // The map where with only one 1 set in this->number
/*
- The map dependency_map has 1 in the i-th position if the query that
- specifies this element contains a reference to the element number i
+ The map base_dep_map has 1 in the i-th position if the query that
+ specifies this with element contains a reference to the with element number i
in the query FROM list.
+ (In this case this with element depends directly on the i-th with element.)
*/
- table_map elem_map; // The map where with only one 1 set in this->number
- table_map dependency_map;
+ table_map base_dep_map;
+ /*
+ The map derived_dep_map has 1 in i-th position if this with element depends
+ directly or indirectly from the i-th with element.
+ */
+ table_map derived_dep_map;
+ /*
+ The map sq_dep_map has 1 in i-th position if there is a reference to this
+ with element somewhere in subqueries of the specifications of the tables
+ defined in the with clause containing this element;
+ */
+ table_map sq_dep_map;
+ table_map work_dep_map; // dependency map used for work
+ /* Dependency map of with elements mutually recursive with this with element */
+ table_map mutually_recursive;
+ /*
+ The next with element from the circular chain of the with elements
+ mutually recursive with this with element.
+ (If This element is simply recursive than next_mutually_recursive contains
+ the pointer to itself. If it's not recursive than next_mutually_recursive
+ is set to NULL.)
+ */
+ With_element *next_mutually_recursive;
/*
Total number of references to this element in the FROM lists of
the queries that are in the scope of the element (including
@@ -64,20 +89,67 @@ public:
*/
bool is_recursive;
+ /*
+ Any non-recursive select in the specification of a recursive
+ with element is a called anchor. In the case mutually recursive
+ elements the specification of some them may be without any anchor.
+ Yet at least one of them must contain an anchor.
+ All anchors of any recursivespecification are moved ahead before
+ the prepare stage.
+ */
+ /* Set to true if this is a recursive element with an anchor */
+ bool with_anchor;
+ /*
+ Set to the first recursive select of the unit specifying the element
+ after all anchor have been moved to the head of the unit.
+ */
+ st_select_lex *first_recursive;
+
+ /*
+ The number of the last performed iteration for recursive table
+ (the number of the initial non-recursive step is 0, the number
+ of the first iteration is 1).
+ */
+ uint level;
+
+ /*
+ The pointer to the object used to materialize this with element
+ if it's recursive. This object is built at the end of prepare
+ stage and is used at the execution stage.
+ */
+ select_union_recursive *rec_result;
+
With_element(LEX_STRING *name,
List <LEX_STRING> list,
st_select_lex_unit *unit)
- : next_elem(NULL), dependency_map(0), references(0),
+ : next(NULL), base_dep_map(0), derived_dep_map(0),
+ sq_dep_map(0), work_dep_map(0), mutually_recursive(0),
+ next_mutually_recursive(NULL), references(0),
query_name(name), column_list(list), spec(unit),
- is_recursive(false) {}
+ is_recursive(false), with_anchor(false),
+ level(0), rec_result(NULL)
+ {}
+
+ bool check_dependencies_in_spec();
+
+ void check_dependencies_in_select(st_select_lex *sl, st_unit_ctxt_elem *ctxt,
+ bool in_subq, table_map *dep_map);
+
+ void check_dependencies_in_unit(st_select_lex_unit *unit,
+ st_unit_ctxt_elem *ctxt,
+ bool in_subq,
+ table_map *dep_map);
- void check_dependencies_in_unit(st_select_lex_unit *unit);
+ void check_dependencies_in_with_clause(With_clause *with_clause,
+ st_unit_ctxt_elem *ctxt,
+ bool in_subq,
+ table_map *dep_map);
void set_dependency_on(With_element *with_elem)
- { dependency_map|= with_elem->get_elem_map(); }
+ { base_dep_map|= with_elem->get_elem_map(); }
bool check_dependency_on(With_element *with_elem)
- { return dependency_map & with_elem->get_elem_map(); }
+ { return base_dep_map & with_elem->get_elem_map(); }
bool set_unparsed_spec(THD *thd, char *spec_start, char *spec_end);
@@ -91,28 +163,72 @@ public:
bool prepare_unreferenced(THD *thd);
+ bool check_unrestricted_recursive(st_select_lex *sel,
+ table_map &unrestricted,
+ table_map &encountered);
+
void print(String *str, enum_query_type query_type);
+ With_clause *get_owner() { return owner; }
+
+ bool contains_sq_with_recursive_reference()
+ { return sq_dep_map & mutually_recursive; }
+
+ table_map get_mutually_recursive() { return mutually_recursive; }
+
+ With_element *get_next_mutually_recursive()
+ { return next_mutually_recursive; }
+
+ bool is_anchor(st_select_lex *sel);
+
+ void move_anchors_ahead();
+
+ bool is_unrestricted();
+
+ bool is_with_prepared_anchor();
+
+ void mark_as_with_prepared_anchor();
+
+ bool is_cleaned();
+
+ void mark_as_cleaned();
+
+ void reset_recursive_for_exec();
+
+ void cleanup_stabilized();
+
+ void set_as_stabilized();
+
+ bool is_stabilized();
+
+ bool all_are_stabilized();
+
+ bool instantiate_tmp_tables();
+
+ void prepare_for_next_iteration();
+
friend class With_clause;
};
+const uint max_number_of_elements_in_with_clause= sizeof(table_map)*8;
/**
- @class With_element
- @brief Definition of a CTE table
-
- It contains a reference to the name of the table introduced by this with element,
- and a reference to the unit that specificies this table. Also it contains
- a reference to the with clause to which this element belongs to.
-*/
+ @class With_clause
+ @brief Set of with_elements
+
+ It has a reference to the first with element from this with clause.
+ This reference allows to navigate through all the elements of the with clause.
+ It contains a reference to the unit to which this with clause is attached.
+ It also contains a flag saying whether this with clause was specified as recursive.
+*/
class With_clause : public Sql_alloc
{
private:
st_select_lex_unit *owner; // the unit this with clause attached to
- With_element *first_elem; // the first definition in this with clause
- With_element **last_next; // here is set the link for the next added element
- uint elements; // number of the elements/defintions in this with clauses
+
+ /* The list of all with elements from this with clause */
+ SQL_I_List<With_element> with_list;
/*
The with clause immediately containing this with clause if there is any,
otherwise NULL. Now used only at parsing.
@@ -126,29 +242,37 @@ private:
/* Set to true if dependencies between with elements have been checked */
bool dependencies_are_checked;
+ /*
+ The bitmap of all recursive with elements whose specifications
+ are not complied with restrictions imposed by the SQL standards
+ on recursive specifications.
+ */
+ table_map unrestricted;
+ /*
+ The bitmap of all recursive with elements whose anchors
+ has been already prepared.
+ */
+ table_map with_prepared_anchor;
+ table_map cleaned;
+ /*
+ The bitmap of all recursive with elements that
+ has been already materialized
+ */
+ table_map stabilized;
+
public:
/* If true the specifier RECURSIVE is present in the with clause */
bool with_recursive;
With_clause(bool recursive_fl, With_clause *emb_with_clause)
- : owner(NULL), first_elem(NULL), elements(0),
+ : owner(NULL),
embedding_with_clause(emb_with_clause), next_with_clause(NULL),
- dependencies_are_checked(false),
+ dependencies_are_checked(false), unrestricted(0),
+ with_prepared_anchor(0), cleaned(0), stabilized(0),
with_recursive(recursive_fl)
- { last_next= &first_elem; }
-
- /* Add a new element to the current with clause */
- bool add_with_element(With_element *elem)
- {
- elem->owner= this;
- elem->number= elements;
- owner= elem->spec;
- owner->with_element= elem;
- *last_next= elem;
- last_next= &elem->next_elem;
- elements++;
- return false;
- }
+ { }
+
+ bool add_with_element(With_element *elem);
/* Add this with clause to the list of with clauses used in the statement */
void add_to_list(With_clause ** &last_next)
@@ -157,22 +281,136 @@ public:
last_next= &this->next_with_clause;
}
+ void set_owner(st_select_lex_unit *unit) { owner= unit; }
+
With_clause *pop() { return embedding_with_clause; }
bool check_dependencies();
- With_element *find_table_def(TABLE_LIST *table);
+ bool check_anchors();
+
+ void move_anchors_ahead();
+
+ With_element *find_table_def(TABLE_LIST *table, With_element *barrier);
With_element *find_table_def_in_with_clauses(TABLE_LIST *table);
bool prepare_unreferenced_elements(THD *thd);
+ void add_unrestricted(table_map map) { unrestricted|= map; }
+
void print(String *str, enum_query_type query_type);
- friend
- bool check_dependencies_in_with_clauses(With_clause *with_clauses_list);
+ friend class With_element;
+ friend
+ bool
+ check_dependencies_in_with_clauses(With_clause *with_clauses_list);
};
+inline
+bool With_element::is_unrestricted()
+{
+ return owner->unrestricted & get_elem_map();
+}
+
+inline
+
+bool With_element::is_with_prepared_anchor()
+{
+ return owner->with_prepared_anchor & get_elem_map();
+}
+
+inline
+void With_element::mark_as_with_prepared_anchor()
+{
+ owner->with_prepared_anchor|= mutually_recursive;
+}
+
+
+inline
+bool With_element::is_cleaned()
+{
+ return owner->cleaned & get_elem_map();
+}
+
+
+inline
+void With_element::mark_as_cleaned()
+{
+ owner->cleaned|= get_elem_map();
+}
+
+
+inline
+void With_element::reset_recursive_for_exec()
+{
+ DBUG_ASSERT(is_recursive);
+ level= 0;
+ owner->with_prepared_anchor&= ~mutually_recursive;
+ owner->cleaned&= ~get_elem_map();
+ cleanup_stabilized();
+ rec_result->first_rec_table_to_update= 0;
+}
+
+
+
+inline
+void With_element::cleanup_stabilized()
+{
+ owner->stabilized&= ~mutually_recursive;
+}
+
+
+inline
+void With_element::set_as_stabilized()
+{
+ owner->stabilized|= get_elem_map();
+}
+
+
+inline
+bool With_element::is_stabilized()
+{
+ return owner->stabilized & get_elem_map();
+}
+
+
+inline
+bool With_element::all_are_stabilized()
+{
+ return (owner->stabilized & mutually_recursive) == mutually_recursive;
+}
+
+
+inline
+void With_element::prepare_for_next_iteration()
+{
+ With_element *with_elem= this;
+ while ((with_elem= with_elem->get_next_mutually_recursive()) != this)
+ {
+ TABLE *rec_table= with_elem->rec_result->first_rec_table_to_update;
+ if (rec_table)
+ rec_table->reginfo.join_tab->preread_init_done= false;
+ }
+}
+
+
+inline
+void st_select_lex_unit::set_with_clause(With_clause *with_cl)
+{
+ with_clause= with_cl;
+ if (with_clause)
+ with_clause->set_owner(this);
+}
+
+
+inline
+void st_select_lex::set_with_clause(With_clause *with_clause)
+{
+ master_unit()->with_clause= with_clause;
+ if (with_clause)
+ with_clause->set_owner(master_unit());
+}
#endif /* SQL_CTE_INCLUDED */
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index 1a0ee03ec34..20538fe1fb4 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -1035,7 +1035,10 @@ exit:
it to 0.
*/
if (thd->db && cmp_db_names(thd->db, db) && !error)
+ {
mysql_change_db_impl(thd, NULL, 0, thd->variables.collation_server);
+ SESSION_TRACKER_CHANGED(thd, CURRENT_SCHEMA_TRACKER, NULL);
+ }
my_dirend(dirp);
DBUG_RETURN(error);
}
@@ -1459,7 +1462,7 @@ bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch)
mysql_change_db_impl(thd, NULL, 0, thd->variables.collation_server);
- DBUG_RETURN(FALSE);
+ goto done;
}
else
{
@@ -1476,8 +1479,7 @@ bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch)
mysql_change_db_impl(thd, &INFORMATION_SCHEMA_NAME, SELECT_ACL,
system_charset_info);
-
- DBUG_RETURN(FALSE);
+ goto done;
}
/*
@@ -1564,8 +1566,7 @@ bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch)
mysql_change_db_impl(thd, NULL, 0, thd->variables.collation_server);
/* The operation succeed. */
-
- DBUG_RETURN(FALSE);
+ goto done;
}
else
{
@@ -1589,6 +1590,9 @@ bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch)
mysql_change_db_impl(thd, &new_db_file_name, db_access, db_default_cl);
+done:
+ SESSION_TRACKER_CHANGED(thd, CURRENT_SCHEMA_TRACKER, NULL);
+ SESSION_TRACKER_CHANGED(thd, SESSION_STATE_CHANGE_TRACKER, NULL);
DBUG_RETURN(FALSE);
}
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 95aee805c7f..4f9afca2f6d 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -27,7 +27,6 @@
#include "sql_delete.h"
#include "sql_cache.h" // query_cache_*
#include "sql_base.h" // open_temprary_table
-#include "sql_table.h" // build_table_filename
#include "lock.h" // unlock_table_name
#include "sql_view.h" // check_key_in_view, mysql_frm_type
#include "sql_parse.h" // mysql_init_select
@@ -488,6 +487,9 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
DBUG_EXECUTE_IF("show_explain_probe_delete_exec_start",
dbug_serve_apcs(thd, 1););
+ if (!(select && select->quick))
+ status_var_increment(thd->status_var.delete_scan_count);
+
if (query_plan.using_filesort)
{
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc
index 05e07a48b49..85a85b9c3b2 100644
--- a/sql/sql_derived.cc
+++ b/sql/sql_derived.cc
@@ -30,6 +30,7 @@
#include "sql_base.h"
#include "sql_view.h" // check_duplicate_names
#include "sql_acl.h" // SELECT_ACL
+#include "sql_class.h"
#include "sql_cte.h"
typedef bool (*dt_processor)(THD *thd, LEX *lex, TABLE_LIST *derived);
@@ -479,8 +480,6 @@ unconditional_materialization:
derived->set_materialized_derived();
if (!derived->table || !derived->table->is_created())
res= mysql_derived_create(thd, lex, derived);
- if (!res)
- res= mysql_derived_fill(thd, lex, derived);
goto exit_merge;
}
@@ -631,6 +630,7 @@ bool mysql_derived_init(THD *thd, LEX *lex, TABLE_LIST *derived)
true Error
*/
+
bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived)
{
SELECT_LEX_UNIT *unit= derived->get_unit();
@@ -638,24 +638,70 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived)
bool res= FALSE;
DBUG_PRINT("enter", ("unit 0x%lx", (ulong) unit));
+ if (!unit)
+ DBUG_RETURN(FALSE);
+
+ SELECT_LEX *first_select= unit->first_select();
+
+ if (unit->prepared && derived->is_recursive_with_table() &&
+ !derived->table)
+ {
+ /*
+ Here 'derived' is either a non-recursive table reference to a recursive
+ with table or a recursive table reference to a recursvive table whose
+ specification has been already prepared (a secondary recursive table
+ reference.
+ */
+ if (!(derived->derived_result= new (thd->mem_root) select_union(thd)))
+ DBUG_RETURN(TRUE); // out of memory
+ thd->create_tmp_table_for_derived= TRUE;
+ res= derived->derived_result->create_result_table(
+ thd, &unit->types, FALSE,
+ (first_select->options |
+ thd->variables.option_bits |
+ TMP_TABLE_ALL_COLUMNS),
+ derived->alias, FALSE, FALSE);
+ thd->create_tmp_table_for_derived= FALSE;
+
+ if (!res && !derived->table)
+ {
+ derived->derived_result->set_unit(unit);
+ derived->table= derived->derived_result->table;
+ if (derived->is_with_table_recursive_reference())
+ {
+ /* Here 'derived" is a secondary recursive table reference */
+ unit->with_element->rec_result->rec_tables.push_back(derived->table);
+ }
+ }
+ DBUG_ASSERT(derived->table || res);
+ goto exit;
+ }
+
// Skip already prepared views/DT
- if (!unit || unit->prepared ||
+ if (unit->prepared ||
(derived->merged_for_insert &&
!(derived->is_multitable() &&
(thd->lex->sql_command == SQLCOM_UPDATE_MULTI ||
thd->lex->sql_command == SQLCOM_DELETE_MULTI))))
DBUG_RETURN(FALSE);
- SELECT_LEX *first_select= unit->first_select();
-
/* prevent name resolving out of derived table */
for (SELECT_LEX *sl= first_select; sl; sl= sl->next_select())
{
sl->context.outer_context= 0;
- // Prepare underlying views/DT first.
- if ((res= sl->handle_derived(lex, DT_PREPARE)))
- goto exit;
-
+ if (!derived->is_with_table_recursive_reference() ||
+ (!derived->with->with_anchor &&
+ !derived->with->is_with_prepared_anchor()))
+ {
+ /*
+ Prepare underlying views/DT first unless 'derived' is a recursive
+ table reference and either the anchors from the specification of
+ 'derived' has been already prepared or there no anchor in this
+ specification
+ */
+ if ((res= sl->handle_derived(lex, DT_PREPARE)))
+ goto exit;
+ }
if (derived->outer_join && sl->first_cond_optimization)
{
/* Mark that table is part of OUTER JOIN and fields may be NULL */
@@ -701,19 +747,21 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived)
SELECT is last SELECT of UNION).
*/
thd->create_tmp_table_for_derived= TRUE;
- if (derived->derived_result->create_result_table(thd, &unit->types, FALSE,
- (first_select->options |
- thd->variables.option_bits |
- TMP_TABLE_ALL_COLUMNS),
- derived->alias,
- FALSE, FALSE))
+ if (!(derived->table) &&
+ derived->derived_result->create_result_table(thd, &unit->types, FALSE,
+ (first_select->options |
+ thd->variables.option_bits |
+ TMP_TABLE_ALL_COLUMNS),
+ derived->alias,
+ FALSE, FALSE, FALSE))
{
thd->create_tmp_table_for_derived= FALSE;
goto exit;
}
thd->create_tmp_table_for_derived= FALSE;
- derived->table= derived->derived_result->table;
+ if (!derived->table)
+ derived->table= derived->derived_result->table;
DBUG_ASSERT(derived->table);
if (derived->is_derived() && derived->is_merged_derived())
first_select->mark_as_belong_to_derived(derived);
@@ -740,7 +788,7 @@ exit:
*/
if (res)
{
- if (derived->table)
+ if (derived->table && !derived->is_with_table_recursive_reference())
free_tmp_table(thd, derived->table);
delete derived->derived_result;
}
@@ -760,8 +808,11 @@ exit:
}
#endif
/* Add new temporary table to list of open derived tables */
- table->next= thd->derived_tables;
- thd->derived_tables= table;
+ if (!derived->is_with_table_recursive_reference())
+ {
+ table->next= thd->derived_tables;
+ thd->derived_tables= table;
+ }
/* If table is used by a left join, mark that any column may be null */
if (derived->outer_join)
@@ -865,7 +916,7 @@ bool mysql_derived_create(THD *thd, LEX *lex, TABLE_LIST *derived)
if (table->is_created())
DBUG_RETURN(FALSE);
- select_union *result= (select_union*)unit->result;
+ select_union *result= derived->derived_result;
if (table->s->db_type() == TMP_ENGINE_HTON)
{
result->tmp_table_param.keyinfo= table->s->key_info;
@@ -884,6 +935,45 @@ bool mysql_derived_create(THD *thd, LEX *lex, TABLE_LIST *derived)
}
+/**
+ @brief
+ Fill the recursive with table
+
+ @param thd The thread handle
+
+ @details
+ The method is called only for recursive with tables.
+ The method executes the recursive part of the specification
+ of this with table until no more rows are added to the table
+ or the number of the performed iteration reaches the allowed
+ maximum.
+
+ @retval
+ false on success
+ true on failure
+*/
+
+bool TABLE_LIST::fill_recursive(THD *thd)
+{
+ bool rc= false;
+ st_select_lex_unit *unit= get_unit();
+ rc= with->instantiate_tmp_tables();
+ while (!rc && !with->all_are_stabilized())
+ {
+ if (with->level > thd->variables.max_recursive_iterations)
+ break;
+ with->prepare_for_next_iteration();
+ rc= unit->exec_recursive();
+ }
+ if (!rc)
+ {
+ TABLE *src= with->rec_result->table;
+ rc =src->insert_all_rows_into(thd, table, true);
+ }
+ return rc;
+}
+
+
/*
Execute subquery of a materialized derived table/view and fill the result
table.
@@ -894,9 +984,10 @@ bool mysql_derived_create(THD *thd, LEX *lex, TABLE_LIST *derived)
@details
Execute subquery of given 'derived' table/view and fill the result
- table. After result table is filled, if this is not the EXPLAIN statement,
- the entire unit / node is deleted. unit is deleted if UNION is used
- for derived table and node is deleted is it is a simple SELECT.
+ table. After result table is filled, if this is not the EXPLAIN statement
+ and the table is not specified with a recursion the entire unit / node
+ is deleted. unit is deleted if UNION is used for derived table and node
+ is deleted is it is a simple SELECT.
'lex' is unused and 'thd' is passed as an argument to an underlying function.
@note
@@ -907,26 +998,43 @@ bool mysql_derived_create(THD *thd, LEX *lex, TABLE_LIST *derived)
@return TRUE Error
*/
+
bool mysql_derived_fill(THD *thd, LEX *lex, TABLE_LIST *derived)
{
DBUG_ENTER("mysql_derived_fill");
SELECT_LEX_UNIT *unit= derived->get_unit();
+ bool derived_is_recursive= derived->is_recursive_with_table();
bool res= FALSE;
- if (unit->executed && !unit->uncacheable && !unit->describe)
+ if (unit->executed && !unit->uncacheable && !unit->describe &&
+ !derived_is_recursive)
DBUG_RETURN(FALSE);
/*check that table creation passed without problems. */
DBUG_ASSERT(derived->table && derived->table->is_created());
- SELECT_LEX *first_select= unit->first_select();
select_union *derived_result= derived->derived_result;
SELECT_LEX *save_current_select= lex->current_select;
- if (unit->is_union())
+
+ if (derived_is_recursive)
+ {
+ if (derived->is_with_table_recursive_reference())
+ {
+ /* Here only one iteration step is performed */
+ res= unit->exec_recursive();
+ }
+ else
+ {
+ /* In this case all iteration are performed */
+ res= derived->fill_recursive(thd);
+ }
+ }
+ else if (unit->is_union())
{
// execute union without clean up
res= unit->exec();
}
else
{
+ SELECT_LEX *first_select= unit->first_select();
unit->set_limit(unit->global_parameters());
if (unit->select_limit_cnt == HA_POS_ERROR)
first_select->options&= ~OPTION_FOUND_ROWS;
@@ -946,13 +1054,13 @@ bool mysql_derived_fill(THD *thd, LEX *lex, TABLE_LIST *derived)
derived_result, unit, first_select);
}
- if (!res)
+ if (!res && !derived_is_recursive)
{
if (derived_result->flush())
res= TRUE;
unit->executed= TRUE;
}
- if (res || !lex->describe)
+ if (res || (!lex->describe && !derived_is_recursive))
unit->cleanup();
lex->current_select= save_current_select;
@@ -990,3 +1098,155 @@ bool mysql_derived_reinit(THD *thd, LEX *lex, TABLE_LIST *derived)
unit->set_thd(thd);
DBUG_RETURN(FALSE);
}
+
+
+/**
+ @brief
+ Extract the condition depended on derived table/view and pushed it there
+
+ @param thd The thread handle
+ @param cond The condition from which to extract the pushed condition
+ @param derived The reference to the derived table/view
+
+ @details
+ This functiom builds the most restrictive condition depending only on
+ the derived table/view that can be extracted from the condition cond.
+ The built condition is pushed into the having clauses of the
+ selects contained in the query specifying the derived table/view.
+ The function also checks for each select whether any condition depending
+ only on grouping fields can be extracted from the pushed condition.
+ If so, it pushes the condition over grouping fields into the where
+ clause of the select.
+
+ @retval
+ true if an error is reported
+ false otherwise
+*/
+
+bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived)
+{
+ if (!cond)
+ return false;
+
+ st_select_lex_unit *unit= derived->get_unit();
+ st_select_lex *sl= unit->first_select();
+
+ /* Check whether any select of 'unit' allows condition pushdown */
+ bool any_select_allows_cond_pushdown= false;
+ for (; sl; sl= sl->next_select())
+ {
+ if (sl->cond_pushdown_is_allowed())
+ {
+ any_select_allows_cond_pushdown= true;
+ break;
+ }
+ }
+ if (!any_select_allows_cond_pushdown)
+ return false;
+
+ /* Do not push conditions into constant derived */
+ if (unit->executed)
+ return false;
+
+ /* Do not push conditions into recursive with tables */
+ if (derived->is_recursive_with_table())
+ return false;
+
+ /*
+ Build the most restrictive condition extractable from 'cond'
+ that can be pushed into the derived table 'derived'.
+ All subexpressions of this condition are cloned from the
+ subexpressions of 'cond'.
+ This condition has to be fixed yet.
+ */
+ Item *extracted_cond;
+ derived->check_pushable_cond_for_table(cond);
+ extracted_cond= derived->build_pushable_cond_for_table(thd, cond);
+ if (!extracted_cond)
+ {
+ /* Nothing can be pushed into the derived table */
+ return false;
+ }
+ /* Push extracted_cond into every select of the unit specifying 'derived' */
+ st_select_lex *save_curr_select= thd->lex->current_select;
+ for (; sl; sl= sl->next_select())
+ {
+ if (!sl->cond_pushdown_is_allowed())
+ continue;
+ thd->lex->current_select= sl;
+ /*
+ For each select of the unit except the last one
+ create a clone of extracted_cond
+ */
+ Item *extracted_cond_copy= !sl->next_select() ? extracted_cond :
+ extracted_cond->build_clone(thd, thd->mem_root);
+ if (!extracted_cond_copy)
+ continue;
+
+ if (!sl->join->group_list && !sl->with_sum_func)
+ {
+ /* extracted_cond_copy is pushed into where of sl */
+ extracted_cond_copy= extracted_cond_copy->transform(thd,
+ &Item::derived_field_transformer_for_where,
+ (uchar*) sl);
+ if (extracted_cond_copy)
+ {
+ extracted_cond_copy->walk(&Item::cleanup_processor, 0, 0);
+ sl->cond_pushed_into_where= extracted_cond_copy;
+ }
+
+ continue;
+ }
+
+ /*
+ Figure out what can be extracted from the pushed condition
+ that could be pushed into the where clause of sl
+ */
+ Item *cond_over_grouping_fields;
+ sl->collect_grouping_fields(thd);
+ sl->check_cond_extraction_for_grouping_fields(extracted_cond_copy,
+ &Item::exclusive_dependence_on_grouping_fields_processor);
+ cond_over_grouping_fields=
+ sl->build_cond_for_grouping_fields(thd, extracted_cond_copy, true);
+
+ /*
+ Transform the references to the 'derived' columns from the condition
+ pushed into the where clause of sl to make them usable in the new context
+ */
+ if (cond_over_grouping_fields)
+ cond_over_grouping_fields= cond_over_grouping_fields->transform(thd,
+ &Item::derived_grouping_field_transformer_for_where,
+ (uchar*) sl);
+
+ if (cond_over_grouping_fields)
+ {
+ /*
+ In extracted_cond_copy remove top conjuncts that
+ has been pushed into the where clause of sl
+ */
+ extracted_cond_copy= remove_pushed_top_conjuncts(thd, extracted_cond_copy);
+
+ cond_over_grouping_fields->walk(&Item::cleanup_processor, 0, 0);
+ sl->cond_pushed_into_where= cond_over_grouping_fields;
+
+ if (!extracted_cond_copy)
+ continue;
+ }
+
+ /*
+ Transform the references to the 'derived' columns from the condition
+ pushed into the having clause of sl to make them usable in the new context
+ */
+ extracted_cond_copy= extracted_cond_copy->transform(thd,
+ &Item::derived_field_transformer_for_having,
+ (uchar*) sl);
+ if (!extracted_cond_copy)
+ continue;
+
+ extracted_cond_copy->walk(&Item::cleanup_processor, 0, 0);
+ sl->cond_pushed_into_having= extracted_cond_copy;
+ }
+ thd->lex->current_select= save_curr_select;
+ return false;
+}
+
diff --git a/sql/sql_derived.h b/sql/sql_derived.h
index 1dffef7235b..c451e423032 100644
--- a/sql/sql_derived.h
+++ b/sql/sql_derived.h
@@ -37,4 +37,12 @@ bool mysql_derived_reinit(THD *thd, LEX *lex, TABLE_LIST *derived);
*/
bool mysql_derived_cleanup(THD *thd, LEX *lex, TABLE_LIST *derived);
+Item *delete_not_needed_parts(THD *thd, Item *cond);
+
+#if 0
+bool pushdown_cond_for_derived(THD *thd, Item **cond, TABLE_LIST *derived);
+#else
+bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived);
+#endif
+
#endif /* SQL_DERIVED_INCLUDED */
diff --git a/sql/sql_explain.cc b/sql/sql_explain.cc
index 1f8b4f2dcb1..131c5a3bcfa 100644
--- a/sql/sql_explain.cc
+++ b/sql/sql_explain.cc
@@ -547,7 +547,12 @@ void Explain_union::print_explain_json(Explain_query *query,
bool started_object= print_explain_json_cache(writer, is_analyze);
writer->add_member("query_block").start_object();
- writer->add_member("union_result").start_object();
+
+ if (is_recursive_cte)
+ writer->add_member("recursive_union").start_object();
+ else
+ writer->add_member("union_result").start_object();
+
// using_temporary_table
make_union_table_name(table_name_buffer);
writer->add_member("table_name").add_str(table_name_buffer);
diff --git a/sql/sql_explain.h b/sql/sql_explain.h
index abdb1bb978b..5793599f4e1 100644
--- a/sql/sql_explain.h
+++ b/sql/sql_explain.h
@@ -327,6 +327,7 @@ class Explain_union : public Explain_node
public:
Explain_union(MEM_ROOT *root, bool is_analyze) :
Explain_node(root),
+ is_recursive_cte(false),
fake_select_lex_explain(root, is_analyze)
{}
@@ -362,6 +363,7 @@ public:
const char *fake_select_type;
bool using_filesort;
bool using_tmp;
+ bool is_recursive_cte;
/*
Explain data structure for "fake_select_lex" (i.e. for the degenerate
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 80287793175..3025c6e36dc 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -2489,8 +2489,8 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd)
(*field)->default_value= vcol;
*dfield_ptr++= *field;
}
- if ((*field)->has_insert_default_function() ||
- (*field)->has_update_default_function())
+ else
+ if ((*field)->has_update_default_function())
*dfield_ptr++= *field;
}
if (vfield)
@@ -3348,6 +3348,7 @@ bool Delayed_insert::handle_inserts(void)
max_rows= 0; // For DBUG output
#endif
/* Remove all not used rows */
+ mysql_mutex_lock(&mutex);
while ((row=rows.get()))
{
if (table->s->blob_fields)
@@ -3364,7 +3365,6 @@ bool Delayed_insert::handle_inserts(void)
}
DBUG_PRINT("error", ("dropped %lu rows after an error", max_rows));
thread_safe_increment(delayed_insert_errors, &LOCK_delayed_status);
- mysql_mutex_lock(&mutex);
DBUG_RETURN(1);
}
#endif /* EMBEDDED_LIBRARY */
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 638f6832355..4d161b32577 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -2063,6 +2063,7 @@ void st_select_lex_unit::init_query()
offset_limit_cnt= 0;
union_distinct= 0;
prepared= optimized= executed= 0;
+ optimize_started= 0;
item= 0;
union_result= 0;
table= 0;
@@ -2092,6 +2093,7 @@ void st_select_lex::init_query()
item_list.empty();
join= 0;
having= prep_having= where= prep_where= 0;
+ cond_pushed_into_where= cond_pushed_into_having= 0;
olap= UNSPECIFIED_OLAP_TYPE;
having_fix_field= 0;
context.select_lex= this;
@@ -2168,7 +2170,9 @@ void st_select_lex::init_select()
m_non_agg_field_used= false;
m_agg_func_used= false;
name_visibility_map= 0;
+ with_dep= 0;
join= 0;
+ lock_type= TL_READ_DEFAULT;
}
/*
@@ -2454,7 +2458,6 @@ bool st_select_lex::mark_as_dependent(THD *thd, st_select_lex *last,
return FALSE;
}
-bool st_select_lex_node::set_braces(bool value) { return 1; }
bool st_select_lex_node::inc_in_sum_expr() { return 1; }
uint st_select_lex_node::get_in_sum_expr() { return 0; }
TABLE_LIST* st_select_lex_node::get_table_list() { return 0; }
@@ -2604,13 +2607,6 @@ st_select_lex* st_select_lex::outer_select()
}
-bool st_select_lex::set_braces(bool value)
-{
- braces= value;
- return 0;
-}
-
-
bool st_select_lex::inc_in_sum_expr()
{
in_sum_expr++;
@@ -3184,6 +3180,8 @@ void st_select_lex_unit::set_limit(st_select_lex *sl)
bool st_select_lex_unit::union_needs_tmp_table()
{
+ if (with_element && with_element->is_recursive)
+ return true;
return union_distinct != NULL ||
global_parameters()->order_list.elements != 0 ||
thd->lex->sql_command == SQLCOM_INSERT_SELECT ||
@@ -4231,6 +4229,7 @@ void st_select_lex::update_correlated_cache()
while ((tl= ti++))
{
+ // is_correlated|= tl->is_with_table_recursive_reference();
if (tl->on_expr)
is_correlated|= MY_TEST(tl->on_expr->used_tables() & OUTER_REF_TABLE_BIT);
for (TABLE_LIST *embedding= tl->embedding ; embedding ;
@@ -4361,7 +4360,26 @@ void st_select_lex::set_explain_type(bool on_the_fly)
type= is_uncacheable ? "UNCACHEABLE UNION": "UNION";
if (this == master_unit()->fake_select_lex)
type= "UNION RESULT";
-
+ /*
+ join below may be =NULL when this functions is called at an early
+ stage. It will be later called again and we will set the correct
+ value.
+ */
+ if (join)
+ {
+ bool uses_cte= false;
+ for (JOIN_TAB *tab= first_explain_order_tab(join); tab;
+ tab= next_explain_order_tab(join, tab))
+ {
+ if (tab->table && tab->table->pos_in_table_list->with)
+ {
+ uses_cte= true;
+ break;
+ }
+ }
+ if (uses_cte)
+ type= "RECURSIVE UNION";
+ }
}
}
}
@@ -4387,6 +4405,19 @@ void SELECT_LEX::increase_derived_records(ha_rows records)
SELECT_LEX_UNIT *unit= master_unit();
DBUG_ASSERT(unit->derived);
+ if (unit->with_element && unit->with_element->is_recursive)
+ {
+ st_select_lex *first_recursive= unit->with_element->first_recursive;
+ st_select_lex *sl= unit->first_select();
+ for ( ; sl != first_recursive; sl= sl->next_select())
+ {
+ if (sl == this)
+ break;
+ }
+ if (sl == first_recursive)
+ return;
+ }
+
select_union *result= (select_union*)unit->result;
result->records+= records;
}
@@ -4663,7 +4694,9 @@ int st_select_lex_unit::save_union_explain(Explain_query *output)
new (output->mem_root) Explain_union(output->mem_root,
thd->lex->analyze_stmt);
-
+ if (with_element && with_element->is_recursive)
+ eu->is_recursive_cte= true;
+
if (derived)
eu->connection_type= Explain_node::EXPLAIN_NODE_DERIVED;
/*
@@ -4876,3 +4909,192 @@ void binlog_unsafe_map_init()
}
#endif
+
+/**
+ @brief
+ Finding fiels that are used in the GROUP BY of this st_select_lex
+
+ @param thd The thread handle
+
+ @details
+ This method looks through the fields which are used in the GROUP BY of this
+ st_select_lex and saves this fields.
+*/
+
+void st_select_lex::collect_grouping_fields(THD *thd)
+{
+ grouping_tmp_fields.empty();
+ List_iterator<Item> li(join->fields_list);
+ Item *item= li++;
+ for (uint i= 0; i < master_unit()->derived->table->s->fields; i++, (item=li++))
+ {
+ for (ORDER *ord= join->group_list; ord; ord= ord->next)
+ {
+ if ((*ord->item)->eq((Item*)item, 0))
+ {
+ Grouping_tmp_field *grouping_tmp_field=
+ new Grouping_tmp_field(master_unit()->derived->table->field[i], item);
+ grouping_tmp_fields.push_back(grouping_tmp_field);
+ }
+ }
+ }
+}
+
+/**
+ @brief
+ For a condition check possibility of exraction a formula over grouping fields
+
+ @param cond The condition whose subformulas are to be analyzed
+
+ @details
+ This method traverses the AND-OR condition cond and for each subformula of
+ the condition it checks whether it can be usable for the extraction of a
+ condition over the grouping fields of this select. The method uses
+ the call-back parameter check_processor to ckeck whether a primary formula
+ depends only on grouping fields.
+ The subformulas that are not usable are marked with the flag NO_EXTRACTION_FL.
+ The subformulas that can be entierly extracted are marked with the flag
+ FULL_EXTRACTION_FL.
+ @note
+ This method is called before any call of extract_cond_for_grouping_fields.
+ The flag NO_EXTRACTION_FL set in a subformula allows to avoid building clone
+ for the subformula when extracting the pushable condition.
+ The flag FULL_EXTRACTION_FL allows to delete later all top level conjuncts
+ from cond.
+*/
+
+void st_select_lex::check_cond_extraction_for_grouping_fields(Item *cond,
+ Item_processor check_processor)
+{
+ cond->clear_extraction_flag();
+ if (cond->type() == Item::COND_ITEM)
+ {
+ bool and_cond= ((Item_cond*) cond)->functype() == Item_func::COND_AND_FUNC;
+ List<Item> *arg_list= ((Item_cond*) cond)->argument_list();
+ List_iterator<Item> li(*arg_list);
+ uint count= 0; // to count items not containing NO_EXTRACTION_FL
+ uint count_full= 0; // to count items with FULL_EXTRACTION_FL
+ Item *item;
+ while ((item=li++))
+ {
+ check_cond_extraction_for_grouping_fields(item, check_processor);
+ if (item->get_extraction_flag() != NO_EXTRACTION_FL)
+ {
+ count++;
+ if (item->get_extraction_flag() == FULL_EXTRACTION_FL)
+ count_full++;
+ }
+ else if (!and_cond)
+ break;
+ }
+ if ((and_cond && count == 0) || item)
+ cond->set_extraction_flag(NO_EXTRACTION_FL);
+ if (count_full == arg_list->elements)
+ cond->set_extraction_flag(FULL_EXTRACTION_FL);
+ if (cond->get_extraction_flag() != 0)
+ {
+ li.rewind();
+ while ((item=li++))
+ item->clear_extraction_flag();
+ }
+ }
+ else
+ cond->set_extraction_flag(cond->walk(check_processor,
+ 0, (uchar *) this) ?
+ NO_EXTRACTION_FL : FULL_EXTRACTION_FL);
+}
+
+
+/**
+ @brief
+ Build condition extractable from the given one depended on grouping fields
+
+ @param thd The thread handle
+ @param cond The condition from which the condition depended
+ on grouping fields is to be extracted
+ @param no_top_clones If it's true then no clones for the top fully
+ extractable conjuncts are built
+
+ @details
+ For the given condition cond this method finds out what condition depended
+ only on the grouping fields can be extracted from cond. If such condition C
+ exists the method builds the item for it.
+ This method uses the flags NO_EXTRACTION_FL and FULL_EXTRACTION_FL set by the
+ preliminary call of st_select_lex::check_cond_extraction_for_grouping_fields
+ to figure out whether a subformula depends only on these fields or not.
+ @note
+ The built condition C is always implied by the condition cond
+ (cond => C). The method tries to build the most restictive such
+ condition (i.e. for any other condition C' such that cond => C'
+ we have C => C').
+ @note
+ The build item is not ready for usage: substitution for the field items
+ has to be done and it has to be re-fixed.
+
+ @retval
+ the built condition depended only on grouping fields if such a condition exists
+ NULL if there is no such a condition
+*/
+
+Item *st_select_lex::build_cond_for_grouping_fields(THD *thd, Item *cond,
+ bool no_top_clones)
+{
+ if (cond->get_extraction_flag() == FULL_EXTRACTION_FL)
+ {
+ if (no_top_clones)
+ return cond;
+ cond->clear_extraction_flag();
+ return cond->build_clone(thd, thd->mem_root);
+ }
+ if (cond->type() == Item::COND_ITEM)
+ {
+ bool cond_and= false;
+ Item_cond *new_cond;
+ if (((Item_cond*) cond)->functype() == Item_func::COND_AND_FUNC)
+ {
+ cond_and= true;
+ new_cond= new (thd->mem_root) Item_cond_and(thd);
+ }
+ else
+ new_cond= new (thd->mem_root) Item_cond_or(thd);
+ if (!new_cond)
+ return 0;
+ List_iterator<Item> li(*((Item_cond*) cond)->argument_list());
+ Item *item;
+ while ((item=li++))
+ {
+ if (item->get_extraction_flag() == NO_EXTRACTION_FL)
+ {
+ DBUG_ASSERT(cond_and);
+ item->clear_extraction_flag();
+ continue;
+ }
+ Item *fix= build_cond_for_grouping_fields(thd, item,
+ no_top_clones & cond_and);
+ if (!fix)
+ {
+ if (cond_and)
+ continue;
+ break;
+ }
+ new_cond->argument_list()->push_back(fix, thd->mem_root);
+ }
+
+ if (!cond_and && item)
+ {
+ while((item= li++))
+ item->clear_extraction_flag();
+ return 0;
+ }
+ switch (new_cond->argument_list()->elements)
+ {
+ case 0:
+ return 0;
+ case 1:
+ return new_cond->argument_list()->head();
+ default:
+ return new_cond;
+ }
+ }
+ return 0;
+}
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index 6d706e0eab3..e499cc794a1 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -30,6 +30,7 @@
#include "sql_alter.h" // Alter_info
#include "sql_window.h"
+
/* YACC and LEX Definitions */
/* These may not be declared yet */
@@ -530,7 +531,6 @@ public:
virtual st_select_lex* outer_select()= 0;
virtual st_select_lex* return_after_parsing()= 0;
- virtual bool set_braces(bool value);
virtual bool inc_in_sum_expr();
virtual uint get_in_sum_expr();
virtual TABLE_LIST* get_table_list();
@@ -546,6 +546,16 @@ public:
LEX_STRING *option= 0);
virtual void set_lock_for_tables(thr_lock_type lock_type) {}
void set_slave(st_select_lex_node *slave_arg) { slave= slave_arg; }
+ void move_node(st_select_lex_node *where_to_move)
+ {
+ if (where_to_move == this)
+ return;
+ if (next)
+ next->prev= prev;
+ *prev= next;
+ *where_to_move->prev= this;
+ next= where_to_move;
+ }
st_select_lex_node *insert_chain_before(st_select_lex_node **ptr_pos_to_insert,
st_select_lex_node *end_chain_node);
friend class st_select_lex_unit;
@@ -602,6 +612,8 @@ public:
executed, // already executed
cleaned;
+ bool optimize_started;
+
// list of fields which points to temporary table for union
List<Item> item_list;
/*
@@ -682,7 +694,7 @@ public:
{
return reinterpret_cast<st_select_lex*>(slave);
}
- void set_with_clause(With_clause *with_cl) { with_clause= with_cl; }
+ void set_with_clause(With_clause *with_cl);
st_select_lex_unit* next_unit()
{
return reinterpret_cast<st_select_lex_unit*>(next);
@@ -695,6 +707,7 @@ public:
bool prepare(THD *thd, select_result *result, ulong additional_options);
bool optimize();
bool exec();
+ bool exec_recursive();
bool cleanup();
inline void unclean() { cleaned= 0; }
void reinit_exec_mechanism();
@@ -726,6 +739,21 @@ public:
typedef class st_select_lex_unit SELECT_LEX_UNIT;
typedef Bounds_checked_array<Item*> Ref_ptr_array;
+
+/*
+ Structure which consists of the field and the item which
+ produces this field.
+*/
+
+class Grouping_tmp_field :public Sql_alloc
+{
+public:
+ Field *tmp_field;
+ Item *producing_item;
+ Grouping_tmp_field(Field *fld, Item *item)
+ :tmp_field(fld), producing_item(item) {}
+};
+
/*
SELECT_LEX - store information of parsed SELECT statment
*/
@@ -737,6 +765,8 @@ public:
Item *where, *having; /* WHERE & HAVING clauses */
Item *prep_where; /* saved WHERE clause for prepared statement processing */
Item *prep_having;/* saved HAVING clause for prepared statement processing */
+ Item *cond_pushed_into_where; /* condition pushed into the select's WHERE */
+ Item *cond_pushed_into_having; /* condition pushed into the select's HAVING */
/* Saved values of the WHERE and HAVING clauses*/
Item::cond_result cond_value, having_value;
/* point on lex in which it was created, used in view subquery detection */
@@ -910,6 +940,12 @@ public:
/* namp of nesting SELECT visibility (for aggregate functions check) */
nesting_map name_visibility_map;
+
+ table_map with_dep;
+ List<Grouping_tmp_field> grouping_tmp_fields;
+
+ /* it is for correct printing SELECT options */
+ thr_lock_type lock_type;
void init_query();
void init_select();
@@ -936,7 +972,10 @@ public:
bool mark_as_dependent(THD *thd, st_select_lex *last, Item *dependency);
- bool set_braces(bool value);
+ void set_braces(bool value)
+ {
+ braces= value;
+ }
bool inc_in_sum_expr();
uint get_in_sum_expr();
@@ -1084,10 +1123,7 @@ public:
void set_non_agg_field_used(bool val) { m_non_agg_field_used= val; }
void set_agg_func_used(bool val) { m_agg_func_used= val; }
- void set_with_clause(With_clause *with_clause)
- {
- master_unit()->with_clause= with_clause;
- }
+ void set_with_clause(With_clause *with_clause);
With_clause *get_with_clause()
{
return master_unit()->with_clause;
@@ -1097,7 +1133,14 @@ public:
return master_unit()->with_element;
}
With_element *find_table_def_in_with_clauses(TABLE_LIST *table);
-
+ bool check_unrestricted_recursive(bool only_standards_compliant);
+ bool check_subqueries_with_recursive_references();
+ void collect_grouping_fields(THD *thd);
+ void check_cond_extraction_for_grouping_fields(Item *cond,
+ Item_processor processor);
+ Item *build_cond_for_grouping_fields(THD *thd, Item *cond,
+ bool no_to_clones);
+
List<Window_spec> window_specs;
void prepare_add_window_spec(THD *thd);
bool add_window_def(THD *thd, LEX_STRING *win_name, LEX_STRING *win_ref,
@@ -1116,6 +1159,9 @@ public:
bool have_window_funcs() const { return (window_funcs.elements !=0); }
+ bool cond_pushdown_is_allowed() const
+ { return !have_window_funcs() && !olap; }
+
private:
bool m_non_agg_field_used;
bool m_agg_func_used;
@@ -2472,7 +2518,7 @@ struct LEX: public Query_tables_list
SELECT_LEX *all_selects_list;
/* current with clause in parsing if any, otherwise 0*/
With_clause *curr_with_clause;
- /* pointer to the first with clause in the current statemant */
+ /* pointer to the first with clause in the current statement */
With_clause *with_clauses_list;
/*
(*with_clauses_list_last_next) contains a pointer to the last
@@ -2985,9 +3031,12 @@ public:
return false;
}
// Add a constraint as a part of CREATE TABLE or ALTER TABLE
- bool add_constraint(LEX_STRING *name, Virtual_column_info *constr)
+ bool add_constraint(LEX_STRING *name, Virtual_column_info *constr,
+ bool if_not_exists)
{
constr->name= *name;
+ constr->flags= if_not_exists ?
+ Alter_info::CHECK_CONSTRAINT_IF_NOT_EXISTS : 0;
alter_info.check_constraint_list.push_back(constr);
return false;
}
@@ -3208,6 +3257,7 @@ public:
}
};
+
extern sql_digest_state *
digest_add_token(sql_digest_state *state, uint token, LEX_YYSTYPE yylval);
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 5d698486737..effc0230536 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -392,9 +392,9 @@ const LEX_STRING command_name[257]={
{ 0, 0 }, //248
{ 0, 0 }, //249
{ 0, 0 }, //250
- { 0, 0 }, //251
- { 0, 0 }, //252
- { 0, 0 }, //253
+ { C_STRING_WITH_LEN("Slave_worker") }, //251
+ { C_STRING_WITH_LEN("Slave_IO") }, //252
+ { C_STRING_WITH_LEN("Slave_SQL") }, //253
{ C_STRING_WITH_LEN("Com_multi") }, //254
{ C_STRING_WITH_LEN("Error") } // Last command number 255
};
@@ -768,6 +768,7 @@ void init_update_queries(void)
sql_command_flags[SQLCOM_INSERT_SELECT]|= CF_PREOPEN_TMP_TABLES;
sql_command_flags[SQLCOM_DELETE]|= CF_PREOPEN_TMP_TABLES;
sql_command_flags[SQLCOM_DELETE_MULTI]|= CF_PREOPEN_TMP_TABLES;
+ sql_command_flags[SQLCOM_RENAME_TABLE]|= CF_PREOPEN_TMP_TABLES;
sql_command_flags[SQLCOM_REPLACE_SELECT]|= CF_PREOPEN_TMP_TABLES;
sql_command_flags[SQLCOM_SELECT]|= CF_PREOPEN_TMP_TABLES;
sql_command_flags[SQLCOM_SET_OPTION]|= CF_PREOPEN_TMP_TABLES;
@@ -1081,9 +1082,20 @@ void do_handle_bootstrap(THD *thd)
end:
in_bootstrap= FALSE;
delete thd;
+ if (!opt_bootstrap)
+ {
+ /*
+ We need to wake up main thread in case of read_init_file().
+ This is not done by THD::~THD() when there are other threads running
+ (binlog background thread, for example). So do it here again.
+ */
+ mysql_mutex_lock(&LOCK_thread_count);
+ mysql_cond_broadcast(&COND_thread_count);
+ mysql_mutex_unlock(&LOCK_thread_count);
+ }
#ifndef EMBEDDED_LIBRARY
- DBUG_ASSERT(thread_count == 0);
+ DBUG_ASSERT(!opt_bootstrap || thread_count == 0);
my_thread_end();
pthread_exit(0);
#endif
@@ -1476,13 +1488,16 @@ uint maria_multi_check(THD *thd, char *packet, uint packet_length)
DBUG_ENTER("maria_multi_check");
while (packet_length)
{
+ char *packet_start= packet;
+ size_t subpacket_length= net_field_length((uchar **)&packet_start);
+ uint length_length= packet_start - packet;
// length of command + 3 bytes where that length was stored
- uint subpacket_length= (uint3korr(packet) + 3);
- DBUG_PRINT("info", ("sub-packet length: %d command: %x",
- subpacket_length, packet[3]));
+ DBUG_PRINT("info", ("sub-packet length: %ld + %d command: %x",
+ (ulong)subpacket_length, length_length,
+ packet_start[3]));
- if (subpacket_length == 3 ||
- subpacket_length > packet_length)
+ if (subpacket_length == 0 ||
+ (subpacket_length + length_length) > packet_length)
{
my_message(ER_UNKNOWN_COM_ERROR, ER_THD(thd, ER_UNKNOWN_COM_ERROR),
MYF(0));
@@ -1490,8 +1505,8 @@ uint maria_multi_check(THD *thd, char *packet, uint packet_length)
}
counter++;
- packet+= subpacket_length;
- packet_length-= subpacket_length;
+ packet= packet_start + subpacket_length;
+ packet_length-= (subpacket_length + length_length);
}
DBUG_RETURN(counter);
}
@@ -2231,8 +2246,10 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
break;
{
+ char *packet_start= packet;
/* We have to store next length because it will be destroyed by '\0' */
- uint next_subpacket_length= uint3korr(packet);
+ size_t next_subpacket_length= net_field_length((uchar **)&packet_start);
+ uint next_length_length= packet_start - packet;
unsigned char *readbuff= net->buff;
if (net_allocate_new_packet(net, thd, MYF(0)))
@@ -2246,13 +2263,19 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
while (packet_length)
{
current_com++;
- uint subpacket_length= next_subpacket_length + 3;
+ size_t subpacket_length= next_subpacket_length + next_length_length;
+ uint length_length= next_length_length;
if (subpacket_length < packet_length)
- next_subpacket_length= uint3korr(packet + subpacket_length);
+ {
+ packet_start= packet + subpacket_length;
+ next_subpacket_length= net_field_length((uchar**)&packet_start);
+ next_length_length= packet_start - (packet + subpacket_length);
+ }
/* safety like in do_command() */
packet[subpacket_length]= '\0';
- enum enum_server_command subcommand= fetch_command(thd, (packet + 3));
+ enum enum_server_command subcommand=
+ fetch_command(thd, (packet + length_length));
if (server_command_flags[subcommand] & CF_NO_COM_MULTI)
{
@@ -2260,8 +2283,8 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
goto com_multi_end;
}
- if (dispatch_command(subcommand, thd, packet + (1 + 3),
- subpacket_length - (1 + 3), TRUE,
+ if (dispatch_command(subcommand, thd, packet + (1 + length_length),
+ subpacket_length - (1 + length_length), TRUE,
(current_com != counter)))
{
DBUG_ASSERT(thd->is_error());
@@ -3852,6 +3875,12 @@ mysql_execute_command(THD *thd)
/* So that CREATE TEMPORARY TABLE gets to binlog at commit/rollback */
if (create_info.tmp_table())
thd->variables.option_bits|= OPTION_KEEP_LOG;
+ /* in case of create temp tables if @@session_track_state_change is
+ ON then send session state notification in OK packet */
+ if(create_info.options & HA_LEX_CREATE_TMP_TABLE)
+ {
+ SESSION_TRACKER_CHANGED(thd, SESSION_STATE_CHANGE_TRACKER, NULL);
+ }
my_ok(thd);
}
}
@@ -4608,6 +4637,13 @@ end_with_restore_list:
/* DDL and binlog write order are protected by metadata locks. */
res= mysql_rm_table(thd, first_table, lex->if_exists(), lex->tmp_table());
+
+ /* when dropping temporary tables if @@session_track_state_change is ON then
+ send the boolean tracker in the OK packet */
+ if(!res && (lex->create_info.options & HA_LEX_CREATE_TMP_TABLE))
+ {
+ SESSION_TRACKER_CHANGED(thd, SESSION_STATE_CHANGE_TRACKER, NULL);
+ }
break;
}
case SQLCOM_SHOW_PROCESSLIST:
@@ -5419,8 +5455,7 @@ end_with_restore_list:
else
{
/* Reset the isolation level and access mode if no chaining transaction.*/
- thd->tx_isolation= (enum_tx_isolation) thd->variables.tx_isolation;
- thd->tx_read_only= thd->variables.tx_read_only;
+ trans_reset_one_shot_chistics(thd);
}
/* Disconnect the current client connection. */
if (tx_release)
@@ -5467,8 +5502,7 @@ end_with_restore_list:
else
{
/* Reset the isolation level and access mode if no chaining transaction.*/
- thd->tx_isolation= (enum_tx_isolation) thd->variables.tx_isolation;
- thd->tx_read_only= thd->variables.tx_read_only;
+ trans_reset_one_shot_chistics(thd);
}
/* Disconnect the current client connection. */
if (tx_release)
@@ -5953,8 +5987,7 @@ end_with_restore_list:
We've just done a commit, reset transaction
isolation level and access mode to the session default.
*/
- thd->tx_isolation= (enum_tx_isolation) thd->variables.tx_isolation;
- thd->tx_read_only= thd->variables.tx_read_only;
+ trans_reset_one_shot_chistics(thd);
my_ok(thd);
break;
}
@@ -5972,8 +6005,7 @@ end_with_restore_list:
We've just done a rollback, reset transaction
isolation level and access mode to the session default.
*/
- thd->tx_isolation= (enum_tx_isolation) thd->variables.tx_isolation;
- thd->tx_read_only= thd->variables.tx_read_only;
+ trans_reset_one_shot_chistics(thd);
my_ok(thd);
break;
}
@@ -6191,6 +6223,9 @@ finish:
{
thd->mdl_context.release_statement_locks();
}
+
+ TRANSACT_TRACKER(add_trx_state_from_thd(thd));
+
WSREP_TO_ISOLATION_END;
#ifdef WITH_WSREP
@@ -6324,7 +6359,7 @@ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables)
}
}
/* Count number of empty select queries */
- if (!thd->get_sent_row_count())
+ if (!thd->get_sent_row_count() && !res)
status_var_increment(thd->status_var.empty_queries);
else
status_var_add(thd->status_var.rows_sent, thd->get_sent_row_count());
@@ -7209,6 +7244,7 @@ bool check_stack_overrun(THD *thd, long margin,
if ((stack_used=used_stack(thd->thread_stack,(char*) &stack_used)) >=
(long) (my_thread_stack_size - margin))
{
+ thd->is_fatal_error= 1;
/*
Do not use stack for the message buffer to ensure correct
behaviour in cases we have close to no stack left.
@@ -7297,10 +7333,13 @@ void THD::reset_for_next_command()
/*
Autoinc variables should be adjusted only for locally executed
transactions. Appliers and replayers are either processing ROW
- events or get autoinc variable values from Query_log_event.
+ events or get autoinc variable values from Query_log_event and
+ mysql slave may be processing STATEMENT format events, but he should
+ use autoinc values passed in binlog events, not the values forced by
+ the cluster.
*/
if (WSREP(thd) && thd->wsrep_exec_mode == LOCAL_STATE &&
- wsrep_auto_increment_control)
+ !thd->slave_thread && wsrep_auto_increment_control)
{
thd->variables.auto_increment_offset=
global_system_variables.auto_increment_offset;
@@ -7445,22 +7484,30 @@ mysql_new_select(LEX *lex, bool move_down)
my_error(ER_WRONG_USAGE, MYF(0), "UNION", "INTO");
DBUG_RETURN(TRUE);
}
+
+ /*
+ This type of query is not possible in the grammar:
+ SELECT 1 FROM t1 PROCEDURE ANALYSE() UNION ... ;
+
+ But this type of query is still possible:
+ (SELECT 1 FROM t1 PROCEDURE ANALYSE()) UNION ... ;
+ and it's not easy to disallow this grammatically,
+ because there can be any parenthesis nest level:
+ (((SELECT 1 FROM t1 PROCEDURE ANALYSE()))) UNION ... ;
+ */
if (lex->proc_list.elements!=0)
{
my_error(ER_WRONG_USAGE, MYF(0), "UNION",
"SELECT ... PROCEDURE ANALYSE()");
DBUG_RETURN(TRUE);
}
- if (lex->current_select->order_list.first && !lex->current_select->braces)
- {
- my_error(ER_WRONG_USAGE, MYF(0), "UNION", "ORDER BY");
- DBUG_RETURN(1);
- }
- if (lex->current_select->explicit_limit && !lex->current_select->braces)
- {
- my_error(ER_WRONG_USAGE, MYF(0), "UNION", "LIMIT");
- DBUG_RETURN(1);
- }
+ // SELECT 1 FROM t1 ORDER BY 1 UNION SELECT 1 FROM t1 -- not possible
+ DBUG_ASSERT(!lex->current_select->order_list.first ||
+ lex->current_select->braces);
+ // SELECT 1 FROM t1 LIMIT 1 UNION SELECT 1 FROM t1; -- not possible
+ DBUG_ASSERT(!lex->current_select->explicit_limit ||
+ lex->current_select->braces);
+
select_lex->include_neighbour(lex->current_select);
SELECT_LEX_UNIT *unit= select_lex->master_unit();
if (!unit->fake_select_lex && unit->add_fake_select_lex(lex->thd))
@@ -7721,10 +7768,9 @@ void mysql_parse(THD *thd, char *rawbuf, uint length,
PROCESSLIST.
*/
if (found_semicolon && (ulong) (found_semicolon - thd->query()))
- thd->set_query_inner(thd->query(),
- (uint32) (found_semicolon -
- thd->query() - 1),
- thd->charset());
+ thd->set_query(thd->query(),
+ (uint32) (found_semicolon - thd->query() - 1),
+ thd->charset());
/* Actually execute the query */
if (found_semicolon)
{
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc
index b45f85528a6..324eef09854 100644
--- a/sql/sql_partition.cc
+++ b/sql/sql_partition.cc
@@ -2311,6 +2311,15 @@ static int add_partition_values(File fptr, partition_info *part_info,
{
uint i;
List_iterator<part_elem_value> list_val_it(p_elem->list_val_list);
+
+ if (p_elem->max_value)
+ {
+ DBUG_ASSERT(part_info->defined_max_value ||
+ current_thd->lex->sql_command == SQLCOM_ALTER_TABLE);
+ err+= add_string(fptr, " DEFAULT");
+ return err;
+ }
+
err+= add_string(fptr, " VALUES IN ");
uint num_items= p_elem->list_val_list.elements;
@@ -3070,6 +3079,11 @@ int get_partition_id_list_col(partition_info *part_info,
}
}
notfound:
+ if (part_info->defined_max_value)
+ {
+ *part_id= part_info->default_partition_id;
+ DBUG_RETURN(0);
+ }
*part_id= 0;
DBUG_RETURN(HA_ERR_NO_PARTITION_FOUND);
}
@@ -3123,6 +3137,11 @@ int get_partition_id_list(partition_info *part_info,
}
}
notfound:
+ if (part_info->defined_max_value)
+ {
+ *part_id= part_info->default_partition_id;
+ DBUG_RETURN(0);
+ }
*part_id= 0;
DBUG_RETURN(HA_ERR_NO_PARTITION_FOUND);
}
@@ -4691,9 +4710,26 @@ uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info,
DBUG_RETURN(TRUE);
}
- thd->work_part_info= thd->lex->part_info;
-
- if (thd->work_part_info &&
+ partition_info *alt_part_info= thd->lex->part_info;
+ /*
+ This variable is TRUE in very special case when we add only DEFAULT
+ partition to the existing table
+ */
+ bool only_default_value_added=
+ (alt_part_info &&
+ alt_part_info->current_partition &&
+ alt_part_info->current_partition->list_val_list.elements == 1 &&
+ alt_part_info->current_partition->list_val_list.head()->
+ added_items >= 1 &&
+ alt_part_info->current_partition->list_val_list.head()->
+ col_val_array[0].max_value) &&
+ alt_part_info->part_type == LIST_PARTITION &&
+ (alter_info->flags & Alter_info::ALTER_ADD_PARTITION);
+ if (only_default_value_added &&
+ !thd->lex->part_info->num_columns)
+ thd->lex->part_info->num_columns= 1; // to make correct clone
+
+ if ((thd->work_part_info= thd->lex->part_info) &&
!(thd->work_part_info= thd->lex->part_info->get_clone(thd)))
DBUG_RETURN(TRUE);
@@ -4709,12 +4745,12 @@ uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info,
Alter_info::ALTER_REBUILD_PARTITION))
{
partition_info *tab_part_info;
- partition_info *alt_part_info= thd->work_part_info;
uint flags= 0;
bool is_last_partition_reorged= FALSE;
part_elem_value *tab_max_elem_val= NULL;
part_elem_value *alt_max_elem_val= NULL;
longlong tab_max_range= 0, alt_max_range= 0;
+ alt_part_info= thd->work_part_info;
if (!table->part_info)
{
@@ -4805,7 +4841,8 @@ uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info,
my_error(ER_PARTITION_FUNCTION_FAILURE, MYF(0));
goto err;
}
- if ((flags & (HA_FAST_CHANGE_PARTITION | HA_PARTITION_ONE_PHASE)) != 0)
+ if ((flags & (HA_FAST_CHANGE_PARTITION | HA_PARTITION_ONE_PHASE)) != 0 &&
+ !tab_part_info->has_default_partititon())
{
/*
"Fast" change of partitioning is supported in this case.
@@ -4879,14 +4916,16 @@ uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info,
}
}
if ((tab_part_info->column_list &&
- alt_part_info->num_columns != tab_part_info->num_columns) ||
+ alt_part_info->num_columns != tab_part_info->num_columns &&
+ !only_default_value_added) ||
(!tab_part_info->column_list &&
(tab_part_info->part_type == RANGE_PARTITION ||
tab_part_info->part_type == LIST_PARTITION) &&
- alt_part_info->num_columns != 1U) ||
+ alt_part_info->num_columns != 1U &&
+ !only_default_value_added) ||
(!tab_part_info->column_list &&
tab_part_info->part_type == HASH_PARTITION &&
- alt_part_info->num_columns != 0))
+ (alt_part_info->num_columns != 0)))
{
my_error(ER_PARTITION_COLUMN_LIST_ERROR, MYF(0));
goto err;
@@ -4919,9 +4958,13 @@ uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info,
my_error(ER_NO_BINLOG_ERROR, MYF(0));
goto err;
}
- if (tab_part_info->defined_max_value)
+ if (tab_part_info->defined_max_value &&
+ (tab_part_info->part_type == RANGE_PARTITION ||
+ alt_part_info->defined_max_value))
{
- my_error(ER_PARTITION_MAXVALUE_ERROR, MYF(0));
+ my_error((tab_part_info->part_type == RANGE_PARTITION ?
+ ER_PARTITION_MAXVALUE_ERROR :
+ ER_PARTITION_DEFAULT_ERROR), MYF(0));
goto err;
}
if (num_new_partitions == 0)
@@ -7677,8 +7720,10 @@ int get_part_iter_for_interval_cols_via_map(partition_info *part_info,
uint flags,
PARTITION_ITERATOR *part_iter)
{
+ bool can_match_multiple_values;
uint32 nparts;
get_col_endpoint_func UNINIT_VAR(get_col_endpoint);
+ uint full_length= 0;
DBUG_ENTER("get_part_iter_for_interval_cols_via_map");
if (part_info->part_type == RANGE_PARTITION)
@@ -7696,6 +7741,19 @@ int get_part_iter_for_interval_cols_via_map(partition_info *part_info,
else
assert(0);
+ for (uint32 i= 0; i < part_info->num_columns; i++)
+ full_length+= store_length_array[i];
+
+ can_match_multiple_values= ((flags &
+ (NO_MIN_RANGE | NO_MAX_RANGE | NEAR_MIN |
+ NEAR_MAX)) ||
+ (min_len != max_len) ||
+ (min_len != full_length) ||
+ memcmp(min_value, max_value, min_len));
+ DBUG_ASSERT(can_match_multiple_values || (flags & EQ_RANGE) || flags == 0);
+ if (can_match_multiple_values && part_info->has_default_partititon())
+ part_iter->ret_default_part= part_iter->ret_default_part_orig= TRUE;
+
if (flags & NO_MIN_RANGE)
part_iter->part_nums.start= part_iter->part_nums.cur= 0;
else
@@ -7731,7 +7789,15 @@ int get_part_iter_for_interval_cols_via_map(partition_info *part_info,
nparts);
}
if (part_iter->part_nums.start == part_iter->part_nums.end)
+ {
+ // No matching partition found.
+ if (part_info->has_default_partititon())
+ {
+ part_iter->ret_default_part= part_iter->ret_default_part_orig= TRUE;
+ DBUG_RETURN(1);
+ }
DBUG_RETURN(0);
+ }
DBUG_RETURN(1);
}
@@ -7792,6 +7858,7 @@ int get_part_iter_for_interval_via_mapping(partition_info *part_info,
(void)min_len;
(void)max_len;
part_iter->ret_null_part= part_iter->ret_null_part_orig= FALSE;
+ part_iter->ret_default_part= part_iter->ret_default_part_orig= FALSE;
if (part_info->part_type == RANGE_PARTITION)
{
@@ -7828,8 +7895,13 @@ int get_part_iter_for_interval_via_mapping(partition_info *part_info,
else
MY_ASSERT_UNREACHABLE();
- can_match_multiple_values= (flags || !min_value || !max_value ||
+ can_match_multiple_values= ((flags &
+ (NO_MIN_RANGE | NO_MAX_RANGE | NEAR_MIN |
+ NEAR_MAX)) ||
memcmp(min_value, max_value, field_len));
+ DBUG_ASSERT(can_match_multiple_values || (flags & EQ_RANGE) || flags == 0);
+ if (can_match_multiple_values && part_info->has_default_partititon())
+ part_iter->ret_default_part= part_iter->ret_default_part_orig= TRUE;
if (can_match_multiple_values &&
(part_info->part_type == RANGE_PARTITION ||
part_info->has_null_value))
@@ -7859,6 +7931,12 @@ int get_part_iter_for_interval_via_mapping(partition_info *part_info,
{
/* The right bound is X <= NULL, i.e. it is a "X IS NULL" interval */
part_iter->part_nums.end= 0;
+ /*
+ It is something like select * from tbl where col IS NULL
+ and we have partition with NULL to catch it, so we do not need
+ DEFAULT partition
+ */
+ part_iter->ret_default_part= part_iter->ret_default_part_orig= FALSE;
DBUG_RETURN(1);
}
}
@@ -7882,8 +7960,19 @@ int get_part_iter_for_interval_via_mapping(partition_info *part_info,
/* col = x and F(x) = NULL -> only search NULL partition */
part_iter->part_nums.cur= part_iter->part_nums.start= 0;
part_iter->part_nums.end= 0;
- part_iter->ret_null_part= part_iter->ret_null_part_orig= TRUE;
- DBUG_RETURN(1);
+ /*
+ if NULL partition exists:
+ for RANGE it is the first partition (always exists);
+ for LIST should be indicator that it is present
+ */
+ if (part_info->part_type == RANGE_PARTITION ||
+ part_info->has_null_value)
+ {
+ part_iter->ret_null_part= part_iter->ret_null_part_orig= TRUE;
+ DBUG_RETURN(1);
+ }
+ // If no NULL partition look up in DEFAULT or there is no such value
+ goto not_found;
}
part_iter->part_nums.cur= part_iter->part_nums.start;
if (check_zero_dates && !part_info->part_expr->null_value)
@@ -7900,7 +7989,7 @@ int get_part_iter_for_interval_via_mapping(partition_info *part_info,
}
}
if (part_iter->part_nums.start == max_endpoint_val)
- DBUG_RETURN(0); /* No partitions */
+ goto not_found;
}
}
@@ -7937,9 +8026,17 @@ int get_part_iter_for_interval_via_mapping(partition_info *part_info,
}
if (part_iter->part_nums.start >= part_iter->part_nums.end &&
!part_iter->ret_null_part)
- DBUG_RETURN(0); /* No partitions */
+ goto not_found;
}
DBUG_RETURN(1); /* Ok, iterator initialized */
+
+not_found:
+ if (part_info->has_default_partititon())
+ {
+ part_iter->ret_default_part= part_iter->ret_default_part_orig= TRUE;
+ DBUG_RETURN(1);
+ }
+ DBUG_RETURN(0); /* No partitions */
}
@@ -8003,6 +8100,8 @@ int get_part_iter_for_interval_via_walking(partition_info *part_info,
(void)max_len;
part_iter->ret_null_part= part_iter->ret_null_part_orig= FALSE;
+ part_iter->ret_default_part= part_iter->ret_default_part_orig= FALSE;
+
if (is_subpart)
{
field= part_info->subpart_field_array[0];
@@ -8134,6 +8233,9 @@ uint32 get_next_partition_id_range(PARTITION_ITERATOR* part_iter)
part_iter->ret_null_part= FALSE;
return 0; /* NULL always in first range partition */
}
+ // we do not have default partition in RANGE partitioning
+ DBUG_ASSERT(!part_iter->ret_default_part);
+
part_iter->part_nums.cur= part_iter->part_nums.start;
part_iter->ret_null_part= part_iter->ret_null_part_orig;
return NOT_A_PARTITION_ID;
@@ -8171,8 +8273,15 @@ uint32 get_next_partition_id_list(PARTITION_ITERATOR *part_iter)
part_iter->ret_null_part= FALSE;
return part_iter->part_info->has_null_part_id;
}
+ if (part_iter->ret_default_part)
+ {
+ part_iter->ret_default_part= FALSE;
+ return part_iter->part_info->default_partition_id;
+ }
+ /* Reset partition for next read */
part_iter->part_nums.cur= part_iter->part_nums.start;
part_iter->ret_null_part= part_iter->ret_null_part_orig;
+ part_iter->ret_default_part= part_iter->ret_default_part_orig;
return NOT_A_PARTITION_ID;
}
else
diff --git a/sql/sql_partition.h b/sql/sql_partition.h
index dd352b60120..b225c14fc53 100644
--- a/sql/sql_partition.h
+++ b/sql/sql_partition.h
@@ -177,6 +177,10 @@ typedef struct st_partition_iter
iterator also produce id of the partition that contains NULL value.
*/
bool ret_null_part, ret_null_part_orig;
+ /*
+ We should return DEFAULT partition.
+ */
+ bool ret_default_part, ret_default_part_orig;
struct st_part_num_range
{
uint32 start;
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
index 848358e517a..ce46a76d103 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -269,6 +269,7 @@ struct st_bookmark
uint name_len;
int offset;
uint version;
+ bool loaded;
char key[1];
};
@@ -1175,6 +1176,13 @@ err:
DBUG_RETURN(errs > 0 || oks + dupes == 0);
}
+static void plugin_variables_deinit(struct st_plugin_int *plugin)
+{
+
+ for (sys_var *var= plugin->system_vars; var; var= var->next)
+ (*var->test_load)= FALSE;
+ mysql_del_sys_var_chain(plugin->system_vars);
+}
static void plugin_deinitialize(struct st_plugin_int *plugin, bool ref_check)
{
@@ -1226,8 +1234,7 @@ static void plugin_deinitialize(struct st_plugin_int *plugin, bool ref_check)
if (ref_check && plugin->ref_count)
sql_print_error("Plugin '%s' has ref_count=%d after deinitialization.",
plugin->name.str, plugin->ref_count);
-
- mysql_del_sys_var_chain(plugin->system_vars);
+ plugin_variables_deinit(plugin);
}
static void plugin_del(struct st_plugin_int *plugin)
@@ -1447,7 +1454,7 @@ static int plugin_initialize(MEM_ROOT *tmp_root, struct st_plugin_int *plugin,
err:
if (ret)
- mysql_del_sys_var_chain(plugin->system_vars);
+ plugin_variables_deinit(plugin);
mysql_mutex_lock(&LOCK_plugin);
plugin->state= state;
@@ -2780,15 +2787,17 @@ static void update_func_double(THD *thd, struct st_mysql_sys_var *var,
System Variables support
****************************************************************************/
-
-sys_var *find_sys_var(THD *thd, const char *str, uint length)
+sys_var *find_sys_var_ex(THD *thd, const char *str, size_t length,
+ bool throw_error, bool locked)
{
sys_var *var;
sys_var_pluginvar *pi= NULL;
plugin_ref plugin;
- DBUG_ENTER("find_sys_var");
+ DBUG_ENTER("find_sys_var_ex");
+ DBUG_PRINT("enter", ("var '%.*s'", (int)length, str));
- mysql_mutex_lock(&LOCK_plugin);
+ if (!locked)
+ mysql_mutex_lock(&LOCK_plugin);
mysql_rwlock_rdlock(&LOCK_system_variables_hash);
if ((var= intern_find_sys_var(str, length)) &&
(pi= var->cast_pluginvar()))
@@ -2807,14 +2816,20 @@ sys_var *find_sys_var(THD *thd, const char *str, uint length)
}
else
mysql_rwlock_unlock(&LOCK_system_variables_hash);
- mysql_mutex_unlock(&LOCK_plugin);
+ if (!locked)
+ mysql_mutex_unlock(&LOCK_plugin);
- if (!var)
- my_error(ER_UNKNOWN_SYSTEM_VARIABLE, MYF(0), (char*) str);
+ if (!throw_error && !var)
+ my_error(ER_UNKNOWN_SYSTEM_VARIABLE, MYF(0), (int)length, (char*) str);
DBUG_RETURN(var);
}
+sys_var *find_sys_var(THD *thd, const char *str, size_t length)
+{
+ return find_sys_var_ex(thd, str, length, false, false);
+}
+
/*
called by register_var, construct_options and test_plugin_options.
Returns the 'bookmark' for the named variable.
@@ -2962,6 +2977,70 @@ static st_bookmark *register_var(const char *plugin, const char *name,
return result;
}
+
+void sync_dynamic_session_variables(THD* thd, bool global_lock)
+{
+ uint idx;
+
+ thd->variables.dynamic_variables_ptr= (char*)
+ my_realloc(thd->variables.dynamic_variables_ptr,
+ global_variables_dynamic_size,
+ MYF(MY_WME | MY_FAE | MY_ALLOW_ZERO_PTR));
+
+ if (global_lock)
+ mysql_mutex_lock(&LOCK_global_system_variables);
+
+ mysql_mutex_assert_owner(&LOCK_global_system_variables);
+
+ memcpy(thd->variables.dynamic_variables_ptr +
+ thd->variables.dynamic_variables_size,
+ global_system_variables.dynamic_variables_ptr +
+ thd->variables.dynamic_variables_size,
+ global_system_variables.dynamic_variables_size -
+ thd->variables.dynamic_variables_size);
+
+ /*
+ now we need to iterate through any newly copied 'defaults'
+ and if it is a string type with MEMALLOC flag, we need to strdup
+ */
+ for (idx= 0; idx < bookmark_hash.records; idx++)
+ {
+ sys_var_pluginvar *pi;
+ sys_var *var;
+ st_bookmark *v= (st_bookmark*) my_hash_element(&bookmark_hash,idx);
+
+ if (v->version <= thd->variables.dynamic_variables_version)
+ continue; /* already in thd->variables */
+
+ if (!(var= intern_find_sys_var(v->key + 1, v->name_len)) ||
+ !(pi= var->cast_pluginvar()) ||
+ v->key[0] != plugin_var_bookmark_key(pi->plugin_var->flags))
+ continue;
+
+ /* Here we do anything special that may be required of the data types */
+
+ if ((pi->plugin_var->flags & PLUGIN_VAR_TYPEMASK) == PLUGIN_VAR_STR &&
+ pi->plugin_var->flags & PLUGIN_VAR_MEMALLOC)
+ {
+ int offset= ((thdvar_str_t *)(pi->plugin_var))->offset;
+ char **pp= (char**) (thd->variables.dynamic_variables_ptr + offset);
+ if (*pp)
+ *pp= my_strdup(*pp, MYF(MY_WME|MY_FAE));
+ }
+ }
+
+ if (global_lock)
+ mysql_mutex_unlock(&LOCK_global_system_variables);
+
+ thd->variables.dynamic_variables_version=
+ global_system_variables.dynamic_variables_version;
+ thd->variables.dynamic_variables_head=
+ global_system_variables.dynamic_variables_head;
+ thd->variables.dynamic_variables_size=
+ global_system_variables.dynamic_variables_size;
+}
+
+
/*
returns a pointer to the memory which holds the thd-local variable or
a pointer to the global variable if thd==null.
@@ -2983,67 +3062,8 @@ static uchar *intern_sys_var_ptr(THD* thd, int offset, bool global_lock)
if (!thd->variables.dynamic_variables_ptr ||
(uint)offset > thd->variables.dynamic_variables_head)
{
- uint idx;
-
mysql_rwlock_rdlock(&LOCK_system_variables_hash);
-
- thd->variables.dynamic_variables_ptr= (char*)
- my_realloc(thd->variables.dynamic_variables_ptr,
- global_variables_dynamic_size,
- MYF(MY_WME | MY_FAE | MY_ALLOW_ZERO_PTR));
-
- if (global_lock)
- mysql_mutex_lock(&LOCK_global_system_variables);
-
- mysql_mutex_assert_owner(&LOCK_global_system_variables);
-
- memcpy(thd->variables.dynamic_variables_ptr +
- thd->variables.dynamic_variables_size,
- global_system_variables.dynamic_variables_ptr +
- thd->variables.dynamic_variables_size,
- global_system_variables.dynamic_variables_size -
- thd->variables.dynamic_variables_size);
-
- /*
- now we need to iterate through any newly copied 'defaults'
- and if it is a string type with MEMALLOC flag, we need to strdup
- */
- for (idx= 0; idx < bookmark_hash.records; idx++)
- {
- sys_var_pluginvar *pi;
- sys_var *var;
- st_bookmark *v= (st_bookmark*) my_hash_element(&bookmark_hash,idx);
-
- if (v->version <= thd->variables.dynamic_variables_version)
- continue; /* already in thd->variables */
-
- if (!(var= intern_find_sys_var(v->key + 1, v->name_len)) ||
- !(pi= var->cast_pluginvar()) ||
- v->key[0] != plugin_var_bookmark_key(pi->plugin_var->flags))
- continue;
-
- /* Here we do anything special that may be required of the data types */
-
- if ((pi->plugin_var->flags & PLUGIN_VAR_TYPEMASK) == PLUGIN_VAR_STR &&
- pi->plugin_var->flags & PLUGIN_VAR_MEMALLOC)
- {
- int offset= ((thdvar_str_t *)(pi->plugin_var))->offset;
- char **pp= (char**) (thd->variables.dynamic_variables_ptr + offset);
- if (*pp)
- *pp= my_strdup(*pp, MYF(MY_WME|MY_FAE));
- }
- }
-
- if (global_lock)
- mysql_mutex_unlock(&LOCK_global_system_variables);
-
- thd->variables.dynamic_variables_version=
- global_system_variables.dynamic_variables_version;
- thd->variables.dynamic_variables_head=
- global_system_variables.dynamic_variables_head;
- thd->variables.dynamic_variables_size=
- global_system_variables.dynamic_variables_size;
-
+ sync_dynamic_session_variables(thd, global_lock);
mysql_rwlock_unlock(&LOCK_system_variables_hash);
}
DBUG_RETURN((uchar*)thd->variables.dynamic_variables_ptr + offset);
@@ -3577,6 +3597,7 @@ void plugin_opt_set_limits(struct my_option *options,
case PLUGIN_VAR_BOOL:
options->var_type= GET_BOOL;
options->def_value= ((sysvar_bool_t*) opt)->def_val;
+ options->typelib= &bool_typelib;
break;
case PLUGIN_VAR_STR:
options->var_type= ((opt->flags & PLUGIN_VAR_MEMALLOC) ?
@@ -3625,6 +3646,7 @@ void plugin_opt_set_limits(struct my_option *options,
case PLUGIN_VAR_BOOL | PLUGIN_VAR_THDLOCAL:
options->var_type= GET_BOOL;
options->def_value= ((thdvar_bool_t*) opt)->def_val;
+ options->typelib= &bool_typelib;
break;
case PLUGIN_VAR_STR | PLUGIN_VAR_THDLOCAL:
options->var_type= ((opt->flags & PLUGIN_VAR_MEMALLOC) ?
@@ -3941,6 +3963,14 @@ my_bool mark_changed(int, const struct my_option *opt, char *)
}
/**
+ It is always false to mark global plugin variable unloaded just to be
+ safe because we have no way now to know truth about them.
+
+ TODO: make correct mechanism for global plugin variables
+*/
+static bool static_unload= FALSE;
+
+/**
Create and register system variables supplied from the plugin and
assigns initial values from corresponding command line arguments.
@@ -4017,9 +4047,13 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
tmp_backup[tmp->nbackups++].save(&o->name);
if ((var= find_bookmark(tmp->name.str, o->name, o->flags)))
+ {
varname= var->key + 1;
+ var->loaded= TRUE;
+ }
else
{
+ var= NULL;
len= tmp->name.length + strlen(o->name) + 2;
varname= (char*) alloc_root(mem_root, len);
strxmov(varname, tmp->name.str, "-", o->name, NullS);
@@ -4027,6 +4061,9 @@ static int test_plugin_options(MEM_ROOT *tmp_root, struct st_plugin_int *tmp,
convert_dash_to_underscore(varname, len-1);
}
v= new (mem_root) sys_var_pluginvar(&chain, varname, tmp, o);
+ v->test_load= (var ? &var->loaded : &static_unload);
+ DBUG_ASSERT(static_unload == FALSE);
+
if (!(o->flags & PLUGIN_VAR_NOCMDOPT))
{
// update app_type, used for I_S.SYSTEM_VARIABLES
diff --git a/sql/sql_plugin.h b/sql/sql_plugin.h
index efa48b22ce8..317ccf482b6 100644
--- a/sql/sql_plugin.h
+++ b/sql/sql_plugin.h
@@ -120,6 +120,8 @@ struct st_plugin_int
};
+extern mysql_mutex_t LOCK_plugin;
+
/*
See intern_plugin_lock() for the explanation for the
conditionally defined plugin_ref type
@@ -187,7 +189,13 @@ typedef my_bool (plugin_foreach_func)(THD *thd,
#define plugin_foreach(A,B,C,D) plugin_foreach_with_mask(A,B,C,PLUGIN_IS_READY,D)
extern bool plugin_foreach_with_mask(THD *thd, plugin_foreach_func *func,
int type, uint state_mask, void *arg);
+extern void sync_dynamic_session_variables(THD* thd, bool global_lock);
+
extern bool plugin_dl_foreach(THD *thd, const LEX_STRING *dl,
plugin_foreach_func *func, void *arg);
+sys_var *find_sys_var_ex(THD *thd, const char *str, size_t length,
+ bool throw_error, bool locked);
+
+extern void sync_dynamic_session_variables(THD* thd, bool global_lock);
#endif
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index e8a7dce5771..eab2863588d 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -2758,7 +2758,10 @@ void mysql_sql_stmt_prepare(THD *thd)
thd->stmt_map.erase(stmt);
}
else
+ {
+ SESSION_TRACKER_CHANGED(thd, SESSION_STATE_CHANGE_TRACKER, NULL);
my_ok(thd, 0L, 0L, "Statement prepared");
+ }
DBUG_VOID_RETURN;
}
@@ -3208,6 +3211,7 @@ void mysql_sql_stmt_close(THD *thd)
else
{
stmt->deallocate();
+ SESSION_TRACKER_CHANGED(thd, SESSION_STATE_CHANGE_TRACKER, NULL);
my_ok(thd);
}
}
diff --git a/sql/sql_priv.h b/sql/sql_priv.h
index 40349d3802a..4bf93040dc8 100644
--- a/sql/sql_priv.h
+++ b/sql/sql_priv.h
@@ -226,6 +226,7 @@
#define OPTIMIZER_SWITCH_EXTENDED_KEYS (1ULL << 27)
#define OPTIMIZER_SWITCH_EXISTS_TO_IN (1ULL << 28)
#define OPTIMIZER_SWITCH_ORDERBY_EQ_PROP (1ULL << 29)
+#define OPTIMIZER_SWITCH_COND_PUSHDOWN_FOR_DERIVED (1ULL << 30)
#define OPTIMIZER_SWITCH_DEFAULT (OPTIMIZER_SWITCH_INDEX_MERGE | \
OPTIMIZER_SWITCH_INDEX_MERGE_UNION | \
@@ -249,7 +250,8 @@
OPTIMIZER_SWITCH_SEMIJOIN | \
OPTIMIZER_SWITCH_FIRSTMATCH | \
OPTIMIZER_SWITCH_LOOSE_SCAN | \
- OPTIMIZER_SWITCH_EXISTS_TO_IN)
+ OPTIMIZER_SWITCH_EXISTS_TO_IN | \
+ OPTIMIZER_SWITCH_COND_PUSHDOWN_FOR_DERIVED)
/*
Replication uses 8 bytes to store SQL_MODE in the binary log. The day you
use strictly more than 64 bits by adding one more define above, you should
diff --git a/sql/sql_reload.cc b/sql/sql_reload.cc
index 2fef615831b..2d72d1052d2 100644
--- a/sql/sql_reload.cc
+++ b/sql/sql_reload.cc
@@ -155,6 +155,12 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
{
if (mysql_bin_log.rotate_and_purge(true))
*write_to_binlog= -1;
+
+ if (WSREP_ON)
+ {
+ /* Wait for last binlog checkpoint event to be logged. */
+ mysql_bin_log.wait_for_last_checkpoint_event();
+ }
}
}
if (options & REFRESH_RELAY_LOG)
diff --git a/sql/sql_rename.cc b/sql/sql_rename.cc
index 17b297f63bd..1588644f0e1 100644
--- a/sql/sql_rename.cc
+++ b/sql/sql_rename.cc
@@ -24,10 +24,9 @@
#include "unireg.h"
#include "sql_rename.h"
#include "sql_cache.h" // query_cache_*
-#include "sql_table.h" // build_table_filename
+#include "sql_table.h" // write_bin_log
#include "sql_view.h" // mysql_frm_type, mysql_rename_view
#include "sql_trigger.h"
-#include "lock.h" // MYSQL_OPEN_SKIP_TEMPORARY
#include "sql_base.h" // tdc_remove_table, lock_table_names,
#include "sql_handler.h" // mysql_ha_rm_tables
#include "sql_statistics.h"
@@ -212,6 +211,28 @@ static TABLE_LIST *reverse_table_list(TABLE_LIST *table_list)
}
+static bool
+do_rename_temporary(THD *thd, TABLE_LIST *ren_table, TABLE_LIST *new_table,
+ bool skip_error)
+{
+ const char *new_alias;
+ DBUG_ENTER("do_rename_temporary");
+
+ new_alias= (lower_case_table_names == 2) ? new_table->alias :
+ new_table->table_name;
+
+ if (is_temporary_table(new_table))
+ {
+ my_error(ER_TABLE_EXISTS_ERROR, MYF(0), new_alias);
+ DBUG_RETURN(1); // This can't be skipped
+ }
+
+
+ DBUG_RETURN(thd->rename_temporary_table(ren_table->table,
+ new_table->db, new_alias));
+}
+
+
/*
Rename a single table or a view
@@ -317,6 +338,8 @@ do_rename(THD *thd, TABLE_LIST *ren_table, char *new_db, char *new_table_name,
DBUG_RETURN(0);
}
+
+
/*
Rename all tables in list; Return pointer to wrong entry if something goes
wrong. Note that the table_list may be empty!
@@ -351,8 +374,11 @@ rename_tables(THD *thd, TABLE_LIST *table_list, bool skip_error)
for (ren_table= table_list; ren_table; ren_table= new_table->next_local)
{
new_table= ren_table->next_local;
- if (do_rename(thd, ren_table, new_table->db, new_table->table_name,
- new_table->alias, skip_error))
+
+ if (is_temporary_table(ren_table) ?
+ do_rename_temporary(thd, ren_table, new_table, skip_error) :
+ do_rename(thd, ren_table, new_table->db, new_table->table_name,
+ new_table->alias, skip_error))
DBUG_RETURN(ren_table);
}
DBUG_RETURN(0);
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index 36f0cd84cbf..6ece9b793c9 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -2116,12 +2116,6 @@ static int init_binlog_sender(binlog_send_info *info,
info->error= ER_MASTER_FATAL_ERROR_READING_BINLOG;
return 1;
}
- if (!server_id_supplied)
- {
- info->errmsg= "Misconfigured master - server id was not set";
- info->error= ER_MASTER_FATAL_ERROR_READING_BINLOG;
- return 1;
- }
char search_file_name[FN_REFLEN];
const char *name=search_file_name;
@@ -3072,12 +3066,6 @@ int start_slave(THD* thd , Master_info* mi, bool net_report)
if (init_master_info(mi,master_info_file_tmp,relay_log_info_file_tmp, 0,
thread_mask))
slave_errno=ER_MASTER_INFO;
- else if (!server_id_supplied)
- {
- slave_errno= ER_BAD_SLAVE; net_report= 0;
- my_message(slave_errno, "Misconfigured slave: server_id was not set; Fix in config file",
- MYF(0));
- }
else if (!*mi->host)
{
slave_errno= ER_BAD_SLAVE; net_report= 0;
diff --git a/sql/sql_repl.h b/sql/sql_repl.h
index e2000bbca73..4105bdddf4e 100644
--- a/sql/sql_repl.h
+++ b/sql/sql_repl.h
@@ -36,7 +36,6 @@ struct slave_connection_state;
extern my_bool opt_show_slave_auth_info;
extern char *master_host, *master_info_file;
-extern bool server_id_supplied;
extern int max_binlog_dump_events;
extern my_bool opt_sporadic_binlog_dump_fail;
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 5cc7798fde9..aa08420931f 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -165,10 +165,6 @@ static COND *optimize_cond(JOIN *join, COND *conds,
int flags= 0);
bool const_expression_in_where(COND *conds,Item *item, Item **comp_item);
static int do_select(JOIN *join, Procedure *procedure);
-static bool instantiate_tmp_table(TABLE *table, KEY *keyinfo,
- MARIA_COLUMNDEF *start_recinfo,
- MARIA_COLUMNDEF **recinfo,
- ulonglong options);
static enum_nested_loop_state evaluate_join_record(JOIN *, JOIN_TAB *, int);
static enum_nested_loop_state
@@ -699,7 +695,7 @@ JOIN::prepare(TABLE_LIST *tables_init,
DBUG_ENTER("JOIN::prepare");
// to prevent double initialization on EXPLAIN
- if (optimized)
+ if (optimization_state != JOIN::NOT_OPTIMIZED)
DBUG_RETURN(0);
conds= conds_init;
@@ -858,6 +854,13 @@ JOIN::prepare(TABLE_LIST *tables_init,
With_clause *with_clause=select_lex->get_with_clause();
if (with_clause && with_clause->prepare_unreferenced_elements(thd))
DBUG_RETURN(1);
+
+ With_element *with_elem= select_lex->get_with_element();
+ if (with_elem &&
+ select_lex->check_unrestricted_recursive(
+ thd->variables.only_standards_compliant_cte))
+ DBUG_RETURN(-1);
+ select_lex->check_subqueries_with_recursive_references();
int res= check_and_do_in_subquery_rewrites(this);
@@ -1065,24 +1068,13 @@ err:
int JOIN::optimize()
{
- bool was_optimized= optimized;
+ // to prevent double initialization on EXPLAIN
+ if (optimization_state != JOIN::NOT_OPTIMIZED)
+ return FALSE;
+ optimization_state= JOIN::OPTIMIZATION_IN_PROGRESS;
+
int res= optimize_inner();
- /*
- If we're inside a non-correlated subquery, this function may be
- called for the second time after the subquery has been executed
- and deleted. The second call will not produce a valid query plan, it will
- short-circuit because optimized==TRUE.
-
- "was_optimized != optimized" is here to handle this case:
- - first optimization starts, gets an error (from a const. cheap
- subquery), returns 1
- - another JOIN::optimize() call made, and now join->optimize() will
- return 0, even though we never had a query plan.
-
- Can have QEP_NOT_PRESENT_YET for degenerate queries (for example,
- SELECT * FROM tbl LIMIT 0)
- */
- if (was_optimized != optimized && !res && have_query_plan != QEP_DELETED)
+ if (!res && have_query_plan != QEP_DELETED)
{
create_explain_query_if_not_exists(thd->lex, thd->mem_root);
have_query_plan= QEP_AVAILABLE;
@@ -1109,6 +1101,7 @@ int JOIN::optimize()
}
}
+ optimization_state= JOIN::OPTIMIZATION_DONE;
return res;
}
@@ -1128,16 +1121,15 @@ int JOIN::optimize()
int
JOIN::optimize_inner()
{
+/*
+ if (conds) { Item *it_clone= conds->build_clone(thd,thd->mem_root); }
+*/
ulonglong select_opts_for_readinfo;
uint no_jbuf_after;
JOIN_TAB *tab;
DBUG_ENTER("JOIN::optimize");
-
do_send_rows = (unit->select_limit_cnt) ? 1 : 0;
- // to prevent double initialization on EXPLAIN
- if (optimized)
- DBUG_RETURN(0);
- optimized= 1;
+
DEBUG_SYNC(thd, "before_join_optimize");
THD_STAGE_INFO(thd, stage_optimizing);
@@ -1145,10 +1137,6 @@ JOIN::optimize_inner()
set_allowed_join_cache_types();
need_distinct= TRUE;
- /* Run optimize phase for all derived tables/views used in this SELECT. */
- if (select_lex->handle_derived(thd->lex, DT_OPTIMIZE))
- DBUG_RETURN(1);
-
if (select_lex->first_cond_optimization)
{
//Do it only for the first execution
@@ -1261,8 +1249,49 @@ JOIN::optimize_inner()
if (setup_jtbm_semi_joins(this, join_list, &conds))
DBUG_RETURN(1);
+ if (select_lex->cond_pushed_into_where)
+ {
+ conds= and_conds(thd, conds, select_lex->cond_pushed_into_where);
+ if (conds && conds->fix_fields(thd, &conds))
+ DBUG_RETURN(1);
+ }
+ if (select_lex->cond_pushed_into_having)
+ {
+ having= and_conds(thd, having, select_lex->cond_pushed_into_having);
+ if (having)
+ {
+ select_lex->having_fix_field= 1;
+ if (having->fix_fields(thd, &having))
+ DBUG_RETURN(1);
+ select_lex->having_fix_field= 0;
+ }
+ }
+
conds= optimize_cond(this, conds, join_list, FALSE,
&cond_value, &cond_equal, OPT_LINK_EQUAL_FIELDS);
+
+ if (thd->lex->sql_command == SQLCOM_SELECT &&
+ optimizer_flag(thd, OPTIMIZER_SWITCH_COND_PUSHDOWN_FOR_DERIVED))
+ {
+ TABLE_LIST *tbl;
+ List_iterator_fast<TABLE_LIST> li(select_lex->leaf_tables);
+ while ((tbl= li++))
+ {
+ if (tbl->is_materialized_derived())
+ {
+ if (pushdown_cond_for_derived(thd, conds, tbl))
+ DBUG_RETURN(1);
+ if (mysql_handle_single_derived(thd->lex, tbl, DT_OPTIMIZE))
+ DBUG_RETURN(1);
+ }
+ }
+ }
+ else
+ {
+ /* Run optimize phase for all derived tables/views used in this SELECT. */
+ if (select_lex->handle_derived(thd->lex, DT_OPTIMIZE))
+ DBUG_RETURN(1);
+ }
if (thd->is_error())
{
@@ -3166,6 +3195,7 @@ void JOIN::exec_inner()
{
List<Item> *columns_list= &fields_list;
DBUG_ENTER("JOIN::exec_inner");
+ DBUG_ASSERT(optimization_state == JOIN::OPTIMIZATION_DONE);
THD_STAGE_INFO(thd, stage_executing);
@@ -3668,6 +3698,7 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list,
s->checked_keys.init();
s->needed_reg.init();
table_vector[i]=s->table=table=tables->table;
+ s->tab_list= tables;
table->pos_in_table_list= tables;
error= tables->fetch_number_of_rows();
set_statistics_for_table(join->thd, table);
@@ -8357,6 +8388,8 @@ JOIN_TAB *first_explain_order_tab(JOIN* join)
{
JOIN_TAB* tab;
tab= join->join_tab;
+ if (!tab)
+ return NULL; /* Can happen when when the tables were optimized away */
return (tab->bush_children) ? tab->bush_children->start : tab;
}
@@ -11419,6 +11452,11 @@ bool error_if_full_join(JOIN *join)
void JOIN_TAB::cleanup()
{
DBUG_ENTER("JOIN_TAB::cleanup");
+
+ if (tab_list && tab_list->is_with_table_recursive_reference() &&
+ tab_list->with->is_cleaned())
+ DBUG_VOID_RETURN;
+
DBUG_PRINT("enter", ("tab: %p table %s.%s",
this,
(table ? table->s->db.str : "?"),
@@ -11588,7 +11626,8 @@ bool JOIN_TAB::preread_init()
}
/* Materialize derived table/view. */
- if (!derived->get_unit()->executed &&
+ if ((!derived->get_unit()->executed ||
+ derived->is_recursive_with_table()) &&
mysql_handle_single_derived(join->thd->lex,
derived, DT_CREATE | DT_FILL))
return TRUE;
@@ -15745,7 +15784,7 @@ Field *Item::create_tmp_field(bool group, TABLE *table, uint convert_int_length)
Field_double(max_length, maybe_null, name, decimals, TRUE);
break;
case INT_RESULT:
- /*
+ /*
Select an integer type with the minimal fit precision.
convert_int_length is sign inclusive, don't consider the sign.
*/
@@ -15761,7 +15800,6 @@ Field *Item::create_tmp_field(bool group, TABLE *table, uint convert_int_length)
break;
case STRING_RESULT:
DBUG_ASSERT(collation.collation);
-
/*
GEOMETRY fields have STRING_RESULT result type.
To preserve type they needed to be handled separately.
@@ -17943,7 +17981,6 @@ int rr_sequential_and_unpack(READ_RECORD *info)
TRUE - Error
*/
-static
bool instantiate_tmp_table(TABLE *table, KEY *keyinfo,
MARIA_COLUMNDEF *start_recinfo,
MARIA_COLUMNDEF **recinfo,
@@ -19218,7 +19255,7 @@ int join_init_read_record(JOIN_TAB *tab)
report_error(tab->table, error);
return 1;
}
- if (!tab->preread_init_done && tab->preread_init())
+ if (!tab->preread_init_done && tab->preread_init())
return 1;
if (init_read_record(&tab->read_record, tab->join->thd, tab->table,
tab->select, tab->filesort_result, 1,1, FALSE))
@@ -19451,8 +19488,6 @@ end_send(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
if (!end_of_records)
{
-#if 0
-#endif
if (join->table_count &&
join->join_tab->is_using_loose_index_scan())
{
@@ -24321,7 +24356,8 @@ void JOIN_TAB::save_explain_data(Explain_table_access *eta,
In case this is a derived table, here we remember the number of
subselect that used to produce it.
*/
- eta->derived_select_number= table->derived_select_number;
+ if (!(table_list && table_list->is_with_table_recursive_reference()))
+ eta->derived_select_number= table->derived_select_number;
/* The same for non-merged semi-joins */
eta->non_merged_sjm_number = get_non_merged_semijoin_select();
@@ -24537,11 +24573,14 @@ int JOIN::save_explain_data_intern(Explain_query *output,
(1) they are not parts of ON clauses that were eliminated by table
elimination.
(2) they are not merged derived tables
+ (3) they are not unreferenced CTE
*/
if (!(tmp_unit->item && tmp_unit->item->eliminated) && // (1)
(!tmp_unit->derived ||
- tmp_unit->derived->is_materialized_derived())) // (2)
- {
+ tmp_unit->derived->is_materialized_derived()) && // (2)
+ !(tmp_unit->with_element &&
+ !tmp_unit->with_element->is_referenced())) // (3)
+ {
explain->add_child(tmp_unit->first_select()->select_number);
}
}
@@ -24601,9 +24640,11 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order,
Save plans for child subqueries, when
(1) they are not parts of eliminated WHERE/ON clauses.
(2) they are not VIEWs that were "merged for INSERT".
+ (3) they are not unreferenced CTE.
*/
- if (!(unit->item && unit->item->eliminated) && // (1)
- !(unit->derived && unit->derived->merged_for_insert)) // (2)
+ if (!(unit->item && unit->item->eliminated) && // (1)
+ !(unit->derived && unit->derived->merged_for_insert) && // (2)
+ !(unit->with_element && !unit->with_element->is_referenced())) // (3)
{
if (mysql_explain_union(thd, unit, result))
DBUG_VOID_RETURN;
@@ -24627,7 +24668,7 @@ bool mysql_explain_union(THD *thd, SELECT_LEX_UNIT *unit, select_result *result)
if (unit->is_union())
{
- if (unit->union_needs_tmp_table())
+ if (unit->union_needs_tmp_table() && unit->fake_select_lex)
{
unit->fake_select_lex->select_number= FAKE_SELECT_LEX_ID; // just for initialization
unit->fake_select_lex->type= "UNION RESULT";
@@ -25147,6 +25188,12 @@ void st_select_lex::print(THD *thd, String *str, enum_query_type query_type)
// limit
print_limit(thd, str, query_type);
+ // lock type
+ if (lock_type == TL_READ_WITH_SHARED_LOCKS)
+ str->append(" lock in share mode");
+ else if (lock_type == TL_WRITE)
+ str->append(" for update");
+
// PROCEDURE unsupported here
}
@@ -26193,5 +26240,60 @@ AGGR_OP::end_send()
/**
+ @brief
+ Remove marked top conjuncts of a condition
+
+ @param thd The thread handle
+ @param cond The condition which subformulas are to be removed
+
+ @details
+ The function removes all top conjuncts marked with the flag
+ FULL_EXTRACTION_FL from the condition 'cond'. The resulting
+ formula is returned a the result of the function
+ If 'cond' s marked with such flag the function returns 0.
+ The function clear the extraction flags for the removed
+ formulas
+
+ @retval
+ condition without removed subformulas
+ 0 if the whole 'cond' is removed
+*/
+
+Item *remove_pushed_top_conjuncts(THD *thd, Item *cond)
+{
+ if (cond->get_extraction_flag() == FULL_EXTRACTION_FL)
+ {
+ cond->clear_extraction_flag();
+ return 0;
+ }
+ if (cond->type() == Item::COND_ITEM)
+ {
+ if (((Item_cond*) cond)->functype() == Item_func::COND_AND_FUNC)
+ {
+ List_iterator<Item> li(*((Item_cond*) cond)->argument_list());
+ Item *item;
+ while ((item= li++))
+ {
+ if (item->get_extraction_flag() == FULL_EXTRACTION_FL)
+ {
+ item->clear_extraction_flag();
+ li.remove();
+ }
+ }
+ switch (((Item_cond*) cond)->argument_list()->elements)
+ {
+ case 0:
+ return 0;
+ case 1:
+ return ((Item_cond*) cond)->argument_list()->head();
+ default:
+ return cond;
+ }
+ }
+ }
+ return cond;
+}
+
+/**
@} (end of group Query_Optimizer)
*/
diff --git a/sql/sql_select.h b/sql/sql_select.h
index 92ba74fac35..fb3f71c0769 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -188,7 +188,7 @@ typedef enum_nested_loop_state
Next_select_func setup_end_select_func(JOIN *join, JOIN_TAB *tab);
int rr_sequential(READ_RECORD *info);
int rr_sequential_and_unpack(READ_RECORD *info);
-
+Item *remove_pushed_top_conjuncts(THD *thd, Item *cond);
#include "sql_explain.h"
@@ -205,6 +205,7 @@ class Filesort;
typedef struct st_join_table {
st_join_table() {}
TABLE *table;
+ TABLE_LIST *tab_list;
KEYUSE *keyuse; /**< pointer to first used key */
KEY *hj_key; /**< descriptor of the used best hash join key
not supported by any index */
@@ -1369,7 +1370,8 @@ public:
enum join_optimization_state { NOT_OPTIMIZED=0,
OPTIMIZATION_IN_PROGRESS=1,
OPTIMIZATION_DONE=2};
- bool optimized; ///< flag to avoid double optimization in EXPLAIN
+ // state of JOIN optimization
+ enum join_optimization_state optimization_state;
bool initialized; ///< flag to avoid double init_execution calls
Explain_select *explain;
@@ -1449,7 +1451,7 @@ public:
items2.reset();
items3.reset();
zero_result_cause= 0;
- optimized= 0;
+ optimization_state= JOIN::NOT_OPTIMIZED;
have_query_plan= QEP_NOT_PRESENT_YET;
initialized= 0;
cleaned= 0;
@@ -2232,6 +2234,10 @@ bool create_internal_tmp_table(TABLE *table, KEY *keyinfo,
TMP_ENGINE_COLUMNDEF *start_recinfo,
TMP_ENGINE_COLUMNDEF **recinfo,
ulonglong options);
+bool instantiate_tmp_table(TABLE *table, KEY *keyinfo,
+ MARIA_COLUMNDEF *start_recinfo,
+ MARIA_COLUMNDEF **recinfo,
+ 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);
@@ -2271,4 +2277,8 @@ public:
bool test_if_order_compatible(SQL_I_List<ORDER> &a, SQL_I_List<ORDER> &b);
int test_if_group_changed(List<Cached_item> &list);
int create_sort_index(THD *thd, JOIN *join, JOIN_TAB *tab, Filesort *fsort);
+
+JOIN_TAB *first_explain_order_tab(JOIN* join);
+JOIN_TAB *next_explain_order_tab(JOIN* join, JOIN_TAB* tab);
+
#endif /* SQL_SELECT_INCLUDED */
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 49287728a90..c4ca23cba78 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -1634,20 +1634,11 @@ static bool get_field_default_value(THD *thd, Field *field, String *def_value,
bool quoted)
{
bool has_default;
- bool has_now_default;
enum enum_field_types field_type= field->type();
- /*
- We are using CURRENT_TIMESTAMP instead of NOW because it is
- more standard
- */
- has_now_default= field->has_insert_default_function();
-
has_default= (field->default_value ||
(!(field->flags & NO_DEFAULT_VALUE_FLAG) &&
- field->unireg_check != Field::NEXT_NUMBER &&
- !((thd->variables.sql_mode & (MODE_MYSQL323 | MODE_MYSQL40))
- && has_now_default)));
+ field->unireg_check != Field::NEXT_NUMBER));
def_value->length(0);
if (has_default)
@@ -1662,17 +1653,14 @@ static bool get_field_default_value(THD *thd, Field *field, String *def_value,
field->default_value->expr_str.length);
def_value->append(')');
}
+ else if (field->unireg_check)
+ def_value->append(field->default_value->expr_str.str,
+ field->default_value->expr_str.length);
else
def_value->set(field->default_value->expr_str.str,
field->default_value->expr_str.length,
&my_charset_utf8mb4_general_ci);
}
- else if (has_now_default)
- {
- def_value->append(STRING_WITH_LEN("CURRENT_TIMESTAMP"));
- if (field->decimals() > 0)
- def_value->append_parenthesized(field->decimals());
- }
else if (!field->is_null())
{ // Not null by default
char tmp[MAX_FIELD_WIDTH];
@@ -1689,7 +1677,11 @@ static bool get_field_default_value(THD *thd, Field *field, String *def_value,
quoted= 0;
}
else
+ {
field->val_str(&type);
+ if (!field->str_needs_quotes())
+ quoted= 0;
+ }
if (type.length())
{
String def_val;
@@ -1700,13 +1692,13 @@ static bool get_field_default_value(THD *thd, Field *field, String *def_value,
if (quoted)
append_unescaped(def_value, def_val.ptr(), def_val.length());
else
- def_value->append(def_val.ptr(), def_val.length());
+ def_value->move(def_val);
}
else if (quoted)
- def_value->append(STRING_WITH_LEN("''"));
+ def_value->set(STRING_WITH_LEN("''"), system_charset_info);
}
else if (field->maybe_null() && quoted)
- def_value->append(STRING_WITH_LEN("NULL")); // Null as default
+ def_value->set(STRING_WITH_LEN("NULL"), system_charset_info); // Null as default
else
return 0;
@@ -1793,8 +1785,8 @@ int show_create_table(THD *thd, TABLE_LIST *table_list, String *packet,
List<Item> field_list;
char tmp[MAX_FIELD_WIDTH], *for_str, buff[128], def_value_buf[MAX_FIELD_WIDTH];
const char *alias;
- String type(tmp, sizeof(tmp), system_charset_info);
- String def_value(def_value_buf, sizeof(def_value_buf), system_charset_info);
+ String type;
+ String def_value;
Field **ptr,*field;
uint primary_key;
KEY *key_info;
@@ -1887,12 +1879,8 @@ int show_create_table(THD *thd, TABLE_LIST *table_list, String *packet,
packet->append(STRING_WITH_LEN(" "));
append_identifier(thd,packet,field->field_name, strlen(field->field_name));
packet->append(' ');
- // check for surprises from the previous call to Field::sql_type()
- if (type.ptr() != tmp)
- type.set(tmp, sizeof(tmp), system_charset_info);
- else
- type.set_charset(system_charset_info);
+ type.set(tmp, sizeof(tmp), system_charset_info);
field->sql_type(type);
packet->append(type.ptr(), type.length(), system_charset_info);
@@ -1939,6 +1927,7 @@ int show_create_table(THD *thd, TABLE_LIST *table_list, String *packet,
packet->append(STRING_WITH_LEN(" NULL"));
}
+ def_value.set(def_value_buf, sizeof(def_value_buf), system_charset_info);
if (get_field_default_value(thd, field, &def_value, 1))
{
packet->append(STRING_WITH_LEN(" DEFAULT "));
@@ -3223,6 +3212,132 @@ void remove_status_vars(SHOW_VAR *list)
}
+/**
+ @brief Returns the value of a system or a status variable.
+
+ @param thd [in] The handle of the current THD.
+ @param variable [in] Details of the variable.
+ @param value_type [in] Variable type.
+ @param show_type [in] Variable show type.
+ @param charset [out] Character set of the value.
+ @param buff [in,out] Buffer to store the value.
+ (Needs to have enough memory
+ to hold the value of variable.)
+ @param length [out] Length of the value.
+
+ @return Pointer to the value buffer.
+*/
+
+const char* get_one_variable(THD *thd,
+ const SHOW_VAR *variable,
+ enum_var_type value_type, SHOW_TYPE show_type,
+ system_status_var *status_var,
+ const CHARSET_INFO **charset, char *buff,
+ size_t *length)
+{
+ void *value= variable->value;
+ const char *pos= buff;
+ const char *end= buff;
+
+
+ if (show_type == SHOW_SYS)
+ {
+ sys_var *var= (sys_var *) value;
+ show_type= var->show_type();
+ value= var->value_ptr(thd, value_type, &null_lex_str);
+ *charset= var->charset(thd);
+ }
+
+ /*
+ note that value may be == buff. All SHOW_xxx code below
+ should still work in this case
+ */
+ switch (show_type) {
+ case SHOW_DOUBLE_STATUS:
+ value= ((char *) status_var + (intptr) value);
+ /* fall through */
+ case SHOW_DOUBLE:
+ /* 6 is the default precision for '%f' in sprintf() */
+ end= buff + my_fcvt(*(double *) value, 6, buff, NULL);
+ break;
+ case SHOW_LONG_STATUS:
+ value= ((char *) status_var + (intptr) value);
+ /* fall through */
+ case SHOW_ULONG:
+ case SHOW_LONG_NOFLUSH: // the difference lies in refresh_status()
+ end= int10_to_str(*(long*) value, buff, 10);
+ break;
+ case SHOW_LONGLONG_STATUS:
+ value= ((char *) status_var + (intptr) value);
+ /* fall through */
+ case SHOW_ULONGLONG:
+ end= longlong10_to_str(*(longlong*) value, buff, 10);
+ break;
+ case SHOW_HA_ROWS:
+ end= longlong10_to_str((longlong) *(ha_rows*) value, buff, 10);
+ break;
+ case SHOW_BOOL:
+ end= strmov(buff, *(bool*) value ? "ON" : "OFF");
+ break;
+ case SHOW_MY_BOOL:
+ end= strmov(buff, *(my_bool*) value ? "ON" : "OFF");
+ break;
+ case SHOW_UINT:
+ end= int10_to_str((long) *(uint*) value, buff, 10);
+ break;
+ case SHOW_SINT:
+ end= int10_to_str((long) *(int*) value, buff, -10);
+ break;
+ case SHOW_SLONG:
+ end= int10_to_str(*(long*) value, buff, -10);
+ break;
+ case SHOW_SLONGLONG:
+ end= longlong10_to_str(*(longlong*) value, buff, -10);
+ break;
+ case SHOW_HAVE:
+ {
+ SHOW_COMP_OPTION tmp= *(SHOW_COMP_OPTION*) value;
+ pos= show_comp_option_name[(int) tmp];
+ end= strend(pos);
+ break;
+ }
+ case SHOW_CHAR:
+ {
+ if (!(pos= (char*)value))
+ pos= "";
+ end= strend(pos);
+ break;
+ }
+ case SHOW_CHAR_PTR:
+ {
+ if (!(pos= *(char**) value))
+ pos= "";
+
+ end= strend(pos);
+ break;
+ }
+ case SHOW_LEX_STRING:
+ {
+ LEX_STRING *ls=(LEX_STRING*)value;
+ if (!(pos= ls->str))
+ end= pos= "";
+ else
+ end= pos + ls->length;
+ break;
+ }
+ case SHOW_UNDEF:
+ break; // Return empty string
+ case SHOW_SYS: // Cannot happen
+ default:
+ DBUG_ASSERT(0);
+ break;
+ }
+
+ *length= (size_t) (end - pos);
+ return pos;
+}
+
+
static bool show_status_array(THD *thd, const char *wild,
SHOW_VAR *variables,
enum enum_var_type scope,
@@ -3335,109 +3450,21 @@ static bool show_status_array(THD *thd, const char *wild,
name_buffer, wild))) &&
(!cond || cond->val_int()))
{
- void *value=var->value;
- const char *pos, *end; // We assign a lot of const's
+ const char *pos; // We assign a lot of const's
+ size_t length;
if (show_type == SHOW_SYS)
- {
- sys_var *var= (sys_var *) value;
- show_type= var->show_type();
mysql_mutex_lock(&LOCK_global_system_variables);
- value= var->value_ptr(thd, scope, &null_lex_str);
- charset= var->charset(thd);
- }
-
- pos= end= buff;
- /*
- note that value may be == buff. All SHOW_xxx code below
- should still work in this case
- */
- switch (show_type) {
- case SHOW_DOUBLE_STATUS:
- value= ((char *) status_var + (intptr) value);
- /* fall through */
- case SHOW_DOUBLE:
- /* 6 is the default precision for '%f' in sprintf() */
- end= buff + my_fcvt(*(double *) value, 6, buff, NULL);
- break;
- case SHOW_LONG_STATUS:
- value= ((char *) status_var + (intptr) value);
- /* fall through */
- case SHOW_ULONG:
- case SHOW_LONG_NOFLUSH: // the difference lies in refresh_status()
- end= int10_to_str(*(long*) value, buff, 10);
- break;
- case SHOW_LONGLONG_STATUS:
- value= ((char *) status_var + (intptr) value);
- /* fall through */
- case SHOW_ULONGLONG:
- end= longlong10_to_str(*(longlong*) value, buff, 10);
- break;
- case SHOW_HA_ROWS:
- end= longlong10_to_str((longlong) *(ha_rows*) value, buff, 10);
- break;
- case SHOW_BOOL:
- end= strmov(buff, *(bool*) value ? "ON" : "OFF");
- break;
- case SHOW_MY_BOOL:
- end= strmov(buff, *(my_bool*) value ? "ON" : "OFF");
- break;
- case SHOW_UINT:
- end= int10_to_str((long) *(uint*) value, buff, 10);
- break;
- case SHOW_SINT:
- end= int10_to_str((long) *(int*) value, buff, -10);
- break;
- case SHOW_SLONG:
- end= int10_to_str(*(long*) value, buff, -10);
- break;
- case SHOW_SLONGLONG:
- end= longlong10_to_str(*(longlong*) value, buff, -10);
- break;
- case SHOW_HAVE:
- {
- SHOW_COMP_OPTION tmp= *(SHOW_COMP_OPTION*) value;
- pos= show_comp_option_name[(int) tmp];
- end= strend(pos);
- break;
- }
- case SHOW_CHAR:
- {
- if (!(pos= (char*)value))
- pos= "";
- end= strend(pos);
- break;
- }
- case SHOW_CHAR_PTR:
- {
- if (!(pos= *(char**) value))
- pos= "";
+ pos= get_one_variable(thd, var, scope, show_type, status_var,
+ &charset, buff, &length);
- end= strend(pos);
- break;
- }
- case SHOW_LEX_STRING:
- {
- LEX_STRING *ls=(LEX_STRING*)value;
- if (!(pos= ls->str))
- end= pos= "";
- else
- end= pos + ls->length;
- break;
- }
- case SHOW_UNDEF:
- break; // Return empty string
- case SHOW_SYS: // Cannot happen
- default:
- DBUG_ASSERT(0);
- break;
- }
- table->field[1]->store(pos, (uint32) (end - pos), charset);
+ table->field[1]->store(pos, (uint32) length, charset);
+ thd->count_cuted_fields= CHECK_FIELD_IGNORE;
table->field[1]->set_notnull();
-
- if (var->type == SHOW_SYS)
+ if (show_type == SHOW_SYS)
mysql_mutex_unlock(&LOCK_global_system_variables);
+
if (schema_table_store_record(thd, table))
{
res= TRUE;
@@ -7234,6 +7261,17 @@ int fill_variables(THD *thd, TABLE_LIST *tables, COND *cond)
COND *partial_cond= make_cond_for_info_schema(thd, cond, tables);
mysql_rwlock_rdlock(&LOCK_system_variables_hash);
+
+ /*
+ Avoid recursive LOCK_system_variables_hash acquisition in
+ intern_sys_var_ptr() by pre-syncing dynamic session variables.
+ */
+ if (scope == OPT_SESSION &&
+ (!thd->variables.dynamic_variables_ptr ||
+ global_system_variables.dynamic_variables_head >
+ thd->variables.dynamic_variables_head))
+ sync_dynamic_session_variables(thd, true);
+
res= show_status_array(thd, wild, enumerate_sys_vars(thd, sorted_vars, scope),
scope, NULL, "", tables->table,
upper_case_names, partial_cond);
diff --git a/sql/sql_show.h b/sql/sql_show.h
index dbae2a42b39..e93b855450c 100644
--- a/sql/sql_show.h
+++ b/sql/sql_show.h
@@ -131,6 +131,12 @@ bool get_schema_tables_result(JOIN *join,
enum enum_schema_tables get_schema_table_idx(ST_SCHEMA_TABLE *schema_table);
TABLE *create_schema_table(THD *thd, TABLE_LIST *table_list);
+const char* get_one_variable(THD *thd, const SHOW_VAR *variable,
+ enum_var_type value_type, SHOW_TYPE show_type,
+ system_status_var *status_var,
+ const CHARSET_INFO **charset, char *buff,
+ size_t *length);
+
/* These functions were under INNODB_COMPATIBILITY_HOOKS */
int get_quote_char_for_identifier(THD *thd, const char *name, uint length);
THD *find_thread_by_id(longlong id, bool query_id= false);
diff --git a/sql/sql_string.cc b/sql/sql_string.cc
index 767154e019d..a5f266b2d2c 100644
--- a/sql/sql_string.cc
+++ b/sql/sql_string.cc
@@ -1,4 +1,5 @@
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
+ Copyright (c) 2016, 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
@@ -1157,3 +1158,18 @@ uint convert_to_printable(char *to, size_t to_len,
*t= '\0';
return t - to;
}
+
+void String::q_net_store_length(ulonglong length)
+{
+ DBUG_ASSERT(Alloced_length >= (str_length + net_length_size(length)));
+ char *pos= (char *) net_store_length((uchar *)(Ptr + str_length), length);
+ str_length= pos - Ptr;
+}
+
+void String::q_net_store_data(const uchar *from, size_t length)
+{
+ DBUG_ASSERT(Alloced_length >= (str_length + length +
+ net_length_size(length)));
+ q_net_store_length(length);
+ q_append((const char *)from, length);
+}
diff --git a/sql/sql_string.h b/sql/sql_string.h
index 51a11c7a4ff..f53015fbd6b 100644
--- a/sql/sql_string.h
+++ b/sql/sql_string.h
@@ -359,7 +359,9 @@ public:
if (ALIGN_SIZE(arg_length+1) < Alloced_length)
{
char *new_ptr;
- if (!(new_ptr=(char*) my_realloc(Ptr,arg_length,MYF(0))))
+ if (!(new_ptr=(char*)
+ my_realloc(Ptr, arg_length,MYF((thread_specific ?
+ MY_THREAD_SPECIFIC : 0)))))
{
Alloced_length = 0;
real_alloc(arg_length);
@@ -495,6 +497,11 @@ public:
{
Ptr[str_length++] = c;
}
+ void q_append2b(const uint32 n)
+ {
+ int2store(Ptr + str_length, n);
+ str_length += 2;
+ }
void q_append(const uint32 n)
{
int4store(Ptr + str_length, n);
@@ -559,6 +566,7 @@ public:
return Ptr+ old_length; /* Area to use */
}
+
inline bool append(const char *s, uint32 arg_length, uint32 step_alloc)
{
uint32 new_length= arg_length + str_length;
@@ -623,6 +631,8 @@ public:
{
return !sortcmp(this, other, cs);
}
+ void q_net_store_length(ulonglong length);
+ void q_net_store_data(const uchar *from, size_t length);
};
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 34b30f29a96..0cee0dc6ad2 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -55,6 +55,7 @@
#include "transaction.h"
#include "sql_audit.h"
+
#ifdef __WIN__
#include <io.h>
#endif
@@ -2686,14 +2687,15 @@ bool log_drop_table(THD *thd, const char *db_name, size_t db_name_length,
*/
bool quick_rm_table(THD *thd, handlerton *base, const char *db,
- const char *table_name, uint flags)
+ const char *table_name, uint flags, const char *table_path)
{
char path[FN_REFLEN + 1];
bool error= 0;
DBUG_ENTER("quick_rm_table");
- uint path_length= build_table_filename(path, sizeof(path) - 1,
- db, table_name, reg_ext, flags);
+ uint path_length= table_path ?
+ (strxnmov(path, sizeof(path) - 1, table_path, reg_ext, NullS) - path) :
+ build_table_filename(path, sizeof(path)-1, db, table_name, reg_ext, flags);
if (mysql_file_delete(key_file_frm, path, MYF(0)))
error= 1; /* purecov: inspected */
path[path_length - reg_ext_length]= '\0'; // Remove reg_ext
@@ -3255,35 +3257,6 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
!(sql_field->charset= find_bin_collation(sql_field->charset)))
DBUG_RETURN(TRUE);
- /*
- Convert the default value from client character
- set into the column character set if necessary.
- We can only do this for constants as we have not yet run fix_fields.
- */
- if (sql_field->default_value &&
- sql_field->default_value->expr_item->basic_const_item() &&
- save_cs != sql_field->default_value->expr_item->collation.collation &&
- (sql_field->sql_type == MYSQL_TYPE_VAR_STRING ||
- sql_field->sql_type == MYSQL_TYPE_STRING ||
- sql_field->sql_type == MYSQL_TYPE_SET ||
- sql_field->sql_type == MYSQL_TYPE_TINY_BLOB ||
- sql_field->sql_type == MYSQL_TYPE_MEDIUM_BLOB ||
- sql_field->sql_type == MYSQL_TYPE_LONG_BLOB ||
- sql_field->sql_type == MYSQL_TYPE_BLOB ||
- sql_field->sql_type == MYSQL_TYPE_ENUM))
- {
- Item *item;
- if (!(item= sql_field->default_value->expr_item->
- safe_charset_converter(thd, save_cs)))
- {
- /* Could not convert */
- my_error(ER_INVALID_DEFAULT, MYF(0), sql_field->field_name);
- DBUG_RETURN(TRUE);
- }
- /* Fix for prepare statement */
- thd->change_item_tree(&sql_field->default_value->expr_item, item);
- }
-
if (sql_field->sql_type == MYSQL_TYPE_SET ||
sql_field->sql_type == MYSQL_TYPE_ENUM)
{
@@ -3349,37 +3322,6 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
if (sql_field->sql_type == MYSQL_TYPE_SET)
{
uint32 field_length;
- if (sql_field->default_value &&
- sql_field->default_value->expr_item->basic_const_item())
- {
- char *not_used;
- uint not_used2;
- bool not_found= 0;
- String str, *def= sql_field->default_value->expr_item->val_str(&str);
- if (def == NULL) /* SQL "NULL" maps to NULL */
- {
- if ((sql_field->flags & NOT_NULL_FLAG) != 0)
- {
- my_error(ER_INVALID_DEFAULT, MYF(0), sql_field->field_name);
- DBUG_RETURN(TRUE);
- }
-
- /* else, NULL is an allowed value */
- (void) find_set(interval, NULL, 0,
- cs, &not_used, &not_used2, &not_found);
- }
- else /* not NULL */
- {
- (void) find_set(interval, def->ptr(), def->length(),
- cs, &not_used, &not_used2, &not_found);
- }
-
- if (not_found)
- {
- my_error(ER_INVALID_DEFAULT, MYF(0), sql_field->field_name);
- DBUG_RETURN(TRUE);
- }
- }
calculate_interval_lengths(cs, interval, &dummy, &field_length);
sql_field->length= field_length + (interval->count - 1);
}
@@ -3387,30 +3329,6 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
{
uint32 field_length;
DBUG_ASSERT(sql_field->sql_type == MYSQL_TYPE_ENUM);
- if (sql_field->default_value &&
- sql_field->default_value->expr_item->basic_const_item())
- {
- String str, *def= sql_field->default_value->expr_item->val_str(&str);
- if (def == NULL) /* SQL "NULL" maps to NULL */
- {
- if ((sql_field->flags & NOT_NULL_FLAG) != 0)
- {
- my_error(ER_INVALID_DEFAULT, MYF(0), sql_field->field_name);
- DBUG_RETURN(TRUE);
- }
-
- /* else, the defaults yield the correct length for NULLs. */
- }
- else /* not NULL */
- {
- def->length(cs->cset->lengthsp(cs, def->ptr(), def->length()));
- if (find_type2(interval, def->ptr(), def->length(), cs) == 0) /* not found */
- {
- my_error(ER_INVALID_DEFAULT, MYF(0), sql_field->field_name);
- DBUG_RETURN(TRUE);
- }
- }
- }
calculate_interval_lengths(cs, interval, &field_length, &dummy);
sql_field->length= field_length;
}
@@ -3430,6 +3348,112 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
if (prepare_blob_field(thd, sql_field))
DBUG_RETURN(TRUE);
+ if (sql_field->default_value)
+ {
+ Virtual_column_info *def= sql_field->default_value;
+
+ if (!sql_field->has_default_expression())
+ def->expr_str= null_lex_str;
+
+ if (!def->expr_item->basic_const_item() && !def->flags)
+ {
+ Item *expr= def->expr_item;
+ int err= !expr->fixed && // may be already fixed if ALTER TABLE
+ expr->fix_fields(thd, &expr);
+ if (!err)
+ {
+ if (expr->result_type() == REAL_RESULT)
+ { // don't convert floats to string and back, it can be lossy
+ double res= expr->val_real();
+ if (expr->null_value)
+ expr= new (thd->mem_root) Item_null(thd);
+ else
+ expr= new (thd->mem_root) Item_float(thd, res, expr->decimals);
+ }
+ else
+ {
+ StringBuffer<MAX_FIELD_WIDTH> buf;
+ String *res= expr->val_str(&buf);
+ if (expr->null_value)
+ expr= new (thd->mem_root) Item_null(thd);
+ else
+ {
+ char *str= (char*) thd->strmake(res->ptr(), res->length());
+ expr= new (thd->mem_root) Item_string(thd, str, res->length(), res->charset());
+ }
+ }
+ thd->change_item_tree(&def->expr_item, expr);
+ }
+ }
+ }
+
+ /*
+ Convert the default value from client character
+ set into the column character set if necessary.
+ We can only do this for constants as we have not yet run fix_fields.
+ */
+ if (sql_field->default_value &&
+ sql_field->default_value->expr_item->basic_const_item() &&
+ save_cs != sql_field->default_value->expr_item->collation.collation &&
+ (sql_field->sql_type == MYSQL_TYPE_VAR_STRING ||
+ sql_field->sql_type == MYSQL_TYPE_STRING ||
+ sql_field->sql_type == MYSQL_TYPE_SET ||
+ sql_field->sql_type == MYSQL_TYPE_TINY_BLOB ||
+ sql_field->sql_type == MYSQL_TYPE_MEDIUM_BLOB ||
+ sql_field->sql_type == MYSQL_TYPE_LONG_BLOB ||
+ sql_field->sql_type == MYSQL_TYPE_BLOB ||
+ sql_field->sql_type == MYSQL_TYPE_ENUM))
+ {
+ Item *item;
+ if (!(item= sql_field->default_value->expr_item->
+ safe_charset_converter(thd, save_cs)))
+ {
+ /* Could not convert */
+ my_error(ER_INVALID_DEFAULT, MYF(0), sql_field->field_name);
+ DBUG_RETURN(TRUE);
+ }
+ /* Fix for prepare statement */
+ thd->change_item_tree(&sql_field->default_value->expr_item, item);
+ }
+
+ if (sql_field->default_value &&
+ sql_field->default_value->expr_item->basic_const_item() &&
+ (sql_field->sql_type == MYSQL_TYPE_SET ||
+ sql_field->sql_type == MYSQL_TYPE_ENUM))
+ {
+ StringBuffer<MAX_FIELD_WIDTH> str;
+ String *def= sql_field->default_value->expr_item->val_str(&str);
+ bool not_found;
+ if (def == NULL) /* SQL "NULL" maps to NULL */
+ {
+ not_found= sql_field->flags & NOT_NULL_FLAG;
+ }
+ else
+ {
+ not_found= false;
+ if (sql_field->sql_type == MYSQL_TYPE_SET)
+ {
+ char *not_used;
+ uint not_used2;
+ find_set(sql_field->interval, def->ptr(), def->length(),
+ sql_field->charset, &not_used, &not_used2, &not_found);
+ }
+ else /* MYSQL_TYPE_ENUM */
+ {
+ def->length(sql_field->charset->cset->lengthsp(sql_field->charset,
+ def->ptr(), def->length()));
+ not_found= !find_type2(sql_field->interval, def->ptr(),
+ def->length(), sql_field->charset);
+ }
+ }
+
+ if (not_found)
+ {
+ my_error(ER_INVALID_DEFAULT, MYF(0), sql_field->field_name);
+ DBUG_RETURN(TRUE);
+ }
+ }
+
if (!(sql_field->flags & NOT_NULL_FLAG))
null_fields++;
@@ -4178,6 +4202,22 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
make_unique_constraint_name(thd, &check->name,
&alter_info->check_constraint_list,
&nr);
+ {
+ /* Check that there's no repeating constraint names. */
+ List_iterator_fast<Virtual_column_info>
+ dup_it(alter_info->check_constraint_list);
+ Virtual_column_info *dup_check;
+ while ((dup_check= dup_it++) && dup_check != check)
+ {
+ if (check->name.length == dup_check->name.length &&
+ my_strcasecmp(system_charset_info,
+ check->name.str, dup_check->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))
@@ -6130,6 +6170,39 @@ remove_key:
}
#endif /*WITH_PARTITION_STORAGE_ENGINE*/
+ /* ADD CONSTRAINT IF NOT EXISTS. */
+ {
+ List_iterator<Virtual_column_info> it(alter_info->check_constraint_list);
+ Virtual_column_info *check;
+ TABLE_SHARE *share= table->s;
+ uint c;
+ while ((check=it++))
+ {
+ if (!(check->flags & Alter_info::CHECK_CONSTRAINT_IF_NOT_EXISTS) &&
+ check->name.length)
+ continue;
+ check->flags= 0;
+ for (c= share->field_check_constraints;
+ c < share->table_check_constraints ; c++)
+ {
+ Virtual_column_info *dup= table->check_constraints[c];
+ if (dup->name.length == check->name.length &&
+ my_strcasecmp(system_charset_info,
+ check->name.str, dup->name.str) == 0)
+ {
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
+ ER_DUP_CONSTRAINT_NAME, ER_THD(thd, ER_DUP_CONSTRAINT_NAME),
+ "CHECK", check->name.str);
+ it.remove();
+ if (alter_info->check_constraint_list.elements == 0)
+ alter_info->flags&= ~Alter_info::ALTER_ADD_CHECK_CONSTRAINT;
+
+ break;
+ }
+ }
+ }
+ }
+
DBUG_VOID_RETURN;
}
@@ -8257,6 +8330,72 @@ static bool fk_prepare_copy_alter_table(THD *thd, TABLE *table,
DBUG_RETURN(false);
}
+/**
+ Rename temporary table and/or turn indexes on/off without touching .FRM.
+ Its a variant of simple_rename_or_index_change() to be used exclusively
+ for temporary tables.
+
+ @param thd Thread handler
+ @param table_list TABLE_LIST for the table to change
+ @param keys_onoff ENABLE or DISABLE KEYS?
+ @param alter_ctx ALTER TABLE runtime context.
+
+ @return Operation status
+ @retval false Success
+ @retval true Failure
+*/
+static bool
+simple_tmp_rename_or_index_change(THD *thd, TABLE_LIST *table_list,
+ Alter_info::enum_enable_or_disable keys_onoff,
+ Alter_table_ctx *alter_ctx)
+{
+ DBUG_ENTER("simple_tmp_rename_or_index_change");
+
+ TABLE *table= table_list->table;
+ bool error= false;
+
+ DBUG_ASSERT(table->s->tmp_table);
+
+ if (keys_onoff != Alter_info::LEAVE_AS_IS)
+ {
+ THD_STAGE_INFO(thd, stage_manage_keys);
+ error= alter_table_manage_keys(table, table->file->indexes_are_disabled(),
+ keys_onoff);
+ }
+
+ if (!error && alter_ctx->is_table_renamed())
+ {
+ THD_STAGE_INFO(thd, stage_rename);
+
+ /*
+ If THD::rename_temporary_table() fails, there is no need to rename it
+ back to the original name (unlike the case for non-temporary tables),
+ as it was an allocation error and the table was not renamed.
+ */
+ error= thd->rename_temporary_table(table, alter_ctx->new_db,
+ alter_ctx->new_alias);
+ }
+
+ if (!error)
+ {
+ int res= 0;
+ /*
+ We do not replicate alter table statement on temporary tables under
+ ROW-based replication.
+ */
+ if (!thd->is_current_stmt_binlog_format_row())
+ {
+ res= write_bin_log(thd, true, thd->query(), thd->query_length());
+ }
+ if (res != 0)
+ error= true;
+ else
+ my_ok(thd);
+ }
+
+ DBUG_RETURN(error);
+}
+
/**
Rename table and/or turn indexes on/off without touching .FRM
@@ -8293,6 +8432,7 @@ simple_rename_or_index_change(THD *thd, TABLE_LIST *table_list,
if (lock_tables(thd, table_list, alter_ctx->tables_opened, 0))
DBUG_RETURN(true);
+ THD_STAGE_INFO(thd, stage_manage_keys);
error= alter_table_manage_keys(table,
table->file->indexes_are_disabled(),
keys_onoff);
@@ -8671,29 +8811,48 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
thd->get_stmt_da()->current_statement_warn_count());
my_ok(thd, 0L, 0L, alter_ctx.tmp_name);
- if (write_bin_log(thd, true, thd->query(), thd->query_length()))
- DBUG_RETURN(true);
+ /* We don't replicate alter table statement on temporary tables */
+ if (table->s->tmp_table == NO_TMP_TABLE ||
+ !thd->is_current_stmt_binlog_format_row())
+ {
+ if (write_bin_log(thd, true, thd->query(), thd->query_length()))
+ DBUG_RETURN(true);
+ }
DBUG_RETURN(false);
}
+ /*
+ Test if we are only doing RENAME or KEYS ON/OFF. This works
+ as we are testing if flags == 0 above.
+ */
if (!(alter_info->flags & ~(Alter_info::ALTER_RENAME |
Alter_info::ALTER_KEYS_ONOFF)) &&
alter_info->requested_algorithm !=
- Alter_info::ALTER_TABLE_ALGORITHM_COPY &&
- !table->s->tmp_table) // no need to touch frm
+ Alter_info::ALTER_TABLE_ALGORITHM_COPY) // No need to touch frm.
{
- // This requires X-lock, no other lock levels supported.
- if (alter_info->requested_lock != Alter_info::ALTER_TABLE_LOCK_DEFAULT &&
- alter_info->requested_lock != Alter_info::ALTER_TABLE_LOCK_EXCLUSIVE)
+ bool res;
+
+ if (!table->s->tmp_table)
{
- my_error(ER_ALTER_OPERATION_NOT_SUPPORTED, MYF(0),
- "LOCK=NONE/SHARED", "LOCK=EXCLUSIVE");
- DBUG_RETURN(true);
+ // This requires X-lock, no other lock levels supported.
+ if (alter_info->requested_lock != Alter_info::ALTER_TABLE_LOCK_DEFAULT &&
+ alter_info->requested_lock != Alter_info::ALTER_TABLE_LOCK_EXCLUSIVE)
+ {
+ my_error(ER_ALTER_OPERATION_NOT_SUPPORTED, MYF(0),
+ "LOCK=NONE/SHARED", "LOCK=EXCLUSIVE");
+ DBUG_RETURN(true);
+ }
+ res= simple_rename_or_index_change(thd, table_list,
+ alter_info->keys_onoff,
+ &alter_ctx);
+ }
+ else
+ {
+ res= simple_tmp_rename_or_index_change(thd, table_list,
+ alter_info->keys_onoff,
+ &alter_ctx);
}
- bool res= simple_rename_or_index_change(thd, table_list,
- alter_info->keys_onoff,
- &alter_ctx);
DBUG_RETURN(res);
}
@@ -9123,6 +9282,8 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
{
goto err_new_table_cleanup;
}
+ /* in case of alter temp table send the tracker in OK packet */
+ SESSION_TRACKER_CHANGED(thd, SESSION_STATE_CHANGE_TRACKER, NULL);
}
@@ -9383,7 +9544,8 @@ err_new_table_cleanup:
else
(void) quick_rm_table(thd, new_db_type,
alter_ctx.new_db, alter_ctx.tmp_name,
- (FN_IS_TMP | (no_ha_table ? NO_HA_TABLE : 0)));
+ (FN_IS_TMP | (no_ha_table ? NO_HA_TABLE : 0)),
+ alter_ctx.get_tmp_path());
/*
No default value was provided for a DATE/DATETIME field, the
@@ -9424,6 +9586,9 @@ err_new_table_cleanup:
err_with_mdl_after_alter:
/* the table was altered. binlog the operation */
+ DBUG_ASSERT(!(mysql_bin_log.is_open() &&
+ thd->is_current_stmt_binlog_format_row() &&
+ (create_info->tmp_table())));
write_bin_log(thd, true, thd->query(), thd->query_length());
err_with_mdl:
@@ -9562,8 +9727,7 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to,
Old fields keep their current values, and therefore should not be
present in the set of autoupdate fields.
*/
- if ((*ptr)->default_value ||
- ((*ptr)->has_insert_default_function()))
+ if ((*ptr)->default_value)
{
*(dfield_ptr++)= *ptr;
++to->s->default_fields;
@@ -9740,7 +9904,7 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to,
THD_STAGE_INFO(thd, stage_enabling_keys);
thd_progress_next_stage(thd);
- if (error > 0)
+ if (error > 0 && !from->s->tmp_table)
{
/* We are going to drop the temporary table */
to->file->extra(HA_EXTRA_PREPARE_FOR_DROP);
@@ -9769,7 +9933,8 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to,
to->file->ha_release_auto_increment();
if (to->file->ha_external_lock(thd,F_UNLCK))
error=1;
- if (error < 0 && to->file->extra(HA_EXTRA_PREPARE_FOR_RENAME))
+ if (error < 0 && !from->s->tmp_table &&
+ to->file->extra(HA_EXTRA_PREPARE_FOR_RENAME))
error= 1;
thd_progress_end(thd);
DBUG_RETURN(error > 0 ? -1 : 0);
diff --git a/sql/sql_table.h b/sql/sql_table.h
index 109da541a28..628c51f678f 100644
--- a/sql/sql_table.h
+++ b/sql/sql_table.h
@@ -248,7 +248,8 @@ bool log_drop_table(THD *thd, const char *db_name, size_t db_name_length,
const char *table_name, size_t table_name_length,
bool temporary_table);
bool quick_rm_table(THD *thd, handlerton *base, const char *db,
- const char *table_name, uint flags);
+ const char *table_name, uint flags,
+ const char *table_path=0);
void close_cached_table(THD *thd, TABLE *table);
void sp_prepare_create_field(THD *thd, Column_definition *sql_field);
int prepare_create_field(Column_definition *sql_field,
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index 406c95fa755..854ebb99ef2 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -28,6 +28,8 @@
#include "sql_cursor.h"
#include "sql_base.h" // fill_record
#include "filesort.h" // filesort_free_buffers
+#include "sql_view.h"
+#include "sql_cte.h"
bool mysql_union(THD *thd, LEX *lex, select_result *result,
SELECT_LEX_UNIT *unit, ulong setup_tables_done_option)
@@ -99,6 +101,27 @@ int select_union::send_data(List<Item> &values)
}
+int select_union_recursive::send_data(List<Item> &values)
+{
+ int rc= select_union::send_data(values);
+
+ if (!write_err)
+ {
+ int err;
+ if ((err= incr_table->file->ha_write_tmp_row(table->record[0])))
+ {
+ bool is_duplicate;
+ rc= create_internal_tmp_table_from_heap(thd, incr_table,
+ tmp_table_param.start_recinfo,
+ &tmp_table_param.recinfo,
+ err, 1, &is_duplicate);
+ }
+ }
+
+ return rc;
+}
+
+
bool select_union::send_eof()
{
return 0;
@@ -171,6 +194,55 @@ select_union::create_result_table(THD *thd_arg, List<Item> *column_types,
return FALSE;
}
+bool
+select_union_recursive::create_result_table(THD *thd_arg,
+ List<Item> *column_types,
+ bool is_union_distinct,
+ ulonglong options,
+ const char *alias,
+ bool bit_fields_as_long,
+ bool create_table,
+ bool keep_row_order)
+{
+ if (select_union::create_result_table(thd_arg, column_types,
+ is_union_distinct, options,
+ "", bit_fields_as_long,
+ create_table, keep_row_order))
+ return true;
+
+ if (! (incr_table= create_tmp_table(thd_arg, &tmp_table_param, *column_types,
+ (ORDER*) 0, false, 1,
+ options, HA_POS_ERROR, "",
+ !create_table, keep_row_order)))
+ return true;
+
+ incr_table->keys_in_use_for_query.clear_all();
+ for (uint i=0; i < table->s->fields; i++)
+ incr_table->field[i]->flags &= ~PART_KEY_FLAG;
+
+ if (create_table)
+ {
+ incr_table->file->extra(HA_EXTRA_WRITE_CACHE);
+ incr_table->file->extra(HA_EXTRA_IGNORE_DUP_KEY);
+ }
+
+ TABLE *rec_table= 0;
+ if (! (rec_table= create_tmp_table(thd_arg, &tmp_table_param, *column_types,
+ (ORDER*) 0, false, 1,
+ options, HA_POS_ERROR, alias,
+ true, keep_row_order)))
+ return true;
+
+ rec_table->keys_in_use_for_query.clear_all();
+ for (uint i=0; i < table->s->fields; i++)
+ rec_table->field[i]->flags &= ~PART_KEY_FLAG;
+
+ if (rec_tables.push_back(rec_table))
+ return true;
+
+ return false;
+}
+
/**
Reset and empty the temporary table that stores the materialized query
@@ -187,6 +259,34 @@ void select_union::cleanup()
}
+void select_union_recursive::cleanup()
+{
+ if (table)
+ {
+ select_union::cleanup();
+ free_tmp_table(thd, table);
+ }
+
+ if (incr_table)
+ {
+ incr_table->file->extra(HA_EXTRA_RESET_STATE);
+ incr_table->file->ha_delete_all_rows();
+ free_tmp_table(thd, incr_table);
+ }
+
+ List_iterator<TABLE> it(rec_tables);
+ TABLE *tab;
+ while ((tab= it++))
+ {
+ if (tab->is_created())
+ {
+ tab->file->extra(HA_EXTRA_RESET_STATE);
+ tab->file->ha_delete_all_rows();
+ }
+ free_tmp_table(thd, tab);
+ }
+}
+
/**
Replace the current result with new_result and prepare it.
@@ -332,11 +432,15 @@ st_select_lex_unit::init_prepare_fake_select_lex(THD *thd_arg,
}
+
+
bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
ulong additional_options)
{
SELECT_LEX *lex_select_save= thd_arg->lex->current_select;
SELECT_LEX *sl, *first_sl= first_select();
+ bool is_recursive= with_element && with_element->is_recursive;
+ bool is_rec_result_table_created= false;
select_result *tmp_result;
bool is_union_select;
bool instantiate_tmp_table= false;
@@ -388,7 +492,7 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
/* Global option */
- if (is_union_select)
+ if (is_union_select || is_recursive)
{
if (is_union() && !union_needs_tmp_table())
{
@@ -404,8 +508,16 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
}
else
{
- if (!(tmp_result= union_result=
- new (thd_arg->mem_root) select_union(thd_arg)))
+ if (!is_recursive)
+ union_result= new (thd_arg->mem_root) select_union(thd_arg);
+ else
+ {
+ with_element->rec_result=
+ new (thd_arg->mem_root) select_union_recursive(thd_arg);
+ union_result= with_element->rec_result;
+ fake_select_lex= NULL;
+ }
+ if (!(tmp_result= union_result))
goto err; /* purecov: inspected */
instantiate_tmp_table= true;
}
@@ -414,9 +526,9 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
tmp_result= sel_result;
sl->context.resolve_in_select_list= TRUE;
-
+
for (;sl; sl= sl->next_select())
- {
+ {
bool can_skip_order_by;
sl->options|= SELECT_NO_UNLOCK;
JOIN *join= new JOIN(thd_arg, sl->item_list,
@@ -473,10 +585,17 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
Use items list of underlaid select for derived tables to preserve
information about fields lengths and exact types
*/
- if (!is_union_select)
+ if (!is_union_select && !is_recursive)
types= first_sl->item_list;
else if (sl == first_sl)
{
+ if (is_recursive)
+ {
+ if (derived->with->rename_columns_of_derived_unit(thd, this))
+ goto err;
+ if (check_duplicate_names(thd, sl->item_list, 0))
+ goto err;
+ }
types.empty();
List_iterator_fast<Item> it(sl->item_list);
Item *item_tmp;
@@ -498,15 +617,42 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
ER_THD(thd, ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT),MYF(0));
goto err;
}
- List_iterator_fast<Item> it(sl->item_list);
- List_iterator_fast<Item> tp(types);
- Item *type, *item_tmp;
- while ((type= tp++, item_tmp= it++))
+ if (!is_rec_result_table_created)
{
- if (((Item_type_holder*)type)->join_types(thd_arg, item_tmp))
- DBUG_RETURN(TRUE);
+ List_iterator_fast<Item> it(sl->item_list);
+ List_iterator_fast<Item> tp(types);
+ Item *type, *item_tmp;
+ while ((type= tp++, item_tmp= it++))
+ {
+ if (((Item_type_holder*)type)->join_types(thd_arg, item_tmp))
+ DBUG_RETURN(TRUE);
+ }
}
}
+ if (is_recursive)
+ {
+ if (!with_element->is_anchor(sl))
+ sl->uncacheable|= UNCACHEABLE_UNITED;
+ if(!is_rec_result_table_created &&
+ (!sl->next_select() ||
+ sl->next_select() == with_element->first_recursive))
+ {
+ ulonglong create_options;
+ create_options= (first_sl->options | thd_arg->variables.option_bits |
+ TMP_TABLE_ALL_COLUMNS);
+ if (union_result->create_result_table(thd, &types,
+ MY_TEST(union_distinct),
+ create_options, derived->alias,
+ false,
+ instantiate_tmp_table, false))
+ goto err;
+ if (!derived->table)
+ derived->table= derived->derived_result->table=
+ with_element->rec_result->rec_tables.head();
+ with_element->mark_as_with_prepared_anchor();
+ is_rec_result_table_created= true;
+ }
+ }
}
/*
@@ -579,9 +725,11 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
if (global_parameters()->ftfunc_list->elements)
create_options= create_options | TMP_TABLE_FORCE_MYISAM;
- if (union_result->create_result_table(thd, &types, MY_TEST(union_distinct),
- create_options, "", false,
- instantiate_tmp_table))
+
+ if (!is_recursive &&
+ union_result->create_result_table(thd, &types, MY_TEST(union_distinct),
+ create_options, "", false,
+ instantiate_tmp_table, false))
goto err;
if (fake_select_lex && !fake_select_lex->first_cond_optimization)
{
@@ -689,6 +837,10 @@ bool st_select_lex_unit::optimize()
if (optimized && !uncacheable && !describe)
DBUG_RETURN(FALSE);
+ if (with_element && with_element->is_recursive && optimize_started)
+ DBUG_RETURN(FALSE);
+ optimize_started= true;
+
if (uncacheable || !item || !item->assigned() || describe)
{
if (item)
@@ -785,7 +937,7 @@ bool st_select_lex_unit::exec()
if (uncacheable || !item || !item->assigned() || describe)
{
- if (!fake_select_lex)
+ if (!fake_select_lex && !(with_element && with_element->is_recursive))
union_result->cleanup();
for (SELECT_LEX *sl= select_cursor; sl; sl= sl->next_select())
{
@@ -826,7 +978,7 @@ bool st_select_lex_unit::exec()
{
records_at_start= table->file->stats.records;
sl->join->exec();
- if (sl == union_distinct)
+ if (sl == union_distinct && !(with_element && with_element->is_recursive))
{
// This is UNION DISTINCT, so there should be a fake_select_lex
DBUG_ASSERT(fake_select_lex != NULL);
@@ -1008,6 +1160,106 @@ err:
}
+/**
+ @brief
+ Execute the union of the specification of a recursive with table
+
+ @details
+ The method is performed only for the units that are specifications
+ if recursive with table T. If the specification contains an anchor
+ part then the first call of this method executes only this part
+ while the following calls execute the recursive part. If there are
+ no anchors each call executes the whole unit.
+ Before the excution the method cleans up the temporary table
+ to where the new rows of the recursive table are sent.
+ After the execution the unit these rows are copied to the
+ temporary tables created for recursive references of T.
+ If the specification if T is restricted (standards compliant)
+ then these temporary tables are cleaned up before new rows
+ are copied into them.
+
+ @retval
+ false on success
+ true on failure
+*/
+
+bool st_select_lex_unit::exec_recursive()
+{
+ st_select_lex *lex_select_save= thd->lex->current_select;
+ st_select_lex *start= with_element->first_recursive;
+ TABLE *incr_table= with_element->rec_result->incr_table;
+ st_select_lex *end= NULL;
+ bool is_unrestricted= with_element->is_unrestricted();
+ List_iterator_fast<TABLE> li(with_element->rec_result->rec_tables);
+ ha_rows examined_rows= 0;
+ bool was_executed= executed;
+ TABLE *rec_table;
+
+ DBUG_ENTER("st_select_lex_unit::exec_recursive");
+
+ executed= 1;
+ create_explain_query_if_not_exists(thd->lex, thd->mem_root);
+ if (!was_executed)
+ save_union_explain(thd->lex->explain);
+
+ if ((saved_error= incr_table->file->ha_delete_all_rows()))
+ goto err;
+
+ if (with_element->level == 0)
+ {
+ start= first_select();
+ if (with_element->with_anchor)
+ end= with_element->first_recursive;
+ }
+
+ for (st_select_lex *sl= start ; sl != end; sl= sl->next_select())
+ {
+ thd->lex->current_select= sl;
+ sl->join->exec();
+ saved_error= sl->join->error;
+ if (!saved_error)
+ {
+ examined_rows+= thd->get_examined_row_count();
+ thd->set_examined_row_count(0);
+ if (union_result->flush())
+ {
+ thd->lex->current_select= lex_select_save;
+ DBUG_RETURN(1);
+ }
+ }
+ if (saved_error)
+ {
+ thd->lex->current_select= lex_select_save;
+ goto err;
+
+ }
+ }
+
+ thd->inc_examined_row_count(examined_rows);
+
+ incr_table->file->info(HA_STATUS_VARIABLE);
+ if (incr_table->file->stats.records == 0)
+ with_element->set_as_stabilized();
+ else
+ with_element->level++;
+
+ while ((rec_table= li++))
+ {
+ saved_error=
+ incr_table->insert_all_rows_into(thd, rec_table, !is_unrestricted);
+ if (!with_element->rec_result->first_rec_table_to_update)
+ with_element->rec_result->first_rec_table_to_update= rec_table;
+ if (with_element->level == 1)
+ rec_table->reginfo.join_tab->preread_init_done= true;
+ }
+
+ thd->lex->current_select= lex_select_save;
+err:
+ thd->lex->set_limit_rows_examined();
+ DBUG_RETURN(saved_error);
+}
+
+
bool st_select_lex_unit::cleanup()
{
int error= 0;
@@ -1021,7 +1273,7 @@ bool st_select_lex_unit::cleanup()
for (SELECT_LEX *sl= first_select(); sl; sl= sl->next_select())
error|= sl->cleanup();
-
+
if (fake_select_lex)
{
error|= fake_select_lex->cleanup();
@@ -1045,13 +1297,26 @@ bool st_select_lex_unit::cleanup()
}
}
- if (union_result)
+ if (with_element && with_element->is_recursive)
{
- delete union_result;
- union_result=0; // Safety
- if (table)
- free_tmp_table(thd, table);
- table= 0; // Safety
+ if (union_result )
+ {
+ ((select_union_recursive *) union_result)->cleanup();
+ delete union_result;
+ union_result= 0;
+ }
+ with_element->mark_as_cleaned();
+ }
+ else
+ {
+ if (union_result)
+ {
+ delete union_result;
+ union_result=0; // Safety
+ if (table)
+ free_tmp_table(thd, table);
+ table= 0; // Safety
+ }
}
DBUG_RETURN(error);
@@ -1061,6 +1326,7 @@ bool st_select_lex_unit::cleanup()
void st_select_lex_unit::reinit_exec_mechanism()
{
prepared= optimized= executed= 0;
+ optimize_started= 0;
#ifndef DBUG_OFF
if (is_union())
{
@@ -1077,6 +1343,8 @@ void st_select_lex_unit::reinit_exec_mechanism()
}
}
#endif
+ if (with_element && with_element->is_recursive)
+ with_element->reset_recursive_for_exec();
}
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index d59b8b7e048..b452e4fe6ae 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -526,6 +526,9 @@ int mysql_update(THD *thd,
DBUG_EXECUTE_IF("show_explain_probe_update_exec_start",
dbug_serve_apcs(thd, 1););
+ if (!(select && select->quick))
+ status_var_increment(thd->status_var.update_scan_count);
+
if (query_plan.using_filesort || query_plan.using_io_buffer)
{
/*
@@ -583,6 +586,7 @@ int mysql_update(THD *thd,
close_cached_file(&tempfile);
goto err;
}
+
table->file->try_semi_consistent_read(1);
/*
@@ -621,7 +625,7 @@ int mysql_update(THD *thd,
thd->inc_examined_row_count(1);
if (!select || (error= select->skip_record(thd)) > 0)
{
- if (table->file->was_semi_consistent_read())
+ if (table->file->ha_was_semi_consistent_read())
continue; /* repeat the read of the same row if it still exists */
explain->buf_tracker.on_record_after_where();
@@ -740,7 +744,7 @@ int mysql_update(THD *thd,
thd->inc_examined_row_count(1);
if (!select || select->skip_record(thd) > 0)
{
- if (table->file->was_semi_consistent_read())
+ if (table->file->ha_was_semi_consistent_read())
continue; /* repeat the read of the same row if it still exists */
explain->tracker.on_record_after_where();
diff --git a/sql/sql_view.cc b/sql/sql_view.cc
index b33590637b9..c0d9ba48121 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -35,6 +35,7 @@
#include "sp_cache.h"
#include "datadict.h" // dd_frm_is_view()
#include "sql_derived.h"
+#include "sql_cte.h" // check_dependencies_in_with_clauses()
#define MD5_BUFF_LENGTH 33
@@ -429,6 +430,21 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
lex->link_first_table_back(view, link_to_local);
view->open_type= OT_BASE_ONLY;
+ if (check_dependencies_in_with_clauses(lex->with_clauses_list))
+ {
+ res= TRUE;
+ goto err;
+ }
+
+ /*
+ ignore lock specs for CREATE statement
+ */
+ if (lex->current_select->lock_type != TL_READ_DEFAULT)
+ {
+ lex->current_select->set_lock_for_tables(TL_READ_DEFAULT);
+ view->mdl_request.set_type(MDL_EXCLUSIVE);
+ }
+
if (thd->open_temporary_tables(lex->query_tables) ||
open_and_lock_tables(thd, lex->query_tables, TRUE, 0))
{
@@ -1383,6 +1399,9 @@ bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table,
TABLE_LIST *tbl;
Security_context *security_ctx= 0;
+ if (check_dependencies_in_with_clauses(thd->lex->with_clauses_list))
+ goto err;
+
/*
Check rights to run commands (ANALYZE SELECT, EXPLAIN SELECT &
SHOW CREATE) which show underlying tables.
@@ -1612,7 +1631,7 @@ bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table,
sl->context.error_processor_data= (void *)table;
}
- table->select_lex->master_unit()->is_view= true;
+ view_select->master_unit()->is_view= true;
/*
check MERGE algorithm ability
diff --git a/sql/sql_window.cc b/sql/sql_window.cc
index 4c5ef53d854..e720c39eb8f 100644
--- a/sql/sql_window.cc
+++ b/sql/sql_window.cc
@@ -4,6 +4,7 @@
#include "filesort.h"
#include "sql_base.h"
#include "sql_window.h"
+#include "my_dbug.h"
bool
@@ -37,12 +38,12 @@ Window_spec::check_window_names(List_iterator_fast<Window_spec> &it)
if (win_spec->order_list->elements && order_list->elements)
{
my_error(ER_ORDER_LIST_IN_REFERENCING_WINDOW_SPEC, MYF(0), ref_name);
- return true;
+ return true;
}
- if (win_spec->window_frame)
+ if (win_spec->window_frame)
{
my_error(ER_WINDOW_FRAME_IN_REFERENCED_WINDOW_SPEC, MYF(0), ref_name);
- return true;
+ return true;
}
referenced_win_spec= win_spec;
if (partition_list->elements == 0)
@@ -54,7 +55,7 @@ Window_spec::check_window_names(List_iterator_fast<Window_spec> &it)
if (ref_name && !referenced_win_spec)
{
my_error(ER_WRONG_WINDOW_SPEC_NAME, MYF(0), ref_name);
- return true;
+ return true;
}
window_names_are_checked= true;
return false;
@@ -73,7 +74,7 @@ Window_frame::check_frame_bounds()
top_bound->precedence_type == Window_frame_bound::FOLLOWING))
{
my_error(ER_BAD_COMBINATION_OF_WINDOW_FRAME_BOUND_SPECS, MYF(0));
- return true;
+ return true;
}
return false;
@@ -86,7 +87,7 @@ Window_frame::check_frame_bounds()
int
setup_windows(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables,
- List<Item> &fields, List<Item> &all_fields,
+ List<Item> &fields, List<Item> &all_fields,
List<Window_spec> &win_specs, List<Item_window_func> &win_funcs)
{
Window_spec *win_spec;
@@ -116,7 +117,7 @@ setup_windows(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables,
it.rewind();
List_iterator_fast<Window_spec> itp(win_specs);
-
+
while ((win_spec= it++))
{
bool hidden_group_fields;
@@ -131,7 +132,7 @@ setup_windows(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables,
{
DBUG_RETURN(1);
}
-
+
if (win_spec->window_frame &&
win_spec->window_frame->exclusion != Window_frame::EXCL_NONE)
{
@@ -188,7 +189,7 @@ setup_windows(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables,
}
}
}
-
+
/* "ROWS PRECEDING|FOLLOWING $n" must have a numeric $n */
if (win_spec->window_frame &&
win_spec->window_frame->units == Window_frame::UNITS_ROWS)
@@ -219,7 +220,7 @@ setup_windows(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables,
{
win_func_item->update_used_tables();
}
-
+
DBUG_RETURN(0);
}
@@ -445,7 +446,7 @@ typedef int (*Item_window_func_cmp)(Item_window_func *f1,
@brief
Sort window functions so that those that can be computed together are
adjacent.
-
+
@detail
Sort window functions by their
- required sorting order,
@@ -498,48 +499,15 @@ void order_window_funcs_by_window_specs(List<Item_window_func> *win_func_list)
}
else if (win_spec_prev->window_frame != win_spec_curr->window_frame)
curr->marker|= FRAME_CHANGE_FLAG;
-
- prev= curr;
- }
+
+ prev= curr;
+ }
}
/////////////////////////////////////////////////////////////////////////////
-/*
- Do a pass over sorted table and compute window function values.
-
- This function is for handling window functions that can be computed on the
- fly. Examples are RANK() and ROW_NUMBER().
-*/
-bool compute_window_func_values(Item_window_func *item_win,
- TABLE *tbl, READ_RECORD *info)
-{
- int err;
- while (!(err=info->read_record(info)))
- {
- store_record(tbl,record[1]);
-
- /*
- This will cause window function to compute its value for the
- current row :
- */
- item_win->advance_window();
-
- /*
- Put the new value into temptable's field
- TODO: Should this use item_win->update_field() call?
- Regular aggegate function implementations seem to implement it.
- */
- item_win->save_in_field(item_win->result_field, true);
- err= tbl->file->ha_update_row(tbl->record[1], tbl->record[0]);
- if (err && err != HA_ERR_RECORD_IS_THE_SAME)
- return true;
- }
- return false;
-}
-
/////////////////////////////////////////////////////////////////////////////
// Window Frames support
/////////////////////////////////////////////////////////////////////////////
@@ -571,11 +539,6 @@ bool clone_read_record(const READ_RECORD *src, READ_RECORD *dst)
class Rowid_seq_cursor
{
- uchar *cache_start;
- uchar *cache_pos;
- uchar *cache_end;
- uint ref_length;
-
public:
virtual ~Rowid_seq_cursor() {}
@@ -587,29 +550,44 @@ public:
ref_length= info->ref_length;
}
- virtual int get_next()
+ virtual int next()
{
- /* Allow multiple get_next() calls in EOF state*/
+ /* Allow multiple next() calls in EOF state. */
if (cache_pos == cache_end)
return -1;
+
cache_pos+= ref_length;
+ DBUG_ASSERT(cache_pos <= cache_end);
+
return 0;
}
-
- ha_rows get_rownum()
+
+ virtual int prev()
+ {
+ /* Allow multiple prev() calls when positioned at the start. */
+ if (cache_pos == cache_start)
+ return -1;
+ cache_pos-= ref_length;
+ DBUG_ASSERT(cache_pos >= cache_start);
+
+ return 0;
+ }
+
+ ha_rows get_rownum() const
{
return (cache_pos - cache_start) / ref_length;
}
- // will be called by ROWS n FOLLOWING to catch up.
void move_to(ha_rows row_number)
{
- cache_pos= cache_start + row_number * ref_length;
+ cache_pos= MY_MIN(cache_end, cache_start + row_number * ref_length);
+ DBUG_ASSERT(cache_pos <= cache_end);
}
+
protected:
bool at_eof() { return (cache_pos == cache_end); }
- uchar *get_last_rowid()
+ uchar *get_prev_rowid()
{
if (cache_pos == cache_start)
return NULL;
@@ -618,6 +596,12 @@ protected:
}
uchar *get_curr_rowid() { return cache_pos; }
+
+private:
+ uchar *cache_start;
+ uchar *cache_pos;
+ uchar *cache_end;
+ uint ref_length;
};
@@ -627,66 +611,64 @@ protected:
class Table_read_cursor : public Rowid_seq_cursor
{
- /*
- Note: we don't own *read_record, somebody else is using it.
- We only look at the constant part of it, e.g. table, record buffer, etc.
- */
- READ_RECORD *read_record;
public:
virtual ~Table_read_cursor() {}
void init(READ_RECORD *info)
{
Rowid_seq_cursor::init(info);
- read_record= info;
+ table= info->table;
+ record= info->record;
}
- virtual int get_next()
+ virtual int fetch()
{
if (at_eof())
return -1;
uchar* curr_rowid= get_curr_rowid();
- int res= Rowid_seq_cursor::get_next();
- if (!res)
- {
- res= read_record->table->file->ha_rnd_pos(read_record->record,
- curr_rowid);
- }
- return res;
+ return table->file->ha_rnd_pos(record, curr_rowid);
}
- bool restore_last_row()
+ bool fetch_prev_row()
{
uchar *p;
- if ((p= get_last_rowid()))
+ if ((p= get_prev_rowid()))
{
- int rc= read_record->table->file->ha_rnd_pos(read_record->record, p);
+ int rc= table->file->ha_rnd_pos(record, p);
if (!rc)
return true; // restored ok
}
return false; // didn't restore
}
- // todo: should move_to() also read row here?
+private:
+ /* The table that is acccesed by this cursor. */
+ TABLE *table;
+ /* Buffer where to store the table's record data. */
+ uchar *record;
+
+ // TODO(spetrunia): should move_to() also read row here?
};
/*
A cursor which only moves within a partition. The scan stops at the partition
end, and it needs an explicit command to move to the next partition.
+
+ This cursor can not move backwards.
*/
-class Partition_read_cursor
+class Partition_read_cursor : public Table_read_cursor
{
- Table_read_cursor tbl_cursor;
- Group_bound_tracker bound_tracker;
- bool end_of_partition;
public:
- void init(THD *thd, READ_RECORD *info, SQL_I_List<ORDER> *partition_list)
+ Partition_read_cursor(THD *thd, SQL_I_List<ORDER> *partition_list) :
+ bound_tracker(thd, partition_list) {}
+
+ void init(READ_RECORD *info)
{
- tbl_cursor.init(info);
- bound_tracker.init(thd, partition_list);
+ Table_read_cursor::init(info);
+ bound_tracker.init();
end_of_partition= false;
}
@@ -699,46 +681,46 @@ public:
void on_next_partition(ha_rows rownum)
{
/* Remember the sort key value from the new partition */
+ move_to(rownum);
bound_tracker.check_if_next_group();
end_of_partition= false;
- }
- /*
- Moves to a new row. The row is assumed to be within the current partition
- */
- void move_to(ha_rows rownum) { tbl_cursor.move_to(rownum); }
+ }
/*
This returns -1 when end of partition was reached.
*/
- int get_next()
+ int next()
{
int res;
if (end_of_partition)
return -1;
- if ((res= tbl_cursor.get_next()))
+
+ if ((res= Table_read_cursor::next()) ||
+ (res= fetch()))
return res;
if (bound_tracker.compare_with_cache())
{
+ /* This row is part of a new partition, don't move
+ forward any more untill we get informed of a new partition. */
+ Table_read_cursor::prev();
end_of_partition= true;
return -1;
}
return 0;
}
- bool restore_last_row()
- {
- return tbl_cursor.restore_last_row();
- }
+private:
+ Group_bound_tracker bound_tracker;
+ bool end_of_partition;
};
/////////////////////////////////////////////////////////////////////////////
-
/*
Window frame bound cursor. Abstract interface.
-
+
@detail
The cursor moves within the partition that the current row is in.
It may be ahead or behind the current row.
@@ -775,11 +757,14 @@ public:
class Frame_cursor : public Sql_alloc
{
public:
- virtual void init(THD *thd, READ_RECORD *info,
- SQL_I_List<ORDER> *partition_list,
- SQL_I_List<ORDER> *order_list)
- {}
+ Frame_cursor() : sum_functions(), perform_no_action(false) {}
+ virtual void init(READ_RECORD *info) {};
+
+ bool add_sum_func(Item_sum* item)
+ {
+ return sum_functions.push_back(item);
+ }
/*
Current row has moved to the next partition and is positioned on the first
row there. Position the frame bound accordingly.
@@ -796,20 +781,120 @@ public:
- The callee may move tbl->file and tbl->record[0] to point to some other
row.
*/
- virtual void pre_next_partition(ha_rows rownum, Item_sum* item){};
- virtual void next_partition(ha_rows rownum, Item_sum* item)=0;
-
+ virtual void pre_next_partition(ha_rows rownum) {};
+ virtual void next_partition(ha_rows rownum)=0;
+
/*
The current row has moved one row forward.
Move this frame bound accordingly, and update the value of aggregate
function as necessary.
*/
- virtual void pre_next_row(Item_sum* item){};
- virtual void next_row(Item_sum* item)=0;
-
- virtual ~Frame_cursor(){}
+ virtual void pre_next_row() {};
+ virtual void next_row()=0;
+
+ virtual bool is_outside_computation_bounds() const { return false; };
+
+ virtual ~Frame_cursor() {}
+
+ /*
+ Regular frame cursors add or remove values from the sum functions they
+ manage. By calling this method, they will only perform the required
+ movement within the table, but no adding/removing will happen.
+ */
+ void set_no_action()
+ {
+ perform_no_action= true;
+ }
+
+ /* Retrieves the row number that this cursor currently points at. */
+ virtual ha_rows get_curr_rownum() const= 0;
+
+protected:
+ inline void add_value_to_items()
+ {
+ if (perform_no_action)
+ return;
+
+ List_iterator_fast<Item_sum> it(sum_functions);
+ Item_sum *item_sum;
+ while ((item_sum= it++))
+ {
+ item_sum->add();
+ }
+ }
+
+ inline void remove_value_from_items()
+ {
+ if (perform_no_action)
+ return;
+
+ List_iterator_fast<Item_sum> it(sum_functions);
+ Item_sum *item_sum;
+ while ((item_sum= it++))
+ {
+ item_sum->remove();
+ }
+ }
+
+ /* Sum functions that this cursor handles. */
+ List<Item_sum> sum_functions;
+
+private:
+ bool perform_no_action;
+};
+
+/*
+ A class that owns cursor objects associated with a specific window function.
+*/
+class Cursor_manager
+{
+public:
+ bool add_cursor(Frame_cursor *cursor)
+ {
+ return cursors.push_back(cursor);
+ }
+
+ void initialize_cursors(READ_RECORD *info)
+ {
+ List_iterator_fast<Frame_cursor> iter(cursors);
+ Frame_cursor *fc;
+ while ((fc= iter++))
+ fc->init(info);
+ }
+
+ void notify_cursors_partition_changed(ha_rows rownum)
+ {
+ List_iterator_fast<Frame_cursor> iter(cursors);
+ Frame_cursor *cursor;
+ while ((cursor= iter++))
+ cursor->pre_next_partition(rownum);
+
+ iter.rewind();
+ while ((cursor= iter++))
+ cursor->next_partition(rownum);
+ }
+
+ void notify_cursors_next_row()
+ {
+ List_iterator_fast<Frame_cursor> iter(cursors);
+ Frame_cursor *cursor;
+ while ((cursor= iter++))
+ cursor->pre_next_row();
+
+ iter.rewind();
+ while ((cursor= iter++))
+ cursor->next_row();
+ }
+
+ ~Cursor_manager() { cursors.delete_elements(); }
+
+private:
+ /* List of the cursors that this manager owns. */
+ List<Frame_cursor> cursors;
};
+
+
//////////////////////////////////////////////////////////////////////////////
// RANGE-type frames
//////////////////////////////////////////////////////////////////////////////
@@ -827,7 +912,7 @@ public:
class Frame_range_n_top : public Frame_cursor
{
- Table_read_cursor cursor;
+ Partition_read_cursor cursor;
Cached_item_item *range_expr;
@@ -835,22 +920,22 @@ class Frame_range_n_top : public Frame_cursor
Item *item_add;
const bool is_preceding;
+
+ bool end_of_partition;
+
/*
1 when order_list uses ASC ordering
-1 when order_list uses DESC ordering
*/
int order_direction;
public:
- Frame_range_n_top(bool is_preceding_arg, Item *n_val_arg) :
- n_val(n_val_arg), item_add(NULL), is_preceding(is_preceding_arg)
- {}
-
- void init(THD *thd, READ_RECORD *info,
- SQL_I_List<ORDER> *partition_list,
- SQL_I_List<ORDER> *order_list)
+ Frame_range_n_top(THD *thd,
+ SQL_I_List<ORDER> *partition_list,
+ SQL_I_List<ORDER> *order_list,
+ bool is_preceding_arg, Item *n_val_arg) :
+ cursor(thd, partition_list), n_val(n_val_arg), item_add(NULL),
+ is_preceding(is_preceding_arg)
{
- cursor.init(info);
-
DBUG_ASSERT(order_list->elements == 1);
Item *src_expr= order_list->first->item[0];
if (order_list->first->direction == ORDER::ORDER_ASC)
@@ -872,49 +957,82 @@ public:
item_add->fix_fields(thd, &item_add);
}
- void pre_next_partition(ha_rows rownum, Item_sum* item)
+ void init(READ_RECORD *info)
+ {
+ cursor.init(info);
+ }
+
+ void pre_next_partition(ha_rows rownum)
{
// Save the value of FUNC(current_row)
range_expr->fetch_value_from(item_add);
+
+ cursor.on_next_partition(rownum);
+ end_of_partition= false;
}
- void next_partition(ha_rows rownum, Item_sum* item)
+ void next_partition(ha_rows rownum)
{
- cursor.move_to(rownum);
- walk_till_non_peer(item);
+ walk_till_non_peer();
}
- void pre_next_row(Item_sum* item)
+ void pre_next_row()
{
+ if (end_of_partition)
+ return;
range_expr->fetch_value_from(item_add);
}
- void next_row(Item_sum* item)
+ void next_row()
{
+ if (end_of_partition)
+ return;
/*
Ok, our cursor is at the first row R where
(prev_row + n) >= R
We need to check about the current row.
*/
- if (cursor.restore_last_row())
- {
- if (order_direction * range_expr->cmp_read_only() <= 0)
- return;
- item->remove();
- }
- walk_till_non_peer(item);
+ walk_till_non_peer();
+ }
+
+ ha_rows get_curr_rownum() const
+ {
+ return cursor.get_rownum();
+ }
+
+ bool is_outside_computation_bounds() const
+ {
+ if (end_of_partition)
+ return true;
+ return false;
}
private:
- void walk_till_non_peer(Item_sum* item)
+ void walk_till_non_peer()
{
- while (!cursor.get_next())
+ if (cursor.fetch()) // ERROR
+ return;
+ // Current row is not a peer.
+ if (order_direction * range_expr->cmp_read_only() <= 0)
+ return;
+ remove_value_from_items();
+
+ int res;
+ while (!(res= cursor.next()))
{
+ /* Note, no need to fetch the value explicitly here. The partition
+ read cursor will fetch it to check if the partition has changed.
+ TODO(cvicentiu) make this piece of information not necessary by
+ reimplementing Partition_read_cursor.
+ */
if (order_direction * range_expr->cmp_read_only() <= 0)
break;
- item->remove();
+ remove_value_from_items();
}
+ if (res)
+ end_of_partition= true;
}
+
};
@@ -950,16 +1068,13 @@ class Frame_range_n_bottom: public Frame_cursor
*/
int order_direction;
public:
- Frame_range_n_bottom(bool is_preceding_arg, Item *n_val_arg) :
- n_val(n_val_arg), item_add(NULL), is_preceding(is_preceding_arg)
- {}
-
- void init(THD *thd, READ_RECORD *info,
- SQL_I_List<ORDER> *partition_list,
- SQL_I_List<ORDER> *order_list)
+ Frame_range_n_bottom(THD *thd,
+ SQL_I_List<ORDER> *partition_list,
+ SQL_I_List<ORDER> *order_list,
+ bool is_preceding_arg, Item *n_val_arg) :
+ cursor(thd, partition_list), n_val(n_val_arg), item_add(NULL),
+ is_preceding(is_preceding_arg), added_values(false)
{
- cursor.init(thd, info, partition_list);
-
DBUG_ASSERT(order_list->elements == 1);
Item *src_expr= order_list->first->item[0];
@@ -982,29 +1097,35 @@ public:
item_add->fix_fields(thd, &item_add);
}
- void pre_next_partition(ha_rows rownum, Item_sum* item)
+ void init(READ_RECORD *info)
+ {
+ cursor.init(info);
+ }
+
+ void pre_next_partition(ha_rows rownum)
{
// Save the value of FUNC(current_row)
range_expr->fetch_value_from(item_add);
cursor.on_next_partition(rownum);
end_of_partition= false;
+ added_values= false;
}
- void next_partition(ha_rows rownum, Item_sum* item)
+ void next_partition(ha_rows rownum)
{
cursor.move_to(rownum);
- walk_till_non_peer(item);
+ walk_till_non_peer();
}
- void pre_next_row(Item_sum* item)
+ void pre_next_row()
{
if (end_of_partition)
return;
range_expr->fetch_value_from(item_add);
}
- void next_row(Item_sum* item)
+ void next_row()
{
if (end_of_partition)
return;
@@ -1013,24 +1134,42 @@ public:
(prev_row + n) >= R
We need to check about the current row.
*/
- if (cursor.restore_last_row())
- {
- if (order_direction * range_expr->cmp_read_only() < 0)
- return;
- item->add();
- }
- walk_till_non_peer(item);
+ walk_till_non_peer();
+ }
+
+ bool is_outside_computation_bounds() const
+ {
+ if (!added_values)
+ return true;
+ return false;
+ }
+
+ ha_rows get_curr_rownum() const
+ {
+ if (end_of_partition)
+ return cursor.get_rownum(); // Cursor does not pass over partition bound.
+ else
+ return cursor.get_rownum() - 1; // Cursor is placed on first non peer.
}
private:
- void walk_till_non_peer(Item_sum* item)
+ bool added_values;
+
+ void walk_till_non_peer()
{
+ cursor.fetch();
+ // Current row is not a peer.
+ if (order_direction * range_expr->cmp_read_only() < 0)
+ return;
+
+ add_value_to_items(); // Add current row.
+ added_values= true;
int res;
- while (!(res= cursor.get_next()))
+ while (!(res= cursor.next()))
{
if (order_direction * range_expr->cmp_read_only() < 0)
break;
- item->add();
+ add_value_to_items();
}
if (res)
end_of_partition= true;
@@ -1043,11 +1182,11 @@ private:
...
| peer1
| peer2 <----- current_row
- | peer3
+ | peer3
+-peer4 <----- the cursor points here. peer4 itself is included.
nonpeer1
nonpeer2
-
+
This bound moves in front of the current_row. It should be a the first row
that is still a peer of the current row.
*/
@@ -1060,39 +1199,39 @@ class Frame_range_current_row_bottom: public Frame_cursor
bool dont_move;
public:
- void init(THD *thd, READ_RECORD *info,
- SQL_I_List<ORDER> *partition_list,
- SQL_I_List<ORDER> *order_list)
+ Frame_range_current_row_bottom(THD *thd,
+ SQL_I_List<ORDER> *partition_list,
+ SQL_I_List<ORDER> *order_list) :
+ cursor(thd, partition_list), peer_tracker(thd, order_list)
{
- cursor.init(thd, info, partition_list);
- peer_tracker.init(thd, order_list);
}
- void pre_next_partition(ha_rows rownum, Item_sum* item)
+ void init(READ_RECORD *info)
+ {
+ cursor.init(info);
+ peer_tracker.init();
+ }
+
+ void pre_next_partition(ha_rows rownum)
{
// Save the value of the current_row
peer_tracker.check_if_next_group();
cursor.on_next_partition(rownum);
- if (rownum != 0)
- {
- // Add the current row now because our cursor has already seen it
- item->add();
- }
+ // Add the current row now because our cursor has already seen it
+ add_value_to_items();
}
- void next_partition(ha_rows rownum, Item_sum* item)
+ void next_partition(ha_rows rownum)
{
- walk_till_non_peer(item);
+ walk_till_non_peer();
}
- void pre_next_row(Item_sum* item)
+ void pre_next_row()
{
dont_move= !peer_tracker.check_if_next_group();
- if (!dont_move)
- item->add();
}
- void next_row(Item_sum* item)
+ void next_row()
{
// Check if our cursor is pointing at a peer of the current row.
// If not, move forward until that becomes true
@@ -1104,21 +1243,30 @@ public:
*/
return;
}
- walk_till_non_peer(item);
+ walk_till_non_peer();
+ }
+
+ ha_rows get_curr_rownum() const
+ {
+ return cursor.get_rownum();
}
private:
- void walk_till_non_peer(Item_sum* item)
+ void walk_till_non_peer()
{
/*
Walk forward until we've met first row that's not a peer of the current
row
*/
- while (!cursor.get_next())
+ while (!cursor.next())
{
if (peer_tracker.compare_with_cache())
+ {
+ cursor.prev(); // Move to our peer.
break;
- item->add();
+ }
+
+ add_value_to_items();
}
}
};
@@ -1148,33 +1296,38 @@ class Frame_range_current_row_top : public Frame_cursor
bool move;
public:
- void init(THD *thd, READ_RECORD *info,
- SQL_I_List<ORDER> *partition_list,
- SQL_I_List<ORDER> *order_list)
+ Frame_range_current_row_top(THD *thd,
+ SQL_I_List<ORDER> *partition_list,
+ SQL_I_List<ORDER> *order_list) :
+ bound_tracker(thd, partition_list), cursor(), peer_tracker(thd, order_list),
+ move(false)
+ {}
+
+ void init(READ_RECORD *info)
{
- bound_tracker.init(thd, partition_list);
+ bound_tracker.init();
cursor.init(info);
- peer_tracker.init(thd, order_list);
+ peer_tracker.init();
}
- void pre_next_partition(ha_rows rownum, Item_sum* item)
+ void pre_next_partition(ha_rows rownum)
{
// Fetch the value from the first row
peer_tracker.check_if_next_group();
- cursor.move_to(rownum+1);
+ cursor.move_to(rownum);
}
- void next_partition(ha_rows rownum, Item_sum* item) {}
+ void next_partition(ha_rows rownum) {}
- void pre_next_row(Item_sum* item)
+ void pre_next_row()
{
// Check if the new current_row is a peer of the row that our cursor is
// pointing to.
move= peer_tracker.check_if_next_group();
}
- void next_row(Item_sum* item)
+ void next_row()
{
if (move)
{
@@ -1182,25 +1335,30 @@ public:
Our cursor is pointing at the first row that was a peer of the previous
current row. Or, it was the first row in the partition.
*/
- if (cursor.restore_last_row())
- {
- // todo: need the following check ?
- if (!peer_tracker.compare_with_cache())
- return;
- item->remove();
- }
+ if (cursor.fetch())
+ return;
+
+ // todo: need the following check ?
+ if (!peer_tracker.compare_with_cache())
+ return;
+ remove_value_from_items();
do
{
- if (cursor.get_next())
+ if (cursor.next() || cursor.fetch())
return;
if (!peer_tracker.compare_with_cache())
return;
- item->remove();
+ remove_value_from_items();
}
while (1);
}
}
+
+ ha_rows get_curr_rownum() const
+ {
+ return cursor.get_rownum();
+ }
};
@@ -1214,18 +1372,35 @@ public:
class Frame_unbounded_preceding : public Frame_cursor
{
public:
- void next_partition(ha_rows rownum, Item_sum* item)
+ Frame_unbounded_preceding(THD *thd,
+ SQL_I_List<ORDER> *partition_list,
+ SQL_I_List<ORDER> *order_list)
+ {}
+
+ void init(READ_RECORD *info) {}
+
+ void next_partition(ha_rows rownum)
{
/*
- UNBOUNDED PRECEDING frame end just stays on the first row.
- We are top of the frame, so we don't need to update the sum function.
+ UNBOUNDED PRECEDING frame end just stays on the first row of the
+ partition. We are top of the frame, so we don't need to update the sum
+ function.
*/
+ curr_rownum= rownum;
}
- void next_row(Item_sum* item)
+ void next_row()
{
/* Do nothing, UNBOUNDED PRECEDING frame end doesn't move. */
}
+
+ ha_rows get_curr_rownum() const
+ {
+ return curr_rownum;
+ }
+
+private:
+ ha_rows curr_rownum;
};
@@ -1239,66 +1414,78 @@ protected:
Partition_read_cursor cursor;
public:
- void init(THD *thd, READ_RECORD *info, SQL_I_List<ORDER> *partition_list,
- SQL_I_List<ORDER> *order_list)
+ Frame_unbounded_following(THD *thd,
+ SQL_I_List<ORDER> *partition_list,
+ SQL_I_List<ORDER> *order_list) :
+ cursor(thd, partition_list) {}
+
+ void init(READ_RECORD *info)
{
- cursor.init(thd, info, partition_list);
+ cursor.init(info);
}
- void pre_next_partition(ha_rows rownum, Item_sum* item)
+ void pre_next_partition(ha_rows rownum)
{
cursor.on_next_partition(rownum);
}
- void next_partition(ha_rows rownum, Item_sum* item)
+ void next_partition(ha_rows rownum)
{
- if (!rownum)
- {
- /* Read the first row */
- if (cursor.get_next())
- return;
- }
- item->add();
+ /* Activate the first row */
+ cursor.fetch();
+ add_value_to_items();
/* Walk to the end of the partition, updating the SUM function */
- while (!cursor.get_next())
+ while (!cursor.next())
{
- item->add();
+ add_value_to_items();
}
}
- void next_row(Item_sum* item)
+ void next_row()
{
/* Do nothing, UNBOUNDED FOLLOWING frame end doesn't move */
}
+
+ ha_rows get_curr_rownum() const
+ {
+ return cursor.get_rownum();
+ }
};
class Frame_unbounded_following_set_count : public Frame_unbounded_following
{
public:
- // pre_next_partition is inherited
+ Frame_unbounded_following_set_count(
+ THD *thd,
+ SQL_I_List<ORDER> *partition_list, SQL_I_List<ORDER> *order_list) :
+ Frame_unbounded_following(thd, partition_list, order_list) {}
- void next_partition(ha_rows rownum, Item_sum* item)
+ void next_partition(ha_rows rownum)
{
ha_rows num_rows_in_partition= 0;
- if (!rownum)
- {
- /* Read the first row */
- if (cursor.get_next())
- return;
- }
+ if (cursor.fetch())
+ return;
num_rows_in_partition++;
/* Walk to the end of the partition, find how many rows there are. */
- while (!cursor.get_next())
- {
+ while (!cursor.next())
num_rows_in_partition++;
+
+ List_iterator_fast<Item_sum> it(sum_functions);
+ Item_sum* item;
+ while ((item= it++))
+ {
+ Item_sum_window_with_row_count* item_with_row_count =
+ static_cast<Item_sum_window_with_row_count *>(item);
+ item_with_row_count->set_row_count(num_rows_in_partition);
}
+ }
- Item_sum_window_with_row_count* item_with_row_count =
- static_cast<Item_sum_window_with_row_count *>(item);
- item_with_row_count->set_row_count(num_rows_in_partition);
+ ha_rows get_curr_rownum() const
+ {
+ return cursor.get_rownum();
}
};
@@ -1316,28 +1503,28 @@ class Frame_n_rows_preceding : public Frame_cursor
const ha_rows n_rows;
/* Number of rows that we need to skip before our cursor starts moving */
- ha_rows n_rows_to_skip;
+ ha_rows n_rows_behind;
Table_read_cursor cursor;
public:
Frame_n_rows_preceding(bool is_top_bound_arg, ha_rows n_rows_arg) :
- is_top_bound(is_top_bound_arg), n_rows(n_rows_arg)
+ is_top_bound(is_top_bound_arg), n_rows(n_rows_arg), n_rows_behind(0)
{}
- void init(THD *thd, READ_RECORD *info, SQL_I_List<ORDER> *partition_list,
- SQL_I_List<ORDER> *order_list)
+ void init(READ_RECORD *info)
{
cursor.init(info);
}
- void next_partition(ha_rows rownum, Item_sum* item)
+ void next_partition(ha_rows rownum)
{
/*
Position our cursor to point at the first row in the new partition
(for rownum=0, it is already there, otherwise, it lags behind)
*/
- if (rownum != 0)
- cursor.move_to(rownum);
+ cursor.move_to(rownum);
+ /* Cursor is in the same spot as current row. */
+ n_rows_behind= 0;
/*
Suppose the bound is ROWS 2 PRECEDING, and current row is row#n:
@@ -1351,32 +1538,65 @@ public:
- bottom bound should add row #(n-2) into the window function
- top bound should remove row (#n-3) from the window function.
*/
- n_rows_to_skip= n_rows + (is_top_bound? 1:0) - 1;
+ move_cursor_if_possible();
- /* Bottom bound "ROWS 0 PRECEDING" is a special case: */
- if (n_rows_to_skip == ha_rows(-1))
- {
- cursor.get_next();
- item->add();
- n_rows_to_skip= 0;
- }
}
- void next_row(Item_sum* item)
+ void next_row()
+ {
+ n_rows_behind++;
+ move_cursor_if_possible();
+ }
+
+ bool is_outside_computation_bounds() const
{
- if (n_rows_to_skip)
+ /* As a bottom boundary, rows have not yet been added. */
+ if (!is_top_bound && n_rows - n_rows_behind)
+ return true;
+ return false;
+ }
+
+ ha_rows get_curr_rownum() const
+ {
+ return cursor.get_rownum();
+ }
+
+private:
+ void move_cursor_if_possible()
+ {
+ int rows_difference= n_rows - n_rows_behind;
+ if (rows_difference > 0) /* We still have to wait. */
+ return;
+
+ /* The cursor points to the first row in the frame. */
+ if (rows_difference == 0)
{
- n_rows_to_skip--;
+ if (!is_top_bound)
+ {
+ cursor.fetch();
+ add_value_to_items();
+ }
+ /* For top bound we don't have to remove anything as nothing was added. */
return;
}
- if (cursor.get_next())
- return; // this is not expected to happen.
+ /* We need to catch up by one row. */
+ DBUG_ASSERT(rows_difference == -1);
- if (is_top_bound) // this is frame start endpoint
- item->remove();
+ if (is_top_bound)
+ {
+ cursor.fetch();
+ remove_value_from_items();
+ cursor.next();
+ }
else
- item->add();
+ {
+ cursor.next();
+ cursor.fetch();
+ add_value_to_items();
+ }
+ /* We've advanced one row. We are no longer behind. */
+ n_rows_behind--;
}
};
@@ -1391,17 +1611,35 @@ public:
class Frame_rows_current_row_bottom : public Frame_cursor
{
public:
- void pre_next_partition(ha_rows rownum, Item_sum* item)
+
+ Frame_rows_current_row_bottom() : curr_rownum(0) {}
+
+ void pre_next_partition(ha_rows rownum)
{
- item->add();
+ add_value_to_items();
+ curr_rownum= rownum;
}
- void next_partition(ha_rows rownum, Item_sum* item) {}
- void pre_next_row(Item_sum* item)
+
+ void next_partition(ha_rows rownum) {}
+
+ void pre_next_row()
{
/* Temp table's current row is current_row. Add it to the window func */
- item->add();
+ add_value_to_items();
}
- void next_row(Item_sum* item) {};
+
+ void next_row()
+ {
+ curr_rownum++;
+ };
+
+ ha_rows get_curr_rownum() const
+ {
+ return curr_rownum;
+ }
+
+private:
+ ha_rows curr_rownum;
};
@@ -1443,69 +1681,218 @@ class Frame_n_rows_following : public Frame_cursor
Partition_read_cursor cursor;
bool at_partition_end;
public:
- Frame_n_rows_following(bool is_top_bound_arg, ha_rows n_rows_arg) :
- is_top_bound(is_top_bound_arg), n_rows(n_rows_arg)
+ Frame_n_rows_following(THD *thd,
+ SQL_I_List<ORDER> *partition_list,
+ SQL_I_List<ORDER> *order_list,
+ bool is_top_bound_arg, ha_rows n_rows_arg) :
+ is_top_bound(is_top_bound_arg), n_rows(n_rows_arg),
+ cursor(thd, partition_list)
{
DBUG_ASSERT(n_rows > 0);
}
- void init(THD *thd, READ_RECORD *info, SQL_I_List<ORDER> *partition_list,
- SQL_I_List<ORDER> *order_list)
+ void init(READ_RECORD *info)
{
- cursor.init(thd, info, partition_list);
+ cursor.init(info);
at_partition_end= false;
}
- void pre_next_partition(ha_rows rownum, Item_sum* item)
+ void pre_next_partition(ha_rows rownum)
{
at_partition_end= false;
cursor.on_next_partition(rownum);
+ }
- if (rownum != 0)
- {
- // This is only needed for "FOLLOWING 1". It is one row behind
- cursor.move_to(rownum+1);
+ /* Move our cursor to be n_rows ahead. */
+ void next_partition(ha_rows rownum)
+ {
+ if (is_top_bound)
+ next_part_top(rownum);
+ else
+ next_part_bottom(rownum);
+ }
- // Current row points at the first row in the partition
- if (is_top_bound) // this is frame top endpoint
- item->remove();
- else
- item->add();
+ void next_row()
+ {
+ if (is_top_bound)
+ next_row_top();
+ else
+ next_row_bottom();
+ }
+
+ bool is_outside_computation_bounds() const
+ {
+ /*
+ The top bound can go over the current partition. In this case,
+ the sum function has 0 values added to it.
+ */
+ if (at_partition_end && is_top_bound)
+ return true;
+ return false;
+ }
+
+ ha_rows get_curr_rownum() const
+ {
+ return cursor.get_rownum();
+ }
+
+private:
+ void next_part_top(ha_rows rownum)
+ {
+ for (ha_rows i= 0; i < n_rows; i++)
+ {
+ if (cursor.fetch())
+ break;
+ remove_value_from_items();
+ if (cursor.next())
+ at_partition_end= true;
}
}
- /* Move our cursor to be n_rows ahead. */
- void next_partition(ha_rows rownum, Item_sum* item)
+ void next_part_bottom(ha_rows rownum)
{
- ha_rows i_end= n_rows + ((rownum==0)?1:0)- is_top_bound;
- for (ha_rows i= 0; i < i_end; i++)
+ if (cursor.fetch())
+ return;
+ add_value_to_items();
+
+ for (ha_rows i= 0; i < n_rows; i++)
{
- if (next_row_intern(item))
+ if (cursor.next())
+ {
+ at_partition_end= true;
break;
+ }
+ add_value_to_items();
+ }
+ return;
+ }
+
+ void next_row_top()
+ {
+ if (cursor.fetch()) // PART END OR FAILURE
+ {
+ at_partition_end= true;
+ return;
+ }
+ remove_value_from_items();
+ if (cursor.next())
+ {
+ at_partition_end= true;
+ return;
}
}
- void next_row(Item_sum* item)
+ void next_row_bottom()
{
if (at_partition_end)
return;
- next_row_intern(item);
+
+ if (cursor.next())
+ {
+ at_partition_end= true;
+ return;
+ }
+
+ add_value_to_items();
+
+ }
+};
+
+/*
+ A cursor that performs a table scan between two indices. The indices
+ are provided by the two cursors representing the top and bottom bound
+ of the window function's frame definition.
+
+ Each scan clears the sum function.
+
+ NOTE:
+ The cursor does not alter the top and bottom cursors.
+ This type of cursor is expensive computational wise. This is only to be
+ used when the sum functions do not support removal.
+*/
+class Frame_scan_cursor : public Frame_cursor
+{
+public:
+ Frame_scan_cursor(const Frame_cursor &top_bound,
+ const Frame_cursor &bottom_bound) :
+ top_bound(top_bound), bottom_bound(bottom_bound) {}
+
+ void init(READ_RECORD *info)
+ {
+ cursor.init(info);
+ }
+
+ void pre_next_partition(ha_rows rownum)
+ {
+ /* TODO(cvicentiu) Sum functions get cleared on next partition anyway during
+ the window function computation algorithm. Either perform this only in
+ cursors, or remove it from pre_next_partition.
+ */
+ curr_rownum= rownum;
+ clear_sum_functions();
+ }
+
+ void next_partition(ha_rows rownum)
+ {
+ compute_values_for_current_row();
+ }
+
+ void pre_next_row()
+ {
+ clear_sum_functions();
+ }
+
+ void next_row()
+ {
+ curr_rownum++;
+ compute_values_for_current_row();
+ }
+
+ ha_rows get_curr_rownum() const
+ {
+ return curr_rownum;
}
private:
- bool next_row_intern(Item_sum *item)
+ const Frame_cursor &top_bound;
+ const Frame_cursor &bottom_bound;
+ Table_read_cursor cursor;
+ ha_rows curr_rownum;
+
+ /* Clear all sum functions handled by this cursor. */
+ void clear_sum_functions()
{
- if (!cursor.get_next())
+ List_iterator_fast<Item_sum> iter_sum_func(sum_functions);
+ Item_sum *sum_func;
+ while ((sum_func= iter_sum_func++))
{
- if (is_top_bound) // this is frame start endpoint
- item->remove();
- else
- item->add();
+ sum_func->clear();
+ }
+ }
+
+ /* Scan the rows between the top bound and bottom bound. Add all the values
+ between them, top bound row and bottom bound row inclusive. */
+ void compute_values_for_current_row()
+ {
+ if (top_bound.is_outside_computation_bounds() ||
+ bottom_bound.is_outside_computation_bounds())
+ return;
+
+ ha_rows start_rownum= top_bound.get_curr_rownum();
+ ha_rows bottom_rownum= bottom_bound.get_curr_rownum();
+ DBUG_PRINT("info", ("COMPUTING (%llu %llu)", start_rownum, bottom_rownum));
+
+ cursor.move_to(start_rownum);
+
+ for (ha_rows idx= start_rownum; idx <= bottom_rownum; idx++)
+ {
+ if (cursor.fetch()) //EOF
+ break;
+ add_value_to_items();
+ if (cursor.next()) // EOF
+ break;
}
- else
- at_partition_end= true;
- return at_partition_end;
}
};
@@ -1513,8 +1900,9 @@ private:
/*
Get a Frame_cursor for a frame bound. This is a "factory function".
*/
-Frame_cursor *get_frame_cursor(Window_frame *frame, bool is_top_bound)
+Frame_cursor *get_frame_cursor(THD *thd, Window_spec *spec, bool is_top_bound)
{
+ Window_frame *frame= spec->window_frame;
if (!frame)
{
/*
@@ -1536,9 +1924,13 @@ Frame_cursor *get_frame_cursor(Window_frame *frame, bool is_top_bound)
so again the same frame bounds can be used.
*/
if (is_top_bound)
- return new Frame_unbounded_preceding;
+ return new Frame_unbounded_preceding(thd,
+ spec->partition_list,
+ spec->order_list);
else
- return new Frame_range_current_row_bottom;
+ return new Frame_range_current_row_bottom(thd,
+ spec->partition_list,
+ spec->order_list);
}
Window_frame_bound *bound= is_top_bound? frame->top_bound :
@@ -1554,9 +1946,13 @@ Frame_cursor *get_frame_cursor(Window_frame *frame, bool is_top_bound)
{
/* The following serve both RANGE and ROWS: */
if (is_preceding)
- return new Frame_unbounded_preceding;
- else
- return new Frame_unbounded_following;
+ return new Frame_unbounded_preceding(thd,
+ spec->partition_list,
+ spec->order_list);
+
+ return new Frame_unbounded_following(thd,
+ spec->partition_list,
+ spec->order_list);
}
if (frame->units == Window_frame::UNITS_ROWS)
@@ -1567,15 +1963,21 @@ Frame_cursor *get_frame_cursor(Window_frame *frame, bool is_top_bound)
DBUG_ASSERT((longlong) n_rows >= 0);
if (is_preceding)
return new Frame_n_rows_preceding(is_top_bound, n_rows);
- else
- return new Frame_n_rows_following(is_top_bound, n_rows);
+
+ return new Frame_n_rows_following(
+ thd, spec->partition_list, spec->order_list,
+ is_top_bound, n_rows);
}
else
{
if (is_top_bound)
- return new Frame_range_n_top(is_preceding, bound->offset);
- else
- return new Frame_range_n_bottom(is_preceding, bound->offset);
+ return new Frame_range_n_top(
+ thd, spec->partition_list, spec->order_list,
+ is_preceding, bound->offset);
+
+ return new Frame_range_n_bottom(thd,
+ spec->partition_list, spec->order_list,
+ is_preceding, bound->offset);
}
}
@@ -1585,67 +1987,179 @@ Frame_cursor *get_frame_cursor(Window_frame *frame, bool is_top_bound)
{
if (is_top_bound)
return new Frame_rows_current_row_top;
- else
- return new Frame_rows_current_row_bottom;
+
+ return new Frame_rows_current_row_bottom;
}
else
{
if (is_top_bound)
- return new Frame_range_current_row_top;
- else
- return new Frame_range_current_row_bottom;
+ return new Frame_range_current_row_top(
+ thd, spec->partition_list, spec->order_list);
+
+ return new Frame_range_current_row_bottom(
+ thd, spec->partition_list, spec->order_list);
}
}
return NULL;
}
-void add_extra_frame_cursors(List<Frame_cursor> *cursors,
- const Item_sum *window_func)
+void add_extra_frame_cursors(THD *thd, Cursor_manager *cursor_manager,
+ Item_window_func *window_func)
{
- switch (window_func->sum_func())
+ Window_spec *spec= window_func->window_spec;
+ Item_sum *item_sum= window_func->window_func();
+ Frame_cursor *fc;
+ switch (item_sum->sum_func())
{
case Item_sum::CUME_DIST_FUNC:
- cursors->push_back(new Frame_unbounded_preceding);
- cursors->push_back(new Frame_range_current_row_bottom);
+ fc= new Frame_unbounded_preceding(thd,
+ spec->partition_list,
+ spec->order_list);
+ fc->add_sum_func(item_sum);
+ cursor_manager->add_cursor(fc);
+ fc= new Frame_range_current_row_bottom(thd,
+ spec->partition_list,
+ spec->order_list);
+ fc->add_sum_func(item_sum);
+ cursor_manager->add_cursor(fc);
break;
default:
- cursors->push_back(new Frame_unbounded_preceding);
- cursors->push_back(new Frame_rows_current_row_bottom);
+ fc= new Frame_unbounded_preceding(
+ thd, spec->partition_list, spec->order_list);
+ fc->add_sum_func(item_sum);
+ cursor_manager->add_cursor(fc);
+
+ fc= new Frame_rows_current_row_bottom;
+ fc->add_sum_func(item_sum);
+ cursor_manager->add_cursor(fc);
}
}
-void get_window_func_required_cursors(
- List<Frame_cursor> *result, const Item_window_func* item_win)
+
+static bool is_computed_with_remove(Item_sum::Sumfunctype sum_func)
+{
+ switch (sum_func)
+ {
+ case Item_sum::CUME_DIST_FUNC:
+ case Item_sum::ROW_NUMBER_FUNC:
+ case Item_sum::RANK_FUNC:
+ case Item_sum::DENSE_RANK_FUNC:
+ case Item_sum::NTILE_FUNC:
+ return false;
+ default:
+ return true;
+ }
+}
+/*
+ Create required frame cursors for the list of window functions.
+ Register all functions to their appropriate cursors.
+ If the window functions share the same frame specification,
+ those window functions will be registered to the same cursor.
+*/
+void get_window_functions_required_cursors(
+ THD *thd,
+ List<Item_window_func>& window_functions,
+ List<Cursor_manager> *cursor_managers)
{
- if (item_win->requires_partition_size())
- result->push_back(new Frame_unbounded_following_set_count);
+ List_iterator_fast<Item_window_func> it(window_functions);
+ Item_window_func* item_win_func;
+ Item_sum *sum_func;
+ while ((item_win_func= it++))
+ {
+ Cursor_manager *cursor_manager = new Cursor_manager();
+ sum_func = item_win_func->window_func();
+ Frame_cursor *fc;
+ /*
+ Some window functions require the partition size for computing values.
+ Add a cursor that retrieves it as the first one in the list if necessary.
+ */
+ if (item_win_func->requires_partition_size())
+ {
+ fc= new Frame_unbounded_following_set_count(thd,
+ item_win_func->window_spec->partition_list,
+ item_win_func->window_spec->order_list);
+ fc->add_sum_func(sum_func);
+ cursor_manager->add_cursor(fc);
+ }
- /*
- If it is not a regular window function that follows frame specifications,
- specific cursors are required.
- */
- if (item_win->is_frame_prohibited())
+ /*
+ If it is not a regular window function that follows frame specifications,
+ specific cursors are required. ROW_NUM, RANK, NTILE and others follow
+ such rules. Check is_frame_prohibited check for the full list.
+ */
+ if (item_win_func->is_frame_prohibited())
+ {
+ add_extra_frame_cursors(thd, cursor_manager, item_win_func);
+ cursor_managers->push_back(cursor_manager);
+ continue;
+ }
+
+ Frame_cursor *frame_bottom= get_frame_cursor(thd,
+ item_win_func->window_spec, false);
+ Frame_cursor *frame_top= get_frame_cursor(thd,
+ item_win_func->window_spec, true);
+
+ frame_bottom->add_sum_func(sum_func);
+ frame_top->add_sum_func(sum_func);
+
+ /*
+ The order of these cursors is important. A sum function
+ must first add values (via frame_bottom) then remove them via
+ frame_top. Removing items first doesn't make sense in the case of all
+ window functions.
+ */
+ cursor_manager->add_cursor(frame_bottom);
+ cursor_manager->add_cursor(frame_top);
+ if (is_computed_with_remove(sum_func->sum_func()) &&
+ !sum_func->supports_removal())
+ {
+ frame_bottom->set_no_action();
+ frame_top->set_no_action();
+ Frame_cursor *scan_cursor= new Frame_scan_cursor(*frame_top,
+ *frame_bottom);
+ scan_cursor->add_sum_func(sum_func);
+ cursor_manager->add_cursor(scan_cursor);
+
+ }
+ cursor_managers->push_back(cursor_manager);
+ }
+}
+
+/**
+ Helper function that takes a list of window functions and writes
+ their values in the current table record.
+*/
+static
+bool save_window_function_values(List<Item_window_func>& window_functions,
+ TABLE *tbl, uchar *rowid_buf)
+{
+ List_iterator_fast<Item_window_func> iter(window_functions);
+ tbl->file->ha_rnd_pos(tbl->record[0], rowid_buf);
+ store_record(tbl, record[1]);
+ while (Item_window_func *item_win= iter++)
{
- add_extra_frame_cursors(result, item_win->window_func());
- return;
+ int err;
+ item_win->save_in_field(item_win->result_field, true);
+ // TODO check if this can be placed outside the loop.
+ err= tbl->file->ha_update_row(tbl->record[1], tbl->record[0]);
+ if (err && err != HA_ERR_RECORD_IS_THE_SAME)
+ return true;
}
- /* A regular window function follows the frame specification. */
- result->push_back(get_frame_cursor(item_win->window_spec->window_frame,
- false));
- result->push_back(get_frame_cursor(item_win->window_spec->window_frame,
- true));
+ return false;
}
/*
+ TODO(cvicentiu) update this comment to reflect the new execution.
+
Streamed window function computation with window frames.
We make a single pass over the ordered temp.table, but we're using three
- cursors:
+ cursors:
- current row - the row that we're computing window func value for)
- start_bound - the start of the frame
- bottom_bound - the end of the frame
-
+
All three cursors move together.
@todo
@@ -1655,7 +2169,7 @@ void get_window_func_required_cursors(
@detail
ROWS BETWEEN 3 PRECEDING -- frame start
AND 3 FOLLOWING -- frame end
-
+
/------ frame end (aka BOTTOM)
Dataset start |
--------====*=======[*]========*========-------->> dataset end
@@ -1663,7 +2177,7 @@ void get_window_func_required_cursors(
| +-------- current row
|
\-------- frame start ("TOP")
-
+
- frame_end moves forward and adds rows into the aggregate function.
- frame_start follows behind and removes rows from the aggregate function.
- current_row is the row where the value of aggregate function is stored.
@@ -1672,97 +2186,90 @@ void get_window_func_required_cursors(
condition (Others can catch up by counting rows?)
*/
-
-bool compute_window_func_with_frames(Item_window_func *item_win,
- TABLE *tbl, READ_RECORD *info)
+bool compute_window_func(THD *thd,
+ List<Item_window_func>& window_functions,
+ List<Cursor_manager>& cursor_managers,
+ TABLE *tbl,
+ SORT_INFO *filesort_result)
{
- THD *thd= tbl->in_use;
- int err= 0;
+ List_iterator_fast<Item_window_func> iter_win_funcs(window_functions);
+ List_iterator_fast<Cursor_manager> iter_cursor_managers(cursor_managers);
+ uint err;
- Item_sum *sum_func= item_win->window_func();
- /* This algorithm doesn't support DISTINCT aggregator */
- sum_func->set_aggregator(Aggregator::SIMPLE_AGGREGATOR);
+ READ_RECORD info;
- List<Frame_cursor> cursors;
- get_window_func_required_cursors(&cursors, item_win);
+ if (init_read_record(&info, current_thd, tbl, NULL/*select*/, filesort_result,
+ 0, 1, FALSE))
+ return true;
- List_iterator_fast<Frame_cursor> it(cursors);
- Frame_cursor *c;
- while((c= it++))
+ Cursor_manager *cursor_manager;
+ while ((cursor_manager= iter_cursor_managers++))
+ cursor_manager->initialize_cursors(&info);
+
+ /* One partition tracker for each window function. */
+ List<Group_bound_tracker> partition_trackers;
+ Item_window_func *win_func;
+ while ((win_func= iter_win_funcs++))
{
- c->init(thd, info, item_win->window_spec->partition_list,
- item_win->window_spec->order_list);
+ Group_bound_tracker *tracker= new Group_bound_tracker(thd,
+ win_func->window_spec->partition_list);
+ // TODO(cvicentiu) This should be removed and placed in constructor.
+ tracker->init();
+ partition_trackers.push_back(tracker);
}
- bool is_error= false;
+ List_iterator_fast<Group_bound_tracker> iter_part_trackers(partition_trackers);
ha_rows rownum= 0;
uchar *rowid_buf= (uchar*) my_malloc(tbl->file->ref_length, MYF(0));
while (true)
{
- /* Move the current_row */
- if ((err=info->read_record(info)))
- {
- break; /* End of file */
- }
- bool partition_changed= item_win->check_if_partition_changed();
+ if ((err= info.read_record(&info)))
+ break; // End of file.
+ /* Remember current row so that we can restore it before computing
+ each window function. */
tbl->file->position(tbl->record[0]);
memcpy(rowid_buf, tbl->file->ref, tbl->file->ref_length);
- if (partition_changed || (rownum == 0))
- {
- sum_func->clear();
- /*
- pre_XXX functions assume that tbl->record[0] contains current_row, and
- they may not change it.
- */
- it.rewind();
- while ((c= it++))
- c->pre_next_partition(rownum, sum_func);
- /*
- We move bottom_bound first, because we want rows to be added into the
- aggregate before top_bound attempts to remove them.
- */
- it.rewind();
- while ((c= it++))
- c->next_partition(rownum, sum_func);
- }
- else
- {
- /* Again, both pre_XXX function can find current_row in tbl->record[0] */
- it.rewind();
- while ((c= it++))
- c->pre_next_row(sum_func);
-
- /* These make no assumptions about tbl->record[0] and may change it */
- it.rewind();
- while ((c= it++))
- c->next_row(sum_func);
- }
- rownum++;
+ iter_win_funcs.rewind();
+ iter_part_trackers.rewind();
+ iter_cursor_managers.rewind();
- /*
- Frame cursors may have made tbl->record[0] to point to some record other
- than current_row. This applies to tbl->file's internal state, too.
- Fix this by reading the current row again.
- */
- tbl->file->ha_rnd_pos(tbl->record[0], rowid_buf);
- store_record(tbl,record[1]);
- item_win->save_in_field(item_win->result_field, true);
- err= tbl->file->ha_update_row(tbl->record[1], tbl->record[0]);
- if (err && err != HA_ERR_RECORD_IS_THE_SAME)
+ Group_bound_tracker *tracker;
+ while ((win_func= iter_win_funcs++) &&
+ (tracker= iter_part_trackers++) &&
+ (cursor_manager= iter_cursor_managers++))
{
- is_error= true;
- break;
+ if (tracker->check_if_next_group() || (rownum == 0))
+ {
+ /* TODO(cvicentiu)
+ Clearing window functions should happen through cursors. */
+ win_func->window_func()->clear();
+ cursor_manager->notify_cursors_partition_changed(rownum);
+ }
+ else
+ {
+ cursor_manager->notify_cursors_next_row();
+ }
+ /* Return to current row after notifying cursors for each window
+ function. */
+ tbl->file->ha_rnd_pos(tbl->record[0], rowid_buf);
}
+
+ /* We now have computed values for each window function. They can now
+ be saved in the current row. */
+ save_window_function_values(window_functions, tbl, rowid_buf);
+
+ rownum++;
}
my_free(rowid_buf);
- cursors.delete_elements();
- return is_error? true: false;
-}
+ partition_trackers.delete_elements();
+ end_read_record(&info);
+ return false;
+}
/* Make a list that is a concation of two lists of ORDER elements */
@@ -1799,69 +2306,62 @@ static ORDER* concat_order_lists(MEM_ROOT *mem_root, ORDER *list1, ORDER *list2)
return res;
}
-
-bool Window_func_runner::setup(THD *thd)
+bool Window_func_runner::add_function_to_run(Item_window_func *win_func)
{
- win_func->setup_partition_border_check(thd);
+
+ Item_sum *sum_func= win_func->window_func();
+ sum_func->setup_window_func(current_thd, win_func->window_spec);
Item_sum::Sumfunctype type= win_func->window_func()->sum_func();
- switch (type)
+
+ switch (type)
{
- case Item_sum::ROW_NUMBER_FUNC:
- case Item_sum::RANK_FUNC:
- case Item_sum::DENSE_RANK_FUNC:
- {
- /*
- One-pass window function computation, walk through the rows and
- assign values.
- */
- compute_func= compute_window_func_values;
- break;
- }
- case Item_sum::COUNT_FUNC:
- case Item_sum::SUM_BIT_FUNC:
- case Item_sum::SUM_FUNC:
- case Item_sum::AVG_FUNC:
- case Item_sum::PERCENT_RANK_FUNC:
- case Item_sum::CUME_DIST_FUNC:
- case Item_sum::NTILE_FUNC:
- {
- /*
- Frame-aware window function computation. It does one pass, but
- uses three cursors -frame_start, current_row, and frame_end.
- */
- compute_func= compute_window_func_with_frames;
- break;
- }
- default:
- my_error(ER_NOT_SUPPORTED_YET, MYF(0), "This aggregate as window function");
+ /* Distinct is not yet supported. */
+ case Item_sum::GROUP_CONCAT_FUNC:
+ case Item_sum::SUM_DISTINCT_FUNC:
+ case Item_sum::AVG_DISTINCT_FUNC:
+ my_error(ER_NOT_SUPPORTED_YET, MYF(0),
+ "This aggregate as window function");
return true;
+ default:
+ break;
}
- return false;
+ return window_functions.push_back(win_func);
}
/*
Compute the value of window function for all rows.
*/
-bool Window_func_runner::exec(TABLE *tbl, SORT_INFO *filesort_result)
+bool Window_func_runner::exec(THD *thd, TABLE *tbl, SORT_INFO *filesort_result)
{
- THD *thd= current_thd;
- win_func->set_phase_to_computation();
-
- /* Go through the sorted array and compute the window function */
- READ_RECORD info;
-
- if (init_read_record(&info, thd, tbl, NULL/*select*/, filesort_result,
- 0, 1, FALSE))
- return true;
+ List_iterator_fast<Item_window_func> it(window_functions);
+ Item_window_func *win_func;
+ while ((win_func= it++))
+ {
+ win_func->set_phase_to_computation();
+ // TODO(cvicentiu) Setting the aggregator should probably be done during
+ // setup of Window_funcs_sort.
+ win_func->window_func()->set_aggregator(Aggregator::SIMPLE_AGGREGATOR);
+ }
+ it.rewind();
- bool is_error= compute_func(win_func, tbl, &info);
+ List<Cursor_manager> cursor_managers;
+ get_window_functions_required_cursors(thd, window_functions,
+ &cursor_managers);
- win_func->set_phase_to_retrieval();
+ /* Go through the sorted array and compute the window function */
+ bool is_error= compute_window_func(thd,
+ window_functions,
+ cursor_managers,
+ tbl, filesort_result);
+ while ((win_func= it++))
+ {
+ win_func->set_phase_to_retrieval();
+ }
- end_read_record(&info);
+ cursor_managers.delete_elements();
return is_error;
}
@@ -1872,21 +2372,15 @@ bool Window_funcs_sort::exec(JOIN *join)
THD *thd= join->thd;
JOIN_TAB *join_tab= &join->join_tab[join->top_join_tab_count];
+ /* Sort the table based on the most specific sorting criteria of
+ the window functions. */
if (create_sort_index(thd, join, join_tab, filesort))
return true;
TABLE *tbl= join_tab->table;
SORT_INFO *filesort_result= join_tab->filesort_result;
- bool is_error= false;
- List_iterator<Window_func_runner> it(runners);
- Window_func_runner *runner;
-
- while ((runner= it++))
- {
- if ((is_error= runner->exec(tbl, filesort_result)))
- break;
- }
+ bool is_error= runner.exec(thd, tbl, filesort_result);
delete join_tab->filesort_result;
join_tab->filesort_result= NULL;
@@ -1894,30 +2388,32 @@ bool Window_funcs_sort::exec(JOIN *join)
}
-bool Window_funcs_sort::setup(THD *thd, SQL_SELECT *sel,
- List_iterator<Item_window_func> &it)
+bool Window_funcs_sort::setup(THD *thd, SQL_SELECT *sel,
+ List_iterator<Item_window_func> &it)
{
Item_window_func *win_func= it.peek();
Item_window_func *prev_win_func;
+ /* The iterator should point to a valid function at the start of execution. */
+ DBUG_ASSERT(win_func);
do
{
- Window_func_runner *runner;
- if (!(runner= new Window_func_runner(win_func)) ||
- runner->setup(thd))
- {
+ if (runner.add_function_to_run(win_func))
return true;
- }
- runners.push_back(runner);
it++;
prev_win_func= win_func;
- } while ((win_func= it.peek()) && !(win_func->marker & SORTORDER_CHANGE_FLAG));
-
+ } while ((win_func= it.peek()) &&
+ !(win_func->marker & SORTORDER_CHANGE_FLAG));
+
/*
The sort criteria must be taken from the last win_func in the group of
- adjacent win_funcs that do not have SORTORDER_CHANGE_FLAG.
+ adjacent win_funcs that do not have SORTORDER_CHANGE_FLAG. This is
+ because the sort order must be the most specific sorting criteria defined
+ within the window function group. This ensures that we sort the table
+ in a way that the result is valid for all window functions belonging to
+ this Window_funcs_sort.
*/
- Window_spec *spec = prev_win_func->window_spec;
+ Window_spec *spec= prev_win_func->window_spec;
ORDER* sort_order= concat_order_lists(thd->mem_root,
spec->partition_list->first,
@@ -1932,8 +2428,8 @@ bool Window_funcs_sort::setup(THD *thd, SQL_SELECT *sel,
bool Window_funcs_computation::setup(THD *thd,
- List<Item_window_func> *window_funcs,
- JOIN_TAB *tab)
+ List<Item_window_func> *window_funcs,
+ JOIN_TAB *tab)
{
order_window_funcs_by_window_specs(window_funcs);
diff --git a/sql/sql_window.h b/sql/sql_window.h
index 54e39d827fe..c3847240e9a 100644
--- a/sql/sql_window.h
+++ b/sql/sql_window.h
@@ -154,9 +154,7 @@ int setup_windows(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables,
// Classes that make window functions computation a part of SELECT's query plan
//////////////////////////////////////////////////////////////////////////////
-typedef bool (*window_compute_func_t)(Item_window_func *item_win,
- TABLE *tbl, READ_RECORD *info);
-
+class Frame_cursor;
/*
This handles computation of one window function.
@@ -165,21 +163,17 @@ typedef bool (*window_compute_func_t)(Item_window_func *item_win,
class Window_func_runner : public Sql_alloc
{
- Item_window_func *win_func;
-
- /* The function to use for computation*/
- window_compute_func_t compute_func;
-
public:
- Window_func_runner(Item_window_func *win_func_arg) :
- win_func(win_func_arg)
- {}
+ /* Add the function to be computed during the execution pass */
+ bool add_function_to_run(Item_window_func *win_func);
- // Set things up. Create filesort structures, etc
- bool setup(THD *thd);
-
- // This sorts and runs the window function.
- bool exec(TABLE *tbl, SORT_INFO *filesort_result);
+ /* Compute and fill the fields in the table. */
+ bool exec(THD *thd, TABLE *tbl, SORT_INFO *filesort_result);
+
+private:
+ /* A list of window functions for which this Window_func_runner will compute
+ values during the execution phase. */
+ List<Item_window_func> window_functions;
};
@@ -191,21 +185,24 @@ public:
class Window_funcs_sort : public Sql_alloc
{
- List<Window_func_runner> runners;
-
- /* Window functions can be computed over this sorting */
- Filesort *filesort;
public:
bool setup(THD *thd, SQL_SELECT *sel, List_iterator<Item_window_func> &it);
bool exec(JOIN *join);
void cleanup() { delete filesort; }
friend class Window_funcs_computation;
+
+private:
+ Window_func_runner runner;
+
+ /* Window functions can be computed over this sorting */
+ Filesort *filesort;
};
struct st_join_table;
class Explain_aggr_window_funcs;
+
/*
This is a "window function computation phase": a single object of this class
takes care of computing all window functions in a SELECT.
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 9d7e735fc78..551a86e4a41 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -714,34 +714,6 @@ bool add_select_to_union_list(LEX *lex, bool is_union_distinct,
return FALSE;
}
-/**
- @brief Initializes a SELECT_LEX for a query within parentheses (aka
- braces).
-
- @return false if successful, true if an error was reported. In the latter
- case parsing should stop.
- */
-bool setup_select_in_parentheses(LEX *lex)
-{
- SELECT_LEX * sel= lex->current_select;
- /*
- if (sel->set_braces(1))
- {
- my_parse_error(lex->thd, ER_SYNTAX_ERROR);
- return TRUE;
- }
- */
- DBUG_ASSERT(sel->braces);
- if (sel->linkage == UNION_TYPE &&
- !sel->master_unit()->first_select()->braces &&
- sel->master_unit()->first_select()->linkage ==
- UNION_TYPE)
- {
- my_parse_error(lex->thd, ER_SYNTAX_ERROR);
- return TRUE;
- }
- return FALSE;
-}
static bool add_create_index_prepare(LEX *lex, Table_ident *table)
{
@@ -1000,6 +972,7 @@ Virtual_column_info *add_virtual_expression(THD *thd, const char *txt,
List<Item> *item_list;
List<Statement_information_item> *stmt_info_list;
List<String> *string_list;
+ List<LEX_STRING> *lex_str_list;
Statement_information_item *stmt_info_item;
String *string;
TABLE_LIST *table_list;
@@ -2081,6 +2054,8 @@ END_OF_INPUT
%type <lex_str_ptr> query_name
+%type <lex_str_list> opt_with_column_list
+
%%
@@ -5242,6 +5217,27 @@ opt_part_values:
part_info->part_type= LIST_PARTITION;
}
part_values_in {}
+ | DEFAULT
+ {
+ LEX *lex= Lex;
+ partition_info *part_info= lex->part_info;
+ if (! lex->is_partition_management())
+ {
+ if (part_info->part_type != LIST_PARTITION)
+ my_yyabort_error((ER_PARTITION_WRONG_VALUES_ERROR, MYF(0),
+ "LIST", "DEFAULT"));
+ }
+ else
+ part_info->part_type= LIST_PARTITION;
+ if (part_info->init_column_part(thd))
+ {
+ MYSQL_YYABORT;
+ }
+ if (part_info->add_max_value(thd))
+ {
+ MYSQL_YYABORT;
+ }
+ }
;
part_func_max:
@@ -6070,7 +6066,7 @@ key_def:
constraint_def:
opt_constraint check_constraint
{
- Lex->add_constraint(&$1, $2);
+ Lex->add_constraint(&$1, $2, FALSE);
}
;
@@ -7557,6 +7553,11 @@ alter_list_item:
{
Lex->alter_info.flags|= Alter_info::ALTER_ADD_CHECK_CONSTRAINT;
}
+ | ADD CONSTRAINT IF_SYM not EXISTS field_ident check_constraint
+ {
+ Lex->alter_info.flags|= Alter_info::ALTER_ADD_CHECK_CONSTRAINT;
+ Lex->add_constraint(&$6, $7, TRUE);
+ }
| CHANGE opt_column opt_if_exists_table_element field_ident
field_spec opt_place
{
@@ -8390,8 +8391,7 @@ select_paren:
SELECT_SYM select_options_and_item_list select_part3
opt_select_lock_type
{
- if (setup_select_in_parentheses(Lex))
- MYSQL_YYABORT;
+ DBUG_ASSERT(Lex->current_select->braces);
}
| '(' select_paren ')'
;
@@ -8407,8 +8407,7 @@ select_paren_union_query_term:
SELECT_SYM select_options_and_item_list select_part3_union_query_term
opt_select_lock_type
{
- if (setup_select_in_parentheses(Lex))
- MYSQL_YYABORT;
+ DBUG_ASSERT(Lex->current_select->braces);
}
| '(' select_paren_union_query_term ')'
;
@@ -8424,8 +8423,7 @@ select_paren_view:
SELECT_SYM select_options_and_item_list select_part3_view
opt_select_lock_type
{
- if (setup_select_in_parentheses(Lex))
- MYSQL_YYABORT;
+ DBUG_ASSERT(Lex->current_select->braces);
}
| '(' select_paren_view ')'
;
@@ -8441,8 +8439,7 @@ select_paren_derived:
opt_limit_clause
opt_select_lock_type
{
- if (setup_select_in_parentheses(Lex))
- MYSQL_YYABORT;
+ DBUG_ASSERT(Lex->current_select->braces);
$$= Lex->current_select->master_unit()->first_select();
}
| '(' select_paren_derived ')' { $$= $2; }
@@ -8642,12 +8639,14 @@ opt_select_lock_type:
| FOR_SYM UPDATE_SYM
{
LEX *lex=Lex;
+ lex->current_select->lock_type= TL_WRITE;
lex->current_select->set_lock_for_tables(TL_WRITE);
lex->safe_to_cache_query=0;
}
| LOCK_SYM IN_SYM SHARE_SYM MODE_SYM
{
LEX *lex=Lex;
+ lex->current_select->lock_type= TL_READ_WITH_SHARED_LOCKS;
lex->current_select->
set_lock_for_tables(TL_READ_WITH_SHARED_LOCKS);
lex->safe_to_cache_query=0;
@@ -11066,12 +11065,7 @@ union_list_derived:
select_init2_derived:
select_part2_derived
{
- LEX *lex= Lex;
- if (lex->current_select->set_braces(0))
- {
- my_parse_error(thd, ER_SYNTAX_ERROR);
- MYSQL_YYABORT;
- }
+ Select->set_braces(0);
}
;
@@ -11116,16 +11110,8 @@ select_derived:
derived_query_specification:
SELECT_SYM select_derived_init select_derived2
{
- LEX *lex= Lex;
- SELECT_LEX *sel= lex->current_select;
if ($2)
- {
- if (sel->set_braces(1))
- {
- my_parse_error(thd, ER_SYNTAX_ERROR);
- MYSQL_YYABORT;
- }
- }
+ Select->set_braces(1);
$$= NULL;
}
;
@@ -13924,13 +13910,18 @@ with_list:
with_list_element:
query_name
opt_with_column_list
+ {
+ $2= new List<LEX_STRING> (Lex->with_column_list);
+ if ($2 == NULL)
+ MYSQL_YYABORT;
+ Lex->with_column_list.empty();
+ }
AS '(' remember_name subselect remember_end ')'
{
- With_element *elem= new With_element($1, Lex->with_column_list, $6->master_unit());
+ With_element *elem= new With_element($1, *$2, $7->master_unit());
if (elem == NULL || Lex->curr_with_clause->add_with_element(elem))
MYSQL_YYABORT;
- Lex->with_column_list.empty();
- if (elem->set_unparsed_spec(thd, $5+1, $7))
+ if (elem->set_unparsed_spec(thd, $6+1, $8))
MYSQL_YYABORT;
}
;
@@ -13938,8 +13929,9 @@ with_list_element:
opt_with_column_list:
/* empty */
- {}
+ { $$= NULL; }
| '(' with_column_list ')'
+ { $$= NULL; }
;
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index db054a635af..55f2864a93e 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -1594,7 +1594,8 @@ Sys_var_gtid_slave_pos::do_check(THD *thd, set_var *var)
}
mysql_mutex_lock(&LOCK_active_mi);
- running= master_info_index->give_error_if_slave_running();
+ running= (!master_info_index ||
+ master_info_index->give_error_if_slave_running());
mysql_mutex_unlock(&LOCK_active_mi);
if (running)
return true;
@@ -1634,7 +1635,7 @@ Sys_var_gtid_slave_pos::global_update(THD *thd, set_var *var)
mysql_mutex_unlock(&LOCK_global_system_variables);
mysql_mutex_lock(&LOCK_active_mi);
- if (master_info_index->give_error_if_slave_running())
+ if (!master_info_index || master_info_index->give_error_if_slave_running())
err= true;
else
err= rpl_gtid_pos_update(thd, var->save_result.string_value.str,
@@ -1823,7 +1824,8 @@ check_slave_parallel_threads(sys_var *self, THD *thd, set_var *var)
bool running;
mysql_mutex_lock(&LOCK_active_mi);
- running= master_info_index->give_error_if_slave_running();
+ running= (!master_info_index ||
+ master_info_index->give_error_if_slave_running());
mysql_mutex_unlock(&LOCK_active_mi);
if (running)
return true;
@@ -1838,7 +1840,8 @@ fix_slave_parallel_threads(sys_var *self, THD *thd, enum_var_type type)
mysql_mutex_unlock(&LOCK_global_system_variables);
mysql_mutex_lock(&LOCK_active_mi);
- err= master_info_index->give_error_if_slave_running();
+ err= (!master_info_index ||
+ master_info_index->give_error_if_slave_running());
mysql_mutex_unlock(&LOCK_active_mi);
mysql_mutex_lock(&LOCK_global_system_variables);
@@ -1874,7 +1877,8 @@ check_slave_domain_parallel_threads(sys_var *self, THD *thd, set_var *var)
bool running;
mysql_mutex_lock(&LOCK_active_mi);
- running= master_info_index->give_error_if_slave_running();
+ running= (!master_info_index ||
+ master_info_index->give_error_if_slave_running());
mysql_mutex_unlock(&LOCK_active_mi);
if (running)
return true;
@@ -1889,7 +1893,8 @@ fix_slave_domain_parallel_threads(sys_var *self, THD *thd, enum_var_type type)
mysql_mutex_unlock(&LOCK_global_system_variables);
mysql_mutex_lock(&LOCK_active_mi);
- running= master_info_index->give_error_if_slave_running();
+ running= (!master_info_index ||
+ master_info_index->give_error_if_slave_running());
mysql_mutex_unlock(&LOCK_active_mi);
mysql_mutex_lock(&LOCK_global_system_variables);
@@ -2039,7 +2044,8 @@ check_gtid_ignore_duplicates(sys_var *self, THD *thd, set_var *var)
bool running;
mysql_mutex_lock(&LOCK_active_mi);
- running= master_info_index->give_error_if_slave_running();
+ running= (!master_info_index ||
+ master_info_index->give_error_if_slave_running());
mysql_mutex_unlock(&LOCK_active_mi);
if (running)
return true;
@@ -2054,7 +2060,8 @@ fix_gtid_ignore_duplicates(sys_var *self, THD *thd, enum_var_type type)
mysql_mutex_unlock(&LOCK_global_system_variables);
mysql_mutex_lock(&LOCK_active_mi);
- running= master_info_index->give_error_if_slave_running();
+ running= (!master_info_index ||
+ master_info_index->give_error_if_slave_running());
mysql_mutex_unlock(&LOCK_active_mi);
mysql_mutex_lock(&LOCK_global_system_variables);
@@ -2146,6 +2153,12 @@ static Sys_var_ulong Sys_max_prepared_stmt_count(
VALID_RANGE(0, 1024*1024), DEFAULT(16382), BLOCK_SIZE(1),
&PLock_prepared_stmt_count);
+static Sys_var_ulong Sys_max_recursive_iterations(
+ "max_recursive_iterations",
+ "Maximum number of iterations when executing recursive queries",
+ SESSION_VAR(max_recursive_iterations), CMD_LINE(OPT_ARG),
+ VALID_RANGE(0, UINT_MAX), DEFAULT(UINT_MAX), BLOCK_SIZE(1));
+
static Sys_var_ulong Sys_max_sort_length(
"max_sort_length",
"The number of bytes to use when sorting BLOB or TEXT values (only "
@@ -2384,6 +2397,7 @@ export const char *optimizer_switch_names[]=
"extended_keys",
"exists_to_in",
"orderby_uses_equalities",
+ "condition_pushdown_for_derived",
"default",
NullS
};
@@ -2850,7 +2864,6 @@ static bool fix_server_id(sys_var *self, THD *thd, enum_var_type type)
{
if (type == OPT_GLOBAL)
{
- server_id_supplied = 1;
thd->variables.server_id= global_system_variables.server_id;
/*
Historically, server_id was a global variable that is exported to
@@ -2867,7 +2880,7 @@ static Sys_var_ulong Sys_server_id(
"Uniquely identifies the server instance in the community of "
"replication partners",
SESSION_VAR(server_id), CMD_LINE(REQUIRED_ARG, OPT_SERVER_ID),
- VALID_RANGE(0, UINT_MAX32), DEFAULT(0), BLOCK_SIZE(1), NO_MUTEX_GUARD,
+ VALID_RANGE(1, UINT_MAX32), DEFAULT(1), BLOCK_SIZE(1), NO_MUTEX_GUARD,
NOT_IN_BINLOG, ON_CHECK(check_has_super), ON_UPDATE(fix_server_id));
static Sys_var_mybool Sys_slave_compressed_protocol(
@@ -2954,7 +2967,7 @@ Sys_var_replicate_events_marked_for_skip::global_update(THD *thd, set_var *var)
mysql_mutex_unlock(&LOCK_global_system_variables);
mysql_mutex_lock(&LOCK_active_mi);
- if (!master_info_index->give_error_if_slave_running())
+ if (master_info_index && !master_info_index->give_error_if_slave_running())
result= Sys_var_enum::global_update(thd, var);
mysql_mutex_unlock(&LOCK_active_mi);
mysql_mutex_lock(&LOCK_global_system_variables);
@@ -3159,6 +3172,12 @@ static Sys_var_charptr Sys_ssl_crlpath(
READ_ONLY GLOBAL_VAR(opt_ssl_crlpath), SSL_OPT(OPT_SSL_CRLPATH),
IN_FS_CHARSET, DEFAULT(0));
+static Sys_var_mybool Sys_standards_compliant_cte(
+ "standards_compliant_cte",
+ "Allow only standards compiant CTE",
+ SESSION_VAR(only_standards_compliant_cte), CMD_LINE(OPT_ARG),
+ DEFAULT(TRUE));
+
// why ENUM and not BOOL ?
static const char *updatable_views_with_limit_names[]= {"NO", "YES", 0};
@@ -3208,6 +3227,11 @@ static Sys_var_ulong Sys_table_cache_size(
BLOCK_SIZE(1), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
ON_UPDATE(fix_table_open_cache));
+static Sys_var_uint Sys_table_cache_instances(
+ "table_open_cache_instances", "Maximum number of table cache instances",
+ READ_ONLY GLOBAL_VAR(tc_instances), CMD_LINE(REQUIRED_ARG),
+ VALID_RANGE(1, 64), DEFAULT(8), BLOCK_SIZE(1));
+
static Sys_var_ulong Sys_thread_cache_size(
"thread_cache_size",
"How many threads we should keep in a cache for reuse. These are freed after 5 minutes of idle time",
@@ -3364,6 +3388,20 @@ bool Sys_var_tx_read_only::session_update(THD *thd, set_var *var)
{
// @see Sys_var_tx_isolation::session_update() above for the rules.
thd->tx_read_only= var->save_result.ulonglong_value;
+
+#ifndef EMBEDDED_LIBRARY
+ if (thd->variables.session_track_transaction_info > TX_TRACK_NONE)
+ {
+ Transaction_state_tracker *tst= (Transaction_state_tracker *)
+ thd->session_tracker.get_tracker(TRANSACTION_INFO_TRACKER);
+
+ if (var->type == OPT_DEFAULT)
+ tst->set_read_flags(thd,
+ thd->tx_read_only ? TX_READ_ONLY : TX_READ_WRITE);
+ else
+ tst->set_read_flags(thd, TX_READ_INHERIT);
+ }
+#endif //EMBEDDED_LIBRARY
}
return false;
}
@@ -3985,14 +4023,16 @@ static bool check_log_path(sys_var *self, THD *thd, set_var *var)
if (!var->save_result.string_value.str)
return true;
- if (var->save_result.string_value.length > FN_REFLEN)
+ LEX_STRING *val= &var->save_result.string_value;
+
+ if (val->length > FN_REFLEN)
{ // path is too long
my_error(ER_PATH_LENGTH, MYF(0), self->name.str);
return true;
}
char path[FN_REFLEN];
- size_t path_length= unpack_filename(path, var->save_result.string_value.str);
+ size_t path_length= unpack_filename(path, val->str);
if (!path_length)
return true;
@@ -4005,6 +4045,17 @@ static bool check_log_path(sys_var *self, THD *thd, set_var *var)
return true;
}
+ static const LEX_CSTRING my_cnf= { STRING_WITH_LEN("my.cnf") };
+ static const LEX_CSTRING my_ini= { STRING_WITH_LEN("my.ini") };
+ if (path_length >= my_cnf.length)
+ {
+ if (strcasecmp(path + path_length - my_cnf.length, my_cnf.str) == 0)
+ return true; // log file name ends with "my.cnf"
+ DBUG_ASSERT(my_cnf.length == my_ini.length);
+ if (strcasecmp(path + path_length - my_ini.length, my_ini.str) == 0)
+ return true; // log file name ends with "my.ini"
+ }
+
MY_STAT f_stat;
if (my_stat(path, &f_stat, MYF(0)))
@@ -4014,9 +4065,9 @@ static bool check_log_path(sys_var *self, THD *thd, set_var *var)
return false;
}
- (void) dirname_part(path, var->save_result.string_value.str, &path_length);
+ (void) dirname_part(path, val->str, &path_length);
- if (var->save_result.string_value.length - path_length >= FN_LEN)
+ if (val->length - path_length >= FN_LEN)
{ // filename is too long
my_error(ER_PATH_LENGTH, MYF(0), self->name.str);
return true;
@@ -4779,9 +4830,10 @@ static Sys_var_mybool Sys_wsrep_auto_increment_control(
CMD_LINE(OPT_ARG), DEFAULT(TRUE));
static Sys_var_mybool Sys_wsrep_drupal_282555_workaround(
- "wsrep_drupal_282555_workaround", "To use a workaround for"
- "bad autoincrement value",
- GLOBAL_VAR(wsrep_drupal_282555_workaround),
+ "wsrep_drupal_282555_workaround", "Enable a workaround to handle the "
+ "cases where inserting a DEFAULT value into an auto-increment column "
+ "could fail with duplicate key error",
+ GLOBAL_VAR(wsrep_drupal_282555_workaround),
CMD_LINE(OPT_ARG), DEFAULT(FALSE));
static Sys_var_charptr sys_wsrep_sst_method(
@@ -4840,13 +4892,14 @@ static Sys_var_charptr Sys_wsrep_start_position (
static Sys_var_ulong Sys_wsrep_max_ws_size (
"wsrep_max_ws_size", "Max write set size (bytes)",
GLOBAL_VAR(wsrep_max_ws_size), CMD_LINE(REQUIRED_ARG),
- /* Upper limit is 65K short of 4G to avoid overlows on 32-bit systems */
- VALID_RANGE(1024, WSREP_MAX_WS_SIZE), DEFAULT(1073741824UL), BLOCK_SIZE(1));
+ VALID_RANGE(1024, WSREP_MAX_WS_SIZE), DEFAULT(WSREP_MAX_WS_SIZE),
+ BLOCK_SIZE(1), NO_MUTEX_GUARD, NOT_IN_BINLOG,
+ ON_CHECK(wsrep_max_ws_size_check), ON_UPDATE(wsrep_max_ws_size_update));
static Sys_var_ulong Sys_wsrep_max_ws_rows (
"wsrep_max_ws_rows", "Max number of rows in write set",
GLOBAL_VAR(wsrep_max_ws_rows), CMD_LINE(REQUIRED_ARG),
- VALID_RANGE(1, 1048576), DEFAULT(131072), BLOCK_SIZE(1));
+ VALID_RANGE(0, 1048576), DEFAULT(0), BLOCK_SIZE(1));
static Sys_var_charptr Sys_wsrep_notify_cmd(
"wsrep_notify_cmd", "",
@@ -5375,3 +5428,78 @@ static Sys_var_ulong Sys_log_tc_size(
DEFAULT(my_getpagesize() * 6),
BLOCK_SIZE(my_getpagesize()));
#endif
+
+#ifndef EMBEDDED_LIBRARY
+
+static Sys_var_sesvartrack Sys_track_session_sys_vars(
+ "session_track_system_variables",
+ "Track changes in registered system variables. "
+ "For compatibility with MySQL defaults this variable should be set to "
+ "\"autocommit, character_set_client, character_set_connection, "
+ "character_set_results, time_zone\"",
+ CMD_LINE(REQUIRED_ARG), IN_SYSTEM_CHARSET,
+ DEFAULT(""),
+ NO_MUTEX_GUARD);
+
+static bool update_session_track_schema(sys_var *self, THD *thd,
+ enum_var_type type)
+{
+ DBUG_ENTER("update_session_track_schema");
+ DBUG_RETURN(thd->session_tracker.get_tracker(CURRENT_SCHEMA_TRACKER)->
+ update(thd, NULL));
+}
+
+static Sys_var_mybool Sys_session_track_schema(
+ "session_track_schema",
+ "Track changes to the default schema.",
+ SESSION_VAR(session_track_schema),
+ CMD_LINE(OPT_ARG), DEFAULT(TRUE),
+ NO_MUTEX_GUARD, NOT_IN_BINLOG,
+ ON_CHECK(0),
+ ON_UPDATE(update_session_track_schema));
+
+
+static bool update_session_track_tx_info(sys_var *self, THD *thd,
+ enum_var_type type)
+{
+ DBUG_ENTER("update_session_track_tx_info");
+ DBUG_RETURN(thd->session_tracker.get_tracker(TRANSACTION_INFO_TRACKER)->
+ update(thd, NULL));
+}
+
+static const char *session_track_transaction_info_names[]=
+ { "OFF", "STATE", "CHARACTERISTICS", NullS };
+
+static Sys_var_enum Sys_session_track_transaction_info(
+ "session_track_transaction_info",
+ "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).",
+ SESSION_VAR(session_track_transaction_info),
+ CMD_LINE(REQUIRED_ARG), session_track_transaction_info_names,
+ DEFAULT(0), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
+ ON_UPDATE(update_session_track_tx_info));
+
+
+static bool update_session_track_state_change(sys_var *self, THD *thd,
+ enum_var_type type)
+{
+ DBUG_ENTER("update_session_track_state_change");
+ DBUG_RETURN(thd->session_tracker.get_tracker(SESSION_STATE_CHANGE_TRACKER)->
+ update(thd, NULL));
+}
+
+static Sys_var_mybool Sys_session_track_state_change(
+ "session_track_state_change",
+ "Track changes to the session state.",
+ SESSION_VAR(session_track_state_change),
+ CMD_LINE(OPT_ARG), DEFAULT(FALSE),
+ NO_MUTEX_GUARD, NOT_IN_BINLOG,
+ ON_CHECK(0),
+ ON_UPDATE(update_session_track_state_change));
+
+#endif //EMBEDDED_LIBRARY
diff --git a/sql/sys_vars.ic b/sql/sys_vars.ic
index ca6634849a1..c7f148afd39 100644
--- a/sql/sys_vars.ic
+++ b/sql/sys_vars.ic
@@ -96,7 +96,6 @@ enum charset_enum {IN_SYSTEM_CHARSET, IN_FS_CHARSET};
static const char *bool_values[3]= {"OFF", "ON", 0};
TYPELIB bool_typelib={ array_elements(bool_values)-1, "", bool_values, 0 };
-extern const char *encrypt_algorithm_names[];
/**
A small wrapper class to pass getopt arguments as a pair
@@ -438,10 +437,10 @@ public:
does not destroy individual members of SV, there's no way to free
allocated string variables for every thread.
*/
-class Sys_var_charptr: public sys_var
+class Sys_var_charptr_base: public sys_var
{
public:
- Sys_var_charptr(const char *name_arg,
+ Sys_var_charptr_base(const char *name_arg,
const char *comment, int flag_args, ptrdiff_t off, size_t size,
CMD_LINE getopt,
enum charset_enum is_os_charset_arg,
@@ -463,8 +462,6 @@ public:
*/
option.var_type|= (flags & ALLOCATED) ? GET_STR_ALLOC : GET_STR;
global_var(const char*)= def_val;
- SYSVAR_ASSERT(scope() == GLOBAL);
- SYSVAR_ASSERT(size == sizeof(char *));
}
void cleanup()
{
@@ -503,31 +500,35 @@ public:
}
bool do_check(THD *thd, set_var *var)
{ return do_string_check(thd, var, charset(thd)); }
- bool session_update(THD *thd, set_var *var)
- {
- DBUG_ASSERT(FALSE);
- return true;
- }
- bool global_update(THD *thd, set_var *var)
+ bool session_update(THD *thd, set_var *var)= 0;
+ char *global_update_prepare(THD *thd, set_var *var)
{
char *new_val, *ptr= var->save_result.string_value.str;
size_t len=var->save_result.string_value.length;
if (ptr)
{
new_val= (char*)my_memdup(ptr, len+1, MYF(MY_WME));
- if (!new_val) return true;
+ if (!new_val) return 0;
new_val[len]=0;
}
else
new_val= 0;
+ return new_val;
+ }
+ void global_update_finish(char *new_val)
+ {
if (flags & ALLOCATED)
my_free(global_var(char*));
flags|= ALLOCATED;
global_var(char*)= new_val;
- return false;
}
- void session_save_default(THD *thd, set_var *var)
- { DBUG_ASSERT(FALSE); }
+ bool global_update(THD *thd, set_var *var)
+ {
+ char *new_val= global_update_prepare(thd, var);
+ global_update_finish(new_val);
+ return (new_val == 0 && var->save_result.string_value.str != 0);
+ }
+ void session_save_default(THD *thd, set_var *var)= 0;
void global_save_default(THD *thd, set_var *var)
{
char *ptr= (char*)(intptr)option.def_value;
@@ -536,6 +537,104 @@ public:
}
};
+class Sys_var_charptr: public Sys_var_charptr_base
+{
+public:
+ Sys_var_charptr(const char *name_arg,
+ const char *comment, int flag_args, ptrdiff_t off, size_t size,
+ CMD_LINE getopt,
+ enum charset_enum is_os_charset_arg,
+ const char *def_val, PolyLock *lock=0,
+ enum binlog_status_enum binlog_status_arg=VARIABLE_NOT_IN_BINLOG,
+ on_check_function on_check_func=0,
+ on_update_function on_update_func=0,
+ const char *substitute=0) :
+ Sys_var_charptr_base(name_arg, comment, flag_args, off, size, getopt,
+ is_os_charset_arg, def_val, lock, binlog_status_arg,
+ on_check_func, on_update_func, substitute)
+ {
+ SYSVAR_ASSERT(scope() == GLOBAL);
+ SYSVAR_ASSERT(size == sizeof(char *));
+ }
+
+ bool session_update(THD *thd, set_var *var)
+ {
+ DBUG_ASSERT(FALSE);
+ return true;
+ }
+ void session_save_default(THD *thd, set_var *var)
+ { DBUG_ASSERT(FALSE); }
+};
+
+#ifndef EMBEDDED_LIBRARY
+class Sys_var_sesvartrack: public Sys_var_charptr_base
+{
+public:
+ Sys_var_sesvartrack(const char *name_arg,
+ const char *comment,
+ CMD_LINE getopt,
+ enum charset_enum is_os_charset_arg,
+ const char *def_val, PolyLock *lock) :
+ Sys_var_charptr_base(name_arg, comment,
+ SESSION_VAR(session_track_system_variables),
+ getopt, is_os_charset_arg, def_val, lock,
+ VARIABLE_NOT_IN_BINLOG, 0, 0, 0)
+ {}
+ bool do_check(THD *thd, set_var *var)
+ {
+ if (Sys_var_charptr_base::do_check(thd, var) ||
+ sysvartrack_validate_value(thd, var->save_result.string_value.str,
+ var->save_result.string_value.length))
+ return TRUE;
+ return FALSE;
+ }
+ bool global_update(THD *thd, set_var *var)
+ {
+ char *new_val= global_update_prepare(thd, var);
+ if (new_val)
+ {
+ if (sysvartrack_reprint_value(thd, new_val,
+ var->save_result.string_value.length))
+ new_val= 0;
+ }
+ global_update_finish(new_val);
+ return (new_val == 0 && var->save_result.string_value.str != 0);
+ }
+ bool session_update(THD *thd, set_var *var)
+ {
+ return sysvartrack_update(thd, var);
+ }
+ void session_save_default(THD *thd, set_var *var)
+ {
+ var->save_result.string_value.str= global_var(char*);
+ var->save_result.string_value.length=
+ strlen(var->save_result.string_value.str);
+ /* parse and feel list with default values */
+ if (thd)
+ {
+ bool res=
+ sysvartrack_validate_value(thd,
+ var->save_result.string_value.str,
+ var->save_result.string_value.length);
+ DBUG_ASSERT(res == 0);
+ }
+ }
+ uchar *session_value_ptr(THD *thd, const LEX_STRING *base)
+ {
+ DBUG_ASSERT(thd != NULL);
+ size_t len= sysvartrack_value_len(thd);
+ char *res= (char *)thd->alloc(len + sizeof(char *));
+ if (res)
+ {
+ char *buf= res + sizeof(char *);
+ *((char**) res)= buf;
+ sysvartrack_value_construct(thd, buf, len);
+ }
+ return (uchar *)res;
+ }
+};
+#endif //EMBEDDED_LIBRARY
+
class Sys_var_proxy_user: public sys_var
{
@@ -1978,7 +2077,47 @@ public:
if (var->type == OPT_SESSION && Sys_var_enum::session_update(thd, var))
return TRUE;
if (var->type == OPT_DEFAULT || !thd->in_active_multi_stmt_transaction())
+ {
+#ifndef EMBEDDED_LIBRARY
+ Transaction_state_tracker *tst= NULL;
+
+ if (thd->variables.session_track_transaction_info > TX_TRACK_NONE)
+ tst= (Transaction_state_tracker *)
+ thd->session_tracker.get_tracker(TRANSACTION_INFO_TRACKER);
+#endif //EMBEDDED_LIBRARY
+
thd->tx_isolation= (enum_tx_isolation) var->save_result.ulonglong_value;
+
+#ifndef EMBEDDED_LIBRARY
+ if (var->type == OPT_DEFAULT)
+ {
+ enum enum_tx_isol_level l;
+ switch (thd->tx_isolation) {
+ case ISO_READ_UNCOMMITTED:
+ l= TX_ISOL_UNCOMMITTED;
+ break;
+ case ISO_READ_COMMITTED:
+ l= TX_ISOL_COMMITTED;
+ break;
+ case ISO_REPEATABLE_READ:
+ l= TX_ISOL_REPEATABLE;
+ break;
+ case ISO_SERIALIZABLE:
+ l= TX_ISOL_SERIALIZABLE;
+ break;
+ default:
+ DBUG_ASSERT(0);
+ return TRUE;
+ }
+ if (tst)
+ tst->set_isol_level(thd, l);
+ }
+ else if (tst)
+ {
+ tst->set_isol_level(thd, TX_ISOL_INHERIT);
+ }
+#endif //EMBEDDED_LIBRARY
+ }
return FALSE;
}
};
diff --git a/sql/table.cc b/sql/table.cc
index 640ab8267fb..9a9dee6e0ca 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -41,6 +41,7 @@
#include "mdl.h" // MDL_wait_for_graph_visitor
#include "sql_view.h"
#include "rpl_filter.h"
+#include "sql_cte.h"
/* For MySQL 5.7 virtual fields */
#define MYSQL57_GENERATED_FIELD 128
@@ -66,7 +67,7 @@ LEX_STRING SLOW_LOG_NAME= {C_STRING_WITH_LEN("slow_log")};
Keyword added as a prefix when parsing the defining expression for a
virtual column read from the column definition saved in the frm file
*/
-LEX_STRING parse_vcol_keyword= { C_STRING_WITH_LEN("PARSE_VCOL_EXPR ") };
+static LEX_STRING parse_vcol_keyword= { C_STRING_WITH_LEN("PARSE_VCOL_EXPR ") };
static int64 last_table_id;
@@ -1431,48 +1432,38 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
DBUG_PRINT("info",("i_count: %d i_parts: %d index: %d n_length: %d int_length: %d com_length: %d vcol_screen_length: %d", interval_count,interval_parts, keys,n_length,int_length, com_length, vcol_screen_length));
+ if (!multi_alloc_root(&share->mem_root,
+ &share->field, (uint)(share->fields+1)*sizeof(Field*),
+ &share->intervals, (uint)interval_count*sizeof(TYPELIB),
+ &share->check_constraints, (uint) share->table_check_constraints * sizeof(Virtual_column_info*),
+ &interval_array, (uint) (share->fields+interval_parts+ keys+3)*sizeof(char *),
+ &names, (uint) (n_length+int_length),
+ &comment_pos, (uint) com_length,
+ &vcol_screen_pos, vcol_screen_length,
+ NullS))
- if (!(field_ptr = (Field **)
- alloc_root(&share->mem_root,
- (uint) ((share->fields+1)*sizeof(Field*)+
- interval_count*sizeof(TYPELIB)+
- share->table_check_constraints *
- sizeof(Virtual_column_info*)+
- (share->fields+interval_parts+
- keys+3)*sizeof(char *)+
- (n_length+int_length+com_length+
- vcol_screen_length)))))
- goto err; /* purecov: inspected */
+ goto err;
- share->field= field_ptr;
+ field_ptr= share->field;
+ table_check_constraints= share->check_constraints;
read_length=(uint) (share->fields * field_pack_length +
pos+ (uint) (n_length+int_length+com_length+
vcol_screen_length));
strpos= disk_buff+pos;
- share->intervals= (TYPELIB*) (field_ptr+share->fields+1);
- share->check_constraints= ((Virtual_column_info**)
- (share->intervals+interval_count));
- table_check_constraints= share->check_constraints;
- interval_array= (const char **) (table_check_constraints+
- share->table_check_constraints);
- names= (char*) (interval_array+share->fields+interval_parts+keys+3);
if (!interval_count)
share->intervals= 0; // For better debugging
- memcpy((char*) names, strpos+(share->fields*field_pack_length),
- (uint) (n_length+int_length));
- comment_pos= names+(n_length+int_length);
+
+ memcpy(names, strpos+(share->fields*field_pack_length), n_length+int_length);
memcpy(comment_pos, disk_buff+read_length-com_length-vcol_screen_length,
com_length);
- vcol_screen_pos= (uchar*) (names+(n_length+int_length+com_length));
memcpy(vcol_screen_pos, disk_buff+read_length-vcol_screen_length,
vcol_screen_length);
fix_type_pointers(&interval_array, &share->fieldnames, 1, &names);
if (share->fieldnames.count != share->fields)
goto err;
- fix_type_pointers(&interval_array, share->intervals, interval_count,
- &names);
+ fix_type_pointers(&interval_array, share->intervals, interval_count, &names);
{
/* Set ENUM and SET lengths */
@@ -1561,6 +1552,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
LEX_STRING comment;
Virtual_column_info *vcol_info= 0;
uint gis_length, gis_decimals, srid= 0;
+ Field::utype unireg_check;
if (new_frm_ver >= 3)
{
@@ -1776,22 +1768,36 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
swap_variables(uint, null_bit_pos, mysql57_vcol_null_bit_pos);
}
+ /* Convert pre-10.2.2 timestamps to use Field::default_value */
+ unireg_check= (Field::utype) MTYP_TYPENR(unireg_type);
+ if (unireg_check == Field::TIMESTAMP_DNUN_FIELD)
+ unireg_check= Field::TIMESTAMP_UN_FIELD;
+ if (unireg_check == Field::TIMESTAMP_DN_FIELD)
+ unireg_check= Field::NONE;
+
*field_ptr= reg_field=
- make_field(share, &share->mem_root, record+recpos,
- (uint32) field_length,
- null_pos, null_bit_pos,
- pack_flag,
- field_type,
- charset,
- geom_type, srid,
- (Field::utype) MTYP_TYPENR(unireg_type),
- (interval_nr ?
- share->intervals+interval_nr-1 :
- (TYPELIB*) 0),
+ make_field(share, &share->mem_root, record+recpos, (uint32) field_length,
+ null_pos, null_bit_pos, pack_flag, field_type, charset,
+ geom_type, srid, unireg_check,
+ (interval_nr ? share->intervals+interval_nr-1 : NULL),
share->fieldnames.type_names[i]);
if (!reg_field) // Not supported field type
goto err;
+ if (unireg_check != (Field::utype) MTYP_TYPENR(unireg_type))
+ {
+ char buf[32];
+ if (reg_field->decimals())
+ my_snprintf(buf, sizeof(buf), "CURRENT_TIMESTAMP(%d)", reg_field->decimals());
+ else
+ strmov(buf, "CURRENT_TIMESTAMP");
+
+ reg_field->default_value= new (&share->mem_root) Virtual_column_info();
+ reg_field->default_value->stored_in_db= 1;
+ thd->make_lex_string(&reg_field->default_value->expr_str, buf, strlen(buf));
+ share->default_expressions++;
+ }
+
reg_field->field_index= i;
reg_field->comment=comment;
reg_field->vcol_info= vcol_info;
@@ -1831,13 +1837,12 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
if (share->stored_rec_length>=recpos)
share->stored_rec_length= recpos-1;
}
- if (reg_field->has_insert_default_function())
- has_insert_default_function= 1;
if (reg_field->has_update_default_function())
+ {
has_update_default_function= 1;
- if (reg_field->has_insert_default_function() ||
- reg_field->has_update_default_function())
- share->default_fields++;
+ if (!reg_field->default_value)
+ share->default_fields++;
+ }
}
*field_ptr=0; // End marker
/* Sanity checks: */
@@ -1943,6 +1948,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
{
KEY_PART_INFO *new_key_part= (keyinfo-1)->key_part +
(keyinfo-1)->ext_key_parts;
+ uint add_keyparts_for_this_key= add_first_key_parts;
/*
Do not extend the key that contains a component
@@ -1954,19 +1960,20 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
if (share->field[fieldnr-1]->key_length() !=
keyinfo->key_part[i].length)
{
- add_first_key_parts= 0;
+ add_keyparts_for_this_key= 0;
break;
}
}
- if (add_first_key_parts < keyinfo->ext_key_parts-keyinfo->user_defined_key_parts)
+ if (add_keyparts_for_this_key < (keyinfo->ext_key_parts -
+ keyinfo->user_defined_key_parts))
{
share->ext_key_parts-= keyinfo->ext_key_parts;
key_part_map ext_key_part_map= keyinfo->ext_key_part_map;
keyinfo->ext_key_parts= keyinfo->user_defined_key_parts;
keyinfo->ext_key_flags= keyinfo->flags;
keyinfo->ext_key_part_map= 0;
- for (i= 0; i < add_first_key_parts; i++)
+ for (i= 0; i < add_keyparts_for_this_key; i++)
{
if (ext_key_part_map & 1<<i)
{
@@ -2223,16 +2230,19 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
}
case 1: // Generated stored field
vcol_info->stored_in_db= 1;
+ DBUG_ASSERT(!reg_field->vcol_info);
reg_field->vcol_info= vcol_info;
share->virtual_fields++;
share->virtual_stored_fields++; // For insert/load data
break;
case 2: // Default expression
vcol_info->stored_in_db= 1;
+ DBUG_ASSERT(!reg_field->default_value);
reg_field->default_value= vcol_info;
share->default_expressions++;
break;
case 3: // Field check constraint
+ DBUG_ASSERT(!reg_field->check_constraint);
reg_field->check_constraint= vcol_info;
share->field_check_constraints++;
break;
@@ -2299,6 +2309,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
bitmap_count= 1;
if (share->table_check_constraints)
{
+ feature_check_constraint++;
if (!(share->check_set= (MY_BITMAP*)
alloc_root(&share->mem_root, sizeof(*share->check_set))))
goto err;
@@ -2512,6 +2523,68 @@ void TABLE_SHARE::free_frm_image(const uchar *frm)
}
+static bool fix_vcol_expr(THD *thd, Virtual_column_info *vcol)
+{
+ DBUG_ENTER("fix_vcol_expr");
+
+ const enum enum_mark_columns save_mark_used_columns= thd->mark_used_columns;
+ thd->mark_used_columns= MARK_COLUMNS_NONE;
+
+ const char *save_where= thd->where;
+ thd->where= "virtual column function";
+
+ int error= vcol->expr_item->fix_fields(thd, &vcol->expr_item);
+
+ thd->mark_used_columns= save_mark_used_columns;
+ thd->where= save_where;
+
+ if (unlikely(error))
+ {
+ my_error(ER_ERROR_EVALUATING_EXPRESSION, MYF(0), vcol->expr_str);
+ DBUG_RETURN(1);
+ }
+
+ DBUG_RETURN(0);
+}
+
+/** rerun fix_fields for vcols that returns time- or session- dependent values
+
+ @note this is done for all vcols for INSERT/UPDATE/DELETE,
+ and only as needed for SELECTs.
+*/
+bool fix_session_vcol_expr(THD *thd, Virtual_column_info *vcol)
+{
+ DBUG_ENTER("fix_session_vcol_expr");
+ if (!(vcol->flags & (VCOL_TIME_FUNC|VCOL_SESSION_FUNC)))
+ DBUG_RETURN(0);
+
+ vcol->expr_item->cleanup();
+ DBUG_ASSERT(!vcol->expr_item->fixed);
+ DBUG_RETURN(fix_vcol_expr(thd, vcol));
+}
+
+
+/** invoke fix_session_vcol_expr for a vcol
+
+ @note this is called for generated column or a DEFAULT expression from
+ their corresponding fix_fields on SELECT.
+*/
+bool fix_session_vcol_expr_for_read(THD *thd, Field *field,
+ Virtual_column_info *vcol)
+{
+ DBUG_ENTER("fix_session_vcol_expr_for_read");
+ TABLE_LIST *tl= field->table->pos_in_table_list;
+ if (!tl || tl->lock_type >= TL_WRITE_ALLOW_WRITE)
+ DBUG_RETURN(0);
+ Security_context *save_security_ctx= thd->security_ctx;
+ if (tl->security_ctx)
+ thd->security_ctx= tl->security_ctx;
+ bool res= fix_session_vcol_expr(thd, vcol);
+ thd->security_ctx= save_security_ctx;
+ DBUG_RETURN(res);
+}
+
+
/*
@brief
Perform semantic analysis of the defining expression for a virtual column
@@ -2539,53 +2612,31 @@ void TABLE_SHARE::free_frm_image(const uchar *frm)
FALSE Otherwise
*/
-static bool fix_vcol_expr(THD *thd, TABLE *table, Field *field,
- Virtual_column_info *vcol)
+static bool fix_and_check_vcol_expr(THD *thd, TABLE *table, Field *field,
+ Virtual_column_info *vcol)
{
Item* func_expr= vcol->expr_item;
- bool result= TRUE;
- TABLE_LIST tables;
- int error= 0;
- const char *save_where;
- enum_mark_columns save_mark_used_columns= thd->mark_used_columns;
- DBUG_ENTER("fix_vcol_expr");
+ DBUG_ENTER("fix_and_check_vcol_expr");
DBUG_PRINT("info", ("vcol: %p", vcol));
DBUG_ASSERT(func_expr);
- thd->mark_used_columns= MARK_COLUMNS_NONE;
+ if (func_expr->fixed)
+ DBUG_RETURN(0); // nothing to do
- save_where= thd->where;
- thd->where= "virtual column function";
+ if (fix_vcol_expr(thd, vcol))
+ DBUG_RETURN(1);
- /* Fix fields referenced to by the virtual column function */
- thd->in_stored_expression= 1;
- if (!func_expr->fixed)
- error= func_expr->fix_fields(thd, &vcol->expr_item);
- thd->in_stored_expression= 0;
+ if (vcol->flags)
+ DBUG_RETURN(0); // already checked, no need to do it again
- if (unlikely(error))
- {
- DBUG_PRINT("info",
- ("Field in virtual column expression does not belong to the table"));
- my_error(ER_ERROR_EVALUATING_EXPRESSION, MYF(0), vcol->expr_str);
- goto end;
- }
/* fix_fields could've changed the expression */
func_expr= vcol->expr_item;
- /* Number of columns will be checked later */
- thd->where= save_where;
+ /* this was checked in check_expression(), but the frm could be mangled... */
if (unlikely(func_expr->result_type() == ROW_RESULT))
{
- my_error(ER_ROW_EXPR_FOR_VCOL, MYF(0));
- goto end;
- }
-
- /* Check that we are not refering to any not yet initialized fields */
- if (field)
- {
- if (func_expr->walk(&Item::check_field_expression_processor, 0, field))
- goto end;
+ my_error(ER_OPERAND_COLUMNS, MYF(0), 1);
+ DBUG_RETURN(1);
}
/*
@@ -2595,31 +2646,29 @@ static bool fix_vcol_expr(THD *thd, TABLE *table, Field *field,
Item::vcol_func_processor_result res;
res.errors= 0;
- error= func_expr->walk(&Item::check_vcol_func_processor, 0, &res);
+ int error= func_expr->walk(&Item::check_vcol_func_processor, 0, &res);
if (error || (res.errors & VCOL_IMPOSSIBLE))
- {
+ { // this can only happen if the frm was corrupted
my_error(ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWED, MYF(0), res.name,
- "???", field->field_name);
- goto end;
+ "???", field ? field->field_name : "?????");
+ DBUG_RETURN(1);
}
vcol->flags= res.errors;
/*
Mark what kind of default / virtual fields the table has
*/
- if (vcol->stored_in_db && vcol->flags & VCOL_NON_DETERMINISTIC)
- table->s->non_determinstic_insert= 1;
+ if (vcol->stored_in_db &&
+ vcol->flags & (VCOL_NON_DETERMINISTIC | VCOL_SESSION_FUNC))
+ table->s->non_determinstic_insert= true;
- result= FALSE;
-
-end:
+ if (vcol->flags & VCOL_SESSION_FUNC)
+ table->s->vcols_need_refixing= true;
- thd->mark_used_columns= save_mark_used_columns;
- table->map= 0; //Restore old value
-
- DBUG_RETURN(result);
+ DBUG_RETURN(0);
}
+
/*
@brief
Unpack the definition of a virtual column from its linear representation
@@ -2639,7 +2688,7 @@ end:
pointer to this item is placed into in a Virtual_column_info object
that is created. After this the function performs
semantic analysis of the item by calling the the function
- fix_vcol_expr(). Since the defining expression is part of the table
+ fix_and_check_vcol_expr(). Since the defining expression is part of the table
definition the item for it is created in table->memroot within the
special arena TABLE::expr_arena or in the thd memroot for INSERT DELAYED
@@ -2690,14 +2739,10 @@ Virtual_column_info *unpack_vcol_info_from_frm(THD *thd,
vcol_expr->length +
parse_vcol_keyword.length + 3)))
DBUG_RETURN(0);
- memcpy(vcol_expr_str,
- (char*) parse_vcol_keyword.str,
- parse_vcol_keyword.length);
+ memcpy(vcol_expr_str, parse_vcol_keyword.str, parse_vcol_keyword.length);
str_len= parse_vcol_keyword.length;
vcol_expr_str[str_len++]= '(';
- memcpy(vcol_expr_str + str_len,
- (char*) vcol_expr->str,
- vcol_expr->length);
+ memcpy(vcol_expr_str + str_len, vcol_expr->str, vcol_expr->length);
str_len+= vcol_expr->length;
vcol_expr_str[str_len++]= ')';
vcol_expr_str[str_len++]= 0;
@@ -2740,21 +2785,14 @@ Virtual_column_info *unpack_vcol_info_from_frm(THD *thd,
thd->update_charset(&my_charset_utf8mb4_general_ci,
table->s->table_charset);
}
- thd->in_stored_expression= 1;
error= parse_sql(thd, &parser_state, NULL);
- thd->in_stored_expression= 0;
if (error)
goto err;
- /*
- mark if expression will be stored in the table. This is also used by
- fix_vcol_expr() to mark if we are using non deterministic functions.
- */
vcol_storage.vcol_info->stored_in_db= vcol->stored_in_db;
vcol_storage.vcol_info->name= vcol->name;
vcol_storage.vcol_info->utf8= vcol->utf8;
- /* Validate the Item tree. */
- if (!fix_vcol_expr(thd, table, field, vcol_storage.vcol_info))
+ if (!fix_and_check_vcol_expr(thd, table, field, vcol_storage.vcol_info))
{
vcol_info= vcol_storage.vcol_info; // Expression ok
goto end;
@@ -2774,6 +2812,14 @@ end:
DBUG_RETURN(vcol_info);
}
+static bool check_vcol_forward_refs(Field *field, Virtual_column_info *vcol)
+{
+ bool res= vcol &&
+ vcol->expr_item->walk(&Item::check_field_expression_processor, 0,
+ field);
+ return res;
+}
+
/*
Read data from a binary .frm file from MySQL 3.23 - 5.0 into TABLE_SHARE
*/
@@ -3038,34 +3084,29 @@ enum open_frm_error open_table_from_share(THD *thd, TABLE_SHARE *share,
goto err;
}
field->default_value= vcol;
- if (is_create_table &&
- !(vcol->flags & (VCOL_UNKNOWN | VCOL_NON_DETERMINISTIC | VCOL_TIME_FUNC)))
- {
- enum_check_fields old_count_cuted_fields= thd->count_cuted_fields;
- thd->count_cuted_fields= CHECK_FIELD_WARN; // To find wrong default values
- my_ptrdiff_t off= share->default_values - outparam->record[0];
- field->move_field_offset(off);
- int res= vcol->expr_item->save_in_field(field, 1);
- field->move_field_offset(-off);
- thd->count_cuted_fields= old_count_cuted_fields;
- if (res != 0 && res != 3)
- {
- my_error(ER_INVALID_DEFAULT, MYF(0), field->field_name);
- error= OPEN_FRM_CORRUPTED;
- goto err;
- }
- }
*(dfield_ptr++)= *field_ptr;
}
else
- if ((field->has_insert_default_function() ||
- field->has_update_default_function()))
+ if (field->has_update_default_function())
*(dfield_ptr++)= *field_ptr;
}
*vfield_ptr= 0; // End marker
*dfield_ptr= 0; // End marker
+ /* Check that expressions aren't refering to not yet initialized fields */
+ for (field_ptr= outparam->field; *field_ptr; field_ptr++)
+ {
+ Field *field= *field_ptr;
+ if (check_vcol_forward_refs(field, field->vcol_info) ||
+ check_vcol_forward_refs(field, field->check_constraint) ||
+ check_vcol_forward_refs(field, field->default_value))
+ {
+ error= OPEN_FRM_CORRUPTED;
+ goto err;
+ }
+ }
+
/* Update to use trigger fields */
switch_defaults_to_nullable_trigger_fields(outparam);
@@ -6275,7 +6316,7 @@ void TABLE::mark_columns_needed_for_update()
to compare records and detect data change.
*/
if ((file->ha_table_flags() & HA_PARTIAL_COLUMN_READ) &&
- default_field && has_default_function(true))
+ default_field && s->has_update_default_function)
bitmap_union(read_set, write_set);
DBUG_VOID_RETURN;
}
@@ -6573,17 +6614,13 @@ void TABLE::mark_default_fields_for_write(bool is_insert)
for (field_ptr= default_field; *field_ptr; field_ptr++)
{
field= (*field_ptr);
- if (field->default_value)
+ if (is_insert && field->default_value)
{
- if (is_insert)
- {
- bitmap_set_bit(write_set, field->field_index);
- field->default_value->expr_item->
- walk(&Item::register_field_in_read_map, 1, 0);
- }
+ bitmap_set_bit(write_set, field->field_index);
+ field->default_value->expr_item->
+ walk(&Item::register_field_in_read_map, 1, 0);
}
- else if ((is_insert && field->has_insert_default_function()) ||
- (!is_insert && field->has_update_default_function()))
+ else if (!is_insert && field->has_update_default_function())
bitmap_set_bit(write_set, field->field_index);
}
DBUG_VOID_RETURN;
@@ -7314,7 +7351,8 @@ int TABLE::update_default_fields(bool update_command, bool ignore_errors)
{
if (!update_command)
{
- if (field->default_value)
+ if (field->default_value &&
+ (field->default_value->flags || field->flags & BLOB_FLAG))
res|= (field->default_value->expr_item->save_in_field(field, 0) < 0);
else
res|= field->evaluate_insert_default_function();
@@ -7451,7 +7489,7 @@ bool TABLE::validate_default_values_of_unset_fields(THD *thd) const
/*
We're here if:
- validate_value_in_record_with_warn() failed and
- strict mode converted WARN to ERROR
+ strict mo validate_default_values_of_unset_fieldsde converted WARN to ERROR
- or the connection was killed, or closed unexpectedly
*/
DBUG_RETURN(true);
@@ -7462,6 +7500,59 @@ bool TABLE::validate_default_values_of_unset_fields(THD *thd) const
}
+bool TABLE::insert_all_rows_into(THD *thd, TABLE *dest, bool with_cleanup)
+{
+ int write_err= 0;
+
+ DBUG_ENTER("TABLE::insert_all_rows_into");
+
+ if (with_cleanup)
+ {
+ if ((write_err= dest->file->ha_delete_all_rows()))
+ goto err;
+ }
+
+ if (file->indexes_are_disabled())
+ dest->file->ha_disable_indexes(HA_KEY_SWITCH_ALL);
+ file->ha_index_or_rnd_end();
+
+ if (file->ha_rnd_init_with_error(1))
+ DBUG_RETURN(1);
+
+ if (dest->no_rows)
+ dest->file->extra(HA_EXTRA_NO_ROWS);
+ else
+ {
+ /* update table->file->stats.records */
+ file->info(HA_STATUS_VARIABLE);
+ dest->file->ha_start_bulk_insert(file->stats.records);
+ }
+
+ while (!file->ha_rnd_next(dest->record[1]))
+ {
+ write_err= dest->file->ha_write_tmp_row(dest->record[1]);
+ if (write_err)
+ goto err;
+ if (thd->check_killed())
+ {
+ thd->send_kill_message();
+ goto err_killed;
+ }
+ }
+ if (!dest->no_rows && dest->file->ha_end_bulk_insert())
+ goto err;
+ DBUG_RETURN(0);
+
+err:
+ DBUG_PRINT("error",("Got error: %d",write_err));
+ file->print_error(write_err, MYF(0));
+err_killed:
+ (void) file->ha_rnd_end();
+ DBUG_RETURN(1);
+}
+
+
+
/*
@brief Reset const_table flag
@@ -7502,20 +7593,24 @@ void TABLE_LIST::reset_const_table()
bool TABLE_LIST::handle_derived(LEX *lex, uint phases)
{
- SELECT_LEX_UNIT *unit;
+ SELECT_LEX_UNIT *unit= get_unit();
DBUG_ENTER("handle_derived");
DBUG_PRINT("enter", ("phases: 0x%x", phases));
- if ((unit= get_unit()))
+
+ if (unit)
{
- for (SELECT_LEX *sl= unit->first_select(); sl; sl= sl->next_select())
- if (sl->handle_derived(lex, phases))
- DBUG_RETURN(TRUE);
- DBUG_RETURN(mysql_handle_single_derived(lex, this, phases));
+ if (!is_with_table_recursive_reference())
+ {
+ for (SELECT_LEX *sl= unit->first_select(); sl; sl= sl->next_select())
+ if (sl->handle_derived(lex, phases))
+ DBUG_RETURN(TRUE);
+ }
+ if (mysql_handle_single_derived(lex, this, phases))
+ DBUG_RETURN(TRUE);
}
DBUG_RETURN(FALSE);
}
-
/**
@brief
Return unit of this derived table/view
@@ -7623,7 +7718,8 @@ bool TABLE_LIST::init_derived(THD *thd, bool init_view)
optimizer_flag(thd, OPTIMIZER_SWITCH_DERIVED_MERGE) &&
!thd->lex->can_not_use_merged() &&
!(thd->lex->sql_command == SQLCOM_UPDATE_MULTI ||
- thd->lex->sql_command == SQLCOM_DELETE_MULTI))
+ thd->lex->sql_command == SQLCOM_DELETE_MULTI) &&
+ !is_recursive_with_table())
set_merged_derived();
else
set_materialized_derived();
@@ -7793,6 +7889,7 @@ bool TABLE_LIST::is_with_table()
return derived && derived->with_element;
}
+
uint TABLE_SHARE::actual_n_key_parts(THD *thd)
{
return use_ext_keys &&
@@ -7808,3 +7905,186 @@ double KEY::actual_rec_per_key(uint i)
return (is_statistics_from_stat_tables ?
read_stats->get_avg_frequency(i) : (double) rec_per_key[i]);
}
+
+
+/**
+ @brief
+ Mark subformulas of a condition unusable for the condition pushed into table
+
+ @param cond The condition whose subformulas are to be marked
+
+ @details
+ This method recursively traverses the AND-OR condition cond and for each subformula
+ of the codition it checks whether it can be usable for the extraction of a condition
+ that can be pushed into this table. The subformulas that are not usable are
+ marked with the flag NO_EXTRACTION_FL.
+ @note
+ This method is called before any call of TABLE_LIST::build_pushable_cond_for_table.
+ The flag NO_EXTRACTION_FL set in a subformula allows to avoid building clone
+ for the subformula when extracting the pushable condition.
+*/
+
+void TABLE_LIST::check_pushable_cond_for_table(Item *cond)
+{
+ table_map tab_map= table->map;
+ cond->clear_extraction_flag();
+ if (cond->type() == Item::COND_ITEM)
+ {
+ bool and_cond= ((Item_cond*) cond)->functype() == Item_func::COND_AND_FUNC;
+ List_iterator<Item> li(*((Item_cond*) cond)->argument_list());
+ uint count= 0;
+ Item *item;
+ while ((item=li++))
+ {
+ check_pushable_cond_for_table(item);
+ if (item->get_extraction_flag() != NO_EXTRACTION_FL)
+ count++;
+ else if (!and_cond)
+ break;
+ }
+ if ((and_cond && count == 0) || item)
+ {
+ cond->set_extraction_flag(NO_EXTRACTION_FL);
+ if (and_cond)
+ li.rewind();
+ while ((item= li++))
+ item->clear_extraction_flag();
+ }
+ }
+ else if (cond->walk(&Item::exclusive_dependence_on_table_processor,
+ 0, (void *) &tab_map))
+ cond->set_extraction_flag(NO_EXTRACTION_FL);
+}
+
+
+/**
+ @brief
+ Build condition extractable from the given one depended only on this table
+
+ @param thd The thread handle
+ @param cond The condition from which the pushable one is to be extracted
+
+ @details
+ For the given condition cond this method finds out what condition depended
+ only on this table can be extracted from cond. If such condition C exists
+ the method builds the item for it.
+ The method uses the flag NO_EXTRACTION_FL set by the preliminary call of
+ the method TABLE_LIST::check_pushable_cond_for_table to figure out whether
+ a subformula depends only on this table or not.
+ @note
+ The built condition C is always implied by the condition cond
+ (cond => C). The method tries to build the most restictive such
+ condition (i.e. for any other condition C' such that cond => C'
+ we have C => C').
+ @note
+ The build item is not ready for usage: substitution for the field items
+ has to be done and it has to be re-fixed.
+
+ @retval
+ the built condition pushable into this table if such a condition exists
+ NULL if there is no such a condition
+*/
+
+Item* TABLE_LIST::build_pushable_cond_for_table(THD *thd, Item *cond)
+{
+ table_map tab_map= table->map;
+ bool is_multiple_equality= cond->type() == Item::FUNC_ITEM &&
+ ((Item_func*) cond)->functype() == Item_func::MULT_EQUAL_FUNC;
+ if (cond->get_extraction_flag() == NO_EXTRACTION_FL)
+ return 0;
+ if (cond->type() == Item::COND_ITEM)
+ {
+ bool cond_and= false;
+ Item_cond *new_cond;
+ if (((Item_cond*) cond)->functype() == Item_func::COND_AND_FUNC)
+ {
+ cond_and= true;
+ new_cond=new (thd->mem_root) Item_cond_and(thd);
+ }
+ else
+ new_cond= new (thd->mem_root) Item_cond_or(thd);
+ if (!new_cond)
+ return 0;
+ List_iterator<Item> li(*((Item_cond*) cond)->argument_list());
+ Item *item;
+ while ((item=li++))
+ {
+ if (item->get_extraction_flag() == NO_EXTRACTION_FL)
+ {
+ if (!cond_and)
+ return 0;
+ continue;
+ }
+ Item *fix= build_pushable_cond_for_table(thd, item);
+ if (!fix && !cond_and)
+ return 0;
+ if (!fix)
+ continue;
+ new_cond->argument_list()->push_back(fix, thd->mem_root);
+ }
+ switch (new_cond->argument_list()->elements)
+ {
+ case 0:
+ return 0;
+ case 1:
+ return new_cond->argument_list()->head();
+ default:
+ return new_cond;
+ }
+ }
+ else if (is_multiple_equality)
+ {
+ if (!(cond->used_tables() & tab_map))
+ return 0;
+ Item *new_cond= NULL;
+ int i= 0;
+ Item_equal *item_equal= (Item_equal *) cond;
+ Item *left_item = item_equal->get_const();
+ Item_equal_fields_iterator it(*item_equal);
+ Item *item;
+ if (!left_item)
+ {
+ while ((item=it++))
+ if (item->used_tables() == tab_map)
+ {
+ left_item= item;
+ break;
+ }
+ }
+ if (!left_item)
+ return 0;
+ while ((item=it++))
+ {
+ if (!(item->used_tables() == tab_map))
+ continue;
+ Item_func_eq *eq= 0;
+ Item *left_item_clone= left_item->build_clone(thd, thd->mem_root);
+ Item *right_item_clone= item->build_clone(thd, thd->mem_root);
+ if (left_item_clone && right_item_clone)
+ eq= new (thd->mem_root) Item_func_eq(thd, right_item_clone,
+ left_item_clone);
+ if (eq)
+ {
+ i++;
+ switch (i)
+ {
+ case 1:
+ new_cond= eq;
+ break;
+ case 2:
+ new_cond= new (thd->mem_root) Item_cond_and(thd, new_cond, eq);
+ break;
+ default:
+ ((Item_cond_and*)new_cond)->argument_list()->push_back(eq,
+ thd->mem_root);
+ }
+ }
+ }
+ if (new_cond)
+ new_cond->fix_fields(thd, &new_cond);
+ return new_cond;
+ }
+ else if (cond->get_extraction_flag() != NO_EXTRACTION_FL)
+ return cond->build_clone(thd, thd->mem_root);
+ return 0;
+}
diff --git a/sql/table.h b/sql/table.h
index 651fab7c4cb..bc30b00ac45 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -681,10 +681,10 @@ struct TABLE_SHARE
bool can_cmp_whole_record;
bool table_creation_was_logged;
bool non_determinstic_insert;
+ bool vcols_need_refixing;
bool virtual_stored_fields;
bool check_set_initialized;
bool has_update_default_function;
- bool has_insert_default_function;
ulong table_map_id; /* for row-based replication */
/*
@@ -1021,13 +1021,14 @@ private:
One should use methods of I_P_List template instead.
*/
TABLE *share_all_next, **share_all_prev;
+ TABLE *global_free_next, **global_free_prev;
friend struct All_share_tables;
+ friend struct Table_cache_instance;
public:
+ uint32 instance; /** Table cache instance this TABLE is belonging to */
THD *in_use; /* Which thread uses this */
- /* Time when table was released to table cache. Valid for unused tables. */
- ulonglong tc_time;
Field **field; /* Pointer to fields */
uchar *record[2]; /* Pointer to records */
@@ -1310,18 +1311,6 @@ public:
void mark_columns_used_by_check_constraints(void);
void mark_check_constraint_columns_for_read(void);
int verify_constraints(bool ignore_failure);
- /**
- Check if a table has a default function either for INSERT or UPDATE-like
- operation
- @retval true there is a default function
- @retval false there is no default function
- */
- inline bool has_default_function(bool is_update)
- {
- return (is_update ?
- s->has_update_default_function :
- s->has_insert_default_function);
- }
inline void column_bitmaps_set(MY_BITMAP *read_set_arg,
MY_BITMAP *write_set_arg)
{
@@ -1441,6 +1430,8 @@ public:
inline Field **field_to_fill();
bool validate_default_values_of_unset_fields(THD *thd) const;
+
+ bool insert_all_rows_into(THD *thd, TABLE *dest, bool with_cleanup);
};
@@ -1893,7 +1884,10 @@ struct TABLE_LIST
derived tables. Use TABLE_LIST::is_anonymous_derived_table().
*/
st_select_lex_unit *derived; /* SELECT_LEX_UNIT of derived table */
- With_element *with; /* With element of with_table */
+ With_element *with; /* With element defining this table (if any) */
+ /* Bitmap of the defining with element */
+ table_map with_internal_reference_map;
+ bool block_handle_derived;
ST_SCHEMA_TABLE *schema_table; /* Information_schema table */
st_select_lex *schema_select_lex;
/*
@@ -2263,6 +2257,10 @@ struct TABLE_LIST
return (derived_type & DTYPE_TABLE);
}
bool is_with_table();
+ bool is_recursive_with_table();
+ bool is_with_table_recursive_reference();
+ bool fill_recursive(THD *thd);
+
inline void set_view()
{
derived_type= DTYPE_VIEW;
@@ -2347,6 +2345,8 @@ struct TABLE_LIST
return false;
}
void set_lock_type(THD* thd, enum thr_lock_type lock);
+ void check_pushable_cond_for_table(Item *cond);
+ Item *build_pushable_cond_for_table(THD *thd, Item *cond);
private:
bool prep_check_option(THD *thd, uint8 check_opt_type);
@@ -2631,6 +2631,9 @@ enum open_frm_error open_table_from_share(THD *thd, TABLE_SHARE *share,
const char *alias, uint db_stat, uint prgflag,
uint ha_open_flags, TABLE *outparam,
bool is_create_table);
+bool fix_session_vcol_expr(THD *thd, Virtual_column_info *vcol);
+bool fix_session_vcol_expr_for_read(THD *thd, Field *field,
+ Virtual_column_info *vcol);
Virtual_column_info *unpack_vcol_info_from_frm(THD *thd, MEM_ROOT *mem_root,
TABLE *table,
Field *field,
diff --git a/sql/table_cache.cc b/sql/table_cache.cc
index bfe51df5de1..6a6b8ab827e 100644
--- a/sql/table_cache.cc
+++ b/sql/table_cache.cc
@@ -55,10 +55,14 @@
/** Configuration. */
ulong tdc_size; /**< Table definition cache threshold for LRU eviction. */
ulong tc_size; /**< Table cache threshold for LRU eviction. */
+uint32 tc_instances;
+static uint32 tc_active_instances= 1;
+static uint32 tc_contention_warning_reported;
/** Data collections. */
static LF_HASH tdc_hash; /**< Collection of TABLE_SHARE objects. */
/** Collection of unused TABLE_SHARE objects. */
+static
I_P_List <TDC_element,
I_P_List_adapter<TDC_element, &TDC_element::next, &TDC_element::prev>,
I_P_List_null_counter,
@@ -67,8 +71,6 @@ I_P_List <TDC_element,
static int64 tdc_version; /* Increments on each reload */
static bool tdc_inited;
-static int32 tc_count; /**< Number of TABLE objects in table cache. */
-
/**
Protects unused shares list.
@@ -81,11 +83,13 @@ static int32 tc_count; /**< Number of TABLE objects in table cache. */
static mysql_mutex_t LOCK_unused_shares;
#ifdef HAVE_PSI_INTERFACE
-static PSI_mutex_key key_LOCK_unused_shares, key_TABLE_SHARE_LOCK_table_share;
+static PSI_mutex_key key_LOCK_unused_shares, key_TABLE_SHARE_LOCK_table_share,
+ key_LOCK_table_cache;
static PSI_mutex_info all_tc_mutexes[]=
{
{ &key_LOCK_unused_shares, "LOCK_unused_shares", PSI_FLAG_GLOBAL },
- { &key_TABLE_SHARE_LOCK_table_share, "TABLE_SHARE::tdc.LOCK_table_share", 0 }
+ { &key_TABLE_SHARE_LOCK_table_share, "TABLE_SHARE::tdc.LOCK_table_share", 0 },
+ { &key_LOCK_table_cache, "LOCK_table_cache", 0 }
};
static PSI_cond_key key_TABLE_SHARE_COND_release;
@@ -93,19 +97,6 @@ static PSI_cond_info all_tc_conds[]=
{
{ &key_TABLE_SHARE_COND_release, "TABLE_SHARE::tdc.COND_release", 0 }
};
-
-
-static void init_tc_psi_keys(void)
-{
- const char *category= "sql";
- int count;
-
- count= array_elements(all_tc_mutexes);
- mysql_mutex_register(category, all_tc_mutexes, count);
-
- count= array_elements(all_tc_conds);
- mysql_cond_register(category, all_tc_conds, count);
-}
#endif
@@ -125,67 +116,153 @@ static int fix_thd_pins(THD *thd)
part of table definition cache.
*/
-static void intern_close_table(TABLE *table)
+struct Table_cache_instance
{
- DBUG_ENTER("intern_close_table");
- DBUG_PRINT("tcache", ("table: '%s'.'%s' 0x%lx",
- table->s ? table->s->db.str : "?",
- table->s ? table->s->table_name.str : "?",
- (long) table));
+ /**
+ Protects free_tables (TABLE::global_free_next and TABLE::global_free_prev),
+ records, Share_free_tables::List (TABLE::prev and TABLE::next),
+ TABLE::in_use.
+ */
+ mysql_mutex_t LOCK_table_cache;
+ I_P_List <TABLE, I_P_List_adapter<TABLE, &TABLE::global_free_next,
+ &TABLE::global_free_prev>,
+ I_P_List_null_counter, I_P_List_fast_push_back<TABLE> >
+ free_tables;
+ ulong records;
+ uint mutex_waits;
+ uint mutex_nowaits;
+ /** Avoid false sharing between instances */
+ char pad[CPU_LEVEL1_DCACHE_LINESIZE];
+
+ Table_cache_instance(): records(0), mutex_waits(0), mutex_nowaits(0)
+ {
+ mysql_mutex_init(key_LOCK_table_cache, &LOCK_table_cache,
+ MY_MUTEX_INIT_FAST);
+ }
- delete table->triggers;
- if (table->file) // Not true if placeholder
+ ~Table_cache_instance()
{
- (void) closefrm(table);
- tdc_release_share(table->s);
+ mysql_mutex_destroy(&LOCK_table_cache);
+ DBUG_ASSERT(free_tables.is_empty());
+ DBUG_ASSERT(records == 0);
}
- table->alias.free();
- my_free(table);
- DBUG_VOID_RETURN;
-}
+ /**
+ Lock table cache mutex and check contention.
-/**
- Get number of TABLE objects (used and unused) in table cache.
-*/
+ Instance is considered contested if more than 20% of mutex acquisiotions
+ can't be served immediately. Up to 100 000 probes may be performed to avoid
+ instance activation on short sporadic peaks. 100 000 is estimated maximum
+ number of queries one instance can serve in one second.
-uint tc_records(void)
+ These numbers work well on a 2 socket / 20 core / 40 threads Intel Broadwell
+ system, that is expected number of instances is activated within reasonable
+ warmup time. It may have to be adjusted for other systems.
+
+ Only TABLE object acquistion is instrumented. We intentionally avoid this
+ overhead on TABLE object release. All other table cache mutex acquistions
+ are considered out of hot path and are not instrumented either.
+ */
+ void lock_and_check_contention(uint32 n_instances, uint32 instance)
+ {
+ if (mysql_mutex_trylock(&LOCK_table_cache))
+ {
+ mysql_mutex_lock(&LOCK_table_cache);
+ if (++mutex_waits == 20000)
+ {
+ if (n_instances < tc_instances)
+ {
+ if (my_atomic_cas32_weak_explicit((int32*) &tc_active_instances,
+ (int32*) &n_instances,
+ (int32) n_instances + 1,
+ MY_MEMORY_ORDER_RELAXED,
+ MY_MEMORY_ORDER_RELAXED))
+ {
+ sql_print_information("Detected table cache mutex contention at instance %d: "
+ "%d%% waits. Additional table cache instance "
+ "activated. Number of instances after "
+ "activation: %d.",
+ instance + 1,
+ mutex_waits * 100 / (mutex_nowaits + mutex_waits),
+ n_instances + 1);
+ }
+ }
+ else if (!my_atomic_fas32_explicit((int32*) &tc_contention_warning_reported,
+ 1, MY_MEMORY_ORDER_RELAXED))
+ {
+ sql_print_warning("Detected table cache mutex contention at instance %d: "
+ "%d%% waits. Additional table cache instance "
+ "cannot be activated: consider raising "
+ "table_open_cache_instances. Number of active "
+ "instances: %d.",
+ instance + 1,
+ mutex_waits * 100 / (mutex_nowaits + mutex_waits),
+ n_instances);
+ }
+ mutex_waits= 0;
+ mutex_nowaits= 0;
+ }
+ }
+ else if (++mutex_nowaits == 80000)
+ {
+ mutex_waits= 0;
+ mutex_nowaits= 0;
+ }
+ }
+};
+
+
+static Table_cache_instance *tc;
+
+
+static void intern_close_table(TABLE *table)
{
- return my_atomic_load32_explicit(&tc_count, MY_MEMORY_ORDER_RELAXED);
+ delete table->triggers;
+ DBUG_ASSERT(table->file);
+ closefrm(table);
+ tdc_release_share(table->s);
+ my_free(table);
}
/**
- Wait for MDL deadlock detector to complete traversing tdc.all_tables.
-
- Must be called before updating TABLE_SHARE::tdc.all_tables.
+ Get number of TABLE objects (used and unused) in table cache.
*/
-static void tc_wait_for_mdl_deadlock_detector(TDC_element *element)
+uint tc_records(void)
{
- while (element->all_tables_refs)
- mysql_cond_wait(&element->COND_release, &element->LOCK_table_share);
+ ulong total= 0;
+ for (ulong i= 0; i < tc_instances; i++)
+ {
+ mysql_mutex_lock(&tc[i].LOCK_table_cache);
+ total+= tc[i].records;
+ mysql_mutex_unlock(&tc[i].LOCK_table_cache);
+ }
+ return total;
}
/**
Remove TABLE object from table cache.
-
- - decrement tc_count
- - remove object from TABLE_SHARE::tdc.all_tables
*/
static void tc_remove_table(TABLE *table)
{
- mysql_mutex_assert_owner(&table->s->tdc->LOCK_table_share);
- tc_wait_for_mdl_deadlock_detector(table->s->tdc);
- my_atomic_add32_explicit(&tc_count, -1, MY_MEMORY_ORDER_RELAXED);
- table->s->tdc->all_tables.remove(table);
+ TDC_element *element= table->s->tdc;
+
+ mysql_mutex_lock(&element->LOCK_table_share);
+ /* Wait for MDL deadlock detector to complete traversing tdc.all_tables. */
+ while (element->all_tables_refs)
+ mysql_cond_wait(&element->COND_release, &element->LOCK_table_share);
+ element->all_tables.remove(table);
+ mysql_mutex_unlock(&element->LOCK_table_share);
+
+ intern_close_table(table);
}
static void tc_remove_all_unused_tables(TDC_element *element,
- TDC_element::TABLE_list *purge_tables,
+ Share_free_tables::List *purge_tables,
bool mark_flushed)
{
TABLE *table;
@@ -200,10 +277,18 @@ static void tc_remove_all_unused_tables(TDC_element *element,
*/
if (mark_flushed)
element->flushed= true;
- while ((table= element->free_tables.pop_front()))
+ for (ulong i= 0; i < tc_instances; i++)
{
- tc_remove_table(table);
- purge_tables->push_front(table);
+ mysql_mutex_lock(&tc[i].LOCK_table_cache);
+ while ((table= element->free_tables[i].list.pop_front()))
+ {
+ tc[i].records--;
+ tc[i].free_tables.remove(table);
+ DBUG_ASSERT(element->all_tables_refs == 0);
+ element->all_tables.remove(table);
+ purge_tables->push_front(table);
+ }
+ mysql_mutex_unlock(&tc[i].LOCK_table_cache);
}
}
@@ -225,7 +310,7 @@ static void tc_remove_all_unused_tables(TDC_element *element,
struct tc_purge_arg
{
- TDC_element::TABLE_list purge_tables;
+ Share_free_tables::List purge_tables;
bool mark_flushed;
};
@@ -252,20 +337,6 @@ void tc_purge(bool mark_flushed)
/**
- Get last element of free_tables.
-*/
-
-static TABLE *tc_free_tables_back(TDC_element *element)
-{
- TDC_element::TABLE_list::Iterator it(element->free_tables);
- TABLE *entry, *last= 0;
- while ((entry= it++))
- last= entry;
- return last;
-}
-
-
-/**
Add new TABLE object to table cache.
@pre TABLE object is used by caller.
@@ -281,79 +352,35 @@ static TABLE *tc_free_tables_back(TDC_element *element)
- free evicted object
*/
-struct tc_add_table_arg
-{
- char key[MAX_DBKEY_LENGTH];
- uint key_length;
- ulonglong purge_time;
-};
-
-
-static my_bool tc_add_table_callback(TDC_element *element, tc_add_table_arg *arg)
+void tc_add_table(THD *thd, TABLE *table)
{
- TABLE *table;
+ uint32 i= thd->thread_id % my_atomic_load32_explicit((int32*) &tc_active_instances,
+ MY_MEMORY_ORDER_RELAXED);
+ TABLE *LRU_table= 0;
+ TDC_element *element= table->s->tdc;
+ DBUG_ASSERT(table->in_use == thd);
+ table->instance= i;
mysql_mutex_lock(&element->LOCK_table_share);
- if ((table= tc_free_tables_back(element)) && table->tc_time < arg->purge_time)
- {
- memcpy(arg->key, element->m_key, element->m_key_length);
- arg->key_length= element->m_key_length;
- arg->purge_time= table->tc_time;
- }
+ /* Wait for MDL deadlock detector to complete traversing tdc.all_tables. */
+ while (element->all_tables_refs)
+ mysql_cond_wait(&element->COND_release, &element->LOCK_table_share);
+ element->all_tables.push_front(table);
mysql_mutex_unlock(&element->LOCK_table_share);
- return FALSE;
-}
-
-void tc_add_table(THD *thd, TABLE *table)
-{
- bool need_purge;
- DBUG_ASSERT(table->in_use == thd);
- mysql_mutex_lock(&table->s->tdc->LOCK_table_share);
- tc_wait_for_mdl_deadlock_detector(table->s->tdc);
- table->s->tdc->all_tables.push_front(table);
- mysql_mutex_unlock(&table->s->tdc->LOCK_table_share);
-
- /* If we have too many TABLE instances around, try to get rid of them */
- need_purge= my_atomic_add32_explicit(&tc_count, 1, MY_MEMORY_ORDER_RELAXED) >=
- (int32) tc_size;
-
- if (need_purge)
+ mysql_mutex_lock(&tc[i].LOCK_table_cache);
+ if (tc[i].records == tc_size && (LRU_table= tc[i].free_tables.pop_front()))
{
- tc_add_table_arg argument;
- argument.purge_time= ULONGLONG_MAX;
- tdc_iterate(thd, (my_hash_walk_action) tc_add_table_callback, &argument);
-
- if (argument.purge_time != ULONGLONG_MAX)
- {
- TDC_element *element= (TDC_element*) lf_hash_search(&tdc_hash,
- thd->tdc_hash_pins,
- argument.key,
- argument.key_length);
- if (element)
- {
- TABLE *entry;
- mysql_mutex_lock(&element->LOCK_table_share);
- lf_hash_search_unpin(thd->tdc_hash_pins);
-
- /*
- It may happen that oldest table was acquired meanwhile. In this case
- just go ahead, number of objects in table cache will normalize
- eventually.
- */
- if ((entry= tc_free_tables_back(element)) &&
- entry->tc_time == argument.purge_time)
- {
- element->free_tables.remove(entry);
- tc_remove_table(entry);
- mysql_mutex_unlock(&element->LOCK_table_share);
- intern_close_table(entry);
- }
- else
- mysql_mutex_unlock(&element->LOCK_table_share);
- }
- }
+ LRU_table->s->tdc->free_tables[i].list.remove(LRU_table);
+ /* Needed if MDL deadlock detector chimes in before tc_remove_table() */
+ LRU_table->in_use= thd;
}
+ else
+ tc[i].records++;
+ mysql_mutex_unlock(&tc[i].LOCK_table_cache);
+
+ if (LRU_table)
+ tc_remove_table(LRU_table);
}
@@ -369,10 +396,14 @@ void tc_add_table(THD *thd, TABLE *table)
static TABLE *tc_acquire_table(THD *thd, TDC_element *element)
{
+ uint32 n_instances=
+ my_atomic_load32_explicit((int32*) &tc_active_instances,
+ MY_MEMORY_ORDER_RELAXED);
+ uint32 i= thd->thread_id % n_instances;
TABLE *table;
- mysql_mutex_lock(&element->LOCK_table_share);
- table= element->free_tables.pop_front();
+ tc[i].lock_and_check_contention(n_instances, i);
+ table= element->free_tables[i].list.pop_front();
if (table)
{
DBUG_ASSERT(!table->in_use);
@@ -381,8 +412,9 @@ static TABLE *tc_acquire_table(THD *thd, TDC_element *element)
DBUG_ASSERT(table->db_stat && table->file);
/* The children must be detached from the table. */
DBUG_ASSERT(!table->file->extra(HA_EXTRA_IS_ATTACHED_CHILDREN));
+ tc[i].free_tables.remove(table);
}
- mysql_mutex_unlock(&element->LOCK_table_share);
+ mysql_mutex_unlock(&tc[i].LOCK_table_cache);
return table;
}
@@ -413,40 +445,27 @@ static TABLE *tc_acquire_table(THD *thd, TDC_element *element)
@retval false object released
*/
-bool tc_release_table(TABLE *table)
+void tc_release_table(TABLE *table)
{
+ uint32 i= table->instance;
DBUG_ASSERT(table->in_use);
DBUG_ASSERT(table->file);
- if (table->needs_reopen() || tc_records() > tc_size)
+ mysql_mutex_lock(&tc[i].LOCK_table_cache);
+ if (table->needs_reopen() || table->s->tdc->flushed ||
+ tc[i].records > tc_size)
{
- mysql_mutex_lock(&table->s->tdc->LOCK_table_share);
- goto purge;
+ tc[i].records--;
+ mysql_mutex_unlock(&tc[i].LOCK_table_cache);
+ tc_remove_table(table);
+ }
+ else
+ {
+ table->in_use= 0;
+ table->s->tdc->free_tables[i].list.push_front(table);
+ tc[i].free_tables.push_back(table);
+ mysql_mutex_unlock(&tc[i].LOCK_table_cache);
}
-
- table->tc_time= my_interval_timer();
-
- mysql_mutex_lock(&table->s->tdc->LOCK_table_share);
- if (table->s->tdc->flushed)
- goto purge;
- /*
- in_use doesn't really need mutex protection, but must be reset after
- checking tdc.flushed and before this table appears in free_tables.
- Resetting in_use is needed only for print_cached_tables() and
- list_open_tables().
- */
- table->in_use= 0;
- /* Add table to the list of unused TABLE objects for this share. */
- table->s->tdc->free_tables.push_front(table);
- mysql_mutex_unlock(&table->s->tdc->LOCK_table_share);
- return false;
-
-purge:
- tc_remove_table(table);
- mysql_mutex_unlock(&table->s->tdc->LOCK_table_share);
- table->in_use= 0;
- intern_close_table(table);
- return true;
}
@@ -456,7 +475,10 @@ static void tdc_assert_clean_share(TDC_element *element)
DBUG_ASSERT(element->ref_count == 0);
DBUG_ASSERT(element->m_flush_tickets.is_empty());
DBUG_ASSERT(element->all_tables.is_empty());
- DBUG_ASSERT(element->free_tables.is_empty());
+#ifndef DBUG_OFF
+ for (ulong i= 0; i < tc_instances; i++)
+ DBUG_ASSERT(element->free_tables[i].list.is_empty());
+#endif
DBUG_ASSERT(element->all_tables_refs == 0);
DBUG_ASSERT(element->next == 0);
DBUG_ASSERT(element->prev == 0);
@@ -527,7 +549,8 @@ static void lf_alloc_constructor(uchar *arg)
mysql_cond_init(key_TABLE_SHARE_COND_release, &element->COND_release, 0);
element->m_flush_tickets.empty();
element->all_tables.empty();
- element->free_tables.empty();
+ for (ulong i= 0; i < tc_instances; i++)
+ element->free_tables[i].list.empty();
element->all_tables_refs= 0;
element->share= 0;
element->ref_count= 0;
@@ -573,23 +596,29 @@ static uchar *tdc_hash_key(const TDC_element *element, size_t *length,
Initialize table definition cache.
*/
-void tdc_init(void)
+bool tdc_init(void)
{
DBUG_ENTER("tdc_init");
#ifdef HAVE_PSI_INTERFACE
- init_tc_psi_keys();
+ mysql_mutex_register("sql", all_tc_mutexes, array_elements(all_tc_mutexes));
+ mysql_cond_register("sql", all_tc_conds, array_elements(all_tc_conds));
#endif
+ /* Extra instance is allocated to avoid false sharing */
+ if (!(tc= new Table_cache_instance[tc_instances + 1]))
+ DBUG_RETURN(true);
tdc_inited= true;
mysql_mutex_init(key_LOCK_unused_shares, &LOCK_unused_shares,
MY_MUTEX_INIT_FAST);
tdc_version= 1L; /* Increments on each reload */
- lf_hash_init(&tdc_hash, sizeof(TDC_element), LF_HASH_UNIQUE, 0, 0,
+ lf_hash_init(&tdc_hash, sizeof(TDC_element) +
+ sizeof(Share_free_tables) * (tc_instances - 1),
+ LF_HASH_UNIQUE, 0, 0,
(my_hash_get_key) tdc_hash_key,
&my_charset_bin);
tdc_hash.alloc.constructor= lf_alloc_constructor;
tdc_hash.alloc.destructor= lf_alloc_destructor;
tdc_hash.initializer= (lf_hash_initializer) tdc_hash_initializer;
- DBUG_VOID_RETURN;
+ DBUG_RETURN(false);
}
@@ -631,6 +660,7 @@ void tdc_deinit(void)
tdc_inited= false;
lf_hash_destroy(&tdc_hash);
mysql_mutex_destroy(&LOCK_unused_shares);
+ delete [] tc;
}
DBUG_VOID_RETURN;
}
@@ -1038,7 +1068,7 @@ bool tdc_remove_table(THD *thd, enum_tdc_remove_table_type remove_type,
const char *db, const char *table_name,
bool kill_delayed_threads)
{
- TDC_element::TABLE_list purge_tables;
+ Share_free_tables::List purge_tables;
TABLE *table;
TDC_element *element;
uint my_refs= 1;
diff --git a/sql/table_cache.h b/sql/table_cache.h
index c05baae1f15..cac69296cc2 100644
--- a/sql/table_cache.h
+++ b/sql/table_cache.h
@@ -18,6 +18,15 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+struct Share_free_tables
+{
+ typedef I_P_List <TABLE, TABLE_share> List;
+ List list;
+ /** Avoid false sharing between instances */
+ char pad[CPU_LEVEL1_DCACHE_LINESIZE];
+};
+
+
struct TDC_element
{
uchar m_key[NAME_LEN + 1 + NAME_LEN + 1];
@@ -26,10 +35,8 @@ struct TDC_element
bool flushed;
TABLE_SHARE *share;
- typedef I_P_List <TABLE, TABLE_share> TABLE_list;
/**
- Protects ref_count, m_flush_tickets, all_tables, free_tables, flushed,
- all_tables_refs.
+ Protects ref_count, m_flush_tickets, all_tables, flushed, all_tables_refs.
*/
mysql_mutex_t LOCK_table_share;
mysql_cond_t COND_release;
@@ -45,7 +52,9 @@ struct TDC_element
for this share.
*/
All_share_tables_list all_tables;
- TABLE_list free_tables;
+ /** Avoid false sharing between TDC_element and free_tables */
+ char pad[CPU_LEVEL1_DCACHE_LINESIZE];
+ Share_free_tables free_tables[1];
};
@@ -59,8 +68,9 @@ enum enum_tdc_remove_table_type
extern ulong tdc_size;
extern ulong tc_size;
+extern uint32 tc_instances;
-extern void tdc_init(void);
+extern bool tdc_init(void);
extern void tdc_start_shutdown(void);
extern void tdc_deinit(void);
extern ulong tdc_records(void);
@@ -86,7 +96,7 @@ extern int tdc_iterate(THD *thd, my_hash_walk_action action, void *argument,
extern uint tc_records(void);
extern void tc_purge(bool mark_flushed= false);
extern void tc_add_table(THD *thd, TABLE *table);
-extern bool tc_release_table(TABLE *table);
+extern void tc_release_table(TABLE *table);
/**
Create a table cache key for non-temporary table.
diff --git a/sql/threadpool_common.cc b/sql/threadpool_common.cc
index a7996efc382..d6c343dc04e 100644
--- a/sql/threadpool_common.cc
+++ b/sql/threadpool_common.cc
@@ -164,9 +164,8 @@ THD* threadpool_add_connection(CONNECT *connect, void *scheduler_data)
if (!setup_connection_thread_globals(thd))
{
- if (!login_connection(thd))
+ if (!thd_prepare_connection(thd))
{
- prepare_new_connection_state(thd);
/*
Check if THD is ok, as prepare_new_connection_state()
diff --git a/sql/transaction.cc b/sql/transaction.cc
index 8b188709ce6..9bacfb81bba 100644
--- a/sql/transaction.cc
+++ b/sql/transaction.cc
@@ -25,6 +25,44 @@
#include "debug_sync.h" // DEBUG_SYNC
#include "sql_acl.h"
+
+#ifndef EMBEDDED_LIBRARY
+/**
+ Helper: Tell tracker (if any) that transaction ended.
+*/
+static void trans_track_end_trx(THD *thd)
+{
+ if (thd->variables.session_track_transaction_info > TX_TRACK_NONE)
+ {
+ ((Transaction_state_tracker *)
+ thd->session_tracker.get_tracker(TRANSACTION_INFO_TRACKER))->end_trx(thd);
+ }
+}
+#else
+#define trans_track_end_trx(A) do{}while(0)
+#endif //EMBEDDED_LIBRARY
+
+
+/**
+ Helper: transaction ended, SET TRANSACTION one-shot variables
+ revert to session values. Let the transaction state tracker know.
+*/
+void trans_reset_one_shot_chistics(THD *thd)
+{
+#ifndef EMBEDDED_LIBRARY
+ if (thd->variables.session_track_transaction_info > TX_TRACK_NONE)
+ {
+ Transaction_state_tracker *tst= (Transaction_state_tracker *)
+ thd->session_tracker.get_tracker(TRANSACTION_INFO_TRACKER);
+
+ tst->set_read_flags(thd, TX_READ_INHERIT);
+ tst->set_isol_level(thd, TX_ISOL_INHERIT);
+ }
+#endif //EMBEDDED_LIBRARY
+ thd->tx_isolation= (enum_tx_isolation) thd->variables.tx_isolation;
+ thd->tx_read_only= thd->variables.tx_read_only;
+}
+
/* Conditions under which the transaction state must not change. */
static bool trans_check(THD *thd)
{
@@ -125,11 +163,20 @@ static bool xa_trans_force_rollback(THD *thd)
bool trans_begin(THD *thd, uint flags)
{
int res= FALSE;
+#ifndef EMBEDDED_LIBRARY
+ Transaction_state_tracker *tst= NULL;
+#endif //EMBEDDED_LIBRARY
DBUG_ENTER("trans_begin");
if (trans_check(thd))
DBUG_RETURN(TRUE);
+#ifndef EMBEDDED_LIBRARY
+ if (thd->variables.session_track_transaction_info > TX_TRACK_NONE)
+ tst= (Transaction_state_tracker *)
+ thd->session_tracker.get_tracker(TRANSACTION_INFO_TRACKER);
+#endif //EMBEDDED_LIBRARY
+
thd->locked_tables_list.unlock_locked_tables(thd);
DBUG_ASSERT(!thd->locked_tables_mode);
@@ -172,7 +219,13 @@ bool trans_begin(THD *thd, uint flags)
DBUG_ASSERT(!((flags & MYSQL_START_TRANS_OPT_READ_ONLY) &&
(flags & MYSQL_START_TRANS_OPT_READ_WRITE)));
if (flags & MYSQL_START_TRANS_OPT_READ_ONLY)
+ {
thd->tx_read_only= true;
+#ifndef EMBEDDED_LIBRARY
+ if (tst)
+ tst->set_read_flags(thd, TX_READ_ONLY);
+#endif //EMBEDDED_LIBRARY
+ }
else if (flags & MYSQL_START_TRANS_OPT_READ_WRITE)
{
/*
@@ -189,6 +242,14 @@ bool trans_begin(THD *thd, uint flags)
DBUG_RETURN(true);
}
thd->tx_read_only= false;
+ /*
+ This flags that tx_read_only was set explicitly, rather than
+ just from the session's default.
+ */
+#ifndef EMBEDDED_LIBRARY
+ if (tst)
+ tst->set_read_flags(thd, TX_READ_WRITE);
+#endif //EMBEDDED_LIBRARY
}
#ifdef WITH_WSREP
@@ -203,9 +264,20 @@ bool trans_begin(THD *thd, uint flags)
thd->server_status|= SERVER_STATUS_IN_TRANS_READONLY;
DBUG_PRINT("info", ("setting SERVER_STATUS_IN_TRANS"));
+#ifndef EMBEDDED_LIBRARY
+ if (tst)
+ tst->add_trx_state(thd, TX_EXPLICIT);
+#endif //EMBEDDED_LIBRARY
+
/* ha_start_consistent_snapshot() relies on OPTION_BEGIN flag set. */
if (flags & MYSQL_START_TRANS_OPT_WITH_CONS_SNAPSHOT)
+ {
+#ifndef EMBEDDED_LIBRARY
+ if (tst)
+ tst->add_trx_state(thd, TX_WITH_SNAPSHOT);
+#endif //EMBEDDED_LIBRARY
res= ha_start_consistent_snapshot(thd);
+ }
DBUG_RETURN(MY_TEST(res));
}
@@ -255,6 +327,8 @@ bool trans_commit(THD *thd)
thd->transaction.all.m_unsafe_rollback_flags&= ~THD_TRANS::DID_WAIT;
thd->lex->start_transaction_opt= 0;
+ trans_track_end_trx(thd);
+
DBUG_RETURN(MY_TEST(res));
}
@@ -308,8 +382,9 @@ bool trans_commit_implicit(THD *thd)
@@session.completion_type since it's documented
to not have any effect on implicit commit.
*/
- thd->tx_isolation= (enum_tx_isolation) thd->variables.tx_isolation;
- thd->tx_read_only= thd->variables.tx_read_only;
+ trans_reset_one_shot_chistics(thd);
+
+ trans_track_end_trx(thd);
DBUG_RETURN(res);
}
@@ -349,6 +424,8 @@ bool trans_rollback(THD *thd)
thd->transaction.all.m_unsafe_rollback_flags&= ~THD_TRANS::DID_WAIT;
thd->lex->start_transaction_opt= 0;
+ trans_track_end_trx(thd);
+
DBUG_RETURN(MY_TEST(res));
}
@@ -396,6 +473,8 @@ bool trans_rollback_implicit(THD *thd)
/* Rollback should clear transaction_rollback_request flag. */
DBUG_ASSERT(! thd->transaction_rollback_request);
+ trans_track_end_trx(thd);
+
DBUG_RETURN(MY_TEST(res));
}
@@ -434,8 +513,7 @@ bool trans_commit_stmt(THD *thd)
res= ha_commit_trans(thd, FALSE);
if (! thd->in_active_multi_stmt_transaction())
{
- thd->tx_isolation= (enum_tx_isolation) thd->variables.tx_isolation;
- thd->tx_read_only= thd->variables.tx_read_only;
+ trans_reset_one_shot_chistics(thd);
if (WSREP_ON)
wsrep_post_commit(thd, FALSE);
}
@@ -487,10 +565,7 @@ bool trans_rollback_stmt(THD *thd)
wsrep_register_hton(thd, FALSE);
ha_rollback_trans(thd, FALSE);
if (! thd->in_active_multi_stmt_transaction())
- {
- thd->tx_isolation= (enum_tx_isolation) thd->variables.tx_isolation;
- thd->tx_read_only= thd->variables.tx_read_only;
- }
+ trans_reset_one_shot_chistics(thd);
}
(void) RUN_HOOK(transaction, after_rollback, (thd, FALSE));
@@ -912,6 +987,8 @@ bool trans_xa_commit(THD *thd)
xid_cache_delete(thd, &thd->transaction.xid_state);
thd->transaction.xid_state.xa_state= XA_NOTR;
+ trans_track_end_trx(thd);
+
DBUG_RETURN(res);
}
@@ -968,5 +1045,7 @@ bool trans_xa_rollback(THD *thd)
xid_cache_delete(thd, &thd->transaction.xid_state);
thd->transaction.xid_state.xa_state= XA_NOTR;
+ trans_track_end_trx(thd);
+
DBUG_RETURN(res);
}
diff --git a/sql/transaction.h b/sql/transaction.h
index 54b25f1de2a..90de11aabe3 100644
--- a/sql/transaction.h
+++ b/sql/transaction.h
@@ -44,4 +44,6 @@ bool trans_xa_prepare(THD *thd);
bool trans_xa_commit(THD *thd);
bool trans_xa_rollback(THD *thd);
+void trans_reset_one_shot_chistics(THD *thd);
+
#endif /* TRANSACTION_H */
diff --git a/sql/unireg.cc b/sql/unireg.cc
index 19d03d23cc7..d3a9b832aaf 100644
--- a/sql/unireg.cc
+++ b/sql/unireg.cc
@@ -634,7 +634,7 @@ static bool pack_header(THD *thd, uchar *forminfo,
if (add_expr_length(thd, &field->vcol_info, &expression_length))
DBUG_RETURN(1);
- if (field->has_default_expression())
+ if (field->default_value && field->default_value->expr_str.length)
if (add_expr_length(thd, &field->default_value, &expression_length))
DBUG_RETURN(1);
if (add_expr_length(thd, &field->check_constraint, &expression_length))
@@ -735,7 +735,7 @@ static bool pack_header(THD *thd, uchar *forminfo,
n_length+int_length+com_length+expression_length > 65535L ||
int_count > 255)
{
- my_message(ER_TOO_MANY_FIELDS, ER_THD(thd, ER_TOO_MANY_FIELDS), MYF(0));
+ my_message(ER_TOO_MANY_FIELDS, "Table definition is too large", MYF(0));
DBUG_RETURN(1);
}
@@ -983,7 +983,7 @@ static bool pack_fields(uchar **buff_arg, List<Create_field> &create_fields,
if (field->vcol_info)
pack_expression(&buff, field->vcol_info, field_nr,
field->vcol_info->stored_in_db ? 1 : 0);
- if (field->has_default_expression())
+ if (field->default_value && field->default_value->expr_str.length)
pack_expression(&buff, field->default_value, field_nr, 2);
if (field->check_constraint)
pack_expression(&buff, field->check_constraint, field_nr, 3);
@@ -1039,7 +1039,10 @@ static bool make_empty_rec(THD *thd, uchar *buff, uint table_options,
field->sql_type,
field->charset,
field->geom_type, field->srid,
- field->unireg_check,
+ field->unireg_check == Field::TIMESTAMP_DNUN_FIELD
+ ? Field::TIMESTAMP_UN_FIELD
+ : field->unireg_check == Field::TIMESTAMP_DN_FIELD
+ ? Field::NONE : field->unireg_check,
field->save_interval ? field->save_interval :
field->interval,
field->field_name);
diff --git a/sql/wsrep_applier.cc b/sql/wsrep_applier.cc
index b4557cfe1b7..059aabe7b46 100644
--- a/sql/wsrep_applier.cc
+++ b/sql/wsrep_applier.cc
@@ -39,15 +39,9 @@ static Log_event* wsrep_read_log_event(
const char *error= 0;
Log_event *res= 0;
- if (data_len > wsrep_max_ws_size)
- {
- error = "Event too big";
- goto err;
- }
-
- res= Log_event::read_log_event(buf, data_len, &error, description_event, true);
+ res= Log_event::read_log_event(buf, data_len, &error, description_event,
+ true);
-err:
if (!res)
{
DBUG_ASSERT(error != 0);
diff --git a/sql/wsrep_binlog.h b/sql/wsrep_binlog.h
index 1e820529211..864813d5c98 100644
--- a/sql/wsrep_binlog.h
+++ b/sql/wsrep_binlog.h
@@ -19,7 +19,7 @@
#include "sql_class.h" // THD, IO_CACHE
#define HEAP_PAGE_SIZE 65536 /* 64K */
-#define WSREP_MAX_WS_SIZE (0xFFFFFFFFUL - HEAP_PAGE_SIZE)
+#define WSREP_MAX_WS_SIZE 2147483647 /* 2GB */
/*
Write the contents of a cache to a memory buffer.
diff --git a/sql/wsrep_check_opts.cc b/sql/wsrep_check_opts.cc
index 818ef843cb5..bc77c434525 100644
--- a/sql/wsrep_check_opts.cc
+++ b/sql/wsrep_check_opts.cc
@@ -18,8 +18,6 @@
#include "sys_vars_shared.h"
#include "wsrep.h"
#include "wsrep_sst.h"
-//#include <sql_class.h>
-//#include "wsrep_mysqld.h"
extern char *my_bind_addr_str;
diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc
index fa34a5bbc55..2a93484002e 100644
--- a/sql/wsrep_hton.cc
+++ b/sql/wsrep_hton.cc
@@ -34,11 +34,14 @@ extern "C" int thd_binlog_format(const MYSQL_THD thd);
*/
void wsrep_cleanup_transaction(THD *thd)
{
+ if (!WSREP(thd)) return;
+
if (wsrep_emulate_bin_log) thd_binlog_trx_reset(thd);
thd->wsrep_ws_handle.trx_id= WSREP_UNDEFINED_TRX_ID;
thd->wsrep_trx_meta.gtid= WSREP_GTID_UNDEFINED;
thd->wsrep_trx_meta.depends_on= WSREP_SEQNO_UNDEFINED;
thd->wsrep_exec_mode= LOCAL_STATE;
+ thd->wsrep_affected_rows= 0;
return;
}
@@ -109,13 +112,7 @@ void wsrep_register_hton(THD* thd, bool all)
*/
void wsrep_post_commit(THD* thd, bool all)
{
- /*
- TODO: It can perhaps be fixed in a more elegant fashion by turning off
- wsrep_emulate_binlog if wsrep_on=0 on server start.
- https://github.com/codership/mysql-wsrep/issues/112
- */
- if (!WSREP_ON)
- return;
+ if (!WSREP(thd)) return;
switch (thd->wsrep_exec_mode)
{
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc
index e3b503a82fb..a8253ddf3ad 100644
--- a/sql/wsrep_mysqld.cc
+++ b/sql/wsrep_mysqld.cc
@@ -52,49 +52,64 @@ rpl_sidno wsrep_sidno= -1;
my_bool wsrep_preordered_opt= FALSE;
/*
- * Begin configuration options and their default values
+ * Begin configuration options
*/
extern my_bool plugins_are_initialized;
extern uint kill_cached_threads;
extern mysql_cond_t COND_thread_cache;
-const char* wsrep_data_home_dir = NULL;
-const char* wsrep_dbug_option = "";
-
-long wsrep_slave_threads = 1; // # of slave action appliers wanted
-int wsrep_slave_count_change = 0; // # of appliers to stop or start
-my_bool wsrep_debug = 0; // enable debug level logging
-my_bool wsrep_convert_LOCK_to_trx = 1; // convert locking sessions to trx
-ulong wsrep_retry_autocommit = 5; // retry aborted autocommit trx
-my_bool wsrep_auto_increment_control = 1; // control auto increment variables
-my_bool wsrep_drupal_282555_workaround = 1; // retry autoinc insert after dupkey
-my_bool wsrep_incremental_data_collection = 0; // incremental data collection
-ulong wsrep_max_ws_size = 1073741824UL;//max ws (RBR buffer) size
-ulong wsrep_max_ws_rows = 65536; // max number of rows in ws
-int wsrep_to_isolation = 0; // # of active TO isolation threads
-my_bool wsrep_certify_nonPK = 1; // certify, even when no primary key
-long wsrep_max_protocol_version = 3; // maximum protocol version to use
-ulong wsrep_forced_binlog_format = BINLOG_FORMAT_UNSPEC;
-my_bool wsrep_recovery = 0; // recovery
-my_bool wsrep_replicate_myisam = 0; // enable myisam replication
-my_bool wsrep_log_conflicts = 0;
-ulong wsrep_mysql_replication_bundle = 0;
-my_bool wsrep_desync = 0; // desynchronize the node from the
- // cluster
-my_bool wsrep_load_data_splitting = 1; // commit load data every 10K intervals
-my_bool wsrep_restart_slave = 0; // should mysql slave thread be
- // restarted, if node joins back
-my_bool wsrep_restart_slave_activated = 0; // node has dropped, and slave
- // restart will be needed
-my_bool wsrep_slave_UK_checks = 0; // slave thread does UK checks
-my_bool wsrep_slave_FK_checks = 0; // slave thread does FK checks
-bool wsrep_new_cluster = false; // Bootstrap the cluster ?
-
-// Use wsrep_gtid_domain_id for galera transactions?
-bool wsrep_gtid_mode = 0;
-// gtid_domain_id for galera transactions.
-uint32 wsrep_gtid_domain_id = 0;
+/* System variables. */
+const char *wsrep_provider;
+const char *wsrep_provider_options;
+const char *wsrep_cluster_address;
+const char *wsrep_cluster_name;
+const char *wsrep_node_name;
+const char *wsrep_node_address;
+const char *wsrep_node_incoming_address;
+const char *wsrep_start_position;
+const char *wsrep_data_home_dir;
+const char *wsrep_dbug_option;
+const char *wsrep_notify_cmd;
+const char *wsrep_sst_method;
+const char *wsrep_sst_receive_address;
+const char *wsrep_sst_donor;
+const char *wsrep_sst_auth;
+my_bool wsrep_debug; // Enable debug level logging
+my_bool wsrep_convert_LOCK_to_trx; // Convert locking sessions to trx
+my_bool wsrep_auto_increment_control; // Control auto increment variables
+my_bool wsrep_drupal_282555_workaround; // Retry autoinc insert after dupkey
+my_bool wsrep_certify_nonPK; // Certify, even when no primary key
+my_bool wsrep_recovery; // Recovery
+my_bool wsrep_replicate_myisam; // Enable MyISAM replication
+my_bool wsrep_log_conflicts;
+my_bool wsrep_load_data_splitting; // Commit load data every 10K intervals
+my_bool wsrep_slave_UK_checks; // Slave thread does UK checks
+my_bool wsrep_slave_FK_checks; // Slave thread does FK checks
+my_bool wsrep_sst_donor_rejects_queries;
+my_bool wsrep_restart_slave; // Should mysql slave thread be
+ // restarted, when node joins back?
+my_bool wsrep_desync; // De(re)synchronize the node from the
+ // cluster
+long wsrep_slave_threads; // No. of slave appliers threads
+ulong wsrep_retry_autocommit; // Retry aborted autocommit trx
+ulong wsrep_max_ws_size; // Max allowed ws (RBR buffer) size
+ulong wsrep_max_ws_rows; // Max number of rows in ws
+ulong wsrep_forced_binlog_format;
+ulong wsrep_mysql_replication_bundle;
+bool wsrep_gtid_mode; // Use wsrep_gtid_domain_id
+ // for galera transactions?
+uint32 wsrep_gtid_domain_id; // gtid_domain_id for galera
+ // transactions
+
+/* Other configuration variables and their default values. */
+my_bool wsrep_incremental_data_collection= 0; // Incremental data collection
+my_bool wsrep_restart_slave_activated= 0; // Node has dropped, and slave
+ // restart will be needed
+bool wsrep_new_cluster= false; // Bootstrap the cluster?
+int wsrep_slave_count_change= 0; // No. of appliers to stop/start
+int wsrep_to_isolation= 0; // No. of active TO isolation threads
+long wsrep_max_protocol_version= 3; // Maximum protocol version to use
/*
* End configuration options
@@ -169,7 +184,7 @@ static PSI_file_info wsrep_files[]=
my_bool wsrep_inited = 0; // initialized ?
-static const wsrep_uuid_t cluster_uuid = WSREP_UUID_UNDEFINED;
+static wsrep_uuid_t cluster_uuid = WSREP_UUID_UNDEFINED;
static char cluster_uuid_str[40]= { 0, };
static const char* cluster_status_str[WSREP_VIEW_MAX] =
{
@@ -562,7 +577,7 @@ int wsrep_init()
return 1;
}
- wsrep_sst_auth_init(wsrep_sst_auth);
+ wsrep_sst_auth_init();
wsrep_ready_set(FALSE);
assert(wsrep_provider);
@@ -576,8 +591,7 @@ int wsrep_init()
WSREP_ERROR("wsrep_load(%s) failed: %s (%d). Reverting to no provider.",
wsrep_provider, strerror(rcode), rcode);
strcpy((char*)wsrep_provider, WSREP_NONE); // damn it's a dirty hack
- (void) wsrep_init();
- return rcode;
+ return wsrep_init();
}
else /* this is for recursive call above */
{
@@ -789,8 +803,11 @@ void wsrep_init_startup (bool first)
wsrep_debug, wsrep_convert_LOCK_to_trx,
(wsrep_on_fun)wsrep_on);
+ /* Skip replication start if dummy wsrep provider is loaded */
+ if (!strcmp(wsrep_provider, WSREP_NONE)) return;
+
/* Skip replication start if no cluster address */
- if (!wsrep_cluster_address || strlen(wsrep_cluster_address) == 0) return;
+ if (!wsrep_cluster_address || wsrep_cluster_address[0] == 0) return;
if (first) wsrep_sst_grab(); // do it so we can wait for SST below
@@ -903,7 +920,7 @@ bool wsrep_start_replication()
return true;
}
- if (!wsrep_cluster_address || strlen(wsrep_cluster_address)== 0)
+ if (!wsrep_cluster_address || wsrep_cluster_address[0]== 0)
{
// if provider is non-trivial, but no address is specified, wait for address
wsrep_ready_set(FALSE);
@@ -1404,6 +1421,12 @@ static int wsrep_TOI_begin(THD *thd, char *db_, char *table_,
case SQLCOM_ALTER_EVENT:
buf_err= wsrep_alter_event_query(thd, &buf, &buf_len);
break;
+ case SQLCOM_CREATE_ROLE:
+ if (sp_process_definer(thd))
+ {
+ WSREP_WARN("Failed to set CREATE ROLE definer for TOI.");
+ }
+ /* fallthrough */
default:
buf_err= wsrep_to_buf_helper(thd, thd->query(), thd->query_length(), &buf,
&buf_len);
@@ -1478,19 +1501,15 @@ static int wsrep_RSU_begin(THD *thd, char *db_, char *table_)
WSREP_DEBUG("RSU BEGIN: %lld, %d : %s", (long long)wsrep_thd_trx_seqno(thd),
thd->wsrep_exec_mode, thd->query() );
- if (!wsrep_desync)
+ ret = wsrep->desync(wsrep);
+ if (ret != WSREP_OK)
{
- ret = wsrep->desync(wsrep);
- if (ret != WSREP_OK)
- {
- WSREP_WARN("RSU desync failed %d for schema: %s, query: %s",
- ret, (thd->db ? thd->db : "(null)"), thd->query());
- my_error(ER_LOCK_DEADLOCK, MYF(0));
- return(ret);
- }
+ WSREP_WARN("RSU desync failed %d for schema: %s, query: %s",
+ ret, (thd->db ? thd->db : "(null)"), thd->query());
+ my_error(ER_LOCK_DEADLOCK, MYF(0));
+ return(ret);
}
- else
- WSREP_DEBUG("RSU desync skipped: %d", wsrep_desync);
+
mysql_mutex_lock(&LOCK_wsrep_replaying);
wsrep_replaying++;
mysql_mutex_unlock(&LOCK_wsrep_replaying);
@@ -1505,15 +1524,13 @@ static int wsrep_RSU_begin(THD *thd, char *db_, char *table_)
wsrep_replaying--;
mysql_mutex_unlock(&LOCK_wsrep_replaying);
- if (!wsrep_desync)
+ ret = wsrep->resync(wsrep);
+ if (ret != WSREP_OK)
{
- ret = wsrep->resync(wsrep);
- if (ret != WSREP_OK)
- {
- WSREP_WARN("resync failed %d for schema: %s, query: %s",
- ret, (thd->db ? thd->db : "(null)"), thd->query());
- }
+ WSREP_WARN("resync failed %d for schema: %s, query: %s",
+ ret, (thd->db ? thd->db : "(null)"), thd->query());
}
+
my_error(ER_LOCK_DEADLOCK, MYF(0));
return(1);
}
@@ -1549,18 +1566,15 @@ static void wsrep_RSU_end(THD *thd)
(thd->db ? thd->db : "(null)"),
thd->query());
}
- if (!wsrep_desync)
+
+ ret = wsrep->resync(wsrep);
+ if (ret != WSREP_OK)
{
- ret = wsrep->resync(wsrep);
- if (ret != WSREP_OK)
- {
- WSREP_WARN("resync failed %d for schema: %s, query: %s", ret,
- (thd->db ? thd->db : "(null)"), thd->query());
- return;
- }
+ WSREP_WARN("resync failed %d for schema: %s, query: %s", ret,
+ (thd->db ? thd->db : "(null)"), thd->query());
+ return;
}
- else
- WSREP_DEBUG("RSU resync skipped: %d", wsrep_desync);
+
thd->variables.wsrep_on = 1;
}
@@ -1684,22 +1698,41 @@ void wsrep_to_isolation_end(THD *thd)
@retval FALSE Lock request cannot be granted
*/
-bool
-wsrep_grant_mdl_exception(MDL_context *requestor_ctx,
- MDL_ticket *ticket,
- const MDL_key *key
-) {
+bool wsrep_grant_mdl_exception(MDL_context *requestor_ctx,
+ MDL_ticket *ticket,
+ const MDL_key *key)
+{
/* Fallback to the non-wsrep behaviour */
if (!WSREP_ON) return FALSE;
- THD *request_thd = requestor_ctx->get_thd();
- THD *granted_thd = ticket->get_ctx()->get_thd();
- bool ret = FALSE;
+ THD *request_thd= requestor_ctx->get_thd();
+ THD *granted_thd= ticket->get_ctx()->get_thd();
+ bool ret= false;
const char* schema= key->db_name();
int schema_len= key->db_name_length();
mysql_mutex_lock(&request_thd->LOCK_wsrep_thd);
+
+ /*
+ We consider granting MDL exceptions only for appliers (BF THD) and ones
+ executing under TOI mode.
+
+ Rules:
+ 1. If granted/owner THD is also an applier (BF THD) or one executing
+ under TOI mode, then we grant the requested lock to the requester
+ THD.
+ @return true
+
+ 2. If granted/owner THD is executing a FLUSH command or already has an
+ explicit lock, then do not grant the requested lock to the requester
+ THD and it has to wait.
+ @return false
+
+ 3. In all other cases the granted/owner THD is aborted and the requested
+ lock is not granted to the requester THD, thus it has to wait.
+ @return false
+ */
if (request_thd->wsrep_exec_mode == TOTAL_ORDER ||
request_thd->wsrep_exec_mode == REPL_RECV)
{
@@ -1716,7 +1749,7 @@ wsrep_grant_mdl_exception(MDL_context *requestor_ctx,
request_thd, granted_thd);
ticket->wsrep_report(true);
mysql_mutex_unlock(&granted_thd->LOCK_wsrep_thd);
- ret = TRUE;
+ ret= true;
}
else if (granted_thd->lex->sql_command == SQLCOM_FLUSH ||
granted_thd->mdl_context.has_explicit_locks())
@@ -1724,38 +1757,39 @@ wsrep_grant_mdl_exception(MDL_context *requestor_ctx,
WSREP_DEBUG("BF thread waiting for FLUSH");
ticket->wsrep_report(wsrep_debug);
mysql_mutex_unlock(&granted_thd->LOCK_wsrep_thd);
- ret = FALSE;
- }
- else if (request_thd->lex->sql_command == SQLCOM_DROP_TABLE)
- {
- WSREP_DEBUG("DROP caused BF abort");
- ticket->wsrep_report(wsrep_debug);
- mysql_mutex_unlock(&granted_thd->LOCK_wsrep_thd);
- wsrep_abort_thd((void*)request_thd, (void*)granted_thd, 1);
- ret = FALSE;
- }
- else if (granted_thd->wsrep_query_state == QUERY_COMMITTING)
- {
- WSREP_DEBUG("MDL granted, but committing thd abort scheduled");
- ticket->wsrep_report(wsrep_debug);
- mysql_mutex_unlock(&granted_thd->LOCK_wsrep_thd);
- wsrep_abort_thd((void*)request_thd, (void*)granted_thd, 1);
- ret = FALSE;
+ ret= false;
}
else
{
- WSREP_MDL_LOG(DEBUG, "MDL conflict-> BF abort", schema, schema_len,
- request_thd, granted_thd);
- ticket->wsrep_report(wsrep_debug);
+ /* Print some debug information. */
+ if (wsrep_debug)
+ {
+ if ((request_thd->lex->sql_command == SQLCOM_DROP_TABLE))
+ {
+ WSREP_DEBUG("DROP caused BF abort");
+ }
+ else if ((granted_thd->wsrep_query_state == QUERY_COMMITTING))
+ {
+ WSREP_DEBUG("MDL granted, but committing thd abort scheduled");
+ }
+ else
+ {
+ WSREP_MDL_LOG(DEBUG, "MDL conflict-> BF abort", schema, schema_len,
+ request_thd, granted_thd);
+ }
+ ticket->wsrep_report(true);
+ }
+
mysql_mutex_unlock(&granted_thd->LOCK_wsrep_thd);
- wsrep_abort_thd((void*)request_thd, (void*)granted_thd, 1);
- ret = FALSE;
+ wsrep_abort_thd((void *) request_thd, (void *) granted_thd, 1);
+ ret= false;
}
}
else
{
mysql_mutex_unlock(&request_thd->LOCK_wsrep_thd);
}
+
return ret;
}
@@ -2620,3 +2654,13 @@ void wsrep_aborting_thd_enqueue(THD *thd)
aborting->next = wsrep_aborting_thd;
wsrep_aborting_thd = aborting;
}
+
+bool wsrep_node_is_donor()
+{
+ return (WSREP_ON) ? (wsrep_config_state->get_status() == 2) : false;
+}
+
+bool wsrep_node_is_synced()
+{
+ return (WSREP_ON) ? (wsrep_config_state->get_status() == 4) : false;
+}
diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h
index ea81384da75..04ccc1a7e45 100644
--- a/sql/wsrep_mysqld.h
+++ b/sql/wsrep_mysqld.h
@@ -50,6 +50,7 @@ struct wsrep_thd_shadow {
ulong tx_isolation;
char *db;
size_t db_length;
+ my_hrtime_t user_time;
};
// Global wsrep parameters
@@ -168,9 +169,14 @@ extern void wsrep_prepend_PATH (const char* path);
/* Other global variables */
extern wsrep_seqno_t wsrep_locked_seqno;
-#define WSREP_ON \
+#define WSREP_ON \
(global_system_variables.wsrep_on)
+#define WSREP_ON_NEW \
+ ((global_system_variables.wsrep_on) && \
+ wsrep_provider && \
+ strcmp(wsrep_provider, WSREP_NONE))
+
#define WSREP(thd) \
(WSREP_ON && wsrep && (thd && thd->variables.wsrep_on))
@@ -307,6 +313,8 @@ void wsrep_replay_transaction(THD *thd);
bool wsrep_create_like_table(THD* thd, TABLE_LIST* table,
TABLE_LIST* src_table,
HA_CREATE_INFO *create_info);
+bool wsrep_node_is_donor();
+bool wsrep_node_is_synced();
#else /* WITH_WSREP */
diff --git a/sql/wsrep_notify.cc b/sql/wsrep_notify.cc
index e7d30d5a9c1..d1beb9c38d6 100644
--- a/sql/wsrep_notify.cc
+++ b/sql/wsrep_notify.cc
@@ -17,7 +17,6 @@
#include "wsrep_priv.h"
#include "wsrep_utils.h"
-const char* wsrep_notify_cmd="";
static const char* _status_str(wsrep_member_status_t status)
{
diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc
index 6d0cfc1c43a..50f54fddc95 100644
--- a/sql/wsrep_sst.cc
+++ b/sql/wsrep_sst.cc
@@ -34,14 +34,8 @@ char wsrep_defaults_file[FN_REFLEN * 2 + 10 +
sizeof(WSREP_SST_OPT_CONF) +
sizeof(WSREP_SST_OPT_EXTRA_CONF)] = {0};
-const char* wsrep_sst_method = WSREP_SST_DEFAULT;
-const char* wsrep_sst_receive_address = WSREP_SST_ADDRESS_AUTO;
-const char* wsrep_sst_donor = "";
- char* wsrep_sst_auth = NULL;
-
// container for real auth string
static const char* sst_auth_real = NULL;
-my_bool wsrep_sst_donor_rejects_queries = FALSE;
bool wsrep_sst_method_check (sys_var *self, THD* thd, set_var* var)
{
@@ -175,10 +169,9 @@ bool wsrep_sst_auth_update (sys_var *self, THD* thd, enum_var_type type)
return sst_auth_real_set (wsrep_sst_auth);
}
-void wsrep_sst_auth_init (const char* value)
+void wsrep_sst_auth_init ()
{
- if (wsrep_sst_auth == value) wsrep_sst_auth = NULL;
- if (value) sst_auth_real_set (value);
+ sst_auth_real_set(wsrep_sst_auth);
}
bool wsrep_sst_donor_check (sys_var *self, THD* thd, set_var* var)
@@ -535,7 +528,7 @@ static void* sst_joiner_thread (void* a)
} else {
// Scan state ID first followed by wsrep_gtid_domain_id.
char uuid[512];
- long int domain_id;
+ unsigned long int domain_id;
size_t len= pos - out + 1;
if (len > sizeof(uuid)) goto err; // safety check
@@ -549,11 +542,11 @@ static void* sst_joiner_thread (void* a)
else if (wsrep_gtid_mode)
{
errno= 0; /* Reset the errno */
- domain_id= strtol(pos + 1, NULL, 10);
+ domain_id= strtoul(pos + 1, NULL, 10);
err= errno;
/* Check if we received a valid gtid_domain_id. */
- if (err == EINVAL || err == ERANGE || domain_id < 0x0 || domain_id > 0xFFFF)
+ if (err == EINVAL || err == ERANGE)
{
WSREP_ERROR("Failed to get donor wsrep_gtid_domain_id.");
err= EINVAL;
@@ -1178,6 +1171,16 @@ wait_signal:
if (!err)
{
sst_disallow_writes (thd.ptr, true);
+ /*
+ Lets also keep statements that modify binary logs (like RESET LOGS,
+ RESET MASTER) from proceeding until the files have been transferred
+ to the joiner node.
+ */
+ if (mysql_bin_log.is_open())
+ {
+ mysql_mutex_lock(mysql_bin_log.get_log_lock());
+ }
+
locked= true;
goto wait_signal;
}
@@ -1186,6 +1189,11 @@ wait_signal:
{
if (locked)
{
+ if (mysql_bin_log.is_open())
+ {
+ mysql_mutex_assert_owner(mysql_bin_log.get_log_lock());
+ mysql_mutex_unlock(mysql_bin_log.get_log_lock());
+ }
sst_disallow_writes (thd.ptr, false);
thd.ptr->global_read_lock.unlock_global_read_lock (thd.ptr);
locked= false;
@@ -1218,6 +1226,11 @@ wait_signal:
if (locked) // don't forget to unlock server before return
{
+ if (mysql_bin_log.is_open())
+ {
+ mysql_mutex_assert_owner(mysql_bin_log.get_log_lock());
+ mysql_mutex_unlock(mysql_bin_log.get_log_lock());
+ }
sst_disallow_writes (thd.ptr, false);
thd.ptr->global_read_lock.unlock_global_read_lock (thd.ptr);
}
diff --git a/sql/wsrep_sst.h b/sql/wsrep_sst.h
index 512da060599..460046bc4ad 100644
--- a/sql/wsrep_sst.h
+++ b/sql/wsrep_sst.h
@@ -55,8 +55,8 @@
extern const char* wsrep_sst_method;
extern const char* wsrep_sst_receive_address;
extern const char* wsrep_sst_donor;
-extern char* wsrep_sst_auth;
-extern my_bool wsrep_sst_donor_rejects_queries;
+extern const char* wsrep_sst_auth;
+extern my_bool wsrep_sst_donor_rejects_queries;
/*! Synchronizes applier thread start with init thread */
extern void wsrep_sst_grab();
@@ -64,6 +64,7 @@ extern void wsrep_sst_grab();
extern bool wsrep_sst_wait();
/*! Signals wsrep that initialization is complete, writesets can be applied */
extern bool wsrep_sst_continue();
+extern void wsrep_sst_auth_init();
extern void wsrep_sst_auth_free();
extern void wsrep_SE_init_grab(); /*! grab init critical section */
diff --git a/sql/wsrep_thd.cc b/sql/wsrep_thd.cc
index 36768a37973..a810a5a44ae 100644
--- a/sql/wsrep_thd.cc
+++ b/sql/wsrep_thd.cc
@@ -143,6 +143,9 @@ static void wsrep_prepare_bf_thd(THD *thd, struct wsrep_thd_shadow* shadow)
shadow->wsrep_exec_mode = thd->wsrep_exec_mode;
shadow->vio = thd->net.vio;
+ // Disable general logging on applier threads
+ thd->variables.option_bits |= OPTION_LOG_OFF;
+ // Enable binlogging if opt_log_slave_updates is set
if (opt_log_slave_updates)
thd->variables.option_bits|= OPTION_BIN_LOG;
else
@@ -164,6 +167,7 @@ static void wsrep_prepare_bf_thd(THD *thd, struct wsrep_thd_shadow* shadow)
shadow->db = thd->db;
shadow->db_length = thd->db_length;
+ shadow->user_time = thd->user_time;
thd->reset_db(NULL, 0);
}
@@ -174,6 +178,7 @@ static void wsrep_return_from_bf_mode(THD *thd, struct wsrep_thd_shadow* shadow)
thd->wsrep_exec_mode = shadow->wsrep_exec_mode;
thd->net.vio = shadow->vio;
thd->variables.tx_isolation = shadow->tx_isolation;
+ thd->user_time = shadow->user_time;
thd->reset_db(shadow->db, shadow->db_length);
delete thd->system_thread_info.rpl_sql_info;
@@ -187,6 +192,7 @@ static void wsrep_return_from_bf_mode(THD *thd, struct wsrep_thd_shadow* shadow)
void wsrep_replay_transaction(THD *thd)
{
+ DBUG_ENTER("wsrep_replay_transaction");
/* checking if BF trx must be replayed */
if (thd->wsrep_conflict_state== MUST_REPLAY) {
DBUG_ASSERT(wsrep_thd_trx_seqno(thd));
@@ -195,6 +201,13 @@ void wsrep_replay_transaction(THD *thd)
{
WSREP_ERROR("replay issue, thd has reported status already");
}
+
+ /*
+ PS reprepare observer should have been removed already.
+ open_table() will fail if we have dangling observer here.
+ */
+ DBUG_ASSERT(thd->m_reprepare_observer == NULL);
+
thd->get_stmt_da()->reset_diagnostics_area();
thd->wsrep_conflict_state= REPLAYING;
@@ -301,6 +314,7 @@ void wsrep_replay_transaction(THD *thd)
mysql_mutex_unlock(&LOCK_wsrep_replaying);
}
}
+ DBUG_VOID_RETURN;
}
static void wsrep_replication_process(THD *thd)
diff --git a/sql/wsrep_var.cc b/sql/wsrep_var.cc
index 8e443b573cb..bb5ee7baa57 100644
--- a/sql/wsrep_var.cc
+++ b/sql/wsrep_var.cc
@@ -26,14 +26,6 @@
#include <cstdio>
#include <cstdlib>
-const char* wsrep_provider = 0;
-const char* wsrep_provider_options = 0;
-const char* wsrep_cluster_address = 0;
-const char* wsrep_cluster_name = 0;
-const char* wsrep_node_name = 0;
-const char* wsrep_node_address = 0;
-const char* wsrep_node_incoming_address = 0;
-const char* wsrep_start_position = 0;
int wsrep_init_vars()
{
@@ -45,8 +37,6 @@ int wsrep_init_vars()
wsrep_node_address = my_strdup("", MYF(MY_WME));
wsrep_node_incoming_address= my_strdup(WSREP_NODE_INCOMING_AUTO, MYF(MY_WME));
wsrep_start_position = my_strdup(WSREP_START_POSITION_ZERO, MYF(MY_WME));
-
- global_system_variables.binlog_format=BINLOG_FORMAT_ROW;
return 0;
}
@@ -203,16 +193,46 @@ bool wsrep_start_position_init (const char* val)
return false;
}
+static int get_provider_option_value(const char* opts,
+ const char* opt_name,
+ ulong* opt_value)
+{
+ int ret= 1;
+ ulong opt_value_tmp;
+ char *opt_value_str, *s, *opts_copy= my_strdup(opts, MYF(MY_WME));
+
+ if ((opt_value_str= strstr(opts_copy, opt_name)) == NULL)
+ goto end;
+ opt_value_str= strtok_r(opt_value_str, "=", &s);
+ if (opt_value_str == NULL) goto end;
+ opt_value_str= strtok_r(NULL, ";", &s);
+ if (opt_value_str == NULL) goto end;
+
+ opt_value_tmp= strtoul(opt_value_str, NULL, 10);
+ if (errno == ERANGE) goto end;
+
+ *opt_value= opt_value_tmp;
+ ret= 0;
+
+end:
+ my_free(opts_copy);
+ return ret;
+}
+
static bool refresh_provider_options()
{
+ DBUG_ASSERT(wsrep);
+
WSREP_DEBUG("refresh_provider_options: %s",
(wsrep_provider_options) ? wsrep_provider_options : "null");
char* opts= wsrep->options_get(wsrep);
if (opts)
{
- if (wsrep_provider_options) my_free((void *)wsrep_provider_options);
- wsrep_provider_options = (char*)my_memdup(opts, strlen(opts) + 1,
- MYF(MY_WME));
+ wsrep_provider_options_init(opts);
+ get_provider_option_value(wsrep_provider_options,
+ (char*)"repl.max_ws_size",
+ &wsrep_max_ws_size);
+ free(opts);
}
else
{
@@ -327,17 +347,17 @@ void wsrep_provider_init (const char* value)
bool wsrep_provider_options_check(sys_var *self, THD* thd, set_var* var)
{
- return 0;
-}
-
-bool wsrep_provider_options_update(sys_var *self, THD* thd, enum_var_type type)
-{
if (wsrep == NULL)
{
my_message(ER_WRONG_ARGUMENTS, "WSREP (galera) not started", MYF(0));
return true;
}
+ return false;
+}
+bool wsrep_provider_options_update(sys_var *self, THD* thd, enum_var_type type)
+{
+ DBUG_ASSERT(wsrep);
wsrep_status_t ret= wsrep->options_set(wsrep, wsrep_provider_options);
if (ret != WSREP_OK)
{
@@ -366,14 +386,14 @@ bool wsrep_cluster_address_check (sys_var *self, THD* thd, set_var* var)
char addr_buf[FN_REFLEN];
if ((! var->save_result.string_value.str) ||
- (var->save_result.string_value.length > (FN_REFLEN - 1))) // safety
+ (var->save_result.string_value.length >= sizeof(addr_buf))) // safety
goto err;
- memcpy(addr_buf, var->save_result.string_value.str,
- var->save_result.string_value.length);
- addr_buf[var->save_result.string_value.length]= 0;
+ strmake(addr_buf, var->save_result.string_value.str,
+ MY_MIN(sizeof(addr_buf)-1, var->save_result.string_value.length));
- if (!wsrep_cluster_address_verify(addr_buf)) return 0;
+ if (!wsrep_cluster_address_verify(addr_buf))
+ return 0;
err:
my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), var->var->name.str,
@@ -431,8 +451,8 @@ void wsrep_cluster_address_init (const char* value)
(wsrep_cluster_address) ? wsrep_cluster_address : "null",
(value) ? value : "null");
- if (wsrep_cluster_address) my_free ((void*)wsrep_cluster_address);
- wsrep_cluster_address = (value) ? my_strdup(value, MYF(0)) : NULL;
+ my_free((void*) wsrep_cluster_address);
+ wsrep_cluster_address= my_strdup(value ? value : "", MYF(0));
}
/* wsrep_cluster_name cannot be NULL or an empty string. */
@@ -530,6 +550,12 @@ bool wsrep_slave_threads_update (sys_var *self, THD* thd, enum_var_type type)
bool wsrep_desync_check (sys_var *self, THD* thd, set_var* var)
{
+ if (wsrep == NULL)
+ {
+ my_message(ER_WRONG_ARGUMENTS, "WSREP (galera) not started", MYF(0));
+ return true;
+ }
+
bool new_wsrep_desync= (bool) var->save_result.ulonglong_value;
if (wsrep_desync == new_wsrep_desync) {
if (new_wsrep_desync) {
@@ -541,20 +567,10 @@ bool wsrep_desync_check (sys_var *self, THD* thd, set_var* var)
ER_WRONG_VALUE_FOR_VAR,
"'wsrep_desync' is already OFF.");
}
+ return false;
}
- return 0;
-}
-
-bool wsrep_desync_update (sys_var *self, THD* thd, enum_var_type type)
-{
- if (wsrep == NULL)
- {
- my_message(ER_WRONG_ARGUMENTS, "WSREP (galera) not started", MYF(0));
- return true;
- }
-
wsrep_status_t ret(WSREP_WARNING);
- if (wsrep_desync) {
+ if (new_wsrep_desync) {
ret = wsrep->desync (wsrep);
if (ret != WSREP_OK) {
WSREP_WARN ("SET desync failed %d for schema: %s, query: %s", ret,
@@ -576,6 +592,39 @@ bool wsrep_desync_update (sys_var *self, THD* thd, enum_var_type type)
return false;
}
+bool wsrep_desync_update (sys_var *self, THD* thd, enum_var_type type)
+{
+ DBUG_ASSERT(wsrep);
+ return false;
+}
+
+bool wsrep_max_ws_size_check(sys_var *self, THD* thd, set_var* var)
+{
+ if (wsrep == NULL)
+ {
+ my_message(ER_WRONG_ARGUMENTS, "WSREP (galera) not started", MYF(0));
+ return true;
+ }
+ return false;
+}
+
+bool wsrep_max_ws_size_update (sys_var *self, THD *thd, enum_var_type)
+{
+ DBUG_ASSERT(wsrep);
+
+ char max_ws_size_opt[128];
+ my_snprintf(max_ws_size_opt, sizeof(max_ws_size_opt),
+ "repl.max_ws_size=%d", wsrep_max_ws_size);
+ wsrep_status_t ret= wsrep->options_set(wsrep, max_ws_size_opt);
+ if (ret != WSREP_OK)
+ {
+ WSREP_ERROR("Set options returned %d", ret);
+ refresh_provider_options();
+ return true;
+ }
+ return refresh_provider_options();
+}
+
static SHOW_VAR wsrep_status_vars[]=
{
{"connected", (char*) &wsrep_connected, SHOW_BOOL},
diff --git a/sql/wsrep_var.h b/sql/wsrep_var.h
index 202d6e393e0..1509fc7d589 100644
--- a/sql/wsrep_var.h
+++ b/sql/wsrep_var.h
@@ -81,7 +81,6 @@ extern bool wsrep_sst_receive_address_update UPDATE_ARGS;
extern bool wsrep_sst_auth_check CHECK_ARGS;
extern bool wsrep_sst_auth_update UPDATE_ARGS;
-extern void wsrep_sst_auth_init INIT_ARGS;
extern bool wsrep_sst_donor_check CHECK_ARGS;
extern bool wsrep_sst_donor_update UPDATE_ARGS;
@@ -92,13 +91,15 @@ extern bool wsrep_slave_threads_update UPDATE_ARGS;
extern bool wsrep_desync_check CHECK_ARGS;
extern bool wsrep_desync_update UPDATE_ARGS;
+extern bool wsrep_max_ws_size_check CHECK_ARGS;
+extern bool wsrep_max_ws_size_update UPDATE_ARGS;
+
#else /* WITH_WSREP */
#define WSREP_NONE
#define wsrep_provider_init(X)
#define wsrep_init_vars() (0)
#define wsrep_start_position_init(X)
-#define wsrep_sst_auth_init(X)
#endif /* WITH_WSREP */
#endif /* WSREP_VAR_H */
diff --git a/storage/connect/ApacheInterface.java b/storage/connect/ApacheInterface.java
new file mode 100644
index 00000000000..b4c8a4e9885
--- /dev/null
+++ b/storage/connect/ApacheInterface.java
@@ -0,0 +1,58 @@
+package wrappers;
+
+import java.sql.*;
+import java.util.Hashtable;
+import org.apache.commons.dbcp2.BasicDataSource;
+
+public class ApacheInterface extends JdbcInterface {
+ static Hashtable<String,BasicDataSource> pool = new Hashtable<String, BasicDataSource>();
+
+ public ApacheInterface() {
+ this(true);
+ } // end of default constructor
+
+ public ApacheInterface(boolean b) {
+ super(b);
+ } // end of constructor
+
+ @Override
+ public int JdbcConnect(String[] parms, int fsize, boolean scrollable) {
+ int rc = 0;
+ String url = parms[1];
+ BasicDataSource ds = null;
+
+ if (DEBUG)
+ System.out.println("Connecting to Apache data source");
+
+ try {
+ CheckURL(url, null);
+
+ if ((ds = pool.get(url)) == null) {
+ ds = new BasicDataSource();
+ ds.setDriverClassName(parms[0]);
+ ds.setUrl(url);
+ ds.setUsername(parms[2]);
+ ds.setPassword(parms[3]);
+ pool.put(url, ds);
+ } // endif ds
+
+ // Get a connection from the data source
+ conn = ds.getConnection();
+
+ // Get the data base meta data object
+ dbmd = conn.getMetaData();
+
+ // Get a statement from the connection
+ stmt = GetStmt(fsize, scrollable);
+ } catch (SQLException se) {
+ SetErrmsg(se);
+ rc = -2;
+ } catch (Exception e) {
+ SetErrmsg(e);
+ rc = -3;
+ } // end try/catch
+
+ return rc;
+ } // end of JdbcConnect
+
+} // end of class ApacheInterface
diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt
index c6b808acc60..95d88538119 100644
--- a/storage/connect/CMakeLists.txt
+++ b/storage/connect/CMakeLists.txt
@@ -235,25 +235,29 @@ ENDIF(CONNECT_WITH_ODBC)
#
# JDBC
#
-
-OPTION(CONNECT_WITH_JDBC "Compile CONNECT storage engine with JDBC support" ON)
+IF(APPLE)
+ OPTION(CONNECT_WITH_JDBC "some comment" OFF)
+ELSE()
+ OPTION(CONNECT_WITH_JDBC "some comment" ON)
+ENDIF()
IF(CONNECT_WITH_JDBC)
- # TODO: detect Java SDK and the presence of JDBC connectors
- # TODO: Find how to compile and install the java wrapper class
- # Find required libraries and include directories
-
FIND_PACKAGE(Java 1.6)
FIND_PACKAGE(JNI)
IF (JAVA_FOUND AND JNI_FOUND)
+ INCLUDE(UseJava)
INCLUDE_DIRECTORIES(${JAVA_INCLUDE_PATH})
INCLUDE_DIRECTORIES(${JAVA_INCLUDE_PATH2})
- # SET(JDBC_LIBRARY ${JAVA_JVM_LIBRARY})
- SET(CONNECT_SOURCES ${CONNECT_SOURCES}
- JdbcInterface.java JdbcInterface.class
- JdbcDSInterface.java JdbcDSInterface.class
- JdbcApacheInterface.java JdbcApacheInterface.class
- jdbconn.cpp tabjdbc.cpp jdbconn.h tabjdbc.h jdbccat.h)
+ # SET(JDBC_LIBRARY ${JAVA_JVM_LIBRARY}) will be dynamically linked
+ SET(CONNECT_SOURCES ${CONNECT_SOURCES}
+ jdbconn.cpp tabjdbc.cpp jdbconn.h tabjdbc.h jdbccat.h
+ JdbcInterface.java ApacheInterface.java MariadbInterface.java
+ MysqlInterface.java OracleInterface.java PostgresqlInterface.java)
+ # TODO: Find how to compile and install the java wrapper classes
+ # Find required libraries and include directories
+ SET (JAVA_SOURCES JdbcInterface.java)
+ add_jar(JdbcInterface ${JAVA_SOURCES})
+ install_jar(JdbcInterface DESTINATION ${INSTALL_PLUGINDIR} COMPONENT connect-engine)
add_definitions(-DJDBC_SUPPORT)
ELSE()
SET(JDBC_LIBRARY "")
diff --git a/storage/connect/Client.java b/storage/connect/Client.java
new file mode 100644
index 00000000000..aaf1b7bf2f8
--- /dev/null
+++ b/storage/connect/Client.java
@@ -0,0 +1,183 @@
+package wrappers;
+
+import java.io.BufferedReader;
+import java.io.Console;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+public class Client {
+ static boolean DEBUG = true;
+ static final Console c = System.console();
+ static JdbcInterface jdi = null;
+
+ public static void main(String[] args) {
+ int rc, n, ncol, i = 0, fsize = 0;
+ boolean scrollable = false;
+ String s;
+ String[] parms = new String[4];
+
+ if (args.length > 0)
+ try {
+ i = Integer.parseInt(args[i]);
+ } catch (NumberFormatException e) {
+ i = 0;
+ } // end try/catch
+
+ switch (i) {
+ case 1:
+ jdi = new ApacheInterface(DEBUG);
+ break;
+ case 2:
+ jdi = new MysqlInterface(DEBUG);
+ break;
+ case 3:
+ jdi = new MariadbInterface(DEBUG);
+ break;
+ case 4:
+ jdi = new OracleInterface(DEBUG);
+ break;
+ case 5:
+ jdi = new PostgresqlInterface(DEBUG);
+ break;
+ default:
+ jdi = new JdbcInterface(DEBUG);
+ } // endswitch i
+
+ parms[0] = getLine("Driver: ", false);
+ parms[1] = getLine("URL: ", false);
+ parms[2] = getLine("User: ", false);
+ parms[3] = getLine("Password: ", true);
+ s = getLine("Fsize: ", false);
+ fsize = (s != null) ? Integer.parseInt(s) : 0;
+ s = getLine("Scrollable: ", false);
+ scrollable = (s != null) ? s.toLowerCase().charAt(0) != 'n' : false;
+
+ rc = jdi.JdbcConnect(parms, fsize, scrollable);
+
+ if (rc == 0) {
+ String query;
+ System.out.println("Successfully connected to " + parms[1]);
+
+ while ((query = getLine("Query: ", false)) != null) {
+ n = jdi.Execute(query);
+ System.out.println("Returned n = " + n);
+
+ if ((ncol = jdi.GetResult()) > 0)
+ PrintResult(ncol);
+ else
+ System.out.println("Affected rows = " + n);
+
+ } // endwhile
+
+ rc = jdi.JdbcDisconnect();
+ System.out.println("Disconnect returned " + rc);
+ } else
+ System.out.println(jdi.GetErrmsg() + " rc=" + rc);
+
+ } // end of main
+
+ private static void PrintResult(int ncol) {
+ // Get result set meta data
+ int i;
+ String columnName;
+
+ // Get the column names; column indices start from 1
+ for (i = 1; i <= ncol; i++) {
+ columnName = jdi.ColumnName(i);
+
+ if (columnName == null)
+ return;
+
+ // Get the name of the column's table name
+ //String tableName = rsmd.getTableName(i);
+
+ if (i > 1)
+ System.out.print("\t");
+
+ System.out.print(columnName);
+ } // endfor i
+
+ System.out.println();
+
+ // Loop through the result set
+ while (jdi.ReadNext() > 0) {
+ for (i = 1; i <= ncol; i++) {
+ if (i > 1)
+ System.out.print("\t");
+
+ if (DEBUG)
+ System.out.print("(" + jdi.ColumnType(i, null) + ")");
+
+ switch (jdi.ColumnType(i, null)) {
+ case java.sql.Types.VARCHAR:
+ case java.sql.Types.LONGVARCHAR:
+ case java.sql.Types.CHAR:
+ System.out.print(jdi.StringField(i, null));
+ break;
+ case java.sql.Types.INTEGER:
+ System.out.print(jdi.IntField(i, null));
+ break;
+ case java.sql.Types.BIGINT:
+ System.out.print(jdi.BigintField(i, null));
+ break;
+ case java.sql.Types.TIMESTAMP:
+ System.out.print(jdi.TimestampField(i, null));
+ break;
+ case java.sql.Types.TIME:
+ System.out.print(jdi.TimeField(i, null));
+ break;
+ case java.sql.Types.DATE:
+ System.out.print(jdi.DateField(i, null));
+ break;
+ case java.sql.Types.SMALLINT:
+ System.out.print(jdi.IntField(i, null));
+ break;
+ case java.sql.Types.DOUBLE:
+ case java.sql.Types.REAL:
+ case java.sql.Types.FLOAT:
+ case java.sql.Types.DECIMAL:
+ System.out.print(jdi.DoubleField(i, null));
+ break;
+ case java.sql.Types.BOOLEAN:
+ System.out.print(jdi.BooleanField(i, null));
+ default:
+ break;
+ } // endswitch Type
+
+ } // endfor i
+
+ System.out.println();
+ } // end while rs
+
+ } // end of PrintResult
+
+ // ==================================================================
+ private static String getLine(String p, boolean b) {
+ String response;
+
+ if (c != null) {
+ // Standard console mode
+ if (b) {
+ response = new String(c.readPassword(p));
+ } else
+ response = c.readLine(p);
+
+ } else {
+ // For instance when testing from Eclipse
+ BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
+
+ System.out.print(p);
+
+ try {
+ // Cannot suppress echo for password entry
+ response = in.readLine();
+ } catch (IOException e) {
+ response = "";
+ } // end of try/catch
+
+ } // endif c
+
+ return (response.isEmpty()) ? null : response;
+ } // end of getLine
+
+} // end of class Client
diff --git a/storage/connect/JdbcApacheInterface.class b/storage/connect/JdbcApacheInterface.class
deleted file mode 100644
index acd4258e3d3..00000000000
--- a/storage/connect/JdbcApacheInterface.class
+++ /dev/null
Binary files differ
diff --git a/storage/connect/JdbcApacheInterface.java b/storage/connect/JdbcApacheInterface.java
deleted file mode 100644
index fdbc5bff203..00000000000
--- a/storage/connect/JdbcApacheInterface.java
+++ /dev/null
@@ -1,709 +0,0 @@
-import java.math.*;
-import java.sql.*;
-import java.util.Collections;
-import java.util.Hashtable;
-import java.util.List;
-
-import org.apache.commons.dbcp2.BasicDataSource;
-
-public class JdbcApacheInterface {
- boolean DEBUG = false;
- String Errmsg = "No error";
- Connection conn = null;
- DatabaseMetaData dbmd = null;
- Statement stmt = null;
- PreparedStatement pstmt = null;
- ResultSet rs = null;
- ResultSetMetaData rsmd = null;
- static Hashtable<String,BasicDataSource> pool = new Hashtable<String, BasicDataSource>();
-
- // === Constructors/finalize =========================================
- public JdbcApacheInterface() {
- this(true);
- } // end of default constructor
-
- public JdbcApacheInterface(boolean b) {
- DEBUG = b;
- } // end of constructor
-
- private void SetErrmsg(Exception e) {
- if (DEBUG)
- System.out.println(e.getMessage());
-
- Errmsg = e.toString();
- } // end of SetErrmsg
-
- private void SetErrmsg(String s) {
- if (DEBUG)
- System.out.println(s);
-
- Errmsg = s;
- } // end of SetErrmsg
-
- public String GetErrmsg() {
- String err = Errmsg;
-
- Errmsg = "No error";
- return err;
- } // end of GetErrmsg
-
- public int JdbcConnect(String[] parms, int fsize, boolean scrollable) {
- int rc = 0;
- String url = parms[1];
- BasicDataSource ds = null;
-
- if (url == null) {
- SetErrmsg("URL cannot be null");
- return -1;
- } // endif url
-
- try {
- if ((ds = pool.get(url)) == null) {
- ds = new BasicDataSource();
- ds.setDriverClassName(parms[0]);
- ds.setUrl(url);
- ds.setUsername(parms[2]);
- ds.setPassword(parms[3]);
- pool.put(url, ds);
- } // endif ds
-
- // Get a connection from the data source
- conn = ds.getConnection();
-
- // Get the data base meta data object
- dbmd = conn.getMetaData();
-
- // Get a statement from the connection
- if (scrollable)
- stmt = conn.createStatement(java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE, java.sql.ResultSet.CONCUR_READ_ONLY);
- else
- stmt = conn.createStatement(java.sql.ResultSet.TYPE_FORWARD_ONLY, java.sql.ResultSet.CONCUR_READ_ONLY);
-
- if (DEBUG)
- System.out.println("Statement type = " + stmt.getResultSetType()
- + " concurrency = " + stmt.getResultSetConcurrency());
-
- if (DEBUG) // Get the fetch size of a statement
- System.out.println("Default fetch size = " + stmt.getFetchSize());
-
- if (fsize != 0) {
- // Set the fetch size
- stmt.setFetchSize(fsize);
-
- if (DEBUG)
- System.out.println("New fetch size = " + stmt.getFetchSize());
-
- } // endif fsize
-
- } catch (SQLException se) {
- SetErrmsg(se);
- rc = -2;
- } catch( Exception e ) {
- SetErrmsg(e);
- rc = -3;
- } // end try/catch
-
- return rc;
- } // end of JdbcConnect
-
- public int CreatePrepStmt(String sql) {
- int rc = 0;
-
- try {
- pstmt = conn.prepareStatement(sql);
- } catch (SQLException se) {
- SetErrmsg(se);
- rc = -1;
- } catch (Exception e) {
- SetErrmsg(e);
- rc = -2;
- } // end try/catch
-
- return rc;
- } // end of CreatePrepStmt
-
- public void SetStringParm(int i, String s) {
- try {
- pstmt.setString(i, s);
- } catch (Exception e) {
- SetErrmsg(e);
- } // end try/catch
-
- } // end of SetStringParm
-
- public void SetIntParm(int i, int n) {
- try {
- pstmt.setInt(i, n);
- } catch (Exception e) {
- SetErrmsg(e);
- } // end try/catch
-
- } // end of SetIntParm
-
- public void SetShortParm(int i, short n) {
- try {
- pstmt.setShort(i, n);
- } catch (Exception e) {
- SetErrmsg(e);
- } // end try/catch
-
- } // end of SetShortParm
-
- public void SetBigintParm(int i, long n) {
- try {
- pstmt.setLong(i, n);
- } catch (Exception e) {
- SetErrmsg(e);
- } // end try/catch
-
- } // end of SetBigintParm
-
- public void SetFloatParm(int i, float f) {
- try {
- pstmt.setFloat(i, f);
- } catch (Exception e) {
- SetErrmsg(e);
- } // end try/catch
-
- } // end of SetFloatParm
-
- public void SetDoubleParm(int i, double d) {
- try {
- pstmt.setDouble(i, d);
- } catch (Exception e) {
- SetErrmsg(e);
- } // end try/catch
-
- } // end of SetDoubleParm
-
- public void SetTimestampParm(int i, Timestamp t) {
- try {
- pstmt.setTimestamp(i, t);
- } catch (Exception e) {
- SetErrmsg(e);
- } // end try/catch
-
- } // end of SetTimestampParm
-
- public int ExecutePrep() {
- int n = -3;
-
- if (pstmt != null) try {
- n = pstmt.executeUpdate();
- } catch (SQLException se) {
- SetErrmsg(se);
- n = -1;
- } catch (Exception e) {
- SetErrmsg(e);
- n = -2;
- } //end try/catch
-
- return n;
- } // end of ExecutePrep
-
- public boolean ClosePrepStmt() {
- boolean b = false;
-
- if (pstmt != null) try {
- pstmt.close();
- pstmt = null;
- } catch (SQLException se) {
- SetErrmsg(se);
- b = true;
- } catch (Exception e) {
- SetErrmsg(e);
- b = true;
- } // end try/catch
-
- return b;
- } // end of ClosePrepStmt
-
- public int JdbcDisconnect() {
- int rc = 0;
-
- // Cancel pending statement
- if (stmt != null)
- try {
- System.out.println("Cancelling statement");
- stmt.cancel();
- } catch(SQLException se) {
- SetErrmsg(se);
- rc += 1;
- } // nothing more we can do
-
- // Close the statement and the connection
- if (rs != null)
- try {
- if (DEBUG)
- System.out.println("Closing result set");
-
- rs.close();
- } catch(SQLException se) {
- SetErrmsg(se);
- rc = 2;
- } // nothing more we can do
-
- if (stmt != null)
- try {
- if (DEBUG)
- System.out.println("Closing statement");
-
- stmt.close();
- } catch(SQLException se) {
- SetErrmsg(se);
- rc += 4;
- } // nothing more we can do
-
- ClosePrepStmt();
-
- if (conn != null)
- try {
- if (DEBUG)
- System.out.println("Closing connection");
-
- conn.close();
- } catch (SQLException se) {
- SetErrmsg(se);
- rc += 8;
- } //end try/catch
-
- if (DEBUG)
- System.out.println("All closed");
-
- return rc;
- } // end of JdbcDisconnect
-
- public int GetMaxValue(int n) {
- int m = 0;
-
- try {
- switch (n) {
- case 1: // Max columns in table
- m = dbmd.getMaxColumnsInTable();
- break;
- case 2: // Max catalog name length
- m = dbmd.getMaxCatalogNameLength();
- break;
- case 3: // Max schema name length
- m = dbmd.getMaxSchemaNameLength();
- break;
- case 4: // Max table name length
- m = dbmd.getMaxTableNameLength();
- break;
- case 5: // Max column name length
- m = dbmd.getMaxColumnNameLength();
- break;
- } // endswitch n
-
- } catch(Exception e) {
- SetErrmsg(e);
- m = -1;
- } // end try/catch
-
- return m;
- } // end of GetMaxValue
-
- public int GetColumns(String[] parms) {
- int ncol = 0;
-
- try {
- if (rs != null) rs.close();
- rs = dbmd.getColumns(parms[0], parms[1], parms[2], parms[3]);
-
- if (rs != null) {
- rsmd = rs.getMetaData();
- ncol = rsmd.getColumnCount();
- } // endif rs
-
- } catch(SQLException se) {
- SetErrmsg(se);
- } // end try/catch
-
- return ncol;
- } // end of GetColumns
-
- public int GetTables(String[] parms) {
- int ncol = 0;
- String[] typ = null;
-
- if (parms[3] != null) {
- typ = new String[1];
- typ[0] = parms[3];
- } // endif parms
-
- try {
- if (rs != null) rs.close();
- rs = dbmd.getTables(parms[0], parms[1], parms[2], typ);
-
- if (rs != null) {
- rsmd = rs.getMetaData();
- ncol = rsmd.getColumnCount();
- } // endif rs
-
- } catch(SQLException se) {
- SetErrmsg(se);
- } // end try/catch
-
- return ncol;
- } // end of GetColumns
-
- public int Execute(String query) {
- int n = 0;
-
- if (DEBUG)
- System.out.println("Executing '" + query + "'");
-
- try {
- boolean b = stmt.execute(query);
-
- if (b == false) {
- n = stmt.getUpdateCount();
- if (rs != null) rs.close();
- } // endif b
-
- if (DEBUG)
- System.out.println("Query '" + query + "' executed: n = " + n);
-
- } catch (SQLException se) {
- SetErrmsg(se);
- n = -1;
- } catch (Exception e) {
- SetErrmsg(e);
- n = -2;
- } //end try/catch
-
- return n;
- } // end of Execute
-
- public int GetResult() {
- int ncol = 0;
-
- try {
- rs = stmt.getResultSet();
-
- if (rs != null) {
- rsmd = rs.getMetaData();
- ncol = rsmd.getColumnCount();
-
- if (DEBUG)
- System.out.println("Result set has " + rsmd.getColumnCount() + " column(s)");
-
- } // endif rs
-
- } catch (SQLException se) {
- SetErrmsg(se);
- ncol = -1;
- } catch (Exception e) {
- SetErrmsg(e);
- ncol = -2;
- } //end try/catch
-
- return ncol;
- } // end of GetResult
-
- public int ExecuteQuery(String query) {
- int ncol = 0;
-
- if (DEBUG)
- System.out.println("Executing query '" + query + "'");
-
- try {
- rs = stmt.executeQuery(query);
- rsmd = rs.getMetaData();
- ncol = rsmd.getColumnCount();
-
- if (DEBUG) {
- System.out.println("Query '" + query + "' executed successfully");
- System.out.println("Result set has " + rsmd.getColumnCount() + " column(s)");
- } // endif DEBUG
-
- } catch (SQLException se) {
- SetErrmsg(se);
- ncol = -1;
- } catch (Exception e) {
- SetErrmsg(e);
- ncol = -2;
- } //end try/catch
-
- return ncol;
- } // end of ExecuteQuery
-
- public int ExecuteUpdate(String query) {
- int n = 0;
-
- if (DEBUG)
- System.out.println("Executing update query '" + query + "'");
-
- try {
- n = stmt.executeUpdate(query);
-
- if (DEBUG)
- System.out.println("Update Query '" + query + "' executed: n = " + n);
-
- } catch (SQLException se) {
- SetErrmsg(se);
- n = -1;
- } catch (Exception e) {
- SetErrmsg(e);
- n = -2;
- } //end try/catch
-
- return n;
- } // end of ExecuteUpdate
-
- public int ReadNext() {
- if (rs != null) {
- try {
- return rs.next() ? 1 : 0;
- } catch (SQLException se) {
- SetErrmsg(se);
- return -1;
- } //end try/catch
-
- } else
- return 0;
-
- } // end of ReadNext
-
- public boolean Fetch(int row) {
- if (rs != null) {
- try {
- return rs.absolute(row);
- } catch (SQLException se) {
- SetErrmsg(se);
- return false;
- } //end try/catch
-
- } else
- return false;
-
- } // end of Fetch
-
- public String ColumnName(int n) {
- if (rsmd == null) {
- System.out.println("No result metadata");
- } else try {
- return rsmd.getColumnLabel(n);
- } catch (SQLException se) {
- SetErrmsg(se);
- } //end try/catch
-
- return null;
- } // end of ColumnName
-
- public int ColumnType(int n, String name) {
- if (rsmd == null) {
- System.out.println("No result metadata");
- } else try {
- if (n == 0)
- n = rs.findColumn(name);
-
- return rsmd.getColumnType(n);
- } catch (SQLException se) {
- SetErrmsg(se);
- } //end try/catch
-
- return 666; // Not a type
- } // end of ColumnType
-
- public String ColumnDesc(int n, int[] val) {
- if (rsmd == null) {
- System.out.println("No result metadata");
- return null;
- } else try {
- val[0] = rsmd.getColumnType(n);
- val[1] = rsmd.getPrecision(n);
- val[2] = rsmd.getScale(n);
- val[3] = rsmd.isNullable(n);
- return rsmd.getColumnLabel(n);
- } catch (SQLException se) {
- SetErrmsg(se);
- } //end try/catch
-
- return null;
- } // end of ColumnDesc
-
- public String StringField(int n, String name) {
- if (rs == null) {
- System.out.println("No result set");
- } else try {
- return (n > 0) ? rs.getString(n) : rs.getString(name);
- } catch (SQLException se) {
- SetErrmsg(se);
- } //end try/catch
-
- return null;
- } // end of StringField
-
- public int IntField(int n, String name) {
- if (rs == null) {
- System.out.println("No result set");
- } else try {
- return (n > 0) ? rs.getInt(n) : rs.getInt(name);
- } catch (SQLException se) {
- SetErrmsg(se);
- } //end try/catch
-
- return 0;
- } // end of IntField
-
- public long BigintField(int n, String name) {
- if (rs == null) {
- System.out.println("No result set");
- } else try {
- BigDecimal bigDecimal = (n > 0) ? rs.getBigDecimal(n) : rs.getBigDecimal(name);
- return bigDecimal != null ? bigDecimal.longValue() : 0;
- } catch (SQLException se) {
- SetErrmsg(se);
- } //end try/catch
-
- return 0;
- } // end of BiginttField
-
- public double DoubleField(int n, String name) {
- if (rs == null) {
- System.out.println("No result set");
- } else try {
- return (n > 0) ? rs.getDouble(n) : rs.getDouble(name);
- } catch (SQLException se) {
- SetErrmsg(se);
- } //end try/catch
-
- return 0.;
- } // end of DoubleField
-
- public float FloatField(int n, String name) {
- if (rs == null) {
- System.out.println("No result set");
- } else try {
- return (n > 0) ? rs.getFloat(n) : rs.getFloat(name);
- } catch (SQLException se) {
- SetErrmsg(se);
- } //end try/catch
-
- return 0;
- } // end of FloatField
-
- public boolean BooleanField(int n, String name) {
- if (rs == null) {
- System.out.println("No result set");
- } else try {
- return (n > 0) ? rs.getBoolean(n) : rs.getBoolean(name);
- } catch (SQLException se) {
- SetErrmsg(se);
- } //end try/catch
-
- return false;
- } // end of BooleanField
-
- public Date DateField(int n, String name) {
- if (rs == null) {
- System.out.println("No result set");
- } else try {
- return (n > 0) ? rs.getDate(n) : rs.getDate(name);
- } catch (SQLException se) {
- SetErrmsg(se);
- } //end try/catch
-
- return null;
- } // end of DateField
-
- public Time TimeField(int n, String name) {
- if (rs == null) {
- System.out.println("No result set");
- } else try {
- return (n > 0) ? rs.getTime(n) : rs.getTime(name);
- } catch (SQLException se) {
- SetErrmsg(se);
- } //end try/catch
-
- return null;
- } // end of TimeField
-
- public Timestamp TimestampField(int n, String name) {
- if (rs == null) {
- System.out.println("No result set");
- } else try {
- return (n > 0) ? rs.getTimestamp(n) : rs.getTimestamp(name);
- } catch (SQLException se) {
- SetErrmsg(se);
- } //end try/catch
-
- return null;
- } // end of TimestampField
-
- public String ObjectField(int n, String name) {
- if (rs == null) {
- System.out.println("No result set");
- } else try {
- return (n > 0) ? rs.getObject(n).toString() : rs.getObject(name).toString();
- } catch (SQLException se) {
- SetErrmsg(se);
- } //end try/catch
-
- return null;
- } // end of ObjectField
-
- public int GetDrivers(String[] s, int mxs) {
- int n = 0;
- List<Driver> drivers = Collections.list(DriverManager.getDrivers());
- int size = Math.min(mxs, drivers.size());
-
- for (int i = 0; i < size; i++) {
- Driver driver = (Driver)drivers.get(i);
-
- // Get name of driver
- s[n++] = driver.getClass().getName();
-
- // Get version info
- s[n++] = driver.getMajorVersion() + "." + driver.getMinorVersion();
- s[n++] = driver.jdbcCompliant() ? "Yes" : "No";
- s[n++] = driver.toString();
- } // endfor i
-
- return size;
- } // end of GetDrivers
-
- /**
- * Adds the specified path to the java library path
- * from Fahd Shariff blog
- *
- * @param pathToAdd the path to add
- static public int addLibraryPath(String pathToAdd) {
- System.out.println("jpath = " + pathToAdd);
-
- try {
- Field usrPathsField = ClassLoader.class.getDeclaredField("usr_paths");
- usrPathsField.setAccessible(true);
-
- //get array of paths
- String[] paths = (String[])usrPathsField.get(null);
-
- //check if the path to add is already present
- for (String path : paths) {
- System.out.println("path = " + path);
-
- if (path.equals(pathToAdd))
- return -5;
-
- } // endfor path
-
- //add the new path
- String[] newPaths = Arrays.copyOf(paths, paths.length + 1);
- newPaths[paths.length] = pathToAdd;
- usrPathsField.set(null, newPaths);
- System.setProperty("java.library.path",
- System.getProperty("java.library.path") + File.pathSeparator + pathToAdd);
- Field fieldSysPath = ClassLoader.class.getDeclaredField("sys_paths");
- fieldSysPath.setAccessible(true);
- fieldSysPath.set(null, null);
- } catch (Exception e) {
- SetErrmsg(e);
- return -1;
- } // end try/catch
-
- return 0;
- } // end of addLibraryPath
- */
-
-} // end of class JdbcApacheInterface
diff --git a/storage/connect/JdbcDSInterface.class b/storage/connect/JdbcDSInterface.class
deleted file mode 100644
index d56c04bd81f..00000000000
--- a/storage/connect/JdbcDSInterface.class
+++ /dev/null
Binary files differ
diff --git a/storage/connect/JdbcDSInterface.java b/storage/connect/JdbcDSInterface.java
deleted file mode 100644
index 09f545bfb74..00000000000
--- a/storage/connect/JdbcDSInterface.java
+++ /dev/null
@@ -1,743 +0,0 @@
-import java.math.*;
-import java.sql.*;
-import java.util.Collections;
-import java.util.Hashtable;
-import java.util.List;
-
-import javax.sql.DataSource;
-
-import org.mariadb.jdbc.MariaDbDataSource;
-import org.postgresql.jdbc2.optional.PoolingDataSource;
-import com.mysql.cj.jdbc.MysqlDataSource;
-import oracle.jdbc.pool.OracleDataSource;
-
-public class JdbcDSInterface {
- boolean DEBUG = false;
- String Errmsg = "No error";
- Connection conn = null;
- DatabaseMetaData dbmd = null;
- Statement stmt = null;
- PreparedStatement pstmt = null;
- ResultSet rs = null;
- ResultSetMetaData rsmd = null;
- Hashtable<String,DataSource> dst = null;
-
- // === Constructors/finalize =========================================
- public JdbcDSInterface() {
- this(true);
- } // end of default constructor
-
- public JdbcDSInterface(boolean b) {
- DEBUG = b;
- dst = new Hashtable<String, DataSource>();
- } // end of constructor
-
- private void SetErrmsg(Exception e) {
- if (DEBUG)
- System.out.println(e.getMessage());
-
- Errmsg = e.toString();
- } // end of SetErrmsg
-
- private void SetErrmsg(String s) {
- if (DEBUG)
- System.out.println(s);
-
- Errmsg = s;
- } // end of SetErrmsg
-
- public String GetErrmsg() {
- String err = Errmsg;
-
- Errmsg = "No error";
- return err;
- } // end of GetErrmsg
-
- public int JdbcConnect(String[] parms, int fsize, boolean scrollable) {
- int rc = 0;
- String url = parms[1];
- DataSource ds = null;
- MysqlDataSource mds = null;
- MariaDbDataSource ads = null;
- OracleDataSource ods = null;
- PoolingDataSource pds = null;
-
- if (url == null) {
- SetErrmsg("URL cannot be null");
- return -1;
- } // endif driver
-
- try {
- if ((ds = dst.get(url)) == null) {
- if (url.toLowerCase().contains("mysql")) {
- mds = new MysqlDataSource();
- mds.setURL(url);
- mds.setUser(parms[2]);
- mds.setPassword(parms[3]);
- ds = mds;
- } else if (url.toLowerCase().contains("mariadb")) {
- ads = new MariaDbDataSource();
- ads.setUrl(url);
- ads.setUser(parms[2]);
- ads.setPassword(parms[3]);
- ds = ads;
- } else if (url.toLowerCase().contains("oracle")) {
- ods = new OracleDataSource();
- ods.setURL(url);
- ods.setUser(parms[2]);
- ods.setPassword(parms[3]);
- ds = ods;
- } else if (url.toLowerCase().contains("postgresql")) {
- pds = new PoolingDataSource();
- pds.setUrl(url);
- pds.setUser(parms[2]);
- pds.setPassword(parms[3]);
- ds = pds;
- } else {
- SetErrmsg("Unsupported driver");
- return -4;
- } // endif driver
-
- dst.put(url, ds);
- } // endif ds
-
- // Get a connection from the data source
- conn = ds.getConnection();
-
- // Get the data base meta data object
- dbmd = conn.getMetaData();
-
- // Get a statement from the connection
- if (scrollable)
- stmt = conn.createStatement(java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE, java.sql.ResultSet.CONCUR_READ_ONLY);
- else
- stmt = conn.createStatement(java.sql.ResultSet.TYPE_FORWARD_ONLY, java.sql.ResultSet.CONCUR_READ_ONLY);
-
- if (DEBUG)
- System.out.println("Statement type = " + stmt.getResultSetType()
- + " concurrency = " + stmt.getResultSetConcurrency());
-
- if (DEBUG) // Get the fetch size of a statement
- System.out.println("Default fetch size = " + stmt.getFetchSize());
-
- if (fsize != 0) {
- // Set the fetch size
- stmt.setFetchSize(fsize);
-
- if (DEBUG)
- System.out.println("New fetch size = " + stmt.getFetchSize());
-
- } // endif fsize
-
- } catch (SQLException se) {
- SetErrmsg(se);
- rc = -2;
- } catch( Exception e ) {
- SetErrmsg(e);
- rc = -3;
- } // end try/catch
-
- return rc;
- } // end of JdbcConnect
-
- public int CreatePrepStmt(String sql) {
- int rc = 0;
-
- try {
- pstmt = conn.prepareStatement(sql);
- } catch (SQLException se) {
- SetErrmsg(se);
- rc = -1;
- } catch (Exception e) {
- SetErrmsg(e);
- rc = -2;
- } // end try/catch
-
- return rc;
- } // end of CreatePrepStmt
-
- public void SetStringParm(int i, String s) {
- try {
- pstmt.setString(i, s);
- } catch (Exception e) {
- SetErrmsg(e);
- } // end try/catch
-
- } // end of SetStringParm
-
- public void SetIntParm(int i, int n) {
- try {
- pstmt.setInt(i, n);
- } catch (Exception e) {
- SetErrmsg(e);
- } // end try/catch
-
- } // end of SetIntParm
-
- public void SetShortParm(int i, short n) {
- try {
- pstmt.setShort(i, n);
- } catch (Exception e) {
- SetErrmsg(e);
- } // end try/catch
-
- } // end of SetShortParm
-
- public void SetBigintParm(int i, long n) {
- try {
- pstmt.setLong(i, n);
- } catch (Exception e) {
- SetErrmsg(e);
- } // end try/catch
-
- } // end of SetBigintParm
-
- public void SetFloatParm(int i, float f) {
- try {
- pstmt.setFloat(i, f);
- } catch (Exception e) {
- SetErrmsg(e);
- } // end try/catch
-
- } // end of SetFloatParm
-
- public void SetDoubleParm(int i, double d) {
- try {
- pstmt.setDouble(i, d);
- } catch (Exception e) {
- SetErrmsg(e);
- } // end try/catch
-
- } // end of SetDoubleParm
-
- public void SetTimestampParm(int i, Timestamp t) {
- try {
- pstmt.setTimestamp(i, t);
- } catch (Exception e) {
- SetErrmsg(e);
- } // end try/catch
-
- } // end of SetTimestampParm
-
- public int ExecutePrep() {
- int n = -3;
-
- if (pstmt != null) try {
- n = pstmt.executeUpdate();
- } catch (SQLException se) {
- SetErrmsg(se);
- n = -1;
- } catch (Exception e) {
- SetErrmsg(e);
- n = -2;
- } //end try/catch
-
- return n;
- } // end of ExecutePrep
-
- public boolean ClosePrepStmt() {
- boolean b = false;
-
- if (pstmt != null) try {
- pstmt.close();
- pstmt = null;
- } catch (SQLException se) {
- SetErrmsg(se);
- b = true;
- } catch (Exception e) {
- SetErrmsg(e);
- b = true;
- } // end try/catch
-
- return b;
- } // end of ClosePrepStmt
-
- public int JdbcDisconnect() {
- int rc = 0;
-
- // Cancel pending statement
- if (stmt != null)
- try {
- System.out.println("Cancelling statement");
- stmt.cancel();
- } catch(SQLException se) {
- SetErrmsg(se);
- rc += 1;
- } // nothing more we can do
-
- // Close the statement and the connection
- if (rs != null)
- try {
- if (DEBUG)
- System.out.println("Closing result set");
-
- rs.close();
- } catch(SQLException se) {
- SetErrmsg(se);
- rc = 2;
- } // nothing more we can do
-
- if (stmt != null)
- try {
- if (DEBUG)
- System.out.println("Closing statement");
-
- stmt.close();
- } catch(SQLException se) {
- SetErrmsg(se);
- rc += 4;
- } // nothing more we can do
-
- ClosePrepStmt();
-
- if (conn != null)
- try {
- if (DEBUG)
- System.out.println("Closing connection");
-
- conn.close();
- } catch (SQLException se) {
- SetErrmsg(se);
- rc += 8;
- } //end try/catch
-
- if (DEBUG)
- System.out.println("All closed");
-
- return rc;
- } // end of JdbcDisconnect
-
- public int GetMaxValue(int n) {
- int m = 0;
-
- try {
- switch (n) {
- case 1: // Max columns in table
- m = dbmd.getMaxColumnsInTable();
- break;
- case 2: // Max catalog name length
- m = dbmd.getMaxCatalogNameLength();
- break;
- case 3: // Max schema name length
- m = dbmd.getMaxSchemaNameLength();
- break;
- case 4: // Max table name length
- m = dbmd.getMaxTableNameLength();
- break;
- case 5: // Max column name length
- m = dbmd.getMaxColumnNameLength();
- break;
- } // endswitch n
-
- } catch(Exception e) {
- SetErrmsg(e);
- m = -1;
- } // end try/catch
-
- return m;
- } // end of GetMaxValue
-
- public int GetColumns(String[] parms) {
- int ncol = 0;
-
- try {
- if (rs != null) rs.close();
- rs = dbmd.getColumns(parms[0], parms[1], parms[2], parms[3]);
-
- if (rs != null) {
- rsmd = rs.getMetaData();
- ncol = rsmd.getColumnCount();
- } // endif rs
-
- } catch(SQLException se) {
- SetErrmsg(se);
- } // end try/catch
-
- return ncol;
- } // end of GetColumns
-
- public int GetTables(String[] parms) {
- int ncol = 0;
- String[] typ = null;
-
- if (parms[3] != null) {
- typ = new String[1];
- typ[0] = parms[3];
- } // endif parms
-
- try {
- if (rs != null) rs.close();
- rs = dbmd.getTables(parms[0], parms[1], parms[2], typ);
-
- if (rs != null) {
- rsmd = rs.getMetaData();
- ncol = rsmd.getColumnCount();
- } // endif rs
-
- } catch(SQLException se) {
- SetErrmsg(se);
- } // end try/catch
-
- return ncol;
- } // end of GetColumns
-
- public int Execute(String query) {
- int n = 0;
-
- if (DEBUG)
- System.out.println("Executing '" + query + "'");
-
- try {
- boolean b = stmt.execute(query);
-
- if (b == false) {
- n = stmt.getUpdateCount();
- if (rs != null) rs.close();
- } // endif b
-
- if (DEBUG)
- System.out.println("Query '" + query + "' executed: n = " + n);
-
- } catch (SQLException se) {
- SetErrmsg(se);
- n = -1;
- } catch (Exception e) {
- SetErrmsg(e);
- n = -2;
- } //end try/catch
-
- return n;
- } // end of Execute
-
- public int GetResult() {
- int ncol = 0;
-
- try {
- rs = stmt.getResultSet();
-
- if (rs != null) {
- rsmd = rs.getMetaData();
- ncol = rsmd.getColumnCount();
-
- if (DEBUG)
- System.out.println("Result set has " + rsmd.getColumnCount() + " column(s)");
-
- } // endif rs
-
- } catch (SQLException se) {
- SetErrmsg(se);
- ncol = -1;
- } catch (Exception e) {
- SetErrmsg(e);
- ncol = -2;
- } //end try/catch
-
- return ncol;
- } // end of GetResult
-
- public int ExecuteQuery(String query) {
- int ncol = 0;
-
- if (DEBUG)
- System.out.println("Executing query '" + query + "'");
-
- try {
- rs = stmt.executeQuery(query);
- rsmd = rs.getMetaData();
- ncol = rsmd.getColumnCount();
-
- if (DEBUG) {
- System.out.println("Query '" + query + "' executed successfully");
- System.out.println("Result set has " + rsmd.getColumnCount() + " column(s)");
- } // endif DEBUG
-
- } catch (SQLException se) {
- SetErrmsg(se);
- ncol = -1;
- } catch (Exception e) {
- SetErrmsg(e);
- ncol = -2;
- } //end try/catch
-
- return ncol;
- } // end of ExecuteQuery
-
- public int ExecuteUpdate(String query) {
- int n = 0;
-
- if (DEBUG)
- System.out.println("Executing update query '" + query + "'");
-
- try {
- n = stmt.executeUpdate(query);
-
- if (DEBUG)
- System.out.println("Update Query '" + query + "' executed: n = " + n);
-
- } catch (SQLException se) {
- SetErrmsg(se);
- n = -1;
- } catch (Exception e) {
- SetErrmsg(e);
- n = -2;
- } //end try/catch
-
- return n;
- } // end of ExecuteUpdate
-
- public int ReadNext() {
- if (rs != null) {
- try {
- return rs.next() ? 1 : 0;
- } catch (SQLException se) {
- SetErrmsg(se);
- return -1;
- } //end try/catch
-
- } else
- return 0;
-
- } // end of ReadNext
-
- public boolean Fetch(int row) {
- if (rs != null) {
- try {
- return rs.absolute(row);
- } catch (SQLException se) {
- SetErrmsg(se);
- return false;
- } //end try/catch
-
- } else
- return false;
-
- } // end of Fetch
-
- public String ColumnName(int n) {
- if (rsmd == null) {
- System.out.println("No result metadata");
- } else try {
- return rsmd.getColumnLabel(n);
- } catch (SQLException se) {
- SetErrmsg(se);
- } //end try/catch
-
- return null;
- } // end of ColumnName
-
- public int ColumnType(int n, String name) {
- if (rsmd == null) {
- System.out.println("No result metadata");
- } else try {
- if (n == 0)
- n = rs.findColumn(name);
-
- return rsmd.getColumnType(n);
- } catch (SQLException se) {
- SetErrmsg(se);
- } //end try/catch
-
- return 666; // Not a type
- } // end of ColumnType
-
- public String ColumnDesc(int n, int[] val) {
- if (rsmd == null) {
- System.out.println("No result metadata");
- return null;
- } else try {
- val[0] = rsmd.getColumnType(n);
- val[1] = rsmd.getPrecision(n);
- val[2] = rsmd.getScale(n);
- val[3] = rsmd.isNullable(n);
- return rsmd.getColumnLabel(n);
- } catch (SQLException se) {
- SetErrmsg(se);
- } //end try/catch
-
- return null;
- } // end of ColumnDesc
-
- public String StringField(int n, String name) {
- if (rs == null) {
- System.out.println("No result set");
- } else try {
- return (n > 0) ? rs.getString(n) : rs.getString(name);
- } catch (SQLException se) {
- SetErrmsg(se);
- } //end try/catch
-
- return null;
- } // end of StringField
-
- public int IntField(int n, String name) {
- if (rs == null) {
- System.out.println("No result set");
- } else try {
- return (n > 0) ? rs.getInt(n) : rs.getInt(name);
- } catch (SQLException se) {
- SetErrmsg(se);
- } //end try/catch
-
- return 0;
- } // end of IntField
-
- public long BigintField(int n, String name) {
- if (rs == null) {
- System.out.println("No result set");
- } else try {
- BigDecimal bigDecimal = (n > 0) ? rs.getBigDecimal(n) : rs.getBigDecimal(name);
- return bigDecimal != null ? bigDecimal.longValue() : 0;
- } catch (SQLException se) {
- SetErrmsg(se);
- } //end try/catch
-
- return 0;
- } // end of BiginttField
-
- public double DoubleField(int n, String name) {
- if (rs == null) {
- System.out.println("No result set");
- } else try {
- return (n > 0) ? rs.getDouble(n) : rs.getDouble(name);
- } catch (SQLException se) {
- SetErrmsg(se);
- } //end try/catch
-
- return 0.;
- } // end of DoubleField
-
- public float FloatField(int n, String name) {
- if (rs == null) {
- System.out.println("No result set");
- } else try {
- return (n > 0) ? rs.getFloat(n) : rs.getFloat(name);
- } catch (SQLException se) {
- SetErrmsg(se);
- } //end try/catch
-
- return 0;
- } // end of FloatField
-
- public boolean BooleanField(int n, String name) {
- if (rs == null) {
- System.out.println("No result set");
- } else try {
- return (n > 0) ? rs.getBoolean(n) : rs.getBoolean(name);
- } catch (SQLException se) {
- SetErrmsg(se);
- } //end try/catch
-
- return false;
- } // end of BooleanField
-
- public Date DateField(int n, String name) {
- if (rs == null) {
- System.out.println("No result set");
- } else try {
- return (n > 0) ? rs.getDate(n) : rs.getDate(name);
- } catch (SQLException se) {
- SetErrmsg(se);
- } //end try/catch
-
- return null;
- } // end of DateField
-
- public Time TimeField(int n, String name) {
- if (rs == null) {
- System.out.println("No result set");
- } else try {
- return (n > 0) ? rs.getTime(n) : rs.getTime(name);
- } catch (SQLException se) {
- SetErrmsg(se);
- } //end try/catch
-
- return null;
- } // end of TimeField
-
- public Timestamp TimestampField(int n, String name) {
- if (rs == null) {
- System.out.println("No result set");
- } else try {
- return (n > 0) ? rs.getTimestamp(n) : rs.getTimestamp(name);
- } catch (SQLException se) {
- SetErrmsg(se);
- } //end try/catch
-
- return null;
- } // end of TimestampField
-
- public String ObjectField(int n, String name) {
- if (rs == null) {
- System.out.println("No result set");
- } else try {
- return (n > 0) ? rs.getObject(n).toString() : rs.getObject(name).toString();
- } catch (SQLException se) {
- SetErrmsg(se);
- } //end try/catch
-
- return null;
- } // end of ObjectField
-
- public int GetDrivers(String[] s, int mxs) {
- int n = 0;
- List<Driver> drivers = Collections.list(DriverManager.getDrivers());
- int size = Math.min(mxs, drivers.size());
-
- for (int i = 0; i < size; i++) {
- Driver driver = (Driver)drivers.get(i);
-
- // Get name of driver
- s[n++] = driver.getClass().getName();
-
- // Get version info
- s[n++] = driver.getMajorVersion() + "." + driver.getMinorVersion();
- s[n++] = driver.jdbcCompliant() ? "Yes" : "No";
- s[n++] = driver.toString();
- } // endfor i
-
- return size;
- } // end of GetDrivers
-
- /**
- * Adds the specified path to the java library path
- * from Fahd Shariff blog
- *
- * @param pathToAdd the path to add
- static public int addLibraryPath(String pathToAdd) {
- System.out.println("jpath = " + pathToAdd);
-
- try {
- Field usrPathsField = ClassLoader.class.getDeclaredField("usr_paths");
- usrPathsField.setAccessible(true);
-
- //get array of paths
- String[] paths = (String[])usrPathsField.get(null);
-
- //check if the path to add is already present
- for (String path : paths) {
- System.out.println("path = " + path);
-
- if (path.equals(pathToAdd))
- return -5;
-
- } // endfor path
-
- //add the new path
- String[] newPaths = Arrays.copyOf(paths, paths.length + 1);
- newPaths[paths.length] = pathToAdd;
- usrPathsField.set(null, newPaths);
- System.setProperty("java.library.path",
- System.getProperty("java.library.path") + File.pathSeparator + pathToAdd);
- Field fieldSysPath = ClassLoader.class.getDeclaredField("sys_paths");
- fieldSysPath.setAccessible(true);
- fieldSysPath.set(null, null);
- } catch (Exception e) {
- SetErrmsg(e);
- return -1;
- } // end try/catch
-
- return 0;
- } // end of addLibraryPath
- */
-
-} // end of class JdbcDSInterface
diff --git a/storage/connect/JdbcInterface.class b/storage/connect/JdbcInterface.class
deleted file mode 100644
index 51a0e69bad5..00000000000
--- a/storage/connect/JdbcInterface.class
+++ /dev/null
Binary files differ
diff --git a/storage/connect/JdbcInterface.java b/storage/connect/JdbcInterface.java
index 8c4db1db8c3..f765052915d 100644
--- a/storage/connect/JdbcInterface.java
+++ b/storage/connect/JdbcInterface.java
@@ -1,13 +1,19 @@
+package wrappers;
+
import java.math.*;
import java.sql.*;
-//import java.util.Arrays;
import java.util.Collections;
+import java.util.Hashtable;
import java.util.List;
-//import java.io.File;
-//import java.lang.reflect.Field;
+
+import javax.sql.DataSource;
public class JdbcInterface {
+ // This is used by DS classes
+ static Hashtable<String,DataSource> dst = null;
+
boolean DEBUG = false;
+ boolean CatisSchema = false;
String Errmsg = "No error";
Connection conn = null;
DatabaseMetaData dbmd = null;
@@ -18,14 +24,14 @@ public class JdbcInterface {
// === Constructors/finalize =========================================
public JdbcInterface() {
- this(true);
+ this(false);
} // end of default constructor
public JdbcInterface(boolean b) {
DEBUG = b;
} // end of constructor
- private void SetErrmsg(Exception e) {
+ protected void SetErrmsg(Exception e) {
if (DEBUG)
System.out.println(e.getMessage());
@@ -38,6 +44,22 @@ public class JdbcInterface {
Errmsg = "No error";
return err;
} // end of GetErrmsg
+
+ protected void CheckURL(String url, String vendor) throws Exception {
+ if (url == null)
+ throw new Exception("URL cannot be null");
+
+ String[] tk = url.split(":", 3);
+
+ if (!tk[0].equals("jdbc") || tk[1] == null)
+ throw new Exception("Invalid URL");
+
+ if (vendor != null && !tk[1].equals(vendor))
+ throw new Exception("Wrong URL for this wrapper");
+
+ // Some drivers use Catalog as Schema
+ CatisSchema = tk[1].equals("mysql") || tk[1].equals("mariadb");
+ } // end of CatalogIsSchema
public int JdbcConnect(String[] parms, int fsize, boolean scrollable) {
int rc = 0;
@@ -58,6 +80,8 @@ public class JdbcInterface {
if (DEBUG)
System.out.println("URL=" + parms[1]);
+
+ CheckURL(parms[1], null);
if (parms[2] != null && !parms[2].isEmpty()) {
if (DEBUG)
@@ -74,27 +98,7 @@ public class JdbcInterface {
dbmd = conn.getMetaData();
// Get a statement from the connection
- if (scrollable)
- stmt = conn.createStatement(java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE, java.sql.ResultSet.CONCUR_READ_ONLY);
- else
- stmt = conn.createStatement(java.sql.ResultSet.TYPE_FORWARD_ONLY, java.sql.ResultSet.CONCUR_READ_ONLY);
-
- if (DEBUG)
- System.out.println("Statement type = " + stmt.getResultSetType()
- + " concurrency = " + stmt.getResultSetConcurrency());
-
- if (DEBUG) // Get the fetch size of a statement
- System.out.println("Default fetch size = " + stmt.getFetchSize());
-
- if (fsize != 0) {
- // Set the fetch size
- stmt.setFetchSize(fsize);
-
- if (DEBUG)
- System.out.println("New fetch size = " + stmt.getFetchSize());
-
- } // endif fsize
-
+ stmt = GetStmt(fsize, scrollable);
} catch(ClassNotFoundException e) {
SetErrmsg(e);
rc = -1;
@@ -109,6 +113,34 @@ public class JdbcInterface {
return rc;
} // end of JdbcConnect
+ protected Statement GetStmt(int fsize, boolean scrollable) throws SQLException, Exception {
+ Statement stmt = null;
+
+ if (scrollable)
+ stmt = conn.createStatement(java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE, java.sql.ResultSet.CONCUR_READ_ONLY);
+ else
+ stmt = conn.createStatement(java.sql.ResultSet.TYPE_FORWARD_ONLY, java.sql.ResultSet.CONCUR_READ_ONLY);
+
+ if (DEBUG)
+ System.out.println("Statement type = " + stmt.getResultSetType()
+ + " concurrency = " + stmt.getResultSetConcurrency());
+
+ if (DEBUG) // Get the fetch size of a statement
+ System.out.println("Default fetch size = " + stmt.getFetchSize());
+
+ if (fsize != 0) {
+ // Set the fetch size
+ stmt.setFetchSize(fsize);
+
+ if (DEBUG)
+ System.out.println("New fetch size = " + stmt.getFetchSize());
+
+ } // endif fsize
+
+ return stmt;
+ } // end of GetStmt
+
+
public int CreatePrepStmt(String sql) {
int rc = 0;
@@ -227,7 +259,9 @@ public class JdbcInterface {
// Cancel pending statement
if (stmt != null)
try {
- System.out.println("Cancelling statement");
+ if (DEBUG)
+ System.out.println("Cancelling statement");
+
stmt.cancel();
} catch(SQLException se) {
SetErrmsg(se);
@@ -311,7 +345,11 @@ public class JdbcInterface {
try {
if (rs != null) rs.close();
- rs = dbmd.getColumns(parms[0], parms[1], parms[2], parms[3]);
+
+ if (CatisSchema)
+ rs = dbmd.getColumns(parms[1], null, parms[2], parms[3]);
+ else
+ rs = dbmd.getColumns(parms[0], parms[1], parms[2], parms[3]);
if (rs != null) {
rsmd = rs.getMetaData();
@@ -326,7 +364,7 @@ public class JdbcInterface {
} // end of GetColumns
public int GetTables(String[] parms) {
- int ncol = 0;
+ int ncol = -1;
String[] typ = null;
if (parms[3] != null) {
@@ -336,7 +374,11 @@ public class JdbcInterface {
try {
if (rs != null) rs.close();
- rs = dbmd.getTables(parms[0], parms[1], parms[2], typ);
+
+ if (CatisSchema)
+ rs = dbmd.getTables(parms[1], null, parms[2], typ);
+ else
+ rs = dbmd.getTables(parms[0], parms[1], parms[2], typ);
if (rs != null) {
rsmd = rs.getMetaData();
@@ -599,40 +641,43 @@ public class JdbcInterface {
return false;
} // end of BooleanField
- public Date DateField(int n, String name) {
+ public int DateField(int n, String name) {
if (rs == null) {
System.out.println("No result set");
} else try {
- return (n > 0) ? rs.getDate(n) : rs.getDate(name);
+ Date d = (n > 0) ? rs.getDate(n) : rs.getDate(name);
+ return (d != null) ? (int)(d.getTime() / 1000) : 0;
} catch (SQLException se) {
SetErrmsg(se);
} //end try/catch
- return null;
+ return 0;
} // end of DateField
- public Time TimeField(int n, String name) {
+ public int TimeField(int n, String name) {
if (rs == null) {
System.out.println("No result set");
} else try {
- return (n > 0) ? rs.getTime(n) : rs.getTime(name);
+ Time t = (n > 0) ? rs.getTime(n) : rs.getTime(name);
+ return (t != null) ? (int)(t.getTime() / 1000) : 0;
} catch (SQLException se) {
SetErrmsg(se);
} //end try/catch
- return null;
+ return 0;
} // end of TimeField
- public Timestamp TimestampField(int n, String name) {
+ public int TimestampField(int n, String name) {
if (rs == null) {
System.out.println("No result set");
} else try {
- return (n > 0) ? rs.getTimestamp(n) : rs.getTimestamp(name);
+ Timestamp ts = (n > 0) ? rs.getTimestamp(n) : rs.getTimestamp(name);
+ return (ts != null) ? (int)(ts.getTime() / 1000) : 0;
} catch (SQLException se) {
SetErrmsg(se);
} //end try/catch
- return null;
+ return 0;
} // end of TimestampField
public String ObjectField(int n, String name) {
@@ -710,3 +755,4 @@ public class JdbcInterface {
*/
} // end of class JdbcInterface
+
diff --git a/storage/connect/MariadbInterface.java b/storage/connect/MariadbInterface.java
new file mode 100644
index 00000000000..26ff7a82301
--- /dev/null
+++ b/storage/connect/MariadbInterface.java
@@ -0,0 +1,69 @@
+package wrappers;
+
+import java.sql.*;
+import java.util.Hashtable;
+
+import javax.sql.DataSource;
+import org.mariadb.jdbc.MariaDbDataSource;
+
+public class MariadbInterface extends JdbcInterface {
+ public MariadbInterface() {
+ this(true);
+ } // end of default constructor
+
+ public MariadbInterface(boolean b) {
+ super(b);
+
+ if (dst == null)
+ dst = new Hashtable<String, DataSource>();
+
+ } // end of default constructor
+
+ @Override
+ public int JdbcConnect(String[] parms, int fsize, boolean scrollable) {
+ int rc = 0;
+ String url = parms[1];
+ DataSource ds = null;
+ MariaDbDataSource ads = null;
+
+ if (DEBUG)
+ System.out.println("Connecting to MariaDB data source");
+
+ try {
+ CheckURL(url, "mariadb");
+
+ if ((ds = dst.get(url)) == null) {
+ ads = new MariaDbDataSource();
+ ads.setUrl(url);
+
+ if (parms[2] != null)
+ ads.setUser(parms[2]);
+
+ if (parms[3] != null)
+ ads.setPassword(parms[3]);
+
+ ds = ads;
+
+ dst.put(url, ds);
+ } // endif ds
+
+ // Get a connection from the data source
+ conn = ds.getConnection();
+
+ // Get the data base meta data object
+ dbmd = conn.getMetaData();
+
+ // Get a statement from the connection
+ stmt = GetStmt(fsize, scrollable);
+ } catch (SQLException se) {
+ SetErrmsg(se);
+ rc = -2;
+ } catch( Exception e ) {
+ SetErrmsg(e);
+ rc = -3;
+ } // end try/catch
+
+ return rc;
+ } // end of JdbcConnect
+
+}
diff --git a/storage/connect/MysqlInterface.java b/storage/connect/MysqlInterface.java
new file mode 100644
index 00000000000..a13020e30b0
--- /dev/null
+++ b/storage/connect/MysqlInterface.java
@@ -0,0 +1,69 @@
+package wrappers;
+
+import java.sql.*;
+import java.util.Hashtable;
+
+import javax.sql.DataSource;
+import com.mysql.cj.jdbc.MysqlDataSource;
+
+public class MysqlInterface extends JdbcInterface {
+ public MysqlInterface() {
+ this(true);
+ } // end of default constructor
+
+ public MysqlInterface(boolean b) {
+ super(b);
+
+ if (dst == null)
+ dst = new Hashtable<String, DataSource>();
+
+ } // end of default constructor
+
+ @Override
+ public int JdbcConnect(String[] parms, int fsize, boolean scrollable) {
+ int rc = 0;
+ String url = parms[1];
+ DataSource ds = null;
+ MysqlDataSource mds = null;
+
+ if (DEBUG)
+ System.out.println("Connecting to MySQL data source");
+
+ try {
+ CheckURL(url, "mysql");
+
+ if ((ds = dst.get(url)) == null) {
+ mds = new MysqlDataSource();
+ mds.setUrl(url);
+
+ if (parms[2] != null)
+ mds.setUser(parms[2]);
+
+ if (parms[3] != null)
+ mds.setPassword(parms[3]);
+
+ ds = mds;
+
+ dst.put(url, ds);
+ } // endif ds
+
+ // Get a connection from the data source
+ conn = ds.getConnection();
+
+ // Get the data base meta data object
+ dbmd = conn.getMetaData();
+
+ // Get a statement from the connection
+ stmt = GetStmt(fsize, scrollable);
+ } catch (SQLException se) {
+ SetErrmsg(se);
+ rc = -2;
+ } catch( Exception e ) {
+ SetErrmsg(e);
+ rc = -3;
+ } // end try/catch
+
+ return rc;
+ } // end of JdbcConnect
+
+} // end of class MysqlInterface
diff --git a/storage/connect/OracleInterface.java b/storage/connect/OracleInterface.java
new file mode 100644
index 00000000000..0bfdd20e032
--- /dev/null
+++ b/storage/connect/OracleInterface.java
@@ -0,0 +1,69 @@
+package wrappers;
+
+import java.sql.*;
+import java.util.Hashtable;
+
+import javax.sql.DataSource;
+import oracle.jdbc.pool.OracleDataSource;
+
+public class OracleInterface extends JdbcInterface {
+ public OracleInterface() {
+ this(true);
+ } // end of OracleInterface constructor
+
+ public OracleInterface(boolean b) {
+ super(b);
+
+ if (dst == null)
+ dst = new Hashtable<String, DataSource>();
+
+ } // end of OracleInterface constructor
+
+ @Override
+ public int JdbcConnect(String[] parms, int fsize, boolean scrollable) {
+ int rc = 0;
+ String url = parms[1];
+ DataSource ds = null;
+ OracleDataSource ods = null;
+
+ if (DEBUG)
+ System.out.println("Connecting to Oracle data source");
+
+ try {
+ CheckURL(url, "oracle");
+
+ if ((ds = dst.get(url)) == null) {
+ ods = new OracleDataSource();
+ ods.setURL(url);
+
+ if (parms[2] != null)
+ ods.setUser(parms[2]);
+
+ if (parms[3] != null)
+ ods.setPassword(parms[3]);
+
+ ds = ods;
+
+ dst.put(url, ds);
+ } // endif ds
+
+ // Get a connection from the data source
+ conn = ds.getConnection();
+
+ // Get the data base meta data object
+ dbmd = conn.getMetaData();
+
+ // Get a statement from the connection
+ stmt = GetStmt(fsize, scrollable);
+ } catch (SQLException se) {
+ SetErrmsg(se);
+ rc = -2;
+ } catch( Exception e ) {
+ SetErrmsg(e);
+ rc = -3;
+ } // end try/catch
+
+ return rc;
+ } // end of JdbcConnect
+
+} // end of class OracleInterface
diff --git a/storage/connect/PostgresqlInterface.java b/storage/connect/PostgresqlInterface.java
new file mode 100644
index 00000000000..adce0616a1b
--- /dev/null
+++ b/storage/connect/PostgresqlInterface.java
@@ -0,0 +1,69 @@
+package wrappers;
+
+import java.sql.*;
+import java.util.Hashtable;
+
+import javax.sql.DataSource;
+import org.postgresql.jdbc2.optional.PoolingDataSource;
+
+public class PostgresqlInterface extends JdbcInterface {
+ public PostgresqlInterface() {
+ this(true);
+ } // end of constructor
+
+ public PostgresqlInterface(boolean b) {
+ super(b);
+
+ if (dst == null)
+ dst = new Hashtable<String, DataSource>();
+
+ } // end of constructor
+
+ @Override
+ public int JdbcConnect(String[] parms, int fsize, boolean scrollable) {
+ int rc = 0;
+ String url = parms[1];
+ DataSource ds = null;
+ PoolingDataSource pds = null;
+
+ if (DEBUG)
+ System.out.println("Connecting to Postgresql data source");
+
+ try {
+ CheckURL(url, "postgresql");
+
+ if ((ds = dst.get(url)) == null) {
+ pds = new PoolingDataSource();
+ pds.setUrl(url);
+
+ if (parms[2] != null)
+ pds.setUser(parms[2]);
+
+ if (parms[3] != null)
+ pds.setPassword(parms[3]);
+
+ ds = pds;
+
+ dst.put(url, ds);
+ } // endif ds
+
+ // Get a connection from the data source
+ conn = ds.getConnection();
+
+ // Get the data base meta data object
+ dbmd = conn.getMetaData();
+
+ // Get a statement from the connection
+ stmt = GetStmt(fsize, scrollable);
+ } catch (SQLException se) {
+ SetErrmsg(se);
+ rc = -2;
+ } catch( Exception e ) {
+ SetErrmsg(e);
+ rc = -3;
+ } // end try/catch
+
+ return rc;
+ } // end of JdbcConnect
+
+} // end of class PostgresqlInterface
diff --git a/storage/connect/connect.h b/storage/connect/connect.h
index b877f1ffb6c..ce4cf9bf8b9 100644
--- a/storage/connect/connect.h
+++ b/storage/connect/connect.h
@@ -57,7 +57,6 @@ class DOXDEF: public DOSDEF {
/* This is the DOS/UNIX Access Method base class declaration. */
/***********************************************************************/
class TDBDOX: public TDBDOS {
- TDBDOX(): TDBDOS((PGLOBAL)0,(PTDBDOS) 0) {} /* Never called */
friend int MakeIndex(PGLOBAL, PTDB, PIXDEF);
friend int CntCloseTable(PGLOBAL, PTDB, bool, bool);
friend int CntIndexInit(PGLOBAL, PTDB, int, bool);
@@ -66,7 +65,8 @@ class TDBDOX: public TDBDOS {
friend int CntIndexRange(PGLOBAL, PTDB, const uchar**, uint*,
bool*, key_part_map*);
friend class ha_connect;
- }; // end of class TDBDOX
+ TDBDOX() : TDBDOS((PGLOBAL)0, (PTDBDOS)0) {} /* Never called */
+}; // end of class TDBDOX
class XKPDEF: public KPARTDEF {
friend class TDBDOX;
diff --git a/storage/connect/csort.cpp b/storage/connect/csort.cpp
index e89c5ecdbc9..13f325d8f3f 100644
--- a/storage/connect/csort.cpp
+++ b/storage/connect/csort.cpp
@@ -5,7 +5,7 @@
/* */
/* COPYRIGHT: */
/* ---------- */
-/* (C) Copyright to the author Olivier Bertrand 1995-2012 */
+/* (C) Copyright to the author Olivier Bertrand 1995-2016 */
/* */
/* WHAT THIS PROGRAM DOES: */
/* ----------------------- */
@@ -721,8 +721,8 @@ int CSORT::Qsortc(void)
void CSORT::Qstc(int *base, int *max)
{
register int *i, *j, *jj, *lt, *eq, *gt, *mid;
- int c= 0, lo, hi, rc;
- size_t zlo, zhi, cnm;
+ int c = 0, lo, hi, rc;
+ size_t zlo, zhi, cnm;
zlo = zhi = cnm = 0; // Avoid warning message
@@ -774,12 +774,11 @@ void CSORT::Qstc(int *base, int *max)
/*****************************************************************/
/* Small group. Do special quicker processing. */
/*****************************************************************/
- if ((rc = Qcompare(base, (i = base + 1))) > 0)
- {
- c = *base;
- *base = *i;
- *i = c;
- }
+ if ((rc = Qcompare(base, (i = base + 1))) > 0) {
+ c = *base;
+ *base = *i;
+ *i = c;
+ } // endif rc
if (Pof)
Pof[base - Pex] = Pof[i - Pex] = (rc) ? 1 : 2;
diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc
index dd347dca73a..5fe75fd0f59 100644
--- a/storage/connect/ha_connect.cc
+++ b/storage/connect/ha_connect.cc
@@ -171,9 +171,9 @@
#define JSONMAX 10 // JSON Default max grp size
extern "C" {
- char version[]= "Version 1.04.0006 May 08, 2016";
+ char version[]= "Version 1.04.0008 August 10, 2016";
#if defined(__WIN__)
- char compver[]= "Version 1.04.0006 " __DATE__ " " __TIME__;
+ char compver[]= "Version 1.04.0008 " __DATE__ " " __TIME__;
char slash= '\\';
#else // !__WIN__
char slash= '/';
@@ -195,7 +195,6 @@ extern "C" {
#if defined(JDBC_SUPPORT)
char *JvmPath;
char *ClassPath;
- char *Wrapper;
#endif // JDBC_SUPPORT
#if defined(__WIN__)
@@ -211,7 +210,7 @@ PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char *tab, char *db, bool info);
PQRYRES VirColumns(PGLOBAL g, bool info);
PQRYRES JSONColumns(PGLOBAL g, char *db, PTOS topt, bool info);
PQRYRES XMLColumns(PGLOBAL g, char *db, char *tab, PTOS topt, bool info);
-int TranslateJDBCType(int stp, int prec, int& len, char& v);
+int TranslateJDBCType(int stp, char *tn, int prec, int& len, char& v);
void PushWarning(PGLOBAL g, THD *thd, int level);
bool CheckSelf(PGLOBAL g, TABLE_SHARE *s, const char *host,
const char *db, char *tab, const char *src, int port);
@@ -220,6 +219,7 @@ USETEMP UseTemp(void);
int GetConvSize(void);
TYPCONV GetTypeConv(void);
uint GetJsonGrpSize(void);
+char *GetJavaWrapper(void);
uint GetWorkSize(void);
void SetWorkSize(uint);
extern "C" const char *msglang(void);
@@ -332,6 +332,15 @@ static MYSQL_THDVAR_UINT(json_grp_size,
"max number of rows for JSON aggregate functions.",
NULL, NULL, JSONMAX, 1, INT_MAX, 1);
+#if defined(JDBC_SUPPORT)
+// Default java wrapper to use with JDBC tables
+static MYSQL_THDVAR_STR(java_wrapper,
+ PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_MEMALLOC,
+ "Java wrapper class name",
+ // check_class_path, update_class_path,
+ NULL, NULL, "wrappers/JdbcInterface");
+#endif // JDBC_SUPPORT
+
#if defined(XMSG) || defined(NEWMSG)
const char *language_names[]=
{
@@ -384,6 +393,12 @@ extern "C" const char *msglang(void)
return language_names[THDVAR(current_thd, msg_lang)];
} // end of msglang
#else // !XMSG && !NEWMSG
+
+#if defined(JDBC_SUPPORT)
+char *GetJavaWrapper(void)
+{return connect_hton ? THDVAR(current_thd, java_wrapper) : (char*)"wrappers/JdbcInterface";}
+#endif // JDBC_SUPPORT
+
extern "C" const char *msglang(void)
{
#if defined(FRENCH)
@@ -5632,6 +5647,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
} else {
char *schem= NULL;
+ char *tn= NULL;
// Not a catalog table
if (!qrp->Nblin) {
@@ -5648,7 +5664,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
typ= len= prec= dec= 0;
tm= NOT_NULL_FLAG;
cnm= (char*)"noname";
- dft= xtra= key= fmt= NULL;
+ dft= xtra= key= fmt= tn= NULL;
v= ' ';
rem= NULL;
@@ -5668,7 +5684,10 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
typ= crp->Kdata->GetIntValue(i);
v = (crp->Nulls) ? crp->Nulls[i] : 0;
break;
- case FLD_PREC:
+ case FLD_TYPENAME:
+ tn= crp->Kdata->GetCharValue(i);
+ break;
+ case FLD_PREC:
// PREC must be always before LENGTH
len= prec= crp->Kdata->GetIntValue(i);
break;
@@ -5712,8 +5731,8 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
break;
case FLD_SCHEM:
-#if defined(ODBC_SUPPORT)
- if (ttp == TAB_ODBC && crp->Kdata) {
+#if defined(ODBC_SUPPORT) || defined(JDBC_SUPPORT)
+ if ((ttp == TAB_ODBC || ttp == TAB_JDBC) && crp->Kdata) {
if (schem && stricmp(schem, crp->Kdata->GetCharValue(i))) {
sprintf(g->Message,
"Several %s tables found, specify DBNAME", tab);
@@ -5723,7 +5742,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
schem= crp->Kdata->GetCharValue(i);
} // endif ttp
-#endif // ODBC_SUPPORT
+#endif // ODBC_SUPPORT || JDBC_SUPPORT
default:
break; // Ignore
} // endswitch Fld
@@ -5776,7 +5795,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
int plgtyp;
// typ must be PLG type, not SQL type
- if (!(plgtyp= TranslateJDBCType(typ, dec, prec, v))) {
+ if (!(plgtyp= TranslateJDBCType(typ, tn, dec, prec, v))) {
if (GetTypeConv() == TPC_SKIP) {
// Skip this column
sprintf(g->Message, "Column %s skipped (unsupported type %d)",
@@ -6874,12 +6893,6 @@ static MYSQL_SYSVAR_STR(class_path, ClassPath,
"Java class path",
// check_class_path, update_class_path,
NULL, NULL, NULL);
-
-static MYSQL_SYSVAR_STR(java_wrapper, Wrapper,
- PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_MEMALLOC,
- "Java wrapper class",
- // check_class_path, update_class_path,
- NULL, NULL, "JdbcInterface");
#endif // JDBC_SUPPORT
@@ -6921,7 +6934,7 @@ maria_declare_plugin(connect)
0x0104, /* version number (1.04) */
NULL, /* status variables */
connect_system_variables, /* system variables */
- "1.04.0006", /* string version */
+ "1.04.0008", /* string version */
MariaDB_PLUGIN_MATURITY_GAMMA /* maturity */
}
maria_declare_plugin_end;
diff --git a/storage/connect/jdbconn.cpp b/storage/connect/jdbconn.cpp
index 9b479277df2..3b8de3e975b 100644
--- a/storage/connect/jdbconn.cpp
+++ b/storage/connect/jdbconn.cpp
@@ -6,6 +6,13 @@
/* This file contains the JDBC connection classes functions. */
/***********************************************************************/
+#if defined(__WIN__)
+// This is needed for RegGetValue
+#define _WINVER 0x0601
+#undef _WIN32_WINNT
+#define _WIN32_WINNT 0x0601
+#endif // __WIN__
+
/***********************************************************************/
/* Include relevant MariaDB header file. */
/***********************************************************************/
@@ -52,10 +59,12 @@ extern "C" HINSTANCE s_hModule; // Saved module handle
#define nullptr 0
#endif // !__WIN__
+TYPCONV GetTypeConv();
int GetConvSize();
extern char *JvmPath; // The connect_jvm_path global variable value
extern char *ClassPath; // The connect_class_path global variable value
-extern char *Wrapper; // The connect_java_wrapper global variable value
+
+char *GetJavaWrapper(void); // The connect_java_wrapper variable value
/***********************************************************************/
/* Static JDBConn objects. */
@@ -79,7 +88,7 @@ GETDEF JDBConn::GetDefaultJavaVMInitArgs = NULL;
#endif // !_DEBUG
// To avoid gcc warning
-int TranslateJDBCType(int stp, int prec, int& len, char& v);
+int TranslateJDBCType(int stp, char *tn, int prec, int& len, char& v);
/***********************************************************************/
/* GetJDBCType: returns the SQL_TYPE corresponding to a PLG type. */
@@ -107,13 +116,16 @@ static short GetJDBCType(int type)
/***********************************************************************/
/* TranslateJDBCType: translate a JDBC Type to a PLG type. */
/***********************************************************************/
-int TranslateJDBCType(int stp, int prec, int& len, char& v)
+int TranslateJDBCType(int stp, char *tn, int prec, int& len, char& v)
{
int type;
switch (stp) {
case -1: // LONGVARCHAR
- len = MY_MIN(abs(len), GetConvSize());
+ if (GetTypeConv() != TPC_YES)
+ return TYPE_ERROR;
+ else
+ len = MY_MIN(abs(len), GetConvSize());
case 12: // VARCHAR
v = 'V';
case 1: // CHAR
@@ -139,17 +151,24 @@ int TranslateJDBCType(int stp, int prec, int& len, char& v)
case 8: // DOUBLE
type = TYPE_DOUBLE;
break;
- case 93: // TIMESTAMP
+ case 93: // TIMESTAMP, DATETIME
type = TYPE_DATE;
len = 19 + ((prec) ? (prec+1) : 0);
- v = 'S';
+ v = (tn && toupper(tn[0]) == 'T') ? 'S' : 'E';
break;
- case 91: // TYPE_DATE
+ case 91: // DATE, YEAR
type = TYPE_DATE;
- len = 10;
- v = 'D';
+
+ if (!tn || toupper(tn[0]) != 'Y') {
+ len = 10;
+ v = 'D';
+ } else {
+ len = 4;
+ v = 'Y';
+ } // endif len
+
break;
- case 92: // TYPE_TIME
+ case 92: // TIME
type = TYPE_DATE;
len = 8 + ((prec) ? (prec+1) : 0);
v = 'T';
@@ -270,7 +289,7 @@ PQRYRES JDBCColumns(PGLOBAL g, char *db, char *table, char *colpat,
return NULL;
// Colpat cannot be null or empty for some drivers
- cap->Pat = (colpat && *colpat) ? colpat : "%";
+ cap->Pat = (colpat && *colpat) ? colpat : PlugDup(g, "%");
/************************************************************************/
/* Now get the results into blocks. */
@@ -378,7 +397,9 @@ PQRYRES JDBCTables(PGLOBAL g, char *db, char *tabpat, char *tabtyp,
if (info || !qrp)
return qrp;
- if (!(cap = AllocCatInfo(g, CAT_TAB, db, tabpat, qrp)))
+ // Tabpat cannot be null or empty for some drivers
+ if (!(cap = AllocCatInfo(g, CAT_TAB, db,
+ (tabpat && *tabpat) ? tabpat : PlugDup(g, "%"), qrp)))
return NULL;
cap->Pat = tabtyp;
@@ -629,11 +650,20 @@ JDBConn::JDBConn(PGLOBAL g, TDBJDBC *tdbp)
job = nullptr; // The java wrapper class object
xqid = xuid = xid = grs = readid = fetchid = typid = errid = nullptr;
prepid = xpid = pcid = nullptr;
- chrfldid = intfldid = dblfldid = fltfldid = datfldid = bigfldid = nullptr;
-//m_LoginTimeout = DEFAULT_LOGIN_TIMEOUT;
+ chrfldid = intfldid = dblfldid = fltfldid = bigfldid = nullptr;
+ datfldid = timfldid = tspfldid = nullptr;
+ //m_LoginTimeout = DEFAULT_LOGIN_TIMEOUT;
//m_QueryTimeout = DEFAULT_QUERY_TIMEOUT;
//m_UpdateOptions = 0;
Msg = NULL;
+ m_Wrap = (tdbp && tdbp->WrapName) ? tdbp->WrapName : GetJavaWrapper();
+
+ if (!strchr(m_Wrap, '/')) {
+ // Add the wrapper package name
+ char *wn = (char*)PlugSubAlloc(g, NULL, strlen(m_Wrap) + 10);
+ m_Wrap = strcat(strcpy(wn, "wrappers/"), m_Wrap);
+ } // endif m_Wrap
+
m_Driver = NULL;
m_Url = NULL;
m_User = NULL;
@@ -809,17 +839,52 @@ void JDBConn::ResetJVM(void)
/***********************************************************************/
bool JDBConn::GetJVM(PGLOBAL g)
{
+ int ntry;
+
if (!LibJvm) {
char soname[512];
#if defined(__WIN__)
- if (JvmPath)
- strcat(strcpy(soname, JvmPath), "\\jvm.dll");
- else
- strcpy(soname, "jvm.dll");
+ for (ntry = 0; !LibJvm && ntry < 3; ntry++) {
+ if (!ntry && JvmPath) {
+ strcat(strcpy(soname, JvmPath), "\\jvm.dll");
+ ntry = 3; // No other try
+ } else if (ntry < 2 && getenv("JAVA_HOME")) {
+ strcpy(soname, getenv("JAVA_HOME"));
- // Load the desired shared library
- if (!(LibJvm = LoadLibrary(soname))) {
+ if (ntry == 1)
+ strcat(soname, "\\jre");
+
+ strcat(soname, "\\bin\\client\\jvm.dll");
+ } else {
+ // Try to find it through the registry
+ char version[16];
+ char javaKey[64] = "SOFTWARE\\JavaSoft\\Java Runtime Environment";
+ LONG rc;
+ DWORD BufferSize = 16;
+
+ strcpy(soname, "jvm.dll"); // In case it fails
+
+ if ((rc = RegGetValue(HKEY_LOCAL_MACHINE, javaKey, "CurrentVersion",
+ RRF_RT_ANY, NULL, (PVOID)&version, &BufferSize)) == ERROR_SUCCESS) {
+ strcat(strcat(javaKey, "\\"), version);
+ BufferSize = sizeof(soname);
+
+ if ((rc = RegGetValue(HKEY_LOCAL_MACHINE, javaKey, "RuntimeLib",
+ RRF_RT_ANY, NULL, (PVOID)&soname, &BufferSize)) != ERROR_SUCCESS)
+ printf("RegGetValue: rc=%ld\n", rc);
+
+ } // endif rc
+
+ ntry = 3; // Try this only once
+ } // endelse
+
+ // Load the desired shared library
+ LibJvm = LoadLibrary(soname);
+ } // endfor ntry
+
+ // Get the needed entries
+ if (!LibJvm) {
char buf[256];
DWORD rc = GetLastError();
@@ -850,13 +915,23 @@ bool JDBConn::GetJVM(PGLOBAL g)
#else // !__WIN__
const char *error = NULL;
- if (JvmPath)
- strcat(strcpy(soname, JvmPath), "/libjvm.so");
- else
- strcpy(soname, "libjvm.so");
+ for (ntry = 0; !LibJvm && ntry < 2; ntry++) {
+ if (!ntry && JvmPath) {
+ strcat(strcpy(soname, JvmPath), "/libjvm.so");
+ ntry = 2;
+ } else if (!ntry && getenv("JAVA_HOME")) {
+ // TODO: Replace i386 by a better guess
+ strcat(strcpy(soname, getenv("JAVA_HOME")), "/jre/lib/i386/client/libjvm.so");
+ } else { // Will need LD_LIBRARY_PATH to be set
+ strcpy(soname, "libjvm.so");
+ ntry = 2;
+ } // endelse
+
+ LibJvm = dlopen(soname, RTLD_LAZY);
+ } // endfor ntry
// Load the desired shared library
- if (!(LibJvm = dlopen(soname, RTLD_LAZY))) {
+ if (!LibJvm) {
error = dlerror();
sprintf(g->Message, MSG(SHARED_LIB_ERR), soname, SVP(error));
} else if (!(CreateJavaVM = (CRTJVM)dlsym(LibJvm, "JNI_CreateJavaVM"))) {
@@ -890,7 +965,9 @@ bool JDBConn::GetJVM(PGLOBAL g)
/***********************************************************************/
int JDBConn::Open(PJPARM sop)
{
+
bool err = false;
+ jboolean jt = (trace > 0);
PGLOBAL& g = m_G;
// Link or check whether jvm library was linked
@@ -930,6 +1007,11 @@ int JDBConn::Open(PJPARM sop)
#define N 1
#endif
+ // Java source will be compiled as ajar file installed in the plugin dir
+ jpop->Append(sep);
+ jpop->Append(GetPluginDir());
+ jpop->Append("JdbcInterface.jar");
+
//================== prepare loading of Java VM ============================
JavaVMInitArgs vm_args; // Initialization arguments
JavaVMOption* options = new JavaVMOption[N]; // JVM invocation options
@@ -1000,19 +1082,16 @@ int JDBConn::Open(PJPARM sop)
return RC_FX;
} // endswitch rc
+ //=============== Display JVM version ===============
+ jint ver = env->GetVersion();
+ printf("JVM Version %d.%d\n", ((ver>>16)&0x0f), (ver&0x0f));
} // endif rc
- //=============== Display JVM version =======================================
-#if defined(_DEBUG)
- jint ver = env->GetVersion();
- printf("JVM Version %d.%d\n", ((ver>>16)&0x0f), (ver&0x0f));
-#endif //_DEBUG
-
// try to find the java wrapper class
- jdi = env->FindClass(Wrapper);
+ jdi = env->FindClass(m_Wrap);
if (jdi == nullptr) {
- sprintf(g->Message, "ERROR: class %s not found!", Wrapper);
+ sprintf(g->Message, "ERROR: class %s not found!", m_Wrap);
return RC_FX;
} // endif jdi
@@ -1055,19 +1134,19 @@ int JDBConn::Open(PJPARM sop)
#endif // 0
// if class found, continue
- jmethodID ctor = env->GetMethodID(jdi, "<init>", "()V");
+ jmethodID ctor = env->GetMethodID(jdi, "<init>", "(Z)V");
if (ctor == nullptr) {
- sprintf(g->Message, "ERROR: %s constructor not found!", Wrapper);
+ sprintf(g->Message, "ERROR: %s constructor not found!", m_Wrap);
return RC_FX;
} else
- job = env->NewObject(jdi, ctor);
+ job = env->NewObject(jdi, ctor, jt);
// If the object is successfully constructed,
// we can then search for the method we want to call,
// and invoke it for the object:
if (job == nullptr) {
- sprintf(g->Message, "%s class object not constructed!", Wrapper);
+ sprintf(g->Message, "%s class object not constructed!", m_Wrap);
return RC_FX;
} // endif job
@@ -1268,9 +1347,7 @@ void JDBConn::SetColumnValue(int rank, PSZ name, PVAL val)
{
PGLOBAL& g = m_G;
jint ctyp;
- jlong dtv;
jstring cn, jn = nullptr;
- jobject dob;
if (rank == 0)
if (!name || (jn = env->NewStringUTF(name)) == nullptr) {
@@ -1333,31 +1410,22 @@ void JDBConn::SetColumnValue(int rank, PSZ name, PVAL val)
break;
case 91: // DATE
- case 92: // TIME
- case 93: // TIMESTAMP
- if (!gmID(g, datfldid, "TimestampField",
- "(ILjava/lang/String;)Ljava/sql/Timestamp;")) {
- dob = env->CallObjectMethod(job, datfldid, (jint)rank, jn);
-
- if (dob) {
- jclass jts = env->FindClass("java/sql/Timestamp");
-
- if (env->ExceptionCheck()) {
- val->Reset();
- } else {
- jmethodID getTime = env->GetMethodID(jts, "getTime", "()J");
-
- if (getTime != nullptr) {
- dtv = env->CallLongMethod(dob, getTime);
- val->SetValue((int)(dtv / 1000));
- } else
- val->Reset();
-
- } // endif check
+ if (!gmID(g, datfldid, "DateField", "(ILjava/lang/String;)I")) {
+ val->SetValue((int)env->CallIntMethod(job, datfldid, (jint)rank, jn));
+ } else
+ val->Reset();
- } else
- val->Reset();
+ break;
+ case 92: // TIME
+ if (!gmID(g, timfldid, "TimeField", "(ILjava/lang/String;)I")) {
+ val->SetValue((int)env->CallIntMethod(job, timfldid, (jint)rank, jn));
+ } else
+ val->Reset();
+ break;
+ case 93: // TIMESTAMP
+ if (!gmID(g, tspfldid, "TimestampField", "(ILjava/lang/String;)I")) {
+ val->SetValue((int)env->CallIntMethod(job, tspfldid, (jint)rank, jn));
} else
val->Reset();
diff --git a/storage/connect/jdbconn.h b/storage/connect/jdbconn.h
index abec3919e52..095b1565bd2 100644
--- a/storage/connect/jdbconn.h
+++ b/storage/connect/jdbconn.h
@@ -24,7 +24,7 @@
//efine MAX_FNAME_LEN 256 // Max size of field names
//efine MAX_STRING_INFO 256 // Max size of string from SQLGetInfo
//efine MAX_DNAME_LEN 256 // Max size of Recordset names
-#define MAX_CONNECT_LEN 512 // Max size of Connect string
+//efine MAX_CONNECT_LEN 512 // Max size of Connect string
//efine MAX_CURSOR_NAME 18 // Max size of a cursor name
#define DEFAULT_FIELD_TYPE 0 // TYPE_NULL
@@ -169,12 +169,15 @@ protected:
jmethodID intfldid; // The IntField method ID
jmethodID dblfldid; // The DoubleField method ID
jmethodID fltfldid; // The FloatField method ID
- jmethodID datfldid; // The TimestampField method ID
+ jmethodID datfldid; // The DateField method ID
+ jmethodID timfldid; // The TimeField method ID
+ jmethodID tspfldid; // The TimestampField method ID
jmethodID bigfldid; // The BigintField method ID
//DWORD m_LoginTimeout;
//DWORD m_QueryTimeout;
//DWORD m_UpdateOptions;
char *Msg;
+ char *m_Wrap;
char m_IDQuoteChar[2];
PSZ m_Driver;
PSZ m_Url;
diff --git a/storage/connect/json.cpp b/storage/connect/json.cpp
index d99a021cdc9..c45630129f1 100644
--- a/storage/connect/json.cpp
+++ b/storage/connect/json.cpp
@@ -767,7 +767,7 @@ bool JOUTSTR::Escape(const char *s)
{
WriteChr('"');
- for (unsigned int i = 0; i < strlen(s); i++)
+ for (unsigned int i = 0; s[i]; i++)
switch (s[i]) {
case '"':
case '\\':
@@ -816,7 +816,7 @@ bool JOUTFILE::Escape(const char *s)
// This is temporary
fputc('"', Stream);
- for (unsigned int i = 0; i < strlen(s); i++)
+ for (unsigned int i = 0; s[i]; i++)
switch (s[i]) {
case '"': fputs("\\\"", Stream); break;
case '\\': fputs("\\\\", Stream); break;
diff --git a/storage/connect/jsonudf.cpp b/storage/connect/jsonudf.cpp
index 43bb6edf748..88931ea6c13 100644
--- a/storage/connect/jsonudf.cpp
+++ b/storage/connect/jsonudf.cpp
@@ -30,6 +30,10 @@
uint GetJsonGrpSize(void);
static int IsJson(UDF_ARGS *args, uint i);
static PSZ MakePSZ(PGLOBAL g, UDF_ARGS *args, int i);
+static char *handle_item(UDF_INIT *initid, UDF_ARGS *args, char *result,
+ unsigned long *res_length, char *is_null, char *error);
+static char *bin_handle_item(UDF_INIT *initid, UDF_ARGS *args, char *result,
+ unsigned long *res_length, char *is_null, char *error);
static uint JsonGrpSize = 10;
@@ -1302,7 +1306,7 @@ static my_bool CalcLen(UDF_ARGS *args, my_bool obj,
{
char fn[_MAX_PATH];
unsigned long i, k, m, n;
- long fl= 0, j = -1;
+ long fl = 0, j = -1;
reslen = args->arg_count + 2;
@@ -2125,7 +2129,7 @@ my_bool json_object_nonull_init(UDF_INIT *initid, UDF_ARGS *args,
char *json_object_nonull(UDF_INIT *initid, UDF_ARGS *args, char *result,
unsigned long *res_length, char *, char *)
{
- char *str= 0;
+ char *str = NULL;
PGLOBAL g = (PGLOBAL)initid->ptr;
if (!g->Xchk) {
@@ -2698,7 +2702,7 @@ char *json_item_merge(UDF_INIT *initid, UDF_ARGS *args, char *result,
} // endif Xchk
if (!CheckMemory(g, initid, args, 2, false, false, true)) {
- PJSON top= 0;
+ PJSON top = NULL;
PJVAL jvp;
PJSON jsp[2] = {NULL, NULL};
@@ -4898,7 +4902,7 @@ static char *bin_handle_item(UDF_INIT *initid, UDF_ARGS *args, char *result,
my_bool b = true;
PJSON jsp;
PJSNX jsx;
- PJVAL jvp= 0;
+ PJVAL jvp = NULL;
PBSON bsp = NULL;
PGLOBAL g = (PGLOBAL)initid->ptr;
PGLOBAL gb = GetMemPtr(g, args, 0);
diff --git a/storage/connect/mysql-test/connect/r/bin.result b/storage/connect/mysql-test/connect/r/bin.result
index 4ba353ac705..1baa18a1e4d 100644
--- a/storage/connect/mysql-test/connect/r/bin.result
+++ b/storage/connect/mysql-test/connect/r/bin.result
@@ -57,7 +57,7 @@ t1 CREATE TABLE `t1` (
`name` char(10) NOT NULL,
`birth` date NOT NULL,
`id` char(5) NOT NULL `FIELD_FORMAT`='S',
- `salary` double(9,2) NOT NULL DEFAULT '0.00' `FIELD_FORMAT`='F',
+ `salary` double(9,2) NOT NULL DEFAULT 0.00 `FIELD_FORMAT`='F',
`dept` int(4) NOT NULL `FIELD_FORMAT`='S'
) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`=BIN `FILE_NAME`='Testbal.dat' `OPTION_LIST`='Endian=Little' `READONLY`=NO
INSERT INTO t1 VALUES (7777,'BILL','1973-06-30',4444,5555.555,777);
@@ -76,7 +76,7 @@ t1 CREATE TABLE `t1` (
`name` char(10) NOT NULL,
`birth` date NOT NULL,
`id` char(5) NOT NULL `FIELD_FORMAT`='S',
- `salary` double(9,2) NOT NULL DEFAULT '0.00' `FIELD_FORMAT`='F',
+ `salary` double(9,2) NOT NULL DEFAULT 0.00 `FIELD_FORMAT`='F',
`dept` int(4) NOT NULL `FIELD_FORMAT`='S'
) ENGINE=CONNECT DEFAULT CHARSET=latin1 `TABLE_TYPE`=BIN `FILE_NAME`='Testbal.dat' `OPTION_LIST`='Endian=Little' `READONLY`=YES
INSERT INTO t1 VALUES (7777,'BILL','1973-06-30',4444,5555.555,777);
diff --git a/storage/connect/mysql-test/connect/r/jdbc.result b/storage/connect/mysql-test/connect/r/jdbc.result
index 5e844bc9900..895b4070d70 100644
--- a/storage/connect/mysql-test/connect/r/jdbc.result
+++ b/storage/connect/mysql-test/connect/r/jdbc.result
@@ -1,3 +1,4 @@
+SET GLOBAL time_zone='+1:00';
CREATE DATABASE connect;
USE connect;
CREATE TABLE t2 (
@@ -99,8 +100,8 @@ George San Jose 1981-08-10 2010-06-02
Sam Chicago 1979-11-22 2007-10-10
James Dallas 1992-05-13 2009-12-14
Bill Boston 1986-09-11 2008-02-10
-Donald Atlanta 1999-04-01 2016-03-31
-Mick New York 1980-01-20 2002-09-11
+Donald Atlanta 1999-03-31 2016-03-30
+Mick New York 1980-01-20 2002-09-10
Tom Seatle 2002-03-15 1970-01-01
DROP TABLE t3;
#
@@ -110,7 +111,7 @@ CREATE TABLE t3 (
name CHAR(9) NOT NULL,
city CHAR(12) NOT NULL,
age INT(2))
-engine=CONNECT table_type=FIX file_name='girls.txt';
+ENGINE=CONNECT TABLE_TYPE=FIX FILE_NAME='girls.txt' ENDING=1;
SELECT g.name, b.name, g.city FROM t3 g STRAIGHT_JOIN connect.boys b where g.city = b.city;
name name city
Mary John Boston
@@ -167,8 +168,11 @@ serialno name sex title manager department secretary salary
00137 BROWNY 1 ENGINEER 40567 0319 12345 10500.00
73111 WHEELFOR 1 SALESMAN 70012 0318 24888 10030.00
00023 MARTIN 1 ENGINEER 40567 0319 12345 10000.00
+#
+# Option Driver is required to find the Driver class inside the executable jar file
+#
USE test;
-CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=JDBC TABNAME=emp CONNECTION='jdbc:mariadb://localhost:PORT/connect?user=root';
+CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=JDBC TABNAME=emp CONNECTION='jdbc:mariadb://localhost:PORT/connect?user=root' OPTION_LIST='Driver=org.mariadb.jdbc.Driver';
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -180,7 +184,7 @@ t1 CREATE TABLE `t1` (
`department` char(4) NOT NULL,
`secretary` char(5) NOT NULL,
`salary` double(12,2) NOT NULL
-) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='jdbc:mariadb://localhost:PORT/connect?user=root' `TABLE_TYPE`='JDBC' `TABNAME`='emp'
+) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='jdbc:mariadb://localhost:PORT/connect?user=root' `TABLE_TYPE`='JDBC' `TABNAME`='emp' `OPTION_LIST`='Driver=org.mariadb.jdbc.Driver'
SELECT * FROM t1;
serialno name sex title manager department secretary salary
74200 BANCROFT 2 SALESMAN 70012 0318 24888 9600.00
@@ -260,10 +264,8 @@ DROP TABLE t2;
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=JDBC CATFUNC=tables CONNECTION='jdbc:mariadb://localhost:PORT/connect' option_list='User=root,Maxres=50';
SELECT * FROM t1;
Table_Cat Table_Schema Table_Name Table_Type Remark
-connect NULL tx1 BASE TABLE
+connect NULL tx1 TABLE
DROP TABLE t1;
DROP TABLE connect.tx1;
DROP DATABASE connect;
-SET GLOBAL connect_jvm_path=NULL;
-SET GLOBAL connect_class_path=NULL;
-SET GLOBAL time_zone = SYSTEM;
+SET GLOBAL time_zone=SYSTEM;
diff --git a/storage/connect/mysql-test/connect/r/jdbc_new.result b/storage/connect/mysql-test/connect/r/jdbc_new.result
index e5356edd5d8..14381b0b11f 100644
--- a/storage/connect/mysql-test/connect/r/jdbc_new.result
+++ b/storage/connect/mysql-test/connect/r/jdbc_new.result
@@ -1,3 +1,4 @@
+SET GLOBAL time_zone='+1:00';
CREATE TABLE t1 (a int, b char(10));
INSERT INTO t1 VALUES (NULL,NULL),(0,'test00'),(1,'test01'),(2,'test02'),(3,'test03');
SELECT * FROM t1;
@@ -10,6 +11,7 @@ NULL NULL
#
# Testing errors
#
+SET GLOBAL time_zone='+1:00';
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=JDBC
CONNECTION='jdbc:mysql://127.0.0.1:SLAVE_PORT/test?user=unknown';
SELECT * FROM t1;
@@ -32,15 +34,13 @@ t1 CREATE TABLE `t1` (
`y` char(10) DEFAULT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='jdbc:mysql://127.0.0.1:SLAVE_PORT/test?user=root' `TABLE_TYPE`=JDBC
SELECT * FROM t1;
-ERROR HY000: Got error 174 'ExecuteQuery: java.sql.SQLSyntaxErrorException: Unknown column 'x' in 'field list'
-Query is : SELECT x, y FROM t1' from CONNECT
+ERROR HY000: Got error 174 'ExecuteQuery: java.sql.SQLSyntaxErrorException: Unknown column 'x' in 'field list'' from CONNECT
DROP TABLE t1;
CREATE TABLE t1 (a int, b char(10)) ENGINE=CONNECT TABLE_TYPE=JDBC
CONNECTION='jdbc:mysql://127.0.0.1:SLAVE_PORT/test?user=root';
ALTER TABLE t1 RENAME t1backup;
SELECT * FROM t1;
-ERROR HY000: Got error 174 'ExecuteQuery: java.sql.SQLSyntaxErrorException: Table 'test.t1' doesn't exist
-Query is : SELECT a, b FROM t1' from CONNECT
+ERROR HY000: Got error 174 'ExecuteQuery: java.sql.SQLSyntaxErrorException: Table 'test.t1' doesn't exist' from CONNECT
ALTER TABLE t1backup RENAME t1;
DROP TABLE t1;
#
@@ -201,16 +201,15 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` date DEFAULT NULL,
- `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `b` datetime DEFAULT NULL,
`c` time DEFAULT NULL,
- `d` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
- `e` date DEFAULT NULL
+ `d` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `e` year(4) DEFAULT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='jdbc:mysql://127.0.0.1:SLAVE_PORT/test?user=root' `TABLE_TYPE`='JDBC'
SELECT * FROM t1;
a b c d e
-2003-05-27 2003-05-27 10:45:23 10:45:23 2003-05-27 10:45:23 1970-01-01
+2003-05-27 2003-05-27 11:45:23 10:45:23 2003-05-27 10:45:23 2003
DROP TABLE t1;
DROP TABLE t1;
-SET GLOBAL connect_jvm_path=NULL;
-SET GLOBAL connect_class_path=NULL;
-SET GLOBAL time_zone = SYSTEM;
+SET GLOBAL time_zone=SYSTEM;
+SET GLOBAL time_zone=SYSTEM;
diff --git a/storage/connect/mysql-test/connect/r/mysql_discovery.result b/storage/connect/mysql-test/connect/r/mysql_discovery.result
index 220df6f7b92..32bd4761f37 100644
--- a/storage/connect/mysql-test/connect/r/mysql_discovery.result
+++ b/storage/connect/mysql-test/connect/r/mysql_discovery.result
@@ -19,8 +19,8 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` int(20) NOT NULL,
- `group` int(11) NOT NULL DEFAULT '1',
- `a\\b` int(11) NOT NULL DEFAULT '2',
+ `group` int(11) NOT NULL DEFAULT 1,
+ `a\\b` int(11) NOT NULL DEFAULT 2,
`a\\` int(10) unsigned DEFAULT NULL,
`name` varchar(32) DEFAULT 'name'
) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/test/t1' `TABLE_TYPE`='MYSQL'
diff --git a/storage/connect/mysql-test/connect/std_data/JdbcMariaDB.jar b/storage/connect/mysql-test/connect/std_data/JdbcMariaDB.jar
new file mode 100644
index 00000000000..81f91e4465a
--- /dev/null
+++ b/storage/connect/mysql-test/connect/std_data/JdbcMariaDB.jar
Binary files differ
diff --git a/storage/connect/mysql-test/connect/t/jdbc.test b/storage/connect/mysql-test/connect/t/jdbc.test
index 9389747ad9c..41fd298776b 100644
--- a/storage/connect/mysql-test/connect/t/jdbc.test
+++ b/storage/connect/mysql-test/connect/t/jdbc.test
@@ -1,4 +1,5 @@
-- source jdbconn.inc
+SET GLOBAL time_zone='+1:00';
let $MYSQLD_DATADIR= `select @@datadir`;
--copy_file $MTR_SUITE_DIR/std_data/girls.txt $MYSQLD_DATADIR/test/girls.txt
@@ -80,7 +81,7 @@ CREATE TABLE t3 (
name CHAR(9) NOT NULL,
city CHAR(12) NOT NULL,
age INT(2))
-engine=CONNECT table_type=FIX file_name='girls.txt';
+ENGINE=CONNECT TABLE_TYPE=FIX FILE_NAME='girls.txt' ENDING=1;
SELECT g.name, b.name, g.city FROM t3 g STRAIGHT_JOIN connect.boys b where g.city = b.city;
SELECT g.name, b.name, g.city FROM t3 g STRAIGHT_JOIN t1 b where g.city = b.city;
DROP TABLE t1, t3, connect.boys;
@@ -102,9 +103,12 @@ CREATE TABLE emp (
ENGINE=connect TABLE_TYPE=fix FILE_NAME='employee.dat' ENDING=1;
SELECT * FROM emp;
+--echo #
+--echo # Option Driver is required to find the Driver class inside the executable jar file
+--echo #
USE test;
--replace_result $PORT PORT
---eval CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=JDBC TABNAME=emp CONNECTION='jdbc:mariadb://localhost:$PORT/connect?user=root'
+--eval CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=JDBC TABNAME=emp CONNECTION='jdbc:mariadb://localhost:$PORT/connect?user=root' OPTION_LIST='Driver=org.mariadb.jdbc.Driver'
--replace_result $PORT PORT
--eval SHOW CREATE TABLE t1
SELECT * FROM t1;
@@ -113,7 +117,7 @@ SELECT name, title, salary FROM t1 WHERE sex = 1;
DROP TABLE t1, connect.emp;
#
-# Testing remote command execution
+# Testing remote command execution (Driver option is no more necessary)
#
--replace_result $PORT PORT
--eval CREATE TABLE t2 (command varchar(128) not null,number int(5) not null flag=1,message varchar(255) flag=2) ENGINE=CONNECT TABLE_TYPE=JDBC CONNECTION='jdbc:mariadb://localhost:$PORT/connect' OPTION_LIST='User=root,Execsrc=1'
@@ -139,5 +143,5 @@ DROP TABLE connect.tx1;
--remove_file $MYSQLD_DATADIR/connect/employee.dat
DROP DATABASE connect;
--remove_file $MYSQLD_DATADIR/test/girls.txt
-
+SET GLOBAL time_zone=SYSTEM;
-- source jdbconn_cleanup.inc
diff --git a/storage/connect/mysql-test/connect/t/jdbc_new.test b/storage/connect/mysql-test/connect/t/jdbc_new.test
index 33ec1b343cc..d1ad5117b72 100644
--- a/storage/connect/mysql-test/connect/t/jdbc_new.test
+++ b/storage/connect/mysql-test/connect/t/jdbc_new.test
@@ -8,6 +8,8 @@ connection master;
-- source jdbconn.inc
connection slave;
+SET GLOBAL time_zone='+1:00';
+
CREATE TABLE t1 (a int, b char(10));
INSERT INTO t1 VALUES (NULL,NULL),(0,'test00'),(1,'test01'),(2,'test02'),(3,'test03');
SELECT * FROM t1;
@@ -16,6 +18,7 @@ SELECT * FROM t1;
--echo # Testing errors
--echo #
connection master;
+SET GLOBAL time_zone='+1:00';
# Bad user name
# Suppress "mysql_real_connect failed:" (printed in _DEBUG build)
@@ -173,7 +176,9 @@ DROP TABLE t1;
connection slave;
DROP TABLE t1;
+SET GLOBAL time_zone=SYSTEM;
connection master;
+SET GLOBAL time_zone=SYSTEM;
-- source jdbconn_cleanup.inc
diff --git a/storage/connect/mysql-test/connect/t/jdbconn.inc b/storage/connect/mysql-test/connect/t/jdbconn.inc
index 0bac0b35fc4..05122f51924 100644
--- a/storage/connect/mysql-test/connect/t/jdbconn.inc
+++ b/storage/connect/mysql-test/connect/t/jdbconn.inc
@@ -12,19 +12,20 @@ if (!`SELECT count(*) FROM INFORMATION_SCHEMA.TABLES
}
DROP TABLE t1;
-# This is specific and explains why this test is disabled.
-# You should edit this file to reflect what is the required files location on your machine.
+# You cand edit this file to reflect what is the required files location on your machine.
# This is the path to the JVM library (dll or so)
-SET GLOBAL connect_jvm_path='C:\\Program Files\\Java\\jdk1.8.0_77\\jre\\bin\\client';
+# If not set CONNECT will try to use the JAVA_HOME environment variable
+# and if not found try to find it in the registers (Windows only)
+#SET GLOBAL connect_jvm_path='C:\\Program Files\\Java\\jdk1.8.0_77\\jre\\bin\\client';
# The complete class path send when creating the Java Virtual Machine is, in that order:
# 1 - The current directory.
# 2 - The paths of the connect_class_path global variable.
# 3 - The paths of the CLASSPATH environment variable.
-# These are the paths to the needed classes or jar files. The Apache ones are only for the JdbcApacheInterface wrapper.
-SET GLOBAL connect_class_path='E:\\MariaDB-10.1\\Connect\\storage\\connect;E:\\MariaDB-10.1\\Connect\\sql\\data\\postgresql-9.4.1208.jar;E:\\Oracle\\ojdbc6.jar;E:\\Apache\\commons-dbcp2-2.1.1\\commons-dbcp2-2.1.1.jar;E:\\Apache\\commons-pool2-2.4.2\\commons-pool2-2.4.2.jar;E:\\Apache\\commons-logging-1.2\\commons-logging-1.2.jar';
+# In this test we use an executable jar file that contains all what is needed.
+eval SET GLOBAL connect_class_path='$MTR_SUITE_DIR/std_data/JdbcMariaDB.jar';
-# On my machine, paths to the JDK classes and to the MySQL and MariaDB drivers are defined in the CLASSPATH environment variable
+# Paths to the JDK classes and to the MySQL and MariaDB drivers can be defined in the CLASSPATH environment variable
#CREATE FUNCTION envar RETURNS STRING SONAME 'ha_connect.dll';
#SELECT envar('CLASSPATH');
diff --git a/storage/connect/mysql-test/connect/t/jdbconn_cleanup.inc b/storage/connect/mysql-test/connect/t/jdbconn_cleanup.inc
index 48e321495ad..d70e594df63 100644
--- a/storage/connect/mysql-test/connect/t/jdbconn_cleanup.inc
+++ b/storage/connect/mysql-test/connect/t/jdbconn_cleanup.inc
@@ -1,6 +1,8 @@
+--disable_query_log
--disable_warnings
#DROP FUNCTION envar;
SET GLOBAL connect_jvm_path=NULL;
SET GLOBAL connect_class_path=NULL;
SET GLOBAL time_zone = SYSTEM;
--enable_warnings
+--enable_query_log
diff --git a/storage/connect/odbconn.cpp b/storage/connect/odbconn.cpp
index 3ed4e9af393..7320f4cc1d9 100644
--- a/storage/connect/odbconn.cpp
+++ b/storage/connect/odbconn.cpp
@@ -53,6 +53,7 @@
extern "C" HINSTANCE s_hModule; // Saved module handle
#endif // __WIN__
+TYPCONV GetTypeConv();
int GetConvSize();
/***********************************************************************/
@@ -135,9 +136,13 @@ int TranslateSQLType(int stp, int prec, int& len, char& v, bool& w)
case SQL_WLONGVARCHAR: // (-10)
w = true;
case SQL_LONGVARCHAR: // (-1)
- v = 'V';
- type = TYPE_STRING;
- len = MY_MIN(abs(len), GetConvSize());
+ if (GetTypeConv() == TPC_YES) {
+ v = 'V';
+ type = TYPE_STRING;
+ len = MY_MIN(abs(len), GetConvSize());
+ } else
+ type = TYPE_ERROR;
+
break;
case SQL_NUMERIC: // 2
case SQL_DECIMAL: // 3
@@ -1752,7 +1757,7 @@ bool ODBConn::BindParam(ODBCCOL *colp)
void *buf;
int buftype = colp->GetResultType();
SQLUSMALLINT n = colp->GetRank();
- SQLSMALLINT ct, sqlt, dec, nul __attribute__((unused));
+ SQLSMALLINT ct, sqlt, dec, nul __attribute__((unused));
SQLULEN colsize;
SQLLEN len;
SQLLEN *strlen = colp->GetStrLen();
diff --git a/storage/connect/odbconn.h b/storage/connect/odbconn.h
index 6a24334f08c..063985218ec 100644
--- a/storage/connect/odbconn.h
+++ b/storage/connect/odbconn.h
@@ -25,7 +25,7 @@
//efine MAX_FNAME_LEN 256 // Max size of field names
#define MAX_STRING_INFO 256 // Max size of string from SQLGetInfo
//efine MAX_DNAME_LEN 256 // Max size of Recordset names
-#define MAX_CONNECT_LEN 512 // Max size of Connect string
+#define MAX_CONNECT_LEN 1024 // Max size of Connect string
//efine MAX_CURSOR_NAME 18 // Max size of a cursor name
#define DEFAULT_FIELD_TYPE SQL_TYPE_NULL // pick "C" data type to match SQL data type
diff --git a/storage/connect/tabjdbc.cpp b/storage/connect/tabjdbc.cpp
index e6782e71753..86fd831b262 100644
--- a/storage/connect/tabjdbc.cpp
+++ b/storage/connect/tabjdbc.cpp
@@ -96,7 +96,7 @@ bool ExactInfo(void);
/***********************************************************************/
JDBCDEF::JDBCDEF(void)
{
- Driver = Url = Tabname = Tabschema = Username = Colpat = NULL;
+ Driver = Url = Wrapname =Tabname = Tabschema = Username = Colpat = NULL;
Password = Tabcat = Tabtype = Srcdef = Qchar = Qrystr = Sep = NULL;
Options = Quoted = Maxerr = Maxres = Memory = 0;
Scrollable = Xsrc = false;
@@ -233,6 +233,7 @@ bool JDBCDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
if ((Srcdef = GetStringCatInfo(g, "Srcdef", NULL)))
Read_Only = true;
+ Wrapname = GetStringCatInfo(g, "Wrapper", NULL);
Tabcat = GetStringCatInfo(g, "Qualifier", NULL);
Tabcat = GetStringCatInfo(g, "Catalog", Tabcat);
Tabschema = GetStringCatInfo(g, "Dbname", NULL);
@@ -331,6 +332,7 @@ TDBJDBC::TDBJDBC(PJDBCDEF tdp) : TDBASE(tdp)
if (tdp) {
Ops.Driver = tdp->Driver;
Ops.Url = tdp->Url;
+ WrapName = tdp->Wrapname;
TableName = tdp->Tabname;
Schema = tdp->Tabschema;
Ops.User = tdp->Username;
@@ -347,6 +349,7 @@ TDBJDBC::TDBJDBC(PJDBCDEF tdp) : TDBASE(tdp)
Memory = tdp->Memory;
Ops.Scrollable = tdp->Scrollable;
} else {
+ WrapName = NULL;
TableName = NULL;
Schema = NULL;
Ops.Driver = NULL;
@@ -392,6 +395,7 @@ TDBJDBC::TDBJDBC(PTDBJDBC tdbp) : TDBASE(tdbp)
{
Jcp = tdbp->Jcp; // is that right ?
Cnp = tdbp->Cnp;
+ WrapName = tdbp->WrapName;
TableName = tdbp->TableName;
Schema = tdbp->Schema;
Ops = tdbp->Ops;
@@ -518,9 +522,10 @@ bool TDBJDBC::MakeSQL(PGLOBAL g, bool cnt)
if (Catalog && *Catalog)
catp = Catalog;
- if (tablep->GetSchema())
- schmp = (char*)tablep->GetSchema();
- else if (Schema && *Schema)
+ //if (tablep->GetSchema())
+ // schmp = (char*)tablep->GetSchema();
+ //else
+ if (Schema && *Schema)
schmp = Schema;
if (catp) {
@@ -602,9 +607,10 @@ bool TDBJDBC::MakeInsert(PGLOBAL g)
if (catp)
len += strlen(catp) + 1;
- if (tablep->GetSchema())
- schmp = (char*)tablep->GetSchema();
- else if (Schema && *Schema)
+ //if (tablep->GetSchema())
+ // schmp = (char*)tablep->GetSchema();
+ //else
+ if (Schema && *Schema)
schmp = Schema;
if (schmp)
diff --git a/storage/connect/tabjdbc.h b/storage/connect/tabjdbc.h
index cf5e662c9d1..7244ebd3832 100644
--- a/storage/connect/tabjdbc.h
+++ b/storage/connect/tabjdbc.h
@@ -54,6 +54,7 @@ protected:
PSZ Driver; /* JDBC driver */
PSZ Url; /* JDBC driver URL */
PSZ Tabname; /* External table name */
+ PSZ Wrapname; /* Java wrapper name */
PSZ Tabschema; /* External table schema */
PSZ Username; /* User connect name */
PSZ Password; /* Password connect info */
@@ -133,6 +134,7 @@ protected:
JDBCCOL *Cnp; // Points to count(*) column
JDBCPARM Ops; // Additional parameters
PSTRG Query; // Constructed SQL query
+ char *WrapName; // Points to Java wrapper name
char *TableName; // Points to JDBC table name
char *Schema; // Points to JDBC table Schema
char *User; // User connect info
diff --git a/storage/connect/tabodbc.cpp b/storage/connect/tabodbc.cpp
index e76d9c46bd3..f3ffc99ac15 100644
--- a/storage/connect/tabodbc.cpp
+++ b/storage/connect/tabodbc.cpp
@@ -458,9 +458,14 @@ bool TDBODBC::MakeSQL(PGLOBAL g, bool cnt)
if (Catalog && *Catalog)
catp = Catalog;
- if (tablep->GetSchema())
- schmp = (char*)tablep->GetSchema();
- else if (Schema && *Schema)
+ // Following lines are commented because of MSDEV-10520
+ // Indeed the schema in the tablep is the local table database and
+ // is normally not related to the remote table database.
+ // TODO: Try to remember why this was done and if it was useful in some case.
+ //if (tablep->GetSchema())
+ // schmp = (char*)tablep->GetSchema();
+ //else
+ if (Schema && *Schema)
schmp = Schema;
if (catp) {
@@ -541,9 +546,10 @@ bool TDBODBC::MakeInsert(PGLOBAL g)
if (catp)
len += strlen(catp) + 1;
- if (tablep->GetSchema())
- schmp = (char*)tablep->GetSchema();
- else if (Schema && *Schema)
+ //if (tablep->GetSchema())
+ // schmp = (char*)tablep->GetSchema();
+ //else
+ if (Schema && *Schema)
schmp = Schema;
if (schmp)
diff --git a/storage/connect/xindex.cpp b/storage/connect/xindex.cpp
index 69aa7e2c20e..56312630278 100755
--- a/storage/connect/xindex.cpp
+++ b/storage/connect/xindex.cpp
@@ -1198,7 +1198,7 @@ bool XINDEX::MapInit(PGLOBAL g)
const char *ftype;
BYTE *mbase;
char fn[_MAX_PATH];
- int *nv, k, n, id = -1;
+ int *nv, nv0, k, n, id = -1;
bool estim;
PCOL colp;
PXCOL prev = NULL, kcp = NULL;
@@ -1288,25 +1288,26 @@ bool XINDEX::MapInit(PGLOBAL g)
if (nv[0] >= MAX_INDX) {
// New index format
Srtd = nv[7] != 0;
- nv[0] -= MAX_INDX;
+ nv0 = nv[0] - MAX_INDX;
mbase += NZ * sizeof(int);
} else {
Srtd = false;
mbase += (NZ - 1) * sizeof(int);
+ nv0 = nv[0];
} // endif nv
if (trace)
htrc("nv=%d %d %d %d %d %d %d %d\n",
- nv[0], nv[1], nv[2], nv[3], nv[4], nv[5], nv[6], Srtd);
+ nv0, nv[1], nv[2], nv[3], nv[4], nv[5], nv[6], Srtd);
// The test on ID was suppressed because MariaDB can change an index ID
// when other indexes are added or deleted
- if (/*nv[0] != ID ||*/ nv[1] != Nk) {
+ if (/*nv0 != ID ||*/ nv[1] != Nk) {
// Not this index
sprintf(g->Message, MSG(BAD_INDEX_FILE), fn);
if (trace)
- htrc("nv[0]=%d ID=%d nv[1]=%d Nk=%d\n", nv[0], ID, nv[1], Nk);
+ htrc("nv0=%d ID=%d nv[1]=%d Nk=%d\n", nv0, ID, nv[1], Nk);
goto err;
} // endif nv
diff --git a/storage/innobase/CMakeLists.txt b/storage/innobase/CMakeLists.txt
index 44b1cfa047a..446e971aacf 100644
--- a/storage/innobase/CMakeLists.txt
+++ b/storage/innobase/CMakeLists.txt
@@ -168,14 +168,6 @@ SET(INNOBASE_SOURCES
ut/ut0wqueue.cc
ut/ut0timer.cc)
-IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le")
- enable_language(ASM)
- LIST(APPEND INNOBASE_SOURCES
- ut/crc32_power8/crc32.S
- ut/crc32_power8/crc32_wrapper.c
- )
-ENDIF()
-
IF(WITH_INNODB)
# Legacy option
SET(WITH_INNOBASE_STORAGE_ENGINE TRUE)
@@ -185,7 +177,7 @@ MYSQL_ADD_PLUGIN(innobase ${INNOBASE_SOURCES} STORAGE_ENGINE
# MODULE_ONLY
# MODULE_OUTPUT_NAME ha_innodb
DEFAULT RECOMPILE_FOR_EMBEDDED
- LINK_LIBRARIES ${ZLIB_LIBRARY} ${LINKER_SCRIPT})
+ LINK_LIBRARIES ${ZLIB_LIBRARY} ${CRC32_VPMSUM_LIBRARY} ${LINKER_SCRIPT})
IF(WITH_INNOBASE_STORAGE_ENGINE)
ADD_DEPENDENCIES(innobase GenError)
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc
index 9dacc08e73d..dbe774e7e6b 100644
--- a/storage/innobase/buf/buf0buf.cc
+++ b/storage/innobase/buf/buf0buf.cc
@@ -7087,10 +7087,10 @@ buf_print_io_instance(
fprintf(file,
"Buffer pool hit rate %lu / 1000,"
" young-making rate %lu / 1000 not %lu / 1000\n",
- (ulong) hit_rate,
- (ulong) (1000 * pool_info->young_making_delta
+ (ulint) hit_rate,
+ (ulint) (1000 * pool_info->young_making_delta
/ pool_info->n_page_get_delta),
- (ulong) (1000 * pool_info->not_young_making_delta
+ (ulint) (1000 * pool_info->not_young_making_delta
/ pool_info->n_page_get_delta));
} else {
fputs("No buffer pool page gets since the last printout\n",
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 23a4d2dc898..f9c9285036d 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -5041,6 +5041,7 @@ innobase_commit(
ended */
{
DBUG_ENTER("innobase_commit");
+ DBUG_PRINT("enter", ("commit_trx: %d", commit_trx));
DBUG_ASSERT(hton == innodb_hton_ptr);
DBUG_PRINT("trans", ("ending transaction"));
@@ -19079,6 +19080,7 @@ ha_innobase::store_lock(
/* Use consistent read for checksum table */
if (sql_command == SQLCOM_CHECKSUM
+ || (sql_command == SQLCOM_ANALYZE && lock_type == TL_READ)
|| ((srv_locks_unsafe_for_binlog
|| trx->isolation_level <= TRX_ISO_READ_COMMITTED)
&& trx->isolation_level != TRX_ISO_SERIALIZABLE
@@ -23823,7 +23825,7 @@ maria_declare_plugin(innobase)
innodb_status_variables_export,/* status variables */
innobase_system_variables, /* system variables */
INNODB_VERSION_STR, /* string version */
- MariaDB_PLUGIN_MATURITY_GAMMA /* maturity */
+ MariaDB_PLUGIN_MATURITY_STABLE /* maturity */
},
i_s_innodb_trx,
i_s_innodb_locks,
diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc
index 0ebaafc6989..328eaf2be78 100644
--- a/storage/innobase/handler/handler0alter.cc
+++ b/storage/innobase/handler/handler0alter.cc
@@ -432,7 +432,7 @@ innobase_need_rebuild(
& Alter_inplace_info::ADD_INDEX) ||
(ha_alter_info->handler_flags
& Alter_inplace_info::ADD_FOREIGN_KEY))) {
- for (ulint i = 0; i < ha_alter_info->key_count; i++) {
+ for (ulint i = 0; i < ha_alter_info->index_add_count; i++) {
const KEY* key = &ha_alter_info->key_info_buffer[
ha_alter_info->index_add_buffer[i]];
@@ -443,7 +443,7 @@ innobase_need_rebuild(
/* Field used on added index is renamed on
this same alter table. We need table
rebuild. */
- if (field->flags & FIELD_IS_RENAMED) {
+ if (field && field->flags & FIELD_IS_RENAMED) {
return (true);
}
}
@@ -1645,9 +1645,9 @@ innobase_get_foreign_key_info(
referenced_column_names, referenced_num_col)) {
mutex_exit(&dict_sys->mutex);
my_error(
- ER_FK_DUP_NAME,
+ ER_DUP_CONSTRAINT_NAME,
MYF(0),
- add_fk[num_fk]->id);
+ "FOREIGN KEY", add_fk[num_fk]->id);
goto err_exit;
}
diff --git a/storage/innobase/handler/i_s.cc b/storage/innobase/handler/i_s.cc
index 1c17ac91856..c7bfea4476b 100644
--- a/storage/innobase/handler/i_s.cc
+++ b/storage/innobase/handler/i_s.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2007, 2016, Oracle and/or its affiliates.
Copyrigth (c) 2014, 2016, MariaDB Corporation
This program is free software; you can redistribute it and/or modify it under
@@ -787,7 +787,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_trx =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/* Fields of the dynamic table INFORMATION_SCHEMA.innodb_locks */
@@ -1047,7 +1047,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_locks =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/* Fields of the dynamic table INFORMATION_SCHEMA.innodb_lock_waits */
@@ -1230,7 +1230,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_lock_waits =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/*******************************************************************//**
@@ -1556,7 +1556,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_cmp =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
UNIV_INTERN struct st_maria_plugin i_s_innodb_cmp_reset =
@@ -1606,7 +1606,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_cmp_reset =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/* Fields of the dynamic tables
@@ -1906,7 +1906,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_cmp_per_index =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
UNIV_INTERN struct st_maria_plugin i_s_innodb_cmp_per_index_reset =
@@ -1956,7 +1956,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_cmp_per_index_reset =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/* Fields of the dynamic table information_schema.innodb_cmpmem. */
@@ -2203,7 +2203,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_cmpmem =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
UNIV_INTERN struct st_maria_plugin i_s_innodb_cmpmem_reset =
@@ -2253,7 +2253,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_cmpmem_reset =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/* Fields of the dynamic table INFORMATION_SCHEMA.innodb_metrics */
@@ -2777,7 +2777,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_metrics =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/* Fields of the dynamic table INFORMATION_SCHEMA.innodb_ft_default_stopword */
static ST_FIELD_INFO i_s_stopword_fields_info[] =
@@ -2890,7 +2890,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_ft_default_stopword =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/* Fields of the dynamic table INFORMATION_SCHEMA.INNODB_FT_DELETED
@@ -3071,7 +3071,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_ft_deleted =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/*******************************************************************//**
@@ -3154,7 +3154,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_ft_being_deleted =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/* Fields of the dynamic table INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHED and
@@ -3449,7 +3449,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_ft_index_cache =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/*******************************************************************//**
@@ -3888,7 +3888,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_ft_index_table =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/* Fields of the dynamic table INFORMATION_SCHEMA.INNODB_FT_CONFIG */
@@ -4095,7 +4095,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_ft_config =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/* Fields of the dynamic table INNODB_TEMP_TABLE_INFO. */
@@ -4923,7 +4923,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_buffer_stats =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/* Fields of the dynamic table INNODB_BUFFER_POOL_PAGE. */
@@ -5639,7 +5639,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_buffer_page =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
static ST_FIELD_INFO i_s_innodb_buf_page_lru_fields_info[] =
@@ -6191,7 +6191,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_buffer_page_lru =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/*******************************************************************//**
@@ -6508,7 +6508,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_sys_tables =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/** SYS_TABLESTATS ***********************************************/
@@ -6822,7 +6822,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_sys_tablestats =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/** SYS_INDEXES **************************************************/
@@ -7085,7 +7085,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_sys_indexes =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/** SYS_COLUMNS **************************************************/
@@ -7331,7 +7331,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_sys_columns =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/** SYS_VIRTUAL **************************************************/
@@ -7748,7 +7748,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_sys_fields =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/** SYS_FOREIGN ********************************************/
@@ -7973,7 +7973,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_sys_foreign =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/** SYS_FOREIGN_COLS ********************************************/
@@ -8190,7 +8190,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_sys_foreign_cols =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/** SYS_TABLESPACES ********************************************/
@@ -8569,7 +8569,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_sys_tablespaces =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/** SYS_DATAFILES ************************************************/
@@ -8758,7 +8758,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_sys_datafiles =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/** TABLESPACES_ENCRYPTION ********************************************/
@@ -9052,7 +9052,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_tablespaces_encryption =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA)
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE)
};
/** TABLESPACES_SCRUBBING ********************************************/
@@ -9351,7 +9351,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_tablespaces_scrubbing =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA)
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE)
};
/** INNODB_MUTEXES *********************************************/
@@ -9567,7 +9567,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_mutexes =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/** SYS_SEMAPHORE_WAITS ************************************************/
@@ -9844,7 +9844,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_sys_semaphore_waits =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/** Fill handlerton based INFORMATION_SCHEMA.FILES table.
diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc
index e6b9b761d85..8f65966f1cb 100644
--- a/storage/innobase/lock/lock0lock.cc
+++ b/storage/innobase/lock/lock0lock.cc
@@ -1313,6 +1313,7 @@ wsrep_kill_victim(
ut_ad(lock_mutex_own());
ut_ad(trx_mutex_own(lock->trx));
+ /* quit for native mysql */
if (!wsrep_on(trx->mysql_thd)) {
return;
}
@@ -1770,7 +1771,9 @@ RecLock::create(
}
#ifdef WITH_WSREP
- if (c_lock && wsrep_thd_is_BF(trx->mysql_thd, FALSE)) {
+ if (c_lock &&
+ wsrep_on(trx->mysql_thd) &&
+ wsrep_thd_is_BF(trx->mysql_thd, FALSE)) {
lock_t *hash = (lock_t *)c_lock->hash;
lock_t *prev = NULL;
diff --git a/storage/innobase/page/page0cur.cc b/storage/innobase/page/page0cur.cc
index 7f592b50154..b0412009b80 100644
--- a/storage/innobase/page/page0cur.cc
+++ b/storage/innobase/page/page0cur.cc
@@ -1428,6 +1428,26 @@ use_heap:
insert_rec = rec_copy(insert_buf, rec, offsets);
rec_offs_make_valid(insert_rec, index, offsets);
+ /* This is because assertion below is debug assertion */
+#ifdef UNIV_DEBUG
+ if (UNIV_UNLIKELY(current_rec == insert_rec)) {
+ ulint extra_len, data_len;
+ extra_len = rec_offs_extra_size(offsets);
+ data_len = rec_offs_data_size(offsets);
+
+ fprintf(stderr, "InnoDB: Error: current_rec == insert_rec "
+ " extra_len %lu data_len %lu insert_buf %p rec %p\n",
+ extra_len, data_len, insert_buf, rec);
+ fprintf(stderr, "InnoDB; Physical record: \n");
+ rec_print(stderr, rec, index);
+ fprintf(stderr, "InnoDB: Inserted record: \n");
+ rec_print(stderr, insert_rec, index);
+ fprintf(stderr, "InnoDB: Current record: \n");
+ rec_print(stderr, current_rec, index);
+ ut_a(current_rec != insert_rec);
+ }
+#endif /* UNIV_DEBUG */
+
/* 4. Insert the record in the linked list of records */
ut_ad(current_rec != insert_rec);
diff --git a/storage/innobase/row/row0upd.cc b/storage/innobase/row/row0upd.cc
index fb86c22fdd6..b9552344a3b 100644
--- a/storage/innobase/row/row0upd.cc
+++ b/storage/innobase/row/row0upd.cc
@@ -398,7 +398,7 @@ wsrep_row_upd_check_foreign_constraints(
dict_table_open_on_name(
foreign->referenced_table_name_lookup,
FALSE, FALSE, DICT_ERR_IGNORE_NONE);
- opened = TRUE;
+ opened = (foreign->referenced_table) ? TRUE : FALSE;
}
/* NOTE that if the thread ends up waiting for a lock
@@ -411,7 +411,7 @@ wsrep_row_upd_check_foreign_constraints(
if (foreign->referenced_table) {
if (opened == TRUE) {
- dict_table_close(foreign->referenced_table, TRUE, FALSE);
+ dict_table_close(foreign->referenced_table, FALSE, FALSE);
opened = FALSE;
}
}
diff --git a/storage/innobase/ut/crc32_power8/crc32.S b/storage/innobase/ut/crc32_power8/crc32.S
deleted file mode 100644
index b064ce3dc96..00000000000
--- a/storage/innobase/ut/crc32_power8/crc32.S
+++ /dev/null
@@ -1,775 +0,0 @@
-/*
- * Calculate the checksum of data that is 16 byte aligned and a multiple of
- * 16 bytes.
- *
- * The first step is to reduce it to 1024 bits. We do this in 8 parallel
- * chunks in order to mask the latency of the vpmsum instructions. If we
- * have more than 32 kB of data to checksum we repeat this step multiple
- * times, passing in the previous 1024 bits.
- *
- * The next step is to reduce the 1024 bits to 64 bits. This step adds
- * 32 bits of 0s to the end - this matches what a CRC does. We just
- * calculate constants that land the data in this 32 bits.
- *
- * We then use fixed point Barrett reduction to compute a mod n over GF(2)
- * for n = CRC using POWER8 instructions. We use x = 32.
- *
- * http://en.wikipedia.org/wiki/Barrett_reduction
- *
- * Copyright (C) 2015 Anton Blanchard <anton@au.ibm.com>, IBM
- *
- * 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; either version
- * 2 of the License, or (at your option) any later version.
- */
-
-#ifdef __powerpc__
-
-#include <ppc-asm.h>
-#include "ppc-opcode.h"
-
-#undef toc
-
-#ifndef r1
-#define r1 1
-#endif
-
-#ifndef r2
-#define r2 2
-#endif
-
- .section .rodata
-.balign 16
-
-.byteswap_constant:
- /* byte reverse permute constant */
- .octa 0x0F0E0D0C0B0A09080706050403020100
-
-#define __ASSEMBLY__
-#include "crc32_constants.h"
-
- .text
-
-#if defined(__BIG_ENDIAN__) && defined(REFLECT)
-#define BYTESWAP_DATA
-#elif defined(__LITTLE_ENDIAN__) && !defined(REFLECT)
-#define BYTESWAP_DATA
-#else
-#undef BYTESWAP_DATA
-#endif
-
-#define off16 r25
-#define off32 r26
-#define off48 r27
-#define off64 r28
-#define off80 r29
-#define off96 r30
-#define off112 r31
-
-#define const1 v24
-#define const2 v25
-
-#define byteswap v26
-#define mask_32bit v27
-#define mask_64bit v28
-#define zeroes v29
-
-#ifdef BYTESWAP_DATA
-#define VPERM(A, B, C, D) vperm A, B, C, D
-#else
-#define VPERM(A, B, C, D)
-#endif
-
-/* unsigned int __crc32_vpmsum(unsigned int crc, void *p, unsigned long len) */
-FUNC_START(__crc32_vpmsum)
- std r31,-8(r1)
- std r30,-16(r1)
- std r29,-24(r1)
- std r28,-32(r1)
- std r27,-40(r1)
- std r26,-48(r1)
- std r25,-56(r1)
-
- li off16,16
- li off32,32
- li off48,48
- li off64,64
- li off80,80
- li off96,96
- li off112,112
- li r0,0
-
- /* Enough room for saving 10 non volatile VMX registers */
- subi r6,r1,56+10*16
- subi r7,r1,56+2*16
-
- stvx v20,0,r6
- stvx v21,off16,r6
- stvx v22,off32,r6
- stvx v23,off48,r6
- stvx v24,off64,r6
- stvx v25,off80,r6
- stvx v26,off96,r6
- stvx v27,off112,r6
- stvx v28,0,r7
- stvx v29,off16,r7
-
- mr r10,r3
-
- vxor zeroes,zeroes,zeroes
- vspltisw v0,-1
-
- vsldoi mask_32bit,zeroes,v0,4
- vsldoi mask_64bit,zeroes,v0,8
-
- /* Get the initial value into v8 */
- vxor v8,v8,v8
- MTVRD(v8, r3)
-#ifdef REFLECT
- vsldoi v8,zeroes,v8,8 /* shift into bottom 32 bits */
-#else
- vsldoi v8,v8,zeroes,4 /* shift into top 32 bits */
-#endif
-
-#ifdef BYTESWAP_DATA
- addis r3,r2,.byteswap_constant@toc@ha
- addi r3,r3,.byteswap_constant@toc@l
-
- lvx byteswap,0,r3
- addi r3,r3,16
-#endif
-
- cmpdi r5,256
- blt .Lshort
-
- rldicr r6,r5,0,56
-
- /* Checksum in blocks of MAX_SIZE */
-1: lis r7,MAX_SIZE@h
- ori r7,r7,MAX_SIZE@l
- mr r9,r7
- cmpd r6,r7
- bgt 2f
- mr r7,r6
-2: subf r6,r7,r6
-
- /* our main loop does 128 bytes at a time */
- srdi r7,r7,7
-
- /*
- * Work out the offset into the constants table to start at. Each
- * constant is 16 bytes, and it is used against 128 bytes of input
- * data - 128 / 16 = 8
- */
- sldi r8,r7,4
- srdi r9,r9,3
- subf r8,r8,r9
-
- /* We reduce our final 128 bytes in a separate step */
- addi r7,r7,-1
- mtctr r7
-
- addis r3,r2,.constants@toc@ha
- addi r3,r3,.constants@toc@l
-
- /* Find the start of our constants */
- add r3,r3,r8
-
- /* zero v0-v7 which will contain our checksums */
- vxor v0,v0,v0
- vxor v1,v1,v1
- vxor v2,v2,v2
- vxor v3,v3,v3
- vxor v4,v4,v4
- vxor v5,v5,v5
- vxor v6,v6,v6
- vxor v7,v7,v7
-
- lvx const1,0,r3
-
- /*
- * If we are looping back to consume more data we use the values
- * already in v16-v23.
- */
- cmpdi r0,1
- beq 2f
-
- /* First warm up pass */
- lvx v16,0,r4
- lvx v17,off16,r4
- VPERM(v16,v16,v16,byteswap)
- VPERM(v17,v17,v17,byteswap)
- lvx v18,off32,r4
- lvx v19,off48,r4
- VPERM(v18,v18,v18,byteswap)
- VPERM(v19,v19,v19,byteswap)
- lvx v20,off64,r4
- lvx v21,off80,r4
- VPERM(v20,v20,v20,byteswap)
- VPERM(v21,v21,v21,byteswap)
- lvx v22,off96,r4
- lvx v23,off112,r4
- VPERM(v22,v22,v22,byteswap)
- VPERM(v23,v23,v23,byteswap)
- addi r4,r4,8*16
-
- /* xor in initial value */
- vxor v16,v16,v8
-
-2: bdz .Lfirst_warm_up_done
-
- addi r3,r3,16
- lvx const2,0,r3
-
- /* Second warm up pass */
- VPMSUMD(v8,v16,const1)
- lvx v16,0,r4
- VPERM(v16,v16,v16,byteswap)
- ori r2,r2,0
-
- VPMSUMD(v9,v17,const1)
- lvx v17,off16,r4
- VPERM(v17,v17,v17,byteswap)
- ori r2,r2,0
-
- VPMSUMD(v10,v18,const1)
- lvx v18,off32,r4
- VPERM(v18,v18,v18,byteswap)
- ori r2,r2,0
-
- VPMSUMD(v11,v19,const1)
- lvx v19,off48,r4
- VPERM(v19,v19,v19,byteswap)
- ori r2,r2,0
-
- VPMSUMD(v12,v20,const1)
- lvx v20,off64,r4
- VPERM(v20,v20,v20,byteswap)
- ori r2,r2,0
-
- VPMSUMD(v13,v21,const1)
- lvx v21,off80,r4
- VPERM(v21,v21,v21,byteswap)
- ori r2,r2,0
-
- VPMSUMD(v14,v22,const1)
- lvx v22,off96,r4
- VPERM(v22,v22,v22,byteswap)
- ori r2,r2,0
-
- VPMSUMD(v15,v23,const1)
- lvx v23,off112,r4
- VPERM(v23,v23,v23,byteswap)
-
- addi r4,r4,8*16
-
- bdz .Lfirst_cool_down
-
- /*
- * main loop. We modulo schedule it such that it takes three iterations
- * to complete - first iteration load, second iteration vpmsum, third
- * iteration xor.
- */
- .balign 16
-4: lvx const1,0,r3
- addi r3,r3,16
- ori r2,r2,0
-
- vxor v0,v0,v8
- VPMSUMD(v8,v16,const2)
- lvx v16,0,r4
- VPERM(v16,v16,v16,byteswap)
- ori r2,r2,0
-
- vxor v1,v1,v9
- VPMSUMD(v9,v17,const2)
- lvx v17,off16,r4
- VPERM(v17,v17,v17,byteswap)
- ori r2,r2,0
-
- vxor v2,v2,v10
- VPMSUMD(v10,v18,const2)
- lvx v18,off32,r4
- VPERM(v18,v18,v18,byteswap)
- ori r2,r2,0
-
- vxor v3,v3,v11
- VPMSUMD(v11,v19,const2)
- lvx v19,off48,r4
- VPERM(v19,v19,v19,byteswap)
- lvx const2,0,r3
- ori r2,r2,0
-
- vxor v4,v4,v12
- VPMSUMD(v12,v20,const1)
- lvx v20,off64,r4
- VPERM(v20,v20,v20,byteswap)
- ori r2,r2,0
-
- vxor v5,v5,v13
- VPMSUMD(v13,v21,const1)
- lvx v21,off80,r4
- VPERM(v21,v21,v21,byteswap)
- ori r2,r2,0
-
- vxor v6,v6,v14
- VPMSUMD(v14,v22,const1)
- lvx v22,off96,r4
- VPERM(v22,v22,v22,byteswap)
- ori r2,r2,0
-
- vxor v7,v7,v15
- VPMSUMD(v15,v23,const1)
- lvx v23,off112,r4
- VPERM(v23,v23,v23,byteswap)
-
- addi r4,r4,8*16
-
- bdnz 4b
-
-.Lfirst_cool_down:
- /* First cool down pass */
- lvx const1,0,r3
- addi r3,r3,16
-
- vxor v0,v0,v8
- VPMSUMD(v8,v16,const1)
- ori r2,r2,0
-
- vxor v1,v1,v9
- VPMSUMD(v9,v17,const1)
- ori r2,r2,0
-
- vxor v2,v2,v10
- VPMSUMD(v10,v18,const1)
- ori r2,r2,0
-
- vxor v3,v3,v11
- VPMSUMD(v11,v19,const1)
- ori r2,r2,0
-
- vxor v4,v4,v12
- VPMSUMD(v12,v20,const1)
- ori r2,r2,0
-
- vxor v5,v5,v13
- VPMSUMD(v13,v21,const1)
- ori r2,r2,0
-
- vxor v6,v6,v14
- VPMSUMD(v14,v22,const1)
- ori r2,r2,0
-
- vxor v7,v7,v15
- VPMSUMD(v15,v23,const1)
- ori r2,r2,0
-
-.Lsecond_cool_down:
- /* Second cool down pass */
- vxor v0,v0,v8
- vxor v1,v1,v9
- vxor v2,v2,v10
- vxor v3,v3,v11
- vxor v4,v4,v12
- vxor v5,v5,v13
- vxor v6,v6,v14
- vxor v7,v7,v15
-
-#ifdef REFLECT
- /*
- * vpmsumd produces a 96 bit result in the least significant bits
- * of the register. Since we are bit reflected we have to shift it
- * left 32 bits so it occupies the least significant bits in the
- * bit reflected domain.
- */
- vsldoi v0,v0,zeroes,4
- vsldoi v1,v1,zeroes,4
- vsldoi v2,v2,zeroes,4
- vsldoi v3,v3,zeroes,4
- vsldoi v4,v4,zeroes,4
- vsldoi v5,v5,zeroes,4
- vsldoi v6,v6,zeroes,4
- vsldoi v7,v7,zeroes,4
-#endif
-
- /* xor with last 1024 bits */
- lvx v8,0,r4
- lvx v9,off16,r4
- VPERM(v8,v8,v8,byteswap)
- VPERM(v9,v9,v9,byteswap)
- lvx v10,off32,r4
- lvx v11,off48,r4
- VPERM(v10,v10,v10,byteswap)
- VPERM(v11,v11,v11,byteswap)
- lvx v12,off64,r4
- lvx v13,off80,r4
- VPERM(v12,v12,v12,byteswap)
- VPERM(v13,v13,v13,byteswap)
- lvx v14,off96,r4
- lvx v15,off112,r4
- VPERM(v14,v14,v14,byteswap)
- VPERM(v15,v15,v15,byteswap)
-
- addi r4,r4,8*16
-
- vxor v16,v0,v8
- vxor v17,v1,v9
- vxor v18,v2,v10
- vxor v19,v3,v11
- vxor v20,v4,v12
- vxor v21,v5,v13
- vxor v22,v6,v14
- vxor v23,v7,v15
-
- li r0,1
- cmpdi r6,0
- addi r6,r6,128
- bne 1b
-
- /* Work out how many bytes we have left */
- andi. r5,r5,127
-
- /* Calculate where in the constant table we need to start */
- subfic r6,r5,128
- add r3,r3,r6
-
- /* How many 16 byte chunks are in the tail */
- srdi r7,r5,4
- mtctr r7
-
- /*
- * Reduce the previously calculated 1024 bits to 64 bits, shifting
- * 32 bits to include the trailing 32 bits of zeros
- */
- lvx v0,0,r3
- lvx v1,off16,r3
- lvx v2,off32,r3
- lvx v3,off48,r3
- lvx v4,off64,r3
- lvx v5,off80,r3
- lvx v6,off96,r3
- lvx v7,off112,r3
- addi r3,r3,8*16
-
- VPMSUMW(v0,v16,v0)
- VPMSUMW(v1,v17,v1)
- VPMSUMW(v2,v18,v2)
- VPMSUMW(v3,v19,v3)
- VPMSUMW(v4,v20,v4)
- VPMSUMW(v5,v21,v5)
- VPMSUMW(v6,v22,v6)
- VPMSUMW(v7,v23,v7)
-
- /* Now reduce the tail (0 - 112 bytes) */
- cmpdi r7,0
- beq 1f
-
- lvx v16,0,r4
- lvx v17,0,r3
- VPERM(v16,v16,v16,byteswap)
- VPMSUMW(v16,v16,v17)
- vxor v0,v0,v16
- bdz 1f
-
- lvx v16,off16,r4
- lvx v17,off16,r3
- VPERM(v16,v16,v16,byteswap)
- VPMSUMW(v16,v16,v17)
- vxor v0,v0,v16
- bdz 1f
-
- lvx v16,off32,r4
- lvx v17,off32,r3
- VPERM(v16,v16,v16,byteswap)
- VPMSUMW(v16,v16,v17)
- vxor v0,v0,v16
- bdz 1f
-
- lvx v16,off48,r4
- lvx v17,off48,r3
- VPERM(v16,v16,v16,byteswap)
- VPMSUMW(v16,v16,v17)
- vxor v0,v0,v16
- bdz 1f
-
- lvx v16,off64,r4
- lvx v17,off64,r3
- VPERM(v16,v16,v16,byteswap)
- VPMSUMW(v16,v16,v17)
- vxor v0,v0,v16
- bdz 1f
-
- lvx v16,off80,r4
- lvx v17,off80,r3
- VPERM(v16,v16,v16,byteswap)
- VPMSUMW(v16,v16,v17)
- vxor v0,v0,v16
- bdz 1f
-
- lvx v16,off96,r4
- lvx v17,off96,r3
- VPERM(v16,v16,v16,byteswap)
- VPMSUMW(v16,v16,v17)
- vxor v0,v0,v16
-
- /* Now xor all the parallel chunks together */
-1: vxor v0,v0,v1
- vxor v2,v2,v3
- vxor v4,v4,v5
- vxor v6,v6,v7
-
- vxor v0,v0,v2
- vxor v4,v4,v6
-
- vxor v0,v0,v4
-
-.Lbarrett_reduction:
- /* Barrett constants */
- addis r3,r2,.barrett_constants@toc@ha
- addi r3,r3,.barrett_constants@toc@l
-
- lvx const1,0,r3
- lvx const2,off16,r3
-
- vsldoi v1,v0,v0,8
- vxor v0,v0,v1 /* xor two 64 bit results together */
-
-#ifdef REFLECT
- /* shift left one bit */
- vspltisb v1,1
- vsl v0,v0,v1
-#endif
-
- vand v0,v0,mask_64bit
-
-#ifndef REFLECT
- /*
- * Now for the Barrett reduction algorithm. The idea is to calculate q,
- * the multiple of our polynomial that we need to subtract. By
- * doing the computation 2x bits higher (ie 64 bits) and shifting the
- * result back down 2x bits, we round down to the nearest multiple.
- */
- VPMSUMD(v1,v0,const1) /* ma */
- vsldoi v1,zeroes,v1,8 /* q = floor(ma/(2^64)) */
- VPMSUMD(v1,v1,const2) /* qn */
- vxor v0,v0,v1 /* a - qn, subtraction is xor in GF(2) */
-
- /*
- * Get the result into r3. We need to shift it left 8 bytes:
- * V0 [ 0 1 2 X ]
- * V0 [ 0 X 2 3 ]
- */
- vsldoi v0,v0,zeroes,8 /* shift result into top 64 bits */
-#else
- /*
- * The reflected version of Barrett reduction. Instead of bit
- * reflecting our data (which is expensive to do), we bit reflect our
- * constants and our algorithm, which means the intermediate data in
- * our vector registers goes from 0-63 instead of 63-0. We can reflect
- * the algorithm because we don't carry in mod 2 arithmetic.
- */
- vand v1,v0,mask_32bit /* bottom 32 bits of a */
- VPMSUMD(v1,v1,const1) /* ma */
- vand v1,v1,mask_32bit /* bottom 32bits of ma */
- VPMSUMD(v1,v1,const2) /* qn */
- vxor v0,v0,v1 /* a - qn, subtraction is xor in GF(2) */
-
- /*
- * Since we are bit reflected, the result (ie the low 32 bits) is in
- * the high 32 bits. We just need to shift it left 4 bytes
- * V0 [ 0 1 X 3 ]
- * V0 [ 0 X 2 3 ]
- */
- vsldoi v0,v0,zeroes,4 /* shift result into top 64 bits of */
-#endif
-
-.Lout:
- subi r6,r1,56+10*16
- subi r7,r1,56+2*16
-
- lvx v20,0,r6
- lvx v21,off16,r6
- lvx v22,off32,r6
- lvx v23,off48,r6
- lvx v24,off64,r6
- lvx v25,off80,r6
- lvx v26,off96,r6
- lvx v27,off112,r6
- lvx v28,0,r7
- lvx v29,off16,r7
-
- /* Get it into r3 */
- MFVRD(r3, v0)
-
- ld r31,-8(r1)
- ld r30,-16(r1)
- ld r29,-24(r1)
- ld r28,-32(r1)
- ld r27,-40(r1)
- ld r26,-48(r1)
- ld r25,-56(r1)
-
- blr
-
-.Lfirst_warm_up_done:
- lvx const1,0,r3
- addi r3,r3,16
-
- VPMSUMD(v8,v16,const1)
- VPMSUMD(v9,v17,const1)
- VPMSUMD(v10,v18,const1)
- VPMSUMD(v11,v19,const1)
- VPMSUMD(v12,v20,const1)
- VPMSUMD(v13,v21,const1)
- VPMSUMD(v14,v22,const1)
- VPMSUMD(v15,v23,const1)
-
- b .Lsecond_cool_down
-
-.Lshort:
- cmpdi r5,0
- beq .Lzero
-
- addis r3,r2,.short_constants@toc@ha
- addi r3,r3,.short_constants@toc@l
-
- /* Calculate where in the constant table we need to start */
- subfic r6,r5,256
- add r3,r3,r6
-
- /* How many 16 byte chunks? */
- srdi r7,r5,4
- mtctr r7
-
- vxor v19,v19,v19
- vxor v20,v20,v20
-
- lvx v0,0,r4
- lvx v16,0,r3
- VPERM(v0,v0,v16,byteswap)
- vxor v0,v0,v8 /* xor in initial value */
- VPMSUMW(v0,v0,v16)
- bdz .Lv0
-
- lvx v1,off16,r4
- lvx v17,off16,r3
- VPERM(v1,v1,v17,byteswap)
- VPMSUMW(v1,v1,v17)
- bdz .Lv1
-
- lvx v2,off32,r4
- lvx v16,off32,r3
- VPERM(v2,v2,v16,byteswap)
- VPMSUMW(v2,v2,v16)
- bdz .Lv2
-
- lvx v3,off48,r4
- lvx v17,off48,r3
- VPERM(v3,v3,v17,byteswap)
- VPMSUMW(v3,v3,v17)
- bdz .Lv3
-
- lvx v4,off64,r4
- lvx v16,off64,r3
- VPERM(v4,v4,v16,byteswap)
- VPMSUMW(v4,v4,v16)
- bdz .Lv4
-
- lvx v5,off80,r4
- lvx v17,off80,r3
- VPERM(v5,v5,v17,byteswap)
- VPMSUMW(v5,v5,v17)
- bdz .Lv5
-
- lvx v6,off96,r4
- lvx v16,off96,r3
- VPERM(v6,v6,v16,byteswap)
- VPMSUMW(v6,v6,v16)
- bdz .Lv6
-
- lvx v7,off112,r4
- lvx v17,off112,r3
- VPERM(v7,v7,v17,byteswap)
- VPMSUMW(v7,v7,v17)
- bdz .Lv7
-
- addi r3,r3,128
- addi r4,r4,128
-
- lvx v8,0,r4
- lvx v16,0,r3
- VPERM(v8,v8,v16,byteswap)
- VPMSUMW(v8,v8,v16)
- bdz .Lv8
-
- lvx v9,off16,r4
- lvx v17,off16,r3
- VPERM(v9,v9,v17,byteswap)
- VPMSUMW(v9,v9,v17)
- bdz .Lv9
-
- lvx v10,off32,r4
- lvx v16,off32,r3
- VPERM(v10,v10,v16,byteswap)
- VPMSUMW(v10,v10,v16)
- bdz .Lv10
-
- lvx v11,off48,r4
- lvx v17,off48,r3
- VPERM(v11,v11,v17,byteswap)
- VPMSUMW(v11,v11,v17)
- bdz .Lv11
-
- lvx v12,off64,r4
- lvx v16,off64,r3
- VPERM(v12,v12,v16,byteswap)
- VPMSUMW(v12,v12,v16)
- bdz .Lv12
-
- lvx v13,off80,r4
- lvx v17,off80,r3
- VPERM(v13,v13,v17,byteswap)
- VPMSUMW(v13,v13,v17)
- bdz .Lv13
-
- lvx v14,off96,r4
- lvx v16,off96,r3
- VPERM(v14,v14,v16,byteswap)
- VPMSUMW(v14,v14,v16)
- bdz .Lv14
-
- lvx v15,off112,r4
- lvx v17,off112,r3
- VPERM(v15,v15,v17,byteswap)
- VPMSUMW(v15,v15,v17)
-
-.Lv15: vxor v19,v19,v15
-.Lv14: vxor v20,v20,v14
-.Lv13: vxor v19,v19,v13
-.Lv12: vxor v20,v20,v12
-.Lv11: vxor v19,v19,v11
-.Lv10: vxor v20,v20,v10
-.Lv9: vxor v19,v19,v9
-.Lv8: vxor v20,v20,v8
-.Lv7: vxor v19,v19,v7
-.Lv6: vxor v20,v20,v6
-.Lv5: vxor v19,v19,v5
-.Lv4: vxor v20,v20,v4
-.Lv3: vxor v19,v19,v3
-.Lv2: vxor v20,v20,v2
-.Lv1: vxor v19,v19,v1
-.Lv0: vxor v20,v20,v0
-
- vxor v0,v19,v20
-
- b .Lbarrett_reduction
-
-.Lzero:
- mr r3,r10
- blr
- b .Lout
-
-FUNC_END(__crc32_vpmsum)
-
-#endif /* __powerpc__ */
diff --git a/storage/innobase/ut/ut0crc32.cc b/storage/innobase/ut/ut0crc32.cc
index 1ec8ddd1581..e4f0f310224 100644
--- a/storage/innobase/ut/ut0crc32.cc
+++ b/storage/innobase/ut/ut0crc32.cc
@@ -118,7 +118,22 @@ ut_crc32_swap_byteorder(
/* Flag that tells whether the CPU supports CRC32 or not */
bool ut_crc32_sse2_enabled = false;
-UNIV_INTERN bool ut_crc32_power8_enabled = false;
+UNIV_INTERN bool ut_crc32_power8_enabled = false;
+
+#ifdef HAVE_CRC32_VPMSUM
+extern "C" {
+unsigned int crc32c_vpmsum(unsigned int crc, const unsigned char *p, unsigned long len);
+};
+UNIV_INLINE
+ib_uint32_t
+ut_crc32_power8(
+/*===========*/
+ const byte* buf, /*!< in: data over which to calculate CRC32 */
+ ulint len) /*!< in: data length */
+{
+ return crc32c_vpmsum(0, buf, len);
+}
+#endif
#if defined(__GNUC__) && defined(__x86_64__)
/********************************************************************//**
@@ -432,6 +447,7 @@ static bool ut_crc32_slice8_table_initialized = false;
/********************************************************************//**
Initializes the table that is used to generate the CRC32 if the CPU does
not have support for it. */
+#ifndef HAVE_CRC32_VPMSUM
static
void
ut_crc32_slice8_table_init()
@@ -461,6 +477,7 @@ ut_crc32_slice8_table_init()
ut_crc32_slice8_table_initialized = true;
}
+#endif
/** Calculate CRC32 over 8-bit data using a software implementation.
@param[in,out] crc crc32 checksum so far when this function is called,
@@ -728,7 +745,12 @@ ut_crc32_init()
#endif /* defined(__GNUC__) && defined(__x86_64__) */
- if (!ut_crc32_sse2_enabled) {
+#ifdef HAVE_CRC32_VPMSUM
+ ut_crc32_power8_enabled = true;
+ ut_crc32 = ut_crc32_power8;
+#endif
+
+ if (!ut_crc32_sse2_enabled && !ut_crc32_power8_enabled) {
ut_crc32_slice8_table_init();
ut_crc32 = ut_crc32_sw;
ut_crc32_legacy_big_endian = ut_crc32_legacy_big_endian_sw;
diff --git a/storage/maria/ma_extra.c b/storage/maria/ma_extra.c
index fd21d2863f8..117a302b418 100644
--- a/storage/maria/ma_extra.c
+++ b/storage/maria/ma_extra.c
@@ -319,6 +319,7 @@ int maria_extra(MARIA_HA *info, enum ha_extra_function function,
my_bool do_flush= MY_TEST(function != HA_EXTRA_PREPARE_FOR_DROP);
my_bool save_global_changed;
enum flush_type type;
+ DBUG_ASSERT(!share->temporary);
/*
This share, to have last_version=0, needs to save all its data/index
blocks to disk if this is not for a DROP TABLE. Otherwise they would be
diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_solaris10.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_solaris10.inc
new file mode 100644
index 00000000000..7cee5c38c53
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_solaris10.inc
@@ -0,0 +1,3 @@
+if (`SELECT @@version_compile_os='solaris10'`) {
+ skip This test is not for Solaris 10;
+}
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_before_unix_epoch.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_before_unix_epoch.test
index 246500b4498..433e239c301 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_before_unix_epoch.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_before_unix_epoch.test
@@ -17,6 +17,7 @@
--source ../../include/mroonga/skip_freebsd.inc
--source ../../include/mroonga/skip_osx.inc
+--source ../../include/mroonga/skip_solaris10.inc
--source ../../include/mroonga/have_64bit.inc
--source ../../include/mroonga/have_mroonga.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_64bit_equal.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_64bit_equal.test
index e84147d6041..010611ee3ec 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_64bit_equal.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_64bit_equal.test
@@ -18,6 +18,7 @@
--source ../../include/mroonga/skip_freebsd.inc
--source ../../include/mroonga/skip_osx.inc
+--source ../../include/mroonga/skip_solaris10.inc
--source ../../include/mroonga/have_64bit.inc
--source ../../include/mroonga/have_mroonga.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_asc.test
index 7a0ec41f07a..ef7066164fd 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_asc.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_asc.test
@@ -18,6 +18,7 @@
--source ../../include/mroonga/skip_freebsd.inc
--source ../../include/mroonga/skip_osx.inc
+--source ../../include/mroonga/skip_solaris10.inc
--source ../../include/mroonga/have_64bit.inc
--source ../../include/mroonga/have_mroonga.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_desc.test
index db434bca061..d34d29a224b 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_desc.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_date_order_64bit_desc.test
@@ -18,6 +18,7 @@
--source ../../include/mroonga/skip_freebsd.inc
--source ../../include/mroonga/skip_osx.inc
+--source ../../include/mroonga/skip_solaris10.inc
--source ../../include/mroonga/have_64bit.inc
--source ../../include/mroonga/have_mroonga.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_index_read.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_index_read.test
index 2b7ea97133e..66e0a4d6a9f 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_index_read.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_index_read.test
@@ -19,6 +19,7 @@
--source ../../include/mroonga/have_64bit.inc
--source ../../include/mroonga/skip_freebsd.inc
--source ../../include/mroonga/skip_osx.inc
+--source ../../include/mroonga/skip_solaris10.inc
--source ../../include/mroonga/have_mroonga.inc
--disable_warnings
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_asc.test
index c2ebff516d0..c28fcd86a2a 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_asc.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_asc.test
@@ -18,6 +18,7 @@
--source ../../include/mroonga/skip_freebsd.inc
--source ../../include/mroonga/skip_osx.inc
+--source ../../include/mroonga/skip_solaris10.inc
--source ../../include/mroonga/have_64bit.inc
--source ../../include/mroonga/have_mroonga.inc
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_desc.test
index 6a60b00087e..b5b3545cc9d 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_desc.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_order_desc.test
@@ -18,6 +18,7 @@
--source ../../include/mroonga/skip_freebsd.inc
--source ../../include/mroonga/skip_osx.inc
+--source ../../include/mroonga/skip_solaris10.inc
--source ../../include/mroonga/have_64bit.inc
--source ../../include/mroonga/have_mroonga.inc
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc
index 9df1ec832a8..b5371a2b0c3 100644
--- a/storage/myisam/ha_myisam.cc
+++ b/storage/myisam/ha_myisam.cc
@@ -1456,6 +1456,7 @@ int ha_myisam::enable_indexes(uint mode)
else if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE)
{
THD *thd= table->in_use;
+ int was_error= thd->is_error();
HA_CHECK &param= *(HA_CHECK*) thd->alloc(sizeof(param));
const char *save_proc_info=thd->proc_info;
@@ -1501,7 +1502,7 @@ int ha_myisam::enable_indexes(uint mode)
might have been set by the first repair. They can still be seen
with SHOW WARNINGS then.
*/
- if (! error)
+ if (! error && ! was_error)
thd->clear_error();
}
info(HA_STATUS_CONST);
diff --git a/storage/myisam/mi_extra.c b/storage/myisam/mi_extra.c
index a47c1987e38..3d6049c0172 100644
--- a/storage/myisam/mi_extra.c
+++ b/storage/myisam/mi_extra.c
@@ -264,6 +264,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg)
_mi_mark_file_changed(info);
/* Fall trough */
case HA_EXTRA_PREPARE_FOR_RENAME:
+ DBUG_ASSERT(!share->temporary);
mysql_mutex_lock(&THR_LOCK_myisam);
share->last_version= 0L; /* Impossible version */
mysql_mutex_lock(&share->intern_lock);
diff --git a/storage/perfschema/ha_perfschema.cc b/storage/perfschema/ha_perfschema.cc
index 87ce386a7cd..d703d5d594a 100644
--- a/storage/perfschema/ha_perfschema.cc
+++ b/storage/perfschema/ha_perfschema.cc
@@ -225,7 +225,7 @@ maria_declare_plugin(perfschema)
0x0001,
pfs_status_vars,
NULL,
- "5.6.29",
+ "5.6.32",
MariaDB_PLUGIN_MATURITY_STABLE
}
maria_declare_plugin_end;
diff --git a/storage/perfschema/table_events_statements.cc b/storage/perfschema/table_events_statements.cc
index fc912cfdc9b..0d0ea02974d 100644
--- a/storage/perfschema/table_events_statements.cc
+++ b/storage/perfschema/table_events_statements.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+/* 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
@@ -249,11 +249,17 @@ void table_events_statements_common::make_row_part_1(PFS_events_statements *stat
CHARSET_INFO *cs= get_charset(statement->m_sqltext_cs_number, MYF(0));
size_t valid_length= statement->m_sqltext_length;
- if (cs->mbmaxlen > 1)
+ if (cs != NULL)
{
- int well_formed_error;
- valid_length= cs->cset->well_formed_len(cs, statement->m_sqltext, statement->m_sqltext + valid_length,
- valid_length, &well_formed_error);
+ if (cs->mbmaxlen > 1)
+ {
+ int well_formed_error;
+ valid_length= cs->cset->well_formed_len(cs,
+ statement->m_sqltext,
+ statement->m_sqltext + valid_length,
+ valid_length,
+ &well_formed_error);
+ }
}
m_row.m_sqltext.set_charset(cs);
diff --git a/storage/test_sql_discovery/mysql-test/sql_discovery/simple.result b/storage/test_sql_discovery/mysql-test/sql_discovery/simple.result
index 2e68d8be6b4..d2f0b52c446 100644
--- a/storage/test_sql_discovery/mysql-test/sql_discovery/simple.result
+++ b/storage/test_sql_discovery/mysql-test/sql_discovery/simple.result
@@ -122,7 +122,7 @@ Handler_discover 15
show create table t1;
Table Create Table
t1 CREATE TABLE t1 (
- a int(11) NOT NULL DEFAULT '5',
+ a int(11) NOT NULL DEFAULT 5,
b timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
c tinyblob DEFAULT NULL,
d decimal(5,2) DEFAULT NULL,
diff --git a/storage/tokudb/CMakeLists.txt b/storage/tokudb/CMakeLists.txt
index f9754639bd9..765e6733a98 100644
--- a/storage/tokudb/CMakeLists.txt
+++ b/storage/tokudb/CMakeLists.txt
@@ -1,4 +1,4 @@
-SET(TOKUDB_VERSION 5.6.30-76.3)
+SET(TOKUDB_VERSION 5.6.31-77.0)
# PerconaFT only supports x86-64 and cmake-2.8.9+
IF(CMAKE_VERSION VERSION_LESS "2.8.9")
MESSAGE(STATUS "CMake 2.8.9 or higher is required by TokuDB")
@@ -79,10 +79,6 @@ IF(DEFINED TOKUDB_NOPATCH_CONFIG)
ADD_DEFINITIONS("-DTOKUDB_NOPATCH_CONFIG=${TOKUDB_NOPATCH_CONFIG}")
ENDIF()
-IF(DEFINED TOKUDB_CHECK_JEMALLOC)
- ADD_DEFINITIONS("-DTOKUDB_CHECK_JEMALLOC=${TOKUDB_CHECK_JEMALLOC}")
-ENDIF()
-
MY_CHECK_AND_SET_COMPILER_FLAG(-Wno-missing-field-initializers)
IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/PerconaFT/")
diff --git a/storage/tokudb/PerconaFT/buildheader/make_tdb.cc b/storage/tokudb/PerconaFT/buildheader/make_tdb.cc
index 5c29209e19d..4b62703480f 100644
--- a/storage/tokudb/PerconaFT/buildheader/make_tdb.cc
+++ b/storage/tokudb/PerconaFT/buildheader/make_tdb.cc
@@ -420,6 +420,8 @@ static void print_db_env_struct (void) {
"int (*set_client_pool_threads)(DB_ENV *, uint32_t)",
"int (*set_cachetable_pool_threads)(DB_ENV *, uint32_t)",
"int (*set_checkpoint_pool_threads)(DB_ENV *, uint32_t)",
+ "void (*set_check_thp)(DB_ENV *, bool new_val)",
+ "bool (*get_check_thp)(DB_ENV *)",
NULL};
sort_and_dump_fields("db_env", true, extra);
diff --git a/storage/tokudb/PerconaFT/src/ydb-internal.h b/storage/tokudb/PerconaFT/src/ydb-internal.h
index 3737a1caf99..462a2a3d861 100644
--- a/storage/tokudb/PerconaFT/src/ydb-internal.h
+++ b/storage/tokudb/PerconaFT/src/ydb-internal.h
@@ -132,6 +132,7 @@ struct __toku_db_env_internal {
int datadir_lockfd;
int logdir_lockfd;
int tmpdir_lockfd;
+ bool check_thp; // if set check if transparent huge pages are disables
uint64_t (*get_loader_memory_size_callback)(void);
uint64_t default_lock_timeout_msec;
uint64_t (*get_lock_timeout_callback)(uint64_t default_lock_timeout_msec);
diff --git a/storage/tokudb/PerconaFT/src/ydb.cc b/storage/tokudb/PerconaFT/src/ydb.cc
index 1b977599c0c..bde479a9ed6 100644
--- a/storage/tokudb/PerconaFT/src/ydb.cc
+++ b/storage/tokudb/PerconaFT/src/ydb.cc
@@ -624,32 +624,39 @@ ydb_recover_log_exists(DB_ENV *env) {
}
// Validate that all required files are present, no side effects.
-// Return 0 if all is well, ENOENT if some files are present but at least one is missing,
+// Return 0 if all is well, ENOENT if some files are present but at least one is
+// missing,
// other non-zero value if some other error occurs.
// Set *valid_newenv if creating a new environment (all files missing).
-// (Note, if special dictionaries exist, then they were created transactionally and log should exist.)
-static int
-validate_env(DB_ENV * env, bool * valid_newenv, bool need_rollback_cachefile) {
+// (Note, if special dictionaries exist, then they were created transactionally
+// and log should exist.)
+static int validate_env(DB_ENV *env,
+ bool *valid_newenv,
+ bool need_rollback_cachefile) {
int r;
- bool expect_newenv = false; // set true if we expect to create a new env
+ bool expect_newenv = false; // set true if we expect to create a new env
toku_struct_stat buf;
- char* path = NULL;
+ char *path = NULL;
// Test for persistent environment
- path = toku_construct_full_name(2, env->i->dir, toku_product_name_strings.environmentdictionary);
+ path = toku_construct_full_name(
+ 2, env->i->dir, toku_product_name_strings.environmentdictionary);
assert(path);
r = toku_stat(path, &buf);
if (r == 0) {
expect_newenv = false; // persistent info exists
- }
- else {
+ } else {
int stat_errno = get_error_errno();
if (stat_errno == ENOENT) {
expect_newenv = true;
r = 0;
- }
- else {
- r = toku_ydb_do_error(env, stat_errno, "Unable to access persistent environment\n");
+ } else {
+ r = toku_ydb_do_error(
+ env,
+ stat_errno,
+ "Unable to access persistent environment [%s] in [%s]\n",
+ toku_product_name_strings.environmentdictionary,
+ env->i->dir);
assert(r);
}
}
@@ -657,23 +664,40 @@ validate_env(DB_ENV * env, bool * valid_newenv, bool need_rollback_cachefile) {
// Test for existence of rollback cachefile if it is expected to exist
if (r == 0 && need_rollback_cachefile) {
- path = toku_construct_full_name(2, env->i->dir, toku_product_name_strings.rollback_cachefile);
+ path = toku_construct_full_name(
+ 2, env->i->dir, toku_product_name_strings.rollback_cachefile);
assert(path);
r = toku_stat(path, &buf);
- if (r == 0) {
- if (expect_newenv) // rollback cachefile exists, but persistent env is missing
- r = toku_ydb_do_error(env, ENOENT, "Persistent environment is missing\n");
- }
- else {
+ if (r == 0) {
+ if (expect_newenv) // rollback cachefile exists, but persistent env
+ // is missing
+ r = toku_ydb_do_error(
+ env,
+ ENOENT,
+ "Persistent environment is missing while looking for "
+ "rollback cachefile [%s] in [%s]\n",
+ toku_product_name_strings.rollback_cachefile, env->i->dir);
+ } else {
int stat_errno = get_error_errno();
if (stat_errno == ENOENT) {
- if (!expect_newenv) // rollback cachefile is missing but persistent env exists
- r = toku_ydb_do_error(env, ENOENT, "rollback cachefile directory is missing\n");
- else
- r = 0; // both rollback cachefile and persistent env are missing
- }
- else {
- r = toku_ydb_do_error(env, stat_errno, "Unable to access rollback cachefile\n");
+ if (!expect_newenv) // rollback cachefile is missing but
+ // persistent env exists
+ r = toku_ydb_do_error(
+ env,
+ ENOENT,
+ "rollback cachefile [%s] is missing from [%s]\n",
+ toku_product_name_strings.rollback_cachefile,
+ env->i->dir);
+ else
+ r = 0; // both rollback cachefile and persistent env are
+ // missing
+ } else {
+ r = toku_ydb_do_error(
+ env,
+ stat_errno,
+ "Unable to access rollback cachefile [%s] in [%s]\n",
+ toku_product_name_strings.rollback_cachefile,
+ env->i->dir);
assert(r);
}
}
@@ -682,23 +706,41 @@ validate_env(DB_ENV * env, bool * valid_newenv, bool need_rollback_cachefile) {
// Test for fileops directory
if (r == 0) {
- path = toku_construct_full_name(2, env->i->dir, toku_product_name_strings.fileopsdirectory);
+ path = toku_construct_full_name(
+ 2, env->i->dir, toku_product_name_strings.fileopsdirectory);
assert(path);
r = toku_stat(path, &buf);
- if (r == 0) {
- if (expect_newenv) // fileops directory exists, but persistent env is missing
- r = toku_ydb_do_error(env, ENOENT, "Persistent environment is missing\n");
- }
- else {
+ if (r == 0) {
+ if (expect_newenv) // fileops directory exists, but persistent env
+ // is missing
+ r = toku_ydb_do_error(
+ env,
+ ENOENT,
+ "Persistent environment is missing while looking for "
+ "fileops directory [%s] in [%s]\n",
+ toku_product_name_strings.fileopsdirectory,
+ env->i->dir);
+ } else {
int stat_errno = get_error_errno();
if (stat_errno == ENOENT) {
- if (!expect_newenv) // fileops directory is missing but persistent env exists
- r = toku_ydb_do_error(env, ENOENT, "Fileops directory is missing\n");
- else
- r = 0; // both fileops directory and persistent env are missing
- }
- else {
- r = toku_ydb_do_error(env, stat_errno, "Unable to access fileops directory\n");
+ if (!expect_newenv) // fileops directory is missing but
+ // persistent env exists
+ r = toku_ydb_do_error(
+ env,
+ ENOENT,
+ "Fileops directory [%s] is missing from [%s]\n",
+ toku_product_name_strings.fileopsdirectory,
+ env->i->dir);
+ else
+ r = 0; // both fileops directory and persistent env are
+ // missing
+ } else {
+ r = toku_ydb_do_error(
+ env,
+ stat_errno,
+ "Unable to access fileops directory [%s] in [%s]\n",
+ toku_product_name_strings.fileopsdirectory,
+ env->i->dir);
assert(r);
}
}
@@ -710,16 +752,26 @@ validate_env(DB_ENV * env, bool * valid_newenv, bool need_rollback_cachefile) {
// if using transactions, test for existence of log
r = ydb_recover_log_exists(env); // return 0 or ENOENT
if (expect_newenv && (r != ENOENT))
- r = toku_ydb_do_error(env, ENOENT, "Persistent environment information is missing (but log exists)\n");
+ r = toku_ydb_do_error(env,
+ ENOENT,
+ "Persistent environment information is "
+ "missing (but log exists) while looking for "
+ "recovery log files in [%s]\n",
+ env->i->real_log_dir);
else if (!expect_newenv && r == ENOENT)
- r = toku_ydb_do_error(env, ENOENT, "Recovery log is missing (persistent environment information is present)\n");
+ r = toku_ydb_do_error(env,
+ ENOENT,
+ "Recovery log is missing (persistent "
+ "environment information is present) while "
+ "looking for recovery log files in [%s]\n",
+ env->i->real_log_dir);
else
r = 0;
}
if (r == 0)
*valid_newenv = expect_newenv;
- else
+ else
*valid_newenv = false;
return r;
}
@@ -769,7 +821,7 @@ env_open(DB_ENV * env, const char *home, uint32_t flags, int mode) {
goto cleanup;
}
- if (toku_os_huge_pages_enabled()) {
+ if (env->get_check_thp(env) && toku_os_huge_pages_enabled()) {
r = toku_ydb_do_error(env, TOKUDB_HUGE_PAGES_ENABLED,
"Huge pages are enabled, disable them before continuing\n");
goto cleanup;
@@ -1235,6 +1287,18 @@ env_set_checkpoint_pool_threads(DB_ENV * env, uint32_t threads) {
return 0;
}
+static void
+env_set_check_thp(DB_ENV * env, bool new_val) {
+ assert(env);
+ env->i->check_thp = new_val;
+}
+
+static bool
+env_get_check_thp(DB_ENV * env) {
+ assert(env);
+ return env->i->check_thp;
+}
+
static int env_dbremove(DB_ENV * env, DB_TXN *txn, const char *fname, const char *dbname, uint32_t flags);
static int
@@ -2635,6 +2699,8 @@ toku_env_create(DB_ENV ** envp, uint32_t flags) {
USENV(get_loader_memory_size);
USENV(set_killed_callback);
USENV(do_backtrace);
+ USENV(set_check_thp);
+ USENV(get_check_thp);
#undef USENV
// unlocked methods
@@ -2660,6 +2726,8 @@ toku_env_create(DB_ENV ** envp, uint32_t flags) {
env_fs_init(result);
env_fsync_log_init(result);
+ result->i->check_thp = true;
+
result->i->bt_compare = toku_builtin_compare_fun;
r = toku_logger_create(&result->i->logger);
diff --git a/storage/tokudb/hatoku_defines.h b/storage/tokudb/hatoku_defines.h
index 44ad3184f63..8c7ebfa62de 100644
--- a/storage/tokudb/hatoku_defines.h
+++ b/storage/tokudb/hatoku_defines.h
@@ -71,10 +71,6 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
#if 100000 <= MYSQL_VERSION_ID
-#if !defined(TOKUDB_CHECK_JEMALLOC)
-#define TOKUDB_CHECK_JEMALLOC 1
-#endif
-
// mariadb 10.0
#define TOKU_USE_DB_TYPE_TOKUDB 1
#define TOKU_INCLUDE_ALTER_56 1
diff --git a/storage/tokudb/hatoku_hton.cc b/storage/tokudb/hatoku_hton.cc
index e62836c5ed4..6a32f35479e 100644
--- a/storage/tokudb/hatoku_hton.cc
+++ b/storage/tokudb/hatoku_hton.cc
@@ -266,7 +266,6 @@ static int tokudb_init_func(void *p) {
db_env = NULL;
tokudb_hton = (handlerton *) p;
-#if TOKUDB_CHECK_JEMALLOC
if (tokudb::sysvars::check_jemalloc) {
typedef int (*mallctl_type)(
const char*,
@@ -293,7 +292,6 @@ static int tokudb_init_func(void *p) {
goto error;
}
}
-#endif
r = tokudb_set_product_name();
if (r) {
@@ -538,6 +536,8 @@ static int tokudb_init_func(void *p) {
db_env,
tokudb_get_loader_memory_size_callback);
+ db_env->set_check_thp(db_env, tokudb::sysvars::check_jemalloc);
+
r = db_env->open(
db_env,
tokudb_home,
diff --git a/storage/tokudb/mysql-test/rpl/r/rpl_extra_col_slave_tokudb.result b/storage/tokudb/mysql-test/rpl/r/rpl_extra_col_slave_tokudb.result
index ce312f4682f..db89e478b90 100644
--- a/storage/tokudb/mysql-test/rpl/r/rpl_extra_col_slave_tokudb.result
+++ b/storage/tokudb/mysql-test/rpl/r/rpl_extra_col_slave_tokudb.result
@@ -674,7 +674,7 @@ t16 CREATE TABLE `t16` (
`c3` text DEFAULT NULL,
`c4` blob DEFAULT NULL,
`c5` char(5) DEFAULT NULL,
- `c6` int(11) DEFAULT '1',
+ `c6` int(11) DEFAULT 1,
`c7` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`c1`)
) ENGINE=TokuDB DEFAULT CHARSET=latin1
diff --git a/storage/tokudb/mysql-test/rpl/t/suite.opt b/storage/tokudb/mysql-test/rpl/t/suite.opt
index 23511b05020..15acdf7397f 100644
--- a/storage/tokudb/mysql-test/rpl/t/suite.opt
+++ b/storage/tokudb/mysql-test/rpl/t/suite.opt
@@ -1 +1 @@
-$TOKUDB_OPT $TOKUDB_LOAD_ADD --loose-tokudb-check-jemalloc=0
+$TOKUDB_OPT $TOKUDB_LOAD_ADD --loose-tokudb-check-jemalloc=0 --loose-tokudb-cache-size=512M --loose-tokudb-block-size=1M
diff --git a/storage/tokudb/mysql-test/tokudb/bulk-fetch-gen.py b/storage/tokudb/mysql-test/tokudb/bulk-fetch-gen.py
index f125ce771da..4e343772511 100644
--- a/storage/tokudb/mysql-test/tokudb/bulk-fetch-gen.py
+++ b/storage/tokudb/mysql-test/tokudb/bulk-fetch-gen.py
@@ -71,6 +71,7 @@ tables = [
]
# Code generation stats here
+print "source include/have_tokudb.inc;"
print "# Tokutek"
print "# Test that bulk fetch works with various table types"
print ""
diff --git a/storage/tokudb/mysql-test/tokudb/locks-blocking-row-locks-testgen.py b/storage/tokudb/mysql-test/tokudb/locks-blocking-row-locks-testgen.py
index 372431ada04..28bea5dea56 100644
--- a/storage/tokudb/mysql-test/tokudb/locks-blocking-row-locks-testgen.py
+++ b/storage/tokudb/mysql-test/tokudb/locks-blocking-row-locks-testgen.py
@@ -56,6 +56,7 @@ write_range_queries = [
timeouts = [0, 500]
# Here's where all the magic happens
+print "source include/have_tokudb.inc;"
print "# Tokutek"
print "# Blocking row lock tests;"
print "# Generated by %s on %s;" % (__file__, datetime.date.today())
diff --git a/storage/tokudb/mysql-test/tokudb/r/background_job_manager.result b/storage/tokudb/mysql-test/tokudb/r/background_job_manager.result
index 5769ee74071..9d813eca8e9 100644
--- a/storage/tokudb/mysql-test/tokudb/r/background_job_manager.result
+++ b/storage/tokudb/mysql-test/tokudb/r/background_job_manager.result
@@ -17,7 +17,7 @@ set global tokudb_debug_pause_background_job_manager=TRUE;
show create table information_schema.tokudb_background_job_status;
Table Create Table
TokuDB_background_job_status CREATE TEMPORARY TABLE `TokuDB_background_job_status` (
- `id` bigint(0) NOT NULL DEFAULT '0',
+ `id` bigint(0) NOT NULL DEFAULT 0,
`database_name` varchar(256) NOT NULL DEFAULT '',
`table_name` varchar(256) NOT NULL DEFAULT '',
`job_type` varchar(256) NOT NULL DEFAULT '',
diff --git a/storage/tokudb/mysql-test/tokudb/r/change_column_int_default.result b/storage/tokudb/mysql-test/tokudb/r/change_column_int_default.result
index 558d153711c..b119f1a0b61 100644
--- a/storage/tokudb/mysql-test/tokudb/r/change_column_int_default.result
+++ b/storage/tokudb/mysql-test/tokudb/r/change_column_int_default.result
@@ -6,31 +6,31 @@ ALTER TABLE t CHANGE COLUMN a a TINYINT DEFAULT 100;
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
- `a` tinyint(4) DEFAULT '100'
+ `a` tinyint(4) DEFAULT 100
) ENGINE=TokuDB DEFAULT CHARSET=latin1
ALTER TABLE t CHANGE COLUMN a a SMALLINT DEFAULT 200;
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
- `a` smallint(6) DEFAULT '200'
+ `a` smallint(6) DEFAULT 200
) ENGINE=TokuDB DEFAULT CHARSET=latin1
ALTER TABLE t CHANGE COLUMN a a MEDIUMINT DEFAULT 300;
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
- `a` mediumint(9) DEFAULT '300'
+ `a` mediumint(9) DEFAULT 300
) ENGINE=TokuDB DEFAULT CHARSET=latin1
ALTER TABLE t CHANGE COLUMN a a INT DEFAULT 400;
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
- `a` int(11) DEFAULT '400'
+ `a` int(11) DEFAULT 400
) ENGINE=TokuDB DEFAULT CHARSET=latin1
ALTER TABLE t CHANGE COLUMN a a BIGINT DEFAULT 500;
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
- `a` bigint(20) DEFAULT '500'
+ `a` bigint(20) DEFAULT 500
) ENGINE=TokuDB DEFAULT CHARSET=latin1
DROP TABLE t;
CREATE TABLE t (a TINYINT NOT NULL DEFAULT 1);
@@ -38,31 +38,31 @@ ALTER TABLE t CHANGE COLUMN a a TINYINT NOT NULL DEFAULT 100;
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
- `a` tinyint(4) NOT NULL DEFAULT '100'
+ `a` tinyint(4) NOT NULL DEFAULT 100
) ENGINE=TokuDB DEFAULT CHARSET=latin1
ALTER TABLE t CHANGE COLUMN a a SMALLINT NOT NULL DEFAULT 200;
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
- `a` smallint(6) NOT NULL DEFAULT '200'
+ `a` smallint(6) NOT NULL DEFAULT 200
) ENGINE=TokuDB DEFAULT CHARSET=latin1
ALTER TABLE t CHANGE COLUMN a a MEDIUMINT NOT NULL DEFAULT 300;
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
- `a` mediumint(9) NOT NULL DEFAULT '300'
+ `a` mediumint(9) NOT NULL DEFAULT 300
) ENGINE=TokuDB DEFAULT CHARSET=latin1
ALTER TABLE t CHANGE COLUMN a a INT NOT NULL DEFAULT 400;
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
- `a` int(11) NOT NULL DEFAULT '400'
+ `a` int(11) NOT NULL DEFAULT 400
) ENGINE=TokuDB DEFAULT CHARSET=latin1
ALTER TABLE t CHANGE COLUMN a a BIGINT NOT NULL DEFAULT 500;
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
- `a` bigint(20) NOT NULL DEFAULT '500'
+ `a` bigint(20) NOT NULL DEFAULT 500
) ENGINE=TokuDB DEFAULT CHARSET=latin1
DROP TABLE t;
CREATE TABLE t (a TINYINT UNSIGNED DEFAULT 1);
@@ -70,31 +70,31 @@ ALTER TABLE t CHANGE COLUMN a a TINYINT UNSIGNED DEFAULT 100;
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
- `a` tinyint(3) unsigned DEFAULT '100'
+ `a` tinyint(3) unsigned DEFAULT 100
) ENGINE=TokuDB DEFAULT CHARSET=latin1
ALTER TABLE t CHANGE COLUMN a a SMALLINT UNSIGNED DEFAULT 200;
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
- `a` smallint(5) unsigned DEFAULT '200'
+ `a` smallint(5) unsigned DEFAULT 200
) ENGINE=TokuDB DEFAULT CHARSET=latin1
ALTER TABLE t CHANGE COLUMN a a MEDIUMINT UNSIGNED DEFAULT 300;
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
- `a` mediumint(8) unsigned DEFAULT '300'
+ `a` mediumint(8) unsigned DEFAULT 300
) ENGINE=TokuDB DEFAULT CHARSET=latin1
ALTER TABLE t CHANGE COLUMN a a INT UNSIGNED DEFAULT 400;
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
- `a` int(10) unsigned DEFAULT '400'
+ `a` int(10) unsigned DEFAULT 400
) ENGINE=TokuDB DEFAULT CHARSET=latin1
ALTER TABLE t CHANGE COLUMN a a BIGINT UNSIGNED DEFAULT 500;
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
- `a` bigint(20) unsigned DEFAULT '500'
+ `a` bigint(20) unsigned DEFAULT 500
) ENGINE=TokuDB DEFAULT CHARSET=latin1
DROP TABLE t;
CREATE TABLE t (a TINYINT UNSIGNED NOT NULL DEFAULT 1);
@@ -102,30 +102,30 @@ ALTER TABLE t CHANGE COLUMN a a TINYINT UNSIGNED NOT NULL DEFAULT 100;
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
- `a` tinyint(3) unsigned NOT NULL DEFAULT '100'
+ `a` tinyint(3) unsigned NOT NULL DEFAULT 100
) ENGINE=TokuDB DEFAULT CHARSET=latin1
ALTER TABLE t CHANGE COLUMN a a SMALLINT UNSIGNED NOT NULL DEFAULT 200;
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
- `a` smallint(5) unsigned NOT NULL DEFAULT '200'
+ `a` smallint(5) unsigned NOT NULL DEFAULT 200
) ENGINE=TokuDB DEFAULT CHARSET=latin1
ALTER TABLE t CHANGE COLUMN a a MEDIUMINT UNSIGNED NOT NULL DEFAULT 300;
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
- `a` mediumint(8) unsigned NOT NULL DEFAULT '300'
+ `a` mediumint(8) unsigned NOT NULL DEFAULT 300
) ENGINE=TokuDB DEFAULT CHARSET=latin1
ALTER TABLE t CHANGE COLUMN a a INT UNSIGNED NOT NULL DEFAULT 400;
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
- `a` int(10) unsigned NOT NULL DEFAULT '400'
+ `a` int(10) unsigned NOT NULL DEFAULT 400
) ENGINE=TokuDB DEFAULT CHARSET=latin1
ALTER TABLE t CHANGE COLUMN a a BIGINT UNSIGNED NOT NULL DEFAULT 500;
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
- `a` bigint(20) unsigned NOT NULL DEFAULT '500'
+ `a` bigint(20) unsigned NOT NULL DEFAULT 500
) ENGINE=TokuDB DEFAULT CHARSET=latin1
DROP TABLE t;
diff --git a/storage/tokudb/mysql-test/tokudb/r/ext_key_1_innodb.result b/storage/tokudb/mysql-test/tokudb/r/ext_key_1_innodb.result
index 912c45db54f..e27b44430c2 100644
--- a/storage/tokudb/mysql-test/tokudb/r/ext_key_1_innodb.result
+++ b/storage/tokudb/mysql-test/tokudb/r/ext_key_1_innodb.result
@@ -1,7 +1,7 @@
drop table if exists t;
select @@optimizer_switch;
@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off,condition_pushdown_for_derived=on
create table t (id int not null, x int not null, y int not null, primary key(id), key(x)) engine=innodb;
insert into t values (0,0,0),(1,1,1),(2,2,2),(3,2,3),(4,2,4);
explain select x,id from t force index (x) where x=0 and id=0;
@@ -18,6 +18,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -35,6 +36,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -51,6 +53,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -67,6 +70,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -84,6 +88,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -100,6 +105,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
diff --git a/storage/tokudb/mysql-test/tokudb/r/ext_key_1_tokudb.result b/storage/tokudb/mysql-test/tokudb/r/ext_key_1_tokudb.result
index bbaa51c2e6f..11ee06a1b9e 100644
--- a/storage/tokudb/mysql-test/tokudb/r/ext_key_1_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb/r/ext_key_1_tokudb.result
@@ -1,7 +1,7 @@
drop table if exists t;
select @@optimizer_switch;
@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off,condition_pushdown_for_derived=on
create table t (id int not null, x int not null, y int not null, primary key(id), key(x)) engine=tokudb;
insert into t values (0,0,0),(1,1,1),(2,2,2),(3,2,3),(4,2,4);
explain select x,id from t force index (x) where x=0 and id=0;
@@ -18,6 +18,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -35,6 +36,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -51,6 +53,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -67,6 +70,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -84,6 +88,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -100,6 +105,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
diff --git a/storage/tokudb/mysql-test/tokudb/r/ext_key_2_innodb.result b/storage/tokudb/mysql-test/tokudb/r/ext_key_2_innodb.result
index 01705af6b57..cc1b3545654 100644
--- a/storage/tokudb/mysql-test/tokudb/r/ext_key_2_innodb.result
+++ b/storage/tokudb/mysql-test/tokudb/r/ext_key_2_innodb.result
@@ -1,7 +1,7 @@
drop table if exists t;
select @@optimizer_switch;
@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off,condition_pushdown_for_derived=on
create table t (a int not null, b int not null, c int not null, d int not null, primary key(a,b), key(c,a)) engine=innodb;
insert into t values (0,0,0,0),(0,1,0,1);
explain select c,a,b from t where c=0 and a=0 and b=1;
@@ -18,6 +18,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -35,6 +36,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
diff --git a/storage/tokudb/mysql-test/tokudb/r/ext_key_2_tokudb.result b/storage/tokudb/mysql-test/tokudb/r/ext_key_2_tokudb.result
index a45a2f7b04f..757ebcb54ac 100644
--- a/storage/tokudb/mysql-test/tokudb/r/ext_key_2_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb/r/ext_key_2_tokudb.result
@@ -1,7 +1,7 @@
drop table if exists t;
select @@optimizer_switch;
@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=off,condition_pushdown_for_derived=on
create table t (a int not null, b int not null, c int not null, d int not null, primary key(a,b), key(c,a)) engine=tokudb;
insert into t values (0,0,0,0),(0,1,0,1);
explain select c,a,b from t where c=0 and a=0 and b=1;
@@ -18,6 +18,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
@@ -35,6 +36,7 @@ Handler_read_key 1
Handler_read_last 0
Handler_read_next 0
Handler_read_prev 0
+Handler_read_retry 0
Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
diff --git a/storage/tokudb/mysql-test/tokudb/r/type_enum.result b/storage/tokudb/mysql-test/tokudb/r/type_enum.result
index 3a1654ef287..a1e61df126b 100644
--- a/storage/tokudb/mysql-test/tokudb/r/type_enum.result
+++ b/storage/tokudb/mysql-test/tokudb/r/type_enum.result
@@ -1670,7 +1670,7 @@ b ENUM('value','öäü_value','ÊÃÕ') character set latin1 NOT NULL
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` int(11) DEFAULT '1',
+ `a` int(11) DEFAULT 1,
`b` enum('value','öäü_value','ÊÃÕ') NOT NULL
) ENGINE=ENGINE DEFAULT CHARSET=latin1
show columns from t1;
diff --git a/storage/tokudb/mysql-test/tokudb/r/type_newdecimal.result b/storage/tokudb/mysql-test/tokudb/r/type_newdecimal.result
index 1d42fc5bb0b..9d8e09b32e2 100644
--- a/storage/tokudb/mysql-test/tokudb/r/type_newdecimal.result
+++ b/storage/tokudb/mysql-test/tokudb/r/type_newdecimal.result
@@ -976,8 +976,8 @@ f1 decimal (0,0) zerofill not null default 0);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f0` decimal(30,30) unsigned zerofill NOT NULL DEFAULT '0.000000000000000000000000000000',
- `f1` decimal(10,0) unsigned zerofill NOT NULL DEFAULT '0000000000'
+ `f0` decimal(30,30) unsigned zerofill NOT NULL DEFAULT 0.000000000000000000000000000000,
+ `f1` decimal(10,0) unsigned zerofill NOT NULL DEFAULT 0000000000
) ENGINE=ENGINE DEFAULT CHARSET=latin1
drop table t1;
drop procedure if exists wg2;
diff --git a/storage/tokudb/mysql-test/tokudb/replace-ignore-gen.py b/storage/tokudb/mysql-test/tokudb/replace-ignore-gen.py
index d8227da96a5..65c0f317abe 100644
--- a/storage/tokudb/mysql-test/tokudb/replace-ignore-gen.py
+++ b/storage/tokudb/mysql-test/tokudb/replace-ignore-gen.py
@@ -23,6 +23,7 @@ def sqlgen_explain_and_do(query):
def sqlgen_drop_table():
print "drop table t;"
+print "source include/have_tokudb.inc;"
print "# Tokutek"
print "# Test that replace into and insert ignore insertions "
print "# work under various index schemas. "
diff --git a/storage/tokudb/mysql-test/tokudb/t/change_column_bin.py b/storage/tokudb/mysql-test/tokudb/t/change_column_bin.py
index b94a80ec7be..2c7d8dd9a54 100644..100755
--- a/storage/tokudb/mysql-test/tokudb/t/change_column_bin.py
+++ b/storage/tokudb/mysql-test/tokudb/t/change_column_bin.py
@@ -22,6 +22,7 @@ def gen_test(n):
print "DROP TABLE t;"
def main():
+ print "source include/have_tokudb.inc;"
print "# this test is generated by change_bin.py"
print "# test binary expansion is hot"
print "--source include/big_test.inc"
diff --git a/storage/tokudb/mysql-test/tokudb/t/change_column_bin_rename.py b/storage/tokudb/mysql-test/tokudb/t/change_column_bin_rename.py
index b574f15735a..6bd5de38fe8 100644..100755
--- a/storage/tokudb/mysql-test/tokudb/t/change_column_bin_rename.py
+++ b/storage/tokudb/mysql-test/tokudb/t/change_column_bin_rename.py
@@ -26,6 +26,7 @@ def gen_test(n):
print "DROP TABLE t;"
def main():
+ print "source include/have_tokudb.inc;"
print "# this test is generated by change_char_rename.py"
print "# test char expansion + rename is hot"
print "--disable_warnings"
diff --git a/storage/tokudb/mysql-test/tokudb/t/change_column_blob.py b/storage/tokudb/mysql-test/tokudb/t/change_column_blob.py
index d884932307f..e25fce54d0e 100644
--- a/storage/tokudb/mysql-test/tokudb/t/change_column_blob.py
+++ b/storage/tokudb/mysql-test/tokudb/t/change_column_blob.py
@@ -1,5 +1,6 @@
import sys
def main():
+ print "source include/have_tokudb.inc;"
print "# this test is generated by change_blob.py"
print "# generate hot blob expansion test cases"
print "--disable_warnings"
diff --git a/storage/tokudb/mysql-test/tokudb/t/change_column_char.py b/storage/tokudb/mysql-test/tokudb/t/change_column_char.py
index 7481d9092f2..c53442ade50 100644..100755
--- a/storage/tokudb/mysql-test/tokudb/t/change_column_char.py
+++ b/storage/tokudb/mysql-test/tokudb/t/change_column_char.py
@@ -22,6 +22,7 @@ def gen_test(n):
print "DROP TABLE t;"
def main():
+ print "source include/have_tokudb.inc;"
print "# this test is generated by change_char.py"
print "# test char expansion"
print "--source include/big_test.inc"
diff --git a/storage/tokudb/mysql-test/tokudb/t/change_column_char_binary.py b/storage/tokudb/mysql-test/tokudb/t/change_column_char_binary.py
index 4b94d2fc98b..e92797918d5 100644..100755
--- a/storage/tokudb/mysql-test/tokudb/t/change_column_char_binary.py
+++ b/storage/tokudb/mysql-test/tokudb/t/change_column_char_binary.py
@@ -23,6 +23,7 @@ def gen_test(n):
print "DROP TABLE t;"
def main():
+ print "source include/have_tokudb.inc;"
print "# this test is generated by change_char_binary.py"
print "# test that char(X) <-> binary(X) is not hot"
print "--disable_warnings"
diff --git a/storage/tokudb/mysql-test/tokudb/t/change_column_char_charbinary.py b/storage/tokudb/mysql-test/tokudb/t/change_column_char_charbinary.py
index 81cf2058a3e..065e37b186d 100644..100755
--- a/storage/tokudb/mysql-test/tokudb/t/change_column_char_charbinary.py
+++ b/storage/tokudb/mysql-test/tokudb/t/change_column_char_charbinary.py
@@ -23,6 +23,7 @@ def gen_test(n):
print "DROP TABLE t;"
def main():
+ print "source include/have_tokudb.inc;"
print "# this test is generated by change_char_charbinary.py"
print "# test that char(X) <-> char(X) binary is not hot"
print "--disable_warnings"
diff --git a/storage/tokudb/mysql-test/tokudb/t/change_column_char_rename.py b/storage/tokudb/mysql-test/tokudb/t/change_column_char_rename.py
index 6bc8ae80c7d..fe73fce0d53 100644..100755
--- a/storage/tokudb/mysql-test/tokudb/t/change_column_char_rename.py
+++ b/storage/tokudb/mysql-test/tokudb/t/change_column_char_rename.py
@@ -26,6 +26,7 @@ def gen_test(n):
print "DROP TABLE t;"
def main():
+ print "source include/have_tokudb.inc;"
print "# this test is generated by change_char_rename.py"
print "# test char expansion + rename is hot"
print "--disable_warnings"
diff --git a/storage/tokudb/mysql-test/tokudb/t/change_column_int.py b/storage/tokudb/mysql-test/tokudb/t/change_column_int.py
index f93b9d7bb69..6f69156e260 100644..100755
--- a/storage/tokudb/mysql-test/tokudb/t/change_column_int.py
+++ b/storage/tokudb/mysql-test/tokudb/t/change_column_int.py
@@ -25,6 +25,7 @@ def gen_test(types, values):
print "DROP TABLE ti;"
print "DROP TABLE t;"
def main():
+ print "source include/have_tokudb.inc;"
print "# this test is generated by change_int.py"
print "# test int expansion is hot"
print "--disable_warnings"
diff --git a/storage/tokudb/mysql-test/tokudb/t/change_column_int_key.py b/storage/tokudb/mysql-test/tokudb/t/change_column_int_key.py
index 8b217b59ab1..fd7e5868c40 100644..100755
--- a/storage/tokudb/mysql-test/tokudb/t/change_column_int_key.py
+++ b/storage/tokudb/mysql-test/tokudb/t/change_column_int_key.py
@@ -25,6 +25,7 @@ def gen_test(types):
print "DROP TABLE t;"
def main():
+ print "source include/have_tokudb.inc;"
print "# this test is generated by change_int_key.py"
print "# ensure that changing an int column that is part of a key is not hot"
print "--disable_warnings"
diff --git a/storage/tokudb/mysql-test/tokudb/t/change_column_int_not_supported.py b/storage/tokudb/mysql-test/tokudb/t/change_column_int_not_supported.py
index 6fbb2343fea..1708c65efde 100644..100755
--- a/storage/tokudb/mysql-test/tokudb/t/change_column_int_not_supported.py
+++ b/storage/tokudb/mysql-test/tokudb/t/change_column_int_not_supported.py
@@ -21,6 +21,7 @@ def gen_tests(int_types, modifiers):
for from_modifier in range(len(modifiers)):
gen_tests_for_int(from_int, from_modifier, int_types, modifiers)
def main():
+ print "source include/have_tokudb.inc;"
print "# this test is generated by change_int_not_supported.py"
print "# ensure that int types are only expanded and are not cnverted to some other type"
print "--disable_warnings"
diff --git a/storage/tokudb/mysql-test/tokudb/t/change_column_int_rename.py b/storage/tokudb/mysql-test/tokudb/t/change_column_int_rename.py
index a1cd155f3de..5222564a9a2 100644..100755
--- a/storage/tokudb/mysql-test/tokudb/t/change_column_int_rename.py
+++ b/storage/tokudb/mysql-test/tokudb/t/change_column_int_rename.py
@@ -27,6 +27,7 @@ def gen_test(types, values):
print "DROP TABLE ti;"
print "DROP TABLE t;"
def main():
+ print "source include/have_tokudb.inc;"
print "# this test is generated by change_int_rename.py"
print "--disable_warnings"
print "DROP TABLE IF EXISTS t, ti;"
diff --git a/storage/tokudb/mysql-test/tokudb/t/change_column_multiple_columns.py b/storage/tokudb/mysql-test/tokudb/t/change_column_multiple_columns.py
index 7e562f38a0f..05f3683a14f 100644
--- a/storage/tokudb/mysql-test/tokudb/t/change_column_multiple_columns.py
+++ b/storage/tokudb/mysql-test/tokudb/t/change_column_multiple_columns.py
@@ -6,6 +6,7 @@ old_types = [ 'VARCHAR(1)', 'VARBINARY(1)', 'INT', 'CHAR(1)', 'BINARY(1)' ]
new_types = [ 'VARCHAR(2)', 'VARBINARY(2)', 'BIGINT', 'CHAR(2)', 'BINARY(2)' ]
def main():
+ print "source include/have_tokudb.inc;"
print "# this test generated by change_multiple_columns.py"
print "# this test generated multiple column changes which should all fail since we support only one at a time"
print "--disable_warnings"
diff --git a/storage/tokudb/mysql-test/tokudb/t/change_column_text.py b/storage/tokudb/mysql-test/tokudb/t/change_column_text.py
index 13de13dc222..fada9b0852e 100644
--- a/storage/tokudb/mysql-test/tokudb/t/change_column_text.py
+++ b/storage/tokudb/mysql-test/tokudb/t/change_column_text.py
@@ -1,5 +1,6 @@
import sys
def main():
+ print "source include/have_tokudb.inc;"
print "# this test is generated by change_text.py"
print "# generate hot text expansion test cases"
print "--disable_warnings"
diff --git a/storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_lock_waits_released.test b/storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_lock_waits_released.test
index 012c0af63b5..d8ce18b3aa7 100644
--- a/storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_lock_waits_released.test
+++ b/storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_lock_waits_released.test
@@ -53,6 +53,9 @@ select trx_id,trx_mysql_thread_id from information_schema.tokudb_trx;
connection conn_a;
commit;
# verify that the lock on the 1st transaction is released and replaced by the lock for the 2nd transaction
+let $wait_condition= select count(*)=1 from information_schema.tokudb_locks where locks_dname='./test/t-main';
+source include/wait_condition.inc;
+
replace_column 1 TRX_ID 2 MYSQL_ID;
select * from information_schema.tokudb_locks;
select * from information_schema.tokudb_lock_waits;
diff --git a/storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_locks_released.test b/storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_locks_released.test
index bbb0533e784..93ae4767ecd 100644
--- a/storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_locks_released.test
+++ b/storage/tokudb/mysql-test/tokudb/t/i_s_tokudb_locks_released.test
@@ -44,6 +44,9 @@ eval select * from information_schema.tokudb_locks;
connection conn_a;
commit;
# verify that the lock on the 1st transaction is released and replaced by the lock for the 2nd transaction
+let $wait_condition= select count(*)=1 from information_schema.tokudb_locks where locks_dname='./test/t-main';
+source include/wait_condition.inc;
+
replace_column 1 TRX_ID 2 MYSQL_ID;
select * from information_schema.tokudb_locks;
diff --git a/storage/tokudb/mysql-test/tokudb/t/suite.opt b/storage/tokudb/mysql-test/tokudb/t/suite.opt
index 23511b05020..15acdf7397f 100644
--- a/storage/tokudb/mysql-test/tokudb/t/suite.opt
+++ b/storage/tokudb/mysql-test/tokudb/t/suite.opt
@@ -1 +1 @@
-$TOKUDB_OPT $TOKUDB_LOAD_ADD --loose-tokudb-check-jemalloc=0
+$TOKUDB_OPT $TOKUDB_LOAD_ADD --loose-tokudb-check-jemalloc=0 --loose-tokudb-cache-size=512M --loose-tokudb-block-size=1M
diff --git a/storage/tokudb/mysql-test/tokudb_add_index/t/suite.opt b/storage/tokudb/mysql-test/tokudb_add_index/t/suite.opt
index 23511b05020..15acdf7397f 100644
--- a/storage/tokudb/mysql-test/tokudb_add_index/t/suite.opt
+++ b/storage/tokudb/mysql-test/tokudb_add_index/t/suite.opt
@@ -1 +1 @@
-$TOKUDB_OPT $TOKUDB_LOAD_ADD --loose-tokudb-check-jemalloc=0
+$TOKUDB_OPT $TOKUDB_LOAD_ADD --loose-tokudb-check-jemalloc=0 --loose-tokudb-cache-size=512M --loose-tokudb-block-size=1M
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/r/alter_column_default.result b/storage/tokudb/mysql-test/tokudb_alter_table/r/alter_column_default.result
index 2c1390ad2a4..4c63047444d 100644
--- a/storage/tokudb/mysql-test/tokudb_alter_table/r/alter_column_default.result
+++ b/storage/tokudb/mysql-test/tokudb_alter_table/r/alter_column_default.result
@@ -5,14 +5,14 @@ CREATE TABLE foo (a INT NOT NULL DEFAULT 0, b INT DEFAULT NULL);
SHOW CREATE TABLE foo;
Table Create Table
foo CREATE TABLE `foo` (
- `a` int(11) NOT NULL DEFAULT '0',
+ `a` int(11) NOT NULL DEFAULT 0,
`b` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1
ALTER TABLE foo ALTER COLUMN a SET DEFAULT 100;
SHOW CREATE TABLE foo;
Table Create Table
foo CREATE TABLE `foo` (
- `a` int(11) NOT NULL DEFAULT '100',
+ `a` int(11) NOT NULL DEFAULT 100,
`b` int(11) DEFAULT NULL
) ENGINE=TokuDB DEFAULT CHARSET=latin1
ALTER TABLE foo ALTER COLUMN a DROP DEFAULT;
@@ -27,7 +27,7 @@ SHOW CREATE TABLE foo;
Table Create Table
foo CREATE TABLE `foo` (
`a` int(11) NOT NULL,
- `b` int(11) DEFAULT '42'
+ `b` int(11) DEFAULT 42
) ENGINE=TokuDB DEFAULT CHARSET=latin1
ALTER TABLE foo ALTER COLUMN b DROP DEFAULT;
SHOW CREATE TABLE foo;
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/t/suite.opt b/storage/tokudb/mysql-test/tokudb_alter_table/t/suite.opt
index 23511b05020..15acdf7397f 100644
--- a/storage/tokudb/mysql-test/tokudb_alter_table/t/suite.opt
+++ b/storage/tokudb/mysql-test/tokudb_alter_table/t/suite.opt
@@ -1 +1 @@
-$TOKUDB_OPT $TOKUDB_LOAD_ADD --loose-tokudb-check-jemalloc=0
+$TOKUDB_OPT $TOKUDB_LOAD_ADD --loose-tokudb-check-jemalloc=0 --loose-tokudb-cache-size=512M --loose-tokudb-block-size=1M
diff --git a/storage/tokudb/mysql-test/tokudb_backup/t/suite.opt b/storage/tokudb/mysql-test/tokudb_backup/t/suite.opt
index e52bd6327e0..0d80cf85a91 100644
--- a/storage/tokudb/mysql-test/tokudb_backup/t/suite.opt
+++ b/storage/tokudb/mysql-test/tokudb_backup/t/suite.opt
@@ -1 +1 @@
-$TOKUDB_OPT $TOKUDB_LOAD_ADD $TOKUDB_BACKUP_OPT $TOKUDB_BACKUP_LOAD_ADD --loose-tokudb-check-jemalloc=0
+$TOKUDB_OPT $TOKUDB_LOAD_ADD $TOKUDB_BACKUP_OPT $TOKUDB_BACKUP_LOAD_ADD --loose-tokudb-check-jemalloc=0 --loose-tokudb-cache-size=512M --loose-tokudb-block-size=1M
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/suite.opt b/storage/tokudb/mysql-test/tokudb_bugs/t/suite.opt
index 23511b05020..15acdf7397f 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/t/suite.opt
+++ b/storage/tokudb/mysql-test/tokudb_bugs/t/suite.opt
@@ -1 +1 @@
-$TOKUDB_OPT $TOKUDB_LOAD_ADD --loose-tokudb-check-jemalloc=0
+$TOKUDB_OPT $TOKUDB_LOAD_ADD --loose-tokudb-check-jemalloc=0 --loose-tokudb-cache-size=512M --loose-tokudb-block-size=1M
diff --git a/storage/tokudb/mysql-test/tokudb_mariadb/r/alter.result b/storage/tokudb/mysql-test/tokudb_mariadb/r/alter.result
index 600e34dfffd..95364221920 100644
--- a/storage/tokudb/mysql-test/tokudb_mariadb/r/alter.result
+++ b/storage/tokudb/mysql-test/tokudb_mariadb/r/alter.result
@@ -8,7 +8,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) DEFAULT NULL,
- `j` int(11) DEFAULT '0'
+ `j` int(11) DEFAULT 0
) ENGINE=TokuDB DEFAULT CHARSET=latin1
alter table t1 modify i int default '1';
select * from t1;
@@ -17,8 +17,8 @@ i j
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `i` int(11) DEFAULT '1',
- `j` int(11) DEFAULT '0'
+ `i` int(11) DEFAULT 1,
+ `j` int(11) DEFAULT 0
) ENGINE=TokuDB DEFAULT CHARSET=latin1
alter table t1 modify j int default '2', rename t2;
select * from t1;
@@ -29,7 +29,7 @@ i j
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `i` int(11) DEFAULT '1',
- `j` int(11) DEFAULT '2'
+ `i` int(11) DEFAULT 1,
+ `j` int(11) DEFAULT 2
) ENGINE=TokuDB DEFAULT CHARSET=latin1
drop table t2;
diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_1_2_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_1_2_tokudb.result
index 3fb51c67d00..5707edf3485 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_1_2_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_1_2_tokudb.result
@@ -68,8 +68,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -560,8 +560,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -1060,8 +1060,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -1565,8 +1565,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -2064,8 +2064,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -2567,8 +2567,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -3077,8 +3077,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -3585,8 +3585,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -4082,8 +4082,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -4574,8 +4574,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -5074,8 +5074,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -5579,8 +5579,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -6078,8 +6078,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -6581,8 +6581,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -7091,8 +7091,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -7599,8 +7599,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -8097,8 +8097,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -8605,8 +8605,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -9121,8 +9121,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -9642,8 +9642,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -10157,8 +10157,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -10676,8 +10676,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -11202,8 +11202,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -11726,8 +11726,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -12239,8 +12239,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -12747,8 +12747,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -13263,8 +13263,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -13784,8 +13784,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -14299,8 +14299,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -14818,8 +14818,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -15344,8 +15344,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -15868,8 +15868,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -16382,8 +16382,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -16875,8 +16875,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -17376,8 +17376,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -17882,8 +17882,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -18382,8 +18382,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -18886,8 +18886,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -19397,8 +19397,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -19906,8 +19906,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -20404,8 +20404,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -20897,8 +20897,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -21398,8 +21398,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -21904,8 +21904,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -22404,8 +22404,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -22908,8 +22908,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -23419,8 +23419,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -23928,8 +23928,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -24426,8 +24426,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -24919,8 +24919,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -25420,8 +25420,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -25926,8 +25926,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -26426,8 +26426,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -26930,8 +26930,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -27441,8 +27441,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -27950,8 +27950,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_1_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_1_tokudb.result
index 2cc7b4298fc..6d478dd29fc 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_1_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_1_tokudb.result
@@ -386,8 +386,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -878,8 +878,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -1378,8 +1378,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -1883,8 +1883,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -2382,8 +2382,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -2887,8 +2887,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -3397,8 +3397,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -3905,8 +3905,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -4402,8 +4402,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -4894,8 +4894,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -5394,8 +5394,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -5899,8 +5899,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -6398,8 +6398,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -6903,8 +6903,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -7413,8 +7413,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -7921,8 +7921,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -8419,8 +8419,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -8927,8 +8927,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -9443,8 +9443,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -9964,8 +9964,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -10479,8 +10479,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -11000,8 +11000,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -11526,8 +11526,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -12050,8 +12050,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -12563,8 +12563,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -13071,8 +13071,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -13587,8 +13587,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -14108,8 +14108,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -14623,8 +14623,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -15144,8 +15144,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -15670,8 +15670,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -16194,8 +16194,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_2_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_2_tokudb.result
index 4aded14f336..9efe0ac34f5 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_2_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter1_2_tokudb.result
@@ -67,8 +67,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -507,8 +507,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -955,8 +955,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1408,8 +1408,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1855,8 +1855,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2308,8 +2308,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2766,8 +2766,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -3222,8 +3222,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -3667,8 +3667,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -4107,8 +4107,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -4555,8 +4555,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -5008,8 +5008,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -5455,8 +5455,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -5908,8 +5908,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -6366,8 +6366,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -6822,8 +6822,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -7267,8 +7267,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -7723,8 +7723,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -8187,8 +8187,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -8656,8 +8656,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -9119,8 +9119,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -9588,8 +9588,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -10062,8 +10062,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -10534,8 +10534,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -10999,8 +10999,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -11439,8 +11439,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -11887,8 +11887,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -12340,8 +12340,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -12787,8 +12787,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -13238,8 +13238,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -13696,8 +13696,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -14152,8 +14152,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -14597,8 +14597,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -15037,8 +15037,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -15485,8 +15485,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -15938,8 +15938,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -16385,8 +16385,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -16836,8 +16836,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -17294,8 +17294,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -17750,8 +17750,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -18196,8 +18196,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -18652,8 +18652,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -19116,8 +19116,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -19585,8 +19585,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -20048,8 +20048,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -20515,8 +20515,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -20989,8 +20989,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -21461,8 +21461,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -21922,8 +21922,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -22378,8 +22378,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -22842,8 +22842,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -23311,8 +23311,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -23774,8 +23774,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -24241,8 +24241,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -24715,8 +24715,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -25187,8 +25187,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -25649,8 +25649,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -26089,8 +26089,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -26537,8 +26537,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -26990,8 +26990,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -27437,8 +27437,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -27888,8 +27888,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -28346,8 +28346,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -28802,8 +28802,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -29247,8 +29247,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -29687,8 +29687,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -30135,8 +30135,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -30588,8 +30588,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -31035,8 +31035,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -31486,8 +31486,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -31944,8 +31944,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -32400,8 +32400,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -32845,8 +32845,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -33301,8 +33301,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -33765,8 +33765,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -34234,8 +34234,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -34697,8 +34697,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -35164,8 +35164,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -35638,8 +35638,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -36110,8 +36110,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_1_1_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_1_1_tokudb.result
index 6838b33d89d..188e7c3653d 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_1_1_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_1_1_tokudb.result
@@ -68,7 +68,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -524,7 +524,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -988,7 +988,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -1457,7 +1457,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -1920,7 +1920,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -2389,7 +2389,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -2863,7 +2863,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -3335,7 +3335,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -3797,7 +3797,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -4291,7 +4291,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -4793,7 +4793,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -5300,7 +5300,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -5801,7 +5801,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -6308,7 +6308,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -6820,7 +6820,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -7330,7 +7330,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -7829,7 +7829,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -8323,7 +8323,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -8825,7 +8825,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -9332,7 +9332,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -9833,7 +9833,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -10340,7 +10340,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -10852,7 +10852,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -11362,7 +11362,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` bigint(20) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -11862,7 +11862,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -12370,7 +12370,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -12886,7 +12886,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -13407,7 +13407,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -13922,7 +13922,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -14443,7 +14443,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -14969,7 +14969,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -15493,7 +15493,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -16006,7 +16006,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -16514,7 +16514,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -17030,7 +17030,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -17551,7 +17551,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -18066,7 +18066,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -18587,7 +18587,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -19113,7 +19113,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -19637,7 +19637,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` bigint(20) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_2_1_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_2_1_tokudb.result
index 883c9ec3453..7ecc5db4b10 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_2_1_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter2_2_1_tokudb.result
@@ -68,7 +68,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -526,7 +526,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -992,7 +992,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -1463,7 +1463,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -1926,7 +1926,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -2397,7 +2397,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -2871,7 +2871,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -3345,7 +3345,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -3808,7 +3808,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -4304,7 +4304,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -4808,7 +4808,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -5317,7 +5317,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -5818,7 +5818,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -6327,7 +6327,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -6839,7 +6839,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -7351,7 +7351,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -7852,7 +7852,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -8348,7 +8348,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -8852,7 +8852,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -9361,7 +9361,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -9862,7 +9862,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -10371,7 +10371,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -10883,7 +10883,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -11395,7 +11395,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
`f_int2` mediumint(9) NOT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -11897,7 +11897,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -12407,7 +12407,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -12925,7 +12925,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -13448,7 +13448,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -13963,7 +13963,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -14486,7 +14486,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -15012,7 +15012,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -15538,7 +15538,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -16053,7 +16053,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -16563,7 +16563,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -17081,7 +17081,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -17604,7 +17604,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -18119,7 +18119,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -18642,7 +18642,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -19168,7 +19168,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
@@ -19694,7 +19694,7 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
`f_int2` mediumint(9) DEFAULT NULL,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter3_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter3_tokudb.result
index b596e84d630..e8129e75f3e 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter3_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter3_tokudb.result
@@ -392,8 +392,8 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -414,8 +414,8 @@ ALTER TABLE t1 PARTITION BY KEY(f_int1);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -439,8 +439,8 @@ ALTER TABLE t1 ADD PARTITION (PARTITION part1, PARTITION part7);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -462,8 +462,8 @@ ALTER TABLE t1 ADD PARTITION (PARTITION part2);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -486,8 +486,8 @@ ALTER TABLE t1 ADD PARTITION PARTITIONS 4;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -521,8 +521,8 @@ ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -547,8 +547,8 @@ ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -572,8 +572,8 @@ ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -596,8 +596,8 @@ ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -619,8 +619,8 @@ ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -641,8 +641,8 @@ ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -662,8 +662,8 @@ ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -686,8 +686,8 @@ ALTER TABLE t1 REMOVE PARTITIONING;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter4_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter4_tokudb.result
index 8412c7b37b0..973ed19ef39 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter4_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_alter4_tokudb.result
@@ -69,8 +69,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -528,8 +528,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -998,8 +998,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1469,8 +1469,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1934,8 +1934,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2405,8 +2405,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2881,8 +2881,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -3355,8 +3355,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -3819,8 +3819,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -4278,8 +4278,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -4748,8 +4748,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -5219,8 +5219,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -5684,8 +5684,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -6155,8 +6155,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -6631,8 +6631,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -7105,8 +7105,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -7560,8 +7560,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 analyze Error Error in list of partitions to test.t1
-test.t1 analyze status Operation failed
+test.t1 analyze error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -7570,8 +7569,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -8020,8 +8019,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 analyze Error Error in list of partitions to test.t1
-test.t1 analyze status Operation failed
+test.t1 analyze error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -8030,8 +8028,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -8491,8 +8489,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 analyze Error Error in list of partitions to test.t1
-test.t1 analyze status Operation failed
+test.t1 analyze error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -8501,8 +8498,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -8963,8 +8960,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 analyze Error Error in list of partitions to test.t1
-test.t1 analyze status Operation failed
+test.t1 analyze error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -8973,8 +8969,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -9429,8 +9425,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 analyze Error Error in list of partitions to test.t1
-test.t1 analyze status Operation failed
+test.t1 analyze error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -9439,8 +9434,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -9901,8 +9896,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 analyze Error Error in list of partitions to test.t1
-test.t1 analyze status Operation failed
+test.t1 analyze error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -9911,8 +9905,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -10378,8 +10372,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 analyze Error Error in list of partitions to test.t1
-test.t1 analyze status Operation failed
+test.t1 analyze error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -10388,8 +10381,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -10853,8 +10846,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 analyze Error Error in list of partitions to test.t1
-test.t1 analyze status Operation failed
+test.t1 analyze error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -10863,8 +10855,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -11318,8 +11310,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 analyze Error Error in list of partitions to test.t1
-test.t1 analyze status Operation failed
+test.t1 analyze error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -11328,8 +11319,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -11778,8 +11769,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 analyze Error Error in list of partitions to test.t1
-test.t1 analyze status Operation failed
+test.t1 analyze error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -11788,8 +11778,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -12249,8 +12239,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 analyze Error Error in list of partitions to test.t1
-test.t1 analyze status Operation failed
+test.t1 analyze error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -12259,8 +12248,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -12721,8 +12710,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 analyze Error Error in list of partitions to test.t1
-test.t1 analyze status Operation failed
+test.t1 analyze error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -12731,8 +12719,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -13187,8 +13175,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 analyze Error Error in list of partitions to test.t1
-test.t1 analyze status Operation failed
+test.t1 analyze error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -13197,8 +13184,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -13659,8 +13646,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 analyze Error Error in list of partitions to test.t1
-test.t1 analyze status Operation failed
+test.t1 analyze error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -13669,8 +13655,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -14136,8 +14122,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 analyze Error Error in list of partitions to test.t1
-test.t1 analyze status Operation failed
+test.t1 analyze error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -14146,8 +14131,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -14611,8 +14596,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 analyze Error Error in list of partitions to test.t1
-test.t1 analyze status Operation failed
+test.t1 analyze error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -14621,8 +14605,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -15085,8 +15069,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -15544,8 +15528,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -16014,8 +15998,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -16485,8 +16469,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -16950,8 +16934,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -17421,8 +17405,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -17897,8 +17881,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -18371,8 +18355,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -18838,8 +18822,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -19297,8 +19281,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -19767,8 +19751,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -20238,8 +20222,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -20703,8 +20687,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -21174,8 +21158,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -21650,8 +21634,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -22124,8 +22108,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -22588,8 +22572,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -23047,8 +23031,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -23517,8 +23501,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -23988,8 +23972,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -24453,8 +24437,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -24924,8 +24908,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -25400,8 +25384,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -25874,8 +25858,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -26329,8 +26313,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 check Error Error in list of partitions to test.t1
-test.t1 check status Operation failed
+test.t1 check error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -26339,8 +26322,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -26789,8 +26772,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 check Error Error in list of partitions to test.t1
-test.t1 check status Operation failed
+test.t1 check error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -26799,8 +26781,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -27260,8 +27242,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 check Error Error in list of partitions to test.t1
-test.t1 check status Operation failed
+test.t1 check error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -27270,8 +27251,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -27732,8 +27713,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 check Error Error in list of partitions to test.t1
-test.t1 check status Operation failed
+test.t1 check error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -27742,8 +27722,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -28198,8 +28178,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 check Error Error in list of partitions to test.t1
-test.t1 check status Operation failed
+test.t1 check error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -28208,8 +28187,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -28670,8 +28649,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 check Error Error in list of partitions to test.t1
-test.t1 check status Operation failed
+test.t1 check error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -28680,8 +28658,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -29147,8 +29125,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 check Error Error in list of partitions to test.t1
-test.t1 check status Operation failed
+test.t1 check error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -29157,8 +29134,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -29622,8 +29599,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 check Error Error in list of partitions to test.t1
-test.t1 check status Operation failed
+test.t1 check error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -29632,8 +29608,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -30087,8 +30063,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 check Error Error in list of partitions to test.t1
-test.t1 check status Operation failed
+test.t1 check error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -30097,8 +30072,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -30547,8 +30522,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 check Error Error in list of partitions to test.t1
-test.t1 check status Operation failed
+test.t1 check error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -30557,8 +30531,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -31018,8 +30992,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 check Error Error in list of partitions to test.t1
-test.t1 check status Operation failed
+test.t1 check error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -31028,8 +31001,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -31490,8 +31463,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 check Error Error in list of partitions to test.t1
-test.t1 check status Operation failed
+test.t1 check error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -31500,8 +31472,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -31956,8 +31928,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 check Error Error in list of partitions to test.t1
-test.t1 check status Operation failed
+test.t1 check error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -31966,8 +31937,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -32428,8 +32399,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 check Error Error in list of partitions to test.t1
-test.t1 check status Operation failed
+test.t1 check error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -32438,8 +32408,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -32905,8 +32875,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 check Error Error in list of partitions to test.t1
-test.t1 check status Operation failed
+test.t1 check error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -32915,8 +32884,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -33380,8 +33349,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 check Error Error in list of partitions to test.t1
-test.t1 check status Operation failed
+test.t1 check error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -33390,8 +33358,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -33854,8 +33822,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -34313,8 +34281,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -34783,8 +34751,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -35254,8 +35222,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -35719,8 +35687,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -36190,8 +36158,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -36666,8 +36634,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -37140,8 +37108,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -37608,8 +37576,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -38068,8 +38036,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -38539,8 +38507,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -39011,8 +38979,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -39477,8 +39445,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -39949,8 +39917,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -40426,8 +40394,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -40901,8 +40869,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -41366,8 +41334,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -41826,8 +41794,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -42297,8 +42265,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -42769,8 +42737,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -43235,8 +43203,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -43707,8 +43675,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -44184,8 +44152,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -44659,8 +44627,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -45114,8 +45082,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 optimize Error Error in list of partitions to test.t1
-test.t1 optimize status Operation failed
+test.t1 optimize error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -45124,8 +45091,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -45574,8 +45541,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 optimize Error Error in list of partitions to test.t1
-test.t1 optimize status Operation failed
+test.t1 optimize error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -45584,8 +45550,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -46045,8 +46011,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 optimize Error Error in list of partitions to test.t1
-test.t1 optimize status Operation failed
+test.t1 optimize error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -46055,8 +46020,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -46517,8 +46482,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 optimize Error Error in list of partitions to test.t1
-test.t1 optimize status Operation failed
+test.t1 optimize error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -46527,8 +46491,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -46983,8 +46947,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 optimize Error Error in list of partitions to test.t1
-test.t1 optimize status Operation failed
+test.t1 optimize error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -46993,8 +46956,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -47455,8 +47418,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 optimize Error Error in list of partitions to test.t1
-test.t1 optimize status Operation failed
+test.t1 optimize error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -47465,8 +47427,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -47932,8 +47894,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 optimize Error Error in list of partitions to test.t1
-test.t1 optimize status Operation failed
+test.t1 optimize error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -47942,8 +47903,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -48407,8 +48368,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 optimize Error Error in list of partitions to test.t1
-test.t1 optimize status Operation failed
+test.t1 optimize error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -48417,8 +48377,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -48872,8 +48832,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 optimize Error Error in list of partitions to test.t1
-test.t1 optimize status Operation failed
+test.t1 optimize error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -48882,8 +48841,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -49332,8 +49291,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 optimize Error Error in list of partitions to test.t1
-test.t1 optimize status Operation failed
+test.t1 optimize error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -49342,8 +49300,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -49803,8 +49761,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 optimize Error Error in list of partitions to test.t1
-test.t1 optimize status Operation failed
+test.t1 optimize error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -49813,8 +49770,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -50275,8 +50232,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 optimize Error Error in list of partitions to test.t1
-test.t1 optimize status Operation failed
+test.t1 optimize error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -50285,8 +50241,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -50741,8 +50697,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 optimize Error Error in list of partitions to test.t1
-test.t1 optimize status Operation failed
+test.t1 optimize error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -50751,8 +50706,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -51213,8 +51168,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 optimize Error Error in list of partitions to test.t1
-test.t1 optimize status Operation failed
+test.t1 optimize error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -51223,8 +51177,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -51690,8 +51644,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 optimize Error Error in list of partitions to test.t1
-test.t1 optimize status Operation failed
+test.t1 optimize error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -51700,8 +51653,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -52165,8 +52118,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 optimize Error Error in list of partitions to test.t1
-test.t1 optimize status Operation failed
+test.t1 optimize error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -52175,8 +52127,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -52640,8 +52592,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -53100,8 +53052,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -53571,8 +53523,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -54043,8 +53995,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -54509,8 +54461,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -54981,8 +54933,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -55458,8 +55410,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -55933,8 +55885,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -56398,8 +56350,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -56855,8 +56807,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -57323,8 +57275,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -57792,8 +57744,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -58255,8 +58207,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -58724,8 +58676,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -59198,8 +59150,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -59670,8 +59622,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -60132,8 +60084,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -60589,8 +60541,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -61057,8 +61009,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -61526,8 +61478,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -61989,8 +61941,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -62458,8 +62410,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -62932,8 +62884,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -63404,8 +63356,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -64186,8 +64138,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -64643,8 +64595,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -65111,8 +65063,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -65580,8 +65532,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -66043,8 +65995,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -66512,8 +66464,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -66986,8 +66938,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -67458,8 +67410,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -67925,8 +67877,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -68384,8 +68336,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -68854,8 +68806,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -69325,8 +69277,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -69790,8 +69742,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -70261,8 +70213,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -70737,8 +70689,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -71211,8 +71163,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -71675,8 +71627,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -72134,8 +72086,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -72604,8 +72556,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -73075,8 +73027,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -73540,8 +73492,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -74011,8 +73963,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -74487,8 +74439,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -74961,8 +74913,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -75416,8 +75368,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 repair Error Error in list of partitions to test.t1
-test.t1 repair status Operation failed
+test.t1 repair error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -75426,8 +75377,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -75876,8 +75827,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 repair Error Error in list of partitions to test.t1
-test.t1 repair status Operation failed
+test.t1 repair error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -75886,8 +75836,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -76347,8 +76297,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 repair Error Error in list of partitions to test.t1
-test.t1 repair status Operation failed
+test.t1 repair error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -76357,8 +76306,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -76819,8 +76768,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 repair Error Error in list of partitions to test.t1
-test.t1 repair status Operation failed
+test.t1 repair error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -76829,8 +76777,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -77285,8 +77233,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 repair Error Error in list of partitions to test.t1
-test.t1 repair status Operation failed
+test.t1 repair error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -77295,8 +77242,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -77757,8 +77704,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 repair Error Error in list of partitions to test.t1
-test.t1 repair status Operation failed
+test.t1 repair error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -77767,8 +77713,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -78234,8 +78180,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 repair Error Error in list of partitions to test.t1
-test.t1 repair status Operation failed
+test.t1 repair error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -78244,8 +78189,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -78709,8 +78654,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
Table Op Msg_type Msg_text
-test.t1 repair Error Error in list of partitions to test.t1
-test.t1 repair status Operation failed
+test.t1 repair error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -78719,8 +78663,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -79174,8 +79118,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 repair Error Error in list of partitions to test.t1
-test.t1 repair status Operation failed
+test.t1 repair error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -79184,8 +79127,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -79634,8 +79577,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 repair Error Error in list of partitions to test.t1
-test.t1 repair status Operation failed
+test.t1 repair error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -79644,8 +79586,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -80105,8 +80047,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 repair Error Error in list of partitions to test.t1
-test.t1 repair status Operation failed
+test.t1 repair error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -80115,8 +80056,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -80577,8 +80518,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 repair Error Error in list of partitions to test.t1
-test.t1 repair status Operation failed
+test.t1 repair error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -80587,8 +80527,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -81043,8 +80983,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 repair Error Error in list of partitions to test.t1
-test.t1 repair status Operation failed
+test.t1 repair error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -81053,8 +80992,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -81515,8 +81454,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 repair Error Error in list of partitions to test.t1
-test.t1 repair status Operation failed
+test.t1 repair error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -81525,8 +81463,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -81992,8 +81930,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 repair Error Error in list of partitions to test.t1
-test.t1 repair status Operation failed
+test.t1 repair error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -82002,8 +81939,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -82467,8 +82404,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
ALTER TABLE t1 REPAIR PARTITION part_1,part_1,part_1;
Table Op Msg_type Msg_text
-test.t1 repair Error Error in list of partitions to test.t1
-test.t1 repair status Operation failed
+test.t1 repair error Error in list of partitions to test.t1
INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
@@ -82477,8 +82413,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -82941,8 +82877,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -83400,8 +83336,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -83870,8 +83806,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -84341,8 +84277,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -84806,8 +84742,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -85277,8 +85213,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -85753,8 +85689,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -86227,8 +86163,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -86692,8 +86628,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -87146,8 +87082,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -87608,8 +87544,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -88068,8 +88004,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -88526,8 +88462,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -88988,8 +88924,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -89450,8 +89386,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -89908,8 +89844,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_basic_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_basic_tokudb.result
index 8182dce5625..fe289260ffc 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_basic_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_basic_tokudb.result
@@ -67,8 +67,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -522,8 +522,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -985,8 +985,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1453,8 +1453,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1915,8 +1915,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2383,8 +2383,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2860,8 +2860,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -3331,8 +3331,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -3792,8 +3792,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -4247,8 +4247,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -4710,8 +4710,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -5178,8 +5178,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -5640,8 +5640,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -6106,8 +6106,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -6579,8 +6579,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -7050,8 +7050,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -7515,8 +7515,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -8007,8 +8007,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -8507,8 +8507,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -9012,8 +9012,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -9511,8 +9511,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -10016,8 +10016,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -10530,8 +10530,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -11038,8 +11038,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -11535,8 +11535,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -12027,8 +12027,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -12527,8 +12527,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -13032,8 +13032,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -13531,8 +13531,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -14036,8 +14036,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -14550,8 +14550,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -15058,8 +15058,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -15555,8 +15555,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -16063,8 +16063,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -16579,8 +16579,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -17100,8 +17100,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -17615,8 +17615,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -18136,8 +18136,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -18666,8 +18666,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -19190,8 +19190,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -19708,8 +19708,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -20200,8 +20200,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -20700,8 +20700,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -21205,8 +21205,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -21704,8 +21704,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -22207,8 +22207,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -22717,8 +22717,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -23225,8 +23225,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -23722,8 +23722,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -24214,8 +24214,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -24714,8 +24714,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -25219,8 +25219,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -25718,8 +25718,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -26221,8 +26221,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -26731,8 +26731,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -27239,8 +27239,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) NOT NULL DEFAULT '0',
- `f_int2` int(11) NOT NULL DEFAULT '0',
+ `f_int1` int(11) NOT NULL DEFAULT 0,
+ `f_int2` int(11) NOT NULL DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -27736,8 +27736,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -28244,8 +28244,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -28760,8 +28760,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -29281,8 +29281,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -29796,8 +29796,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -30315,8 +30315,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -30841,8 +30841,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
@@ -31365,8 +31365,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL,
diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_engine_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_engine_tokudb.result
index 7df4c93cd85..8837049119a 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_engine_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_engine_tokudb.result
@@ -62,8 +62,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -519,8 +519,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -978,8 +978,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1503,8 +1503,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2004,8 +2004,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2466,8 +2466,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -2928,8 +2928,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -3387,8 +3387,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -3852,8 +3852,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -4310,8 +4310,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -4764,8 +4764,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_syntax_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_syntax_tokudb.result
index 340bbf07f35..13b8a133628 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_syntax_tokudb.result
+++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_syntax_tokudb.result
@@ -652,8 +652,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -679,8 +679,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -713,8 +713,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -735,8 +735,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -820,8 +820,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -856,8 +856,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -881,8 +881,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -906,8 +906,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -931,8 +931,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1675,8 +1675,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
@@ -1704,8 +1704,8 @@ create_command
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f_int1` int(11) DEFAULT '0',
- `f_int2` int(11) DEFAULT '0',
+ `f_int1` int(11) DEFAULT 0,
+ `f_int2` int(11) DEFAULT 0,
`f_char1` char(20) DEFAULT NULL,
`f_char2` char(20) DEFAULT NULL,
`f_charbig` varchar(1000) DEFAULT NULL
diff --git a/storage/tokudb/mysql-test/tokudb_parts/t/suite.opt b/storage/tokudb/mysql-test/tokudb_parts/t/suite.opt
index 23511b05020..15acdf7397f 100644
--- a/storage/tokudb/mysql-test/tokudb_parts/t/suite.opt
+++ b/storage/tokudb/mysql-test/tokudb_parts/t/suite.opt
@@ -1 +1 @@
-$TOKUDB_OPT $TOKUDB_LOAD_ADD --loose-tokudb-check-jemalloc=0
+$TOKUDB_OPT $TOKUDB_LOAD_ADD --loose-tokudb-check-jemalloc=0 --loose-tokudb-cache-size=512M --loose-tokudb-block-size=1M
diff --git a/storage/tokudb/mysql-test/tokudb_rpl/t/rpl_rfr_disable_on_expl_pk_absence-slave.opt b/storage/tokudb/mysql-test/tokudb_rpl/t/rpl_rfr_disable_on_expl_pk_absence-slave.opt
index fb12af6c5bd..c87bbb62418 100644
--- a/storage/tokudb/mysql-test/tokudb_rpl/t/rpl_rfr_disable_on_expl_pk_absence-slave.opt
+++ b/storage/tokudb/mysql-test/tokudb_rpl/t/rpl_rfr_disable_on_expl_pk_absence-slave.opt
@@ -1 +1 @@
---read-only=true --tokudb-rpl-unique-checks=false --tokudb-rpl-lookup-rows=false
+--read-only=true --loose-tokudb-rpl-unique-checks=false --loose-tokudb-rpl-lookup-rows=false
diff --git a/storage/tokudb/mysql-test/tokudb_sys_vars/t/suite.opt b/storage/tokudb/mysql-test/tokudb_sys_vars/t/suite.opt
index 23511b05020..15acdf7397f 100644
--- a/storage/tokudb/mysql-test/tokudb_sys_vars/t/suite.opt
+++ b/storage/tokudb/mysql-test/tokudb_sys_vars/t/suite.opt
@@ -1 +1 @@
-$TOKUDB_OPT $TOKUDB_LOAD_ADD --loose-tokudb-check-jemalloc=0
+$TOKUDB_OPT $TOKUDB_LOAD_ADD --loose-tokudb-check-jemalloc=0 --loose-tokudb-cache-size=512M --loose-tokudb-block-size=1M
diff --git a/storage/tokudb/tokudb_sysvars.cc b/storage/tokudb/tokudb_sysvars.cc
index 3ec7a0e1f05..7cea749b4fb 100644
--- a/storage/tokudb/tokudb_sysvars.cc
+++ b/storage/tokudb/tokudb_sysvars.cc
@@ -74,9 +74,7 @@ char* gdb_path = NULL;
my_bool gdb_on_fatal = FALSE;
#endif
-#if TOKUDB_CHECK_JEMALLOC
-uint check_jemalloc = 0;
-#endif
+my_bool check_jemalloc = TRUE;
static MYSQL_SYSVAR_ULONGLONG(
cache_size,
@@ -416,19 +414,14 @@ static MYSQL_SYSVAR_BOOL(
true);
#endif
-#if TOKUDB_CHECK_JEMALLOC
-static MYSQL_SYSVAR_UINT(
+static MYSQL_SYSVAR_BOOL(
check_jemalloc,
check_jemalloc,
- 0,
- "check if jemalloc is linked",
+ PLUGIN_VAR_READONLY|PLUGIN_VAR_RQCMDARG,
+ "check if jemalloc is linked and transparent huge pages are disabled",
NULL,
NULL,
- 1,
- 0,
- 1,
- 0);
-#endif
+ TRUE);
//******************************************************************************
@@ -948,9 +941,7 @@ st_mysql_sys_var* system_variables[] = {
MYSQL_SYSVAR(gdb_on_fatal),
#endif
-#if TOKUDB_CHECK_JEMALLOC
MYSQL_SYSVAR(check_jemalloc),
-#endif
// session vars
MYSQL_SYSVAR(alter_print_error),
diff --git a/storage/tokudb/tokudb_sysvars.h b/storage/tokudb/tokudb_sysvars.h
index b67cf8aa0e2..3bd96f7c68d 100644
--- a/storage/tokudb/tokudb_sysvars.h
+++ b/storage/tokudb/tokudb_sysvars.h
@@ -108,9 +108,7 @@ extern char* gdb_path;
extern my_bool gdb_on_fatal;
#endif
-#if TOKUDB_CHECK_JEMALLOC
-extern uint check_jemalloc;
-#endif
+extern my_bool check_jemalloc;
#if TOKUDB_DEBUG
// used to control background job manager
diff --git a/storage/xtradb/CMakeLists.txt b/storage/xtradb/CMakeLists.txt
index a9a4d422143..22897a3b315 100644
--- a/storage/xtradb/CMakeLists.txt
+++ b/storage/xtradb/CMakeLists.txt
@@ -496,18 +496,10 @@ SET(INNOBASE_SOURCES
ut/ut0wqueue.cc
ut/ut0timer.cc)
-IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le")
- enable_language(ASM)
- LIST(APPEND INNOBASE_SOURCES
- ut/crc32_power8/crc32.S
- ut/crc32_power8/crc32_wrapper.c
- )
-ENDIF()
-
MYSQL_ADD_PLUGIN(xtradb ${INNOBASE_SOURCES} STORAGE_ENGINE
DISABLED # until upgraded to 5.7, see also mysql-test/include/have_xtradb.combinations
RECOMPILE_FOR_EMBEDDED
- LINK_LIBRARIES ${ZLIB_LIBRARY} ${LINKER_SCRIPT})
+ LINK_LIBRARIES ${ZLIB_LIBRARY} ${CRC32_VPMSUM_LIBRARY} ${LINKER_SCRIPT})
IF(TARGET xtradb AND NOT XTRADB_OK)
MESSAGE(FATAL_ERROR "Percona XtraDB is not supported on this platform")
diff --git a/storage/xtradb/btr/btr0btr.cc b/storage/xtradb/btr/btr0btr.cc
index caa35d31109..00a04e75c49 100644
--- a/storage/xtradb/btr/btr0btr.cc
+++ b/storage/xtradb/btr/btr0btr.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
Copyright (c) 2014, 2015, MariaDB Corporation
@@ -1146,7 +1146,7 @@ that the caller has made the reservation for free extents!
@retval block, rw_lock_x_lock_count(&block->lock) == 1 if allocation succeeded
(init_mtr == mtr, or the page was not previously freed in mtr)
@retval block (not allocated or initialized) otherwise */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
buf_block_t*
btr_page_alloc_low(
/*===============*/
@@ -2217,7 +2217,8 @@ btr_parse_page_reorganize(
{
ulint level;
- ut_ad(ptr && end_ptr);
+ ut_ad(ptr != NULL);
+ ut_ad(end_ptr != NULL);
/* If dealing with a compressed page the record has the
compression level used during original compression written in
@@ -2689,7 +2690,7 @@ func_exit:
Returns TRUE if the insert fits on the appropriate half-page with the
chosen split_rec.
@return true if fits */
-static __attribute__((nonnull(1,3,4,6), warn_unused_result))
+static MY_ATTRIBUTE((nonnull(1,3,4,6), warn_unused_result))
bool
btr_page_insert_fits(
/*=================*/
@@ -2832,7 +2833,7 @@ btr_insert_on_non_leaf_level_func(
/**************************************************************//**
Attaches the halves of an index page on the appropriate level in an
index tree. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
btr_attach_half_pages(
/*==================*/
@@ -2968,7 +2969,7 @@ btr_attach_half_pages(
/*************************************************************//**
Determine if a tuple is smaller than any record on the page.
@return TRUE if smaller */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
btr_page_tuple_smaller(
/*===================*/
@@ -3560,7 +3561,8 @@ btr_level_list_remove_func(
ulint prev_page_no;
ulint next_page_no;
- ut_ad(page && mtr);
+ ut_ad(page != NULL);
+ ut_ad(mtr != NULL);
ut_ad(mtr_memo_contains_page(mtr, page, MTR_MEMO_PAGE_X_FIX));
ut_ad(space == page_get_space_id(page));
/* Get the previous and next page numbers of page */
diff --git a/storage/xtradb/btr/btr0cur.cc b/storage/xtradb/btr/btr0cur.cc
index 7ee37836bfb..b52a068863f 100644
--- a/storage/xtradb/btr/btr0cur.cc
+++ b/storage/xtradb/btr/btr0cur.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
Copyright (c) 2012, Facebook Inc.
Copyright (c) 2015, MariaDB Corporation.
@@ -1237,7 +1237,7 @@ This has to be done either within the same mini-transaction,
or by invoking ibuf_reset_free_bits() before mtr_commit().
@return pointer to inserted record if succeed, else NULL */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
rec_t*
btr_cur_insert_if_possible(
/*=======================*/
@@ -1280,7 +1280,7 @@ btr_cur_insert_if_possible(
/*************************************************************//**
For an insert, checks the locks and does the undo logging if desired.
@return DB_SUCCESS, DB_WAIT_LOCK, DB_FAIL, or error number */
-UNIV_INLINE __attribute__((warn_unused_result, nonnull(2,3,5,6)))
+UNIV_INLINE MY_ATTRIBUTE((warn_unused_result, nonnull(2,3,5,6)))
dberr_t
btr_cur_ins_lock_and_undo(
/*======================*/
@@ -1843,7 +1843,7 @@ btr_cur_pessimistic_insert(
/*************************************************************//**
For an update, checks the locks and does the undo logging.
@return DB_SUCCESS, DB_WAIT_LOCK, or error number */
-UNIV_INLINE __attribute__((warn_unused_result, nonnull(2,3,6,7)))
+UNIV_INLINE MY_ATTRIBUTE((warn_unused_result, nonnull(2,3,6,7)))
dberr_t
btr_cur_upd_lock_and_undo(
/*======================*/
@@ -1862,7 +1862,7 @@ btr_cur_upd_lock_and_undo(
const rec_t* rec;
dberr_t err;
- ut_ad(thr || (flags & BTR_NO_LOCKING_FLAG));
+ ut_ad((thr != NULL) || (flags & BTR_NO_LOCKING_FLAG));
if (UNIV_UNLIKELY(thr && thr_get_trx(thr)->fake_changes)) {
/* skip LOCK, UNDO */
@@ -3208,7 +3208,7 @@ btr_cur_del_mark_set_clust_rec(
ut_ad(page_is_leaf(page_align(rec)));
#ifdef UNIV_DEBUG
- if (btr_cur_print_record_ops && thr) {
+ if (btr_cur_print_record_ops && (thr != NULL)) {
btr_cur_trx_report(thr_get_trx(thr)->id, index, "del mark ");
rec_print_new(stderr, rec, offsets);
}
@@ -3366,7 +3366,7 @@ btr_cur_del_mark_set_sec_rec(
rec = btr_cur_get_rec(cursor);
#ifdef UNIV_DEBUG
- if (btr_cur_print_record_ops && thr) {
+ if (btr_cur_print_record_ops && (thr != NULL)) {
btr_cur_trx_report(thr_get_trx(thr)->id, cursor->index,
"del mark ");
rec_print(stderr, rec, cursor->index);
@@ -5340,7 +5340,7 @@ btr_free_externally_stored_field(
ulint i, /*!< in: field number of field_ref;
ignored if rec == NULL */
enum trx_rb_ctx rb_ctx, /*!< in: rollback context */
- mtr_t* local_mtr __attribute__((unused))) /*!< in: mtr
+ mtr_t* local_mtr MY_ATTRIBUTE((unused))) /*!< in: mtr
containing the latch to data an an
X-latch to the index tree */
{
diff --git a/storage/xtradb/btr/btr0sea.cc b/storage/xtradb/btr/btr0sea.cc
index 683bf7cd1c7..68dbcdf1fa7 100644
--- a/storage/xtradb/btr/btr0sea.cc
+++ b/storage/xtradb/btr/btr0sea.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
Portions of this file contain modifications contributed and copyrighted by
@@ -505,7 +505,7 @@ btr_search_update_block_hash_info(
/*==============================*/
btr_search_t* info, /*!< in: search info */
buf_block_t* block, /*!< in: buffer block */
- btr_cur_t* cursor __attribute__((unused)))
+ btr_cur_t* cursor MY_ATTRIBUTE((unused)))
/*!< in: cursor */
{
#ifdef UNIV_SYNC_DEBUG
diff --git a/storage/xtradb/buf/buf0buddy.cc b/storage/xtradb/buf/buf0buddy.cc
index 8f6be0cf2af..8cb880c1169 100644
--- a/storage/xtradb/buf/buf0buddy.cc
+++ b/storage/xtradb/buf/buf0buddy.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2006, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2006, 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
@@ -112,7 +112,7 @@ buf_buddy_mem_invalid(
/**********************************************************************//**
Check if a buddy is stamped free.
@return whether the buddy is free */
-UNIV_INLINE __attribute__((warn_unused_result))
+UNIV_INLINE MY_ATTRIBUTE((warn_unused_result))
bool
buf_buddy_stamp_is_free(
/*====================*/
@@ -225,7 +225,7 @@ Checks if a buf is free i.e.: in the zip_free[].
@retval BUF_BUDDY_STATE_FREE if fully free
@retval BUF_BUDDY_STATE_USED if currently in use
@retval BUF_BUDDY_STATE_PARTIALLY_USED if partially in use. */
-static __attribute__((warn_unused_result))
+static MY_ATTRIBUTE((warn_unused_result))
buf_buddy_state_t
buf_buddy_is_free(
/*==============*/
diff --git a/storage/xtradb/buf/buf0buf.cc b/storage/xtradb/buf/buf0buf.cc
index 19dd375f6e6..a81d21a04b5 100644
--- a/storage/xtradb/buf/buf0buf.cc
+++ b/storage/xtradb/buf/buf0buf.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
Copyright (c) 2013, 2016, MariaDB Corporation. All Rights Reserved.
@@ -706,7 +706,7 @@ buf_page_is_corrupted(
"InnoDB: " REFMAN
"forcing-innodb-recovery.html\n"
"InnoDB: for more information.\n",
- (ulong) mach_read_from_4(
+ (ulint) mach_read_from_4(
read_buf + FIL_PAGE_OFFSET),
(lsn_t) mach_read_from_8(
read_buf + FIL_PAGE_LSN),
@@ -904,7 +904,7 @@ buf_page_print(
ut_print_timestamp(stderr);
fprintf(stderr,
" InnoDB: Page dump in ascii and hex (%lu bytes):\n",
- (ulong) size);
+ size);
ut_print_buf(stderr, read_buf, size);
fputs("\nInnoDB: End of page dump\n", stderr);
}
@@ -2500,9 +2500,9 @@ buf_zip_decompress(
}
fprintf(stderr,
- "InnoDB: unable to decompress space %lu page %lu\n",
- (ulong) block->page.space,
- (ulong) block->page.offset);
+ "InnoDB: unable to decompress space %u page %u\n",
+ block->page.space,
+ block->page.offset);
return(FALSE);
case FIL_PAGE_TYPE_ALLOCATED:
@@ -3838,7 +3838,7 @@ buf_page_init_low(
/********************************************************************//**
Inits a page to the buffer buf_pool. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
buf_page_init(
/*==========*/
@@ -3909,8 +3909,8 @@ buf_page_init(
fprintf(stderr,
"InnoDB: Error: page %lu %lu already found"
" in the hash table: %p, %p\n",
- (ulong) space,
- (ulong) offset,
+ space,
+ offset,
(const void*) hash_page, (const void*) block);
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
mutex_exit(&block->mutex);
@@ -4278,7 +4278,7 @@ buf_page_create(
#ifdef UNIV_DEBUG
if (buf_debug_prints) {
fprintf(stderr, "Creating space %lu page %lu to buffer\n",
- (ulong) space, (ulong) offset);
+ space, offset);
}
#endif /* UNIV_DEBUG */
@@ -4686,10 +4686,10 @@ buf_page_io_complete(
ut_print_timestamp(stderr);
fprintf(stderr,
- " InnoDB: Error: reading page %lu\n"
+ " InnoDB: Error: reading page %u\n"
"InnoDB: which is in the"
" doublewrite buffer!\n",
- (ulong) bpage->offset);
+ bpage->offset);
} else if (!read_space_id && !read_page_no) {
/* This is likely an uninitialized page. */
} else if ((bpage->space
@@ -4705,10 +4705,11 @@ buf_page_io_complete(
" InnoDB: Error: space id and page n:o"
" stored in the page\n"
"InnoDB: read in are %lu:%lu,"
- " should be %lu:%lu!\n",
- (ulong) read_space_id, (ulong) read_page_no,
- (ulong) bpage->space,
- (ulong) bpage->offset);
+ " should be %u:%u!\n",
+ read_space_id,
+ read_page_no,
+ bpage->space,
+ bpage->offset);
}
if (UNIV_LIKELY(!bpage->is_corrupt ||
@@ -4742,10 +4743,10 @@ corrupt:
"Database page corruption on disk"
" or a failed");
ib_logf(IB_LOG_LEVEL_ERROR,
- "Space %lu file %s read of page %lu.",
- (ulint)bpage->space,
+ "Space %u file %s read of page %u.",
+ bpage->space,
space ? space->name : "NULL",
- (ulong) bpage->offset);
+ bpage->offset);
ib_logf(IB_LOG_LEVEL_ERROR,
"You may have to recover"
" from a backup.");
@@ -4973,8 +4974,8 @@ retry_mutex:
if (buf_debug_prints) {
fprintf(stderr, "Has %s page space %lu page no %lu\n",
io_type == BUF_IO_READ ? "read" : "written",
- (ulong) buf_page_get_space(bpage),
- (ulong) buf_page_get_page_no(bpage));
+ buf_page_get_space(bpage),
+ buf_page_get_page_no(bpage));
}
#endif /* UNIV_DEBUG */
@@ -5009,11 +5010,21 @@ buf_all_freed_instance(
mutex_exit(&buf_pool->LRU_list_mutex);
if (UNIV_LIKELY_NULL(block)) {
- if (block->page.key_version == 0) {
- fprintf(stderr,
- "Page %lu %lu still fixed or dirty\n",
- (ulong) block->page.space,
- (ulong) block->page.offset);
+ if (block->page.key_version == 0) {
+ fil_space_t* space = fil_space_get(block->page.space);
+ ib_logf(IB_LOG_LEVEL_ERROR,
+ "Page %u %u still fixed or dirty.",
+ block->page.space,
+ block->page.offset);
+ ib_logf(IB_LOG_LEVEL_ERROR,
+ "Page oldest_modification %lu fix_count %d io_fix %d.",
+ block->page.oldest_modification,
+ block->page.buf_fix_count,
+ buf_page_get_io_fix(&block->page));
+ ib_logf(IB_LOG_LEVEL_ERROR,
+ "Page space_id %u name %s.",
+ block->page.space,
+ (space && space->name) ? space->name : "NULL");
ut_error;
}
}
@@ -5306,8 +5317,8 @@ buf_pool_validate_instance(
if (n_lru + n_free > buf_pool->curr_size + n_zip) {
fprintf(stderr, "n LRU %lu, n free %lu, pool %lu zip %lu\n",
- (ulong) n_lru, (ulong) n_free,
- (ulong) buf_pool->curr_size, (ulong) n_zip);
+ n_lru, n_free,
+ buf_pool->curr_size, n_zip);
ut_error;
}
@@ -5317,8 +5328,8 @@ buf_pool_validate_instance(
if (UT_LIST_GET_LEN(buf_pool->free) != n_free) {
fprintf(stderr, "Free list len %lu, free blocks %lu\n",
- (ulong) UT_LIST_GET_LEN(buf_pool->free),
- (ulong) n_free);
+ UT_LIST_GET_LEN(buf_pool->free),
+ n_free);
ut_error;
}
@@ -5399,20 +5410,20 @@ buf_print_instance(
"n pending flush LRU %lu list %lu single page %lu\n"
"pages made young %lu, not young %lu\n"
"pages read %lu, created %lu, written %lu\n",
- (ulong) size,
- (ulong) UT_LIST_GET_LEN(buf_pool->LRU),
- (ulong) UT_LIST_GET_LEN(buf_pool->free),
- (ulong) UT_LIST_GET_LEN(buf_pool->flush_list),
- (ulong) buf_pool->n_pend_unzip,
- (ulong) buf_pool->n_pend_reads,
- (ulong) buf_pool->n_flush[BUF_FLUSH_LRU],
- (ulong) buf_pool->n_flush[BUF_FLUSH_LIST],
- (ulong) buf_pool->n_flush[BUF_FLUSH_SINGLE_PAGE],
- (ulong) buf_pool->stat.n_pages_made_young,
- (ulong) buf_pool->stat.n_pages_not_made_young,
- (ulong) buf_pool->stat.n_pages_read,
- (ulong) buf_pool->stat.n_pages_created,
- (ulong) buf_pool->stat.n_pages_written);
+ (ulint) size,
+ (ulint) UT_LIST_GET_LEN(buf_pool->LRU),
+ (ulint) UT_LIST_GET_LEN(buf_pool->free),
+ (ulint) UT_LIST_GET_LEN(buf_pool->flush_list),
+ (ulint) buf_pool->n_pend_unzip,
+ (ulint) buf_pool->n_pend_reads,
+ (ulint) buf_pool->n_flush[BUF_FLUSH_LRU],
+ (ulint) buf_pool->n_flush[BUF_FLUSH_LIST],
+ (ulint) buf_pool->n_flush[BUF_FLUSH_SINGLE_PAGE],
+ (ulint) buf_pool->stat.n_pages_made_young,
+ (ulint) buf_pool->stat.n_pages_not_made_young,
+ (ulint) buf_pool->stat.n_pages_read,
+ (ulint) buf_pool->stat.n_pages_created,
+ (ulint) buf_pool->stat.n_pages_written);
/* Count the number of blocks belonging to each index in the buffer */
@@ -5463,7 +5474,7 @@ buf_print_instance(
fprintf(stderr,
"Block count for index %llu in buffer is about %lu",
(ullint) index_ids[i],
- (ulong) counts[i]);
+ (ulint) counts[i]);
if (index) {
putc(' ', stderr);
@@ -5917,10 +5928,10 @@ buf_print_io_instance(
fprintf(file,
"Buffer pool hit rate %lu / 1000,"
" young-making rate %lu / 1000 not %lu / 1000\n",
- (ulong) hit_rate,
- (ulong) (1000 * pool_info->young_making_delta
+ (ulint) hit_rate,
+ (ulint) (1000 * pool_info->young_making_delta
/ pool_info->n_page_get_delta),
- (ulong) (1000 * pool_info->not_young_making_delta
+ (ulint) (1000 * pool_info->not_young_making_delta
/ pool_info->n_page_get_delta));
} else {
fputs("No buffer pool page gets since the last printout\n",
diff --git a/storage/xtradb/buf/buf0dump.cc b/storage/xtradb/buf/buf0dump.cc
index a68bb8a1344..114c96cec98 100644
--- a/storage/xtradb/buf/buf0dump.cc
+++ b/storage/xtradb/buf/buf0dump.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2011, 2015, Oracle and/or its affiliates. All Rights Reserved.
+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
@@ -105,7 +105,7 @@ SELECT variable_value FROM information_schema.global_status WHERE
variable_name = 'INNODB_BUFFER_POOL_DUMP_STATUS';
or by:
SHOW STATUS LIKE 'innodb_buffer_pool_dump_status'; */
-static __attribute__((nonnull, format(printf, 2, 3)))
+static MY_ATTRIBUTE((nonnull, format(printf, 2, 3)))
void
buf_dump_status(
/*============*/
@@ -137,7 +137,7 @@ SELECT variable_value FROM information_schema.global_status WHERE
variable_name = 'INNODB_BUFFER_POOL_LOAD_STATUS';
or by:
SHOW STATUS LIKE 'innodb_buffer_pool_load_status'; */
-static __attribute__((nonnull, format(printf, 2, 3)))
+static MY_ATTRIBUTE((nonnull, format(printf, 2, 3)))
void
buf_load_status(
/*============*/
@@ -684,7 +684,7 @@ extern "C" UNIV_INTERN
os_thread_ret_t
DECLARE_THREAD(buf_dump_thread)(
/*============================*/
- void* arg __attribute__((unused))) /*!< in: a dummy parameter
+ void* arg MY_ATTRIBUTE((unused))) /*!< in: a dummy parameter
required by os_thread_create */
{
ut_ad(!srv_read_only_mode);
diff --git a/storage/xtradb/buf/buf0flu.cc b/storage/xtradb/buf/buf0flu.cc
index 1dfd92e4fba..168f0a438a6 100644
--- a/storage/xtradb/buf/buf0flu.cc
+++ b/storage/xtradb/buf/buf0flu.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
-Copyright (c) 1995, 2015, Oracle and/or its affiliates
-Copyright (c) 2013, 2015, MariaDB
+Copyright (c) 1995, 2016, Oracle and/or its affiliates
+Copyright (c) 2013, 2016, MariaDB
Copyright (c) 2013, 2014, Fusion-io
This program is free software; you can redistribute it and/or modify it under
@@ -1506,7 +1506,7 @@ It attempts to make 'max' blocks available in the free list. Note that
it is a best effort attempt and it is not guaranteed that after a call
to this function there will be 'max' blocks in the free list.
@return number of blocks for which the write request was queued. */
-__attribute__((nonnull))
+MY_ATTRIBUTE((nonnull))
static
void
buf_flush_LRU_list_batch(
@@ -1652,7 +1652,7 @@ Whether LRU or unzip_LRU is used depends on the state of the system.
@return number of blocks for which either the write request was queued
or in case of unzip_LRU the number of blocks actually moved to the
free list */
-__attribute__((nonnull))
+MY_ATTRIBUTE((nonnull))
static
void
buf_do_LRU_batch(
@@ -1772,7 +1772,7 @@ pages: to avoid deadlocks, this function must be written so that it cannot
end up waiting for these latches! NOTE 2: in the case of a flush list flush,
the calling thread is not allowed to own any latches on pages!
@return number of blocks for which the write request was queued */
-__attribute__((nonnull))
+MY_ATTRIBUTE((nonnull))
void
buf_flush_batch(
/*============*/
@@ -1969,7 +1969,7 @@ list.
NOTE: The calling thread is not allowed to own any latches on pages!
@return true if a batch was queued successfully. false if another batch
of same type was already running. */
-__attribute__((nonnull))
+MY_ATTRIBUTE((nonnull))
static
bool
buf_flush_LRU(
@@ -2642,7 +2642,7 @@ page_cleaner_sleep_if_needed(
/*********************************************************************//**
Returns the aggregate free list length over all buffer pool instances.
@return total free list length. */
-__attribute__((warn_unused_result))
+MY_ATTRIBUTE((warn_unused_result))
static
ulint
buf_get_total_free_list_length(void)
@@ -2660,7 +2660,7 @@ buf_get_total_free_list_length(void)
/*********************************************************************//**
Adjust the desired page cleaner thread sleep time for LRU flushes. */
-__attribute__((nonnull))
+MY_ATTRIBUTE((nonnull))
static
void
page_cleaner_adapt_lru_sleep_time(
@@ -2699,7 +2699,7 @@ page_cleaner_adapt_lru_sleep_time(
/*********************************************************************//**
Get the desired page cleaner thread sleep time for flush list flushes.
@return desired sleep time */
-__attribute__((warn_unused_result))
+MY_ATTRIBUTE((warn_unused_result))
static
ulint
page_cleaner_adapt_flush_sleep_time(void)
@@ -2726,7 +2726,7 @@ extern "C" UNIV_INTERN
os_thread_ret_t
DECLARE_THREAD(buf_flush_page_cleaner_thread)(
/*==========================================*/
- void* arg __attribute__((unused)))
+ void* arg MY_ATTRIBUTE((unused)))
/*!< in: a dummy parameter required by
os_thread_create */
{
@@ -2878,7 +2878,7 @@ extern "C" UNIV_INTERN
os_thread_ret_t
DECLARE_THREAD(buf_flush_lru_manager_thread)(
/*==========================================*/
- void* arg __attribute__((unused)))
+ void* arg MY_ATTRIBUTE((unused)))
/*!< in: a dummy parameter required by
os_thread_create */
{
diff --git a/storage/xtradb/buf/buf0lru.cc b/storage/xtradb/buf/buf0lru.cc
index fdec0e48198..579166753c4 100644
--- a/storage/xtradb/buf/buf0lru.cc
+++ b/storage/xtradb/buf/buf0lru.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 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
@@ -143,7 +143,7 @@ If a compressed page is freed other compressed pages may be relocated.
caller needs to free the page to the free list
@retval false if BUF_BLOCK_ZIP_PAGE was removed from page_hash. In
this case the block is already returned to the buddy allocator. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
buf_LRU_block_remove_hashed(
/*========================*/
@@ -368,7 +368,7 @@ want to hog the CPU and resources. Release the buffer pool and block
mutex and try to force a context switch. Then reacquire the same mutexes.
The current page is "fixed" before the release of the mutexes and then
"unfixed" again once we have reacquired the mutexes. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
buf_flush_yield(
/*============*/
@@ -407,7 +407,7 @@ If we have hogged the resources for too long then release the buffer
pool and flush list mutex and do a thread yield. Set the current page
to "sticky" so that it is not relocated during the yield.
@return true if yielded */
-static __attribute__((nonnull(1), warn_unused_result))
+static MY_ATTRIBUTE((nonnull(1), warn_unused_result))
bool
buf_flush_try_yield(
/*================*/
@@ -476,7 +476,7 @@ buf_flush_try_yield(
Removes a single page from a given tablespace inside a specific
buffer pool instance.
@return true if page was removed. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
buf_flush_or_remove_page(
/*=====================*/
@@ -578,7 +578,7 @@ the list as they age towards the tail of the LRU.
@retval DB_SUCCESS if all freed
@retval DB_FAIL if not all freed
@retval DB_INTERRUPTED if the transaction was interrupted */
-static __attribute__((nonnull(1), warn_unused_result))
+static MY_ATTRIBUTE((nonnull(1), warn_unused_result))
dberr_t
buf_flush_or_remove_pages(
/*======================*/
@@ -699,7 +699,7 @@ Remove or flush all the dirty pages that belong to a given tablespace
inside a specific buffer pool instance. The pages will remain in the LRU
list and will be evicted from the LRU list as they age and move towards
the tail of the LRU list. */
-static __attribute__((nonnull(1)))
+static MY_ATTRIBUTE((nonnull(1)))
void
buf_flush_dirty_pages(
/*==================*/
@@ -739,7 +739,7 @@ buf_flush_dirty_pages(
/******************************************************************//**
Remove all pages that belong to a given tablespace inside a specific
buffer pool instance when we are DISCARDing the tablespace. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
buf_LRU_remove_all_pages(
/*=====================*/
@@ -895,7 +895,7 @@ buffer pool instance when we are deleting the data file(s) of that
tablespace. The pages still remain a part of LRU and are evicted from
the list as they age towards the tail of the LRU only if buf_remove
is BUF_REMOVE_FLUSH_NO_WRITE. */
-static __attribute__((nonnull(1)))
+static MY_ATTRIBUTE((nonnull(1)))
void
buf_LRU_remove_pages(
/*=================*/
diff --git a/storage/xtradb/data/data0data.cc b/storage/xtradb/data/data0data.cc
index 179de79b69f..593af089b00 100644
--- a/storage/xtradb/data/data0data.cc
+++ b/storage/xtradb/data/data0data.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -67,7 +67,8 @@ dtuple_coll_cmp(
ulint n_fields;
ulint i;
- ut_ad(tuple1 && tuple2);
+ ut_ad(tuple1 != NULL);
+ ut_ad(tuple2 != NULL);
ut_ad(tuple1->magic_n == DATA_TUPLE_MAGIC_N);
ut_ad(tuple2->magic_n == DATA_TUPLE_MAGIC_N);
ut_ad(dtuple_check_typed(tuple1));
@@ -715,7 +716,7 @@ UNIV_INTERN
void
dtuple_convert_back_big_rec(
/*========================*/
- dict_index_t* index __attribute__((unused)), /*!< in: index */
+ dict_index_t* index MY_ATTRIBUTE((unused)), /*!< in: index */
dtuple_t* entry, /*!< in: entry whose data was put to vector */
big_rec_t* vector) /*!< in, own: big rec vector; it is
freed in this function */
diff --git a/storage/xtradb/dict/dict0crea.cc b/storage/xtradb/dict/dict0crea.cc
index e2c7355b2e4..870e452e5f2 100644
--- a/storage/xtradb/dict/dict0crea.cc
+++ b/storage/xtradb/dict/dict0crea.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -246,7 +246,7 @@ dict_create_sys_columns_tuple(
/***************************************************************//**
Builds a table definition to insert.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
dict_build_table_def_step(
/*======================*/
@@ -574,7 +574,7 @@ dict_create_search_tuple(
/***************************************************************//**
Builds an index definition row to insert.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
dict_build_index_def_step(
/*======================*/
@@ -649,7 +649,7 @@ dict_build_field_def_step(
/***************************************************************//**
Creates an index tree for the index if it is not a member of a cluster.
@return DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
dict_create_index_tree_step(
/*========================*/
@@ -1468,7 +1468,7 @@ dict_create_or_check_foreign_constraint_tables(void)
/****************************************************************//**
Evaluate the given foreign key SQL statement.
@return error code or DB_SUCCESS */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
dict_foreign_eval_sql(
/*==================*/
@@ -1534,7 +1534,7 @@ dict_foreign_eval_sql(
Add a single foreign key field definition to the data dictionary tables in
the database.
@return error code or DB_SUCCESS */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
dict_create_add_foreign_field_to_dictionary(
/*========================================*/
diff --git a/storage/xtradb/dict/dict0dict.cc b/storage/xtradb/dict/dict0dict.cc
index a147fbbc671..86ec720d24e 100644
--- a/storage/xtradb/dict/dict0dict.cc
+++ b/storage/xtradb/dict/dict0dict.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
Copyright (c) 2013, 2015, MariaDB Corporation.
@@ -6309,7 +6309,7 @@ dict_set_corrupted_index_cache_only(
dict_index_t* index, /*!< in/out: index */
dict_table_t* table) /*!< in/out: table */
{
- ut_ad(index);
+ ut_ad(index != NULL);
ut_ad(mutex_own(&dict_sys->mutex));
ut_ad(!dict_table_is_comp(dict_sys->sys_tables));
ut_ad(!dict_table_is_comp(dict_sys->sys_indexes));
@@ -6319,8 +6319,9 @@ dict_set_corrupted_index_cache_only(
if (dict_index_is_clust(index)) {
dict_table_t* corrupt_table;
- corrupt_table = table ? table : index->table;
- ut_ad(!index->table || !table || index->table == table);
+ corrupt_table = (table != NULL) ? table : index->table;
+ ut_ad((index->table != NULL) || (table != NULL)
+ || index->table == table);
if (corrupt_table) {
corrupt_table->corrupted = TRUE;
@@ -6438,11 +6439,6 @@ dict_table_get_index_on_name(
{
dict_index_t* index;
- /* If name is NULL, just return */
- if (!name) {
- return(NULL);
- }
-
index = dict_table_get_first_index(table);
while (index != NULL) {
diff --git a/storage/xtradb/dict/dict0load.cc b/storage/xtradb/dict/dict0load.cc
index cf2a5b69509..a1cf462b11c 100644
--- a/storage/xtradb/dict/dict0load.cc
+++ b/storage/xtradb/dict/dict0load.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2016, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
@@ -1751,7 +1751,7 @@ err_len:
goto err_len;
}
type = mach_read_from_4(field);
- if (type & (~0 << DICT_IT_BITS)) {
+ if (type & (~0U << DICT_IT_BITS)) {
return("unknown SYS_INDEXES.TYPE bits");
}
@@ -1791,7 +1791,7 @@ Loads definitions for table indexes. Adds them to the data dictionary
cache.
@return DB_SUCCESS if ok, DB_CORRUPTION if corruption of dictionary
table or DB_UNSUPPORTED if table has unknown index type */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
dberr_t
dict_load_indexes(
/*==============*/
@@ -2539,6 +2539,7 @@ func_exit:
/* the table->fts could be created in dict_load_column
when a user defined FTS_DOC_ID is present, but no
FTS */
+ fts_optimize_remove_table(table);
fts_free(table);
} else {
fts_optimize_add_table(table);
@@ -2604,14 +2605,13 @@ dict_load_table_on_id(
btr_pcur_open_on_user_rec(sys_table_ids, tuple, PAGE_CUR_GE,
BTR_SEARCH_LEAF, &pcur, &mtr);
-check_rec:
rec = btr_pcur_get_rec(&pcur);
if (page_rec_is_user_rec(rec)) {
/*---------------------------------------------------*/
/* Now we have the record in the secondary index
containing the table ID and NAME */
-
+check_rec:
field = rec_get_nth_field_old(
rec, DICT_FLD__SYS_TABLE_IDS__ID, &len);
ut_ad(len == 8);
@@ -2621,12 +2621,14 @@ check_rec:
if (rec_get_deleted_flag(rec, 0)) {
/* Until purge has completed, there
may be delete-marked duplicate records
- for the same SYS_TABLES.ID.
- Due to Bug #60049, some delete-marked
- records may survive the purge forever. */
- if (btr_pcur_move_to_next(&pcur, &mtr)) {
-
- goto check_rec;
+ for the same SYS_TABLES.ID, but different
+ SYS_TABLES.NAME. */
+ while (btr_pcur_move_to_next(&pcur, &mtr)) {
+ rec = btr_pcur_get_rec(&pcur);
+
+ if (page_rec_is_user_rec(rec)) {
+ goto check_rec;
+ }
}
} else {
/* Now we get the table name from the record */
@@ -2888,7 +2890,7 @@ dict_load_foreign_cols(
/***********************************************************************//**
Loads a foreign key constraint to the dictionary cache.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull(1), warn_unused_result))
+static MY_ATTRIBUTE((nonnull(1), warn_unused_result))
dberr_t
dict_load_foreign(
/*==============*/
diff --git a/storage/xtradb/dict/dict0mem.cc b/storage/xtradb/dict/dict0mem.cc
index a4f6cd6c91f..bde72b83c54 100644
--- a/storage/xtradb/dict/dict0mem.cc
+++ b/storage/xtradb/dict/dict0mem.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
This program is free software; you can redistribute it and/or modify it under
@@ -306,7 +306,7 @@ dict_mem_table_add_col(
/**********************************************************************//**
Renames a column of a table in the data dictionary cache. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
dict_mem_table_col_rename_low(
/*==========================*/
diff --git a/storage/xtradb/dict/dict0stats_bg.cc b/storage/xtradb/dict/dict0stats_bg.cc
index e7842d3da9a..5f24bb2b742 100644
--- a/storage/xtradb/dict/dict0stats_bg.cc
+++ b/storage/xtradb/dict/dict0stats_bg.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2012, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2012, 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
@@ -528,7 +528,7 @@ extern "C" UNIV_INTERN
os_thread_ret_t
DECLARE_THREAD(dict_stats_thread)(
/*==============================*/
- void* arg __attribute__((unused))) /*!< in: a dummy parameter
+ void* arg MY_ATTRIBUTE((unused))) /*!< in: a dummy parameter
required by os_thread_create */
{
ut_a(!srv_read_only_mode);
@@ -549,14 +549,6 @@ DECLARE_THREAD(dict_stats_thread)(
break;
}
-#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
- if (srv_ibuf_disable_background_merge) {
- usleep(100000);
- os_event_reset(dict_stats_event);
- continue;
- }
-#endif
-
dict_stats_process_entry_from_recalc_pool();
while (defrag_pool.size())
diff --git a/storage/xtradb/fil/fil0fil.cc b/storage/xtradb/fil/fil0fil.cc
index b0695e2f260..58e08f11778 100644
--- a/storage/xtradb/fil/fil0fil.cc
+++ b/storage/xtradb/fil/fil0fil.cc
@@ -1434,6 +1434,28 @@ fil_space_free(
/*******************************************************************//**
Returns a pointer to the file_space_t that is in the memory cache
+associated with a space id.
+@return file_space_t pointer, NULL if space not found */
+fil_space_t*
+fil_space_get(
+/*==========*/
+ ulint id) /*!< in: space id */
+{
+ fil_space_t* space;
+
+ ut_ad(fil_system);
+
+ mutex_enter(&fil_system->mutex);
+
+ space = fil_space_get_by_id(id);
+
+ mutex_exit(&fil_system->mutex);
+
+ return (space);
+}
+
+/*******************************************************************//**
+Returns a pointer to the file_space_t that is in the memory cache
associated with a space id. The caller must lock fil_system->mutex.
@return file_space_t pointer, NULL if space not found */
UNIV_INLINE
@@ -1852,7 +1874,7 @@ fil_set_max_space_id_if_bigger(
Writes the flushed lsn and the latest archived log number to the page header
of the first page of a data file of the system tablespace (space 0),
which is uncompressed. */
-static __attribute__((warn_unused_result))
+static MY_ATTRIBUTE((warn_unused_result))
dberr_t
fil_write_lsn_and_arch_no_to_file(
/*==============================*/
@@ -1860,7 +1882,7 @@ fil_write_lsn_and_arch_no_to_file(
ulint sum_of_sizes, /*!< in: combined size of previous files
in space, in database pages */
lsn_t lsn, /*!< in: lsn to write */
- ulint arch_log_no __attribute__((unused)))
+ ulint arch_log_no MY_ATTRIBUTE((unused)))
/*!< in: archived log number to write */
{
byte* buf1;
@@ -1948,7 +1970,7 @@ Checks the consistency of the first data page of a tablespace
at database startup.
@retval NULL on success, or if innodb_force_recovery is set
@return pointer to an error message string */
-static __attribute__((warn_unused_result))
+static MY_ATTRIBUTE((warn_unused_result))
const char*
fil_check_first_page(
/*=================*/
diff --git a/storage/xtradb/fsp/fsp0fsp.cc b/storage/xtradb/fsp/fsp0fsp.cc
index 790232edb66..4acfd134c1f 100644
--- a/storage/xtradb/fsp/fsp0fsp.cc
+++ b/storage/xtradb/fsp/fsp0fsp.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 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
@@ -94,7 +94,7 @@ fseg_n_reserved_pages_low(
/********************************************************************//**
Marks a page used. The page must reside within the extents of the given
segment. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
fseg_mark_page_used(
/*================*/
@@ -133,7 +133,7 @@ fsp_fill_free_list(
ulint space, /*!< in: space */
fsp_header_t* header, /*!< in/out: space header */
mtr_t* mtr) /*!< in/out: mini-transaction */
- UNIV_COLD __attribute__((nonnull));
+ UNIV_COLD MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Allocates a single free page from a segment. This function implements
the intelligent allocation strategy which tries to minimize file space
@@ -162,7 +162,7 @@ fseg_alloc_free_page_low(
in which the page should be initialized.
If init_mtr!=mtr, but the page is already
latched in mtr, do not initialize the page. */
- __attribute__((warn_unused_result, nonnull));
+ MY_ATTRIBUTE((warn_unused_result, nonnull));
#endif /* !UNIV_HOTBACKUP */
/**********************************************************************//**
@@ -429,7 +429,7 @@ descriptor resides is x-locked. This function no longer extends the data
file.
@return pointer to the extent descriptor, NULL if the page does not
exist in the space or if the offset is >= the free limit */
-UNIV_INLINE __attribute__((nonnull, warn_unused_result))
+UNIV_INLINE MY_ATTRIBUTE((nonnull, warn_unused_result))
xdes_t*
xdes_get_descriptor_with_space_hdr(
/*===============================*/
@@ -488,7 +488,7 @@ descriptor resides is x-locked. This function no longer extends the data
file.
@return pointer to the extent descriptor, NULL if the page does not
exist in the space or if the offset exceeds the free limit */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
xdes_t*
xdes_get_descriptor(
/*================*/
@@ -618,7 +618,7 @@ byte*
fsp_parse_init_file_page(
/*=====================*/
byte* ptr, /*!< in: buffer */
- byte* end_ptr __attribute__((unused)), /*!< in: buffer end */
+ byte* end_ptr MY_ATTRIBUTE((unused)), /*!< in: buffer end */
buf_block_t* block) /*!< in: block or NULL */
{
ut_ad(ptr && end_ptr);
@@ -859,7 +859,7 @@ fsp_header_get_tablespace_size(void)
Tries to extend a single-table tablespace so that a page would fit in the
data file.
@return TRUE if success */
-static UNIV_COLD __attribute__((nonnull, warn_unused_result))
+static UNIV_COLD MY_ATTRIBUTE((nonnull, warn_unused_result))
ibool
fsp_try_extend_data_file_with_pages(
/*================================*/
@@ -891,7 +891,7 @@ fsp_try_extend_data_file_with_pages(
/***********************************************************************//**
Tries to extend the last data file of a tablespace if it is auto-extending.
@return FALSE if not auto-extending */
-static UNIV_COLD __attribute__((nonnull))
+static UNIV_COLD MY_ATTRIBUTE((nonnull))
ibool
fsp_try_extend_data_file(
/*=====================*/
@@ -1073,7 +1073,8 @@ fsp_fill_free_list(
ulint i;
mtr_t ibuf_mtr;
- ut_ad(header && mtr);
+ ut_ad(header != NULL);
+ ut_ad(mtr != NULL);
ut_ad(page_offset(header) == FSP_HEADER_OFFSET);
/* Check if we can fill free list from above the free list limit */
@@ -1245,7 +1246,7 @@ fsp_alloc_free_extent(
/**********************************************************************//**
Allocates a single free page from a space. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
fsp_alloc_from_free_frag(
/*=====================*/
@@ -1336,7 +1337,7 @@ Allocates a single free page from a space. The page is marked as used.
@retval block, rw_lock_x_lock_count(&block->lock) == 1 if allocation succeeded
(init_mtr == mtr, or the page was not previously freed in mtr)
@retval block (not allocated or initialized) otherwise */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
buf_block_t*
fsp_alloc_free_page(
/*================*/
@@ -1585,9 +1586,9 @@ fsp_seg_inode_page_get_nth_inode(
/*=============================*/
page_t* page, /*!< in: segment inode page */
ulint i, /*!< in: inode index on page */
- ulint zip_size __attribute__((unused)),
+ ulint zip_size MY_ATTRIBUTE((unused)),
/*!< in: compressed page size, or 0 */
- mtr_t* mtr __attribute__((unused)))
+ mtr_t* mtr MY_ATTRIBUTE((unused)))
/*!< in/out: mini-transaction */
{
ut_ad(i < FSP_SEG_INODES_PER_PAGE(zip_size));
@@ -1892,7 +1893,7 @@ fseg_get_nth_frag_page_no(
/*======================*/
fseg_inode_t* inode, /*!< in: segment inode */
ulint n, /*!< in: slot index */
- mtr_t* mtr __attribute__((unused)))
+ mtr_t* mtr MY_ATTRIBUTE((unused)))
/*!< in/out: mini-transaction */
{
ut_ad(inode && mtr);
@@ -2986,7 +2987,7 @@ fsp_get_available_space_in_free_extents(
/********************************************************************//**
Marks a page used. The page must reside within the extents of the given
segment. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
fseg_mark_page_used(
/*================*/
@@ -3058,7 +3059,8 @@ fseg_free_page_low(
ib_id_t seg_id;
ulint i;
- ut_ad(seg_inode && mtr);
+ ut_ad(seg_inode != NULL);
+ ut_ad(mtr != NULL);
ut_ad(mach_read_from_4(seg_inode + FSEG_MAGIC_N)
== FSEG_MAGIC_N_VALUE);
ut_ad(!((page_offset(seg_inode) - FSEG_ARR_OFFSET) % FSEG_INODE_SIZE));
@@ -3273,7 +3275,8 @@ fseg_free_extent(
ulint descr_n_used;
ulint i;
- ut_ad(seg_inode && mtr);
+ ut_ad(seg_inode != NULL);
+ ut_ad(mtr != NULL);
descr = xdes_get_descriptor(space, zip_size, page, mtr);
diff --git a/storage/xtradb/fts/fts0blex.cc b/storage/xtradb/fts/fts0blex.cc
index 7d0acb00a3b..2d71934fa0e 100644
--- a/storage/xtradb/fts/fts0blex.cc
+++ b/storage/xtradb/fts/fts0blex.cc
@@ -305,9 +305,9 @@ YY_BUFFER_STATE fts0b_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner
YY_BUFFER_STATE fts0b_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
YY_BUFFER_STATE fts0b_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
-void *fts0balloc (yy_size_t , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) );
-void *fts0brealloc (void *,yy_size_t , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) );
-void fts0bfree (void * , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) );
+void *fts0balloc (yy_size_t , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
+void *fts0brealloc (void *,yy_size_t , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
+void fts0bfree (void * , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
#define yy_new_buffer fts0b_create_buffer
@@ -347,7 +347,7 @@ typedef int yy_state_type;
static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
static int yy_get_next_buffer (yyscan_t yyscanner );
-static void yy_fatal_error (yyconst char msg[] , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) );
+static void yy_fatal_error (yyconst char msg[] , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
@@ -451,7 +451,7 @@ static yyconst flex_int16_t yy_chk[32] =
#line 1 "fts0blex.l"
/*****************************************************************************
-Copyright (c) 2007, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2007, 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
@@ -579,11 +579,11 @@ extern int fts0bwrap (yyscan_t yyscanner );
#endif
#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)));
+static void yy_flex_strncpy (char *,yyconst char *,int , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)));
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)));
+static int yy_flex_strlen (yyconst char * , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)));
#endif
#ifndef YY_NO_INPUT
@@ -1609,7 +1609,7 @@ YY_BUFFER_STATE fts0b_scan_bytes (yyconst char * yybytes, int _yybytes_len , y
#define YY_EXIT_FAILURE 2
#endif
-static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
+static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
{
(void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
@@ -1910,7 +1910,7 @@ int fts0blex_destroy (yyscan_t yyscanner)
*/
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
{
register int i;
for ( i = 0; i < n; ++i )
@@ -1919,7 +1919,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yys
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
+static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
{
register int n;
for ( n = 0; s[n]; ++n )
@@ -1929,12 +1929,12 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner __at
}
#endif
-void *fts0balloc (yy_size_t size , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
+void *fts0balloc (yy_size_t size , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
{
return (void *) malloc( size );
}
-void *fts0brealloc (void * ptr, yy_size_t size , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
+void *fts0brealloc (void * ptr, yy_size_t size , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
{
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
@@ -1946,7 +1946,7 @@ void *fts0brealloc (void * ptr, yy_size_t size , yyscan_t yyscanner
return (void *) realloc( (char *) ptr, size );
}
-void fts0bfree (void * ptr , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
+void fts0bfree (void * ptr , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
{
free( (char *) ptr ); /* see fts0brealloc() for (char *) cast */
}
diff --git a/storage/xtradb/fts/fts0fts.cc b/storage/xtradb/fts/fts0fts.cc
index a2e8a3d90ac..5e008b37b8d 100644
--- a/storage/xtradb/fts/fts0fts.cc
+++ b/storage/xtradb/fts/fts0fts.cc
@@ -280,7 +280,7 @@ void
fts_words_free(
/*===========*/
ib_rbt_t* words) /*!< in: rb tree of words */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#ifdef FTS_CACHE_SIZE_DEBUG
/****************************************************************//**
Read the max cache size parameter from the config table. */
@@ -302,7 +302,7 @@ fts_add_doc_by_id(
/*==============*/
fts_trx_table_t*ftt, /*!< in: FTS trx table */
doc_id_t doc_id, /*!< in: doc id */
- ib_vector_t* fts_indexes __attribute__((unused)));
+ ib_vector_t* fts_indexes MY_ATTRIBUTE((unused)));
/*!< in: affected fts indexes */
#ifdef FTS_DOC_STATS_DEBUG
/****************************************************************//**
@@ -317,7 +317,7 @@ fts_is_word_in_index(
fts_table_t* fts_table, /*!< in: table instance */
const fts_string_t* word, /*!< in: the word to check */
ibool* found) /*!< out: TRUE if exists */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#endif /* FTS_DOC_STATS_DEBUG */
/******************************************************************//**
@@ -332,7 +332,7 @@ fts_update_sync_doc_id(
const char* table_name, /*!< in: table name, or NULL */
doc_id_t doc_id, /*!< in: last document id */
trx_t* trx) /*!< in: update trx, or NULL */
- __attribute__((nonnull(1)));
+ MY_ATTRIBUTE((nonnull(1)));
/****************************************************************//**
This function loads the default InnoDB stopword list */
@@ -1075,13 +1075,12 @@ fts_words_free(
}
}
-/*********************************************************************//**
-Clear cache. */
+/** Clear cache.
+@param[in,out] cache fts cache */
UNIV_INTERN
void
fts_cache_clear(
-/*============*/
- fts_cache_t* cache) /*!< in: cache */
+ fts_cache_t* cache)
{
ulint i;
@@ -1477,7 +1476,7 @@ fts_cache_add_doc(
/****************************************************************//**
Drops a table. If the table can't be found we return a SUCCESS code.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_drop_table(
/*===========*/
@@ -1519,7 +1518,7 @@ fts_drop_table(
/****************************************************************//**
Rename a single auxiliary table due to database name change.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_rename_one_aux_table(
/*=====================*/
@@ -1628,7 +1627,7 @@ Drops the common ancillary tables needed for supporting an FTS index
on the given table. row_mysql_lock_data_dictionary must have been called
before this.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_drop_common_tables(
/*===================*/
@@ -1755,7 +1754,7 @@ Drops FTS ancillary tables needed for supporting an FTS index
on the given table. row_mysql_lock_data_dictionary must have been called
before this.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_drop_all_index_tables(
/*======================*/
@@ -2663,7 +2662,7 @@ fts_get_next_doc_id(
This function fetch the Doc ID from CONFIG table, and compare with
the Doc ID supplied. And store the larger one to the CONFIG table.
@return DB_SUCCESS if OK */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
dberr_t
fts_cmp_set_sync_doc_id(
/*====================*/
@@ -2917,7 +2916,7 @@ fts_add(
/*********************************************************************//**
Do commit-phase steps necessary for the deletion of a row.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_delete(
/*=======*/
@@ -3008,7 +3007,7 @@ fts_delete(
/*********************************************************************//**
Do commit-phase steps necessary for the modification of a row.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_modify(
/*=======*/
@@ -3079,7 +3078,7 @@ fts_create_doc_id(
The given transaction is about to be committed; do whatever is necessary
from the FTS system's POV.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_commit_table(
/*=============*/
@@ -3413,7 +3412,7 @@ fts_add_doc_by_id(
/*==============*/
fts_trx_table_t*ftt, /*!< in: FTS trx table */
doc_id_t doc_id, /*!< in: doc id */
- ib_vector_t* fts_indexes __attribute__((unused)))
+ ib_vector_t* fts_indexes MY_ATTRIBUTE((unused)))
/*!< in: affected fts indexes */
{
mtr_t mtr;
@@ -3533,7 +3532,7 @@ fts_add_doc_by_id(
get_doc, clust_index, doc_pcur, offsets, &doc);
if (doc.found) {
- ibool success __attribute__((unused));
+ ibool success MY_ATTRIBUTE((unused));
btr_pcur_store_position(doc_pcur, &mtr);
mtr_commit(&mtr);
@@ -3642,7 +3641,7 @@ fts_get_max_doc_id(
dict_table_t* table) /*!< in: user table */
{
dict_index_t* index;
- dict_field_t* dfield __attribute__((unused)) = NULL;
+ dict_field_t* dfield MY_ATTRIBUTE((unused)) = NULL;
doc_id_t doc_id = 0;
mtr_t mtr;
btr_pcur_t pcur;
@@ -3900,7 +3899,7 @@ fts_write_node(
/*********************************************************************//**
Add rows to the DELETED_CACHE table.
@return DB_SUCCESS if all went well else error code*/
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_sync_add_deleted_cache(
/*=======================*/
@@ -3954,7 +3953,7 @@ fts_sync_add_deleted_cache(
@param[in] index_cache index cache
@param[in] unlock_cache whether unlock cache when write node
@return DB_SUCCESS if all went well else error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_sync_write_words(
trx_t* trx,
@@ -4090,7 +4089,7 @@ fts_sync_write_words(
/*********************************************************************//**
Write a single documents statistics to disk.
@return DB_SUCCESS if all went well else error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_sync_write_doc_stat(
/*====================*/
@@ -4344,7 +4343,7 @@ fts_sync_begin(
Run SYNC on the table, i.e., write out data from the index specific
cache to the FTS aux INDEX table and FTS aux doc id stats table.
@return DB_SUCCESS if all OK */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_sync_index(
/*===========*/
@@ -4412,7 +4411,7 @@ fts_sync_index_check(
/*********************************************************************//**
Commit the SYNC, change state of processed doc ids etc.
@return DB_SUCCESS if all OK */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_sync_commit(
/*============*/
@@ -4474,13 +4473,12 @@ fts_sync_commit(
return(error);
}
-/*********************************************************************//**
-Rollback a sync operation */
+/** Rollback a sync operation
+@param[in,out] sync sync state */
static
void
fts_sync_rollback(
-/*==============*/
- fts_sync_t* sync) /*!< in: sync state */
+ fts_sync_t* sync)
{
trx_t* trx = sync->trx;
fts_cache_t* cache = sync->table->fts->cache;
@@ -6170,7 +6168,7 @@ fts_update_hex_format_flag(
/*********************************************************************//**
Rename an aux table to HEX format. It's called when "%016llu" is used
to format an object id in table name, which only happens in Windows. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_rename_one_aux_table_to_hex_format(
/*===================================*/
@@ -6261,7 +6259,7 @@ Note the ids in tables are correct but the names are old ambiguous ones.
This function should make sure that either all the parent table and aux tables
are set DICT_TF2_FTS_AUX_HEX_NAME with flags2 or none of them are set */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_rename_aux_tables_to_hex_format_low(
/*====================================*/
@@ -6415,7 +6413,7 @@ fts_fake_hex_to_dec(
{
ib_id_t dec_id = 0;
char tmp_id[FTS_AUX_MIN_TABLE_ID_LENGTH];
- int ret __attribute__((unused));
+ int ret MY_ATTRIBUTE((unused));
ret = sprintf(tmp_id, UINT64PFx, id);
ut_ad(ret == 16);
@@ -6737,7 +6735,7 @@ fts_drop_aux_table_from_vector(
Check and drop all orphaned FTS auxiliary tables, those that don't have
a parent table or FTS index defined on them.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
fts_check_and_drop_orphaned_tables(
/*===============================*/
diff --git a/storage/xtradb/fts/fts0opt.cc b/storage/xtradb/fts/fts0opt.cc
index ccb7090c61d..d9f2532578e 100644
--- a/storage/xtradb/fts/fts0opt.cc
+++ b/storage/xtradb/fts/fts0opt.cc
@@ -797,7 +797,7 @@ fts_zip_deflate_end(
Read the words from the FTS INDEX.
@return DB_SUCCESS if all OK, DB_TABLE_NOT_FOUND if no more indexes
to search else error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_index_fetch_words(
/*==================*/
@@ -1131,7 +1131,7 @@ fts_optimize_lookup(
/**********************************************************************//**
Encode the word pos list into the node
@return DB_SUCCESS or error code*/
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
dberr_t
fts_optimize_encode_node(
/*=====================*/
@@ -1220,7 +1220,7 @@ fts_optimize_encode_node(
/**********************************************************************//**
Optimize the data contained in a node.
@return DB_SUCCESS or error code*/
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
dberr_t
fts_optimize_node(
/*==============*/
@@ -1318,7 +1318,7 @@ test_again:
/**********************************************************************//**
Determine the starting pos within the deleted doc id vector for a word.
@return delete position */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
int
fts_optimize_deleted_pos(
/*=====================*/
@@ -1447,7 +1447,7 @@ fts_optimize_word(
/**********************************************************************//**
Update the FTS index table. This is a delete followed by an insert.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_optimize_write_word(
/*====================*/
@@ -1550,7 +1550,7 @@ fts_word_free(
/**********************************************************************//**
Optimize the word ilist and rewrite data to the FTS index.
@return status one of RESTART, EXIT, ERROR */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_optimize_compact(
/*=================*/
@@ -1645,7 +1645,7 @@ fts_optimize_create(
/**********************************************************************//**
Get optimize start time of an FTS index.
@return DB_SUCCESS if all OK else error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_optimize_get_index_start_time(
/*==============================*/
@@ -1661,7 +1661,7 @@ fts_optimize_get_index_start_time(
/**********************************************************************//**
Set the optimize start time of an FTS index.
@return DB_SUCCESS if all OK else error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_optimize_set_index_start_time(
/*==============================*/
@@ -1677,7 +1677,7 @@ fts_optimize_set_index_start_time(
/**********************************************************************//**
Get optimize end time of an FTS index.
@return DB_SUCCESS if all OK else error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_optimize_get_index_end_time(
/*============================*/
@@ -1692,7 +1692,7 @@ fts_optimize_get_index_end_time(
/**********************************************************************//**
Set the optimize end time of an FTS index.
@return DB_SUCCESS if all OK else error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_optimize_set_index_end_time(
/*============================*/
@@ -1912,7 +1912,7 @@ fts_optimize_set_next_word(
Optimize is complete. Set the completion time, and reset the optimize
start string for this FTS index to "".
@return DB_SUCCESS if all OK */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_optimize_index_completed(
/*=========================*/
@@ -1952,7 +1952,7 @@ fts_optimize_index_completed(
Read the list of words from the FTS auxiliary index that will be
optimized in this pass.
@return DB_SUCCESS if all OK */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_optimize_index_read_words(
/*==========================*/
@@ -2009,7 +2009,7 @@ fts_optimize_index_read_words(
Run OPTIMIZE on the given FTS index. Note: this can take a very long
time (hours).
@return DB_SUCCESS if all OK */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_optimize_index(
/*===============*/
@@ -2080,7 +2080,7 @@ fts_optimize_index(
/**********************************************************************//**
Delete the document ids in the delete, and delete cache tables.
@return DB_SUCCESS if all OK */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_optimize_purge_deleted_doc_ids(
/*===============================*/
@@ -2149,7 +2149,7 @@ fts_optimize_purge_deleted_doc_ids(
/**********************************************************************//**
Delete the document ids in the pending delete, and delete tables.
@return DB_SUCCESS if all OK */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_optimize_purge_deleted_doc_id_snapshot(
/*=======================================*/
@@ -2199,7 +2199,7 @@ Copy the deleted doc ids that will be purged during this optimize run
to the being deleted FTS auxiliary tables. The transaction is committed
upon successfull copy and rolled back on DB_DUPLICATE_KEY error.
@return DB_SUCCESS if all OK */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_optimize_create_deleted_doc_id_snapshot(
/*========================================*/
@@ -2237,7 +2237,7 @@ fts_optimize_create_deleted_doc_id_snapshot(
Read in the document ids that are to be purged during optimize. The
transaction is committed upon successfully read.
@return DB_SUCCESS if all OK */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_optimize_read_deleted_doc_id_snapshot(
/*======================================*/
@@ -2274,7 +2274,7 @@ Optimze all the FTS indexes, skipping those that have already been
optimized, since the FTS auxiliary indexes are not guaranteed to be
of the same cardinality.
@return DB_SUCCESS if all OK */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_optimize_indexes(
/*=================*/
@@ -2344,7 +2344,7 @@ fts_optimize_indexes(
/*********************************************************************//**
Cleanup the snapshot tables and the master deleted table.
@return DB_SUCCESS if all OK */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_optimize_purge_snapshot(
/*========================*/
@@ -2373,7 +2373,7 @@ fts_optimize_purge_snapshot(
/*********************************************************************//**
Reset the start time to 0 so that a new optimize can be started.
@return DB_SUCCESS if all OK */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_optimize_reset_start_time(
/*==========================*/
@@ -2412,7 +2412,7 @@ fts_optimize_reset_start_time(
/*********************************************************************//**
Run OPTIMIZE on the given table by a background thread.
@return DB_SUCCESS if all OK */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
dberr_t
fts_optimize_table_bk(
/*==================*/
@@ -2757,6 +2757,7 @@ fts_optimize_new_table(
empty_slot = i;
} else if (slot->table->id == table->id) {
/* Already exists in our optimize queue. */
+ ut_ad(slot->table_id = table->id);
return(FALSE);
}
}
@@ -2974,6 +2975,13 @@ fts_optimize_sync_table(
{
dict_table_t* table = NULL;
+ /* Prevent DROP INDEX etc. from running when we are syncing
+ cache in background. */
+ if (!rw_lock_s_lock_nowait(&dict_operation_lock, __FILE__, __LINE__)) {
+ /* Exit when fail to get dict operation lock. */
+ return;
+ }
+
table = dict_table_open_on_id(table_id, FALSE, DICT_TABLE_OP_NORMAL);
if (table) {
@@ -2983,6 +2991,8 @@ fts_optimize_sync_table(
dict_table_close(table, FALSE, FALSE);
}
+
+ rw_lock_s_unlock(&dict_operation_lock);
}
/**********************************************************************//**
diff --git a/storage/xtradb/fts/fts0que.cc b/storage/xtradb/fts/fts0que.cc
index 66060439215..2e335c1c255 100644
--- a/storage/xtradb/fts/fts0que.cc
+++ b/storage/xtradb/fts/fts0que.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2007, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2007, 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
@@ -287,7 +287,7 @@ fts_expand_query(
dict_index_t* index, /*!< in: FTS index to search */
fts_query_t* query) /*!< in: query result, to be freed
by the client */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*************************************************************//**
This function finds documents that contain all words in a
phrase or proximity search. And if proximity search, verify
@@ -1128,7 +1128,7 @@ cont_search:
/*****************************************************************//**
Set difference.
@return DB_SUCCESS if all go well */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_query_difference(
/*=================*/
@@ -1220,7 +1220,7 @@ fts_query_difference(
/*****************************************************************//**
Intersect the token doc ids with the current set.
@return DB_SUCCESS if all go well */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_query_intersect(
/*================*/
@@ -1398,7 +1398,7 @@ fts_query_cache(
/*****************************************************************//**
Set union.
@return DB_SUCCESS if all go well */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_query_union(
/*============*/
@@ -2015,7 +2015,7 @@ fts_query_select(
Read the rows from the FTS index, that match word and where the
doc id is between first and last doc id.
@return DB_SUCCESS if all go well else error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_query_find_term(
/*================*/
@@ -2155,7 +2155,7 @@ fts_query_sum(
/********************************************************************
Calculate the total documents that contain a particular word (term).
@return DB_SUCCESS if all go well else error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_query_total_docs_containing_term(
/*=================================*/
@@ -2234,7 +2234,7 @@ fts_query_total_docs_containing_term(
/********************************************************************
Get the total number of words in a documents.
@return DB_SUCCESS if all go well else error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_query_terms_in_document(
/*========================*/
@@ -2315,7 +2315,7 @@ fts_query_terms_in_document(
/*****************************************************************//**
Retrieve the document and match the phrase tokens.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_query_match_document(
/*=====================*/
@@ -2361,7 +2361,7 @@ fts_query_match_document(
This function fetches the original documents and count the
words in between matching words to see that is in specified distance
@return DB_SUCCESS if all OK */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
fts_query_is_in_proximity_range(
/*============================*/
@@ -2416,7 +2416,7 @@ fts_query_is_in_proximity_range(
Iterate over the matched document ids and search the for the
actual phrase in the text.
@return DB_SUCCESS if all OK */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_query_search_phrase(
/*====================*/
@@ -2504,7 +2504,7 @@ func_exit:
/*****************************************************************//**
Text/Phrase search.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_query_phrase_search(
/*====================*/
@@ -2755,7 +2755,7 @@ func_exit:
/*****************************************************************//**
Find the word and evaluate.
@return DB_SUCCESS if all go well */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_query_execute(
/*==============*/
@@ -4124,7 +4124,7 @@ words in documents found in the first search pass will be used as
search arguments to search the document again, thus "expand"
the search result set.
@return DB_SUCCESS if success, otherwise the error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
fts_expand_query(
/*=============*/
diff --git a/storage/xtradb/fts/fts0tlex.cc b/storage/xtradb/fts/fts0tlex.cc
index b744fbf0763..d4d9b4c48d1 100644
--- a/storage/xtradb/fts/fts0tlex.cc
+++ b/storage/xtradb/fts/fts0tlex.cc
@@ -305,9 +305,9 @@ YY_BUFFER_STATE fts0t_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner
YY_BUFFER_STATE fts0t_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
YY_BUFFER_STATE fts0t_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
-void *fts0talloc (yy_size_t , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) );
-void *fts0trealloc (void *,yy_size_t , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) );
-void fts0tfree (void * , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) );
+void *fts0talloc (yy_size_t , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
+void *fts0trealloc (void *,yy_size_t , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
+void fts0tfree (void * , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
#define yy_new_buffer fts0t_create_buffer
@@ -347,7 +347,7 @@ typedef int yy_state_type;
static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
static int yy_get_next_buffer (yyscan_t yyscanner );
-static void yy_fatal_error (yyconst char msg[] , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) );
+static void yy_fatal_error (yyconst char msg[] , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) );
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
@@ -447,7 +447,7 @@ static yyconst flex_int16_t yy_chk[29] =
#line 1 "fts0tlex.l"
/*****************************************************************************
-Copyright (c) 2007, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2007, 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
@@ -575,11 +575,11 @@ extern int fts0twrap (yyscan_t yyscanner );
#endif
#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)));
+static void yy_flex_strncpy (char *,yyconst char *,int , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)));
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)));
+static int yy_flex_strlen (yyconst char * , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)));
#endif
#ifndef YY_NO_INPUT
@@ -1602,7 +1602,7 @@ YY_BUFFER_STATE fts0t_scan_bytes (yyconst char * yybytes, int _yybytes_len , y
#define YY_EXIT_FAILURE 2
#endif
-static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
+static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
{
(void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
@@ -1903,7 +1903,7 @@ int fts0tlex_destroy (yyscan_t yyscanner)
*/
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
{
register int i;
for ( i = 0; i < n; ++i )
@@ -1912,7 +1912,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yys
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
+static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
{
register int n;
for ( n = 0; s[n]; ++n )
@@ -1922,12 +1922,12 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner __at
}
#endif
-void *fts0talloc (yy_size_t size , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
+void *fts0talloc (yy_size_t size , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
{
return (void *) malloc( size );
}
-void *fts0trealloc (void * ptr, yy_size_t size , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
+void *fts0trealloc (void * ptr, yy_size_t size , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
{
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
@@ -1939,7 +1939,7 @@ void *fts0trealloc (void * ptr, yy_size_t size , yyscan_t yyscanner
return (void *) realloc( (char *) ptr, size );
}
-void fts0tfree (void * ptr , yyscan_t yyscanner __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)) __attribute__((unused)))
+void fts0tfree (void * ptr , yyscan_t yyscanner MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)) MY_ATTRIBUTE((unused)))
{
free( (char *) ptr ); /* see fts0trealloc() for (char *) cast */
}
diff --git a/storage/xtradb/fts/make_parser.sh b/storage/xtradb/fts/make_parser.sh
index 2c072914c8b..52b63eff674 100755
--- a/storage/xtradb/fts/make_parser.sh
+++ b/storage/xtradb/fts/make_parser.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All Rights Reserved.
+# Copyright (c) 2007, 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
@@ -22,15 +22,15 @@ make -f Makefile.query
echo '#include "univ.i"' > $TMPF
# This is to avoid compiler warning about unused parameters.
-# FIXME: gcc extension "__attribute__" causing compilation errors on windows
+# FIXME: gcc extension "MY_ATTRIBUTE" causing compilation errors on windows
# platform. Quote them out for now.
sed -e '
-s/^\(static.*void.*yy_fatal_error.*msg.*,\)\(.*yyscanner\)/\1 \2 __attribute__((unused))/;
-s/^\(static.*void.*yy_flex_strncpy.*n.*,\)\(.*yyscanner\)/\1 \2 __attribute__((unused))/;
-s/^\(static.*int.*yy_flex_strlen.*s.*,\)\(.*yyscanner\)/\1 \2 __attribute__((unused))/;
-s/^\(\(static\|void\).*fts0[bt]alloc.*,\)\(.*yyscanner\)/\1 \3 __attribute__((unused))/;
-s/^\(\(static\|void\).*fts0[bt]realloc.*,\)\(.*yyscanner\)/\1 \3 __attribute__((unused))/;
-s/^\(\(static\|void\).*fts0[bt]free.*,\)\(.*yyscanner\)/\1 \3 __attribute__((unused))/;
+s/^\(static.*void.*yy_fatal_error.*msg.*,\)\(.*yyscanner\)/\1 \2 MY_ATTRIBUTE((unused))/;
+s/^\(static.*void.*yy_flex_strncpy.*n.*,\)\(.*yyscanner\)/\1 \2 MY_ATTRIBUTE((unused))/;
+s/^\(static.*int.*yy_flex_strlen.*s.*,\)\(.*yyscanner\)/\1 \2 MY_ATTRIBUTE((unused))/;
+s/^\(\(static\|void\).*fts0[bt]alloc.*,\)\(.*yyscanner\)/\1 \3 MY_ATTRIBUTE((unused))/;
+s/^\(\(static\|void\).*fts0[bt]realloc.*,\)\(.*yyscanner\)/\1 \3 MY_ATTRIBUTE((unused))/;
+s/^\(\(static\|void\).*fts0[bt]free.*,\)\(.*yyscanner\)/\1 \3 MY_ATTRIBUTE((unused))/;
' < fts0blex.cc >> $TMPF
mv $TMPF fts0blex.cc
@@ -38,12 +38,12 @@ mv $TMPF fts0blex.cc
echo '#include "univ.i"' > $TMPF
sed -e '
-s/^\(static.*void.*yy_fatal_error.*msg.*,\)\(.*yyscanner\)/\1 \2 __attribute__((unused))/;
-s/^\(static.*void.*yy_flex_strncpy.*n.*,\)\(.*yyscanner\)/\1 \2 __attribute__((unused))/;
-s/^\(static.*int.*yy_flex_strlen.*s.*,\)\(.*yyscanner\)/\1 \2 __attribute__((unused))/;
-s/^\(\(static\|void\).*fts0[bt]alloc.*,\)\(.*yyscanner\)/\1 \3 __attribute__((unused))/;
-s/^\(\(static\|void\).*fts0[bt]realloc.*,\)\(.*yyscanner\)/\1 \3 __attribute__((unused))/;
-s/^\(\(static\|void\).*fts0[bt]free.*,\)\(.*yyscanner\)/\1 \3 __attribute__((unused))/;
+s/^\(static.*void.*yy_fatal_error.*msg.*,\)\(.*yyscanner\)/\1 \2 MY_ATTRIBUTE((unused))/;
+s/^\(static.*void.*yy_flex_strncpy.*n.*,\)\(.*yyscanner\)/\1 \2 MY_ATTRIBUTE((unused))/;
+s/^\(static.*int.*yy_flex_strlen.*s.*,\)\(.*yyscanner\)/\1 \2 MY_ATTRIBUTE((unused))/;
+s/^\(\(static\|void\).*fts0[bt]alloc.*,\)\(.*yyscanner\)/\1 \3 MY_ATTRIBUTE((unused))/;
+s/^\(\(static\|void\).*fts0[bt]realloc.*,\)\(.*yyscanner\)/\1 \3 MY_ATTRIBUTE((unused))/;
+s/^\(\(static\|void\).*fts0[bt]free.*,\)\(.*yyscanner\)/\1 \3 MY_ATTRIBUTE((unused))/;
' < fts0tlex.cc >> $TMPF
mv $TMPF fts0tlex.cc
diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc
index d5b2811fc7f..ca1eb76cbda 100644
--- a/storage/xtradb/handler/ha_innodb.cc
+++ b/storage/xtradb/handler/ha_innodb.cc
@@ -2045,7 +2045,7 @@ thd_flush_log_at_trx_commit(
/********************************************************************//**
Obtain the InnoDB transaction of a MySQL thread.
@return reference to transaction pointer */
-__attribute__((warn_unused_result, nonnull))
+MY_ATTRIBUTE((warn_unused_result, nonnull))
static inline
trx_t*&
thd_to_trx(
@@ -2081,8 +2081,8 @@ static
int
innobase_release_temporary_latches(
/*===============================*/
- handlerton* hton __attribute__((unused)), /*!< in: handlerton */
- THD* thd __attribute__((unused))) /*!< in: MySQL thread */
+ handlerton* hton MY_ATTRIBUTE((unused)), /*!< in: handlerton */
+ THD* thd MY_ATTRIBUTE((unused))) /*!< in: MySQL thread */
{
#ifdef UNIV_DEBUG
DBUG_ASSERT(hton == innodb_hton_ptr);
@@ -4455,7 +4455,7 @@ int
innobase_end(
/*=========*/
handlerton* hton, /*!< in/out: InnoDB handlerton */
- ha_panic_function type __attribute__((unused)))
+ ha_panic_function type MY_ATTRIBUTE((unused)))
/*!< in: ha_panic() parameter */
{
int err= 0;
@@ -4550,7 +4550,7 @@ static
my_bool
innobase_is_fake_change(
/*====================*/
- handlerton *hton __attribute__((unused)),
+ handlerton *hton MY_ATTRIBUTE((unused)),
/*!< in: InnoDB handlerton */
THD* thd) /*!< in: MySQL thread handle of the user for
whom the transaction is being committed */
@@ -11247,7 +11247,7 @@ create_table_check_doc_id_col(
/*****************************************************************//**
Creates a table definition to an InnoDB database. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
int
create_table_def(
/*=============*/
@@ -12931,6 +12931,25 @@ ha_innobase::discard_or_import_tablespace(
/* Commit the transaction in order to release the table lock. */
trx_commit_for_mysql(prebuilt->trx);
+ if (err == DB_SUCCESS && !discard
+ && dict_stats_is_persistent_enabled(dict_table)) {
+ dberr_t ret;
+
+ /* Adjust the persistent statistics. */
+ ret = dict_stats_update(dict_table,
+ DICT_STATS_RECALC_PERSISTENT);
+
+ if (ret != DB_SUCCESS) {
+ push_warning_printf(
+ ha_thd(),
+ Sql_condition::WARN_LEVEL_WARN,
+ ER_ALTER_INFO,
+ "Error updating stats for table '%s'"
+ " after table rebuild: %s",
+ dict_table->name, ut_strerr(ret));
+ }
+ }
+
DBUG_RETURN(convert_error_code_to_mysql(err, dict_table->flags, NULL));
}
@@ -13315,7 +13334,7 @@ innobase_drop_database(
/*********************************************************************//**
Renames an InnoDB table.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
innobase_rename_table(
/*==================*/
@@ -16239,7 +16258,7 @@ ha_innobase::store_lock(
/* Use consistent read for checksum table */
if (sql_command == SQLCOM_CHECKSUM
- || sql_command == SQLCOM_CHECKSUM
+ || (sql_command == SQLCOM_ANALYZE && lock_type == TL_READ)
|| ((srv_locks_unsafe_for_binlog
|| trx->isolation_level <= TRX_ISO_READ_COMMITTED)
&& trx->isolation_level != TRX_ISO_SERIALIZABLE
@@ -18447,7 +18466,7 @@ static char* srv_buffer_pool_evict;
Evict all uncompressed pages of compressed tables from the buffer pool.
Keep the compressed pages in the buffer pool.
@return whether all uncompressed pages were evicted */
-static __attribute__((warn_unused_result))
+static MY_ATTRIBUTE((warn_unused_result))
bool
innodb_buffer_pool_evict_uncompressed(void)
/*=======================================*/
@@ -19070,13 +19089,13 @@ void
purge_run_now_set(
/*==============*/
THD* thd /*!< in: thread handle */
- __attribute__((unused)),
+ MY_ATTRIBUTE((unused)),
struct st_mysql_sys_var* var /*!< in: pointer to system
variable */
- __attribute__((unused)),
+ MY_ATTRIBUTE((unused)),
void* var_ptr /*!< out: where the formal
string goes */
- __attribute__((unused)),
+ MY_ATTRIBUTE((unused)),
const void* save) /*!< in: immediate result from
check function */
{
@@ -19093,13 +19112,13 @@ void
purge_stop_now_set(
/*===============*/
THD* thd /*!< in: thread handle */
- __attribute__((unused)),
+ MY_ATTRIBUTE((unused)),
struct st_mysql_sys_var* var /*!< in: pointer to system
variable */
- __attribute__((unused)),
+ MY_ATTRIBUTE((unused)),
void* var_ptr /*!< out: where the formal
string goes */
- __attribute__((unused)),
+ MY_ATTRIBUTE((unused)),
const void* save) /*!< in: immediate result from
check function */
{
@@ -19115,13 +19134,13 @@ void
checkpoint_now_set(
/*===============*/
THD* thd /*!< in: thread handle */
- __attribute__((unused)),
+ MY_ATTRIBUTE((unused)),
struct st_mysql_sys_var* var /*!< in: pointer to system
variable */
- __attribute__((unused)),
+ MY_ATTRIBUTE((unused)),
void* var_ptr /*!< out: where the formal
string goes */
- __attribute__((unused)),
+ MY_ATTRIBUTE((unused)),
const void* save) /*!< in: immediate result from
check function */
{
@@ -19142,13 +19161,13 @@ void
buf_flush_list_now_set(
/*===================*/
THD* thd /*!< in: thread handle */
- __attribute__((unused)),
+ MY_ATTRIBUTE((unused)),
struct st_mysql_sys_var* var /*!< in: pointer to system
- variable */
- __attribute__((unused)),
+ variable */
+ MY_ATTRIBUTE((unused)),
void* var_ptr /*!< out: where the formal
- string goes */
- __attribute__((unused)),
+ string goes */
+ MY_ATTRIBUTE((unused)),
const void* save) /*!< in: immediate result from
check function */
{
@@ -19165,13 +19184,13 @@ void
track_redo_log_now_set(
/*===================*/
THD* thd /*!< in: thread handle */
- __attribute__((unused)),
+ MY_ATTRIBUTE((unused)),
struct st_mysql_sys_var* var /*!< in: pointer to system
variable */
- __attribute__((unused)),
+ MY_ATTRIBUTE((unused)),
void* var_ptr /*!< out: where the formal
string goes */
- __attribute__((unused)),
+ MY_ATTRIBUTE((unused)),
const void* save) /*!< in: immediate result from
check function */
{
@@ -19280,13 +19299,13 @@ void
buffer_pool_dump_now(
/*=================*/
THD* thd /*!< in: thread handle */
- __attribute__((unused)),
+ MY_ATTRIBUTE((unused)),
struct st_mysql_sys_var* var /*!< in: pointer to system
variable */
- __attribute__((unused)),
+ MY_ATTRIBUTE((unused)),
void* var_ptr /*!< out: where the formal
string goes */
- __attribute__((unused)),
+ MY_ATTRIBUTE((unused)),
const void* save) /*!< in: immediate result from
check function */
{
@@ -21456,7 +21475,7 @@ maria_declare_plugin(xtradb)
innodb_status_variables_export,/* status variables */
innobase_system_variables, /* system variables */
INNODB_VERSION_STR, /* string version */
- MariaDB_PLUGIN_MATURITY_GAMMA /* maturity */
+ MariaDB_PLUGIN_MATURITY_STABLE /* maturity */
},
i_s_xtradb_read_view,
i_s_xtradb_internal_hash_tables,
diff --git a/storage/xtradb/handler/ha_innodb.h b/storage/xtradb/handler/ha_innodb.h
index ea4be1fb2e0..7b0d20aec72 100644
--- a/storage/xtradb/handler/ha_innodb.h
+++ b/storage/xtradb/handler/ha_innodb.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2000, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2000, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2013, 2016, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
@@ -466,7 +466,7 @@ enum durability_properties thd_get_durability_property(const MYSQL_THD thd);
@return True if sql_mode has strict mode (all or trans), false otherwise.
*/
bool thd_is_strict_mode(const MYSQL_THD thd)
-__attribute__((nonnull));
+MY_ATTRIBUTE((nonnull));
} /* extern "C" */
/** Get the file name and position of the MySQL binlog corresponding to the
@@ -528,7 +528,7 @@ innobase_index_name_is_reserved(
const KEY* key_info, /*!< in: Indexes to be created */
ulint num_of_keys) /*!< in: Number of indexes to
be created. */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*****************************************************************//**
#ifdef WITH_WSREP
@@ -548,7 +548,7 @@ innobase_table_flags(
outside system tablespace */
ulint* flags, /*!< out: DICT_TF flags */
ulint* flags2) /*!< out: DICT_TF2 flags */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*****************************************************************//**
Validates the create options. We may build on this function
@@ -565,7 +565,7 @@ create_options_are_invalid(
columns and indexes */
HA_CREATE_INFO* create_info, /*!< in: create info. */
bool use_tablespace) /*!< in: srv_file_per_table */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Retrieve the FTS Relevance Ranking result for doc with doc_id
@@ -595,7 +595,7 @@ void
innobase_fts_close_ranking(
/*=======================*/
FT_INFO* fts_hdl) /*!< in: FTS handler */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*****************************************************************//**
Initialize the table FTS stopword list
@return TRUE if success */
@@ -606,7 +606,7 @@ innobase_fts_load_stopword(
dict_table_t* table, /*!< in: Table has the FTS */
trx_t* trx, /*!< in: transaction */
THD* thd) /*!< in: current thread */
- __attribute__((nonnull(1,3), warn_unused_result));
+ MY_ATTRIBUTE((nonnull(1,3), warn_unused_result));
/** Some defines for innobase_fts_check_doc_id_index() return value */
enum fts_doc_id_index_enum {
@@ -628,7 +628,7 @@ innobase_fts_check_doc_id_index(
that is being altered */
ulint* fts_doc_col_no) /*!< out: The column number for
Doc ID */
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
/*******************************************************************//**
Check whether the table has a unique index with FTS_DOC_ID_INDEX_NAME
@@ -641,7 +641,7 @@ innobase_fts_check_doc_id_index_in_def(
/*===================================*/
ulint n_key, /*!< in: Number of keys */
const KEY* key_info) /*!< in: Key definitions */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/***********************************************************************
@return version of the extended FTS API */
diff --git a/storage/xtradb/handler/handler0alter.cc b/storage/xtradb/handler/handler0alter.cc
index 5724d9fe8ff..1ce5595865a 100644
--- a/storage/xtradb/handler/handler0alter.cc
+++ b/storage/xtradb/handler/handler0alter.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
-Copyright (c) 2005, 2015, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2013, 2015, MariaDB Corporation. All Rights Reserved.
+Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2013, 2016, MariaDB Corporation. 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
@@ -105,7 +105,7 @@ static const Alter_inplace_info::HA_ALTER_FLAGS INNOBASE_ALTER_NOREBUILD
| Alter_inplace_info::ALTER_COLUMN_NAME;
/* Report an InnoDB error to the client by invoking my_error(). */
-static UNIV_COLD __attribute__((nonnull))
+static UNIV_COLD MY_ATTRIBUTE((nonnull))
void
my_error_innodb(
/*============*/
@@ -207,7 +207,7 @@ Determine if ALTER TABLE needs to rebuild the table.
@param ha_alter_info the DDL operation
@param altered_table MySQL original table
@return whether it is necessary to rebuild the table */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
innobase_need_rebuild(
/*==================*/
@@ -234,7 +234,7 @@ innobase_need_rebuild(
& Alter_inplace_info::ADD_INDEX) ||
(ha_alter_info->handler_flags
& Alter_inplace_info::ADD_FOREIGN_KEY))) {
- for (ulint i = 0; i < ha_alter_info->key_count; i++) {
+ for (ulint i = 0; i < ha_alter_info->index_add_count; i++) {
const KEY* key = &ha_alter_info->key_info_buffer[
ha_alter_info->index_add_buffer[i]];
@@ -245,13 +245,13 @@ innobase_need_rebuild(
/* Field used on added index is renamed on
this same alter table. We need table
rebuild. */
- if (field->flags & FIELD_IS_RENAMED) {
+ if (field && field->flags & FIELD_IS_RENAMED) {
return (true);
}
}
}
}
-
+
return(!!(ha_alter_info->handler_flags & INNOBASE_ALTER_REBUILD));
}
@@ -651,7 +651,7 @@ ha_innobase::check_if_supported_inplace_alter(
/*************************************************************//**
Initialize the dict_foreign_t structure with supplied info
@return true if added, false if duplicate foreign->id */
-static __attribute__((nonnull(1,3,5,7)))
+static MY_ATTRIBUTE((nonnull(1,3,5,7)))
bool
innobase_init_foreign(
/*==================*/
@@ -740,7 +740,7 @@ innobase_init_foreign(
/*************************************************************//**
Check whether the foreign key options is legit
@return true if it is */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
innobase_check_fk_option(
/*=====================*/
@@ -772,7 +772,7 @@ innobase_check_fk_option(
/*************************************************************//**
Set foreign key options
@return true if successfully set */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
innobase_set_foreign_key_option(
/*============================*/
@@ -817,7 +817,7 @@ innobase_set_foreign_key_option(
Check if a foreign key constraint can make use of an index
that is being created.
@return useable index, or NULL if none found */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
const KEY*
innobase_find_equiv_index(
/*======================*/
@@ -873,7 +873,7 @@ no_match:
Find an index whose first fields are the columns in the array
in the same order and is not marked for deletion
@return matching index, NULL if not found */
-static __attribute__((nonnull(1,2,6), warn_unused_result))
+static MY_ATTRIBUTE((nonnull(1,2,6), warn_unused_result))
dict_index_t*
innobase_find_fk_index(
/*===================*/
@@ -920,7 +920,7 @@ next_rec:
Create InnoDB foreign key structure from MySQL alter_info
@retval true if successful
@retval false on error (will call my_error()) */
-static __attribute__((nonnull(1,2,3,7,8), warn_unused_result))
+static MY_ATTRIBUTE((nonnull(1,2,3,7,8), warn_unused_result))
bool
innobase_get_foreign_key_info(
/*==========================*/
@@ -1128,9 +1128,9 @@ innobase_get_foreign_key_info(
referenced_column_names, referenced_num_col)) {
mutex_exit(&dict_sys->mutex);
my_error(
- ER_FK_DUP_NAME,
+ ER_DUP_CONSTRAINT_NAME,
MYF(0),
- add_fk[num_fk]->id);
+ "FOREIGN KEY", add_fk[num_fk]->id);
goto err_exit;
}
@@ -1419,7 +1419,7 @@ innobase_rec_reset(
/*******************************************************************//**
This function checks that index keys are sensible.
@return 0 or error number */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
int
innobase_check_index_keys(
/*======================*/
@@ -1540,7 +1540,7 @@ name_ok:
/*******************************************************************//**
Create index field definition for key part */
-static __attribute__((nonnull(2,3)))
+static MY_ATTRIBUTE((nonnull(2,3)))
void
innobase_create_index_field_def(
/*============================*/
@@ -1589,7 +1589,7 @@ innobase_create_index_field_def(
/*******************************************************************//**
Create index definition for key */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
innobase_create_index_def(
/*======================*/
@@ -1880,7 +1880,7 @@ ELSE
ENDIF
@return key definitions */
-static __attribute__((nonnull, warn_unused_result, malloc))
+static MY_ATTRIBUTE((nonnull, warn_unused_result, malloc))
index_def_t*
innobase_create_key_defs(
/*=====================*/
@@ -2104,7 +2104,7 @@ created_clustered:
/*******************************************************************//**
Check each index column size, make sure they do not exceed the max limit
@return true if index column size exceeds limit */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
innobase_check_column_length(
/*=========================*/
@@ -2254,7 +2254,7 @@ online_retry_drop_indexes_low(
/********************************************************************//**
Drop any indexes that we were not able to free previously due to
open table handles. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
online_retry_drop_indexes(
/*======================*/
@@ -2284,7 +2284,7 @@ online_retry_drop_indexes(
/********************************************************************//**
Commit a dictionary transaction and drop any indexes that we were not
able to free previously due to open table handles. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
online_retry_drop_indexes_with_trx(
/*===============================*/
@@ -2313,7 +2313,7 @@ online_retry_drop_indexes_with_trx(
@param drop_fk constraints being dropped
@param n_drop_fk number of constraints that are being dropped
@return whether the constraint is being dropped */
-inline __attribute__((pure, nonnull, warn_unused_result))
+inline MY_ATTRIBUTE((pure, nonnull, warn_unused_result))
bool
innobase_dropping_foreign(
/*======================*/
@@ -2340,7 +2340,7 @@ column that is being dropped or modified to NOT NULL.
@retval true Not allowed (will call my_error())
@retval false Allowed
*/
-static __attribute__((pure, nonnull, warn_unused_result))
+static MY_ATTRIBUTE((pure, nonnull, warn_unused_result))
bool
innobase_check_foreigns_low(
/*========================*/
@@ -2440,7 +2440,7 @@ column that is being dropped or modified to NOT NULL.
@retval true Not allowed (will call my_error())
@retval false Allowed
*/
-static __attribute__((pure, nonnull, warn_unused_result))
+static MY_ATTRIBUTE((pure, nonnull, warn_unused_result))
bool
innobase_check_foreigns(
/*====================*/
@@ -2485,7 +2485,7 @@ innobase_check_foreigns(
@param dfield InnoDB data field to copy to
@param field MySQL value for the column
@param comp nonzero if in compact format */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
innobase_build_col_map_add(
/*=======================*/
@@ -2519,7 +2519,7 @@ adding columns.
@param heap Memory heap where allocated
@return array of integers, mapping column numbers in the table
to column numbers in altered_table */
-static __attribute__((nonnull(1,2,3,4,5,7), warn_unused_result))
+static MY_ATTRIBUTE((nonnull(1,2,3,4,5,7), warn_unused_result))
const ulint*
innobase_build_col_map(
/*===================*/
@@ -2669,7 +2669,7 @@ innobase_drop_fts_index_table(
@param user_table InnoDB table as it is before the ALTER operation
@param heap Memory heap for the allocation
@return array of new column names in rebuilt_table, or NULL if not renamed */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
const char**
innobase_get_col_names(
Alter_inplace_info* ha_alter_info,
@@ -2732,7 +2732,7 @@ while preparing ALTER TABLE.
@retval true Failure
@retval false Success
*/
-static __attribute__((warn_unused_result, nonnull(1,2,3,4)))
+static MY_ATTRIBUTE((warn_unused_result, nonnull(1,2,3,4)))
bool
prepare_inplace_alter_table_dict(
/*=============================*/
@@ -3392,7 +3392,7 @@ err_exit:
/* Check whether an index is needed for the foreign key constraint.
If so, if it is dropped, is there an equivalent index can play its role.
@return true if the index is needed and can't be dropped */
-static __attribute__((nonnull(1,2,3,5), warn_unused_result))
+static MY_ATTRIBUTE((nonnull(1,2,3,5), warn_unused_result))
bool
innobase_check_foreign_key_index(
/*=============================*/
@@ -4328,7 +4328,7 @@ temparary index prefix
@param locked TRUE=table locked, FALSE=may need to do a lazy drop
@param trx the transaction
*/
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
innobase_rollback_sec_index(
/*========================*/
@@ -4362,7 +4362,7 @@ during prepare, but might not be during commit).
@retval true Failure
@retval false Success
*/
-inline __attribute__((nonnull, warn_unused_result))
+inline MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
rollback_inplace_alter_table(
/*=========================*/
@@ -4494,7 +4494,7 @@ func_exit:
@param foreign_id Foreign key constraint identifier
@retval true Failure
@retval false Success */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
innobase_drop_foreign_try(
/*======================*/
@@ -4551,7 +4551,7 @@ innobase_drop_foreign_try(
@param new_clustered whether the table has been rebuilt
@retval true Failure
@retval false Success */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
innobase_rename_column_try(
/*=======================*/
@@ -4760,7 +4760,7 @@ rename_foreign:
@param table_name Table name in MySQL
@retval true Failure
@retval false Success */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
innobase_rename_columns_try(
/*========================*/
@@ -4810,7 +4810,7 @@ as part of commit_cache_norebuild().
@param ha_alter_info Data used during in-place alter.
@param table the TABLE
@param user_table InnoDB table that was being altered */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
innobase_rename_columns_cache(
/*==========================*/
@@ -4854,7 +4854,7 @@ processed_field:
@param altered_table MySQL table that is being altered
@param old_table MySQL table as it is before the ALTER operation
@return the next auto-increment value (0 if not present) */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
ulonglong
commit_get_autoinc(
/*===============*/
@@ -4938,7 +4938,7 @@ but do not touch the data dictionary cache.
@retval true Failure
@retval false Success
*/
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
innobase_update_foreign_try(
/*========================*/
@@ -5022,7 +5022,7 @@ after the changes to data dictionary tables were committed.
@param ctx In-place ALTER TABLE context
@param user_thd MySQL connection
@return InnoDB error code (should always be DB_SUCCESS) */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
innobase_update_foreign_cache(
/*==========================*/
@@ -5107,7 +5107,7 @@ when rebuilding the table.
@retval true Failure
@retval false Success
*/
-inline __attribute__((nonnull, warn_unused_result))
+inline MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
commit_try_rebuild(
/*===============*/
@@ -5269,7 +5269,7 @@ commit_try_rebuild(
/** Apply the changes made during commit_try_rebuild(),
to the data dictionary cache and the file system.
@param ctx In-place ALTER TABLE context */
-inline __attribute__((nonnull))
+inline MY_ATTRIBUTE((nonnull))
void
commit_cache_rebuild(
/*=================*/
@@ -5366,7 +5366,7 @@ when not rebuilding the table.
@retval true Failure
@retval false Success
*/
-inline __attribute__((nonnull, warn_unused_result))
+inline MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
commit_try_norebuild(
/*=================*/
@@ -5476,7 +5476,7 @@ after a successful commit_try_norebuild() call.
@param trx Data dictionary transaction object
(will be started and committed)
@return whether all replacements were found for dropped indexes */
-inline __attribute__((nonnull, warn_unused_result))
+inline MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
commit_cache_norebuild(
/*===================*/
diff --git a/storage/xtradb/handler/i_s.cc b/storage/xtradb/handler/i_s.cc
index a131a50458a..d0e26f1352c 100644
--- a/storage/xtradb/handler/i_s.cc
+++ b/storage/xtradb/handler/i_s.cc
@@ -792,7 +792,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_trx =
/* struct st_mysql_sys_var** */
STRUCT_FLD(system_vars, NULL),
- INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_GAMMA
+ INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_STABLE
};
/* Fields of the dynamic table INFORMATION_SCHEMA.innodb_locks */
@@ -1050,7 +1050,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_locks =
/* struct st_mysql_sys_var** */
STRUCT_FLD(system_vars, NULL),
- INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_GAMMA
+ INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_STABLE
};
/* Fields of the dynamic table INFORMATION_SCHEMA.innodb_lock_waits */
@@ -1231,7 +1231,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_lock_waits =
/* struct st_mysql_sys_var** */
STRUCT_FLD(system_vars, NULL),
- INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_GAMMA
+ INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_STABLE
};
/*******************************************************************//**
@@ -1565,7 +1565,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_cmp =
/* struct st_mysql_sys_var** */
STRUCT_FLD(system_vars, NULL),
- INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_GAMMA
+ INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_STABLE
};
UNIV_INTERN struct st_maria_plugin i_s_innodb_cmp_reset =
@@ -1613,7 +1613,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_cmp_reset =
/* struct st_mysql_sys_var** */
STRUCT_FLD(system_vars, NULL),
- INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_GAMMA
+ INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_STABLE
};
/* Fields of the dynamic tables
@@ -1912,7 +1912,7 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_cmp_per_index =
STRUCT_FLD(system_vars, NULL),
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
UNIV_INTERN struct st_mysql_plugin i_s_innodb_cmp_per_index_reset =
@@ -1961,7 +1961,7 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_cmp_per_index_reset =
STRUCT_FLD(system_vars, NULL),
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/* Fields of the dynamic table information_schema.innodb_cmpmem. */
@@ -2203,7 +2203,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_cmpmem =
/* struct st_mysql_sys_var** */
STRUCT_FLD(system_vars, NULL),
- INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_GAMMA
+ INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_STABLE
};
UNIV_INTERN struct st_maria_plugin i_s_innodb_cmpmem_reset =
@@ -2251,7 +2251,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_cmpmem_reset =
/* struct st_mysql_sys_var** */
STRUCT_FLD(system_vars, NULL),
- INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_GAMMA
+ INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_STABLE
};
/* Fields of the dynamic table INFORMATION_SCHEMA.innodb_metrics */
@@ -2774,7 +2774,7 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_metrics =
STRUCT_FLD(system_vars, NULL),
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/* Fields of the dynamic table INFORMATION_SCHEMA.innodb_ft_default_stopword */
static ST_FIELD_INFO i_s_stopword_fields_info[] =
@@ -2886,7 +2886,7 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_ft_default_stopword =
STRUCT_FLD(system_vars, NULL),
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/* Fields of the dynamic table INFORMATION_SCHEMA.INNODB_FT_DELETED
@@ -3053,7 +3053,7 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_ft_deleted =
STRUCT_FLD(system_vars, NULL),
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/*******************************************************************//**
@@ -3135,7 +3135,7 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_ft_being_deleted =
STRUCT_FLD(system_vars, NULL),
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/* Fields of the dynamic table INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHED and
@@ -3423,7 +3423,7 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_ft_index_cache =
STRUCT_FLD(system_vars, NULL),
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/*******************************************************************//**
@@ -3857,7 +3857,7 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_ft_index_table =
STRUCT_FLD(system_vars, NULL),
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/* Fields of the dynamic table INFORMATION_SCHEMA.INNODB_FT_CONFIG */
@@ -4054,7 +4054,7 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_ft_config =
STRUCT_FLD(system_vars, NULL),
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/* Fields of the dynamic table INNODB_BUFFER_POOL_STATS. */
@@ -4601,7 +4601,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_buffer_stats =
/* struct st_mysql_sys_var** */
STRUCT_FLD(system_vars, NULL),
- INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_GAMMA
+ INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_STABLE
};
/* Fields of the dynamic table INNODB_BUFFER_POOL_PAGE. */
@@ -5310,7 +5310,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_buffer_page =
/* struct st_mysql_sys_var** */
STRUCT_FLD(system_vars, NULL),
- INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_GAMMA
+ INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_STABLE
};
static ST_FIELD_INFO i_s_innodb_buf_page_lru_fields_info[] =
@@ -5855,7 +5855,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_buffer_page_lru =
/* struct st_mysql_sys_var** */
STRUCT_FLD(system_vars, NULL),
- INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_GAMMA
+ INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_STABLE
};
/*******************************************************************//**
@@ -6147,7 +6147,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_sys_tables =
/* struct st_mysql_sys_var** */
STRUCT_FLD(system_vars, NULL),
- INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_GAMMA
+ INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_STABLE
};
/** SYS_TABLESTATS ***********************************************/
@@ -6435,7 +6435,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_sys_tablestats =
/* struct st_mysql_sys_var** */
STRUCT_FLD(system_vars, NULL),
- INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_GAMMA
+ INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_STABLE
};
/** SYS_INDEXES **************************************************/
@@ -6685,7 +6685,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_sys_indexes =
/* struct st_mysql_sys_var** */
STRUCT_FLD(system_vars, NULL),
- INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_GAMMA
+ INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_STABLE
};
/** SYS_COLUMNS **************************************************/
@@ -6920,7 +6920,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_sys_columns =
/* struct st_mysql_sys_var** */
STRUCT_FLD(system_vars, NULL),
- INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_GAMMA
+ INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_STABLE
};
/** SYS_FIELDS ***************************************************/
@@ -7128,7 +7128,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_sys_fields =
/* struct st_mysql_sys_var** */
STRUCT_FLD(system_vars, NULL),
- INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_GAMMA
+ INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_STABLE
};
/** SYS_FOREIGN ********************************************/
@@ -7351,7 +7351,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_sys_foreign =
/* struct st_mysql_sys_var** */
STRUCT_FLD(system_vars, NULL),
- INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_GAMMA
+ INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_STABLE
};
/** SYS_FOREIGN_COLS ********************************************/
@@ -7566,7 +7566,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_sys_foreign_cols =
/* struct st_mysql_sys_var** */
STRUCT_FLD(system_vars, NULL),
- INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_GAMMA
+ INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_STABLE
};
/** SYS_TABLESPACES ********************************************/
@@ -7833,7 +7833,7 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_sys_tablespaces =
STRUCT_FLD(system_vars, NULL),
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/** SYS_DATAFILES ************************************************/
@@ -8020,7 +8020,7 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_sys_datafiles =
/* struct st_mysql_sys_var** */
STRUCT_FLD(system_vars, NULL),
- INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_GAMMA
+ INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_STABLE
};
static ST_FIELD_INFO i_s_innodb_changed_pages_info[] =
@@ -8389,7 +8389,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_changed_pages =
STRUCT_FLD(version, 0x0100 /* 1.0 */),
STRUCT_FLD(status_vars, NULL),
STRUCT_FLD(system_vars, NULL),
- INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_GAMMA
+ INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_STABLE
};
/** TABLESPACES_ENCRYPTION ********************************************/
@@ -8681,7 +8681,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_tablespaces_encryption =
/* struct st_mysql_sys_var** */
STRUCT_FLD(system_vars, NULL),
- INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_GAMMA
+ INNODB_VERSION_STR, MariaDB_PLUGIN_MATURITY_STABLE
};
/** TABLESPACES_SCRUBBING ********************************************/
@@ -8980,7 +8980,7 @@ UNIV_INTERN struct st_maria_plugin i_s_innodb_tablespaces_scrubbing =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA)
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE)
};
/** INNODB_MUTEXES *********************************************/
@@ -9194,7 +9194,7 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_mutexes =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
/** SYS_SEMAPHORE_WAITS ************************************************/
@@ -9471,7 +9471,7 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_sys_semaphore_waits =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
static ST_FIELD_INFO innodb_changed_page_bitmaps_fields_info[] =
@@ -9595,6 +9595,6 @@ UNIV_INTERN struct st_mysql_plugin i_s_innodb_changed_page_bitmaps =
/* Maria extension */
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
diff --git a/storage/xtradb/handler/xtradb_i_s.cc b/storage/xtradb/handler/xtradb_i_s.cc
index a0ff959013a..96e31b94470 100644
--- a/storage/xtradb/handler/xtradb_i_s.cc
+++ b/storage/xtradb/handler/xtradb_i_s.cc
@@ -176,7 +176,7 @@ UNIV_INTERN struct st_mysql_plugin i_s_xtradb_read_view =
STRUCT_FLD(status_vars, NULL),
STRUCT_FLD(system_vars, NULL),
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
static ST_FIELD_INFO xtradb_internal_hash_tables_fields_info[] =
@@ -381,7 +381,7 @@ UNIV_INTERN struct st_mysql_plugin i_s_xtradb_internal_hash_tables =
STRUCT_FLD(status_vars, NULL),
STRUCT_FLD(system_vars, NULL),
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
@@ -514,5 +514,5 @@ UNIV_INTERN struct st_mysql_plugin i_s_xtradb_rseg =
STRUCT_FLD(status_vars, NULL),
STRUCT_FLD(system_vars, NULL),
STRUCT_FLD(version_info, INNODB_VERSION_STR),
- STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_GAMMA),
+ STRUCT_FLD(maturity, MariaDB_PLUGIN_MATURITY_STABLE),
};
diff --git a/storage/xtradb/ibuf/ibuf0ibuf.cc b/storage/xtradb/ibuf/ibuf0ibuf.cc
index 4467b713c88..dc6ad49838e 100644
--- a/storage/xtradb/ibuf/ibuf0ibuf.cc
+++ b/storage/xtradb/ibuf/ibuf0ibuf.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1997, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2016, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
@@ -711,7 +711,7 @@ byte*
ibuf_parse_bitmap_init(
/*===================*/
byte* ptr, /*!< in: buffer */
- byte* end_ptr __attribute__((unused)), /*!< in: buffer end */
+ byte* end_ptr MY_ATTRIBUTE((unused)), /*!< in: buffer end */
buf_block_t* block, /*!< in: block or NULL */
mtr_t* mtr) /*!< in: mtr or NULL */
{
@@ -2554,7 +2554,7 @@ ibuf_get_merge_page_nos_func(
/*******************************************************************//**
Get the matching records for space id.
@return current rec or NULL */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
const rec_t*
ibuf_get_user_rec(
/*===============*/
@@ -2576,7 +2576,7 @@ ibuf_get_user_rec(
Reads page numbers for a space id from an ibuf tree.
@return a lower limit for the combined volume of records which will be
merged */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
ulint
ibuf_get_merge_pages(
/*=================*/
@@ -2684,40 +2684,22 @@ ibuf_merge_pages(
}
/*********************************************************************//**
-Get the table instance from the table id.
-@return table instance */
-static __attribute__((warn_unused_result))
-dict_table_t*
-ibuf_get_table(
-/*===========*/
- table_id_t table_id) /*!< in: valid table id */
-{
- rw_lock_s_lock_func(&dict_operation_lock, 0, __FILE__, __LINE__);
-
- dict_table_t* table = dict_table_open_on_id(
- table_id, FALSE, DICT_TABLE_OP_NORMAL);
-
- rw_lock_s_unlock_gen(&dict_operation_lock, 0);
-
- return(table);
-}
-
-/*********************************************************************//**
-Contracts insert buffer trees by reading pages to the buffer pool.
-@return a lower limit for the combined size in bytes of entries which
-will be merged from ibuf trees to the pages read, 0 if ibuf is
-empty */
-static
+Contracts insert buffer trees by reading pages referring to space_id
+to the buffer pool.
+@returns number of pages merged.*/
+UNIV_INTERN
ulint
ibuf_merge_space(
/*=============*/
- ulint space, /*!< in: tablespace id to merge */
- ulint* n_pages)/*!< out: number of pages to which merged */
+ ulint space) /*!< in: tablespace id to merge */
{
mtr_t mtr;
btr_pcur_t pcur;
mem_heap_t* heap = mem_heap_create(512);
dtuple_t* tuple = ibuf_search_tuple_build(space, 0, heap);
+ ulint n_pages = 0;
+
+ ut_ad(space < SRV_LOG_SPACE_FIRST_ID);
ibuf_mtr_start(&mtr);
@@ -2749,52 +2731,46 @@ ibuf_merge_space(
} else {
sum_sizes = ibuf_get_merge_pages(
- &pcur, space, IBUF_MAX_N_PAGES_MERGED,
- &pages[0], &spaces[0], &versions[0], n_pages,
- &mtr);
-
- if (*n_pages > 0) {
- ++sum_sizes;
- }
+ &pcur, space, IBUF_MAX_N_PAGES_MERGED,
+ &pages[0], &spaces[0], &versions[0], &n_pages,
+ &mtr);
+ ib_logf(IB_LOG_LEVEL_INFO,"\n Size of pages merged %lu"
+ ,sum_sizes);
}
ibuf_mtr_commit(&mtr);
btr_pcur_close(&pcur);
- if (sum_sizes > 0) {
-
- ut_a(*n_pages > 0 || sum_sizes == 1);
+ if (n_pages > 0) {
#ifdef UNIV_DEBUG
- ut_ad(*n_pages <= UT_ARR_SIZE(pages));
+ ut_ad(n_pages <= UT_ARR_SIZE(pages));
- for (ulint i = 0; i < *n_pages; ++i) {
+ for (ulint i = 0; i < n_pages; ++i) {
ut_ad(spaces[i] == space);
ut_ad(i == 0 || versions[i] == versions[i - 1]);
}
#endif /* UNIV_DEBUG */
buf_read_ibuf_merge_pages(
- true, spaces, versions, pages, *n_pages);
+ true, spaces, versions, pages, n_pages);
}
- return(sum_sizes);
+ return(n_pages);
}
-/*********************************************************************//**
-Contracts insert buffer trees by reading pages to the buffer pool.
+/** Contract the change buffer by reading pages to the buffer pool.
+@param[out] n_pages number of pages merged
+@param[in] sync whether the caller waits for
+the issued reads to complete
@return a lower limit for the combined size in bytes of entries which
will be merged from ibuf trees to the pages read, 0 if ibuf is
empty */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
ulint
ibuf_merge(
/*=======*/
- table_id_t table_id, /*!< in: if merge should be
- done only for a specific
- table, for all tables this
- should be 0 */
ulint* n_pages, /*!< out: number of pages to
which merged */
bool sync) /*!< in: TRUE if the caller
@@ -2802,8 +2778,6 @@ ibuf_merge(
read with the highest
tablespace address to complete */
{
- dict_table_t* table;
-
*n_pages = 0;
/* We perform a dirty read of ibuf->empty, without latching
@@ -2817,55 +2791,45 @@ ibuf_merge(
} else if (ibuf_debug) {
return(0);
#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
- } else if (table_id == 0) {
+ } else {
return(ibuf_merge_pages(n_pages, sync));
- } else if ((table = ibuf_get_table(table_id)) == 0) {
- /* Table has been dropped. */
- return(0);
}
-
- ulint volume = ibuf_merge_space(table->space, n_pages);
-
- dict_table_close(table, FALSE, FALSE);
-
- return(volume);
}
-/*********************************************************************//**
-Contracts insert buffer trees by reading pages to the buffer pool.
+/** Contract the change buffer by reading pages to the buffer pool.
+@param[in] sync whether the caller waits for
+the issued reads to complete
@return a lower limit for the combined size in bytes of entries which
-will be merged from ibuf trees to the pages read, 0 if ibuf is
-empty */
+will be merged from ibuf trees to the pages read, 0 if ibuf is empty */
static
ulint
ibuf_contract(
/*==========*/
- ibool sync) /*!< in: TRUE if the caller wants to wait for the
+ bool sync) /*!< in: TRUE if the caller wants to wait for the
issued read with the highest tablespace address
to complete */
{
ulint n_pages;
- return(ibuf_merge(0, &n_pages, sync));
+ return(ibuf_merge_pages(&n_pages, sync));
}
-/*********************************************************************//**
-Contracts insert buffer trees by reading pages to the buffer pool.
+/** Contract the change buffer by reading pages to the buffer pool.
+@param[in] full If true, do a full contraction based
+on PCT_IO(100). If false, the size of contract batch is determined
+based on the current size of the change buffer.
@return a lower limit for the combined size in bytes of entries which
will be merged from ibuf trees to the pages read, 0 if ibuf is
empty */
UNIV_INTERN
ulint
-ibuf_contract_in_background(
-/*========================*/
- table_id_t table_id, /*!< in: if merge should be done only
- for a specific table, for all tables
- this should be 0 */
- ibool full) /*!< in: TRUE if the caller wants to
- do a full contract based on PCT_IO(100).
- If FALSE then the size of contract
- batch is determined based on the
- current size of the ibuf tree. */
+ibuf_merge_in_background(
+/*=====================*/
+ bool full) /*!< in: TRUE if the caller wants to
+ do a full contract based on PCT_IO(100).
+ If FALSE then the size of contract
+ batch is determined based on the
+ current size of the ibuf tree. */
{
ulint sum_bytes = 0;
ulint sum_pages = 0;
@@ -2873,7 +2837,7 @@ ibuf_contract_in_background(
ulint n_pages;
#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
- if (srv_ibuf_disable_background_merge && table_id == 0) {
+ if (srv_ibuf_disable_background_merge) {
return(0);
}
#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
@@ -2908,7 +2872,7 @@ ibuf_contract_in_background(
while (sum_pages < n_pages) {
ulint n_bytes;
- n_bytes = ibuf_merge(table_id, &n_pag2, FALSE);
+ n_bytes = ibuf_merge(&n_pag2, false);
if (n_bytes == 0) {
return(sum_bytes);
@@ -3514,7 +3478,7 @@ ibuf_get_entry_counter_func(
Buffer an operation in the insert/delete buffer, instead of doing it
directly to the disk page, if this is possible.
@return DB_SUCCESS, DB_STRONG_FAIL or other error */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
ibuf_insert_low(
/*============*/
@@ -3583,8 +3547,7 @@ ibuf_insert_low(
#ifdef UNIV_IBUF_DEBUG
fputs("Ibuf too big\n", stderr);
#endif
- /* Use synchronous contract (== TRUE) */
- ibuf_contract(TRUE);
+ ibuf_contract(true);
return(DB_STRONG_FAIL);
}
@@ -4007,7 +3970,7 @@ skip_watch:
During merge, inserts to an index page a secondary index entry extracted
from the insert buffer.
@return newly inserted record */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
rec_t*
ibuf_insert_to_index_page_low(
/*==========================*/
@@ -4438,7 +4401,7 @@ ibuf_delete(
/*********************************************************************//**
Restores insert buffer tree cursor position
@return TRUE if the position was restored; FALSE if not */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
ibool
ibuf_restore_pos(
/*=============*/
@@ -4493,7 +4456,7 @@ Deletes from ibuf the record on which pcur is positioned. If we have to
resort to a pessimistic delete, this function commits mtr and closes
the cursor.
@return TRUE if mtr was committed and pcur closed in this operation */
-static __attribute__((warn_unused_result))
+static MY_ATTRIBUTE((warn_unused_result))
ibool
ibuf_delete_rec(
/*============*/
diff --git a/storage/xtradb/include/api0api.h b/storage/xtradb/include/api0api.h
index e4c9c941de5..500bf4fe3b2 100644
--- a/storage/xtradb/include/api0api.h
+++ b/storage/xtradb/include/api0api.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2011, 2015, Oracle and/or its affiliates. All Rights Reserved.
+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
@@ -36,7 +36,7 @@ InnoDB Native API
#endif
#if defined(__GNUC__) && (__GNUC__ > 2) && ! defined(__INTEL_COMPILER)
-#define UNIV_NO_IGNORE __attribute__ ((warn_unused_result))
+#define UNIV_NO_IGNORE MY_ATTRIBUTE ((warn_unused_result))
#else
#define UNIV_NO_IGNORE
#endif /* __GNUC__ && __GNUC__ > 2 && !__INTEL_COMPILER */
diff --git a/storage/xtradb/include/btr0btr.h b/storage/xtradb/include/btr0btr.h
index 36aaf676ccf..5047d1b2d4e 100644
--- a/storage/xtradb/include/btr0btr.h
+++ b/storage/xtradb/include/btr0btr.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
Copyright (c) 2014, 2015, MariaDB Corporation. All Rights Reserved.
@@ -118,7 +118,7 @@ btr_corruption_report(
/*==================*/
const buf_block_t* block, /*!< in: corrupted block */
const dict_index_t* index) /*!< in: index tree */
- UNIV_COLD __attribute__((nonnull));
+ UNIV_COLD MY_ATTRIBUTE((nonnull));
/** Assert that a B-tree page is not corrupted.
@param block buffer block containing a B-tree page
@@ -160,7 +160,7 @@ btr_blob_dbg_add_blob(
ulint page_no, /*!< in: start page of the column */
dict_index_t* index, /*!< in/out: index tree */
const char* ctx) /*!< in: context (for logging) */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**************************************************************//**
Display the references to off-page columns.
This function is to be called from a debugger,
@@ -170,7 +170,7 @@ void
btr_blob_dbg_print(
/*===============*/
const dict_index_t* index) /*!< in: index tree */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**************************************************************//**
Check that there are no references to off-page columns from or to
the given page. Invoked when freeing or clearing a page.
@@ -181,7 +181,7 @@ btr_blob_dbg_is_empty(
/*==================*/
dict_index_t* index, /*!< in: index */
ulint page_no) /*!< in: page number */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/**************************************************************//**
Modify the 'deleted' flag of a record. */
@@ -193,7 +193,7 @@ btr_blob_dbg_set_deleted_flag(
dict_index_t* index, /*!< in/out: index */
const ulint* offsets,/*!< in: rec_get_offs(rec, index) */
ibool del) /*!< in: TRUE=deleted, FALSE=exists */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**************************************************************//**
Change the ownership of an off-page column. */
UNIV_INTERN
@@ -205,7 +205,7 @@ btr_blob_dbg_owner(
const ulint* offsets,/*!< in: rec_get_offs(rec, index) */
ulint i, /*!< in: ith field in rec */
ibool own) /*!< in: TRUE=owned, FALSE=disowned */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/** Assert that there are no BLOB references to or from the given page. */
# define btr_blob_dbg_assert_empty(index, page_no) \
ut_a(btr_blob_dbg_is_empty(index, page_no))
@@ -225,7 +225,7 @@ btr_root_get(
/*=========*/
const dict_index_t* index, /*!< in: index tree */
mtr_t* mtr) /*!< in: mtr */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**************************************************************//**
Checks and adjusts the root node of a tree during IMPORT TABLESPACE.
@@ -235,7 +235,7 @@ dberr_t
btr_root_adjust_on_import(
/*======================*/
const dict_index_t* index) /*!< in: index tree */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/**************************************************************//**
Gets the height of the B-tree (the level of the root, when the leaf
@@ -248,7 +248,7 @@ btr_height_get(
/*===========*/
dict_index_t* index, /*!< in: index tree */
mtr_t* mtr) /*!< in/out: mini-transaction */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/**************************************************************//**
Gets a buffer page and declares its latching order level. */
UNIV_INLINE
@@ -310,7 +310,7 @@ index_id_t
btr_page_get_index_id(
/*==================*/
const page_t* page) /*!< in: index page */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
#ifndef UNIV_HOTBACKUP
/********************************************************//**
Gets the node level field in an index page.
@@ -320,7 +320,7 @@ ulint
btr_page_get_level_low(
/*===================*/
const page_t* page) /*!< in: index page */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
#define btr_page_get_level(page, mtr) btr_page_get_level_low(page)
/********************************************************//**
Gets the next index page number.
@@ -331,7 +331,7 @@ btr_page_get_next(
/*==============*/
const page_t* page, /*!< in: index page */
mtr_t* mtr) /*!< in: mini-transaction handle */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/********************************************************//**
Gets the previous index page number.
@return prev page number */
@@ -341,7 +341,7 @@ btr_page_get_prev(
/*==============*/
const page_t* page, /*!< in: index page */
mtr_t* mtr) /*!< in: mini-transaction handle */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*************************************************************//**
Gets pointer to the previous user record in the tree. It is assumed
that the caller has appropriate latches on the page and its neighbor.
@@ -353,7 +353,7 @@ btr_get_prev_user_rec(
rec_t* rec, /*!< in: record on leaf level */
mtr_t* mtr) /*!< in: mtr holding a latch on the page, and if
needed, also to the previous page */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*************************************************************//**
Gets pointer to the next user record in the tree. It is assumed
that the caller has appropriate latches on the page and its neighbor.
@@ -365,7 +365,7 @@ btr_get_next_user_rec(
rec_t* rec, /*!< in: record on leaf level */
mtr_t* mtr) /*!< in: mtr holding a latch on the page, and if
needed, also to the next page */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/**************************************************************//**
Releases the latch on a leaf page and bufferunfixes it. */
UNIV_INLINE
@@ -376,7 +376,7 @@ btr_leaf_page_release(
ulint latch_mode, /*!< in: BTR_SEARCH_LEAF or
BTR_MODIFY_LEAF */
mtr_t* mtr) /*!< in: mtr */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**************************************************************//**
Gets the child node file address in a node pointer.
NOTE: the offsets array must contain all offsets for the record since
@@ -390,7 +390,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() */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/************************************************************//**
Creates the root node for a new index tree.
@return page number of the created root, FIL_NULL if did not succeed */
@@ -405,7 +405,7 @@ btr_create(
index_id_t index_id,/*!< in: index id */
dict_index_t* index, /*!< in: index */
mtr_t* mtr) /*!< in: mini-transaction handle */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/************************************************************//**
Frees a B-tree except the root page, which MUST be freed after this
by calling btr_free_root. */
@@ -428,7 +428,7 @@ btr_free_root(
or 0 for uncompressed pages */
ulint root_page_no, /*!< in: root page number */
mtr_t* mtr) /*!< in/out: mini-transaction */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*************************************************************//**
Makes tree one level higher by splitting the root, and inserts
the tuple. It is assumed that mtr contains an x-latch on the tree.
@@ -477,7 +477,7 @@ btr_page_reorganize_low(
page_cur_t* cursor, /*!< in/out: page cursor */
dict_index_t* index, /*!< in: the index tree of the page */
mtr_t* mtr) /*!< in/out: mini-transaction */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*************************************************************//**
Reorganizes an index page.
@@ -496,7 +496,7 @@ btr_page_reorganize(
page_cur_t* cursor, /*!< in/out: page cursor */
dict_index_t* index, /*!< in: the index tree of the page */
mtr_t* mtr) /*!< in/out: mini-transaction */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*************************************************************//**
Decides if the page should be split at the convergence point of
inserts converging to left.
@@ -509,7 +509,7 @@ btr_page_get_split_rec_to_left(
rec_t** split_rec)/*!< out: if split recommended,
the first record on upper half page,
or NULL if tuple should be first */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*************************************************************//**
Decides if the page should be split at the convergence point of
inserts converging to right.
@@ -522,7 +522,7 @@ btr_page_get_split_rec_to_right(
rec_t** split_rec)/*!< out: if split recommended,
the first record on upper half page,
or NULL if tuple should be first */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*************************************************************//**
Splits an index page to halves and inserts the tuple. It is assumed
that mtr holds an x-latch to the index tree. NOTE: the tree x-latch is
@@ -561,7 +561,7 @@ btr_insert_on_non_leaf_level_func(
const char* file, /*!< in: file name */
ulint line, /*!< in: line where called */
mtr_t* mtr) /*!< in: mtr */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
# 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)
#endif /* !UNIV_HOTBACKUP */
@@ -573,7 +573,7 @@ btr_set_min_rec_mark(
/*=================*/
rec_t* rec, /*!< in/out: record */
mtr_t* mtr) /*!< in: mtr */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#ifndef UNIV_HOTBACKUP
/*************************************************************//**
Deletes on the upper level the node pointer to a page. */
@@ -584,7 +584,7 @@ btr_node_ptr_delete(
dict_index_t* index, /*!< in: index tree */
buf_block_t* block, /*!< in: page whose node pointer is deleted */
mtr_t* mtr) /*!< in: mtr */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#ifdef UNIV_DEBUG
/************************************************************//**
Checks that the node pointer to a page is appropriate.
@@ -596,7 +596,7 @@ btr_check_node_ptr(
dict_index_t* index, /*!< in: index tree */
buf_block_t* block, /*!< in: index page */
mtr_t* mtr) /*!< in: mtr */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#endif /* UNIV_DEBUG */
/*************************************************************//**
Tries to merge the page first to the left immediate brother if such a
@@ -619,7 +619,7 @@ btr_compress(
ibool adjust, /*!< in: TRUE if should adjust the
cursor position even if compression occurs */
mtr_t* mtr) /*!< in/out: mini-transaction */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*************************************************************//**
Discards a page from a B-tree. This is used to remove the last record from
a B-tree page: the whole page must be removed at the same time. This cannot
@@ -631,7 +631,7 @@ btr_discard_page(
btr_cur_t* cursor, /*!< in: cursor on the page to discard: not on
the root page */
mtr_t* mtr) /*!< in: mtr */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#endif /* !UNIV_HOTBACKUP */
/****************************************************************//**
Parses the redo log record for setting an index record as the predefined
@@ -646,7 +646,7 @@ btr_parse_set_min_rec_mark(
ulint comp, /*!< in: nonzero=compact page format */
page_t* page, /*!< in: page or NULL */
mtr_t* mtr) /*!< in: mtr or NULL */
- __attribute__((nonnull(1,2), warn_unused_result));
+ MY_ATTRIBUTE((nonnull(1,2), warn_unused_result));
/***********************************************************//**
Parses a redo log record of reorganizing a page.
@return end of log record or NULL */
@@ -660,7 +660,7 @@ btr_parse_page_reorganize(
bool compressed,/*!< in: true if compressed page */
buf_block_t* block, /*!< in: page to be reorganized, or NULL */
mtr_t* mtr) /*!< in: mtr or NULL */
- __attribute__((nonnull(1,2,3), warn_unused_result));
+ MY_ATTRIBUTE((nonnull(1,2,3), warn_unused_result));
#ifndef UNIV_HOTBACKUP
/**************************************************************//**
Gets the number of pages in a B-tree.
@@ -673,7 +673,7 @@ btr_get_size(
ulint flag, /*!< in: BTR_N_LEAF_PAGES or BTR_TOTAL_SIZE */
mtr_t* mtr) /*!< in/out: mini-transaction where index
is s-latched */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/**************************************************************//**
Gets the number of reserved and used pages in a B-tree.
@return number of pages reserved, or ULINT_UNDEFINED if the index
@@ -711,7 +711,7 @@ btr_page_alloc(
mtr_t* init_mtr) /*!< in/out: mini-transaction
for x-latching and initializing
the page */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/**************************************************************//**
Frees a file page used in an index tree. NOTE: cannot free field external
storage pages because the page must contain info on its level. */
@@ -722,7 +722,7 @@ btr_page_free(
dict_index_t* index, /*!< in: index tree */
buf_block_t* block, /*!< in: block to be freed, x-latched */
mtr_t* mtr) /*!< in: mtr */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**************************************************************//**
Frees a file page used in an index tree. Can be used also to BLOB
external storage pages, because the page level 0 can be given as an
@@ -772,7 +772,7 @@ void
btr_print_size(
/*===========*/
dict_index_t* index) /*!< in: index tree */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**************************************************************//**
Prints directories and other info of all nodes in the index. */
UNIV_INTERN
@@ -782,7 +782,7 @@ btr_print_index(
dict_index_t* index, /*!< in: index */
ulint width) /*!< in: print this many entries from start
and end */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#endif /* UNIV_BTR_PRINT */
/************************************************************//**
Checks the size and number of fields in a record based on the definition of
@@ -797,7 +797,7 @@ btr_index_rec_validate(
ibool dump_on_error) /*!< in: TRUE if the function
should print hex dump of record
and page on error */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/**************************************************************//**
Checks the consistency of an index tree.
@return DB_SUCCESS if ok, error code if not */
@@ -807,7 +807,7 @@ btr_validate_index(
/*===============*/
dict_index_t* index, /*!< in: index */
const trx_t* trx) /*!< in: transaction or 0 */
- __attribute__((nonnull(1), warn_unused_result));
+ MY_ATTRIBUTE((nonnull(1), warn_unused_result));
#ifdef UNIV_SYNC_DEBUG
/*************************************************************//**
diff --git a/storage/xtradb/include/btr0btr.ic b/storage/xtradb/include/btr0btr.ic
index 5fc621f469d..8c9c3bead09 100644
--- a/storage/xtradb/include/btr0btr.ic
+++ b/storage/xtradb/include/btr0btr.ic
@@ -1,7 +1,7 @@
/*****************************************************************************
-Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2015, MariaDB Corporation.
+Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2016, 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
@@ -165,10 +165,11 @@ ulint
btr_page_get_next(
/*==============*/
const page_t* page, /*!< in: index page */
- mtr_t* mtr __attribute__((unused)))
+ mtr_t* mtr MY_ATTRIBUTE((unused)))
/*!< in: mini-transaction handle */
{
- ut_ad(page && mtr);
+ ut_ad(page != NULL);
+ ut_ad(mtr != NULL);
#ifndef UNIV_INNOCHECKSUM
ut_ad(mtr_memo_contains_page(mtr, page, MTR_MEMO_PAGE_X_FIX)
|| mtr_memo_contains_page(mtr, page, MTR_MEMO_PAGE_S_FIX));
@@ -188,7 +189,8 @@ btr_page_set_next(
ulint next, /*!< in: next page number */
mtr_t* mtr) /*!< in: mini-transaction handle */
{
- ut_ad(page && mtr);
+ ut_ad(page != NULL);
+ ut_ad(mtr != NULL);
if (page_zip) {
mach_write_to_4(page + FIL_PAGE_NEXT, next);
@@ -206,9 +208,10 @@ ulint
btr_page_get_prev(
/*==============*/
const page_t* page, /*!< in: index page */
- mtr_t* mtr __attribute__((unused))) /*!< in: mini-transaction handle */
+ mtr_t* mtr MY_ATTRIBUTE((unused))) /*!< in: mini-transaction handle */
{
- ut_ad(page && mtr);
+ ut_ad(page != NULL);
+ ut_ad(mtr != NULL);
return(mach_read_from_4(page + FIL_PAGE_PREV));
}
@@ -225,7 +228,8 @@ btr_page_set_prev(
ulint prev, /*!< in: previous page number */
mtr_t* mtr) /*!< in: mini-transaction handle */
{
- ut_ad(page && mtr);
+ ut_ad(page != NULL);
+ ut_ad(mtr != NULL);
if (page_zip) {
mach_write_to_4(page + FIL_PAGE_PREV, prev);
diff --git a/storage/xtradb/include/btr0cur.h b/storage/xtradb/include/btr0cur.h
index 2c60f3ad64c..f485d072c4c 100644
--- a/storage/xtradb/include/btr0cur.h
+++ b/storage/xtradb/include/btr0cur.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1994, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -186,7 +186,7 @@ btr_cur_open_at_index_side_func(
const char* file, /*!< in: file name */
ulint line, /*!< in: line where called */
mtr_t* mtr) /*!< in/out: mini-transaction */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#define btr_cur_open_at_index_side(f,i,l,c,lv,m) \
btr_cur_open_at_index_side_func(f,i,l,c,lv,__FILE__,__LINE__,m)
/**********************************************************************//**
@@ -235,7 +235,7 @@ btr_cur_optimistic_insert(
compressed tablespace, the caller must
mtr_commit(mtr) before latching
any further pages */
- __attribute__((nonnull(2,3,4,5,6,7,10), warn_unused_result));
+ MY_ATTRIBUTE((nonnull(2,3,4,5,6,7,10), warn_unused_result));
/*************************************************************//**
Performs an insert on a page of an index tree. It is assumed that mtr
holds an x-latch on the tree and on the cursor page. If the insert is
@@ -266,7 +266,7 @@ btr_cur_pessimistic_insert(
ulint n_ext, /*!< in: number of externally stored columns */
que_thr_t* thr, /*!< in: query thread or NULL */
mtr_t* mtr) /*!< in/out: mini-transaction */
- __attribute__((nonnull(2,3,4,5,6,7,10), warn_unused_result));
+ MY_ATTRIBUTE((nonnull(2,3,4,5,6,7,10), warn_unused_result));
/*************************************************************//**
See if there is enough place in the page modification log to log
an update-in-place.
@@ -295,9 +295,9 @@ btr_cur_update_alloc_zip_func(
mtr_t* mtr, /*!< in/out: mini-transaction */
trx_t* trx) /*!< in: NULL or transaction */
#ifdef UNIV_DEBUG
- __attribute__((nonnull (1, 2, 3, 4, 7), warn_unused_result));
+ MY_ATTRIBUTE((nonnull (1, 2, 3, 4, 7), warn_unused_result));
#else
- __attribute__((nonnull (1, 2, 3, 6), warn_unused_result));
+ MY_ATTRIBUTE((nonnull (1, 2, 3, 6), warn_unused_result));
#endif
#ifdef UNIV_DEBUG
@@ -331,7 +331,7 @@ btr_cur_update_in_place(
is a secondary index, the caller must
mtr_commit(mtr) before latching any
further pages */
- __attribute__((warn_unused_result, nonnull));
+ MY_ATTRIBUTE((warn_unused_result, nonnull));
/***********************************************************//**
Writes a redo log record of updating a record in-place. */
UNIV_INTERN
@@ -345,7 +345,7 @@ btr_cur_update_in_place_log(
trx_id_t trx_id, /*!< in: transaction id */
roll_ptr_t roll_ptr, /*!< in: roll ptr */
mtr_t* mtr) /*!< in: mtr */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*************************************************************//**
Tries to update a record on a page in an index tree. It is assumed that mtr
holds an x-latch on the page. The operation does not succeed if there is too
@@ -377,7 +377,7 @@ btr_cur_optimistic_update(
is a secondary index, the caller must
mtr_commit(mtr) before latching any
further pages */
- __attribute__((warn_unused_result, nonnull));
+ MY_ATTRIBUTE((warn_unused_result, nonnull));
/*************************************************************//**
Performs an update of a record on a page of a tree. It is assumed
that mtr holds an x-latch on the tree and on the cursor page. If the
@@ -411,7 +411,7 @@ btr_cur_pessimistic_update(
trx_id_t trx_id, /*!< in: transaction id */
mtr_t* mtr) /*!< in/out: mini-transaction; must be committed
before latching any further pages */
- __attribute__((warn_unused_result, nonnull));
+ MY_ATTRIBUTE((warn_unused_result, nonnull));
/***********************************************************//**
Marks a clustered index record deleted. Writes an undo log record to
undo log on this delete marking. Writes in the trx id field the id
@@ -428,7 +428,7 @@ btr_cur_del_mark_set_clust_rec(
const ulint* offsets,/*!< in: rec_get_offsets(rec) */
que_thr_t* thr, /*!< in: query thread */
mtr_t* mtr) /*!< in/out: mini-transaction */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/***********************************************************//**
Sets a secondary index record delete mark to TRUE or FALSE.
@return DB_SUCCESS, DB_LOCK_WAIT, or error number */
@@ -441,7 +441,7 @@ btr_cur_del_mark_set_sec_rec(
ibool val, /*!< in: value to set */
que_thr_t* thr, /*!< in: query thread */
mtr_t* mtr) /*!< in/out: mini-transaction */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*************************************************************//**
Tries to compress a page of the tree if it seems useful. It is assumed
that mtr holds an x-latch on the tree and on the cursor page. To avoid
@@ -459,7 +459,7 @@ btr_cur_compress_if_useful(
ibool adjust, /*!< in: TRUE if should adjust the
cursor position even if compression occurs */
mtr_t* mtr) /*!< in/out: mini-transaction */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*******************************************************//**
Removes the record on which the tree cursor is positioned. It is assumed
that the mtr has an x-latch on the page where the cursor is positioned,
@@ -480,7 +480,7 @@ btr_cur_optimistic_delete_func(
TRUE on a leaf page of a secondary
index, the mtr must be committed
before latching any further pages */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
# ifdef UNIV_DEBUG
# define btr_cur_optimistic_delete(cursor, flags, mtr) \
btr_cur_optimistic_delete_func(cursor, flags, mtr)
@@ -516,7 +516,7 @@ btr_cur_pessimistic_delete(
ulint flags, /*!< in: BTR_CREATE_FLAG or 0 */
enum trx_rb_ctx rb_ctx, /*!< in: rollback context */
mtr_t* mtr) /*!< in: mtr */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#endif /* !UNIV_HOTBACKUP */
/***********************************************************//**
Parses a redo log record of updating a record in-place.
@@ -610,7 +610,7 @@ btr_cur_disown_inherited_fields(
const ulint* offsets,/*!< in: array returned by rec_get_offsets() */
const upd_t* update, /*!< in: update vector */
mtr_t* mtr) /*!< in/out: mini-transaction */
- __attribute__((nonnull(2,3,4,5,6)));
+ MY_ATTRIBUTE((nonnull(2,3,4,5,6)));
/** Operation code for btr_store_big_rec_extern_fields(). */
enum blob_op {
@@ -630,7 +630,7 @@ ibool
btr_blob_op_is_update(
/*==================*/
enum blob_op op) /*!< in: operation */
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
/*******************************************************************//**
Stores the fields in big_rec_vec to the tablespace and puts pointers to
@@ -655,7 +655,7 @@ btr_store_big_rec_extern_fields(
mtr_t* btr_mtr, /*!< in: mtr containing the
latches to the clustered index */
enum blob_op op) /*! in: operation code */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*******************************************************************//**
Frees the space in an externally stored field to the file space
@@ -752,7 +752,7 @@ 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 */
- __attribute__((nonnull));
+ 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 --git a/storage/xtradb/include/btr0pcur.h b/storage/xtradb/include/btr0pcur.h
index d8e7cf6b283..dafe14ce556 100644
--- a/storage/xtradb/include/btr0pcur.h
+++ b/storage/xtradb/include/btr0pcur.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -155,7 +155,7 @@ btr_pcur_open_at_index_side(
ulint level, /*!< in: level to search for
(0=leaf) */
mtr_t* mtr) /*!< in/out: mini-transaction */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**************************************************************//**
Gets the up_match value for a pcur after a search.
@return number of matched fields at the cursor or to the right if
diff --git a/storage/xtradb/include/btr0sea.h b/storage/xtradb/include/btr0sea.h
index 6e4ef16cf79..db7b477fae1 100644
--- a/storage/xtradb/include/btr0sea.h
+++ b/storage/xtradb/include/btr0sea.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -69,7 +69,7 @@ btr_search_t*
btr_search_get_info(
/*================*/
dict_index_t* index) /*!< in: index */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*****************************************************************//**
Creates and initializes a search info struct.
@return own: search info struct */
@@ -200,7 +200,7 @@ hash_table_t*
btr_search_get_hash_table(
/*======================*/
const dict_index_t* index) /*!< in: index */
- __attribute__((pure,warn_unused_result));
+ MY_ATTRIBUTE((pure,warn_unused_result));
/********************************************************************//**
Returns the adaptive hash index latch for a given index key.
@@ -210,7 +210,7 @@ prio_rw_lock_t*
btr_search_get_latch(
/*=================*/
const dict_index_t* index) /*!< in: index */
- __attribute__((pure,warn_unused_result));
+ MY_ATTRIBUTE((pure,warn_unused_result));
/*********************************************************************//**
Returns the AHI partition number corresponding to a given index ID. */
@@ -219,7 +219,7 @@ ulint
btr_search_get_key(
/*===============*/
index_id_t index_id) /*!< in: index ID */
- __attribute__((pure,warn_unused_result));
+ MY_ATTRIBUTE((pure,warn_unused_result));
/*********************************************************************//**
Initializes AHI-related fields in a newly created index. */
@@ -228,7 +228,7 @@ void
btr_search_index_init(
/*===============*/
dict_index_t* index) /*!< in: index */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/********************************************************************//**
Latches all adaptive hash index latches in exclusive mode. */
@@ -256,7 +256,7 @@ bool
btr_search_own_all(
/*===============*/
ulint lock_type)
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
/********************************************************************//**
Checks if the thread owns any adaptive hash latches in either S or X mode.
@return true if the thread owns at least one latch in any mode. */
@@ -264,7 +264,7 @@ UNIV_INLINE
bool
btr_search_own_any(void)
/*=====================*/
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
#endif
/** The search info struct in an index */
diff --git a/storage/xtradb/include/btr0types.h b/storage/xtradb/include/btr0types.h
index cd0392e7951..4bc9c72eccc 100644
--- a/storage/xtradb/include/btr0types.h
+++ b/storage/xtradb/include/btr0types.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -82,7 +82,7 @@ btr_blob_dbg_rbt_insert(
dict_index_t* index, /*!< in/out: index tree */
const btr_blob_dbg_t* b, /*!< in: the reference */
const char* ctx) /*!< in: context (for logging) */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/** Remove from index->blobs a reference to an off-page column.
@param index the index tree
@@ -95,7 +95,7 @@ btr_blob_dbg_rbt_delete(
dict_index_t* index, /*!< in/out: index tree */
const btr_blob_dbg_t* b, /*!< in: the reference */
const char* ctx) /*!< in: context (for logging) */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**************************************************************//**
Add to index->blobs any references to off-page columns from a record.
@@ -108,7 +108,7 @@ btr_blob_dbg_add_rec(
dict_index_t* index, /*!< in/out: index */
const ulint* offsets,/*!< in: offsets */
const char* ctx) /*!< in: context (for logging) */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**************************************************************//**
Remove from index->blobs any references to off-page columns from a record.
@return number of references removed */
@@ -120,7 +120,7 @@ btr_blob_dbg_remove_rec(
dict_index_t* index, /*!< in/out: index */
const ulint* offsets,/*!< in: offsets */
const char* ctx) /*!< in: context (for logging) */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**************************************************************//**
Count and add to index->blobs any references to off-page columns
from records on a page.
@@ -132,7 +132,7 @@ btr_blob_dbg_add(
const page_t* page, /*!< in: rewritten page */
dict_index_t* index, /*!< in/out: index */
const char* ctx) /*!< in: context (for logging) */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**************************************************************//**
Count and remove from index->blobs any references to off-page columns
from records on a page.
@@ -145,7 +145,7 @@ btr_blob_dbg_remove(
const page_t* page, /*!< in: b-tree page */
dict_index_t* index, /*!< in/out: index */
const char* ctx) /*!< in: context (for logging) */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**************************************************************//**
Restore in index->blobs any references to off-page columns
Used when page reorganize fails due to compressed page overflow. */
@@ -157,7 +157,7 @@ btr_blob_dbg_restore(
const page_t* page, /*!< in: copy of original page */
dict_index_t* index, /*!< in/out: index */
const char* ctx) /*!< in: context (for logging) */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/** Operation that processes the BLOB references of an index record
@param[in] rec record on index page
@@ -181,7 +181,7 @@ btr_blob_dbg_op(
dict_index_t* index, /*!< in/out: index */
const char* ctx, /*!< in: context (for logging) */
const btr_blob_dbg_op_f op) /*!< in: operation on records */
- __attribute__((nonnull(1,3,4,5)));
+ MY_ATTRIBUTE((nonnull(1,3,4,5)));
#else /* UNIV_BLOB_DEBUG */
# define btr_blob_dbg_add_rec(rec, index, offsets, ctx) ((void) 0)
# define btr_blob_dbg_add(page, index, ctx) ((void) 0)
diff --git a/storage/xtradb/include/buf0buddy.h b/storage/xtradb/include/buf0buddy.h
index a86fc87e3d3..09768dda92f 100644
--- a/storage/xtradb/include/buf0buddy.h
+++ b/storage/xtradb/include/buf0buddy.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2006, 2011, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2006, 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
@@ -54,7 +54,7 @@ buf_buddy_alloc(
storage was allocated from the
LRU list and buf_pool->LRU_list_mutex
was temporarily released */
- __attribute__((malloc, nonnull));
+ MY_ATTRIBUTE((malloc, nonnull));
/**********************************************************************//**
Deallocate a block. */
@@ -68,7 +68,7 @@ buf_buddy_free(
be pointed to by the buffer pool */
ulint size) /*!< in: block size,
up to UNIV_PAGE_SIZE */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#ifndef UNIV_NONINL
# include "buf0buddy.ic"
diff --git a/storage/xtradb/include/buf0buddy.ic b/storage/xtradb/include/buf0buddy.ic
index 020442016d0..9bc8e9e8762 100644
--- a/storage/xtradb/include/buf0buddy.ic
+++ b/storage/xtradb/include/buf0buddy.ic
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2006, 2011, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2006, 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
@@ -50,7 +50,7 @@ buf_buddy_alloc_low(
allocated from the LRU list and
buf_pool->LRU_list_mutex was
temporarily released */
- __attribute__((malloc, nonnull));
+ MY_ATTRIBUTE((malloc, nonnull));
/**********************************************************************//**
Deallocate a block. */
@@ -63,7 +63,7 @@ buf_buddy_free_low(
pointed to by the buffer pool */
ulint i) /*!< in: index of buf_pool->zip_free[],
or BUF_BUDDY_SIZES */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Get the index of buf_pool->zip_free[] for a given block size.
diff --git a/storage/xtradb/include/buf0buf.h b/storage/xtradb/include/buf0buf.h
index c25cd406498..f599997be02 100644
--- a/storage/xtradb/include/buf0buf.h
+++ b/storage/xtradb/include/buf0buf.h
@@ -1,7 +1,7 @@
/*****************************************************************************
-Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2013, 2015, MariaDB Corporation.
+Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2013, 2016, 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
@@ -244,7 +244,7 @@ buf_relocate(
buf_page_get_state(bpage) must be
BUF_BLOCK_ZIP_DIRTY or BUF_BLOCK_ZIP_PAGE */
buf_page_t* dpage) /*!< in/out: destination control block */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Gets the current size of buffer buf_pool in bytes.
@return size in bytes */
@@ -284,7 +284,7 @@ UNIV_INLINE
buf_page_t*
buf_page_alloc_descriptor(void)
/*===========================*/
- __attribute__((malloc));
+ MY_ATTRIBUTE((malloc));
/********************************************************************//**
Free a buf_page_t descriptor. */
UNIV_INLINE
@@ -292,7 +292,7 @@ void
buf_page_free_descriptor(
/*=====================*/
buf_page_t* bpage) /*!< in: bpage descriptor to free. */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/********************************************************************//**
Allocates a buffer block.
@@ -533,7 +533,7 @@ ulint
buf_page_get_freed_page_clock(
/*==========================*/
const buf_page_t* bpage) /*!< in: block */
- __attribute__((pure));
+ MY_ATTRIBUTE((pure));
/********************************************************************//**
Reads the freed_page_clock of a buffer block.
@return freed_page_clock */
@@ -542,7 +542,7 @@ ulint
buf_block_get_freed_page_clock(
/*===========================*/
const buf_block_t* block) /*!< in: block */
- __attribute__((pure));
+ MY_ATTRIBUTE((pure));
/********************************************************************//**
Tells if a block is still close enough to the MRU end of the LRU list
@@ -605,7 +605,7 @@ buf_block_buf_fix_inc_func(
ulint line, /*!< in: line */
# endif /* UNIV_SYNC_DEBUG */
buf_block_t* block) /*!< in/out: block to bufferfix */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*******************************************************************//**
Increments the bufferfix count. */
@@ -651,7 +651,7 @@ buf_page_is_corrupted(
const byte* read_buf, /*!< in: a database page */
ulint zip_size) /*!< in: size of compressed page;
0 for uncompressed pages */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/********************************************************************//**
Checks if a page is all zeroes.
@return TRUE if the page is all zeroes */
@@ -681,7 +681,7 @@ ulint
buf_block_get_lock_hash_val(
/*========================*/
const buf_block_t* block) /*!< in: block */
- __attribute__((pure));
+ MY_ATTRIBUTE((pure));
#ifdef UNIV_DEBUG
/*********************************************************************//**
Finds a block in the buffer pool that points to a
@@ -739,10 +739,10 @@ buf_page_print(
const byte* read_buf, /*!< in: a database page */
ulint zip_size, /*!< in: compressed page size, or
0 for uncompressed pages */
- ulint flags); /*!< in: 0 or
+ ulint flags) /*!< in: 0 or
BUF_PAGE_PRINT_NO_CRASH or
BUF_PAGE_PRINT_NO_FULL */
-
+ UNIV_COLD MY_ATTRIBUTE((nonnull));
/********************************************************************//**
Decompress a block.
@return TRUE if successful */
@@ -879,7 +879,7 @@ enum buf_page_state
buf_block_get_state(
/*================*/
const buf_block_t* block) /*!< in: pointer to the control block */
- __attribute__((pure));
+ MY_ATTRIBUTE((pure));
/*********************************************************************//**
Sets the state of a block. */
UNIV_INLINE
@@ -904,7 +904,7 @@ ibool
buf_page_in_file(
/*=============*/
const buf_page_t* bpage) /*!< in: pointer to control block */
- __attribute__((pure));
+ MY_ATTRIBUTE((pure));
#ifndef UNIV_HOTBACKUP
/*********************************************************************//**
Determines if a block should be on unzip_LRU list.
@@ -914,7 +914,7 @@ ibool
buf_page_belongs_to_unzip_LRU(
/*==========================*/
const buf_page_t* bpage) /*!< in: pointer to control block */
- __attribute__((pure));
+ MY_ATTRIBUTE((pure));
/*********************************************************************//**
Gets the mutex of a block.
@@ -924,7 +924,7 @@ ib_mutex_t*
buf_page_get_mutex(
/*===============*/
const buf_page_t* bpage) /*!< in: pointer to control block */
- __attribute__((pure));
+ MY_ATTRIBUTE((pure));
/*********************************************************************//**
Get the flush type of a page.
@@ -934,7 +934,7 @@ buf_flush_t
buf_page_get_flush_type(
/*====================*/
const buf_page_t* bpage) /*!< in: buffer page */
- __attribute__((pure));
+ MY_ATTRIBUTE((pure));
/*********************************************************************//**
Set the flush type of a page. */
UNIV_INLINE
@@ -960,7 +960,7 @@ enum buf_io_fix
buf_page_get_io_fix(
/*================*/
const buf_page_t* bpage) /*!< in: pointer to the control block */
- __attribute__((pure));
+ MY_ATTRIBUTE((pure));
/*********************************************************************//**
Gets the io_fix state of a block.
@return io_fix state */
@@ -969,7 +969,7 @@ enum buf_io_fix
buf_block_get_io_fix(
/*================*/
const buf_block_t* block) /*!< in: pointer to the control block */
- __attribute__((pure));
+ MY_ATTRIBUTE((pure));
/*********************************************************************//**
Gets the io_fix state of a block. Does not assert that the
buf_page_get_mutex() mutex is held, to be used in the cases where it is safe
@@ -980,7 +980,7 @@ enum buf_io_fix
buf_page_get_io_fix_unlocked(
/*=========================*/
const buf_page_t* bpage) /*!< in: pointer to the control block */
- __attribute__((pure));
+ MY_ATTRIBUTE((pure));
/*********************************************************************//**
Sets the io_fix state of a block. */
UNIV_INLINE
@@ -1026,7 +1026,7 @@ ibool
buf_page_can_relocate(
/*==================*/
const buf_page_t* bpage) /*!< control block being relocated */
- __attribute__((pure));
+ MY_ATTRIBUTE((pure));
/*********************************************************************//**
Determine if a block has been flagged old.
@@ -1036,7 +1036,7 @@ ibool
buf_page_is_old(
/*============*/
const buf_page_t* bpage) /*!< in: control block */
- __attribute__((pure));
+ MY_ATTRIBUTE((pure));
/*********************************************************************//**
Flag a block old. */
UNIV_INLINE
@@ -1053,7 +1053,7 @@ unsigned
buf_page_is_accessed(
/*=================*/
const buf_page_t* bpage) /*!< in: control block */
- __attribute__((nonnull, pure));
+ MY_ATTRIBUTE((nonnull, pure));
/*********************************************************************//**
Flag a block accessed. */
UNIV_INLINE
@@ -1061,7 +1061,7 @@ void
buf_page_set_accessed(
/*==================*/
buf_page_t* bpage) /*!< in/out: control block */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Gets the buf_block_t handle of a buffered file block if an uncompressed
page frame exists, or NULL. Note: even though bpage is not declared a
@@ -1072,7 +1072,7 @@ buf_block_t*
buf_page_get_block(
/*===============*/
buf_page_t* bpage) /*!< in: control block, or NULL */
- __attribute__((pure));
+ MY_ATTRIBUTE((pure));
#endif /* !UNIV_HOTBACKUP */
#ifdef UNIV_DEBUG
/*********************************************************************//**
@@ -1083,7 +1083,7 @@ buf_frame_t*
buf_block_get_frame(
/*================*/
const buf_block_t* block) /*!< in: pointer to the control block */
- __attribute__((pure));
+ MY_ATTRIBUTE((pure));
# define buf_block_get_frame_fast(block) buf_block_get_frame(block)
#else /* UNIV_DEBUG */
# define buf_block_get_frame(block) (block ? (block)->frame : 0)
@@ -1097,7 +1097,7 @@ ulint
buf_page_get_space(
/*===============*/
const buf_page_t* bpage) /*!< in: pointer to the control block */
- __attribute__((pure));
+ MY_ATTRIBUTE((pure));
/*********************************************************************//**
Gets the space id of a block.
@return space id */
@@ -1106,7 +1106,7 @@ ulint
buf_block_get_space(
/*================*/
const buf_block_t* block) /*!< in: pointer to the control block */
- __attribute__((pure));
+ MY_ATTRIBUTE((pure));
/*********************************************************************//**
Gets the page number of a block.
@return page number */
@@ -1115,7 +1115,7 @@ ulint
buf_page_get_page_no(
/*=================*/
const buf_page_t* bpage) /*!< in: pointer to the control block */
- __attribute__((pure));
+ MY_ATTRIBUTE((pure));
/*********************************************************************//**
Gets the page number of a block.
@return page number */
@@ -1124,7 +1124,7 @@ ulint
buf_block_get_page_no(
/*==================*/
const buf_block_t* block) /*!< in: pointer to the control block */
- __attribute__((pure));
+ MY_ATTRIBUTE((pure));
/*********************************************************************//**
Gets the compressed page size of a block.
@return compressed page size, or 0 */
@@ -1133,7 +1133,7 @@ ulint
buf_page_get_zip_size(
/*==================*/
const buf_page_t* bpage) /*!< in: pointer to the control block */
- __attribute__((pure));
+ MY_ATTRIBUTE((pure));
/*********************************************************************//**
Gets the compressed page size of a block.
@return compressed page size, or 0 */
@@ -1142,7 +1142,7 @@ ulint
buf_block_get_zip_size(
/*===================*/
const buf_block_t* block) /*!< in: pointer to the control block */
- __attribute__((pure));
+ MY_ATTRIBUTE((pure));
/*********************************************************************//**
Gets the compressed page descriptor corresponding to an uncompressed page
if applicable. */
@@ -1231,7 +1231,7 @@ buf_page_address_fold(
/*==================*/
ulint space, /*!< in: space id */
ulint offset) /*!< in: offset of the page within space */
- __attribute__((const));
+ MY_ATTRIBUTE((const));
/********************************************************************//**
Calculates the index of a buffer pool to the buf_pool[] array.
@return the position of the buffer pool in buf_pool[] */
@@ -1240,7 +1240,7 @@ ulint
buf_pool_index(
/*===========*/
const buf_pool_t* buf_pool) /*!< in: buffer pool */
- __attribute__((nonnull, const));
+ MY_ATTRIBUTE((nonnull, const));
/******************************************************************//**
Returns the buffer pool instance given a page instance
@return buf_pool */
@@ -1380,7 +1380,7 @@ buf_pool_watch_is_sentinel(
/*=======================*/
buf_pool_t* buf_pool, /*!< buffer pool instance */
const buf_page_t* bpage) /*!< in: block */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/****************************************************************//**
Add watch for the given page to be read in. Caller must have
appropriate hash_lock for the bpage and hold the LRU list mutex to avoid a race
@@ -1394,7 +1394,7 @@ buf_pool_watch_set(
ulint space, /*!< in: space id */
ulint offset, /*!< in: page number */
ulint fold) /*!< in: buf_page_address_fold(space, offset) */
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
/****************************************************************//**
Stop watching if the page has been read in.
buf_pool_watch_set(space,offset) must have returned NULL before. */
@@ -1415,7 +1415,7 @@ buf_pool_watch_occurred(
/*====================*/
ulint space, /*!< in: space id */
ulint offset) /*!< in: page number */
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
/********************************************************************//**
Get total buffer pool statistics. */
UNIV_INTERN
@@ -1473,7 +1473,7 @@ bool
buf_own_zip_mutex_for_page(
/*=======================*/
const buf_page_t* bpage)
- __attribute__((nonnull,warn_unused_result));
+ MY_ATTRIBUTE((nonnull,warn_unused_result));
#endif /* UNIV_DEBUG */
/********************************************************************//**
diff --git a/storage/xtradb/include/buf0flu.h b/storage/xtradb/include/buf0flu.h
index c8a329251fa..af50a5498ef 100644
--- a/storage/xtradb/include/buf0flu.h
+++ b/storage/xtradb/include/buf0flu.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 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
@@ -96,7 +96,7 @@ buf_flush_page_try(
/*===============*/
buf_pool_t* buf_pool, /*!< in/out: buffer pool instance */
buf_block_t* block) /*!< in/out: buffer control block */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
# endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
/*******************************************************************//**
This utility flushes dirty blocks from the end of the flush list of
@@ -277,7 +277,7 @@ buf_flush_ready_for_flush(
buf_page_t* bpage, /*!< in: buffer control block, must be
buf_page_in_file(bpage) */
buf_flush_t flush_type)/*!< in: type of flush */
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
#ifdef UNIV_DEBUG
/******************************************************************//**
@@ -310,7 +310,7 @@ UNIV_INLINE
bool
buf_flush_flush_list_in_progress(void)
/*==================================*/
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
/** If LRU list of a buf_pool is less than this size then LRU eviction
should not happen. This is because when we do LRU flushing we also put
diff --git a/storage/xtradb/include/buf0lru.h b/storage/xtradb/include/buf0lru.h
index f421e329bf0..f056c6c4116 100644
--- a/storage/xtradb/include/buf0lru.h
+++ b/storage/xtradb/include/buf0lru.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 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
@@ -97,7 +97,7 @@ buf_LRU_free_page(
buf_page_t* bpage, /*!< in: block to be freed */
bool zip) /*!< in: true if should remove also the
compressed page of an uncompressed page */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Try to free a replaceable block.
@return TRUE if found and freed */
@@ -109,7 +109,7 @@ buf_LRU_scan_and_free_block(
ibool scan_all) /*!< in: scan whole LRU list
if TRUE, otherwise scan only
'old' blocks. */
- __attribute__((nonnull,warn_unused_result));
+ MY_ATTRIBUTE((nonnull,warn_unused_result));
/******************************************************************//**
Returns a free block from the buf_pool. The block is taken off the
free list. If it is empty, returns NULL.
@@ -150,7 +150,7 @@ buf_block_t*
buf_LRU_get_free_block(
/*===================*/
buf_pool_t* buf_pool) /*!< in/out: buffer pool instance */
- __attribute__((nonnull,warn_unused_result));
+ MY_ATTRIBUTE((nonnull,warn_unused_result));
/******************************************************************//**
Determines if the unzip_LRU list should be used for evicting a victim
instead of the general LRU list.
@@ -233,7 +233,7 @@ buf_LRU_free_one_page(
buf_page_t* bpage) /*!< in/out: block, must contain a file page and
be in a state where it can be freed; there
may or may not be a hash index to the page */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
/**********************************************************************//**
diff --git a/storage/xtradb/include/data0data.h b/storage/xtradb/include/data0data.h
index a548c7b89b3..1d954bfc07c 100644
--- a/storage/xtradb/include/data0data.h
+++ b/storage/xtradb/include/data0data.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -46,7 +46,7 @@ dtype_t*
dfield_get_type(
/*============*/
const dfield_t* field) /*!< in: SQL data field */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Gets pointer to the data in a field.
@return pointer to data */
@@ -55,7 +55,7 @@ void*
dfield_get_data(
/*============*/
const dfield_t* field) /*!< in: field */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#else /* UNIV_DEBUG */
# define dfield_get_type(field) (&(field)->type)
# define dfield_get_data(field) ((field)->data)
@@ -68,7 +68,7 @@ dfield_set_type(
/*============*/
dfield_t* field, /*!< in: SQL data field */
const dtype_t* type) /*!< in: pointer to data type struct */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Gets length of field data.
@return length of data; UNIV_SQL_NULL if SQL null data */
@@ -77,7 +77,7 @@ ulint
dfield_get_len(
/*===========*/
const dfield_t* field) /*!< in: field */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Sets length in a field. */
UNIV_INLINE
@@ -86,7 +86,7 @@ dfield_set_len(
/*===========*/
dfield_t* field, /*!< in: field */
ulint len) /*!< in: length or UNIV_SQL_NULL */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Determines if a field is SQL NULL
@return nonzero if SQL null data */
@@ -95,7 +95,7 @@ ulint
dfield_is_null(
/*===========*/
const dfield_t* field) /*!< in: field */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Determines if a field is externally stored
@return nonzero if externally stored */
@@ -104,7 +104,7 @@ ulint
dfield_is_ext(
/*==========*/
const dfield_t* field) /*!< in: field */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Sets the "external storage" flag */
UNIV_INLINE
@@ -112,7 +112,7 @@ void
dfield_set_ext(
/*===========*/
dfield_t* field) /*!< in/out: field */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Sets pointer to the data and length in a field. */
UNIV_INLINE
@@ -122,7 +122,7 @@ dfield_set_data(
dfield_t* field, /*!< in: field */
const void* data, /*!< in: data */
ulint len) /*!< in: length or UNIV_SQL_NULL */
- __attribute__((nonnull(1)));
+ MY_ATTRIBUTE((nonnull(1)));
/*********************************************************************//**
Sets a data field to SQL NULL. */
UNIV_INLINE
@@ -130,7 +130,7 @@ void
dfield_set_null(
/*============*/
dfield_t* field) /*!< in/out: field */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Writes an SQL null field full of zeros. */
UNIV_INLINE
@@ -139,7 +139,7 @@ data_write_sql_null(
/*================*/
byte* data, /*!< in: pointer to a buffer of size len */
ulint len) /*!< in: SQL null size in bytes */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Copies the data and len fields. */
UNIV_INLINE
@@ -148,7 +148,7 @@ dfield_copy_data(
/*=============*/
dfield_t* field1, /*!< out: field to copy to */
const dfield_t* field2) /*!< in: field to copy from */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Copies a data field to another. */
UNIV_INLINE
@@ -157,7 +157,7 @@ dfield_copy(
/*========*/
dfield_t* field1, /*!< out: field to copy to */
const dfield_t* field2) /*!< in: field to copy from */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Copies the data pointed to by a data field. */
UNIV_INLINE
@@ -166,7 +166,7 @@ dfield_dup(
/*=======*/
dfield_t* field, /*!< in/out: data field */
mem_heap_t* heap) /*!< in: memory heap where allocated */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#ifndef UNIV_HOTBACKUP
/*********************************************************************//**
Tests if two data fields are equal.
@@ -181,7 +181,7 @@ dfield_datas_are_binary_equal(
const dfield_t* field2, /*!< in: field */
ulint len) /*!< in: maximum prefix to compare,
or 0 to compare the whole field length */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Tests if dfield data length and content is equal to the given.
@return TRUE if equal */
@@ -192,7 +192,7 @@ dfield_data_is_binary_equal(
const dfield_t* field, /*!< in: field */
ulint len, /*!< in: data length or UNIV_SQL_NULL */
const byte* data) /*!< in: data */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#endif /* !UNIV_HOTBACKUP */
/*********************************************************************//**
Gets number of fields in a data tuple.
@@ -202,7 +202,7 @@ ulint
dtuple_get_n_fields(
/*================*/
const dtuple_t* tuple) /*!< in: tuple */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#ifdef UNIV_DEBUG
/*********************************************************************//**
Gets nth field of a tuple.
@@ -224,7 +224,7 @@ ulint
dtuple_get_info_bits(
/*=================*/
const dtuple_t* tuple) /*!< in: tuple */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Sets info bits in a data tuple. */
UNIV_INLINE
@@ -233,7 +233,7 @@ dtuple_set_info_bits(
/*=================*/
dtuple_t* tuple, /*!< in: tuple */
ulint info_bits) /*!< in: info bits */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Gets number of fields used in record comparisons.
@return number of fields used in comparisons in rem0cmp.* */
@@ -242,7 +242,7 @@ ulint
dtuple_get_n_fields_cmp(
/*====================*/
const dtuple_t* tuple) /*!< in: tuple */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Gets number of fields used in record comparisons. */
UNIV_INLINE
@@ -252,7 +252,7 @@ dtuple_set_n_fields_cmp(
dtuple_t* tuple, /*!< in: tuple */
ulint n_fields_cmp) /*!< in: number of fields used in
comparisons in rem0cmp.* */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/* Estimate the number of bytes that are going to be allocated when
creating a new dtuple_t object */
@@ -272,7 +272,7 @@ dtuple_create_from_mem(
void* buf, /*!< in, out: buffer to use */
ulint buf_size, /*!< in: buffer size */
ulint n_fields) /*!< in: number of fields */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/**********************************************************//**
Creates a data tuple to a memory heap. The default value for number
@@ -286,7 +286,7 @@ dtuple_create(
is created, DTUPLE_EST_ALLOC(n_fields)
bytes will be allocated from this heap */
ulint n_fields)/*!< in: number of fields */
- __attribute__((nonnull, malloc));
+ MY_ATTRIBUTE((nonnull, malloc));
/*********************************************************************//**
Sets number of fields used in a tuple. Normally this is set in
@@ -297,7 +297,7 @@ dtuple_set_n_fields(
/*================*/
dtuple_t* tuple, /*!< in: tuple */
ulint n_fields) /*!< in: number of fields */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Copies a data tuple to another. This is a shallow copy; if a deep copy
is desired, dfield_dup() will have to be invoked on each field.
@@ -309,7 +309,7 @@ dtuple_copy(
const dtuple_t* tuple, /*!< in: tuple to copy from */
mem_heap_t* heap) /*!< in: memory heap
where the tuple is created */
- __attribute__((nonnull, malloc));
+ MY_ATTRIBUTE((nonnull, malloc));
/**********************************************************//**
The following function returns the sum of data lengths of a tuple. The space
occupied by the field structs or the tuple struct is not counted.
@@ -320,7 +320,7 @@ dtuple_get_data_size(
/*=================*/
const dtuple_t* tuple, /*!< in: typed data tuple */
ulint comp) /*!< in: nonzero=ROW_FORMAT=COMPACT */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Computes the number of externally stored fields in a data tuple.
@return number of fields */
@@ -329,7 +329,7 @@ ulint
dtuple_get_n_ext(
/*=============*/
const dtuple_t* tuple) /*!< in: tuple */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/************************************************************//**
Compare two data tuples, respecting the collation of character fields.
@return 1, 0 , -1 if tuple1 is greater, equal, less, respectively,
@@ -340,7 +340,7 @@ dtuple_coll_cmp(
/*============*/
const dtuple_t* tuple1, /*!< in: tuple 1 */
const dtuple_t* tuple2) /*!< in: tuple 2 */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/************************************************************//**
Folds a prefix given as the number of fields of a tuple.
@return the folded value */
@@ -353,7 +353,7 @@ dtuple_fold(
ulint n_bytes,/*!< in: number of bytes to fold in an
incomplete last field */
index_id_t tree_id)/*!< in: index tree id */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/*******************************************************************//**
Sets types of fields binary in a tuple. */
UNIV_INLINE
@@ -362,7 +362,7 @@ dtuple_set_types_binary(
/*====================*/
dtuple_t* tuple, /*!< in: data tuple */
ulint n) /*!< in: number of fields to set */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Checks if a dtuple contains an SQL null value.
@return TRUE if some field is SQL null */
@@ -371,7 +371,7 @@ ibool
dtuple_contains_null(
/*=================*/
const dtuple_t* tuple) /*!< in: dtuple */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/**********************************************************//**
Checks that a data field is typed. Asserts an error if not.
@return TRUE if ok */
@@ -380,7 +380,7 @@ ibool
dfield_check_typed(
/*===============*/
const dfield_t* field) /*!< in: data field */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/**********************************************************//**
Checks that a data tuple is typed. Asserts an error if not.
@return TRUE if ok */
@@ -389,7 +389,7 @@ ibool
dtuple_check_typed(
/*===============*/
const dtuple_t* tuple) /*!< in: tuple */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/**********************************************************//**
Checks that a data tuple is typed.
@return TRUE if ok */
@@ -398,7 +398,7 @@ ibool
dtuple_check_typed_no_assert(
/*=========================*/
const dtuple_t* tuple) /*!< in: tuple */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#ifdef UNIV_DEBUG
/**********************************************************//**
Validates the consistency of a tuple which must be complete, i.e,
@@ -409,7 +409,7 @@ ibool
dtuple_validate(
/*============*/
const dtuple_t* tuple) /*!< in: tuple */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#endif /* UNIV_DEBUG */
/*************************************************************//**
Pretty prints a dfield value according to its data type. */
@@ -418,7 +418,7 @@ void
dfield_print(
/*=========*/
const dfield_t* dfield) /*!< in: dfield */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*************************************************************//**
Pretty prints a dfield value according to its data type. Also the hex string
is printed if a string contains non-printable characters. */
@@ -427,7 +427,7 @@ void
dfield_print_also_hex(
/*==================*/
const dfield_t* dfield) /*!< in: dfield */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************//**
The following function prints the contents of a tuple. */
UNIV_INTERN
@@ -436,7 +436,7 @@ dtuple_print(
/*=========*/
FILE* f, /*!< in: output stream */
const dtuple_t* tuple) /*!< in: tuple */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**************************************************************//**
Moves parts of long fields in entry to the big record vector so that
the size of tuple drops below the maximum record size allowed in the
@@ -453,7 +453,7 @@ dtuple_convert_big_rec(
dtuple_t* entry, /*!< in/out: index entry */
ulint* n_ext) /*!< in/out: number of
externally stored columns */
- __attribute__((nonnull, malloc, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, malloc, warn_unused_result));
/**************************************************************//**
Puts back to entry the data stored in vector. Note that to ensure the
fields in entry can accommodate the data, vector must have been created
@@ -466,7 +466,7 @@ dtuple_convert_back_big_rec(
dtuple_t* entry, /*!< in: entry whose data was put to vector */
big_rec_t* vector) /*!< in, own: big rec vector; it is
freed in this function */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**************************************************************//**
Frees the memory in a big rec vector. */
UNIV_INLINE
@@ -475,7 +475,7 @@ dtuple_big_rec_free(
/*================*/
big_rec_t* vector) /*!< in, own: big rec vector; it is
freed in this function */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*######################################################################*/
diff --git a/storage/xtradb/include/data0data.ic b/storage/xtradb/include/data0data.ic
index 6937d55d211..11499ab928c 100644
--- a/storage/xtradb/include/data0data.ic
+++ b/storage/xtradb/include/data0data.ic
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -56,7 +56,8 @@ dfield_set_type(
dfield_t* field, /*!< in: SQL data field */
const dtype_t* type) /*!< in: pointer to data type struct */
{
- ut_ad(field && type);
+ ut_ad(field != NULL);
+ ut_ad(type != NULL);
field->type = *type;
}
@@ -194,7 +195,8 @@ dfield_copy_data(
dfield_t* field1, /*!< out: field to copy to */
const dfield_t* field2) /*!< in: field to copy from */
{
- ut_ad(field1 && field2);
+ ut_ad(field1 != NULL);
+ ut_ad(field2 != NULL);
field1->data = field2->data;
field1->len = field2->len;
diff --git a/storage/xtradb/include/dict0boot.h b/storage/xtradb/include/dict0boot.h
index a994c9d8ff1..477e1150f43 100644
--- a/storage/xtradb/include/dict0boot.h
+++ b/storage/xtradb/include/dict0boot.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -95,7 +95,7 @@ UNIV_INTERN
dberr_t
dict_boot(void)
/*===========*/
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
/*****************************************************************//**
Creates and initializes the data dictionary at the server bootstrap.
@@ -104,7 +104,7 @@ UNIV_INTERN
dberr_t
dict_create(void)
/*=============*/
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
/*********************************************************************//**
Check if a table id belongs to system table.
@@ -114,7 +114,7 @@ bool
dict_is_sys_table(
/*==============*/
table_id_t id) /*!< in: table id to check */
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
/* Space id and page no where the dictionary header resides */
#define DICT_HDR_SPACE 0 /* the SYSTEM tablespace */
diff --git a/storage/xtradb/include/dict0crea.h b/storage/xtradb/include/dict0crea.h
index 3b746fcf83c..77627c9bf67 100644
--- a/storage/xtradb/include/dict0crea.h
+++ b/storage/xtradb/include/dict0crea.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -137,7 +137,7 @@ dict_create_add_foreign_id(
incremented if used */
const char* name, /*!< in: table name */
dict_foreign_t* foreign)/*!< in/out: foreign key */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/** Adds the given set of foreign key objects to the dictionary tables
in the database. This function does not modify the dictionary cache. The
@@ -156,7 +156,7 @@ dict_create_add_foreigns_to_dictionary(
const dict_foreign_set& local_fk_set,
const dict_table_t* table,
trx_t* trx)
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/****************************************************************//**
Creates the tablespaces and datafiles system tables inside InnoDB
at server bootstrap or server start if they are not found or are
@@ -192,7 +192,7 @@ dict_create_add_foreign_to_dictionary(
const char* name, /*!< in: table name */
const dict_foreign_t* foreign,/*!< in: foreign key */
trx_t* trx) /*!< in/out: dictionary transaction */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/* Table create node structure */
struct tab_node_t{
diff --git a/storage/xtradb/include/dict0crea.ic b/storage/xtradb/include/dict0crea.ic
index 2d0d9dcb858..1cbaa47032b 100644
--- a/storage/xtradb/include/dict0crea.ic
+++ b/storage/xtradb/include/dict0crea.ic
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -33,7 +33,7 @@ UNIV_INTERN
bool
row_is_mysql_tmp_table_name(
/*========================*/
- const char* name) __attribute__((warn_unused_result));
+ const char* name) MY_ATTRIBUTE((warn_unused_result));
/*!< in: table name in the form
'database/tablename' */
diff --git a/storage/xtradb/include/dict0dict.h b/storage/xtradb/include/dict0dict.h
index 2b73efaabc7..e843d63e717 100644
--- a/storage/xtradb/include/dict0dict.h
+++ b/storage/xtradb/include/dict0dict.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
Copyright (c) 2013, 2015, MariaDB Corporation.
@@ -59,7 +59,7 @@ void
dict_casedn_str(
/*============*/
char* a) /*!< in/out: string to put in lower case */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/********************************************************************//**
Get the database name length in a table name.
@return database name length */
@@ -69,7 +69,7 @@ dict_get_db_name_len(
/*=================*/
const char* name) /*!< in: table name in the form
dbname '/' tablename */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Open a table from its database and table name, this is currently used by
foreign constraint parser to get the referenced table.
@@ -113,7 +113,7 @@ dict_remove_db_name(
/*================*/
const char* name) /*!< in: table name in the form
dbname '/' tablename */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/** Operation to perform when opening a table */
enum dict_table_op_t {
@@ -161,7 +161,7 @@ dict_table_close(
ibool try_drop) /*!< in: TRUE=try to drop any orphan
indexes after an aborted online
index creation */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Inits the data dictionary module. */
UNIV_INTERN
@@ -186,7 +186,7 @@ ulint
dict_col_get_mbminlen(
/*==================*/
const dict_col_t* col) /*!< in: column */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Gets the maximum number of bytes per character.
@return maximum multi-byte char size, in bytes */
@@ -195,7 +195,7 @@ ulint
dict_col_get_mbmaxlen(
/*==================*/
const dict_col_t* col) /*!< in: column */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Sets the minimum and maximum number of bytes per character. */
UNIV_INLINE
@@ -207,7 +207,7 @@ dict_col_set_mbminmaxlen(
character size, in bytes */
ulint mbmaxlen) /*!< in: minimum multi-byte
character size, in bytes */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Gets the column data type. */
UNIV_INLINE
@@ -216,7 +216,7 @@ dict_col_copy_type(
/*===============*/
const dict_col_t* col, /*!< in: column */
dtype_t* type) /*!< out: data type */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Determine bytes of column prefix to be stored in the undo log. Please
note if the table format is UNIV_FORMAT_A (< UNIV_FORMAT_B), no prefix
@@ -229,7 +229,7 @@ dict_max_field_len_store_undo(
dict_table_t* table, /*!< in: table */
const dict_col_t* col) /*!< in: column which index prefix
is based on */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#endif /* !UNIV_HOTBACKUP */
#ifdef UNIV_DEBUG
/*********************************************************************//**
@@ -241,7 +241,7 @@ dict_col_type_assert_equal(
/*=======================*/
const dict_col_t* col, /*!< in: column */
const dtype_t* type) /*!< in: data type */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#endif /* UNIV_DEBUG */
#ifndef UNIV_HOTBACKUP
/***********************************************************************//**
@@ -252,7 +252,7 @@ ulint
dict_col_get_min_size(
/*==================*/
const dict_col_t* col) /*!< in: column */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/***********************************************************************//**
Returns the maximum size of the column.
@return maximum size */
@@ -261,7 +261,7 @@ ulint
dict_col_get_max_size(
/*==================*/
const dict_col_t* col) /*!< in: column */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/***********************************************************************//**
Returns the size of a fixed size column, 0 if not a fixed size column.
@return fixed size, or 0 */
@@ -271,7 +271,7 @@ dict_col_get_fixed_size(
/*====================*/
const dict_col_t* col, /*!< in: column */
ulint comp) /*!< in: nonzero=ROW_FORMAT=COMPACT */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/***********************************************************************//**
Returns the ROW_FORMAT=REDUNDANT stored SQL NULL size of a column.
For fixed length types it is the fixed length of the type, otherwise 0.
@@ -282,7 +282,7 @@ dict_col_get_sql_null_size(
/*=======================*/
const dict_col_t* col, /*!< in: column */
ulint comp) /*!< in: nonzero=ROW_FORMAT=COMPACT */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Gets the column number.
@return col->ind, table column position (starting from 0) */
@@ -291,7 +291,7 @@ ulint
dict_col_get_no(
/*============*/
const dict_col_t* col) /*!< in: column */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Gets the column position in the clustered index. */
UNIV_INLINE
@@ -300,7 +300,7 @@ dict_col_get_clust_pos(
/*===================*/
const dict_col_t* col, /*!< in: table column */
const dict_index_t* clust_index) /*!< in: clustered index */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/****************************************************************//**
If the given column name is reserved for InnoDB system columns, return
TRUE.
@@ -310,7 +310,7 @@ ibool
dict_col_name_is_reserved(
/*======================*/
const char* name) /*!< in: column name */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/********************************************************************//**
Acquire the autoinc lock. */
UNIV_INTERN
@@ -318,7 +318,7 @@ void
dict_table_autoinc_lock(
/*====================*/
dict_table_t* table) /*!< in/out: table */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/********************************************************************//**
Unconditionally set the autoinc counter. */
UNIV_INTERN
@@ -327,7 +327,7 @@ dict_table_autoinc_initialize(
/*==========================*/
dict_table_t* table, /*!< in/out: table */
ib_uint64_t value) /*!< in: next value to assign to a row */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/** Store autoinc value when the table is evicted.
@param[in] table table evicted */
@@ -352,7 +352,7 @@ ib_uint64_t
dict_table_autoinc_read(
/*====================*/
const dict_table_t* table) /*!< in: table */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/********************************************************************//**
Updates the autoinc counter if the value supplied is greater than the
current value. */
@@ -363,7 +363,7 @@ dict_table_autoinc_update_if_greater(
dict_table_t* table, /*!< in/out: table */
ib_uint64_t value) /*!< in: value which was assigned to a row */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/********************************************************************//**
Release the autoinc lock. */
UNIV_INTERN
@@ -371,7 +371,7 @@ void
dict_table_autoinc_unlock(
/*======================*/
dict_table_t* table) /*!< in/out: table */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#endif /* !UNIV_HOTBACKUP */
/**********************************************************************//**
Adds system columns to a table object. */
@@ -381,7 +381,7 @@ dict_table_add_system_columns(
/*==========================*/
dict_table_t* table, /*!< in/out: table */
mem_heap_t* heap) /*!< in: temporary heap */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#ifndef UNIV_HOTBACKUP
/**********************************************************************//**
Adds a table object to the dictionary cache. */
@@ -392,7 +392,7 @@ dict_table_add_to_cache(
dict_table_t* table, /*!< in: table */
ibool can_be_evicted, /*!< in: TRUE if can be evicted*/
mem_heap_t* heap) /*!< in: temporary heap */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Removes a table object from the dictionary cache. */
UNIV_INTERN
@@ -400,7 +400,7 @@ void
dict_table_remove_from_cache(
/*=========================*/
dict_table_t* table) /*!< in, own: table */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Removes a table object from the dictionary cache. */
UNIV_INTERN
@@ -423,7 +423,7 @@ dict_table_rename_in_cache(
/*!< in: in ALTER TABLE we want
to preserve the original table name
in constraints which reference it */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/**********************************************************************//**
Removes an index from the dictionary cache. */
UNIV_INTERN
@@ -432,7 +432,7 @@ dict_index_remove_from_cache(
/*=========================*/
dict_table_t* table, /*!< in/out: table */
dict_index_t* index) /*!< in, own: index */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Change the id of a table object in the dictionary cache. This is used in
DISCARD TABLESPACE. */
@@ -442,7 +442,7 @@ dict_table_change_id_in_cache(
/*==========================*/
dict_table_t* table, /*!< in/out: table object already in cache */
table_id_t new_id) /*!< in: new id to set */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Removes a foreign constraint struct from the dictionary cache. */
UNIV_INTERN
@@ -450,7 +450,7 @@ void
dict_foreign_remove_from_cache(
/*===========================*/
dict_foreign_t* foreign) /*!< in, own: foreign constraint */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Adds a foreign key constraint object to the dictionary cache. May free
the object if there already is an object with the same identifier in.
@@ -471,7 +471,7 @@ dict_foreign_add_to_cache(
compatibility */
dict_err_ignore_t ignore_err)
/*!< in: error to be ignored */
- __attribute__((nonnull(1), warn_unused_result));
+ MY_ATTRIBUTE((nonnull(1), warn_unused_result));
/*********************************************************************//**
Checks if a table is referenced by foreign keys.
@return TRUE if table is referenced by a foreign key */
@@ -480,7 +480,7 @@ ibool
dict_table_is_referenced_by_foreign_key(
/*====================================*/
const dict_table_t* table) /*!< in: InnoDB table */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/**********************************************************************//**
Replace the index passed in with another equivalent index in the
foreign key lists of the table.
@@ -494,7 +494,7 @@ dict_foreign_replace_index(
/*!< in: column names, or NULL
to use table->col_names */
const dict_index_t* index) /*!< in: index to be replaced */
- __attribute__((nonnull(1,3), warn_unused_result));
+ MY_ATTRIBUTE((nonnull(1,3), warn_unused_result));
/**********************************************************************//**
Determines whether a string starts with the specified keyword.
@return TRUE if str starts with keyword */
@@ -505,7 +505,7 @@ dict_str_starts_with_keyword(
THD* thd, /*!< in: MySQL thread handle */
const char* str, /*!< in: string to scan for keyword */
const char* keyword) /*!< in: keyword to look for */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Scans a table create SQL string and adds to the data dictionary
the foreign key constraints declared in the string. This function
@@ -534,7 +534,7 @@ dict_create_foreign_constraints(
ibool reject_fks) /*!< in: if TRUE, fail with error
code DB_CANNOT_ADD_CONSTRAINT if
any foreign keys are found. */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/**********************************************************************//**
Parses the CONSTRAINT id's to be dropped in an ALTER TABLE statement.
@return DB_SUCCESS or DB_CANNOT_DROP_CONSTRAINT if syntax error or the
@@ -551,7 +551,7 @@ dict_foreign_parse_drop_constraints(
to drop */
const char*** constraints_to_drop) /*!< out: id's of the
constraints to drop */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/**********************************************************************//**
Returns a table object and increments its open handle count.
NOTE! This is a high-level function to be used mainly from outside the
@@ -570,7 +570,7 @@ dict_table_open_on_name(
dict_err_ignore_t
ignore_err) /*!< in: error to be ignored when
loading the table */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Tries to find an index whose first fields are the columns in the array,
@@ -606,7 +606,7 @@ dict_foreign_find_index(
dict_index_t** err_index)
/*!< out: index where error
happened */
- __attribute__((nonnull(1,3), warn_unused_result));
+ MY_ATTRIBUTE((nonnull(1,3), warn_unused_result));
/**********************************************************************//**
Returns a column's name.
@return column name. NOTE: not guaranteed to stay valid if table is
@@ -617,7 +617,7 @@ dict_table_get_col_name(
/*====================*/
const dict_table_t* table, /*!< in: table */
ulint col_nr) /*!< in: column number */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/**********************************************************************//**
Returns a column's name.
@return column name. NOTE: not guaranteed to stay valid if table is
@@ -636,7 +636,7 @@ void
dict_table_print(
/*=============*/
dict_table_t* table) /*!< in: table */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Outputs info on foreign keys of a table. */
UNIV_INTERN
@@ -668,7 +668,7 @@ dict_index_name_print(
FILE* file, /*!< in: output stream */
const trx_t* trx, /*!< in: transaction */
const dict_index_t* index) /*!< in: index to print */
- __attribute__((nonnull(1,3)));
+ MY_ATTRIBUTE((nonnull(1,3)));
/*********************************************************************//**
Tries to find an index whose first fields are the columns in the array,
in the same order and is not marked for deletion and is not the same
@@ -705,7 +705,7 @@ dict_foreign_qualify_index(
/*!< out: index where error
happened */
- __attribute__((nonnull(1,3), warn_unused_result));
+ MY_ATTRIBUTE((nonnull(1,3), warn_unused_result));
#ifdef UNIV_DEBUG
/********************************************************************//**
Gets the first index on the table (the clustered index).
@@ -715,7 +715,7 @@ dict_index_t*
dict_table_get_first_index(
/*=======================*/
const dict_table_t* table) /*!< in: table */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/********************************************************************//**
Gets the last index on the table.
@return index, NULL if none exists */
@@ -724,7 +724,7 @@ dict_index_t*
dict_table_get_last_index(
/*=======================*/
const dict_table_t* table) /*!< in: table */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/********************************************************************//**
Gets the next index on the table.
@return index, NULL if none left */
@@ -733,7 +733,7 @@ dict_index_t*
dict_table_get_next_index(
/*======================*/
const dict_index_t* index) /*!< in: index */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#else /* UNIV_DEBUG */
# define dict_table_get_first_index(table) UT_LIST_GET_FIRST((table)->indexes)
# define dict_table_get_last_index(table) UT_LIST_GET_LAST((table)->indexes)
@@ -762,7 +762,7 @@ ulint
dict_index_is_clust(
/*================*/
const dict_index_t* index) /*!< in: index */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/********************************************************************//**
Check whether the index is unique.
@return nonzero for unique index, zero for other indexes */
@@ -771,7 +771,7 @@ ulint
dict_index_is_unique(
/*=================*/
const dict_index_t* index) /*!< in: index */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/********************************************************************//**
Check whether the index is the insert buffer tree.
@return nonzero for insert buffer, zero for other indexes */
@@ -780,7 +780,7 @@ ulint
dict_index_is_ibuf(
/*===============*/
const dict_index_t* index) /*!< in: index */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/********************************************************************//**
Check whether the index is a secondary index or the insert buffer tree.
@return nonzero for insert buffer, zero for other indexes */
@@ -789,7 +789,7 @@ ulint
dict_index_is_sec_or_ibuf(
/*======================*/
const dict_index_t* index) /*!< in: index */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/************************************************************************
Gets the all the FTS indexes for the table. NOTE: must not be called for
@@ -801,7 +801,7 @@ dict_table_get_all_fts_indexes(
/* out: number of indexes collected */
dict_table_t* table, /* in: table */
ib_vector_t* indexes)/* out: vector for collecting FTS indexes */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/********************************************************************//**
Gets the number of user-defined columns in a table in the dictionary
cache.
@@ -811,7 +811,7 @@ ulint
dict_table_get_n_user_cols(
/*=======================*/
const dict_table_t* table) /*!< in: table */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/********************************************************************//**
Gets the number of system columns in a table in the dictionary cache.
@return number of system (e.g., ROW_ID) columns of a table */
@@ -820,7 +820,7 @@ ulint
dict_table_get_n_sys_cols(
/*======================*/
const dict_table_t* table) /*!< in: table */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/********************************************************************//**
Gets the number of all columns (also system) in a table in the dictionary
cache.
@@ -830,7 +830,7 @@ ulint
dict_table_get_n_cols(
/*==================*/
const dict_table_t* table) /*!< in: table */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/********************************************************************//**
Gets the approximately estimated number of rows in the table.
@return estimated number of rows */
@@ -839,7 +839,7 @@ ib_uint64_t
dict_table_get_n_rows(
/*==================*/
const dict_table_t* table) /*!< in: table */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/********************************************************************//**
Increment the number of rows in the table by one.
Notice that this operation is not protected by any latch, the number is
@@ -849,7 +849,7 @@ void
dict_table_n_rows_inc(
/*==================*/
dict_table_t* table) /*!< in/out: table */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/********************************************************************//**
Decrement the number of rows in the table by one.
Notice that this operation is not protected by any latch, the number is
@@ -859,7 +859,7 @@ void
dict_table_n_rows_dec(
/*==================*/
dict_table_t* table) /*!< in/out: table */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#ifdef UNIV_DEBUG
/********************************************************************//**
Gets the nth column of a table.
@@ -870,7 +870,7 @@ dict_table_get_nth_col(
/*===================*/
const dict_table_t* table, /*!< in: table */
ulint pos) /*!< in: position of column */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/********************************************************************//**
Gets the given system column of a table.
@return pointer to column object */
@@ -880,7 +880,7 @@ dict_table_get_sys_col(
/*===================*/
const dict_table_t* table, /*!< in: table */
ulint sys) /*!< in: DATA_ROW_ID, ... */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#else /* UNIV_DEBUG */
#define dict_table_get_nth_col(table, pos) \
((table)->cols + (pos))
@@ -896,7 +896,7 @@ dict_table_get_sys_col_no(
/*======================*/
const dict_table_t* table, /*!< in: table */
ulint sys) /*!< in: DATA_ROW_ID, ... */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#ifndef UNIV_HOTBACKUP
/********************************************************************//**
Returns the minimum data size of an index record.
@@ -906,7 +906,7 @@ ulint
dict_index_get_min_size(
/*====================*/
const dict_index_t* index) /*!< in: index */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#endif /* !UNIV_HOTBACKUP */
/********************************************************************//**
Check whether the table uses the compact page format.
@@ -916,7 +916,7 @@ ibool
dict_table_is_comp(
/*===============*/
const dict_table_t* table) /*!< in: table */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/********************************************************************//**
Determine the file format of a table.
@return file format version */
@@ -925,7 +925,7 @@ ulint
dict_table_get_format(
/*==================*/
const dict_table_t* table) /*!< in: table */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/********************************************************************//**
Determine the file format from a dict_table_t::flags.
@return file format version */
@@ -934,7 +934,7 @@ ulint
dict_tf_get_format(
/*===============*/
ulint flags) /*!< in: dict_table_t::flags */
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
/********************************************************************//**
Set the various values in a dict_table_t::flags pointer. */
UNIV_INLINE
@@ -969,7 +969,7 @@ ulint
dict_tf_to_fsp_flags(
/*=================*/
ulint flags) /*!< in: dict_table_t::flags */
- __attribute__((const));
+ MY_ATTRIBUTE((const));
/********************************************************************//**
Extract the compressed page size from table flags.
@return compressed page size, or 0 if not compressed */
@@ -978,7 +978,7 @@ ulint
dict_tf_get_zip_size(
/*=================*/
ulint flags) /*!< in: flags */
- __attribute__((const));
+ MY_ATTRIBUTE((const));
/********************************************************************//**
Check whether the table uses the compressed compact page format.
@return compressed page size, or 0 if not compressed */
@@ -987,7 +987,7 @@ ulint
dict_table_zip_size(
/*================*/
const dict_table_t* table) /*!< in: table */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#ifndef UNIV_HOTBACKUP
/*********************************************************************//**
Obtain exclusive locks on all index trees of the table. This is to prevent
@@ -998,7 +998,7 @@ void
dict_table_x_lock_indexes(
/*======================*/
dict_table_t* table) /*!< in: table */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Release the exclusive locks on all index tree. */
UNIV_INLINE
@@ -1006,7 +1006,7 @@ void
dict_table_x_unlock_indexes(
/*========================*/
dict_table_t* table) /*!< in: table */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/********************************************************************//**
Checks if a column is in the ordering columns of the clustered index of a
table. Column prefixes are treated like whole columns.
@@ -1017,7 +1017,7 @@ dict_table_col_in_clustered_key(
/*============================*/
const dict_table_t* table, /*!< in: table */
ulint n) /*!< in: column number */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*******************************************************************//**
Check if the table has an FTS index.
@return TRUE if table has an FTS index */
@@ -1026,7 +1026,7 @@ ibool
dict_table_has_fts_index(
/*=====================*/
dict_table_t* table) /*!< in: table */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*******************************************************************//**
Copies types of columns contained in table to tuple and sets all
fields of the tuple to the SQL NULL value. This function should
@@ -1037,7 +1037,7 @@ dict_table_copy_types(
/*==================*/
dtuple_t* tuple, /*!< in/out: data tuple */
const dict_table_t* table) /*!< in: table */
- __attribute__((nonnull));
+ 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
@@ -1049,7 +1049,7 @@ 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. */
- __attribute__((nonnull));
+ 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
@@ -1060,7 +1060,7 @@ dict_index_t*
dict_index_find_on_id_low(
/*======================*/
index_id_t id) /*!< in: index id */
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
/**********************************************************************//**
Make room in the table cache by evicting an unused table. The unused table
should not be part of FK relationship and currently not used in any user
@@ -1086,7 +1086,7 @@ dict_index_add_to_cache(
ibool strict) /*!< in: TRUE=refuse to create the index
if records could be too big to fit in
an B-tree page */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/**********************************************************************//**
Removes an index from the dictionary cache. */
UNIV_INTERN
@@ -1095,7 +1095,7 @@ dict_index_remove_from_cache(
/*=========================*/
dict_table_t* table, /*!< in/out: table */
dict_index_t* index) /*!< in, own: index */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#endif /* !UNIV_HOTBACKUP */
/********************************************************************//**
Gets the number of fields in the internal representation of an index,
@@ -1108,7 +1108,7 @@ dict_index_get_n_fields(
const dict_index_t* index) /*!< in: an internal
representation of index (in
the dictionary cache) */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/********************************************************************//**
Gets the number of fields in the internal representation of an index
that uniquely determine the position of an index entry in the index, if
@@ -1121,7 +1121,7 @@ dict_index_get_n_unique(
/*====================*/
const dict_index_t* index) /*!< in: an internal representation
of index (in the dictionary cache) */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/********************************************************************//**
Gets the number of fields in the internal representation of an index
which uniquely determine the position of an index entry in the index, if
@@ -1133,7 +1133,7 @@ dict_index_get_n_unique_in_tree(
/*============================*/
const dict_index_t* index) /*!< in: an internal representation
of index (in the dictionary cache) */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/********************************************************************//**
Gets the number of user-defined ordering fields in the index. In the internal
representation we add the row id to the ordering fields to make all indexes
@@ -1146,7 +1146,7 @@ dict_index_get_n_ordering_defined_by_user(
/*======================================*/
const dict_index_t* index) /*!< in: an internal representation
of index (in the dictionary cache) */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#ifdef UNIV_DEBUG
/********************************************************************//**
Gets the nth field of an index.
@@ -1157,7 +1157,7 @@ dict_index_get_nth_field(
/*=====================*/
const dict_index_t* index, /*!< in: index */
ulint pos) /*!< in: position of field */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#else /* UNIV_DEBUG */
# define dict_index_get_nth_field(index, pos) ((index)->fields + (pos))
#endif /* UNIV_DEBUG */
@@ -1170,7 +1170,7 @@ dict_index_get_nth_col(
/*===================*/
const dict_index_t* index, /*!< in: index */
ulint pos) /*!< in: position of the field */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/********************************************************************//**
Gets the column number of the nth field in an index.
@return column number */
@@ -1180,7 +1180,7 @@ dict_index_get_nth_col_no(
/*======================*/
const dict_index_t* index, /*!< in: index */
ulint pos) /*!< in: position of the field */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/********************************************************************//**
Looks for column n in an index.
@return position in internal representation of the index;
@@ -1217,7 +1217,7 @@ dict_index_contains_col_or_prefix(
/*==============================*/
const dict_index_t* index, /*!< in: index */
ulint n) /*!< in: column number */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/********************************************************************//**
Looks for a matching field in an index. The column has to be the same. The
column in index must be complete, or must contain a prefix longer than the
@@ -1232,7 +1232,7 @@ dict_index_get_nth_field_pos(
const dict_index_t* index, /*!< in: index from which to search */
const dict_index_t* index2, /*!< in: index */
ulint n) /*!< in: field number in index2 */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/********************************************************************//**
Looks for column n position in the clustered index.
@return position in internal representation of the clustered index */
@@ -1242,7 +1242,7 @@ dict_table_get_nth_col_pos(
/*=======================*/
const dict_table_t* table, /*!< in: table */
ulint n) /*!< in: column number */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/********************************************************************//**
Returns the position of a system column in an index.
@return position, ULINT_UNDEFINED if not contained */
@@ -1252,7 +1252,7 @@ dict_index_get_sys_col_pos(
/*=======================*/
const dict_index_t* index, /*!< in: index */
ulint type) /*!< in: DATA_ROW_ID, ... */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*******************************************************************//**
Adds a column to index. */
UNIV_INTERN
@@ -1263,7 +1263,7 @@ dict_index_add_col(
const dict_table_t* table, /*!< in: table */
dict_col_t* col, /*!< in: column */
ulint prefix_len) /*!< in: column prefix length */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#ifndef UNIV_HOTBACKUP
/*******************************************************************//**
Copies types of fields contained in index to tuple. */
@@ -1275,7 +1275,7 @@ dict_index_copy_types(
const dict_index_t* index, /*!< in: index */
ulint n_fields) /*!< in: number of
field types to copy */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#endif /* !UNIV_HOTBACKUP */
/*********************************************************************//**
Gets the field column.
@@ -1285,7 +1285,7 @@ const dict_col_t*
dict_field_get_col(
/*===============*/
const dict_field_t* field) /*!< in: index field */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#ifndef UNIV_HOTBACKUP
/**********************************************************************//**
Returns an index object if it is found in the dictionary cache.
@@ -1296,7 +1296,7 @@ dict_index_t*
dict_index_get_if_in_cache_low(
/*===========================*/
index_id_t index_id) /*!< in: index id */
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
/**********************************************************************//**
Returns an index object if it is found in the dictionary cache.
@@ -1306,7 +1306,7 @@ dict_index_t*
dict_index_get_if_in_cache(
/*=======================*/
index_id_t index_id) /*!< in: index id */
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
#ifdef UNIV_DEBUG
/**********************************************************************//**
@@ -1319,7 +1319,7 @@ dict_index_check_search_tuple(
/*==========================*/
const dict_index_t* index, /*!< in: index tree */
const dtuple_t* tuple) /*!< in: tuple used in a search */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/** Whether and when to allow temporary index names */
enum check_name {
/** Require all indexes to be complete. */
@@ -1339,7 +1339,7 @@ dict_table_check_for_dup_indexes(
in this table */
enum check_name check) /*!< in: whether and when to allow
temporary index names */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#endif /* UNIV_DEBUG */
/**********************************************************************//**
Builds a node pointer out of a physical record and a page number.
@@ -1357,7 +1357,7 @@ dict_index_build_node_ptr(
created */
ulint level) /*!< in: level of rec in tree:
0 means leaf level */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/**********************************************************************//**
Copies an initial segment of a physical record, long enough to specify an
index entry uniquely.
@@ -1373,7 +1373,7 @@ dict_index_copy_rec_order_prefix(
byte** buf, /*!< in/out: memory buffer for the
copied prefix, or NULL */
ulint* buf_size)/*!< in/out: buffer size */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/**********************************************************************//**
Builds a typed data tuple out of a physical record.
@return own: data tuple */
@@ -1385,7 +1385,7 @@ dict_index_build_data_tuple(
rec_t* rec, /*!< in: record for which to build data tuple */
ulint n_fields,/*!< in: number of data fields */
mem_heap_t* heap) /*!< in: memory heap where tuple created */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Gets the space id of the root of the index tree.
@return space id */
@@ -1394,7 +1394,7 @@ ulint
dict_index_get_space(
/*=================*/
const dict_index_t* index) /*!< in: index */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Sets the space id of the root of the index tree. */
UNIV_INLINE
@@ -1403,7 +1403,7 @@ dict_index_set_space(
/*=================*/
dict_index_t* index, /*!< in/out: index */
ulint space) /*!< in: space id */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Gets the page number of the root of the index tree.
@return page number */
@@ -1412,7 +1412,7 @@ ulint
dict_index_get_page(
/*================*/
const dict_index_t* tree) /*!< in: index */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Gets the read-write lock of the index tree.
@return read-write lock */
@@ -1421,7 +1421,7 @@ prio_rw_lock_t*
dict_index_get_lock(
/*================*/
dict_index_t* index) /*!< in: index */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/********************************************************************//**
Returns free space reserved for future updates of records. This is
relevant only in the case of many consecutive inserts, as updates
@@ -1441,7 +1441,7 @@ enum online_index_status
dict_index_get_online_status(
/*=========================*/
const dict_index_t* index) /*!< in: secondary index */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/********************************************************************//**
Sets the status of online index creation. */
UNIV_INLINE
@@ -1450,7 +1450,7 @@ dict_index_set_online_status(
/*=========================*/
dict_index_t* index, /*!< in/out: index */
enum online_index_status status) /*!< in: status */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/********************************************************************//**
Determines if a secondary index is being or has been created online,
or if the table is being rebuilt online, allowing concurrent modifications
@@ -1464,7 +1464,7 @@ bool
dict_index_is_online_ddl(
/*=====================*/
const dict_index_t* index) /*!< in: index */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Calculates the minimum record length in an index. */
UNIV_INTERN
@@ -1472,7 +1472,7 @@ ulint
dict_index_calc_min_rec_len(
/*========================*/
const dict_index_t* index) /*!< in: index */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/********************************************************************//**
Reserves the dictionary system mutex for MySQL. */
UNIV_INTERN
@@ -1540,7 +1540,7 @@ dict_tables_have_same_db(
dbname '/' tablename */
const char* name2) /*!< in: table name in the form
dbname '/' tablename */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Removes an index from the cache */
UNIV_INTERN
@@ -1549,7 +1549,7 @@ dict_index_remove_from_cache(
/*=========================*/
dict_table_t* table, /*!< in/out: table */
dict_index_t* index) /*!< in, own: index */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Get index by name
@return index, NULL if does not exist */
@@ -1559,7 +1559,7 @@ dict_table_get_index_on_name(
/*=========================*/
dict_table_t* table, /*!< in: table */
const char* name) /*!< in: name of the index to find */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/**********************************************************************//**
Looks for an index with the given id given a table instance.
@return index or NULL */
@@ -1580,7 +1580,7 @@ dict_table_get_index_on_name_and_min_id(
/*====================================*/
dict_table_t* table, /*!< in: table */
const char* name) /*!< in: name of the index to find */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/***************************************************************
Check whether a column exists in an FTS index. */
UNIV_INLINE
@@ -1591,7 +1591,7 @@ dict_table_is_fts_column(
the offset within the vector */
ib_vector_t* indexes,/* in: vector containing only FTS indexes */
ulint col_no) /* in: col number to search for */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/**********************************************************************//**
Move a table to the non LRU end of the LRU list. */
UNIV_INTERN
@@ -1599,7 +1599,7 @@ void
dict_table_move_from_lru_to_non_lru(
/*================================*/
dict_table_t* table) /*!< in: table to move from LRU to non-LRU */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Move a table to the LRU list from the non-LRU list. */
UNIV_INTERN
@@ -1607,7 +1607,7 @@ void
dict_table_move_from_non_lru_to_lru(
/*================================*/
dict_table_t* table) /*!< in: table to move from non-LRU to LRU */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Move to the most recently used segment of the LRU list. */
UNIV_INTERN
@@ -1615,7 +1615,7 @@ void
dict_move_to_mru(
/*=============*/
dict_table_t* table) /*!< in: table to move to MRU */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/** Maximum number of columns in a foreign key constraint. Please Note MySQL
has a much lower limit on the number of columns allowed in a foreign key
@@ -1739,7 +1739,7 @@ dict_table_schema_check(
!= DB_TABLE_NOT_FOUND is
returned */
size_t errstr_sz) /*!< in: errstr size */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/* @} */
/*********************************************************************//**
@@ -1757,7 +1757,7 @@ dict_fs2utf8(
size_t db_utf8_size, /*!< in: dbname_utf8 size */
char* table_utf8, /*!< out: table name, e.g. aюbØc */
size_t table_utf8_size)/*!< in: table_utf8 size */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Closes the data dictionary module. */
@@ -1774,7 +1774,7 @@ ulint
dict_table_is_corrupted(
/*====================*/
const dict_table_t* table) /*!< in: table */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/**********************************************************************//**
Check whether the index is corrupted.
@@ -1784,7 +1784,7 @@ ulint
dict_index_is_corrupted(
/*====================*/
const dict_index_t* index) /*!< in: index */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#endif /* !UNIV_HOTBACKUP */
/**********************************************************************//**
@@ -1797,7 +1797,7 @@ dict_set_corrupted(
dict_index_t* index, /*!< in/out: index */
trx_t* trx, /*!< in/out: transaction */
const char* ctx) /*!< in: context */
- UNIV_COLD __attribute__((nonnull));
+ UNIV_COLD MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Flags an index corrupted in the data dictionary cache only. This
@@ -1809,7 +1809,7 @@ dict_set_corrupted_index_cache_only(
/*================================*/
dict_index_t* index, /*!< in/out: index */
dict_table_t* table) /*!< in/out: table */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Flags a table with specified space_id corrupted in the table dictionary
@@ -1829,7 +1829,7 @@ bool
dict_tf_is_valid(
/*=============*/
ulint flags) /*!< in: table flags */
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
/********************************************************************//**
Check if the tablespace for the table has been discarded.
@@ -1839,7 +1839,7 @@ bool
dict_table_is_discarded(
/*====================*/
const dict_table_t* table) /*!< in: table to check */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/********************************************************************//**
Check if it is a temporary table.
@@ -1849,7 +1849,7 @@ bool
dict_table_is_temporary(
/*====================*/
const dict_table_t* table) /*!< in: table to check */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
#ifndef UNIV_HOTBACKUP
/*********************************************************************//**
@@ -1860,7 +1860,7 @@ void
dict_index_zip_success(
/*===================*/
dict_index_t* index) /*!< in/out: index to be updated. */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
This function should be called whenever a page compression attempt
fails. Updates the compression padding information. */
@@ -1869,7 +1869,7 @@ void
dict_index_zip_failure(
/*===================*/
dict_index_t* index) /*!< in/out: index to be updated. */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Return the optimal page size, for which page will likely compress.
@return page size beyond which page may not compress*/
@@ -1879,7 +1879,7 @@ dict_index_zip_pad_optimal_page_size(
/*=================================*/
dict_index_t* index) /*!< in: index for which page size
is requested */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*************************************************************//**
Convert table flag to row format string.
@return row format name */
diff --git a/storage/xtradb/include/dict0dict.ic b/storage/xtradb/include/dict0dict.ic
index 2f9fc3bcfe6..d9d40b809d1 100644
--- a/storage/xtradb/include/dict0dict.ic
+++ b/storage/xtradb/include/dict0dict.ic
@@ -1,7 +1,7 @@
/*****************************************************************************
-Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2013, 2015, MariaDB
+Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2013, 2016, 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
@@ -81,7 +81,8 @@ dict_col_copy_type(
const dict_col_t* col, /*!< in: column */
dtype_t* type) /*!< out: data type */
{
- ut_ad(col && type);
+ ut_ad(col != NULL);
+ ut_ad(type != NULL);
type->mtype = col->mtype;
type->prtype = col->prtype;
@@ -358,7 +359,7 @@ UNIV_INLINE
ulint
dict_table_get_n_sys_cols(
/*======================*/
- const dict_table_t* table __attribute__((unused))) /*!< in: table */
+ const dict_table_t* table MY_ATTRIBUTE((unused))) /*!< in: table */
{
ut_ad(table);
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
diff --git a/storage/xtradb/include/dict0load.h b/storage/xtradb/include/dict0load.h
index 030190b1a8e..dcbc3de8e94 100644
--- a/storage/xtradb/include/dict0load.h
+++ b/storage/xtradb/include/dict0load.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -243,7 +243,7 @@ dict_load_foreigns(
bool check_charsets, /*!< in: whether to check
charset compatibility */
dict_err_ignore_t ignore_err) /*!< in: error to be ignored */
- __attribute__((nonnull(1), warn_unused_result));
+ MY_ATTRIBUTE((nonnull(1), warn_unused_result));
/********************************************************************//**
Prints to the standard output information on all tables found in the data
dictionary system table. */
diff --git a/storage/xtradb/include/dict0mem.h b/storage/xtradb/include/dict0mem.h
index a55d5316969..24219ac8799 100644
--- a/storage/xtradb/include/dict0mem.h
+++ b/storage/xtradb/include/dict0mem.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
Copyright (c) 2013, 2016, MariaDB Corporation.
@@ -199,19 +199,19 @@ DEFAULT=0, ON = 1, OFF = 2
/** Bit mask of the COMPACT field */
#define DICT_TF_MASK_COMPACT \
- ((~(~0 << DICT_TF_WIDTH_COMPACT)) \
+ ((~(~0U << DICT_TF_WIDTH_COMPACT)) \
<< DICT_TF_POS_COMPACT)
/** Bit mask of the ZIP_SSIZE field */
#define DICT_TF_MASK_ZIP_SSIZE \
- ((~(~0 << DICT_TF_WIDTH_ZIP_SSIZE)) \
+ ((~(~0U << DICT_TF_WIDTH_ZIP_SSIZE)) \
<< DICT_TF_POS_ZIP_SSIZE)
/** Bit mask of the ATOMIC_BLOBS field */
#define DICT_TF_MASK_ATOMIC_BLOBS \
- ((~(~0 << DICT_TF_WIDTH_ATOMIC_BLOBS)) \
+ ((~(~0U << DICT_TF_WIDTH_ATOMIC_BLOBS)) \
<< DICT_TF_POS_ATOMIC_BLOBS)
/** Bit mask of the DATA_DIR field */
#define DICT_TF_MASK_DATA_DIR \
- ((~(~0 << DICT_TF_WIDTH_DATA_DIR)) \
+ ((~(~0U << DICT_TF_WIDTH_DATA_DIR)) \
<< DICT_TF_POS_DATA_DIR)
/** Bit mask of the PAGE_COMPRESSION field */
#define DICT_TF_MASK_PAGE_COMPRESSION \
@@ -246,7 +246,7 @@ DEFAULT=0, ON = 1, OFF = 2
#define DICT_TF_HAS_ATOMIC_BLOBS(flags) \
((flags & DICT_TF_MASK_ATOMIC_BLOBS) \
>> DICT_TF_POS_ATOMIC_BLOBS)
-/** Return the value of the ATOMIC_BLOBS field */
+/** Return the value of the DATA_DIR field */
#define DICT_TF_HAS_DATA_DIR(flags) \
((flags & DICT_TF_MASK_DATA_DIR) \
>> DICT_TF_POS_DATA_DIR)
@@ -291,7 +291,7 @@ for unknown bits in order to protect backward incompatibility. */
/* @{ */
/** Total number of bits in table->flags2. */
#define DICT_TF2_BITS 7
-#define DICT_TF2_BIT_MASK ~(~0 << DICT_TF2_BITS)
+#define DICT_TF2_BIT_MASK ~(~0U << DICT_TF2_BITS)
/** TEMPORARY; TRUE for tables from CREATE TEMPORARY TABLE. */
#define DICT_TF2_TEMPORARY 1
@@ -379,7 +379,7 @@ dict_mem_table_add_col(
ulint mtype, /*!< in: main datatype */
ulint prtype, /*!< in: precise type */
ulint len) /*!< in: precision */
- __attribute__((nonnull(1)));
+ MY_ATTRIBUTE((nonnull(1)));
/**********************************************************************//**
Renames a column of a table in the data dictionary cache. */
UNIV_INTERN
@@ -390,7 +390,7 @@ dict_mem_table_col_rename(
unsigned nth_col,/*!< in: column index */
const char* from, /*!< in: old column name */
const char* to) /*!< in: new column name */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
This function populates a dict_col_t memory structure with
supplied information. */
diff --git a/storage/xtradb/include/dict0stats.h b/storage/xtradb/include/dict0stats.h
index abf56b2f0c7..72501bf9429 100644
--- a/storage/xtradb/include/dict0stats.h
+++ b/storage/xtradb/include/dict0stats.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2009, 2012, Oracle and/or its affiliates. All Rights Reserved.
+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
@@ -77,7 +77,7 @@ dict_stats_set_persistent(
dict_table_t* table, /*!< in/out: table */
ibool ps_on, /*!< in: persistent stats explicitly enabled */
ibool ps_off) /*!< in: persistent stats explicitly disabled */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Check whether persistent statistics is enabled for a given table.
@@ -87,7 +87,7 @@ ibool
dict_stats_is_persistent_enabled(
/*=============================*/
const dict_table_t* table) /*!< in: table */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Set the auto recalc flag for a given table (only honored for a persistent
@@ -127,7 +127,7 @@ void
dict_stats_deinit(
/*==============*/
dict_table_t* table) /*!< in/out: table */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Calculates new estimates for table and index statistics. The statistics
@@ -179,7 +179,7 @@ void
dict_stats_update_for_index(
/*========================*/
dict_index_t* index) /*!< in/out: index */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Renames a table in InnoDB persistent stats storage.
diff --git a/storage/xtradb/include/dict0stats_bg.h b/storage/xtradb/include/dict0stats_bg.h
index 32fac3015e8..34dc4657829 100644
--- a/storage/xtradb/include/dict0stats_bg.h
+++ b/storage/xtradb/include/dict0stats_bg.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2012, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2012, 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
@@ -96,7 +96,7 @@ bool
dict_stats_stop_bg(
/*===============*/
dict_table_t* table) /*!< in/out: table */
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
/*****************************************************************//**
Wait until background stats thread has stopped using the specified table.
diff --git a/storage/xtradb/include/dyn0dyn.h b/storage/xtradb/include/dyn0dyn.h
index 7f23302d1ff..1bd10b6bf58 100644
--- a/storage/xtradb/include/dyn0dyn.h
+++ b/storage/xtradb/include/dyn0dyn.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -48,7 +48,7 @@ dyn_array_create(
/*=============*/
dyn_array_t* arr) /*!< in/out memory buffer of
size sizeof(dyn_array_t) */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/************************************************************//**
Frees a dynamic array. */
UNIV_INLINE
@@ -56,7 +56,7 @@ void
dyn_array_free(
/*===========*/
dyn_array_t* arr) /*!< in,own: dyn array */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Makes room on top of a dyn array and returns a pointer to a buffer in it.
After copying the elements, the caller must close the buffer using
@@ -69,7 +69,7 @@ dyn_array_open(
dyn_array_t* arr, /*!< in: dynamic array */
ulint size) /*!< in: size in bytes of the buffer; MUST be
smaller than DYN_ARRAY_DATA_SIZE! */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Closes the buffer returned by dyn_array_open. */
UNIV_INLINE
@@ -78,7 +78,7 @@ dyn_array_close(
/*============*/
dyn_array_t* arr, /*!< in: dynamic array */
const byte* ptr) /*!< in: end of used space */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Makes room on top of a dyn array and returns a pointer to
the added element. The caller must copy the element to
@@ -90,7 +90,7 @@ dyn_array_push(
/*===========*/
dyn_array_t* arr, /*!< in/out: dynamic array */
ulint size) /*!< in: size in bytes of the element */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/************************************************************//**
Returns pointer to an element in dyn array.
@return pointer to element */
@@ -101,7 +101,7 @@ dyn_array_get_element(
const dyn_array_t* arr, /*!< in: dyn array */
ulint pos) /*!< in: position of element
in bytes from array start */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/************************************************************//**
Returns the size of stored data in a dyn array.
@return data size in bytes */
@@ -110,7 +110,7 @@ ulint
dyn_array_get_data_size(
/*====================*/
const dyn_array_t* arr) /*!< in: dyn array */
- __attribute__((nonnull, warn_unused_result, pure));
+ MY_ATTRIBUTE((nonnull, warn_unused_result, pure));
/************************************************************//**
Gets the first block in a dyn array.
@param arr dyn array
@@ -144,7 +144,7 @@ ulint
dyn_block_get_used(
/*===============*/
const dyn_block_t* block) /*!< in: dyn array block */
- __attribute__((nonnull, warn_unused_result, pure));
+ MY_ATTRIBUTE((nonnull, warn_unused_result, pure));
/********************************************************************//**
Gets pointer to the start of data in a dyn array block.
@return pointer to data */
@@ -153,7 +153,7 @@ byte*
dyn_block_get_data(
/*===============*/
const dyn_block_t* block) /*!< in: dyn array block */
- __attribute__((nonnull, warn_unused_result, pure));
+ MY_ATTRIBUTE((nonnull, warn_unused_result, pure));
/********************************************************//**
Pushes n bytes to a dyn array. */
UNIV_INLINE
@@ -163,7 +163,7 @@ dyn_push_string(
dyn_array_t* arr, /*!< in/out: dyn array */
const byte* str, /*!< in: string to write */
ulint len) /*!< in: string length */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*#################################################################*/
diff --git a/storage/xtradb/include/dyn0dyn.ic b/storage/xtradb/include/dyn0dyn.ic
index 0296554e2ee..f18f2e6dff9 100644
--- a/storage/xtradb/include/dyn0dyn.ic
+++ b/storage/xtradb/include/dyn0dyn.ic
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -36,7 +36,7 @@ dyn_block_t*
dyn_array_add_block(
/*================*/
dyn_array_t* arr) /*!< in/out: dyn array */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/********************************************************************//**
Gets the number of used bytes in a dyn array block.
diff --git a/storage/xtradb/include/fil0fil.h b/storage/xtradb/include/fil0fil.h
index fb9c79a3e5a..20e8303f764 100644
--- a/storage/xtradb/include/fil0fil.h
+++ b/storage/xtradb/include/fil0fil.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2013, 2016, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
@@ -436,7 +436,7 @@ fil_node_create(
ulint id, /*!< in: space id where to append */
ibool is_raw) /*!< in: TRUE if a raw device or
a raw disk partition */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#ifdef UNIV_LOG_ARCHIVE
/****************************************************************//**
Drops files from the start of a file space, so that its size is cut by
@@ -697,7 +697,7 @@ dberr_t
fil_discard_tablespace(
/*===================*/
ulint id) /*!< in: space id */
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
#endif /* !UNIV_HOTBACKUP */
/** Test if a tablespace file can be renamed to a new filepath by checking
@@ -1212,7 +1212,7 @@ fil_tablespace_iterate(
dict_table_t* table,
ulint n_io_buffers,
PageCallback& callback)
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*******************************************************************//**
Checks if a single-table tablespace for a given table name exists in the
@@ -1236,7 +1236,7 @@ fil_get_space_names(
/*================*/
space_name_list_t& space_name_list)
/*!< in/out: Vector for collecting the names. */
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
/** Generate redo log for swapping two .ibd files
@param[in] old_table old table
@@ -1251,7 +1251,7 @@ fil_mtr_rename_log(
const dict_table_t* new_table,
const char* tmp_name,
mtr_t* mtr)
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*******************************************************************//**
Finds the given page_no of the given space id from the double write buffer,
@@ -1265,6 +1265,14 @@ fil_user_tablespace_restore_page(
ulint page_no); /* in: page_no to obtain from double
write buffer */
+/*******************************************************************//**
+Returns a pointer to the file_space_t that is in the memory cache
+associated with a space id.
+@return file_space_t pointer, NULL if space not found */
+fil_space_t*
+fil_space_get(
+/*==========*/
+ ulint id); /*!< in: space id */
#endif /* !UNIV_INNOCHECKSUM */
/*************************************************************************
diff --git a/storage/xtradb/include/fsp0fsp.h b/storage/xtradb/include/fsp0fsp.h
index 839aed80418..9212328f724 100644
--- a/storage/xtradb/include/fsp0fsp.h
+++ b/storage/xtradb/include/fsp0fsp.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2013, 2016, MariaDB Corporation. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
@@ -108,23 +108,23 @@ dictionary */
/** Bit mask of the POST_ANTELOPE field */
#define FSP_FLAGS_MASK_POST_ANTELOPE \
- ((~(~0 << FSP_FLAGS_WIDTH_POST_ANTELOPE)) \
+ ((~(~0U << FSP_FLAGS_WIDTH_POST_ANTELOPE)) \
<< FSP_FLAGS_POS_POST_ANTELOPE)
/** Bit mask of the ZIP_SSIZE field */
#define FSP_FLAGS_MASK_ZIP_SSIZE \
- ((~(~0 << FSP_FLAGS_WIDTH_ZIP_SSIZE)) \
+ ((~(~0U << FSP_FLAGS_WIDTH_ZIP_SSIZE)) \
<< FSP_FLAGS_POS_ZIP_SSIZE)
/** Bit mask of the ATOMIC_BLOBS field */
#define FSP_FLAGS_MASK_ATOMIC_BLOBS \
- ((~(~0 << FSP_FLAGS_WIDTH_ATOMIC_BLOBS)) \
+ ((~(~0U << FSP_FLAGS_WIDTH_ATOMIC_BLOBS)) \
<< FSP_FLAGS_POS_ATOMIC_BLOBS)
/** Bit mask of the PAGE_SSIZE field */
#define FSP_FLAGS_MASK_PAGE_SSIZE \
- ((~(~0 << FSP_FLAGS_WIDTH_PAGE_SSIZE)) \
+ ((~(~0U << FSP_FLAGS_WIDTH_PAGE_SSIZE)) \
<< FSP_FLAGS_POS_PAGE_SSIZE)
/** Bit mask of the DATA_DIR field */
#define FSP_FLAGS_MASK_DATA_DIR \
- ((~(~0 << FSP_FLAGS_WIDTH_DATA_DIR)) \
+ ((~(~0U << FSP_FLAGS_WIDTH_DATA_DIR)) \
<< FSP_FLAGS_POS_DATA_DIR)
/** Bit mask of the DATA_DIR field */
#define FSP_FLAGS_MASK_DATA_DIR_ORACLE \
@@ -581,7 +581,7 @@ fseg_alloc_free_page_general(
in which the page should be initialized.
If init_mtr!=mtr, but the page is already
latched in mtr, do not initialize the page. */
- __attribute__((warn_unused_result, nonnull));
+ MY_ATTRIBUTE((warn_unused_result, nonnull));
/**********************************************************************//**
Reserves free pages from a tablespace. All mini-transactions which may
use several pages from the tablespace should call this function beforehand
@@ -650,7 +650,7 @@ fseg_page_is_free(
fseg_header_t* seg_header, /*!< in: segment header */
ulint space, /*!< in: space id */
ulint page) /*!< in: page offset */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/**********************************************************************//**
Frees part of a segment. This function can be used to free a segment
by repeatedly calling this function in different mini-transactions.
@@ -746,7 +746,7 @@ bool
fsp_flags_is_valid(
/*===============*/
ulint flags) /*!< in: tablespace flags */
- __attribute__((warn_unused_result, const));
+ MY_ATTRIBUTE((warn_unused_result, const));
/********************************************************************//**
Determine if the tablespace is compressed from dict_table_t::flags.
@return TRUE if compressed, FALSE if not compressed */
diff --git a/storage/xtradb/include/fts0ast.h b/storage/xtradb/include/fts0ast.h
index b2380f78b39..50f62063893 100644
--- a/storage/xtradb/include/fts0ast.h
+++ b/storage/xtradb/include/fts0ast.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2007, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2007, 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
@@ -200,7 +200,7 @@ fts_ast_visit(
and ignored processing an
operator, currently we only
ignore FTS_IGNORE operator */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*****************************************************************//**
Process (nested) sub-expression, create a new result set to store the
sub-expression result by processing nodes under current sub-expression
@@ -213,7 +213,7 @@ fts_ast_visit_sub_exp(
fts_ast_node_t* node, /*!< in: instance to traverse*/
fts_ast_callback visitor, /*!< in: callback */
void* arg) /*!< in: callback arg */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/********************************************************************
Create a lex instance.*/
UNIV_INTERN
@@ -223,7 +223,7 @@ fts_lexer_create(
ibool boolean_mode, /*!< in: query type */
const byte* query, /*!< in: query string */
ulint query_len) /*!< in: query string len */
- __attribute__((nonnull, malloc, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, malloc, warn_unused_result));
/********************************************************************
Free an fts_lexer_t instance.*/
UNIV_INTERN
@@ -232,7 +232,7 @@ fts_lexer_free(
/*===========*/
fts_lexer_t* fts_lexer) /*!< in: lexer instance to
free */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**
Create an ast string object, with NUL-terminator, so the string
diff --git a/storage/xtradb/include/fts0fts.h b/storage/xtradb/include/fts0fts.h
index 9f7b0216d9b..68d4d333245 100644
--- a/storage/xtradb/include/fts0fts.h
+++ b/storage/xtradb/include/fts0fts.h
@@ -94,7 +94,10 @@ those defined in mysql file ft_global.h */
/** Threshold where our optimize thread automatically kicks in */
#define FTS_OPTIMIZE_THRESHOLD 10000000
-#define FTS_DOC_ID_MAX_STEP 10000
+/** Threshold to avoid exhausting of doc ids. Consecutive doc id difference
+should not exceed FTS_DOC_ID_MAX_STEP */
+#define FTS_DOC_ID_MAX_STEP 65535
+
/** Variable specifying the FTS parallel sort degree */
extern ulong fts_sort_pll_degree;
@@ -408,7 +411,7 @@ fts_get_next_doc_id(
/*================*/
const dict_table_t* table, /*!< in: table */
doc_id_t* doc_id) /*!< out: new document id */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Update the next and last Doc ID in the CONFIG table to be the input
"doc_id" value (+ 1). We would do so after each FTS index build or
@@ -421,7 +424,7 @@ fts_update_next_doc_id(
const dict_table_t* table, /*!< in: table */
const char* table_name, /*!< in: table name, or NULL */
doc_id_t doc_id) /*!< in: DOC ID to set */
- __attribute__((nonnull(2)));
+ MY_ATTRIBUTE((nonnull(2)));
/******************************************************************//**
Create a new document id .
@@ -437,7 +440,7 @@ fts_create_doc_id(
current row that is being
inserted. */
mem_heap_t* heap) /*!< in: heap */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Create a new fts_doc_ids_t.
@return new fts_doc_ids_t. */
@@ -466,7 +469,7 @@ fts_trx_add_op(
fts_row_state state, /*!< in: state of the row */
ib_vector_t* fts_indexes) /*!< in: FTS indexes affected
(NULL=all) */
- __attribute__((nonnull(1,2)));
+ MY_ATTRIBUTE((nonnull(1,2)));
/******************************************************************//**
Free an FTS trx. */
@@ -491,7 +494,7 @@ fts_create_common_tables(
index */
const char* name, /*!< in: table name */
bool skip_doc_id_index) /*!< in: Skip index on doc id */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Wrapper function of fts_create_index_tables_low(), create auxiliary
tables for an FTS index
@@ -503,7 +506,7 @@ fts_create_index_tables(
trx_t* trx, /*!< in: transaction handle */
const dict_index_t* index) /*!< in: the FTS index
instance */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Creates the column specific ancillary tables needed for supporting an
FTS index on the given table. row_mysql_lock_data_dictionary must have
@@ -519,7 +522,7 @@ fts_create_index_tables_low(
instance */
const char* table_name, /*!< in: the table name */
table_id_t table_id) /*!< in: the table id */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Add the FTS document id hidden column. */
UNIV_INTERN
@@ -528,7 +531,7 @@ fts_add_doc_id_column(
/*==================*/
dict_table_t* table, /*!< in/out: Table with FTS index */
mem_heap_t* heap) /*!< in: temporary memory heap, or NULL */
- __attribute__((nonnull(1)));
+ MY_ATTRIBUTE((nonnull(1)));
/*********************************************************************//**
Drops the ancillary tables needed for supporting an FTS index on the
@@ -542,7 +545,7 @@ fts_drop_tables(
trx_t* trx, /*!< in: transaction */
dict_table_t* table) /*!< in: table has the FTS
index */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
The given transaction is about to be committed; do whatever is necessary
from the FTS system's POV.
@@ -552,7 +555,7 @@ dberr_t
fts_commit(
/*=======*/
trx_t* trx) /*!< in: transaction */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*******************************************************************//**
FTS Query entry point.
@@ -569,7 +572,7 @@ fts_query(
in bytes */
fts_result_t** result) /*!< out: query result, to be
freed by the caller.*/
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Retrieve the FTS Relevance Ranking result for doc with doc_id
@@ -687,7 +690,7 @@ dberr_t
fts_optimize_table(
/*===============*/
dict_table_t* table) /*!< in: table to optimiza */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Startup the optimize thread and create the work queue. */
@@ -713,7 +716,7 @@ fts_drop_index_tables(
/*==================*/
trx_t* trx, /*!< in: transaction */
dict_index_t* index) /*!< in: Index to drop */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Remove the table from the OPTIMIZER's list. We do wait for
@@ -754,7 +757,7 @@ fts_savepoint_take(
trx_t* trx, /*!< in: transaction */
fts_trx_t* fts_trx, /*!< in: fts transaction */
const char* name) /*!< in: savepoint name */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Refresh last statement savepoint. */
UNIV_INTERN
@@ -762,7 +765,7 @@ void
fts_savepoint_laststmt_refresh(
/*===========================*/
trx_t* trx) /*!< in: transaction */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Release the savepoint data identified by name. */
UNIV_INTERN
@@ -780,13 +783,12 @@ fts_cache_destroy(
/*==============*/
fts_cache_t* cache); /*!< in: cache*/
-/*********************************************************************//**
-Clear cache. */
+/** Clear cache.
+@param[in,out] cache fts cache */
UNIV_INTERN
void
fts_cache_clear(
-/*============*/
- fts_cache_t* cache); /*!< in: cache */
+ fts_cache_t* cache);
/*********************************************************************//**
Initialize things in cache. */
@@ -831,7 +833,7 @@ fts_drop_index_split_tables(
/*========================*/
trx_t* trx, /*!< in: transaction */
dict_index_t* index) /*!< in: fts instance */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/** Run SYNC on the table, i.e., write out data from the cache to the
FTS auxiliary INDEX table and clear the cache at the end.
@@ -1023,7 +1025,7 @@ fts_drop_index(
dict_table_t* table, /*!< in: Table where indexes are dropped */
dict_index_t* index, /*!< in: Index to be dropped */
trx_t* trx) /*!< in: Transaction for the drop */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/****************************************************************//**
Rename auxiliary tables for all fts index for a table
diff --git a/storage/xtradb/include/fts0priv.h b/storage/xtradb/include/fts0priv.h
index b4d9e1d41ec..2d4e9d88fd1 100644
--- a/storage/xtradb/include/fts0priv.h
+++ b/storage/xtradb/include/fts0priv.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2011, 2013, Oracle and/or its affiliates. All Rights Reserved.
+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
@@ -121,7 +121,7 @@ fts_parse_sql(
fts_table_t* fts_table, /*!< in: FTS aux table */
pars_info_t* info, /*!< in: info struct, or NULL */
const char* sql) /*!< in: SQL string to evaluate */
- __attribute__((nonnull(3), malloc, warn_unused_result));
+ MY_ATTRIBUTE((nonnull(3), malloc, warn_unused_result));
/******************************************************************//**
Evaluate a parsed SQL statement
@return DB_SUCCESS or error code */
@@ -131,7 +131,7 @@ fts_eval_sql(
/*=========*/
trx_t* trx, /*!< in: transaction */
que_t* graph) /*!< in: Parsed statement */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Construct the name of an ancillary FTS table for the given table.
@return own: table name, must be freed with mem_free() */
@@ -141,7 +141,7 @@ fts_get_table_name(
/*===============*/
const fts_table_t*
fts_table) /*!< in: FTS aux table info */
- __attribute__((nonnull, malloc, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, malloc, warn_unused_result));
/******************************************************************//**
Construct the column specification part of the SQL string for selecting the
indexed FTS columns for the given table. Adds the necessary bound
@@ -164,7 +164,7 @@ fts_get_select_columns_str(
dict_index_t* index, /*!< in: FTS index */
pars_info_t* info, /*!< in/out: parser info */
mem_heap_t* heap) /*!< in: memory heap */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/** define for fts_doc_fetch_by_doc_id() "option" value, defines whether
we want to get Doc whose ID is equal to or greater or smaller than supplied
@@ -191,7 +191,7 @@ fts_doc_fetch_by_doc_id(
callback, /*!< in: callback to read
records */
void* arg) /*!< in: callback arg */
- __attribute__((nonnull(6)));
+ MY_ATTRIBUTE((nonnull(6)));
/*******************************************************************//**
Callback function for fetch that stores the text of an FTS document,
@@ -203,7 +203,7 @@ fts_query_expansion_fetch_doc(
/*==========================*/
void* row, /*!< in: sel_node_t* */
void* user_arg) /*!< in: fts_doc_t* */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/********************************************************************
Write out a single word's data as new entry/entries in the INDEX table.
@return DB_SUCCESS if all OK. */
@@ -216,7 +216,7 @@ fts_write_node(
fts_table_t* fts_table, /*!< in: the FTS aux index */
fts_string_t* word, /*!< in: word in UTF-8 */
fts_node_t* node) /*!< in: node columns */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*******************************************************************//**
Tokenize a document. */
UNIV_INTERN
@@ -227,7 +227,7 @@ fts_tokenize_document(
tokenize */
fts_doc_t* result) /*!< out: if provided, save
result tokens here */
- __attribute__((nonnull(1)));
+ MY_ATTRIBUTE((nonnull(1)));
/*******************************************************************//**
Continue to tokenize a document. */
@@ -241,7 +241,7 @@ fts_tokenize_document_next(
tokens from this tokenization */
fts_doc_t* result) /*!< out: if provided, save
result tokens here */
- __attribute__((nonnull(1)));
+ MY_ATTRIBUTE((nonnull(1)));
/******************************************************************//**
Initialize a document. */
UNIV_INTERN
@@ -249,7 +249,7 @@ void
fts_doc_init(
/*=========*/
fts_doc_t* doc) /*!< in: doc to initialize */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Do a binary search for a doc id in the array
@@ -263,7 +263,7 @@ fts_bsearch(
int lower, /*!< in: lower bound of array*/
int upper, /*!< in: upper bound of array*/
doc_id_t doc_id) /*!< in: doc id to lookup */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Free document. */
UNIV_INTERN
@@ -271,7 +271,7 @@ void
fts_doc_free(
/*=========*/
fts_doc_t* doc) /*!< in: document */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Free fts_optimizer_word_t instanace.*/
UNIV_INTERN
@@ -279,7 +279,7 @@ void
fts_word_free(
/*==========*/
fts_word_t* word) /*!< in: instance to free.*/
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Read the rows from the FTS inde
@return DB_SUCCESS or error code */
@@ -293,7 +293,7 @@ fts_index_fetch_nodes(
const fts_string_t*
word, /*!< in: the word to fetch */
fts_fetch_t* fetch) /*!< in: fetch callback.*/
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Create a fts_optimizer_word_t instance.
@return new instance */
@@ -304,7 +304,7 @@ fts_word_init(
fts_word_t* word, /*!< in: word to initialize */
byte* utf8, /*!< in: UTF-8 string */
ulint len) /*!< in: length of string in bytes */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Compare two fts_trx_table_t instances, we actually compare the
table id's here.
@@ -315,7 +315,7 @@ fts_trx_table_cmp(
/*==============*/
const void* v1, /*!< in: id1 */
const void* v2) /*!< in: id2 */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Compare a table id with a trx_table_t table id.
@return < 0 if n1 < n2, 0 if n1 == n2, > 0 if n1 > n2 */
@@ -325,7 +325,7 @@ fts_trx_table_id_cmp(
/*=================*/
const void* p1, /*!< in: id1 */
const void* p2) /*!< in: id2 */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Commit a transaction.
@return DB_SUCCESS if all OK */
@@ -334,7 +334,7 @@ dberr_t
fts_sql_commit(
/*===========*/
trx_t* trx) /*!< in: transaction */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Rollback a transaction.
@return DB_SUCCESS if all OK */
@@ -343,7 +343,7 @@ dberr_t
fts_sql_rollback(
/*=============*/
trx_t* trx) /*!< in: transaction */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Parse an SQL string. %s is replaced with the table's id. Don't acquire
the dict mutex
@@ -355,7 +355,7 @@ fts_parse_sql_no_dict_lock(
fts_table_t* fts_table, /*!< in: table with FTS index */
pars_info_t* info, /*!< in: parser info */
const char* sql) /*!< in: SQL string to evaluate */
- __attribute__((nonnull(3), malloc, warn_unused_result));
+ MY_ATTRIBUTE((nonnull(3), malloc, warn_unused_result));
/******************************************************************//**
Get value from config table. The caller must ensure that enough
space is allocated for value to hold the column contents
@@ -370,7 +370,7 @@ fts_config_get_value(
this parameter name */
fts_string_t* value) /*!< out: value read from
config table */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Get value specific to an FTS index from the config table. The caller
must ensure that enough space is allocated for value to hold the
@@ -386,7 +386,7 @@ fts_config_get_index_value(
this parameter name */
fts_string_t* value) /*!< out: value read from
config table */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Set the value in the config table for name.
@return DB_SUCCESS or error code */
@@ -400,7 +400,7 @@ fts_config_set_value(
this parameter name */
const fts_string_t*
value) /*!< in: value to update */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/****************************************************************//**
Set an ulint value in the config table.
@return DB_SUCCESS if all OK else error code */
@@ -412,7 +412,7 @@ fts_config_set_ulint(
fts_table_t* fts_table, /*!< in: the indexed FTS table */
const char* name, /*!< in: param name */
ulint int_value) /*!< in: value */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Set the value specific to an FTS index in the config table.
@return DB_SUCCESS or error code */
@@ -426,7 +426,7 @@ fts_config_set_index_value(
this parameter name */
fts_string_t* value) /*!< out: value read from
config table */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Increment the value in the config table for column name.
@return DB_SUCCESS or error code */
@@ -439,7 +439,7 @@ fts_config_increment_value(
const char* name, /*!< in: increment config value
for this parameter name */
ulint delta) /*!< in: increment by this much */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Increment the per index value in the config table for column name.
@return DB_SUCCESS or error code */
@@ -452,7 +452,7 @@ fts_config_increment_index_value(
const char* name, /*!< in: increment config value
for this parameter name */
ulint delta) /*!< in: increment by this much */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Get an ulint value from the config table.
@return DB_SUCCESS or error code */
@@ -464,7 +464,7 @@ fts_config_get_index_ulint(
dict_index_t* index, /*!< in: FTS index */
const char* name, /*!< in: param name */
ulint* int_value) /*!< out: value */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Set an ulint value int the config table.
@return DB_SUCCESS or error code */
@@ -476,7 +476,7 @@ fts_config_set_index_ulint(
dict_index_t* index, /*!< in: FTS index */
const char* name, /*!< in: param name */
ulint int_value) /*!< in: value */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Get an ulint value from the config table.
@return DB_SUCCESS or error code */
@@ -488,7 +488,7 @@ fts_config_get_ulint(
fts_table_t* fts_table, /*!< in: the indexed FTS table */
const char* name, /*!< in: param name */
ulint* int_value) /*!< out: value */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Search cache for word.
@return the word node vector if found else NULL */
@@ -500,7 +500,7 @@ fts_cache_find_word(
index_cache, /*!< in: cache to search */
const fts_string_t*
text) /*!< in: word to search for */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Check cache for deleted doc id.
@return TRUE if deleted */
@@ -511,7 +511,7 @@ fts_cache_is_deleted_doc_id(
const fts_cache_t*
cache, /*!< in: cache ito search */
doc_id_t doc_id) /*!< in: doc id to search for */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Append deleted doc ids to vector and sort the vector. */
UNIV_INTERN
@@ -546,7 +546,7 @@ fts_get_total_word_count(
trx_t* trx, /*!< in: transaction */
dict_index_t* index, /*!< in: for this index */
ulint* total) /*!< out: total words */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#endif
/******************************************************************//**
Search the index specific cache for a particular FTS index.
@@ -559,7 +559,7 @@ fts_find_index_cache(
cache, /*!< in: cache to search */
const dict_index_t*
index) /*!< in: index to search for */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Write the table id to the given buffer (including final NUL). Buffer must be
at least FTS_AUX_MIN_TABLE_ID_LENGTH bytes long.
@@ -570,10 +570,10 @@ fts_write_object_id(
/*================*/
ib_id_t id, /*!< in: a table/index id */
char* str, /*!< in: buffer to write the id to */
- bool hex_format __attribute__((unused)))
+ bool hex_format MY_ATTRIBUTE((unused)))
/*!< in: true for fixed hex format,
false for old ambiguous format */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Read the table id from the string generated by fts_write_object_id().
@return TRUE if parse successful */
@@ -583,7 +583,7 @@ fts_read_object_id(
/*===============*/
ib_id_t* id, /*!< out: a table id */
const char* str) /*!< in: buffer to read from */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Get the table id.
@return number of bytes written */
@@ -596,7 +596,7 @@ fts_get_table_id(
char* table_id) /*!< out: table id, must be at least
FTS_AUX_MIN_TABLE_ID_LENGTH bytes
long */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Add the table to add to the OPTIMIZER's list. */
UNIV_INTERN
@@ -604,7 +604,7 @@ void
fts_optimize_add_table(
/*===================*/
dict_table_t* table) /*!< in: table to add */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Optimize a table. */
UNIV_INTERN
@@ -612,7 +612,7 @@ void
fts_optimize_do_table(
/*==================*/
dict_table_t* table) /*!< in: table to optimize */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Construct the prefix name of an FTS table.
@return own: table name, must be freed with mem_free() */
@@ -622,7 +622,7 @@ fts_get_table_name_prefix(
/*======================*/
const fts_table_t*
fts_table) /*!< in: Auxiliary table type */
- __attribute__((nonnull, malloc, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, malloc, warn_unused_result));
/******************************************************************//**
Add node positions. */
UNIV_INTERN
@@ -633,7 +633,7 @@ fts_cache_node_add_positions(
fts_node_t* node, /*!< in: word node */
doc_id_t doc_id, /*!< in: doc id */
ib_vector_t* positions) /*!< in: fts_token_t::positions */
- __attribute__((nonnull(2,4)));
+ MY_ATTRIBUTE((nonnull(2,4)));
/******************************************************************//**
Create the config table name for retrieving index specific value.
@@ -644,7 +644,7 @@ fts_config_create_index_param_name(
/*===============================*/
const char* param, /*!< in: base name of param */
const dict_index_t* index) /*!< in: index for config */
- __attribute__((nonnull, malloc, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, malloc, warn_unused_result));
#ifndef UNIV_NONINL
#include "fts0priv.ic"
diff --git a/storage/xtradb/include/fts0priv.ic b/storage/xtradb/include/fts0priv.ic
index ec61691870b..88f2d67c7b8 100644
--- a/storage/xtradb/include/fts0priv.ic
+++ b/storage/xtradb/include/fts0priv.ic
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2011, 2013, Oracle and/or its affiliates. All Rights Reserved.
+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
@@ -33,7 +33,7 @@ fts_write_object_id(
/*================*/
ib_id_t id, /* in: a table/index id */
char* str, /* in: buffer to write the id to */
- bool hex_format __attribute__((unused)))
+ bool hex_format MY_ATTRIBUTE((unused)))
/* in: true for fixed hex format,
false for old ambiguous format */
{
diff --git a/storage/xtradb/include/ha_prototypes.h b/storage/xtradb/include/ha_prototypes.h
index cadac675d70..a35f975b13c 100644
--- a/storage/xtradb/include/ha_prototypes.h
+++ b/storage/xtradb/include/ha_prototypes.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2006, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2006, 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
@@ -144,7 +144,7 @@ enum durability_properties
thd_requested_durability(
/*=====================*/
const THD* thd) /*!< in: thread handle */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Returns true if the transaction this thread is processing has edited
@@ -196,7 +196,7 @@ innobase_mysql_cmp(
const unsigned char* b, /*!< in: data field */
unsigned int b_length) /*!< in: data field length,
not UNIV_SQL_NULL */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/**************************************************************//**
Converts a MySQL type to an InnoDB type. Note that this function returns
the 'mtype' of InnoDB. InnoDB differentiates between MySQL's old <= 4.1
@@ -212,7 +212,7 @@ get_innobase_type_from_mysql_type(
and unsigned integer
types are 'unsigned types' */
const void* field) /*!< in: MySQL Field */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Get the variable length bounds of the given character set. */
@@ -321,7 +321,7 @@ innobase_get_stmt(
/*==============*/
THD* thd, /*!< in: MySQL thread handle */
size_t* length) /*!< out: length of the SQL statement */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
This function is used to find the storage length in bytes of the first n
characters for prefix indexes using a multibyte character set. The function
@@ -347,7 +347,7 @@ enum icp_result
innobase_index_cond(
/*================*/
void* file) /*!< in/out: pointer to ha_innobase */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Returns true if the thread supports XA,
global value of innodb_supports_xa if thd is NULL.
@@ -500,7 +500,7 @@ innobase_format_name(
const char* name, /*!< in: index or table name
to format */
ibool is_index_name) /*!< in: index name */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/** Corresponds to Sql_condition:enum_warning_level. */
enum ib_log_level_t {
@@ -530,7 +530,7 @@ ib_errf(
ib_uint32_t code, /*!< MySQL error code */
const char* format, /*!< printf format */
...) /*!< Args */
- __attribute__((format(printf, 4, 5)));
+ MY_ATTRIBUTE((format(printf, 4, 5)));
/******************************************************************//**
Use this when the args are passed to the format string from
@@ -561,7 +561,7 @@ ib_logf(
ib_log_level_t level, /*!< in: warning level */
const char* format, /*!< printf format */
...) /*!< Args */
- __attribute__((format(printf, 2, 3)));
+ MY_ATTRIBUTE((format(printf, 2, 3)));
/******************************************************************//**
Returns the NUL terminated value of glob_hostname.
@@ -607,7 +607,7 @@ innobase_next_autoinc(
ulonglong step, /*!< in: AUTOINC increment step */
ulonglong offset, /*!< in: AUTOINC offset */
ulonglong max_value) /*!< in: max value for type */
- __attribute__((pure, warn_unused_result));
+ MY_ATTRIBUTE((pure, warn_unused_result));
/********************************************************************//**
Get the upper limit of the MySQL integral and floating-point type.
@@ -617,7 +617,7 @@ ulonglong
innobase_get_int_col_max_value(
/*===========================*/
const Field* field) /*!< in: MySQL field */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/**********************************************************************
Check if the length of the identifier exceeds the maximum allowed.
diff --git a/storage/xtradb/include/handler0alter.h b/storage/xtradb/include/handler0alter.h
index 66b963ae39a..3dd6c99eb6d 100644
--- a/storage/xtradb/include/handler0alter.h
+++ b/storage/xtradb/include/handler0alter.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2005, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2005, 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
@@ -32,7 +32,7 @@ innobase_rec_to_mysql(
const dict_index_t* index, /*!< in: index */
const ulint* offsets)/*!< in: rec_get_offsets(
rec, index, ...) */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*************************************************************//**
Copies an InnoDB index entry to table->record[0]. */
@@ -43,7 +43,7 @@ innobase_fields_to_mysql(
struct TABLE* table, /*!< in/out: MySQL table */
const dict_index_t* index, /*!< in: InnoDB index */
const dfield_t* fields) /*!< in: InnoDB index fields */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*************************************************************//**
Copies an InnoDB row to table->record[0]. */
@@ -54,7 +54,7 @@ innobase_row_to_mysql(
struct TABLE* table, /*!< in/out: MySQL table */
const dict_table_t* itab, /*!< in: InnoDB table */
const dtuple_t* row) /*!< in: InnoDB row */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*************************************************************//**
Resets table->record[0]. */
@@ -63,7 +63,7 @@ void
innobase_rec_reset(
/*===============*/
struct TABLE* table) /*!< in/out: MySQL table */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/** Generate the next autoinc based on a snapshot of the session
auto_increment_increment and auto_increment_offset variables. */
diff --git a/storage/xtradb/include/ibuf0ibuf.h b/storage/xtradb/include/ibuf0ibuf.h
index 3c8fa874dcf..0b325b68a84 100644
--- a/storage/xtradb/include/ibuf0ibuf.h
+++ b/storage/xtradb/include/ibuf0ibuf.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1997, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2016, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
@@ -120,7 +120,7 @@ void
ibuf_mtr_start(
/*===========*/
mtr_t* mtr) /*!< out: mini-transaction */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/***************************************************************//**
Commits an insert buffer mini-transaction. */
UNIV_INLINE
@@ -128,7 +128,7 @@ void
ibuf_mtr_commit(
/*============*/
mtr_t* mtr) /*!< in/out: mini-transaction */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Initializes an ibuf bitmap page. */
UNIV_INTERN
@@ -254,7 +254,7 @@ ibool
ibuf_inside(
/*========*/
const mtr_t* mtr) /*!< in: mini-transaction */
- __attribute__((nonnull, pure));
+ MY_ATTRIBUTE((nonnull, pure));
/***********************************************************************//**
Checks if a page address is an ibuf bitmap page (level 3 page) address.
@return TRUE if a bitmap page */
@@ -287,7 +287,7 @@ ibuf_page_low(
is not one of the fixed address ibuf
pages, or NULL, in which case a new
transaction is created. */
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
#ifdef UNIV_DEBUG
/** Checks if a page is a level 2 or 3 page in the ibuf hierarchy of
pages. Must not be called when recv_no_ibuf_operations==TRUE.
@@ -366,23 +366,31 @@ void
ibuf_delete_for_discarded_space(
/*============================*/
ulint space); /*!< in: space id */
-/*********************************************************************//**
-Contracts insert buffer trees by reading pages to the buffer pool.
+/** Contract the change buffer by reading pages to the buffer pool.
+@param[in] full If true, do a full contraction based
+on PCT_IO(100). If false, the size of contract batch is determined
+based on the current size of the change buffer.
@return a lower limit for the combined size in bytes of entries which
will be merged from ibuf trees to the pages read, 0 if ibuf is
empty */
UNIV_INTERN
ulint
-ibuf_contract_in_background(
-/*========================*/
- table_id_t table_id, /*!< in: if merge should be done only
- for a specific table, for all tables
- this should be 0 */
- ibool full); /*!< in: TRUE if the caller wants to
- do a full contract based on PCT_IO(100).
- If FALSE then the size of contract
- batch is determined based on the
- current size of the ibuf tree. */
+ibuf_merge_in_background(
+ bool full); /*!< in: TRUE if the caller wants to
+ do a full contract based on PCT_IO(100).
+ If FALSE then the size of contract
+ batch is determined based on the
+ current size of the ibuf tree. */
+
+/** Contracts insert buffer trees by reading pages referring to space_id
+to the buffer pool.
+@returns number of pages merged.*/
+UNIV_INTERN
+ulint
+ibuf_merge_space(
+/*=============*/
+ ulint space); /*!< in: space id */
+
#endif /* !UNIV_HOTBACKUP */
/*********************************************************************//**
Parses a redo log record of an ibuf bitmap page init.
@@ -463,7 +471,7 @@ ibuf_check_bitmap_on_import(
/*========================*/
const trx_t* trx, /*!< in: transaction */
ulint space_id) /*!< in: tablespace identifier */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#define IBUF_HEADER_PAGE_NO FSP_IBUF_HEADER_PAGE_NO
#define IBUF_TREE_ROOT_PAGE_NO FSP_IBUF_TREE_ROOT_PAGE_NO
diff --git a/storage/xtradb/include/lock0lock.h b/storage/xtradb/include/lock0lock.h
index 7858e5de2db..b6100d470cc 100644
--- a/storage/xtradb/include/lock0lock.h
+++ b/storage/xtradb/include/lock0lock.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -280,7 +280,7 @@ lock_rec_expl_exist_on_page(
/*========================*/
ulint space, /*!< in: space id */
ulint page_no)/*!< in: page number */
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
/*********************************************************************//**
Checks if locks of other transactions prevent an immediate insert of
a record. If they do, first tests if the query thread should anyway
@@ -303,7 +303,7 @@ lock_rec_insert_check_and_lock(
inserted record maybe should inherit
LOCK_GAP type locks from the successor
record */
- __attribute__((nonnull(2,3,4,6,7), warn_unused_result));
+ MY_ATTRIBUTE((nonnull(2,3,4,6,7), warn_unused_result));
/*********************************************************************//**
Checks if locks of other transactions prevent an immediate modify (update,
delete mark, or delete unmark) of a clustered index record. If they do,
@@ -324,7 +324,7 @@ lock_clust_rec_modify_check_and_lock(
dict_index_t* index, /*!< in: clustered index */
const ulint* offsets,/*!< in: rec_get_offsets(rec, index) */
que_thr_t* thr) /*!< in: query thread */
- __attribute__((warn_unused_result, nonnull));
+ MY_ATTRIBUTE((warn_unused_result, nonnull));
/*********************************************************************//**
Checks if locks of other transactions prevent an immediate modify
(delete mark or delete unmark) of a secondary index record.
@@ -345,7 +345,7 @@ lock_sec_rec_modify_check_and_lock(
que_thr_t* thr, /*!< in: query thread
(can be NULL if BTR_NO_LOCKING_FLAG) */
mtr_t* mtr) /*!< in/out: mini-transaction */
- __attribute__((warn_unused_result, nonnull(2,3,4,6)));
+ MY_ATTRIBUTE((warn_unused_result, nonnull(2,3,4,6)));
/*********************************************************************//**
Like lock_clust_rec_read_check_and_lock(), but reads a
secondary index record.
@@ -432,7 +432,7 @@ lock_clust_rec_read_check_and_lock_alt(
ulint gap_mode,/*!< in: LOCK_ORDINARY, LOCK_GAP, or
LOCK_REC_NOT_GAP */
que_thr_t* thr) /*!< in: query thread */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Checks that a record is seen in a consistent read.
@return true if sees, or false if an earlier version of the record
@@ -464,7 +464,7 @@ lock_sec_rec_cons_read_sees(
should be read or passed over
by a read cursor */
const read_view_t* view) /*!< in: consistent read view */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Locks the specified database table in the mode given. If the lock cannot
be granted immediately, the query thread is put to wait.
@@ -479,7 +479,7 @@ lock_table(
in dictionary cache */
enum lock_mode mode, /*!< in: lock mode */
que_thr_t* thr) /*!< in: query thread */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Creates a table IX lock object for a resurrected transaction. */
UNIV_INTERN
@@ -544,7 +544,7 @@ lock_rec_fold(
/*==========*/
ulint space, /*!< in: space */
ulint page_no)/*!< in: page number */
- __attribute__((const));
+ MY_ATTRIBUTE((const));
/*********************************************************************//**
Calculates the hash value of a page file address: used in inserting or
searching for a lock in the hash table.
@@ -594,7 +594,7 @@ lock_is_table_exclusive(
/*====================*/
const dict_table_t* table, /*!< in: table */
const trx_t* trx) /*!< in: transaction */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Checks if a lock request lock1 has to wait for request lock2.
@return TRUE if lock1 has to wait for lock2 to be removed */
@@ -618,7 +618,7 @@ lock_report_trx_id_insanity(
dict_index_t* index, /*!< in: index */
const ulint* offsets, /*!< in: rec_get_offsets(rec, index) */
trx_id_t max_trx_id) /*!< in: trx_sys_get_max_trx_id() */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Prints info of a table lock. */
UNIV_INTERN
@@ -645,7 +645,7 @@ lock_print_info_summary(
/*====================*/
FILE* file, /*!< in: file where to print */
ibool nowait) /*!< in: whether to wait for the lock mutex */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Prints info of locks for each transaction. This function assumes that the
caller holds the lock mutex and more importantly it will release the lock
@@ -665,7 +665,7 @@ ulint
lock_number_of_rows_locked(
/*=======================*/
const trx_lock_t* trx_lock) /*!< in: transaction locks */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*******************************************************************//**
Gets the type of a lock. Non-inline version for using outside of the
@@ -833,7 +833,7 @@ dberr_t
lock_trx_handle_wait(
/*=================*/
trx_t* trx) /*!< in/out: trx lock state */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Get the number of locks on a table.
@return number of locks */
@@ -842,7 +842,7 @@ ulint
lock_table_get_n_locks(
/*===================*/
const dict_table_t* table) /*!< in: table */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#ifdef UNIV_DEBUG
/*********************************************************************//**
Checks that a transaction id is sensible, i.e., not in the future.
@@ -855,7 +855,7 @@ lock_check_trx_id_sanity(
const rec_t* rec, /*!< in: user record */
dict_index_t* index, /*!< in: index */
const ulint* offsets) /*!< in: rec_get_offsets(rec, index) */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*******************************************************************//**
Check if the transaction holds any locks on the sys tables
or its records.
@@ -865,7 +865,7 @@ const lock_t*
lock_trx_has_sys_table_locks(
/*=========================*/
const trx_t* trx) /*!< in: transaction to check */
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
/*******************************************************************//**
Check if the transaction holds an exclusive lock on a record.
@@ -878,7 +878,7 @@ lock_trx_has_rec_x_lock(
const dict_table_t* table, /*!< in: table to check */
const buf_block_t* block, /*!< in: buffer block of the record */
ulint heap_no)/*!< in: record heap number */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#endif /* UNIV_DEBUG */
/** Lock modes and types */
diff --git a/storage/xtradb/include/lock0priv.h b/storage/xtradb/include/lock0priv.h
index 90d5dc994a4..7a74cbdc2e3 100644
--- a/storage/xtradb/include/lock0priv.h
+++ b/storage/xtradb/include/lock0priv.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2007, 2011, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2015, MariaDB Corporation
This program is free software; you can redistribute it and/or modify it under
@@ -115,7 +115,7 @@ lock_clust_rec_some_has_impl(
const rec_t* rec, /*!< in: user record */
const dict_index_t* index, /*!< in: clustered index */
const ulint* offsets)/*!< in: rec_get_offsets(rec, index) */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#ifndef UNIV_NONINL
#include "lock0priv.ic"
diff --git a/storage/xtradb/include/log0online.h b/storage/xtradb/include/log0online.h
index 67dc0d72b4b..5706f3af4b0 100644
--- a/storage/xtradb/include/log0online.h
+++ b/storage/xtradb/include/log0online.h
@@ -11,8 +11,8 @@ 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., 59 Temple
-Place, Suite 330, Boston, MA 02111-1307 USA
+this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
+Street, Fifth Floor, Boston, MA 02110-1301, USA
*****************************************************************************/
diff --git a/storage/xtradb/include/log0recv.h b/storage/xtradb/include/log0recv.h
index 1019f43f70c..e93ec2666af 100644
--- a/storage/xtradb/include/log0recv.h
+++ b/storage/xtradb/include/log0recv.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1997, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 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
@@ -74,7 +74,7 @@ recv_read_checkpoint_info_for_backup(
lsn_t* first_header_lsn)
/*!< out: lsn of of the start of the
first log file */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*******************************************************************//**
Scans the log segment and n_bytes_scanned is set to the length of valid
log scanned. */
diff --git a/storage/xtradb/include/mach0data.h b/storage/xtradb/include/mach0data.h
index d0087f56aaa..9859def0adc 100644
--- a/storage/xtradb/include/mach0data.h
+++ b/storage/xtradb/include/mach0data.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2009, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 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
@@ -53,7 +53,7 @@ ulint
mach_read_from_1(
/*=============*/
const byte* b) /*!< in: pointer to byte */
- __attribute__((nonnull, pure));
+ MY_ATTRIBUTE((nonnull, pure));
/*******************************************************//**
The following function is used to store data in two consecutive
bytes. We store the most significant byte to the lower address. */
@@ -72,7 +72,7 @@ ulint
mach_read_from_2(
/*=============*/
const byte* b) /*!< in: pointer to two bytes */
- __attribute__((nonnull, pure));
+ MY_ATTRIBUTE((nonnull, pure));
/********************************************************//**
The following function is used to convert a 16-bit data item
@@ -84,7 +84,7 @@ uint16
mach_encode_2(
/*==========*/
ulint n) /*!< in: integer in machine-dependent format */
- __attribute__((const));
+ MY_ATTRIBUTE((const));
/********************************************************//**
The following function is used to convert a 16-bit data item
from the canonical format, for fast bytewise equality test
@@ -95,7 +95,7 @@ ulint
mach_decode_2(
/*==========*/
uint16 n) /*!< in: 16-bit integer in canonical format */
- __attribute__((const));
+ MY_ATTRIBUTE((const));
/*******************************************************//**
The following function is used to store data in 3 consecutive
bytes. We store the most significant byte to the lowest address. */
@@ -114,7 +114,7 @@ ulint
mach_read_from_3(
/*=============*/
const byte* b) /*!< in: pointer to 3 bytes */
- __attribute__((nonnull, pure));
+ MY_ATTRIBUTE((nonnull, pure));
/*******************************************************//**
The following function is used to store data in four consecutive
bytes. We store the most significant byte to the lowest address. */
@@ -133,7 +133,7 @@ ulint
mach_read_from_4(
/*=============*/
const byte* b) /*!< in: pointer to four bytes */
- __attribute__((nonnull, pure));
+ MY_ATTRIBUTE((nonnull, pure));
/*********************************************************//**
Writes a ulint in a compressed form (1..5 bytes).
@return stored size in bytes */
@@ -151,7 +151,7 @@ ulint
mach_get_compressed_size(
/*=====================*/
ulint n) /*!< in: ulint integer to be stored */
- __attribute__((const));
+ MY_ATTRIBUTE((const));
/*********************************************************//**
Reads a ulint in a compressed form.
@return read integer */
@@ -160,7 +160,7 @@ ulint
mach_read_compressed(
/*=================*/
const byte* b) /*!< in: pointer to memory from where to read */
- __attribute__((nonnull, pure));
+ MY_ATTRIBUTE((nonnull, pure));
/*******************************************************//**
The following function is used to store data in 6 consecutive
bytes. We store the most significant byte to the lowest address. */
@@ -179,7 +179,7 @@ ib_uint64_t
mach_read_from_6(
/*=============*/
const byte* b) /*!< in: pointer to 6 bytes */
- __attribute__((nonnull, pure));
+ MY_ATTRIBUTE((nonnull, pure));
/*******************************************************//**
The following function is used to store data in 7 consecutive
bytes. We store the most significant byte to the lowest address. */
@@ -198,7 +198,7 @@ ib_uint64_t
mach_read_from_7(
/*=============*/
const byte* b) /*!< in: pointer to 7 bytes */
- __attribute__((nonnull, pure));
+ MY_ATTRIBUTE((nonnull, pure));
/*******************************************************//**
The following function is used to store data in 8 consecutive
bytes. We store the most significant byte to the lowest address. */
@@ -217,7 +217,7 @@ ib_uint64_t
mach_read_from_8(
/*=============*/
const byte* b) /*!< in: pointer to 8 bytes */
- __attribute__((nonnull, pure));
+ MY_ATTRIBUTE((nonnull, pure));
/*********************************************************//**
Writes a 64-bit integer in a compressed form (5..9 bytes).
@return size in bytes */
@@ -243,7 +243,7 @@ ib_uint64_t
mach_ull_read_compressed(
/*=====================*/
const byte* b) /*!< in: pointer to memory from where to read */
- __attribute__((nonnull, pure));
+ MY_ATTRIBUTE((nonnull, pure));
/*********************************************************//**
Writes a 64-bit integer in a compressed form (1..11 bytes).
@return size in bytes */
@@ -261,7 +261,7 @@ ulint
mach_ull_get_much_compressed_size(
/*==============================*/
ib_uint64_t n) /*!< in: 64-bit integer to be stored */
- __attribute__((const));
+ MY_ATTRIBUTE((const));
/*********************************************************//**
Reads a 64-bit integer in a compressed form.
@return the value read */
@@ -270,7 +270,7 @@ ib_uint64_t
mach_ull_read_much_compressed(
/*==========================*/
const byte* b) /*!< in: pointer to memory from where to read */
- __attribute__((nonnull, pure));
+ MY_ATTRIBUTE((nonnull, pure));
/*********************************************************//**
Reads a ulint in a compressed form if the log record fully contains it.
@return pointer to end of the stored field, NULL if not complete */
@@ -301,7 +301,7 @@ double
mach_double_read(
/*=============*/
const byte* b) /*!< in: pointer to memory from where to read */
- __attribute__((nonnull, pure));
+ MY_ATTRIBUTE((nonnull, pure));
/*********************************************************//**
Writes a double. It is stored in a little-endian format. */
UNIV_INLINE
@@ -318,7 +318,7 @@ float
mach_float_read(
/*============*/
const byte* b) /*!< in: pointer to memory from where to read */
- __attribute__((nonnull, pure));
+ MY_ATTRIBUTE((nonnull, pure));
/*********************************************************//**
Writes a float. It is stored in a little-endian format. */
UNIV_INLINE
@@ -336,7 +336,7 @@ mach_read_from_n_little_endian(
/*===========================*/
const byte* buf, /*!< in: from where to read */
ulint buf_size) /*!< in: from how many bytes to read */
- __attribute__((nonnull, pure));
+ MY_ATTRIBUTE((nonnull, pure));
/*********************************************************//**
Writes a ulint in the little-endian format. */
UNIV_INLINE
@@ -354,7 +354,7 @@ ulint
mach_read_from_2_little_endian(
/*===========================*/
const byte* buf) /*!< in: from where to read */
- __attribute__((nonnull, pure));
+ MY_ATTRIBUTE((nonnull, pure));
/*********************************************************//**
Writes a ulint in the little-endian format. */
UNIV_INLINE
diff --git a/storage/xtradb/include/mem0mem.h b/storage/xtradb/include/mem0mem.h
index f30034f3074..de9b8b29fd9 100644
--- a/storage/xtradb/include/mem0mem.h
+++ b/storage/xtradb/include/mem0mem.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1994, 2010, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -353,7 +353,7 @@ mem_heap_printf(
/*============*/
mem_heap_t* heap, /*!< in: memory heap */
const char* format, /*!< in: format string */
- ...) __attribute__ ((format (printf, 2, 3)));
+ ...) MY_ATTRIBUTE ((format (printf, 2, 3)));
#ifdef MEM_PERIODIC_CHECK
/******************************************************************//**
diff --git a/storage/xtradb/include/mem0mem.ic b/storage/xtradb/include/mem0mem.ic
index 0d983d69e1a..63e68150b61 100644
--- a/storage/xtradb/include/mem0mem.ic
+++ b/storage/xtradb/include/mem0mem.ic
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1994, 2010, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -476,9 +476,9 @@ void
mem_heap_free_func(
/*===============*/
mem_heap_t* heap, /*!< in, own: heap to be freed */
- const char* file_name __attribute__((unused)),
+ const char* file_name MY_ATTRIBUTE((unused)),
/*!< in: file name where freed */
- ulint line __attribute__((unused)))
+ ulint line MY_ATTRIBUTE((unused)))
{
mem_block_t* block;
mem_block_t* prev_block;
diff --git a/storage/xtradb/include/mtr0mtr.h b/storage/xtradb/include/mtr0mtr.h
index c9199153138..23992598f2e 100644
--- a/storage/xtradb/include/mtr0mtr.h
+++ b/storage/xtradb/include/mtr0mtr.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
This program is free software; you can redistribute it and/or modify it under
@@ -228,7 +228,7 @@ mtr_start(
{
mtr_start_trx(mtr, NULL);
}
- __attribute__((nonnull))
+ MY_ATTRIBUTE((nonnull))
/***************************************************************//**
Commits a mini-transaction. */
UNIV_INTERN
@@ -236,7 +236,7 @@ void
mtr_commit(
/*=======*/
mtr_t* mtr) /*!< in/out: mini-transaction */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************//**
Sets and returns a savepoint in mtr.
@return savepoint */
@@ -341,7 +341,7 @@ mtr_memo_release(
mtr_t* mtr, /*!< in/out: mini-transaction */
void* object, /*!< in: object */
ulint type) /*!< in: object type: MTR_MEMO_S_LOCK, ... */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#ifdef UNIV_DEBUG
# ifndef UNIV_HOTBACKUP
/**********************************************************//**
@@ -354,7 +354,7 @@ mtr_memo_contains(
mtr_t* mtr, /*!< in: mtr */
const void* object, /*!< in: object to search */
ulint type) /*!< in: type of object */
- __attribute__((warn_unused_result, nonnull));
+ MY_ATTRIBUTE((warn_unused_result, nonnull));
/**********************************************************//**
Checks if memo contains the given page.
diff --git a/storage/xtradb/include/mtr0mtr.ic b/storage/xtradb/include/mtr0mtr.ic
index aade8c3d82a..a6d9df09925 100644
--- a/storage/xtradb/include/mtr0mtr.ic
+++ b/storage/xtradb/include/mtr0mtr.ic
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 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
@@ -37,7 +37,7 @@ ibool
mtr_block_dirtied(
/*==============*/
const buf_block_t* block) /*!< in: block being x-fixed */
- __attribute__((nonnull,warn_unused_result));
+ MY_ATTRIBUTE((nonnull,warn_unused_result));
/***************************************************************//**
Starts a mini-transaction. */
diff --git a/storage/xtradb/include/os0file.h b/storage/xtradb/include/os0file.h
index 453536beba4..2a385c9bf58 100644
--- a/storage/xtradb/include/os0file.h
+++ b/storage/xtradb/include/os0file.h
@@ -1,6 +1,6 @@
/***********************************************************************
-Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2009, Percona Inc.
Copyright (c) 2013, 2015, MariaDB Corporation.
@@ -659,7 +659,7 @@ pfs_os_file_create_simple_func(
value */
const char* src_file,/*!< in: file name where func invoked */
ulint src_line)/*!< in: line where the func invoked */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/****************************************************************//**
NOTE! Please use the corresponding macro
@@ -686,7 +686,7 @@ pfs_os_file_create_simple_no_error_handling_func(
value*/
const char* src_file,/*!< in: file name where func invoked */
ulint src_line)/*!< in: line where the func invoked */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/****************************************************************//**
NOTE! Please use the corresponding macro os_file_create(), not directly
@@ -716,7 +716,7 @@ pfs_os_file_create_func(
value */
const char* src_file,/*!< in: file name where func invoked */
ulint src_line)/*!< in: line where the func invoked */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/***********************************************************************//**
NOTE! Please use the corresponding macro os_file_close(), not directly
@@ -903,7 +903,7 @@ os_offset_t
os_file_get_size(
/*=============*/
os_file_t file) /*!< in: handle to a file */
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
/***********************************************************************//**
Write the specified number of zeros to a newly created file.
@return TRUE if success */
@@ -915,7 +915,7 @@ os_file_set_size(
null-terminated string */
os_file_t file, /*!< in: handle to a file */
os_offset_t size) /*!< in: file size */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/***********************************************************************//**
Truncates a file at its current position.
@return TRUE if success */
diff --git a/storage/xtradb/include/os0sync.h b/storage/xtradb/include/os0sync.h
index 0f93f3ff074..f6207555f1a 100644
--- a/storage/xtradb/include/os0sync.h
+++ b/storage/xtradb/include/os0sync.h
@@ -530,20 +530,13 @@ os_atomic_test_and_set(volatile lock_word_t* ptr)
}
/** Do an atomic release.
-
-In theory __sync_lock_release should be used to release the lock.
-Unfortunately, it does not work properly alone. The workaround is
-that more conservative __sync_lock_test_and_set is used instead.
-
-Performance regression was observed at some conditions for Intel
-architecture. Disable release barrier on Intel architecture for now.
@param[in,out] ptr Memory location to write to
@return the previous value */
inline
-lock_word_t
+void
os_atomic_clear(volatile lock_word_t* ptr)
{
- return(__sync_lock_test_and_set(ptr, 0));
+ __sync_lock_release(ptr);
}
# elif defined(HAVE_IB_GCC_ATOMIC_TEST_AND_SET)
@@ -907,15 +900,7 @@ for synchronization */
} while (0);
/** barrier definitions for memory ordering */
-#ifdef IB_STRONG_MEMORY_MODEL
-/* Performance regression was observed at some conditions for Intel
-architecture. Disable memory barrier for Intel architecture for now. */
-# define os_rmb do { } while(0)
-# define os_wmb do { } while(0)
-# define os_isync do { } while(0)
-# define IB_MEMORY_BARRIER_STARTUP_MSG \
- "Memory barrier is not used"
-#elif defined(HAVE_IB_GCC_ATOMIC_THREAD_FENCE)
+#if defined(HAVE_IB_GCC_ATOMIC_THREAD_FENCE)
# define HAVE_MEMORY_BARRIER
# define os_rmb __atomic_thread_fence(__ATOMIC_ACQUIRE)
# define os_wmb __atomic_thread_fence(__ATOMIC_RELEASE)
diff --git a/storage/xtradb/include/os0thread.h b/storage/xtradb/include/os0thread.h
index dcf809eec0d..815faf97319 100644
--- a/storage/xtradb/include/os0thread.h
+++ b/storage/xtradb/include/os0thread.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 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
@@ -139,7 +139,7 @@ os_thread_exit(
/*===========*/
void* exit_value) /*!< in: exit value; in Windows this void*
is cast as a DWORD */
- UNIV_COLD __attribute__((noreturn));
+ UNIV_COLD MY_ATTRIBUTE((noreturn));
/*****************************************************************//**
Returns the thread identifier of current thread.
@return current thread identifier */
diff --git a/storage/xtradb/include/page0cur.h b/storage/xtradb/include/page0cur.h
index b1ad49b4915..f04667ff29c 100644
--- a/storage/xtradb/include/page0cur.h
+++ b/storage/xtradb/include/page0cur.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -180,7 +180,7 @@ page_cur_tuple_insert(
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 */
- __attribute__((nonnull(1,2,3,4,5), warn_unused_result));
+ MY_ATTRIBUTE((nonnull(1,2,3,4,5), warn_unused_result));
#endif /* !UNIV_HOTBACKUP */
/***********************************************************//**
Inserts a record next to page cursor. Returns pointer to inserted record if
@@ -218,7 +218,7 @@ page_cur_insert_rec_low(
const rec_t* rec, /*!< in: pointer to a physical record */
ulint* offsets,/*!< in/out: rec_get_offsets(rec, index) */
mtr_t* mtr) /*!< in: mini-transaction handle, or NULL */
- __attribute__((nonnull(1,2,3,4), warn_unused_result));
+ MY_ATTRIBUTE((nonnull(1,2,3,4), warn_unused_result));
/***********************************************************//**
Inserts a record next to page cursor on a compressed and uncompressed
page. Returns pointer to inserted record if succeed, i.e.,
@@ -240,7 +240,7 @@ page_cur_insert_rec_zip(
const rec_t* rec, /*!< in: pointer to a physical record */
ulint* offsets,/*!< in/out: rec_get_offsets(rec, index) */
mtr_t* mtr) /*!< in: mini-transaction handle, or NULL */
- __attribute__((nonnull(1,2,3,4), warn_unused_result));
+ MY_ATTRIBUTE((nonnull(1,2,3,4), warn_unused_result));
/*************************************************************//**
Copies records from page to a newly created page, from a given record onward,
including that record. Infimum and supremum records are not copied.
diff --git a/storage/xtradb/include/page0page.h b/storage/xtradb/include/page0page.h
index 2da5d793fa9..cb43c937757 100644
--- a/storage/xtradb/include/page0page.h
+++ b/storage/xtradb/include/page0page.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -169,7 +169,7 @@ page_t*
page_align(
/*=======*/
const void* ptr) /*!< in: pointer to page frame */
- __attribute__((const));
+ MY_ATTRIBUTE((const));
/************************************************************//**
Gets the offset within a page.
@return offset from the start of the page */
@@ -178,7 +178,7 @@ ulint
page_offset(
/*========*/
const void* ptr) /*!< in: pointer to page frame */
- __attribute__((const));
+ MY_ATTRIBUTE((const));
/*************************************************************//**
Returns the max trx id field value. */
UNIV_INLINE
@@ -236,7 +236,7 @@ page_header_get_offs(
/*=================*/
const page_t* page, /*!< in: page */
ulint field) /*!< in: PAGE_FREE, ... */
- __attribute__((nonnull, pure));
+ MY_ATTRIBUTE((nonnull, pure));
/*************************************************************//**
Returns the pointer stored in the given header field, or NULL. */
@@ -296,7 +296,7 @@ page_rec_get_nth_const(
/*===================*/
const page_t* page, /*!< in: page */
ulint nth) /*!< in: nth record */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/************************************************************//**
Returns the nth record of the record list.
This is the inverse function of page_rec_get_n_recs_before().
@@ -307,7 +307,7 @@ page_rec_get_nth(
/*=============*/
page_t* page, /*< in: page */
ulint nth) /*!< in: nth record */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#ifndef UNIV_HOTBACKUP
/************************************************************//**
@@ -320,7 +320,7 @@ rec_t*
page_get_middle_rec(
/*================*/
page_t* page) /*!< in: page */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*************************************************************//**
Compares a data tuple to a physical record. Differs from the function
cmp_dtuple_rec_with_match in the way that the record must reside on an
@@ -528,7 +528,7 @@ bool
page_is_leaf(
/*=========*/
const page_t* page) /*!< in: page */
- __attribute__((pure));
+ MY_ATTRIBUTE((nonnull, pure));
/************************************************************//**
Determine whether the page is empty.
@return true if the page is empty (PAGE_N_RECS = 0) */
@@ -537,7 +537,7 @@ bool
page_is_empty(
/*==========*/
const page_t* page) /*!< in: page */
- __attribute__((nonnull, pure));
+ MY_ATTRIBUTE((nonnull, pure));
/************************************************************//**
Determine whether the page contains garbage.
@return true if the page contains garbage (PAGE_GARBAGE is not 0) */
@@ -546,7 +546,7 @@ bool
page_has_garbage(
/*=============*/
const page_t* page) /*!< in: page */
- __attribute__((nonnull, pure));
+ MY_ATTRIBUTE((nonnull, pure));
/************************************************************//**
Gets the pointer to the next record on the page.
@return pointer to next record */
@@ -618,7 +618,7 @@ ibool
page_rec_is_user_rec_low(
/*=====================*/
ulint offset) /*!< in: record offset on page */
- __attribute__((const));
+ MY_ATTRIBUTE((const));
/************************************************************//**
TRUE if the record is the supremum record on a page.
@return TRUE if the supremum record */
@@ -627,7 +627,7 @@ ibool
page_rec_is_supremum_low(
/*=====================*/
ulint offset) /*!< in: record offset on page */
- __attribute__((const));
+ MY_ATTRIBUTE((const));
/************************************************************//**
TRUE if the record is the infimum record on a page.
@return TRUE if the infimum record */
@@ -636,7 +636,7 @@ ibool
page_rec_is_infimum_low(
/*====================*/
ulint offset) /*!< in: record offset on page */
- __attribute__((const));
+ MY_ATTRIBUTE((const));
/************************************************************//**
TRUE if the record is a user record on the page.
@@ -646,7 +646,7 @@ ibool
page_rec_is_user_rec(
/*=================*/
const rec_t* rec) /*!< in: record */
- __attribute__((const));
+ MY_ATTRIBUTE((const));
/************************************************************//**
TRUE if the record is the supremum record on a page.
@return TRUE if the supremum record */
@@ -655,7 +655,7 @@ ibool
page_rec_is_supremum(
/*=================*/
const rec_t* rec) /*!< in: record */
- __attribute__((const));
+ MY_ATTRIBUTE((const));
/************************************************************//**
TRUE if the record is the infimum record on a page.
@@ -665,7 +665,7 @@ ibool
page_rec_is_infimum(
/*================*/
const rec_t* rec) /*!< in: record */
- __attribute__((const));
+ MY_ATTRIBUTE((const));
/***************************************************************//**
Looks for the record which owns the given record.
@return the owner record */
@@ -685,7 +685,7 @@ page_rec_write_field(
ulint i, /*!< in: index of the field to update */
ulint val, /*!< in: value to write */
mtr_t* mtr) /*!< in/out: mini-transaction */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#endif /* !UNIV_HOTBACKUP */
/************************************************************//**
Returns the maximum combined size of records which can be inserted on top
@@ -715,7 +715,7 @@ ulint
page_get_free_space_of_empty(
/*=========================*/
ulint comp) /*!< in: nonzero=compact page format */
- __attribute__((const));
+ MY_ATTRIBUTE((const));
/**********************************************************//**
Returns the base extra size of a physical record. This is the
size of the fixed header, independent of the record size.
@@ -801,7 +801,7 @@ page_create_zip(
ulint level, /*!< in: the B-tree level of the page */
trx_id_t max_trx_id, /*!< in: PAGE_MAX_TRX_ID */
mtr_t* mtr) /*!< in/out: mini-transaction */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************//**
Empty a previously created B-tree index page. */
UNIV_INTERN
@@ -811,7 +811,7 @@ page_create_empty(
buf_block_t* block, /*!< in/out: B-tree block */
dict_index_t* index, /*!< in: the index of the page */
mtr_t* mtr) /*!< in/out: mini-transaction */
- __attribute__((nonnull(1,2)));
+ MY_ATTRIBUTE((nonnull(1,2)));
/*************************************************************//**
Differs from page_copy_rec_list_end, because this function does not
touch the lock table and max trx id on page or compress the page.
@@ -850,7 +850,7 @@ page_copy_rec_list_end(
rec_t* rec, /*!< in: record on page */
dict_index_t* index, /*!< in: record descriptor */
mtr_t* mtr) /*!< in: mtr */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*************************************************************//**
Copies records from page to new_page, up to the given record, NOT
including that record. Infimum and supremum records are not copied.
@@ -872,7 +872,7 @@ page_copy_rec_list_start(
rec_t* rec, /*!< in: record on page */
dict_index_t* index, /*!< in: record descriptor */
mtr_t* mtr) /*!< in: mtr */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*************************************************************//**
Deletes records from a page from a given record onward, including that record.
The infimum and supremum records are not deleted. */
@@ -889,7 +889,7 @@ page_delete_rec_list_end(
records in the end of the chain to
delete, or ULINT_UNDEFINED if not known */
mtr_t* mtr) /*!< in: mtr */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*************************************************************//**
Deletes records from page, up to the given record, NOT including
that record. Infimum and supremum records are not deleted. */
@@ -901,7 +901,7 @@ page_delete_rec_list_start(
buf_block_t* block, /*!< in: buffer block of the page */
dict_index_t* index, /*!< in: record descriptor */
mtr_t* mtr) /*!< in: mtr */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*************************************************************//**
Moves record list end to another page. Moved records include
split_rec.
@@ -922,7 +922,7 @@ page_move_rec_list_end(
rec_t* split_rec, /*!< in: first record to move */
dict_index_t* index, /*!< in: record descriptor */
mtr_t* mtr) /*!< in: mtr */
- __attribute__((nonnull(1, 2, 4, 5)));
+ MY_ATTRIBUTE((nonnull(1, 2, 4, 5)));
/*************************************************************//**
Moves record list start to another page. Moved records do not include
split_rec.
@@ -942,7 +942,7 @@ page_move_rec_list_start(
rec_t* split_rec, /*!< in: first record not to move */
dict_index_t* index, /*!< in: record descriptor */
mtr_t* mtr) /*!< in: mtr */
- __attribute__((nonnull(1, 2, 4, 5)));
+ MY_ATTRIBUTE((nonnull(1, 2, 4, 5)));
/****************************************************************//**
Splits a directory slot which owns too many records. */
UNIV_INTERN
@@ -953,7 +953,7 @@ page_dir_split_slot(
page_zip_des_t* page_zip,/*!< in/out: compressed page whose
uncompressed part will be written, or NULL */
ulint slot_no)/*!< in: the directory slot */
- __attribute__((nonnull(1)));
+ MY_ATTRIBUTE((nonnull(1)));
/*************************************************************//**
Tries to balance the given directory slot with too few records
with the upper neighbor, so that there are at least the minimum number
@@ -966,7 +966,7 @@ page_dir_balance_slot(
page_t* page, /*!< in/out: index page */
page_zip_des_t* page_zip,/*!< in/out: compressed page, or NULL */
ulint slot_no)/*!< in: the directory slot */
- __attribute__((nonnull(1)));
+ MY_ATTRIBUTE((nonnull(1)));
/**********************************************************//**
Parses a log record of a record list end or start deletion.
@return end of log record or NULL */
diff --git a/storage/xtradb/include/page0types.h b/storage/xtradb/include/page0types.h
index 74ad6f72f7e..3b53de6cc2b 100644
--- a/storage/xtradb/include/page0types.h
+++ b/storage/xtradb/include/page0types.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -133,7 +133,7 @@ page_zip_rec_set_deleted(
page_zip_des_t* page_zip,/*!< in/out: compressed page */
const byte* rec, /*!< in: record on the uncompressed page */
ulint flag) /*!< in: the deleted flag (nonzero=TRUE) */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Write the "owned" flag of a record on a compressed page. The n_owned field
@@ -145,7 +145,7 @@ page_zip_rec_set_owned(
page_zip_des_t* page_zip,/*!< in/out: compressed page */
const byte* rec, /*!< in: record on the uncompressed page */
ulint flag) /*!< in: the owned flag (nonzero=TRUE) */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Shift the dense page directory when a record is deleted. */
@@ -158,7 +158,7 @@ page_zip_dir_delete(
dict_index_t* index, /*!< in: index of rec */
const ulint* offsets,/*!< in: rec_get_offsets(rec) */
const byte* free) /*!< in: previous start of the free list */
- __attribute__((nonnull(1,2,3,4)));
+ MY_ATTRIBUTE((nonnull(1,2,3,4)));
/**********************************************************************//**
Add a slot to the dense page directory. */
@@ -169,5 +169,5 @@ page_zip_dir_add_slot(
page_zip_des_t* page_zip, /*!< in/out: compressed page */
ulint is_clustered) /*!< in: nonzero for clustered index,
zero for others */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#endif
diff --git a/storage/xtradb/include/page0zip.h b/storage/xtradb/include/page0zip.h
index 41eb1e35d78..81068e7bd29 100644
--- a/storage/xtradb/include/page0zip.h
+++ b/storage/xtradb/include/page0zip.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2005, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
This program is free software; you can redistribute it and/or modify it under
@@ -63,7 +63,7 @@ ulint
page_zip_get_size(
/*==============*/
const page_zip_des_t* page_zip) /*!< in: compressed page */
- __attribute__((nonnull, pure));
+ MY_ATTRIBUTE((nonnull, pure));
/**********************************************************************//**
Set the size of a compressed page in bytes. */
UNIV_INLINE
@@ -86,7 +86,7 @@ page_zip_rec_needs_ext(
ulint n_fields, /*!< in: number of fields in the record;
ignored if zip_size == 0 */
ulint zip_size) /*!< in: compressed page size in bytes, or 0 */
- __attribute__((const));
+ MY_ATTRIBUTE((const));
/**********************************************************************//**
Determine the guaranteed free space on an empty page.
@@ -97,7 +97,7 @@ page_zip_empty_size(
/*================*/
ulint n_fields, /*!< in: number of columns in the index */
ulint zip_size) /*!< in: compressed page size in bytes */
- __attribute__((const));
+ MY_ATTRIBUTE((const));
#endif /* !UNIV_HOTBACKUP */
/**********************************************************************//**
@@ -132,7 +132,7 @@ page_zip_compress(
dict_index_t* index, /*!< in: index of the B-tree node */
ulint level, /*!< in: compression level */
mtr_t* mtr) /*!< in: mini-transaction, or NULL */
- __attribute__((nonnull(1,3)));
+ MY_ATTRIBUTE((nonnull(1,2,3)));
/**********************************************************************//**
Decompress a page. This function should tolerate errors on the compressed
@@ -150,7 +150,7 @@ page_zip_decompress(
FALSE=verify but do not copy some
page header fields that should not change
after page creation */
- __attribute__((nonnull(1,2)));
+ MY_ATTRIBUTE((nonnull(1,2)));
#ifdef UNIV_DEBUG
/**********************************************************************//**
@@ -179,7 +179,7 @@ page_zip_validate_low(
const dict_index_t* index, /*!< in: index of the page, if known */
ibool sloppy) /*!< in: FALSE=strict,
TRUE=ignore the MIN_REC_FLAG */
- __attribute__((nonnull(1,2)));
+ MY_ATTRIBUTE((nonnull(1,2)));
/**********************************************************************//**
Check that the compressed and decompressed pages match. */
UNIV_INTERN
@@ -189,7 +189,7 @@ page_zip_validate(
const page_zip_des_t* page_zip,/*!< in: compressed page */
const page_t* page, /*!< in: uncompressed page */
const dict_index_t* index) /*!< in: index of the page, if known */
- __attribute__((nonnull(1,2)));
+ MY_ATTRIBUTE((nonnull(1,2)));
#endif /* UNIV_ZIP_DEBUG */
#ifndef UNIV_INNOCHECKSUM
@@ -203,7 +203,7 @@ page_zip_max_ins_size(
/*==================*/
const page_zip_des_t* page_zip,/*!< in: compressed page */
ibool is_clust)/*!< in: TRUE if clustered index */
- __attribute__((nonnull, pure));
+ MY_ATTRIBUTE((nonnull, pure));
/**********************************************************************//**
Determine if enough space is available in the modification log.
@@ -217,7 +217,7 @@ page_zip_available(
ulint length, /*!< in: combined size of the record */
ulint create) /*!< in: nonzero=add the record to
the heap */
- __attribute__((nonnull, pure));
+ MY_ATTRIBUTE((nonnull, pure));
/**********************************************************************//**
Write data to the uncompressed header portion of a page. The data must
@@ -230,7 +230,7 @@ page_zip_write_header(
const byte* str, /*!< in: address on the uncompressed page */
ulint length, /*!< in: length of the data */
mtr_t* mtr) /*!< in: mini-transaction, or NULL */
- __attribute__((nonnull(1,2)));
+ MY_ATTRIBUTE((nonnull(1,2)));
/**********************************************************************//**
Write an entire record on the compressed page. The data must already
@@ -244,7 +244,7 @@ page_zip_write_rec(
dict_index_t* index, /*!< in: the index the record belongs to */
const ulint* offsets,/*!< in: rec_get_offsets(rec, index) */
ulint create) /*!< in: nonzero=insert, zero=update */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/***********************************************************//**
Parses a log record of writing a BLOB pointer of a record.
@@ -273,7 +273,7 @@ page_zip_write_blob_ptr(
ulint n, /*!< in: column index */
mtr_t* mtr) /*!< in: mini-transaction handle,
or NULL if no logging is needed */
- __attribute__((nonnull(1,2,3,4)));
+ MY_ATTRIBUTE((nonnull(1,2,3,4)));
/***********************************************************//**
Parses a log record of writing the node pointer of a record.
@@ -298,7 +298,7 @@ page_zip_write_node_ptr(
ulint size, /*!< in: data size of rec */
ulint ptr, /*!< in: node pointer */
mtr_t* mtr) /*!< in: mini-transaction, or NULL */
- __attribute__((nonnull(1,2)));
+ MY_ATTRIBUTE((nonnull(1,2)));
/**********************************************************************//**
Write the trx_id and roll_ptr of a record on a B-tree leaf node page. */
@@ -312,7 +312,7 @@ page_zip_write_trx_id_and_roll_ptr(
ulint trx_id_col,/*!< in: column number of TRX_ID in rec */
trx_id_t trx_id, /*!< in: transaction identifier */
roll_ptr_t roll_ptr)/*!< in: roll_ptr */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Write the "deleted" flag of a record on a compressed page. The flag must
@@ -324,7 +324,7 @@ page_zip_rec_set_deleted(
page_zip_des_t* page_zip,/*!< in/out: compressed page */
const byte* rec, /*!< in: record on the uncompressed page */
ulint flag) /*!< in: the deleted flag (nonzero=TRUE) */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Write the "owned" flag of a record on a compressed page. The n_owned field
@@ -336,7 +336,7 @@ page_zip_rec_set_owned(
page_zip_des_t* page_zip,/*!< in/out: compressed page */
const byte* rec, /*!< in: record on the uncompressed page */
ulint flag) /*!< in: the owned flag (nonzero=TRUE) */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Insert a record to the dense page directory. */
@@ -363,7 +363,7 @@ page_zip_dir_delete(
const ulint* offsets, /*!< in: rec_get_offsets(rec) */
const byte* free) /*!< in: previous start of
the free list */
- __attribute__((nonnull(1,2,3,4)));
+ MY_ATTRIBUTE((nonnull(1,2,3,4)));
/**********************************************************************//**
Add a slot to the dense page directory. */
@@ -374,7 +374,7 @@ page_zip_dir_add_slot(
page_zip_des_t* page_zip, /*!< in/out: compressed page */
ulint is_clustered) /*!< in: nonzero for clustered index,
zero for others */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/***********************************************************//**
Parses a log record of writing to the header of a page.
@@ -402,7 +402,7 @@ page_zip_write_header(
const byte* str, /*!< in: address on the uncompressed page */
ulint length, /*!< in: length of the data */
mtr_t* mtr) /*!< in: mini-transaction, or NULL */
- __attribute__((nonnull(1,2)));
+ MY_ATTRIBUTE((nonnull(1,2)));
/**********************************************************************//**
Reorganize and compress a page. This is a low-level operation for
@@ -425,7 +425,7 @@ page_zip_reorganize(
m_start, m_end, m_nonempty */
dict_index_t* index, /*!< in: index of the B-tree node */
mtr_t* mtr) /*!< in: mini-transaction */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#ifndef UNIV_HOTBACKUP
/**********************************************************************//**
Copy the records of a page byte for byte. Do not copy the page header
@@ -444,7 +444,7 @@ page_zip_copy_recs(
const page_t* src, /*!< in: page */
dict_index_t* index, /*!< in: index of the B-tree */
mtr_t* mtr) /*!< in: mini-transaction */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#endif /* !UNIV_HOTBACKUP */
/**********************************************************************//**
@@ -458,7 +458,7 @@ page_zip_parse_compress(
byte* end_ptr,/*!< in: buffer end */
page_t* page, /*!< out: uncompressed page */
page_zip_des_t* page_zip)/*!< out: compressed page */
- __attribute__((nonnull(1,2)));
+ MY_ATTRIBUTE((nonnull(1,2)));
#endif /* !UNIV_INNOCHECKSUM */
@@ -472,7 +472,7 @@ page_zip_calc_checksum(
const void* data, /*!< in: compressed page */
ulint size, /*!< in: size of compressed page */
srv_checksum_algorithm_t algo) /*!< in: algorithm to use */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Verify a compressed page's checksum.
@@ -509,7 +509,7 @@ page_zip_parse_compress_no_data(
page_t* page, /*!< in: uncompressed page */
page_zip_des_t* page_zip, /*!< out: compressed page */
dict_index_t* index) /*!< in: index */
- __attribute__((nonnull(1,2)));
+ MY_ATTRIBUTE((nonnull(1,2)));
/**********************************************************************//**
Reset the counters used for filling
diff --git a/storage/xtradb/include/pars0pars.h b/storage/xtradb/include/pars0pars.h
index 65ff7533828..73585c78a6a 100644
--- a/storage/xtradb/include/pars0pars.h
+++ b/storage/xtradb/include/pars0pars.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -472,7 +472,7 @@ pars_complete_graph_for_exec(
query graph, or NULL for dummy graph */
trx_t* trx, /*!< in: transaction handle */
mem_heap_t* heap) /*!< in: memory heap from which allocated */
- __attribute__((nonnull(2,3), warn_unused_result));
+ MY_ATTRIBUTE((nonnull(2,3), warn_unused_result));
/****************************************************************//**
Create parser info struct.
@@ -628,7 +628,7 @@ pars_info_bind_ull_literal(
pars_info_t* info, /*!< in: info struct */
const char* name, /*!< in: name */
const ib_uint64_t* val) /*!< in: value */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/****************************************************************//**
Add bound id. */
diff --git a/storage/xtradb/include/read0read.h b/storage/xtradb/include/read0read.h
index 0352f129c30..2d6885884f7 100644
--- a/storage/xtradb/include/read0read.h
+++ b/storage/xtradb/include/read0read.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 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
@@ -116,7 +116,7 @@ read_view_sees_trx_id(
/*==================*/
const read_view_t* view, /*!< in: read view */
trx_id_t trx_id) /*!< in: trx id */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Prints a read view to file. */
UNIV_INTERN
diff --git a/storage/xtradb/include/rem0cmp.h b/storage/xtradb/include/rem0cmp.h
index cb3c85ac2c8..65116229fdc 100644
--- a/storage/xtradb/include/rem0cmp.h
+++ b/storage/xtradb/include/rem0cmp.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -174,7 +174,7 @@ cmp_dtuple_rec_with_match_low(
bytes within the first field not completely
matched; when function returns, contains the
value for current comparison */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#define cmp_dtuple_rec_with_match(tuple,rec,offsets,fields,bytes) \
cmp_dtuple_rec_with_match_low( \
tuple,rec,offsets,dtuple_get_n_fields_cmp(tuple),fields,bytes)
@@ -218,7 +218,7 @@ cmp_rec_rec_simple(
struct TABLE* table) /*!< in: MySQL table, for reporting
duplicate key value if applicable,
or NULL */
- __attribute__((nonnull(1,2,3,4), warn_unused_result));
+ MY_ATTRIBUTE((nonnull(1,2,3,4), warn_unused_result));
/*************************************************************//**
This function is used to compare two physical records. Only the common
first fields are compared, and if an externally stored field is
diff --git a/storage/xtradb/include/rem0rec.h b/storage/xtradb/include/rem0rec.h
index 51c09bdc3ec..d72f2760a8c 100644
--- a/storage/xtradb/include/rem0rec.h
+++ b/storage/xtradb/include/rem0rec.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -98,7 +98,7 @@ rec_get_next_ptr_const(
/*===================*/
const rec_t* rec, /*!< in: physical record */
ulint comp) /*!< in: nonzero=compact page format */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/******************************************************//**
The following function is used to get the pointer of the next chained record
on the same page.
@@ -109,7 +109,7 @@ rec_get_next_ptr(
/*=============*/
rec_t* rec, /*!< in: physical record */
ulint comp) /*!< in: nonzero=compact page format */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/******************************************************//**
The following function is used to get the offset of the
next chained record on the same page.
@@ -120,7 +120,7 @@ rec_get_next_offs(
/*==============*/
const rec_t* rec, /*!< in: physical record */
ulint comp) /*!< in: nonzero=compact page format */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/******************************************************//**
The following function is used to set the next record offset field
of an old-style record. */
@@ -130,7 +130,7 @@ rec_set_next_offs_old(
/*==================*/
rec_t* rec, /*!< in: old-style physical record */
ulint next) /*!< in: offset of the next record */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************//**
The following function is used to set the next record offset field
of a new-style record. */
@@ -140,7 +140,7 @@ rec_set_next_offs_new(
/*==================*/
rec_t* rec, /*!< in/out: new-style physical record */
ulint next) /*!< in: offset of the next record */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************//**
The following function is used to get the number of fields
in an old-style record.
@@ -150,7 +150,7 @@ ulint
rec_get_n_fields_old(
/*=================*/
const rec_t* rec) /*!< in: physical record */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/******************************************************//**
The following function is used to get the number of fields
in a record.
@@ -161,7 +161,7 @@ rec_get_n_fields(
/*=============*/
const rec_t* rec, /*!< in: physical record */
const dict_index_t* index) /*!< in: record descriptor */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/******************************************************//**
The following function is used to get the number of records owned by the
previous directory record.
@@ -171,7 +171,7 @@ ulint
rec_get_n_owned_old(
/*================*/
const rec_t* rec) /*!< in: old-style physical record */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/******************************************************//**
The following function is used to set the number of owned records. */
UNIV_INLINE
@@ -180,7 +180,7 @@ rec_set_n_owned_old(
/*================*/
rec_t* rec, /*!< in: old-style physical record */
ulint n_owned) /*!< in: the number of owned */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************//**
The following function is used to get the number of records owned by the
previous directory record.
@@ -190,7 +190,7 @@ ulint
rec_get_n_owned_new(
/*================*/
const rec_t* rec) /*!< in: new-style physical record */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/******************************************************//**
The following function is used to set the number of owned records. */
UNIV_INLINE
@@ -200,7 +200,7 @@ rec_set_n_owned_new(
rec_t* rec, /*!< in/out: new-style physical record */
page_zip_des_t* page_zip,/*!< in/out: compressed page, or NULL */
ulint n_owned)/*!< in: the number of owned */
- __attribute__((nonnull(1)));
+ MY_ATTRIBUTE((nonnull(1)));
/******************************************************//**
The following function is used to retrieve the info bits of
a record.
@@ -211,7 +211,7 @@ rec_get_info_bits(
/*==============*/
const rec_t* rec, /*!< in: physical record */
ulint comp) /*!< in: nonzero=compact page format */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/******************************************************//**
The following function is used to set the info bits of a record. */
UNIV_INLINE
@@ -220,7 +220,7 @@ rec_set_info_bits_old(
/*==================*/
rec_t* rec, /*!< in: old-style physical record */
ulint bits) /*!< in: info bits */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************//**
The following function is used to set the info bits of a record. */
UNIV_INLINE
@@ -229,7 +229,7 @@ rec_set_info_bits_new(
/*==================*/
rec_t* rec, /*!< in/out: new-style physical record */
ulint bits) /*!< in: info bits */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************//**
The following function retrieves the status bits of a new-style record.
@return status bits */
@@ -238,7 +238,7 @@ ulint
rec_get_status(
/*===========*/
const rec_t* rec) /*!< in: physical record */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/******************************************************//**
The following function is used to set the status bits of a new-style record. */
@@ -248,7 +248,7 @@ rec_set_status(
/*===========*/
rec_t* rec, /*!< in/out: physical record */
ulint bits) /*!< in: info bits */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************//**
The following function is used to retrieve the info and status
@@ -260,7 +260,7 @@ rec_get_info_and_status_bits(
/*=========================*/
const rec_t* rec, /*!< in: physical record */
ulint comp) /*!< in: nonzero=compact page format */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/******************************************************//**
The following function is used to set the info and status
bits of a record. (Only compact records have status bits.) */
@@ -270,7 +270,7 @@ rec_set_info_and_status_bits(
/*=========================*/
rec_t* rec, /*!< in/out: compact physical record */
ulint bits) /*!< in: info bits */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************//**
The following function tells if record is delete marked.
@@ -281,7 +281,7 @@ rec_get_deleted_flag(
/*=================*/
const rec_t* rec, /*!< in: physical record */
ulint comp) /*!< in: nonzero=compact page format */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/******************************************************//**
The following function is used to set the deleted bit. */
UNIV_INLINE
@@ -290,7 +290,7 @@ rec_set_deleted_flag_old(
/*=====================*/
rec_t* rec, /*!< in: old-style physical record */
ulint flag) /*!< in: nonzero if delete marked */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************//**
The following function is used to set the deleted bit. */
UNIV_INLINE
@@ -300,7 +300,7 @@ rec_set_deleted_flag_new(
rec_t* rec, /*!< in/out: new-style physical record */
page_zip_des_t* page_zip,/*!< in/out: compressed page, or NULL */
ulint flag) /*!< in: nonzero if delete marked */
- __attribute__((nonnull(1)));
+ MY_ATTRIBUTE((nonnull(1)));
/******************************************************//**
The following function tells if a new-style record is a node pointer.
@return TRUE if node pointer */
@@ -309,7 +309,7 @@ ibool
rec_get_node_ptr_flag(
/*==================*/
const rec_t* rec) /*!< in: physical record */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/******************************************************//**
The following function is used to get the order number
of an old-style record in the heap of the index page.
@@ -319,7 +319,7 @@ ulint
rec_get_heap_no_old(
/*================*/
const rec_t* rec) /*!< in: physical record */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/******************************************************//**
The following function is used to set the heap number
field in an old-style record. */
@@ -329,7 +329,7 @@ rec_set_heap_no_old(
/*================*/
rec_t* rec, /*!< in: physical record */
ulint heap_no)/*!< in: the heap number */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************//**
The following function is used to get the order number
of a new-style record in the heap of the index page.
@@ -339,7 +339,7 @@ ulint
rec_get_heap_no_new(
/*================*/
const rec_t* rec) /*!< in: physical record */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/******************************************************//**
The following function is used to set the heap number
field in a new-style record. */
@@ -349,7 +349,7 @@ rec_set_heap_no_new(
/*================*/
rec_t* rec, /*!< in/out: physical record */
ulint heap_no)/*!< in: the heap number */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************//**
The following function is used to test whether the data offsets
in the record are stored in one-byte or two-byte format.
@@ -359,7 +359,7 @@ ibool
rec_get_1byte_offs_flag(
/*====================*/
const rec_t* rec) /*!< in: physical record */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/******************************************************//**
The following function is used to set the 1-byte offsets flag. */
@@ -369,7 +369,7 @@ rec_set_1byte_offs_flag(
/*====================*/
rec_t* rec, /*!< in: physical record */
ibool flag) /*!< in: TRUE if 1byte form */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************//**
Returns the offset of nth field end if the record is stored in the 1-byte
@@ -382,7 +382,7 @@ rec_1_get_field_end_info(
/*=====================*/
const rec_t* rec, /*!< in: record */
ulint n) /*!< in: field index */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/******************************************************//**
Returns the offset of nth field end if the record is stored in the 2-byte
@@ -396,7 +396,7 @@ rec_2_get_field_end_info(
/*=====================*/
const rec_t* rec, /*!< in: record */
ulint n) /*!< in: field index */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/******************************************************//**
Returns nonzero if the field is stored off-page.
@@ -408,7 +408,7 @@ rec_2_is_field_extern(
/*==================*/
const rec_t* rec, /*!< in: record */
ulint n) /*!< in: field index */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/******************************************************//**
Determine how many of the first n columns in a compact
@@ -421,7 +421,7 @@ rec_get_n_extern_new(
const rec_t* rec, /*!< in: compact physical record */
const dict_index_t* index, /*!< in: record descriptor */
ulint n) /*!< in: number of columns to scan */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************//**
The following function determines the offsets to each field
@@ -446,9 +446,9 @@ rec_get_offsets_func(
#endif /* UNIV_DEBUG */
mem_heap_t** heap) /*!< in/out: memory heap */
#ifdef UNIV_DEBUG
- __attribute__((nonnull(1,2,5,7),warn_unused_result));
+ MY_ATTRIBUTE((nonnull(1,2,5,7),warn_unused_result));
#else /* UNIV_DEBUG */
- __attribute__((nonnull(1,2,5),warn_unused_result));
+ MY_ATTRIBUTE((nonnull(1,2,5),warn_unused_result));
#endif /* UNIV_DEBUG */
#ifdef UNIV_DEBUG
@@ -475,7 +475,7 @@ rec_get_offsets_reverse(
0=leaf node */
ulint* offsets)/*!< in/out: array consisting of
offsets[0] allocated elements */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#ifdef UNIV_DEBUG
/************************************************************//**
Validates offsets returned by rec_get_offsets().
@@ -488,7 +488,7 @@ rec_offs_validate(
const dict_index_t* index, /*!< in: record descriptor or NULL */
const ulint* offsets)/*!< in: array returned by
rec_get_offsets() */
- __attribute__((nonnull(3), warn_unused_result));
+ MY_ATTRIBUTE((nonnull(3), warn_unused_result));
/************************************************************//**
Updates debug data in offsets, in order to avoid bogus
rec_offs_validate() failures. */
@@ -500,7 +500,7 @@ rec_offs_make_valid(
const dict_index_t* index, /*!< in: record descriptor */
ulint* offsets)/*!< in: array returned by
rec_get_offsets() */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#else
# define rec_offs_make_valid(rec, index, offsets) ((void) 0)
#endif /* UNIV_DEBUG */
@@ -517,7 +517,7 @@ rec_get_nth_field_offs_old(
ulint n, /*!< in: index of the field */
ulint* len) /*!< out: length of the field; UNIV_SQL_NULL
if SQL null */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#define rec_get_nth_field_old(rec, n, len) \
((rec) + rec_get_nth_field_offs_old(rec, n, len))
/************************************************************//**
@@ -531,7 +531,7 @@ rec_get_nth_field_size(
/*===================*/
const rec_t* rec, /*!< in: record */
ulint n) /*!< in: index of the field */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/************************************************************//**
The following function is used to get an offset to the nth
data field in a record.
@@ -544,7 +544,7 @@ rec_get_nth_field_offs(
ulint n, /*!< in: index of the field */
ulint* len) /*!< out: length of the field; UNIV_SQL_NULL
if SQL null */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#define rec_get_nth_field(rec, offsets, n, len) \
((rec) + rec_get_nth_field_offs(offsets, n, len))
/******************************************************//**
@@ -556,7 +556,7 @@ ulint
rec_offs_comp(
/*==========*/
const ulint* offsets)/*!< in: array returned by rec_get_offsets() */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/******************************************************//**
Determine if the offsets are for a record containing
externally stored columns.
@@ -566,7 +566,7 @@ ulint
rec_offs_any_extern(
/*================*/
const ulint* offsets)/*!< in: array returned by rec_get_offsets() */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/******************************************************//**
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 */
@@ -576,7 +576,7 @@ rec_offs_any_null_extern(
/*=====================*/
const rec_t* rec, /*!< in: record */
const ulint* offsets) /*!< in: rec_get_offsets(rec) */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/******************************************************//**
Returns nonzero if the extern bit is set in nth field of rec.
@return nonzero if externally stored */
@@ -586,7 +586,7 @@ rec_offs_nth_extern(
/*================*/
const ulint* offsets,/*!< in: array returned by rec_get_offsets() */
ulint n) /*!< in: nth field */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/******************************************************//**
Returns nonzero if the SQL NULL bit is set in nth field of rec.
@return nonzero if SQL NULL */
@@ -596,7 +596,7 @@ rec_offs_nth_sql_null(
/*==================*/
const ulint* offsets,/*!< in: array returned by rec_get_offsets() */
ulint n) /*!< in: nth field */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/******************************************************//**
Gets the physical size of a field.
@return length of field */
@@ -606,7 +606,7 @@ rec_offs_nth_size(
/*==============*/
const ulint* offsets,/*!< in: array returned by rec_get_offsets() */
ulint n) /*!< in: nth field */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/******************************************************//**
Returns the number of extern bits set in a record.
@@ -616,7 +616,7 @@ ulint
rec_offs_n_extern(
/*==============*/
const ulint* offsets)/*!< in: array returned by rec_get_offsets() */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/***********************************************************//**
This is used to modify the value of an already existing field in a record.
The previous value must have exactly the same size as the new value. If len
@@ -636,7 +636,7 @@ rec_set_nth_field(
length as the previous value.
If SQL null, previous value must be
SQL null. */
- __attribute__((nonnull(1,2)));
+ MY_ATTRIBUTE((nonnull(1,2)));
/**********************************************************//**
The following function returns the data size of an old-style physical
record, that is the sum of field lengths. SQL null fields
@@ -648,7 +648,7 @@ ulint
rec_get_data_size_old(
/*==================*/
const rec_t* rec) /*!< in: physical record */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/**********************************************************//**
The following function returns the number of allocated elements
for an array of offsets.
@@ -658,7 +658,7 @@ ulint
rec_offs_get_n_alloc(
/*=================*/
const ulint* offsets)/*!< in: array for rec_get_offsets() */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/**********************************************************//**
The following function sets the number of allocated elements
for an array of offsets. */
@@ -669,7 +669,7 @@ rec_offs_set_n_alloc(
ulint* offsets, /*!< out: array for rec_get_offsets(),
must be allocated */
ulint n_alloc) /*!< in: number of elements */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#define rec_offs_init(offsets) \
rec_offs_set_n_alloc(offsets, (sizeof offsets) / sizeof *offsets)
/**********************************************************//**
@@ -680,7 +680,7 @@ ulint
rec_offs_n_fields(
/*==============*/
const ulint* offsets)/*!< in: array returned by rec_get_offsets() */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/**********************************************************//**
The following function returns the data size of a physical
record, that is the sum of field lengths. SQL null fields
@@ -692,7 +692,7 @@ ulint
rec_offs_data_size(
/*===============*/
const ulint* offsets)/*!< in: array returned by rec_get_offsets() */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/**********************************************************//**
Returns the total size of record minus data size of record.
The value returned by the function is the distance from record
@@ -703,7 +703,7 @@ ulint
rec_offs_extra_size(
/*================*/
const ulint* offsets)/*!< in: array returned by rec_get_offsets() */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/**********************************************************//**
Returns the total size of a physical record.
@return size */
@@ -712,7 +712,7 @@ ulint
rec_offs_size(
/*==========*/
const ulint* offsets)/*!< in: array returned by rec_get_offsets() */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
#ifdef UNIV_DEBUG
/**********************************************************//**
Returns a pointer to the start of the record.
@@ -723,7 +723,7 @@ rec_get_start(
/*==========*/
const rec_t* rec, /*!< in: pointer to record */
const ulint* offsets)/*!< in: array returned by rec_get_offsets() */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
/**********************************************************//**
Returns a pointer to the end of the record.
@return pointer to end */
@@ -733,7 +733,7 @@ rec_get_end(
/*========*/
const rec_t* rec, /*!< in: pointer to record */
const ulint* offsets)/*!< in: array returned by rec_get_offsets() */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
#else /* UNIV_DEBUG */
# define rec_get_start(rec, offsets) ((rec) - rec_offs_extra_size(offsets))
# define rec_get_end(rec, offsets) ((rec) + rec_offs_data_size(offsets))
@@ -748,7 +748,7 @@ rec_copy(
void* buf, /*!< in: buffer */
const rec_t* rec, /*!< in: physical record */
const ulint* offsets)/*!< in: array returned by rec_get_offsets() */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#ifndef UNIV_HOTBACKUP
/**********************************************************//**
Determines the size of a data tuple prefix in a temporary file.
@@ -761,7 +761,7 @@ rec_get_converted_size_temp(
const dfield_t* fields, /*!< in: array of data fields */
ulint n_fields,/*!< in: number of data fields */
ulint* extra) /*!< out: extra size */
- __attribute__((warn_unused_result, nonnull));
+ MY_ATTRIBUTE((warn_unused_result, nonnull));
/******************************************************//**
Determine the offset to each field in temporary file.
@@ -774,7 +774,7 @@ rec_init_offsets_temp(
const dict_index_t* index, /*!< in: record descriptor */
ulint* offsets)/*!< in/out: array of offsets;
in: n=rec_offs_n_fields(offsets) */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************//**
Builds a temporary file record out of a data tuple.
@@ -787,7 +787,7 @@ rec_convert_dtuple_to_temp(
const dict_index_t* index, /*!< in: record descriptor */
const dfield_t* fields, /*!< in: array of data fields */
ulint n_fields) /*!< in: number of fields */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**************************************************************//**
Copies the first n fields of a physical record to a new physical record in
@@ -805,7 +805,7 @@ rec_copy_prefix_to_buf(
for the copied prefix,
or NULL */
ulint* buf_size) /*!< in/out: buffer size */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/************************************************************//**
Folds a prefix of a physical record to a ulint.
@return the folded value */
@@ -821,7 +821,7 @@ rec_fold(
ulint n_bytes, /*!< in: number of bytes to fold
in an incomplete last field */
index_id_t tree_id) /*!< in: index tree id */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
#endif /* !UNIV_HOTBACKUP */
/*********************************************************//**
Builds a physical record out of a data tuple and
@@ -837,7 +837,7 @@ rec_convert_dtuple_to_rec(
const dtuple_t* dtuple, /*!< in: data tuple */
ulint n_ext) /*!< in: number of
externally stored columns */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/**********************************************************//**
Returns the extra size of an old-style physical record if we know its
data size and number of fields.
@@ -849,7 +849,7 @@ rec_get_converted_extra_size(
ulint data_size, /*!< in: data size */
ulint n_fields, /*!< in: number of fields */
ulint n_ext) /*!< in: number of externally stored columns */
- __attribute__((const));
+ MY_ATTRIBUTE((const));
/**********************************************************//**
Determines the size of a data tuple prefix in ROW_FORMAT=COMPACT.
@return total size */
@@ -861,7 +861,7 @@ rec_get_converted_size_comp_prefix(
const dfield_t* fields, /*!< in: array of data fields */
ulint n_fields,/*!< in: number of data fields */
ulint* extra) /*!< out: extra size */
- __attribute__((warn_unused_result, nonnull(1,2)));
+ MY_ATTRIBUTE((warn_unused_result, nonnull(1,2)));
/**********************************************************//**
Determines the size of a data tuple in ROW_FORMAT=COMPACT.
@return total size */
@@ -877,7 +877,7 @@ rec_get_converted_size_comp(
const dfield_t* fields, /*!< in: array of data fields */
ulint n_fields,/*!< in: number of data fields */
ulint* extra) /*!< out: extra size */
- __attribute__((nonnull(1,3)));
+ MY_ATTRIBUTE((nonnull(1,3)));
/**********************************************************//**
The following function returns the size of a data tuple when converted to
a physical record.
@@ -889,7 +889,7 @@ rec_get_converted_size(
dict_index_t* index, /*!< in: record descriptor */
const dtuple_t* dtuple, /*!< in: data tuple */
ulint n_ext) /*!< in: number of externally stored columns */
- __attribute__((warn_unused_result, nonnull));
+ MY_ATTRIBUTE((warn_unused_result, nonnull));
#ifndef UNIV_HOTBACKUP
/**************************************************************//**
Copies the first n fields of a physical record to a data tuple.
@@ -904,7 +904,7 @@ rec_copy_prefix_to_dtuple(
ulint n_fields, /*!< in: number of fields
to copy */
mem_heap_t* heap) /*!< in: memory heap */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#endif /* !UNIV_HOTBACKUP */
/***************************************************************//**
Validates the consistency of a physical record.
@@ -915,7 +915,7 @@ rec_validate(
/*=========*/
const rec_t* rec, /*!< in: physical record */
const ulint* offsets)/*!< in: array returned by rec_get_offsets() */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/***************************************************************//**
Prints an old-style physical record. */
UNIV_INTERN
@@ -924,7 +924,7 @@ rec_print_old(
/*==========*/
FILE* file, /*!< in: file where to print */
const rec_t* rec) /*!< in: physical record */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#ifndef UNIV_HOTBACKUP
/***************************************************************//**
Prints a physical record in ROW_FORMAT=COMPACT. Ignores the
@@ -936,7 +936,7 @@ rec_print_comp(
FILE* file, /*!< in: file where to print */
const rec_t* rec, /*!< in: physical record */
const ulint* offsets)/*!< in: array returned by rec_get_offsets() */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/***************************************************************//**
Prints a physical record. */
UNIV_INTERN
@@ -946,7 +946,7 @@ rec_print_new(
FILE* file, /*!< in: file where to print */
const rec_t* rec, /*!< in: physical record */
const ulint* offsets)/*!< in: array returned by rec_get_offsets() */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/***************************************************************//**
Prints a physical record. */
UNIV_INTERN
@@ -956,7 +956,7 @@ rec_print(
FILE* file, /*!< in: file where to print */
const rec_t* rec, /*!< in: physical record */
const dict_index_t* index) /*!< in: record descriptor */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
# ifdef UNIV_DEBUG
/************************************************************//**
@@ -968,7 +968,7 @@ rec_get_trx_id(
/*===========*/
const rec_t* rec, /*!< in: record */
const dict_index_t* index) /*!< in: clustered index */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
# endif /* UNIV_DEBUG */
#endif /* UNIV_HOTBACKUP */
diff --git a/storage/xtradb/include/rem0rec.ic b/storage/xtradb/include/rem0rec.ic
index a539320dd2a..5811a77a48b 100644
--- a/storage/xtradb/include/rem0rec.ic
+++ b/storage/xtradb/include/rem0rec.ic
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -1540,7 +1540,8 @@ rec_copy(
ulint extra_len;
ulint data_len;
- ut_ad(rec && buf);
+ ut_ad(rec != NULL);
+ ut_ad(buf != NULL);
ut_ad(rec_offs_validate(rec, NULL, offsets));
ut_ad(rec_validate(rec, offsets));
diff --git a/storage/xtradb/include/row0ftsort.h b/storage/xtradb/include/row0ftsort.h
index eeef10f3397..7c9ed23645c 100644
--- a/storage/xtradb/include/row0ftsort.h
+++ b/storage/xtradb/include/row0ftsort.h
@@ -1,7 +1,7 @@
/*****************************************************************************
-Copyright (c) 2010, 2012, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2015, MariaDB Corporation.
+Copyright (c) 2010, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2016, 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
@@ -193,7 +193,7 @@ row_fts_psort_info_init(
instantiated */
fts_psort_t** merge) /*!< out: parallel merge info
to be instantiated */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/********************************************************************//**
Clean up and deallocate FTS parallel sort structures, and close
temparary merge sort files */
@@ -281,5 +281,5 @@ row_fts_merge_insert(
fts_psort_t* psort_info, /*!< parallel sort info */
ulint id) /* !< in: which auxiliary table's data
to insert to */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#endif /* row0ftsort_h */
diff --git a/storage/xtradb/include/row0import.h b/storage/xtradb/include/row0import.h
index aa46fdb7c27..a821c230a3b 100644
--- a/storage/xtradb/include/row0import.h
+++ b/storage/xtradb/include/row0import.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2012, 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
@@ -46,7 +46,7 @@ row_import_for_mysql(
dict_table_t* table, /*!< in/out: table */
row_prebuilt_t* prebuilt) /*!< in: prebuilt struct
in MySQL */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*****************************************************************//**
Update the DICT_TF2_DISCARDED flag in SYS_TABLES.
@@ -64,7 +64,7 @@ row_import_update_discarded_flag(
bool dict_locked) /*!< in: Set to true if the
caller already owns the
dict_sys_t:: mutex. */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*****************************************************************//**
Update the (space, root page) of a table's indexes from the values
@@ -83,7 +83,7 @@ row_import_update_index_root(
bool dict_locked) /*!< in: Set to true if the
caller already owns the
dict_sys_t:: mutex. */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#ifndef UNIV_NONINL
#include "row0import.ic"
#endif
diff --git a/storage/xtradb/include/row0ins.h b/storage/xtradb/include/row0ins.h
index 2a892d2f5df..71ee39070ef 100644
--- a/storage/xtradb/include/row0ins.h
+++ b/storage/xtradb/include/row0ins.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -53,7 +53,7 @@ row_ins_check_foreign_constraint(
table, else the referenced table */
dtuple_t* entry, /*!< in: index entry for index */
que_thr_t* thr) /*!< in: query thread */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Creates an insert node struct.
@return own: insert node struct */
@@ -98,7 +98,7 @@ row_ins_clust_index_entry_low(
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 */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/***************************************************************//**
Tries to insert an entry into a secondary index. If a record with exactly the
same fields is found, the other record is necessarily marked deleted.
@@ -123,7 +123,7 @@ row_ins_sec_index_entry_low(
trx_id_t trx_id, /*!< in: PAGE_MAX_TRX_ID during
row_log_table_apply(), or 0 */
que_thr_t* thr) /*!< in: query thread */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/***************************************************************//**
Tries to insert the externally stored fields (off-page columns)
of a clustered index entry.
@@ -142,7 +142,7 @@ row_ins_index_entry_big_rec_func(
const void* thd, /*!< in: connection, or NULL */
#endif /* DBUG_OFF */
ulint line) /*!< in: line number of caller */
- __attribute__((nonnull(1,2,3,4,5,6), warn_unused_result));
+ MY_ATTRIBUTE((nonnull(1,2,3,4,5,6), warn_unused_result));
#ifdef DBUG_OFF
# define row_ins_index_entry_big_rec(e,big,ofs,heap,index,thd,file,line) \
row_ins_index_entry_big_rec_func(e,big,ofs,heap,index,file,line)
@@ -164,7 +164,7 @@ row_ins_clust_index_entry(
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 */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/***************************************************************//**
Inserts an entry into a secondary index. Tries first optimistic,
then pessimistic descent down the tree. If the entry matches enough
@@ -178,7 +178,7 @@ row_ins_sec_index_entry(
dict_index_t* index, /*!< in: secondary index */
dtuple_t* entry, /*!< in/out: index entry to insert */
que_thr_t* thr) /*!< in: query thread */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/***********************************************************//**
Inserts a row to a table. This is a high-level function used in
SQL execution graphs.
diff --git a/storage/xtradb/include/row0log.h b/storage/xtradb/include/row0log.h
index e127504c484..5ff148ff045 100644
--- a/storage/xtradb/include/row0log.h
+++ b/storage/xtradb/include/row0log.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2011, 2015, Oracle and/or its affiliates. All Rights Reserved.
+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
@@ -58,7 +58,7 @@ row_log_allocate(
const ulint* col_map,/*!< in: mapping of old column
numbers to new ones, or NULL if !table */
const char* path) /*!< in: where to create temporary file */
- __attribute__((nonnull(1), warn_unused_result));
+ MY_ATTRIBUTE((nonnull(1), warn_unused_result));
/******************************************************//**
Free the row log for an index that was being created online. */
@@ -67,7 +67,7 @@ void
row_log_free(
/*=========*/
row_log_t*& log) /*!< in,own: row log */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************//**
Free the row log for an index on which online creation was aborted. */
@@ -76,7 +76,7 @@ void
row_log_abort_sec(
/*==============*/
dict_index_t* index) /*!< in/out: index (x-latched) */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************//**
Try to log an operation to a secondary index that is
@@ -91,7 +91,7 @@ row_log_online_op_try(
const dtuple_t* tuple, /*!< in: index tuple */
trx_id_t trx_id) /*!< in: transaction ID for insert,
or 0 for delete */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************//**
Logs an operation to a secondary index that is (or was) being created. */
UNIV_INTERN
@@ -102,7 +102,7 @@ row_log_online_op(
const dtuple_t* tuple, /*!< in: index tuple */
trx_id_t trx_id) /*!< in: transaction ID for insert,
or 0 for delete */
- UNIV_COLD __attribute__((nonnull));
+ UNIV_COLD MY_ATTRIBUTE((nonnull));
/******************************************************//**
Gets the error status of the online index rebuild log.
@@ -113,7 +113,7 @@ row_log_table_get_error(
/*====================*/
const dict_index_t* index) /*!< in: clustered index of a table
that is being rebuilt online */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************//**
Logs a delete operation to a table that is being rebuilt.
@@ -129,7 +129,7 @@ row_log_table_delete(
const ulint* 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 */
- UNIV_COLD __attribute__((nonnull(1,2,3)));
+ UNIV_COLD MY_ATTRIBUTE((nonnull(1,2,3)));
/******************************************************//**
Logs an update operation to a table that is being rebuilt.
@@ -145,7 +145,7 @@ row_log_table_update(
const ulint* offsets,/*!< in: rec_get_offsets(rec,index) */
const dtuple_t* old_pk) /*!< in: row_log_table_get_pk()
before the update */
- UNIV_COLD __attribute__((nonnull(1,2,3)));
+ UNIV_COLD MY_ATTRIBUTE((nonnull(1,2,3)));
/******************************************************//**
Constructs the old PRIMARY KEY and DB_TRX_ID,DB_ROLL_PTR
@@ -165,7 +165,7 @@ row_log_table_get_pk(
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 */
- UNIV_COLD __attribute__((nonnull(1,2,5), warn_unused_result));
+ UNIV_COLD MY_ATTRIBUTE((nonnull(1,2,5), warn_unused_result));
/******************************************************//**
Logs an insert to a table that is being rebuilt.
@@ -179,7 +179,7 @@ row_log_table_insert(
dict_index_t* index, /*!< in/out: clustered index, S-latched
or X-latched */
const ulint* offsets)/*!< in: rec_get_offsets(rec,index) */
- UNIV_COLD __attribute__((nonnull));
+ UNIV_COLD MY_ATTRIBUTE((nonnull));
/******************************************************//**
Notes that a BLOB is being freed during online ALTER TABLE. */
UNIV_INTERN
@@ -188,7 +188,7 @@ row_log_table_blob_free(
/*====================*/
dict_index_t* index, /*!< in/out: clustered index, X-latched */
ulint page_no)/*!< in: starting page number of the BLOB */
- UNIV_COLD __attribute__((nonnull));
+ UNIV_COLD MY_ATTRIBUTE((nonnull));
/******************************************************//**
Notes that a BLOB is being allocated during online ALTER TABLE. */
UNIV_INTERN
@@ -197,7 +197,7 @@ row_log_table_blob_alloc(
/*=====================*/
dict_index_t* index, /*!< in/out: clustered index, X-latched */
ulint page_no)/*!< in: starting page number of the BLOB */
- UNIV_COLD __attribute__((nonnull));
+ UNIV_COLD MY_ATTRIBUTE((nonnull));
/******************************************************//**
Apply the row_log_table log to a table upon completing rebuild.
@return DB_SUCCESS, or error code on failure */
@@ -210,7 +210,7 @@ row_log_table_apply(
/*!< in: old table */
struct TABLE* table) /*!< in/out: MySQL table
(for reporting duplicates) */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************//**
Get the latest transaction ID that has invoked row_log_online_op()
@@ -221,7 +221,7 @@ trx_id_t
row_log_get_max_trx(
/*================*/
dict_index_t* index) /*!< in: index, must be locked */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************//**
Merge the row log to the index upon completing index creation.
@@ -235,7 +235,7 @@ row_log_apply(
dict_index_t* index, /*!< in/out: secondary index */
struct TABLE* table) /*!< in/out: MySQL table
(for reporting duplicates) */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#ifndef UNIV_NONINL
#include "row0log.ic"
diff --git a/storage/xtradb/include/row0merge.h b/storage/xtradb/include/row0merge.h
index 53164b5197f..04d4010ad48 100644
--- a/storage/xtradb/include/row0merge.h
+++ b/storage/xtradb/include/row0merge.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2005, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2015, 2016, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
@@ -144,7 +144,7 @@ row_merge_dup_report(
/*=================*/
row_merge_dup_t* dup, /*!< in/out: for reporting duplicates */
const dfield_t* entry) /*!< in: duplicate index entry */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Sets an exclusive lock on a table, for the duration of creating indexes.
@return error code or DB_SUCCESS */
@@ -155,7 +155,7 @@ row_merge_lock_table(
trx_t* trx, /*!< in/out: transaction */
dict_table_t* table, /*!< in: table to lock */
enum lock_mode mode) /*!< in: LOCK_X or LOCK_S */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Drop indexes that were created before an error occurred.
The data dictionary must have been locked exclusively by the caller,
@@ -166,7 +166,7 @@ row_merge_drop_indexes_dict(
/*========================*/
trx_t* trx, /*!< in/out: dictionary transaction */
table_id_t table_id)/*!< in: table identifier */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Drop those indexes which were created before an error occurred.
The data dictionary must have been locked exclusively by the caller,
@@ -179,7 +179,7 @@ row_merge_drop_indexes(
dict_table_t* table, /*!< in/out: table containing the indexes */
ibool locked) /*!< in: TRUE=table locked,
FALSE=may need to do a lazy drop */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Drop all partially created indexes during crash recovery. */
UNIV_INTERN
@@ -195,7 +195,7 @@ UNIV_INTERN
int
row_merge_file_create_low(
const char* path)
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
/*********************************************************************//**
Destroy a merge file. And de-register the file from Performance Schema
if UNIV_PFS_IO is defined. */
@@ -231,7 +231,7 @@ row_merge_rename_tables_dict(
old_table->name */
const char* tmp_name, /*!< in: new name for old_table */
trx_t* trx) /*!< in/out: dictionary transaction */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Rename an index in the dictionary that was created. The data
@@ -245,7 +245,7 @@ row_merge_rename_index_to_add(
trx_t* trx, /*!< in/out: transaction */
table_id_t table_id, /*!< in: table identifier */
index_id_t index_id) /*!< in: index identifier */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Rename an index in the dictionary that is to be dropped. The data
dictionary must have been locked exclusively by the caller, because
@@ -258,7 +258,7 @@ row_merge_rename_index_to_drop(
trx_t* trx, /*!< in/out: transaction */
table_id_t table_id, /*!< in: table identifier */
index_id_t index_id) /*!< in: index identifier */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Create the index and load in to the dictionary.
@return index, or NULL on error */
@@ -294,7 +294,7 @@ row_merge_drop_table(
/*=================*/
trx_t* trx, /*!< in: transaction */
dict_table_t* table) /*!< in: table instance to drop */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Build indexes on a table by reading a clustered index,
creating a temporary file containing index entries, merge sorting
@@ -327,7 +327,7 @@ row_merge_build_indexes(
AUTO_INCREMENT column, or
ULINT_UNDEFINED if none is added */
ib_sequence_t& sequence) /*!< in/out: autoinc sequence */
- __attribute__((nonnull(1,2,3,5,6,8), warn_unused_result));
+ MY_ATTRIBUTE((nonnull(1,2,3,5,6,8), warn_unused_result));
/********************************************************************//**
Write a buffer to a block. */
UNIV_INTERN
@@ -337,7 +337,7 @@ row_merge_buf_write(
const row_merge_buf_t* buf, /*!< in: sorted buffer */
const merge_file_t* of, /*!< in: output file */
row_merge_block_t* block) /*!< out: buffer for writing to file */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/********************************************************************//**
Sort a buffer. */
UNIV_INTERN
@@ -347,7 +347,7 @@ row_merge_buf_sort(
row_merge_buf_t* buf, /*!< in/out: sort buffer */
row_merge_dup_t* dup) /*!< in/out: reporter of duplicates
(NULL if non-unique index) */
- __attribute__((nonnull(1)));
+ MY_ATTRIBUTE((nonnull(1)));
/********************************************************************//**
Write a merge block to the file system.
@return TRUE if request was successful, FALSE if fail */
@@ -371,7 +371,7 @@ row_merge_buf_t*
row_merge_buf_empty(
/*================*/
row_merge_buf_t* buf) /*!< in,own: sort buffer */
- __attribute__((warn_unused_result, nonnull));
+ MY_ATTRIBUTE((warn_unused_result, nonnull));
/** Create a merge file in the given location.
@param[out] merge_file merge file structure
@@ -412,7 +412,7 @@ row_merge_buf_t*
row_merge_buf_create(
/*=================*/
dict_index_t* index) /*!< in: secondary index */
- __attribute__((warn_unused_result, nonnull, malloc));
+ MY_ATTRIBUTE((warn_unused_result, nonnull, malloc));
/*********************************************************************//**
Deallocate a sort buffer. */
UNIV_INTERN
@@ -420,7 +420,7 @@ void
row_merge_buf_free(
/*===============*/
row_merge_buf_t* buf) /*!< in,own: sort buffer to be freed */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Destroy a merge file. */
UNIV_INTERN
@@ -428,7 +428,7 @@ void
row_merge_file_destroy(
/*===================*/
merge_file_t* merge_file) /*!< in/out: merge file structure */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/********************************************************************//**
Read a merge block from the file system.
@return TRUE if request was successful, FALSE if fail */
diff --git a/storage/xtradb/include/row0mysql.h b/storage/xtradb/include/row0mysql.h
index e6a201be7a5..52e82da668d 100644
--- a/storage/xtradb/include/row0mysql.h
+++ b/storage/xtradb/include/row0mysql.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2000, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2000, 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
@@ -168,7 +168,7 @@ row_mysql_handle_errors(
trx_t* trx, /*!< in: transaction */
que_thr_t* thr, /*!< in: query thread, or NULL */
trx_savept_t* savept) /*!< in: savepoint, or NULL */
- __attribute__((nonnull(1,2)));
+ MY_ATTRIBUTE((nonnull(1,2)));
/********************************************************************//**
Create a prebuilt struct for a MySQL table handle.
@return own: a prebuilt struct */
@@ -210,7 +210,7 @@ row_lock_table_autoinc_for_mysql(
/*=============================*/
row_prebuilt_t* prebuilt) /*!< in: prebuilt struct in the MySQL
table handle */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Sets a table lock on the table mentioned in prebuilt.
@return error code or DB_SUCCESS */
@@ -226,7 +226,7 @@ row_lock_table_for_mysql(
prebuilt->select_lock_type */
ulint mode) /*!< in: lock mode of table
(ignored if table==NULL) */
- __attribute__((nonnull(1)));
+ MY_ATTRIBUTE((nonnull(1)));
/*********************************************************************//**
Does an insert for MySQL.
@return error code or DB_SUCCESS */
@@ -237,7 +237,7 @@ row_insert_for_mysql(
byte* mysql_rec, /*!< in: row in the MySQL format */
row_prebuilt_t* prebuilt) /*!< in: prebuilt struct in MySQL
handle */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Builds a dummy query graph used in selects. */
UNIV_INTERN
@@ -277,7 +277,7 @@ row_update_for_mysql(
the MySQL format */
row_prebuilt_t* prebuilt) /*!< in: prebuilt struct in MySQL
handle */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
This can only be used when srv_locks_unsafe_for_binlog is TRUE or this
session is using a READ COMMITTED or READ UNCOMMITTED isolation level.
@@ -298,7 +298,7 @@ row_unlock_for_mysql(
the records under pcur and
clust_pcur, and we do not need
to reposition the cursors. */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Checks if a table name contains the string "/#sql" which denotes temporary
tables in MySQL.
@@ -307,7 +307,7 @@ UNIV_INTERN
bool
row_is_mysql_tmp_table_name(
/*========================*/
- const char* name) __attribute__((warn_unused_result));
+ const char* name) MY_ATTRIBUTE((warn_unused_result));
/*!< in: table name in the form
'database/tablename' */
@@ -332,7 +332,7 @@ row_update_cascade_for_mysql(
upd_node_t* node, /*!< in: update node used in the cascade
or set null operation */
dict_table_t* table) /*!< in: table where we do the operation */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Locks the data dictionary exclusively for performing a table create or other
data dictionary modification operation. */
@@ -409,7 +409,7 @@ row_create_index_for_mysql(
index columns, which are
then checked for not being too
large. */
- __attribute__((nonnull(1,2), warn_unused_result));
+ MY_ATTRIBUTE((nonnull(1,2), warn_unused_result));
/*********************************************************************//**
Scans a table create SQL string and adds to the data dictionary
the foreign key constraints declared in the string. This function
@@ -435,7 +435,7 @@ row_table_add_foreign_constraints(
ibool reject_fks) /*!< in: if TRUE, fail with error
code DB_CANNOT_ADD_CONSTRAINT if
any foreign keys are found. */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
The master thread in srv0srv.cc calls this regularly to drop tables which
we must drop in background after queries to them have ended. Such lazy
@@ -464,7 +464,7 @@ row_mysql_lock_table(
dict_table_t* table, /*!< in: table to lock */
enum lock_mode mode, /*!< in: LOCK_X or LOCK_S */
const char* op_info) /*!< in: string for trx->op_info */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Truncates a table for MySQL.
@@ -475,7 +475,7 @@ row_truncate_table_for_mysql(
/*=========================*/
dict_table_t* table, /*!< in: table handle */
trx_t* trx) /*!< in: transaction handle */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Drops a table for MySQL. If the name of the dropped table ends in
one of "innodb_monitor", "innodb_lock_monitor", "innodb_tablespace_monitor",
@@ -497,7 +497,7 @@ row_drop_table_for_mysql(
bool nonatomic = true)
/*!< in: whether it is permitted
to release and reacquire dict_operation_lock */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Drop all temporary tables during crash recovery. */
UNIV_INTERN
@@ -516,7 +516,7 @@ row_discard_tablespace_for_mysql(
/*=============================*/
const char* name, /*!< in: table name */
trx_t* trx) /*!< in: transaction handle */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*****************************************************************//**
Imports a tablespace. The space id in the .ibd file must match the space id
of the table in the data dictionary.
@@ -527,7 +527,7 @@ row_import_tablespace_for_mysql(
/*============================*/
dict_table_t* table, /*!< in/out: table */
row_prebuilt_t* prebuilt) /*!< in: prebuilt struct in MySQL */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Drops a database for MySQL.
@return error code or DB_SUCCESS */
@@ -537,7 +537,7 @@ row_drop_database_for_mysql(
/*========================*/
const char* name, /*!< in: database name which ends to '/' */
trx_t* trx) /*!< in: transaction handle */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Renames a table for MySQL.
@return error code or DB_SUCCESS */
@@ -549,7 +549,7 @@ row_rename_table_for_mysql(
const char* new_name, /*!< in: new table name */
trx_t* trx, /*!< in/out: transaction */
bool commit) /*!< in: whether to commit trx */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Checks that the index contains entries in an ascending order, unique
constraint is not broken, and calculates the number of index entries
@@ -564,7 +564,7 @@ row_check_index_for_mysql(
const dict_index_t* index, /*!< in: index */
ulint* n_rows) /*!< out: number of entries
seen in the consistent read */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Determines if a table is a magic monitor table.
@return true if monitor table */
@@ -574,7 +574,7 @@ row_is_magic_monitor_table(
/*=======================*/
const char* table_name) /*!< in: name of the table, in the
form database/table_name */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Initialize this module */
UNIV_INTERN
@@ -599,7 +599,7 @@ row_mysql_table_id_reassign(
dict_table_t* table, /*!< in/out: table */
trx_t* trx, /*!< in/out: transaction */
table_id_t* new_id) /*!< out: new table id */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/* A struct describing a place for an individual column in the MySQL
row format which is presented to the table handler in ha_innobase.
diff --git a/storage/xtradb/include/row0purge.h b/storage/xtradb/include/row0purge.h
index 888289a6c79..5df899bc399 100644
--- a/storage/xtradb/include/row0purge.h
+++ b/storage/xtradb/include/row0purge.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1997, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 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
@@ -47,7 +47,7 @@ row_purge_node_create(
que_thr_t* parent, /*!< in: parent node, i.e., a
thr node */
mem_heap_t* heap) /*!< in: memory heap where created */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/***********************************************************//**
Determines if it is possible to remove a secondary index entry.
Removal is possible if the secondary index entry does not refer to any
@@ -70,7 +70,7 @@ row_purge_poss_sec(
purge_node_t* node, /*!< in/out: row purge node */
dict_index_t* index, /*!< in: secondary index */
const dtuple_t* entry) /*!< in: secondary index entry */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/***************************************************************
Does the purge operation for a single undo log record. This is a high-level
function used in an SQL execution graph.
@@ -80,7 +80,7 @@ que_thr_t*
row_purge_step(
/*===========*/
que_thr_t* thr) /*!< in: query thread */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/* Purge node structure */
diff --git a/storage/xtradb/include/row0quiesce.h b/storage/xtradb/include/row0quiesce.h
index 1d6d11291b8..35d8184d33c 100644
--- a/storage/xtradb/include/row0quiesce.h
+++ b/storage/xtradb/include/row0quiesce.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2012, 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
@@ -43,7 +43,7 @@ row_quiesce_table_start(
/*====================*/
dict_table_t* table, /*!< in: quiesce this table */
trx_t* trx) /*!< in/out: transaction/session */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*********************************************************************//**
Set a table's quiesce state.
@@ -55,7 +55,7 @@ row_quiesce_set_state(
dict_table_t* table, /*!< in: quiesce this table */
ib_quiesce_t state, /*!< in: quiesce state to set */
trx_t* trx) /*!< in/out: transaction */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Cleanup after table quiesce. */
@@ -65,7 +65,7 @@ row_quiesce_table_complete(
/*=======================*/
dict_table_t* table, /*!< in: quiesce this table */
trx_t* trx) /*!< in/out: transaction/session */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#ifndef UNIV_NONINL
#include "row0quiesce.ic"
diff --git a/storage/xtradb/include/row0row.h b/storage/xtradb/include/row0row.h
index a4e5e0dd2fa..b04068c5a5d 100644
--- a/storage/xtradb/include/row0row.h
+++ b/storage/xtradb/include/row0row.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -47,7 +47,7 @@ row_get_trx_id_offset(
/*==================*/
const dict_index_t* index, /*!< in: clustered index */
const ulint* offsets)/*!< in: record offsets */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Reads the trx id field from a clustered index record.
@return value of the field */
@@ -58,7 +58,7 @@ row_get_rec_trx_id(
const rec_t* rec, /*!< in: record */
const dict_index_t* index, /*!< in: clustered index */
const ulint* offsets)/*!< in: rec_get_offsets(rec, index) */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Reads the roll pointer field from a clustered index record.
@return value of the field */
@@ -69,7 +69,7 @@ row_get_rec_roll_ptr(
const rec_t* rec, /*!< in: record */
const dict_index_t* index, /*!< in: clustered index */
const ulint* offsets)/*!< in: rec_get_offsets(rec, index) */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*****************************************************************//**
When an insert or purge to a table is performed, this function builds
the entry to be inserted into or purged from an index on the table.
@@ -88,7 +88,7 @@ row_build_index_entry_low(
mem_heap_t* heap) /*!< in: memory heap from which
the memory for the index entry
is allocated */
- __attribute__((warn_unused_result, nonnull(1,3,4)));
+ MY_ATTRIBUTE((warn_unused_result, nonnull(1,3,4)));
/*****************************************************************//**
When an insert or purge to a table is performed, this function builds
the entry to be inserted into or purged from an index on the table.
@@ -107,7 +107,7 @@ row_build_index_entry(
mem_heap_t* heap) /*!< in: memory heap from which
the memory for the index entry
is allocated */
- __attribute__((warn_unused_result, nonnull(1,3,4)));
+ MY_ATTRIBUTE((warn_unused_result, nonnull(1,3,4)));
/*******************************************************************//**
An inverse function to row_build_index_entry. Builds a row from a
record in a clustered index.
@@ -155,7 +155,7 @@ row_build(
prefixes, or NULL */
mem_heap_t* heap) /*!< in: memory heap from which
the memory needed is allocated */
- __attribute__((nonnull(2,3,9)));
+ MY_ATTRIBUTE((nonnull(2,3,9)));
/*******************************************************************//**
Converts an index record to a typed data tuple.
@return index entry built; does not set info_bits, and the data fields
@@ -171,7 +171,7 @@ row_rec_to_index_entry_low(
stored columns */
mem_heap_t* heap) /*!< in: memory heap from which
the memory needed is allocated */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*******************************************************************//**
Converts an index record to a typed data tuple. NOTE that externally
stored (often big) fields are NOT copied to heap.
@@ -187,7 +187,7 @@ row_rec_to_index_entry(
stored columns */
mem_heap_t* heap) /*!< in: memory heap from which
the memory needed is allocated */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*******************************************************************//**
Builds from a secondary index record a row reference with which we can
search the clustered index record.
@@ -210,7 +210,7 @@ row_build_row_ref(
as long as the row reference is used! */
mem_heap_t* heap) /*!< in: memory heap from which the memory
needed is allocated */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*******************************************************************//**
Builds from a secondary index record a row reference with which we can
search the clustered index record. */
@@ -232,7 +232,7 @@ row_build_row_ref_in_tuple(
ulint* offsets,/*!< in: rec_get_offsets(rec, index)
or NULL */
trx_t* trx) /*!< in: transaction or NULL */
- __attribute__((nonnull(1,2,3)));
+ MY_ATTRIBUTE((nonnull(1,2,3)));
/*******************************************************************//**
Builds from a secondary index record a row reference with which we can
search the clustered index record. */
@@ -263,7 +263,7 @@ row_search_on_row_ref(
const dict_table_t* table, /*!< in: table */
const dtuple_t* ref, /*!< in: row reference */
mtr_t* mtr) /*!< in/out: mtr */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*********************************************************************//**
Fetches the clustered index record for a secondary index record. The latches
on the secondary index record are preserved.
@@ -277,7 +277,7 @@ row_get_clust_rec(
dict_index_t* index, /*!< in: secondary index */
dict_index_t** clust_index,/*!< out: clustered index */
mtr_t* mtr) /*!< in: mtr */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/** Result of row_search_index_entry */
enum row_search_result {
@@ -305,7 +305,7 @@ row_search_index_entry(
btr_pcur_t* pcur, /*!< in/out: persistent cursor, which must
be closed by the caller */
mtr_t* mtr) /*!< in: mtr */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#define ROW_COPY_DATA 1
#define ROW_COPY_POINTERS 2
@@ -334,7 +334,7 @@ row_raw_format(
char* buf, /*!< out: output buffer */
ulint buf_size) /*!< in: output buffer size
in bytes */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#ifndef UNIV_NONINL
#include "row0row.ic"
diff --git a/storage/xtradb/include/row0sel.h b/storage/xtradb/include/row0sel.h
index c8be80f89d9..fd5bc755a22 100644
--- a/storage/xtradb/include/row0sel.h
+++ b/storage/xtradb/include/row0sel.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 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
@@ -168,7 +168,7 @@ row_search_for_mysql(
then prebuilt must have a pcur
with stored position! In opening of a
cursor 'direction' should be 0. */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*******************************************************************//**
Checks if MySQL at the moment is allowed for this table to retrieve a
consistent read result, or store it to the query cache.
@@ -190,7 +190,7 @@ row_search_max_autoinc(
dict_index_t* index, /*!< in: index to search */
const char* col_name, /*!< in: autoinc column name */
ib_uint64_t* value) /*!< out: AUTOINC value read */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/** A structure for caching column values for prefetched rows */
struct sel_buf_t{
diff --git a/storage/xtradb/include/row0uins.h b/storage/xtradb/include/row0uins.h
index ebf4881208a..89e334e5433 100644
--- a/storage/xtradb/include/row0uins.h
+++ b/storage/xtradb/include/row0uins.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 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
@@ -46,7 +46,7 @@ dberr_t
row_undo_ins(
/*=========*/
undo_node_t* node) /*!< in: row undo node */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#ifndef UNIV_NONINL
#include "row0uins.ic"
#endif
diff --git a/storage/xtradb/include/row0umod.h b/storage/xtradb/include/row0umod.h
index f89d5a334fc..4f1d8e1f66c 100644
--- a/storage/xtradb/include/row0umod.h
+++ b/storage/xtradb/include/row0umod.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 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
@@ -43,7 +43,7 @@ row_undo_mod(
/*=========*/
undo_node_t* node, /*!< in: row undo node */
que_thr_t* thr) /*!< in: query thread */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#ifndef UNIV_NONINL
#include "row0umod.ic"
diff --git a/storage/xtradb/include/row0upd.h b/storage/xtradb/include/row0upd.h
index 27dedeb65a7..e59ec58b63c 100644
--- a/storage/xtradb/include/row0upd.h
+++ b/storage/xtradb/include/row0upd.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -91,7 +91,7 @@ upd_get_field_by_field_no(
/*======================*/
const upd_t* update, /*!< in: update vector */
ulint no) /*!< in: field_no */
- __attribute__((nonnull, pure));
+ MY_ATTRIBUTE((nonnull, pure));
/*********************************************************************//**
Writes into the redo log the values of trx id and roll ptr and enough info
to determine their positions within a clustered index record.
@@ -174,7 +174,7 @@ bool
row_upd_changes_disowned_external(
/*==============================*/
const upd_t* update) /*!< in: update vector */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#endif /* !UNIV_HOTBACKUP */
/***********************************************************//**
Replaces the new column values stored in the update vector to the
@@ -207,7 +207,7 @@ row_upd_build_sec_rec_difference_binary(
const ulint* 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 */
- __attribute__((warn_unused_result, nonnull));
+ MY_ATTRIBUTE((warn_unused_result, nonnull));
/***************************************************************//**
Builds an update vector from those fields, excluding the roll ptr and
trx id fields, which in an index entry differ from a record that has
@@ -227,7 +227,7 @@ row_upd_build_difference_binary(
trx_t* trx, /*!< in: transaction (for diagnostics),
or NULL */
mem_heap_t* heap) /*!< in: memory heap from which allocated */
- __attribute__((nonnull(1,2,3,7), warn_unused_result));
+ MY_ATTRIBUTE((nonnull(1,2,3,7), warn_unused_result));
/***********************************************************//**
Replaces the new column values stored in the update vector to the index entry
given. */
@@ -250,7 +250,7 @@ row_upd_index_replace_new_col_vals_index_pos(
does not work for non-clustered indexes. */
mem_heap_t* heap) /*!< in: memory heap for allocating and
copying the new values */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/***********************************************************//**
Replaces the new column values stored in the update vector to the index entry
given. */
@@ -269,7 +269,7 @@ row_upd_index_replace_new_col_vals(
an upd_field is the clustered index position */
mem_heap_t* heap) /*!< in: memory heap for allocating and
copying the new values */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/***********************************************************//**
Replaces the new column values stored in the update vector. */
UNIV_INTERN
@@ -311,7 +311,7 @@ row_upd_changes_ord_field_binary_func(
compile time */
const row_ext_t*ext) /*!< NULL, or prefixes of the externally
stored columns in the old row */
- __attribute__((nonnull(1,2), warn_unused_result));
+ MY_ATTRIBUTE((nonnull(1,2), warn_unused_result));
#ifdef UNIV_DEBUG
# define row_upd_changes_ord_field_binary(index,update,thr,row,ext) \
row_upd_changes_ord_field_binary_func(index,update,thr,row,ext)
@@ -338,7 +338,7 @@ row_upd_changes_doc_id(
/*===================*/
dict_table_t* table, /*!< in: table */
upd_field_t* upd_field) /*!< in: field to check */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/***********************************************************//**
Checks if an update vector changes an ordering field of an index record.
This function is fast if the update vector is short or the number of ordering
diff --git a/storage/xtradb/include/row0vers.h b/storage/xtradb/include/row0vers.h
index 1df5b4d3e98..7b850215701 100644
--- a/storage/xtradb/include/row0vers.h
+++ b/storage/xtradb/include/row0vers.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 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
@@ -110,7 +110,7 @@ row_vers_build_for_consistent_read(
if the history is missing or the record
does not exist in the view, that is,
it was freshly inserted afterwards */
- __attribute__((nonnull(1,2,3,4,5,6,7)));
+ MY_ATTRIBUTE((nonnull(1,2,3,4,5,6,7)));
/*****************************************************************//**
Constructs the last committed version of a clustered index record,
@@ -136,7 +136,7 @@ row_vers_build_for_semi_consistent_read(
const rec_t** old_vers)/*!< out: rec, old version, or NULL if the
record does not exist in the view, that is,
it was freshly inserted afterwards */
- __attribute__((nonnull(1,2,3,4,5)));
+ MY_ATTRIBUTE((nonnull(1,2,3,4,5)));
#ifndef UNIV_NONINL
diff --git a/storage/xtradb/include/srv0srv.h b/storage/xtradb/include/srv0srv.h
index 018852a7f92..f4557a08762 100644
--- a/storage/xtradb/include/srv0srv.h
+++ b/storage/xtradb/include/srv0srv.h
@@ -1,9 +1,9 @@
/*****************************************************************************
-Copyright (c) 1995, 2015, Oracle and/or its affiliates.
+Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2008, 2009, Google Inc.
Copyright (c) 2009, Percona Inc.
-Copyright (c) 2013, 2014, SkySQL Ab. All Rights Reserved.
+Copyright (c) 2013, 2016, MariaDB Corporation
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
@@ -1032,7 +1032,7 @@ UNIV_INTERN
os_thread_ret_t
DECLARE_THREAD(srv_purge_coordinator_thread)(
/*=========================================*/
- void* arg __attribute__((unused))); /*!< in: a dummy parameter
+ void* arg MY_ATTRIBUTE((unused))); /*!< in: a dummy parameter
required by os_thread_create */
/*********************************************************************//**
@@ -1042,7 +1042,7 @@ UNIV_INTERN
os_thread_ret_t
DECLARE_THREAD(srv_worker_thread)(
/*==============================*/
- void* arg __attribute__((unused))); /*!< in: a dummy parameter
+ void* arg MY_ATTRIBUTE((unused))); /*!< in: a dummy parameter
required by os_thread_create */
} /* extern "C" */
diff --git a/storage/xtradb/include/srv0start.h b/storage/xtradb/include/srv0start.h
index 40d502f4459..963b767f0fb 100644
--- a/storage/xtradb/include/srv0start.h
+++ b/storage/xtradb/include/srv0start.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 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
@@ -105,7 +105,7 @@ srv_path_copy(
ulint dest_len, /*!< in: max bytes to copy */
const char* basedir, /*!< in: base directory */
const char* table_name) /*!< in: source table name */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*****************************************************************//**
Get the meta-data filename from the table name. */
@@ -116,7 +116,7 @@ srv_get_meta_data_filename(
dict_table_t* table, /*!< in: table */
char* filename, /*!< out: filename */
ulint max_len) /*!< in: filename max length */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/** Log sequence number at shutdown */
extern lsn_t srv_shutdown_lsn;
diff --git a/storage/xtradb/include/sync0arr.h b/storage/xtradb/include/sync0arr.h
index a3a326a0d1d..9292026ff13 100644
--- a/storage/xtradb/include/sync0arr.h
+++ b/storage/xtradb/include/sync0arr.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 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
@@ -110,7 +110,7 @@ sync_array_print_long_waits(
/*========================*/
os_thread_id_t* waiter, /*!< out: longest waiting thread */
const void** sema) /*!< out: longest-waited-for semaphore */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/********************************************************************//**
Validates the integrity of the wait array. Checks
that the number of reserved cells equals the count variable. */
diff --git a/storage/xtradb/include/sync0rw.h b/storage/xtradb/include/sync0rw.h
index cef2008c4ea..95d38d3be92 100644
--- a/storage/xtradb/include/sync0rw.h
+++ b/storage/xtradb/include/sync0rw.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
Portions of this file contain modifications contributed and copyrighted by
@@ -367,7 +367,7 @@ ibool
rw_lock_s_lock_low(
/*===============*/
rw_lock_t* lock, /*!< in: pointer to rw-lock */
- ulint pass __attribute__((unused)),
+ ulint pass MY_ATTRIBUTE((unused)),
/*!< in: pass value; != 0, if the lock will be
passed to another thread to unlock */
const char* file_name, /*!< in: file name where lock requested */
@@ -630,7 +630,7 @@ rw_lock_own(
rw_lock_t* lock, /*!< in: rw-lock */
ulint lock_type) /*!< in: lock type: RW_LOCK_SHARED,
RW_LOCK_EX */
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
/******************************************************************//**
Checks if the thread has locked the priority rw-lock in the specified mode,
with the pass value == 0. */
@@ -641,7 +641,7 @@ rw_lock_own(
prio_rw_lock_t* lock, /*!< in: rw-lock */
ulint lock_type) /*!< in: lock type: RW_LOCK_SHARED,
RW_LOCK_EX */
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
#endif /* UNIV_SYNC_DEBUG */
/******************************************************************//**
Checks if somebody has locked the rw-lock in the specified mode. */
diff --git a/storage/xtradb/include/sync0rw.ic b/storage/xtradb/include/sync0rw.ic
index b65e48e0881..91d1e1b0cfc 100644
--- a/storage/xtradb/include/sync0rw.ic
+++ b/storage/xtradb/include/sync0rw.ic
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
Portions of this file contain modifications contributed and copyrighted by
@@ -363,7 +363,7 @@ ibool
rw_lock_s_lock_low(
/*===============*/
rw_lock_t* lock, /*!< in: pointer to rw-lock */
- ulint pass __attribute__((unused)),
+ ulint pass MY_ATTRIBUTE((unused)),
/*!< in: pass value; != 0, if the lock will be
passed to another thread to unlock */
const char* file_name, /*!< in: file name where lock requested */
diff --git a/storage/xtradb/include/sync0sync.h b/storage/xtradb/include/sync0sync.h
index 2b794059399..af445aeb84c 100644
--- a/storage/xtradb/include/sync0sync.h
+++ b/storage/xtradb/include/sync0sync.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
Copyright (c) 2012, Facebook Inc.
@@ -569,7 +569,7 @@ ibool
mutex_own(
/*======*/
const ib_mutex_t* mutex) /*!< in: mutex */
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
/******************************************************************//**
Checks that the current thread owns the priority mutex. Works only
in the debug version.
@@ -579,7 +579,7 @@ ibool
mutex_own(
/*======*/
const ib_prio_mutex_t* mutex) /*!< in: priority mutex */
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
#endif /* UNIV_DEBUG */
#ifdef UNIV_SYNC_DEBUG
/******************************************************************//**
@@ -594,7 +594,7 @@ sync_thread_add_level(
ulint level, /*!< in: level in the latching order; if
SYNC_LEVEL_VARYING, nothing is done */
ibool relock) /*!< in: TRUE if re-entering an x-lock */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/******************************************************************//**
Removes a latch from the thread level array if it is found there.
@return TRUE if found in the array; it is no error if the latch is
@@ -624,7 +624,7 @@ sync_thread_levels_nonempty_gen(
/*============================*/
ibool dict_mutex_allowed) /*!< in: TRUE if dictionary mutex is
allowed to be owned by the thread */
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
/******************************************************************//**
Checks if the level array for the current thread is empty,
except for data dictionary latches. */
@@ -641,7 +641,7 @@ sync_thread_levels_nonempty_trx(
ibool has_search_latch)
/*!< in: TRUE if and only if the thread
is supposed to hold btr_search_latch */
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
/******************************************************************//**
Gets the debug information for a reserved mutex. */
diff --git a/storage/xtradb/include/sync0sync.ic b/storage/xtradb/include/sync0sync.ic
index 83f28bfeded..fb24c0ec244 100644
--- a/storage/xtradb/include/sync0sync.ic
+++ b/storage/xtradb/include/sync0sync.ic
@@ -181,6 +181,11 @@ mutex_exit_func(
to wake up possible hanging threads if
they are missed in mutex_signal_object. */
+ /* We add a memory barrier to prevent reading of the
+ number of waiters before releasing the lock. */
+
+ os_mb;
+
if (mutex_get_waiters(mutex) != 0) {
mutex_signal_object(mutex);
diff --git a/storage/xtradb/include/trx0rec.h b/storage/xtradb/include/trx0rec.h
index 96e7d595035..359937e3583 100644
--- a/storage/xtradb/include/trx0rec.h
+++ b/storage/xtradb/include/trx0rec.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -86,7 +86,7 @@ ulint
trx_undo_rec_get_offset(
/*====================*/
undo_no_t undo_no) /*!< in: undo no read from node */
- __attribute__((const));
+ MY_ATTRIBUTE((const));
/**********************************************************************//**
Returns the start of the undo record data area. */
@@ -109,7 +109,7 @@ trx_undo_rec_get_pars(
externally stored fild */
undo_no_t* undo_no, /*!< out: undo log record number */
table_id_t* table_id) /*!< out: table id */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*******************************************************************//**
Builds a row reference from an undo log record.
@return pointer to remaining part of undo record */
@@ -201,7 +201,7 @@ trx_undo_rec_get_partial_row(
only in the assertion. */
mem_heap_t* heap) /*!< in: memory heap from which the memory
needed is allocated */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/***********************************************************************//**
Writes information to an undo log about an insert, update, or a delete marking
of a clustered index record. This information is used in a rollback of the
@@ -233,7 +233,7 @@ trx_undo_report_row_operation(
inserted undo log record,
0 if BTR_NO_UNDO_LOG
flag was specified */
- __attribute__((nonnull(4,10), warn_unused_result));
+ MY_ATTRIBUTE((nonnull(3,4,10), warn_unused_result));
/******************************************************************//**
Copies an undo record to heap. This function can be called if we know that
the undo log record exists.
@@ -244,7 +244,7 @@ trx_undo_get_undo_rec_low(
/*======================*/
roll_ptr_t roll_ptr, /*!< in: roll pointer to record */
mem_heap_t* heap) /*!< in: memory heap where copied */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*******************************************************************//**
Build a previous version of a clustered index record. The caller must
hold a latch on the index page of the clustered index record.
@@ -268,7 +268,7 @@ trx_undo_prev_version_build(
rec_t** old_vers)/*!< out, own: previous version, or NULL if
rec is the first inserted version, or if
history data has been deleted */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#endif /* !UNIV_HOTBACKUP */
/***********************************************************//**
Parses a redo log record of adding an undo log record.
diff --git a/storage/xtradb/include/trx0roll.h b/storage/xtradb/include/trx0roll.h
index 629b41569f6..b2e9d8a077f 100644
--- a/storage/xtradb/include/trx0roll.h
+++ b/storage/xtradb/include/trx0roll.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -126,7 +126,7 @@ extern "C" UNIV_INTERN
os_thread_ret_t
DECLARE_THREAD(trx_rollback_or_clean_all_recovered)(
/*================================================*/
- void* arg __attribute__((unused)));
+ void* arg MY_ATTRIBUTE((unused)));
/*!< in: a dummy parameter required by
os_thread_create */
/*********************************************************************//**
@@ -153,7 +153,7 @@ dberr_t
trx_rollback_for_mysql(
/*===================*/
trx_t* trx) /*!< in/out: transaction */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*******************************************************************//**
Rollback the latest SQL statement for MySQL.
@return error code or DB_SUCCESS */
@@ -162,7 +162,7 @@ dberr_t
trx_rollback_last_sql_stat_for_mysql(
/*=================================*/
trx_t* trx) /*!< in/out: transaction */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*******************************************************************//**
Rollback a transaction to a given savepoint or do a complete rollback.
@return error code or DB_SUCCESS */
@@ -174,7 +174,7 @@ trx_rollback_to_savepoint(
trx_savept_t* savept) /*!< in: pointer to savepoint undo number, if
partial rollback requested, or NULL for
complete rollback */
- __attribute__((nonnull(1)));
+ MY_ATTRIBUTE((nonnull(1)));
/*******************************************************************//**
Rolls back a transaction back to a named savepoint. Modifications after the
savepoint are undone but InnoDB does NOT release the corresponding locks
@@ -196,7 +196,7 @@ trx_rollback_to_savepoint_for_mysql(
information to remove the
binlog entries of the queries
executed after the savepoint */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*******************************************************************//**
Creates a named savepoint. If the transaction is not yet started, starts it.
If there is already a savepoint of the same name, this call erases that old
@@ -213,7 +213,7 @@ trx_savepoint_for_mysql(
position corresponding to this
connection at the time of the
savepoint */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/*******************************************************************//**
Releases a named savepoint. Savepoints which
were set after this savepoint are deleted.
@@ -225,7 +225,7 @@ trx_release_savepoint_for_mysql(
/*============================*/
trx_t* trx, /*!< in: transaction handle */
const char* savepoint_name) /*!< in: savepoint name */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/*******************************************************************//**
Frees savepoint structs starting from savep. */
UNIV_INTERN
diff --git a/storage/xtradb/include/trx0sys.h b/storage/xtradb/include/trx0sys.h
index d8067e1f936..0c18b657fd7 100644
--- a/storage/xtradb/include/trx0sys.h
+++ b/storage/xtradb/include/trx0sys.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -291,7 +291,7 @@ ibool
trx_in_trx_list(
/*============*/
const trx_t* in_trx) /*!< in: transaction */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#endif /* UNIV_DEBUG */
#if defined UNIV_DEBUG || defined UNIV_BLOB_LIGHT_DEBUG
/***********************************************************//**
@@ -302,7 +302,7 @@ ibool
trx_assert_recovered(
/*=================*/
trx_id_t trx_id) /*!< in: transaction identifier */
- __attribute__((warn_unused_result));
+ MY_ATTRIBUTE((warn_unused_result));
#endif /* UNIV_DEBUG || UNIV_BLOB_LIGHT_DEBUG */
/*****************************************************************//**
Updates the offset information about the end of the MySQL binlog entry
diff --git a/storage/xtradb/include/trx0trx.h b/storage/xtradb/include/trx0trx.h
index d3b1b89e706..ec810405b5a 100644
--- a/storage/xtradb/include/trx0trx.h
+++ b/storage/xtradb/include/trx0trx.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2015, MariaDB Corporation
This program is free software; you can redistribute it and/or modify it under
@@ -52,7 +52,7 @@ UNIV_INLINE
void
trx_search_latch_release_if_reserved(
/*=================================*/
- trx_t* trx __attribute__((unused))); /*!< in: transaction */
+ trx_t* trx MY_ATTRIBUTE((unused))); /*!< in: transaction */
/******************************************************************//**
Set detailed error message for the transaction. */
UNIV_INTERN
@@ -106,7 +106,7 @@ void
trx_free_prepared(
/*==============*/
trx_t* trx) /*!< in, own: trx object */
- UNIV_COLD __attribute__((nonnull));
+ UNIV_COLD MY_ATTRIBUTE((nonnull));
/********************************************************************//**
Frees a transaction object for MySQL. */
UNIV_INTERN
@@ -172,7 +172,7 @@ trx_start_for_ddl_low(
/*==================*/
trx_t* trx, /*!< in/out: transaction */
trx_dict_op_t op) /*!< in: dictionary operation type */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#ifdef UNIV_DEBUG
#define trx_start_for_ddl(t, o) \
@@ -194,7 +194,7 @@ void
trx_commit(
/*=======*/
trx_t* trx) /*!< in/out: transaction */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/****************************************************************//**
Commits a transaction and a mini-transaction. */
UNIV_INTERN
@@ -204,7 +204,7 @@ trx_commit_low(
trx_t* trx, /*!< in/out: transaction */
mtr_t* mtr) /*!< in/out: mini-transaction (will be committed),
or NULL if trx made no modifications */
- __attribute__((nonnull(1)));
+ MY_ATTRIBUTE((nonnull(1)));
/****************************************************************//**
Cleans up a transaction at database startup. The cleanup is needed if
the transaction already got to the middle of a commit when the database
@@ -258,7 +258,7 @@ void
trx_commit_complete_for_mysql(
/*==========================*/
trx_t* trx) /*!< in/out: transaction */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Marks the latest SQL statement ended. */
UNIV_INTERN
@@ -286,7 +286,7 @@ trx_clone_read_view(
/*================*/
trx_t* trx, /*!< in: receiver transaction */
trx_t* from_trx) /*!< in: donor transaction */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/****************************************************************//**
Prepares a transaction for commit/rollback. */
UNIV_INTERN
@@ -331,7 +331,7 @@ trx_print_low(
/*!< in: length of trx->lock.trx_locks */
ulint heap_size)
/*!< in: mem_heap_get_size(trx->lock.lock_heap) */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Prints info about a transaction.
@@ -345,7 +345,7 @@ trx_print_latched(
const trx_t* trx, /*!< in: transaction */
ulint max_query_len) /*!< in: max query length to print,
or 0 to use the default max length */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Prints info about a transaction.
@@ -358,7 +358,7 @@ trx_print(
const trx_t* trx, /*!< in: transaction */
ulint max_query_len) /*!< in: max query length to print,
or 0 to use the default max length */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/**********************************************************************//**
Determine if a transaction is a dictionary operation.
@@ -368,7 +368,7 @@ enum trx_dict_op_t
trx_get_dict_operation(
/*===================*/
const trx_t* trx) /*!< in: transaction */
- __attribute__((pure));
+ MY_ATTRIBUTE((pure));
/**********************************************************************//**
Flag a transaction a dictionary operation. */
UNIV_INLINE
@@ -397,7 +397,7 @@ trx_state_eq(
if state != TRX_STATE_NOT_STARTED
asserts that
trx->state != TRX_STATE_NOT_STARTED */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
# ifdef UNIV_DEBUG
/**********************************************************************//**
Asserts that a transaction has been started.
@@ -408,7 +408,7 @@ ibool
trx_assert_started(
/*===============*/
const trx_t* trx) /*!< in: transaction */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
# endif /* UNIV_DEBUG */
/**********************************************************************//**
diff --git a/storage/xtradb/include/trx0trx.ic b/storage/xtradb/include/trx0trx.ic
index 787931dc4b6..8582b63f806 100644
--- a/storage/xtradb/include/trx0trx.ic
+++ b/storage/xtradb/include/trx0trx.ic
@@ -171,7 +171,7 @@ UNIV_INLINE
void
trx_search_latch_release_if_reserved(
/*=================================*/
- trx_t* trx __attribute__((unused))) /*!< in: transaction */
+ trx_t* trx MY_ATTRIBUTE((unused))) /*!< in: transaction */
{
ut_ad(!trx->has_search_latch);
}
diff --git a/storage/xtradb/include/trx0undo.h b/storage/xtradb/include/trx0undo.h
index 660551961a6..190308112ba 100644
--- a/storage/xtradb/include/trx0undo.h
+++ b/storage/xtradb/include/trx0undo.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -73,7 +73,7 @@ bool
trx_undo_trx_id_is_insert(
/*======================*/
const byte* trx_id) /*!< in: DB_TRX_ID, followed by DB_ROLL_PTR */
- __attribute__((nonnull, pure, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, pure, warn_unused_result));
#endif /* !UNIV_HOTBACKUP */
/*****************************************************************//**
Writes a roll ptr to an index page. In case that the size changes in
@@ -214,7 +214,7 @@ trx_undo_add_page(
mtr_t* mtr) /*!< in: mtr which does not have a latch to any
undo log page; the caller must have reserved
the rollback segment mutex */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/********************************************************************//**
Frees the last undo log page.
The caller must hold the rollback segment mutex. */
@@ -229,7 +229,7 @@ trx_undo_free_last_page_func(
mtr_t* mtr) /*!< in/out: mini-transaction which does not
have a latch to any undo log page or which
has allocated the undo log page */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#ifdef UNIV_DEBUG
# define trx_undo_free_last_page(trx,undo,mtr) \
trx_undo_free_last_page_func(trx,undo,mtr)
@@ -249,7 +249,7 @@ trx_undo_truncate_end(
trx_undo_t* undo, /*!< in/out: undo log */
undo_no_t limit) /*!< in: all undo records with undo number
>= this value should be truncated */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
/***********************************************************************//**
Truncates an undo log from the start. This function is used during a purge
@@ -291,7 +291,7 @@ trx_undo_assign_undo(
/*=================*/
trx_t* trx, /*!< in: transaction */
ulint type) /*!< in: TRX_UNDO_INSERT or TRX_UNDO_UPDATE */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
/******************************************************************//**
Sets the state of the undo log segment at a transaction finish.
@return undo log segment header page, x-latched */
@@ -341,7 +341,7 @@ void
trx_undo_free_prepared(
/*===================*/
trx_t* trx) /*!< in/out: PREPARED transaction */
- UNIV_COLD __attribute__((nonnull));
+ UNIV_COLD MY_ATTRIBUTE((nonnull));
#endif /* !UNIV_HOTBACKUP */
/***********************************************************//**
Parses the redo log entry of an undo log page initialization.
diff --git a/storage/xtradb/include/univ.i b/storage/xtradb/include/univ.i
index 528abe183c7..5320776c042 100644
--- a/storage/xtradb/include/univ.i
+++ b/storage/xtradb/include/univ.i
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
Copyright (c) 2013, 2015, MariaDB Corporation.
@@ -45,10 +45,10 @@ Created 1/20/1994 Heikki Tuuri
#define INNODB_VERSION_MAJOR 5
#define INNODB_VERSION_MINOR 6
-#define INNODB_VERSION_BUGFIX 30
+#define INNODB_VERSION_BUGFIX 31
#ifndef PERCONA_INNODB_VERSION
-#define PERCONA_INNODB_VERSION 76.3
+#define PERCONA_INNODB_VERSION 77.0
#endif
/* Enable UNIV_LOG_ARCHIVE in XtraDB */
@@ -261,8 +261,9 @@ operations (very slow); also UNIV_DEBUG must be defined */
that are only referenced from within InnoDB, not from MySQL. We disable the
GCC visibility directive on all Sun operating systems because there is no
easy way to get it to work. See http://bugs.mysql.com/bug.php?id=52263. */
+#define MY_ATTRIBUTE __attribute__
#if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(sun) || defined(__INTEL_COMPILER)
-# define UNIV_INTERN __attribute__((visibility ("hidden")))
+# define UNIV_INTERN MY_ATTRIBUTE((visibility ("hidden")))
#else
# define UNIV_INTERN
#endif
@@ -277,7 +278,7 @@ appears close together improving code locality of non-cold parts of
program. The paths leading to call of cold functions within code are
marked as unlikely by the branch prediction mechanism. optimize a
rarely invoked function for size instead for speed. */
-# define UNIV_COLD __attribute__((cold))
+# define UNIV_COLD MY_ATTRIBUTE((cold))
#else
# define UNIV_COLD /* empty */
#endif
@@ -583,7 +584,7 @@ contains the sum of the following flag and the locally stored len. */
#if defined(__GNUC__) && (__GNUC__ > 2) && ! defined(__INTEL_COMPILER)
#define HAVE_GCC_GT_2
/* Tell the compiler that variable/function is unused. */
-# define UNIV_UNUSED __attribute__ ((unused))
+# define UNIV_UNUSED MY_ATTRIBUTE ((unused))
#else
# define UNIV_UNUSED
#endif /* CHECK FOR GCC VER_GT_2 */
diff --git a/storage/xtradb/include/ut0byte.h b/storage/xtradb/include/ut0byte.h
index 5bdd553ca80..4893ab9f9af 100644
--- a/storage/xtradb/include/ut0byte.h
+++ b/storage/xtradb/include/ut0byte.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1994, 2009, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -39,7 +39,7 @@ ut_ull_create(
/*==========*/
ulint high, /*!< in: high-order 32 bits */
ulint low) /*!< in: low-order 32 bits */
- __attribute__((const));
+ MY_ATTRIBUTE((const));
/********************************************************//**
Rounds a 64-bit integer downward to a multiple of a power of 2.
@@ -80,7 +80,7 @@ ut_align_down(
/*==========*/
const void* ptr, /*!< in: pointer */
ulint align_no) /*!< in: align by this number */
- __attribute__((const));
+ MY_ATTRIBUTE((const));
/*********************************************************//**
The following function computes the offset of a pointer from the nearest
aligned address.
@@ -91,7 +91,7 @@ ut_align_offset(
/*============*/
const void* ptr, /*!< in: pointer */
ulint align_no) /*!< in: align by this number */
- __attribute__((const));
+ MY_ATTRIBUTE((const));
/*****************************************************************//**
Gets the nth bit of a ulint.
@return TRUE if nth bit is 1; 0th bit is defined to be the least significant */
diff --git a/storage/xtradb/include/ut0dbg.h b/storage/xtradb/include/ut0dbg.h
index 6a4afe99597..3f5baef0a3c 100644
--- a/storage/xtradb/include/ut0dbg.h
+++ b/storage/xtradb/include/ut0dbg.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1994, 2009, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -59,7 +59,7 @@ ut_dbg_assertion_failed(
const char* expr, /*!< in: the failed assertion */
const char* file, /*!< in: source file containing the assertion */
ulint line) /*!< in: line number of the assertion */
- UNIV_COLD __attribute__((nonnull(2)));
+ UNIV_COLD MY_ATTRIBUTE((nonnull(2)));
/** Abort the execution. */
# define UT_DBG_PANIC abort()
diff --git a/storage/xtradb/include/ut0mem.h b/storage/xtradb/include/ut0mem.h
index af7eb4e9b1d..81470358f2f 100644
--- a/storage/xtradb/include/ut0mem.h
+++ b/storage/xtradb/include/ut0mem.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -87,7 +87,7 @@ ut_malloc_low(
ulint n, /*!< in: number of bytes to allocate */
ibool assert_on_error) /*!< in: if TRUE, we crash mysqld if
the memory cannot be allocated */
- __attribute__((malloc));
+ MY_ATTRIBUTE((malloc));
/**********************************************************************//**
Allocates memory. */
#define ut_malloc(n) ut_malloc_low(n, TRUE)
diff --git a/storage/xtradb/include/ut0rnd.h b/storage/xtradb/include/ut0rnd.h
index 53b769849a5..6ed3ee3b2e5 100644
--- a/storage/xtradb/include/ut0rnd.h
+++ b/storage/xtradb/include/ut0rnd.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1994, 2009, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -96,7 +96,7 @@ ulint
ut_fold_ull(
/*========*/
ib_uint64_t d) /*!< in: 64-bit integer */
- __attribute__((const));
+ MY_ATTRIBUTE((const));
/*************************************************************//**
Folds a character string ending in the null character.
@return folded value */
@@ -105,7 +105,7 @@ ulint
ut_fold_string(
/*===========*/
const char* str) /*!< in: null-terminated string */
- __attribute__((pure));
+ MY_ATTRIBUTE((pure));
/***********************************************************//**
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.
@@ -115,7 +115,7 @@ ulint
ut_find_prime(
/*==========*/
ulint n) /*!< in: positive number > 100 */
- __attribute__((const));
+ MY_ATTRIBUTE((const));
#endif /* !UNIV_INNOCHECKSUM */
@@ -128,7 +128,7 @@ ut_fold_ulint_pair(
/*===============*/
ulint n1, /*!< in: ulint */
ulint n2) /*!< in: ulint */
- __attribute__((const));
+ MY_ATTRIBUTE((const));
/*************************************************************//**
Folds a binary string.
@return folded value */
@@ -138,7 +138,7 @@ ut_fold_binary(
/*===========*/
const byte* str, /*!< in: string of bytes */
ulint len) /*!< in: length */
- __attribute__((pure));
+ MY_ATTRIBUTE((pure));
#ifndef UNIV_NONINL
diff --git a/storage/xtradb/include/ut0ut.h b/storage/xtradb/include/ut0ut.h
index 980ac337002..2df6bf58e6a 100644
--- a/storage/xtradb/include/ut0ut.h
+++ b/storage/xtradb/include/ut0ut.h
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1994, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -236,7 +236,7 @@ ulint
ut_2_power_up(
/*==========*/
ulint n) /*!< in: number != 0 */
- __attribute__((const));
+ MY_ATTRIBUTE((const));
/** Determine how many bytes (groups of 8 bits) are needed to
store the given number of bits.
@@ -316,7 +316,7 @@ void
ut_print_timestamp(
/*===============*/
FILE* file) /*!< in: file where to print */
- UNIV_COLD __attribute__((nonnull));
+ UNIV_COLD MY_ATTRIBUTE((nonnull));
#ifndef UNIV_INNOCHECKSUM
@@ -516,7 +516,7 @@ ut_ulint_sort(
ulint* aux_arr, /*!< in/out: aux array to use in sort */
ulint low, /*!< in: lower bound */
ulint high) /*!< in: upper bound */
- __attribute__((nonnull));
+ MY_ATTRIBUTE((nonnull));
#ifndef UNIV_NONINL
#include "ut0ut.ic"
diff --git a/storage/xtradb/lock/lock0lock.cc b/storage/xtradb/lock/lock0lock.cc
index 6aef3e666aa..ecf43f71b21 100644
--- a/storage/xtradb/lock/lock0lock.cc
+++ b/storage/xtradb/lock/lock0lock.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2014, 2015, MariaDB Corporation
This program is free software; you can redistribute it and/or modify it under
@@ -429,7 +429,7 @@ ibool
lock_rec_validate_page(
/*===================*/
const buf_block_t* block) /*!< in: buffer block */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#endif /* UNIV_DEBUG */
/* The lock system */
@@ -513,7 +513,7 @@ Checks that a transaction id is sensible, i.e., not in the future.
#ifdef UNIV_DEBUG
UNIV_INTERN
#else
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
#endif
bool
lock_check_trx_id_sanity(
@@ -1641,7 +1641,7 @@ lock_rec_discard(lock_t* in_lock);
/*********************************************************************//**
Checks if some other transaction has a lock request in the queue.
@return lock or NULL */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
const lock_t*
lock_rec_other_has_expl_req(
/*========================*/
@@ -1692,6 +1692,10 @@ wsrep_kill_victim(
{
ut_ad(lock_mutex_own());
ut_ad(trx_mutex_own(lock->trx));
+
+ /* quit for native mysql */
+ if (!wsrep_on(trx->mysql_thd)) return;
+
my_bool bf_this = wsrep_thd_is_BF(trx->mysql_thd, FALSE);
my_bool bf_other = wsrep_thd_is_BF(lock->trx->mysql_thd, TRUE);
@@ -1778,9 +1782,11 @@ lock_rec_other_has_conflicting(
#ifdef WITH_WSREP
if (lock_rec_has_to_wait(TRUE, trx, mode, lock, is_supremum)) {
- trx_mutex_enter(lock->trx);
- wsrep_kill_victim((trx_t *)trx, (lock_t *)lock);
- trx_mutex_exit(lock->trx);
+ if (wsrep_on(trx->mysql_thd)) {
+ trx_mutex_enter(lock->trx);
+ wsrep_kill_victim(trx, lock);
+ trx_mutex_exit(lock->trx);
+ }
#else
if (lock_rec_has_to_wait(trx, mode, lock, is_supremum)) {
#endif /* WITH_WSREP */
@@ -2086,7 +2092,9 @@ lock_rec_create(
ut_ad(index->table->n_ref_count > 0 || !index->table->can_be_evicted);
#ifdef WITH_WSREP
- if (c_lock && wsrep_thd_is_BF(trx->mysql_thd, FALSE)) {
+ if (c_lock &&
+ wsrep_on(trx->mysql_thd) &&
+ wsrep_thd_is_BF(trx->mysql_thd, FALSE)) {
lock_t *hash = (lock_t *)c_lock->hash;
lock_t *prev = NULL;
@@ -4055,7 +4063,7 @@ lock_get_next_lock(
ut_ad(heap_no == ULINT_UNDEFINED);
ut_ad(lock_get_type_low(lock) == LOCK_TABLE);
- lock = UT_LIST_GET_PREV(un_member.tab_lock.locks, lock);
+ lock = UT_LIST_GET_NEXT(un_member.tab_lock.locks, lock);
}
} while (lock != NULL
&& lock->trx->lock.deadlock_mark > ctx->mark_start);
@@ -4105,7 +4113,8 @@ lock_get_first_lock(
} else {
*heap_no = ULINT_UNDEFINED;
ut_ad(lock_get_type_low(lock) == LOCK_TABLE);
- lock = UT_LIST_GET_PREV(un_member.tab_lock.locks, lock);
+ dict_table_t* table = lock->un_member.tab_lock.table;
+ lock = UT_LIST_GET_FIRST(table->locks);
}
ut_a(lock != NULL);
@@ -4577,8 +4586,6 @@ lock_deadlock_check_and_resolve(
}
#endif /* WITH_WSREP */
- MONITOR_INC(MONITOR_DEADLOCK);
-
} else if (victim_trx_id != 0 && victim_trx_id != trx->id) {
ut_ad(victim_trx_id == ctx.wait_lock->trx->id);
@@ -4587,14 +4594,15 @@ lock_deadlock_check_and_resolve(
lock_deadlock_found = TRUE;
MONITOR_INC(MONITOR_DEADLOCK);
+ srv_stats.lock_deadlock_count.inc();
}
-
} while (victim_trx_id != 0 && victim_trx_id != trx->id);
/* If the joining transaction was selected as the victim. */
if (victim_trx_id != 0) {
ut_a(victim_trx_id == trx->id);
+ MONITOR_INC(MONITOR_DEADLOCK);
srv_stats.lock_deadlock_count.inc();
lock_deadlock_fputs("*** WE ROLL BACK TRANSACTION (2)\n");
@@ -4711,10 +4719,10 @@ lock_table_create(
trx_mutex_exit(c_lock->trx);
}
} else {
- UT_LIST_ADD_LAST(un_member.tab_lock.locks, table->locks, lock);
- }
-#else
+#endif /* WITH_WSREP */
UT_LIST_ADD_LAST(un_member.tab_lock.locks, table->locks, lock);
+#ifdef WITH_WSREP
+ }
#endif /* WITH_WSREP */
if (UNIV_UNLIKELY(type_mode & LOCK_WAIT)) {
@@ -5047,7 +5055,8 @@ lock_table(
dberr_t err;
const lock_t* wait_for;
- ut_ad(table && thr);
+ ut_ad(table != NULL);
+ ut_ad(thr != NULL);
if (flags & BTR_NO_LOCKING_FLAG) {
@@ -6495,7 +6504,7 @@ lock_validate_table_locks(
/*********************************************************************//**
Validate record locks up to a limit.
@return lock at limit or NULL if no more locks in the hash bucket */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
const lock_t*
lock_rec_validate(
/*==============*/
diff --git a/storage/xtradb/lock/lock0wait.cc b/storage/xtradb/lock/lock0wait.cc
index a87adcf94c0..c7bd223c491 100644
--- a/storage/xtradb/lock/lock0wait.cc
+++ b/storage/xtradb/lock/lock0wait.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -512,7 +512,7 @@ extern "C" UNIV_INTERN
os_thread_ret_t
DECLARE_THREAD(lock_wait_timeout_thread)(
/*=====================================*/
- void* arg __attribute__((unused)))
+ void* arg MY_ATTRIBUTE((unused)))
/* in: a dummy parameter required by
os_thread_create */
{
diff --git a/storage/xtradb/log/log0log.cc b/storage/xtradb/log/log0log.cc
index a19cb70e747..0b5d27b8fd1 100644
--- a/storage/xtradb/log/log0log.cc
+++ b/storage/xtradb/log/log0log.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2009, Google Inc.
Copyright (C) 2014, 2016, MariaDB Corporation. All Rights Reserved.
@@ -2641,7 +2641,7 @@ log_archived_file_name_gen(
/*=======================*/
char* buf, /*!< in: buffer where to write */
ulint buf_len,/*!< in: buffer length */
- ulint id __attribute__((unused)),
+ ulint id MY_ATTRIBUTE((unused)),
/*!< in: group id;
currently we only archive the first group */
lsn_t file_no)/*!< in: file number */
diff --git a/storage/xtradb/log/log0online.cc b/storage/xtradb/log/log0online.cc
index 3f53791ed4c..63f1ef39568 100644
--- a/storage/xtradb/log/log0online.cc
+++ b/storage/xtradb/log/log0online.cc
@@ -11,8 +11,8 @@ 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., 59 Temple
-Place, Suite 330, Boston, MA 02111-1307 USA
+this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
+Street, Fifth Floor, Boston, MA 02110-1301, USA
*****************************************************************************/
diff --git a/storage/xtradb/log/log0recv.cc b/storage/xtradb/log/log0recv.cc
index 67f4050a1f1..759687e3fe5 100644
--- a/storage/xtradb/log/log0recv.cc
+++ b/storage/xtradb/log/log0recv.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1997, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
Copyright (c) 2013, 2016, MariaDB Corporation. All Rights Reserved.
@@ -333,7 +333,7 @@ extern "C" UNIV_INTERN
os_thread_ret_t
DECLARE_THREAD(recv_writer_thread)(
/*===============================*/
- void* arg __attribute__((unused)))
+ void* arg MY_ATTRIBUTE((unused)))
/*!< in: a dummy parameter required by
os_thread_create */
{
@@ -752,7 +752,7 @@ recv_check_cp_is_consistent(
/********************************************************//**
Looks for the maximum consistent checkpoint from the log groups.
@return error code or DB_SUCCESS */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
recv_find_max_checkpoint(
/*=====================*/
@@ -775,8 +775,38 @@ recv_find_max_checkpoint(
buf = log_sys->checkpoint_buf;
while (group) {
+
+ ulint log_hdr_log_block_size;
+
group->state = LOG_GROUP_CORRUPTED;
+ /* Assert that we can reuse log_sys->checkpoint_buf to read the
+ part of the header that contains the log block size. */
+ ut_ad(LOG_FILE_OS_FILE_LOG_BLOCK_SIZE + 4
+ < OS_FILE_LOG_BLOCK_SIZE);
+
+ fil_io(OS_FILE_READ | OS_FILE_LOG, true, group->space_id, 0,
+ 0, 0, OS_FILE_LOG_BLOCK_SIZE,
+ log_sys->checkpoint_buf, NULL, NULL);
+ log_hdr_log_block_size
+ = mach_read_from_4(log_sys->checkpoint_buf
+ + LOG_FILE_OS_FILE_LOG_BLOCK_SIZE);
+ if (log_hdr_log_block_size == 0) {
+ /* 0 means default value */
+ log_hdr_log_block_size = 512;
+ }
+ if (UNIV_UNLIKELY(log_hdr_log_block_size
+ != srv_log_block_size)) {
+ fprintf(stderr,
+ "InnoDB: Error: The block size of ib_logfile "
+ "%lu is not equal to innodb_log_block_size "
+ "%lu.\n"
+ "InnoDB: Error: Suggestion - Recreate log "
+ "files.\n",
+ log_hdr_log_block_size, srv_log_block_size);
+ return(DB_ERROR);
+ }
+
for (field = LOG_CHECKPOINT_1; field <= LOG_CHECKPOINT_2;
field += LOG_CHECKPOINT_2 - LOG_CHECKPOINT_1) {
@@ -3097,7 +3127,6 @@ recv_recovery_from_checkpoint_start_func(
log_group_t* group;
log_group_t* max_cp_group;
ulint max_cp_field;
- ulint log_hdr_log_block_size;
lsn_t checkpoint_lsn;
ib_uint64_t checkpoint_no;
lsn_t group_scanned_lsn = 0;
@@ -3204,21 +3233,6 @@ recv_recovery_from_checkpoint_start_func(
log_hdr_buf, max_cp_group, 0);
}
- log_hdr_log_block_size
- = mach_read_from_4(log_hdr_buf + LOG_FILE_OS_FILE_LOG_BLOCK_SIZE);
- if (log_hdr_log_block_size == 0) {
- /* 0 means default value */
- log_hdr_log_block_size = 512;
- }
- if (UNIV_UNLIKELY(log_hdr_log_block_size != srv_log_block_size)) {
- fprintf(stderr,
- "InnoDB: Error: The block size of ib_logfile (" ULINTPF
- ") is not equal to innodb_log_block_size.\n"
- "InnoDB: Error: Suggestion - Recreate log files.\n",
- log_hdr_log_block_size);
- return(DB_ERROR);
- }
-
#ifdef UNIV_LOG_ARCHIVE
group = UT_LIST_GET_FIRST(log_sys->log_groups);
diff --git a/storage/xtradb/mem/mem0dbg.cc b/storage/xtradb/mem/mem0dbg.cc
index 308c2979551..a77785a369a 100644
--- a/storage/xtradb/mem/mem0dbg.cc
+++ b/storage/xtradb/mem/mem0dbg.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -248,7 +248,7 @@ void
mem_field_erase(
/*============*/
byte* buf, /*!< in: memory field */
- ulint n __attribute__((unused)))
+ ulint n MY_ATTRIBUTE((unused)))
/*!< in: how many bytes the user requested */
{
byte* usr_buf;
@@ -450,7 +450,7 @@ void
mem_heap_validate_or_print(
/*=======================*/
mem_heap_t* heap, /*!< in: memory heap */
- byte* top __attribute__((unused)),
+ byte* top MY_ATTRIBUTE((unused)),
/*!< in: calculate and validate only until
this top pointer in the heap is reached,
if this pointer is NULL, ignored */
diff --git a/storage/xtradb/mtr/mtr0mtr.cc b/storage/xtradb/mtr/mtr0mtr.cc
index 4010fcce7ed..a1d7261e43c 100644
--- a/storage/xtradb/mtr/mtr0mtr.cc
+++ b/storage/xtradb/mtr/mtr0mtr.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 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
@@ -59,7 +59,7 @@ mtr_block_dirtied(
/*****************************************************************//**
Releases the item in the slot given. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
mtr_memo_slot_release_func(
/*=======================*/
@@ -106,7 +106,7 @@ mtr_memo_slot_release_func(
Releases the mlocks and other objects stored in an mtr memo.
They are released in the order opposite to which they were pushed
to the memo. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
mtr_memo_pop_all(
/*=============*/
@@ -398,7 +398,7 @@ mtr_read_ulint(
/*===========*/
const byte* ptr, /*!< in: pointer from where to read */
ulint type, /*!< in: MLOG_1BYTE, MLOG_2BYTES, MLOG_4BYTES */
- mtr_t* mtr __attribute__((unused)))
+ mtr_t* mtr MY_ATTRIBUTE((unused)))
/*!< in: mini-transaction handle */
{
ut_ad(mtr->state == MTR_ACTIVE);
diff --git a/storage/xtradb/os/os0file.cc b/storage/xtradb/os/os0file.cc
index ed16a18e548..281c75ca4f5 100644
--- a/storage/xtradb/os/os0file.cc
+++ b/storage/xtradb/os/os0file.cc
@@ -1,6 +1,6 @@
/***********************************************************************
-Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2009, Percona Inc.
Copyright (c) 2013, 2016, MariaDB Corporation.
@@ -1817,11 +1817,11 @@ void
os_file_set_nocache(
/*================*/
os_file_t fd /*!< in: file descriptor to alter */
- __attribute__((unused)),
+ MY_ATTRIBUTE((unused)),
const char* file_name /*!< in: used in the diagnostic
message */
- __attribute__((unused)),
- const char* operation_name __attribute__((unused)))
+ MY_ATTRIBUTE((unused)),
+ const char* operation_name MY_ATTRIBUTE((unused)))
/*!< in: "open" or "create"; used
in the diagnostic message */
{
@@ -1873,14 +1873,14 @@ short_warning:
Tries to enable the atomic write feature, if available, for the specified file
handle.
@return TRUE if success */
-static __attribute__((warn_unused_result))
+static MY_ATTRIBUTE((warn_unused_result))
ibool
os_file_set_atomic_writes(
/*======================*/
const char* name /*!< in: name of the file */
- __attribute__((unused)),
+ MY_ATTRIBUTE((unused)),
os_file_t file /*!< in: handle to the file */
- __attribute__((unused)))
+ MY_ATTRIBUTE((unused)))
{
#ifdef DFS_IOCTL_ATOMIC_WRITE_SET
@@ -2826,7 +2826,7 @@ os_file_flush_func(
/*******************************************************************//**
Does a synchronous read operation in Posix.
@return number of bytes read, -1 if error */
-static __attribute__((nonnull(2), warn_unused_result))
+static MY_ATTRIBUTE((nonnull(2), warn_unused_result))
ssize_t
os_file_pread(
/*==========*/
@@ -2989,7 +2989,7 @@ os_file_pread(
/*******************************************************************//**
Does a synchronous write operation in Posix.
@return number of bytes written, -1 if error */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
ssize_t
os_file_pwrite(
/*===========*/
diff --git a/storage/xtradb/os/os0sync.cc b/storage/xtradb/os/os0sync.cc
index 423b94c6db0..df878c88105 100644
--- a/storage/xtradb/os/os0sync.cc
+++ b/storage/xtradb/os/os0sync.cc
@@ -240,7 +240,7 @@ os_event_t
os_event_create(void)
/*==================*/
{
- os_event_t event = static_cast<os_event_t>(ut_malloc(sizeof(*event)));;
+ os_event_t event = static_cast<os_event_t>(ut_malloc(sizeof(*event)));
os_event_create(event);
diff --git a/storage/xtradb/page/page0cur.cc b/storage/xtradb/page/page0cur.cc
index 97405261392..76e4c2aed9b 100644
--- a/storage/xtradb/page/page0cur.cc
+++ b/storage/xtradb/page/page0cur.cc
@@ -1055,6 +1055,26 @@ use_heap:
insert_rec = rec_copy(insert_buf, rec, offsets);
rec_offs_make_valid(insert_rec, index, offsets);
+ /* This is because assertion below is debug assertion */
+#ifdef UNIV_DEBUG
+ if (UNIV_UNLIKELY(current_rec == insert_rec)) {
+ ulint extra_len, data_len;
+ extra_len = rec_offs_extra_size(offsets);
+ data_len = rec_offs_data_size(offsets);
+
+ fprintf(stderr, "InnoDB: Error: current_rec == insert_rec "
+ " extra_len %lu data_len %lu insert_buf %p rec %p\n",
+ extra_len, data_len, insert_buf, rec);
+ fprintf(stderr, "InnoDB; Physical record: \n");
+ rec_print(stderr, rec, index);
+ fprintf(stderr, "InnoDB: Inserted record: \n");
+ rec_print(stderr, insert_rec, index);
+ fprintf(stderr, "InnoDB: Current record: \n");
+ rec_print(stderr, current_rec, index);
+ ut_a(current_rec != insert_rec);
+ }
+#endif /* UNIV_DEBUG */
+
/* 4. Insert the record in the linked list of records */
ut_ad(current_rec != insert_rec);
diff --git a/storage/xtradb/page/page0page.cc b/storage/xtradb/page/page0page.cc
index 6adbdeb95a4..a6fba4074ef 100644
--- a/storage/xtradb/page/page0page.cc
+++ b/storage/xtradb/page/page0page.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
This program is free software; you can redistribute it and/or modify it under
@@ -309,7 +309,7 @@ byte*
page_parse_create(
/*==============*/
byte* ptr, /*!< in: buffer */
- byte* end_ptr __attribute__((unused)), /*!< in: buffer end */
+ byte* end_ptr MY_ATTRIBUTE((unused)), /*!< in: buffer end */
ulint comp, /*!< in: nonzero=compact page format */
buf_block_t* block, /*!< in: block or NULL */
mtr_t* mtr) /*!< in: mtr or NULL */
diff --git a/storage/xtradb/page/page0zip.cc b/storage/xtradb/page/page0zip.cc
index 09da6ac6a50..63d6fe225c2 100644
--- a/storage/xtradb/page/page0zip.cc
+++ b/storage/xtradb/page/page0zip.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2005, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
Copyright (c) 2014, SkySQL Ab. All Rights Reserved.
@@ -135,7 +135,7 @@ Compare at most sizeof(field_ref_zero) bytes.
independently of any UNIV_ debugging conditions. */
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
# include <stdarg.h>
-__attribute__((format (printf, 1, 2)))
+MY_ATTRIBUTE((format (printf, 1, 2)))
/**********************************************************************//**
Report a failure to decompress or compress.
@return number of characters printed */
@@ -755,8 +755,8 @@ static
void
page_zip_free(
/*==========*/
- void* opaque __attribute__((unused)), /*!< in: memory heap */
- void* address __attribute__((unused)))/*!< in: object to free */
+ void* opaque MY_ATTRIBUTE((unused)), /*!< in: memory heap */
+ void* address MY_ATTRIBUTE((unused)))/*!< in: object to free */
{
}
@@ -4814,7 +4814,8 @@ page_zip_parse_compress(
ulint size;
ulint trailer_size;
- ut_ad(ptr && end_ptr);
+ ut_ad(ptr != NULL);
+ ut_ad(end_ptr != NULL);
ut_ad(!page == !page_zip);
if (UNIV_UNLIKELY(ptr + (2 + 2) > end_ptr)) {
diff --git a/storage/xtradb/pars/lexyy.cc b/storage/xtradb/pars/lexyy.cc
index 07476320e03..62122bb9f6f 100644
--- a/storage/xtradb/pars/lexyy.cc
+++ b/storage/xtradb/pars/lexyy.cc
@@ -295,7 +295,7 @@ static int yy_start = 0; /* start state number */
static int yy_did_buffer_switch_on_eof;
void yyrestart (FILE *input_file );
-__attribute__((unused)) static void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
+MY_ATTRIBUTE((unused)) static void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
static YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
void yy_delete_buffer (YY_BUFFER_STATE b );
void yy_flush_buffer (YY_BUFFER_STATE b );
@@ -916,7 +916,7 @@ char *yytext;
#line 1 "pars0lex.l"
/*****************************************************************************
-Copyright (c) 1997, 2011, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 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
@@ -1027,7 +1027,7 @@ static int yy_init_globals (void );
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-__attribute__((unused)) static int yylex_destroy (void );
+MY_ATTRIBUTE((unused)) static int yylex_destroy (void );
int yyget_debug (void );
@@ -2664,7 +2664,7 @@ static int yy_get_next_buffer (void)
* @param new_buffer The new input buffer.
*
*/
- __attribute__((unused)) static void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
+ MY_ATTRIBUTE((unused)) static void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
{
/* TODO. We should be able to replace this entire function body
@@ -3042,7 +3042,7 @@ static int yy_init_globals (void)
}
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
-__attribute__((unused)) static int yylex_destroy (void)
+MY_ATTRIBUTE((unused)) static int yylex_destroy (void)
{
/* Pop the buffer stack, destroying each element. */
diff --git a/storage/xtradb/pars/make_flex.sh b/storage/xtradb/pars/make_flex.sh
index 581fc2342aa..c3db8aea298 100755
--- a/storage/xtradb/pars/make_flex.sh
+++ b/storage/xtradb/pars/make_flex.sh
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Copyright (c) 1994, 2011, Oracle and/or its affiliates. All Rights Reserved.
+# Copyright (c) 1994, 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
@@ -33,15 +33,15 @@ sed -e '
s/'"$TMPFILE"'/'"$OUTFILE"'/;
s/\(int offset = \)\((yy_c_buf_p) - (yytext_ptr)\);/\1(int)(\2);/;
s/\(void yy\(restart\|_\(delete\|flush\)_buffer\)\)/static \1/;
-s/\(void yy_switch_to_buffer\)/__attribute__((unused)) static \1/;
-s/\(void yy\(push\|pop\)_buffer_state\)/__attribute__((unused)) static \1/;
+s/\(void yy_switch_to_buffer\)/MY_ATTRIBUTE((unused)) static \1/;
+s/\(void yy\(push\|pop\)_buffer_state\)/MY_ATTRIBUTE((unused)) static \1/;
s/\(YY_BUFFER_STATE yy_create_buffer\)/static \1/;
-s/\(\(int\|void\) yy[gs]et_\)/__attribute__((unused)) static \1/;
+s/\(\(int\|void\) yy[gs]et_\)/MY_ATTRIBUTE((unused)) static \1/;
s/\(void \*\?yy\(\(re\)\?alloc\|free\)\)/static \1/;
s/\(extern \)\?\(int yy\(leng\|lineno\|_flex_debug\)\)/static \2/;
-s/\(int yylex_destroy\)/__attribute__((unused)) static \1/;
+s/\(int yylex_destroy\)/MY_ATTRIBUTE((unused)) static \1/;
s/\(extern \)\?\(int yylex \)/UNIV_INTERN \2/;
-s/^\(\(FILE\|char\) *\* *yyget\)/__attribute__((unused)) static \1/;
+s/^\(\(FILE\|char\) *\* *yyget\)/MY_ATTRIBUTE((unused)) static \1/;
s/^\(extern \)\?\(\(FILE\|char\) *\* *yy\)/static \2/;
' < $TMPFILE >> $OUTFILE
diff --git a/storage/xtradb/pars/pars0pars.cc b/storage/xtradb/pars/pars0pars.cc
index da08939d78a..e6af3d25e86 100644
--- a/storage/xtradb/pars/pars0pars.cc
+++ b/storage/xtradb/pars/pars0pars.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -1926,7 +1926,7 @@ pars_create_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) */
- void* not_fit_in_memory __attribute__((unused)))
+ void* not_fit_in_memory MY_ATTRIBUTE((unused)))
/*!< in: a non-NULL pointer means that
this is a table which in simulations
should be simulated as not fitting
@@ -2143,7 +2143,7 @@ UNIV_INTERN
que_fork_t*
pars_stored_procedure_call(
/*=======================*/
- sym_node_t* sym_node __attribute__((unused)))
+ sym_node_t* sym_node MY_ATTRIBUTE((unused)))
/*!< in: stored procedure name */
{
ut_error;
@@ -2203,7 +2203,7 @@ UNIV_INTERN
void
yyerror(
/*====*/
- const char* s __attribute__((unused)))
+ const char* s MY_ATTRIBUTE((unused)))
/*!< in: error message string */
{
ut_ad(s);
diff --git a/storage/xtradb/rem/rem0cmp.cc b/storage/xtradb/rem/rem0cmp.cc
index 426cf9e3ac5..616ef322fb5 100644
--- a/storage/xtradb/rem/rem0cmp.cc
+++ b/storage/xtradb/rem/rem0cmp.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1994, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -75,7 +75,7 @@ cmp_debug_dtuple_rec_with_match(
completely matched fields; when function
returns, contains the value for current
comparison */
- __attribute__((nonnull, warn_unused_result));
+ MY_ATTRIBUTE((nonnull, warn_unused_result));
#endif /* UNIV_DEBUG */
/*************************************************************//**
This function is used to compare two data fields for which the data type
@@ -659,7 +659,10 @@ cmp_dtuple_rec_with_match_low(
in current field */
int ret; /* return value */
- ut_ad(dtuple && rec && matched_fields && matched_bytes);
+ ut_ad(dtuple != NULL);
+ ut_ad(rec != NULL);
+ ut_ad(matched_fields != NULL);
+ ut_ad(matched_bytes != NULL);
ut_ad(dtuple_check_typed(dtuple));
ut_ad(rec_offs_validate(rec, NULL, offsets));
@@ -920,7 +923,7 @@ Compare two physical record fields.
@retval 1 if rec1 field is greater than rec2
@retval -1 if rec1 field is less than rec2
@retval 0 if rec1 field equals to rec2 */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
int
cmp_rec_rec_simple_field(
/*=====================*/
@@ -1139,7 +1142,9 @@ cmp_rec_rec_with_match(
int ret = 0; /* return value */
ulint comp;
- ut_ad(rec1 && rec2 && index);
+ ut_ad(rec1 != NULL);
+ ut_ad(rec2 != NULL);
+ ut_ad(index != NULL);
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));
@@ -1375,7 +1380,9 @@ cmp_debug_dtuple_rec_with_match(
int ret; /* return value */
ulint cur_field; /* current field number */
- ut_ad(dtuple && rec && matched_fields);
+ ut_ad(dtuple != NULL);
+ ut_ad(rec != NULL);
+ ut_ad(matched_fields != NULL);
ut_ad(dtuple_check_typed(dtuple));
ut_ad(rec_offs_validate(rec, NULL, offsets));
diff --git a/storage/xtradb/rem/rem0rec.cc b/storage/xtradb/rem/rem0rec.cc
index 4231309f10f..80dc7557ec7 100644
--- a/storage/xtradb/rem/rem0rec.cc
+++ b/storage/xtradb/rem/rem0rec.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 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
@@ -244,7 +244,7 @@ rec_get_n_extern_new(
Determine the offset to each field in a leaf-page record
in ROW_FORMAT=COMPACT. This is a special case of
rec_init_offsets() and rec_get_offsets_func(). */
-UNIV_INLINE __attribute__((nonnull))
+UNIV_INLINE MY_ATTRIBUTE((nonnull))
void
rec_init_offsets_comp_ordinary(
/*===========================*/
@@ -788,7 +788,7 @@ rec_get_nth_field_offs_old(
/**********************************************************//**
Determines the size of a data tuple prefix in ROW_FORMAT=COMPACT.
@return total size */
-UNIV_INLINE __attribute__((warn_unused_result, nonnull(1,2)))
+UNIV_INLINE MY_ATTRIBUTE((warn_unused_result, nonnull(1,2)))
ulint
rec_get_converted_size_comp_prefix_low(
/*===================================*/
@@ -1133,7 +1133,7 @@ rec_convert_dtuple_to_rec_old(
/*********************************************************//**
Builds a ROW_FORMAT=COMPACT record out of a data tuple. */
-UNIV_INLINE __attribute__((nonnull))
+UNIV_INLINE MY_ATTRIBUTE((nonnull))
void
rec_convert_dtuple_to_rec_comp(
/*===========================*/
@@ -1341,7 +1341,9 @@ rec_convert_dtuple_to_rec(
{
rec_t* rec;
- ut_ad(buf && index && dtuple);
+ ut_ad(buf != NULL);
+ ut_ad(index != NULL);
+ ut_ad(dtuple != NULL);
ut_ad(dtuple_validate(dtuple));
ut_ad(dtuple_check_typed(dtuple));
diff --git a/storage/xtradb/row/row0ftsort.cc b/storage/xtradb/row/row0ftsort.cc
index ac0dc844b1b..a3a00620a6d 100644
--- a/storage/xtradb/row/row0ftsort.cc
+++ b/storage/xtradb/row/row0ftsort.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2010, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2010, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2015, 2016, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
@@ -560,8 +560,18 @@ row_merge_fts_doc_tokenize(
dfield_dup(field, buf->heap);
/* One variable length column, word with its lenght less than
- fts_max_token_size, add one extra size and one extra byte */
- cur_len += 2;
+ fts_max_token_size, add one extra size and one extra byte.
+
+ Since the max length for FTS token now is larger than 255,
+ so we will need to signify length byte itself, so only 1 to 128
+ bytes can be used for 1 bytes, larger than that 2 bytes. */
+ if (t_str.f_len < 128) {
+ /* Extra size is one byte. */
+ cur_len += 2;
+ } else {
+ /* Extra size is two bytes. */
+ cur_len += 3;
+ }
/* Reserve one byte for the end marker of row_merge_block_t
and we have reserved ROW_MERGE_RESERVE_SIZE (= 4) for
@@ -1045,7 +1055,7 @@ row_fts_start_parallel_merge(
/********************************************************************//**
Insert processed FTS data to auxillary index tables.
@return DB_SUCCESS if insertion runs fine */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
dberr_t
row_merge_write_fts_word(
/*=====================*/
diff --git a/storage/xtradb/row/row0import.cc b/storage/xtradb/row/row0import.cc
index 893ffcab3da..4c7cb7d33b5 100644
--- a/storage/xtradb/row/row0import.cc
+++ b/storage/xtradb/row/row0import.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
-Copyright (c) 2012, 2015, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2015, MariaDB Corporation.
+Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2016, 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
@@ -1336,12 +1336,15 @@ row_import::match_schema(
THD* thd) UNIV_NOTHROW
{
/* Do some simple checks. */
+ const unsigned relevant_flags = m_flags & ~DICT_TF_MASK_DATA_DIR;
+ const unsigned relevant_table_flags
+ = m_table->flags & ~DICT_TF_MASK_DATA_DIR;
- if (m_flags != m_table->flags) {
+ if (relevant_flags != relevant_table_flags) {
ib_errf(thd, IB_LOG_LEVEL_ERROR, ER_TABLE_SCHEMA_MISMATCH,
- "Table flags don't match, server table has 0x%lx "
- "and the meta-data file has 0x%lx",
- (ulong) m_table->n_cols, (ulong) m_flags);
+ "Table flags don't match, server table has 0x%x "
+ "and the meta-data file has 0x%x",
+ relevant_table_flags, relevant_flags);
return(DB_ERROR);
} else if (m_table->n_cols != m_n_cols) {
@@ -2181,7 +2184,7 @@ PageConverter::operator() (
Clean up after import tablespace failure, this function will acquire
the dictionary latches on behalf of the transaction if the transaction
hasn't already acquired them. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
row_import_discard_changes(
/*=======================*/
@@ -2232,7 +2235,7 @@ row_import_discard_changes(
/*****************************************************************//**
Clean up after import tablespace. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_import_cleanup(
/*===============*/
@@ -2267,7 +2270,7 @@ row_import_cleanup(
/*****************************************************************//**
Report error during tablespace import. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_import_error(
/*=============*/
@@ -2295,7 +2298,7 @@ row_import_error(
Adjust the root page index node and leaf node segment headers, update
with the new space id. For all the table's secondary indexes.
@return error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_import_adjust_root_pages_of_secondary_indexes(
/*==============================================*/
@@ -2411,7 +2414,7 @@ row_import_adjust_root_pages_of_secondary_indexes(
/*****************************************************************//**
Ensure that dict_sys->row_id exceeds SELECT MAX(DB_ROW_ID).
@return error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_import_set_sys_max_row_id(
/*==========================*/
@@ -2561,7 +2564,7 @@ row_import_cfg_read_string(
/*********************************************************************//**
Write the meta data (index user fields) config file.
@return DB_SUCCESS or error code. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_import_cfg_read_index_fields(
/*=============================*/
@@ -2644,7 +2647,7 @@ row_import_cfg_read_index_fields(
Read the index names and root page numbers of the indexes and set the values.
Row format [root_page_no, len of str, str ... ]
@return DB_SUCCESS or error code. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_import_read_index_data(
/*=======================*/
@@ -2839,7 +2842,7 @@ row_import_read_indexes(
/*********************************************************************//**
Read the meta data (table columns) config file. Deserialise the contents of
dict_col_t structure, along with the column name. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_import_read_columns(
/*====================*/
@@ -2964,7 +2967,7 @@ row_import_read_columns(
/*****************************************************************//**
Read the contents of the <tablespace>.cfg file.
@return DB_SUCCESS or error code. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_import_read_v1(
/*===============*/
@@ -3130,7 +3133,7 @@ row_import_read_v1(
/**
Read the contents of the <tablespace>.cfg file.
@return DB_SUCCESS or error code. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_import_read_meta_data(
/*======================*/
@@ -3173,7 +3176,7 @@ row_import_read_meta_data(
/**
Read the contents of the <tablename>.cfg file.
@return DB_SUCCESS or error code. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_import_read_cfg(
/*================*/
diff --git a/storage/xtradb/row/row0ins.cc b/storage/xtradb/row/row0ins.cc
index d02e1796f8a..8dbf093a17d 100644
--- a/storage/xtradb/row/row0ins.cc
+++ b/storage/xtradb/row/row0ins.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -224,7 +224,7 @@ Does an insert operation by updating a delete-marked existing record
in the index. This situation can occur if the delete-marked record is
kept in the index for consistent reads.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_ins_sec_index_entry_by_modify(
/*==============================*/
@@ -325,7 +325,7 @@ Does an insert operation by delete unmarking and updating a delete marked
existing record in the index. This situation can occur if the delete marked
record is kept in the index for consistent reads.
@return DB_SUCCESS, DB_FAIL, or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_ins_clust_index_entry_by_modify(
/*================================*/
@@ -433,7 +433,7 @@ row_ins_cascade_ancestor_updates_table(
Returns the number of ancestor UPDATE or DELETE nodes of a
cascaded update/delete node.
@return number of ancestors */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
ulint
row_ins_cascade_n_ancestors(
/*========================*/
@@ -459,7 +459,7 @@ a cascaded update.
can also be 0 if no foreign key fields changed; the returned value is
ULINT_UNDEFINED if the column type in the child table is too short to
fit the new value in the parent table: that means the update fails */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
ulint
row_ins_cascade_calc_update_vec(
/*============================*/
@@ -948,7 +948,7 @@ Perform referential actions or checks when a parent row is deleted or updated
and the constraint had an ON DELETE or ON UPDATE condition which was not
RESTRICT.
@return DB_SUCCESS, DB_LOCK_WAIT, or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_ins_foreign_check_on_constraint(
/*================================*/
@@ -1802,7 +1802,7 @@ Otherwise does searches to the indexes of referenced tables and
sets shared locks which lock either the success or the failure of
a constraint.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_ins_check_foreign_constraints(
/*==============================*/
@@ -1943,7 +1943,7 @@ Scans a unique non-clustered index at a given index entry to determine
whether a uniqueness violation has occurred for the key value of the entry.
Set shared locks on possible duplicate records.
@return DB_SUCCESS, DB_DUPLICATE_KEY, or DB_LOCK_WAIT */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_ins_scan_sec_index_for_duplicate(
/*=================================*/
@@ -2085,7 +2085,7 @@ end_scan:
@retval DB_SUCCESS_LOCKED_REC when rec is an exact match of entry or
a newer version of entry (the entry should not be inserted)
@retval DB_DUPLICATE_KEY when entry is a duplicate of rec */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_ins_duplicate_online(
/*=====================*/
@@ -2126,7 +2126,7 @@ row_ins_duplicate_online(
@retval DB_SUCCESS_LOCKED_REC when rec is an exact match of entry or
a newer version of entry (the entry should not be inserted)
@retval DB_DUPLICATE_KEY when entry is a duplicate of rec */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_ins_duplicate_error_in_clust_online(
/*====================================*/
@@ -2169,7 +2169,7 @@ for a clustered index!
record
@retval DB_SUCCESS_LOCKED_REC if an exact match of the record was found
in online table rebuild (flags & (BTR_KEEP_SYS_FLAG | BTR_NO_LOCKING_FLAG)) */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_ins_duplicate_error_in_clust(
/*=============================*/
@@ -2625,7 +2625,7 @@ func_exit:
/***************************************************************//**
Starts a mini-transaction and checks if the index will be dropped.
@return true if the index is to be dropped */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
row_ins_sec_mtr_start_trx_and_check_if_aborted(
/*=======================================*/
@@ -3105,7 +3105,7 @@ row_ins_index_entry(
/***********************************************************//**
Sets the values of the dtuple fields in entry from the values of appropriate
columns in row. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
row_ins_index_entry_set_vals(
/*=========================*/
@@ -3158,7 +3158,7 @@ row_ins_index_entry_set_vals(
Inserts a single index entry to the table.
@return DB_SUCCESS if operation successfully completed, else error
code or DB_LOCK_WAIT */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_ins_index_entry_step(
/*=====================*/
@@ -3281,7 +3281,7 @@ row_ins_get_row_from_select(
Inserts a row to a table.
@return DB_SUCCESS if operation successfully completed, else error
code or DB_LOCK_WAIT */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_ins(
/*====*/
diff --git a/storage/xtradb/row/row0log.cc b/storage/xtradb/row/row0log.cc
index f0b200459dd..53e375023fb 100644
--- a/storage/xtradb/row/row0log.cc
+++ b/storage/xtradb/row/row0log.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2011, 2015, Oracle and/or its affiliates. All Rights Reserved.
+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
@@ -205,7 +205,7 @@ struct row_log_t {
/** Create the file or online log if it does not exist.
@param[in,out] log online rebuild log
@return file descriptor. */
-static __attribute__((warn_unused_result))
+static MY_ATTRIBUTE((warn_unused_result))
int
row_log_tmpfile(
row_log_t* log)
@@ -221,7 +221,7 @@ row_log_tmpfile(
/** Allocate the memory for the log buffer.
@param[in,out] log_buf Buffer used for log operation
@return TRUE if success, false if not */
-static __attribute__((warn_unused_result))
+static MY_ATTRIBUTE((warn_unused_result))
bool
row_log_block_allocate(
row_log_buf_t& log_buf)
@@ -411,7 +411,7 @@ row_log_table_get_error(
/******************************************************//**
Starts logging an operation to a table that is being rebuilt.
@return pointer to log, or NULL if no logging is necessary */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
byte*
row_log_table_open(
/*===============*/
@@ -446,7 +446,7 @@ err_exit:
/******************************************************//**
Stops logging an operation to a table that is being rebuilt. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
row_log_table_close_func(
/*=====================*/
@@ -820,7 +820,7 @@ row_log_table_low_redundant(
/******************************************************//**
Logs an insert or update to a table that is being rebuilt. */
-static __attribute__((nonnull(1,2,3)))
+static MY_ATTRIBUTE((nonnull(1,2,3)))
void
row_log_table_low(
/*==============*/
@@ -1320,7 +1320,7 @@ row_log_table_blob_alloc(
/******************************************************//**
Converts a log record to a table row.
@return converted row, or NULL if the conversion fails */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
const dtuple_t*
row_log_table_apply_convert_mrec(
/*=============================*/
@@ -1474,7 +1474,7 @@ blob_done:
/******************************************************//**
Replays an insert operation on a table that was rebuilt.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_log_table_apply_insert_low(
/*===========================*/
@@ -1556,7 +1556,7 @@ row_log_table_apply_insert_low(
/******************************************************//**
Replays an insert operation on a table that was rebuilt.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_log_table_apply_insert(
/*=======================*/
@@ -1608,7 +1608,7 @@ row_log_table_apply_insert(
/******************************************************//**
Deletes a record from a table that is being rebuilt.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull(1, 2, 4, 5), warn_unused_result))
+static MY_ATTRIBUTE((nonnull(1, 2, 4, 5), warn_unused_result))
dberr_t
row_log_table_apply_delete_low(
/*===========================*/
@@ -1706,7 +1706,7 @@ flag_ok:
/******************************************************//**
Replays a delete operation on a table that was rebuilt.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull(1, 3, 4, 5, 6, 7), warn_unused_result))
+static MY_ATTRIBUTE((nonnull(1, 3, 4, 5, 6, 7), warn_unused_result))
dberr_t
row_log_table_apply_delete(
/*=======================*/
@@ -1828,7 +1828,7 @@ all_done:
/******************************************************//**
Replays an update operation on a table that was rebuilt.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_log_table_apply_update(
/*=======================*/
@@ -2191,7 +2191,7 @@ func_exit_committed:
Applies an operation to a table that was rebuilt.
@return NULL on failure (mrec corruption) or when out of data;
pointer to next record on success */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
const mrec_t*
row_log_table_apply_op(
/*===================*/
@@ -2482,7 +2482,7 @@ row_log_table_apply_op(
/******************************************************//**
Applies operations to a table was rebuilt.
@return DB_SUCCESS, or error code on failure */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_log_table_apply_ops(
/*====================*/
@@ -2979,7 +2979,7 @@ row_log_get_max_trx(
/******************************************************//**
Applies an operation to a secondary index that was being created. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
row_log_apply_op_low(
/*=================*/
@@ -3206,7 +3206,7 @@ func_exit:
Applies an operation to a secondary index that was being created.
@return NULL on failure (mrec corruption) or when out of data;
pointer to next record on success */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
const mrec_t*
row_log_apply_op(
/*=============*/
@@ -3331,7 +3331,7 @@ corrupted:
/******************************************************//**
Applies operations to a secondary index that was being created.
@return DB_SUCCESS, or error code on failure */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
dberr_t
row_log_apply_ops(
/*==============*/
diff --git a/storage/xtradb/row/row0merge.cc b/storage/xtradb/row/row0merge.cc
index 9c3e9dfc885..b803a0d76c4 100644
--- a/storage/xtradb/row/row0merge.cc
+++ b/storage/xtradb/row/row0merge.cc
@@ -164,7 +164,7 @@ row_merge_decrypt_buf(
#ifdef UNIV_DEBUG
/******************************************************//**
Display a merge tuple. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
row_merge_tuple_print(
/*==================*/
@@ -199,7 +199,7 @@ row_merge_tuple_print(
/******************************************************//**
Encode an index record. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
row_merge_buf_encode(
/*=================*/
@@ -236,7 +236,7 @@ row_merge_buf_encode(
/******************************************************//**
Allocate a sort buffer.
@return own: sort buffer */
-static __attribute__((malloc, nonnull))
+static MY_ATTRIBUTE((malloc, nonnull))
row_merge_buf_t*
row_merge_buf_create_low(
/*=====================*/
@@ -738,7 +738,7 @@ row_merge_dup_report(
/*************************************************************//**
Compare two tuples.
@return 1, 0, -1 if a is greater, equal, less, respectively, than b */
-static __attribute__((warn_unused_result))
+static MY_ATTRIBUTE((warn_unused_result))
int
row_merge_tuple_cmp(
/*================*/
@@ -817,7 +817,7 @@ UT_SORT_FUNCTION_BODY().
/**********************************************************************//**
Merge sort the tuple buffer in main memory. */
-static __attribute__((nonnull(4,5)))
+static MY_ATTRIBUTE((nonnull(4,5)))
void
row_merge_tuple_sort(
/*=================*/
@@ -1393,7 +1393,7 @@ row_merge_write_eof(
@param[in,out] tmpfd temporary file handle
@param[in] path path to create temporary file
@return file descriptor, or -1 on failure */
-static __attribute__((warn_unused_result))
+static MY_ATTRIBUTE((warn_unused_result))
int
row_merge_tmpfile_if_needed(
int* tmpfd,
@@ -1412,7 +1412,7 @@ row_merge_tmpfile_if_needed(
@param[in] nrec number of records in the file
@param[in] path path to create temporary files
@return file descriptor, or -1 on failure */
-static __attribute__((warn_unused_result))
+static MY_ATTRIBUTE((warn_unused_result))
int
row_merge_file_create_if_needed(
merge_file_t* file,
@@ -1458,7 +1458,7 @@ containing the index entries for the indexes to be built.
@param[in,out] block file buffer
@param[in,out] tmpfd temporary file handle
return DB_SUCCESS or error */
-static __attribute__((nonnull(1,2,3,4,6,9,10,16), warn_unused_result))
+static MY_ATTRIBUTE((nonnull(1,2,3,4,6,9,10,16), warn_unused_result))
dberr_t
row_merge_read_clustered_index(
trx_t* trx,
@@ -2680,7 +2680,7 @@ row_merge_sort(
/*************************************************************//**
Copy externally stored columns to the data tuple. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
row_merge_copy_blobs(
/*=================*/
@@ -3762,7 +3762,7 @@ row_merge_rename_tables_dict(
/*********************************************************************//**
Create and execute a query graph for creating an index.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_merge_create_index_graph(
/*=========================*/
diff --git a/storage/xtradb/row/row0mysql.cc b/storage/xtradb/row/row0mysql.cc
index ccdfc1332a0..ba2e0047fe9 100644
--- a/storage/xtradb/row/row0mysql.cc
+++ b/storage/xtradb/row/row0mysql.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2000, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2000, 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
@@ -1432,9 +1432,12 @@ error_exit:
}
/* Difference between Doc IDs are restricted within
- 4 bytes integer. See fts_get_encoded_len() */
+ 4 bytes integer. See fts_get_encoded_len(). Consecutive
+ doc_ids difference should not exceed
+ FTS_DOC_ID_MAX_STEP value. */
- if (doc_id - next_doc_id >= FTS_DOC_ID_MAX_STEP) {
+ if (next_doc_id > 1
+ && doc_id - next_doc_id >= FTS_DOC_ID_MAX_STEP) {
fprintf(stderr,
"InnoDB: Doc ID " UINT64PF " is too"
" big. Its difference with largest"
@@ -1704,7 +1707,8 @@ row_update_for_mysql(
trx_t* trx = prebuilt->trx;
ulint fk_depth = 0;
- ut_ad(prebuilt && trx);
+ ut_ad(prebuilt != NULL);
+ ut_ad(trx != NULL);
UT_NOT_USED(mysql_rec);
if (prebuilt->table->ibd_file_missing) {
@@ -1926,7 +1930,8 @@ row_unlock_for_mysql(
btr_pcur_t* clust_pcur = &prebuilt->clust_pcur;
trx_t* trx = prebuilt->trx;
- ut_ad(prebuilt && trx);
+ ut_ad(prebuilt != NULL);
+ ut_ad(trx != NULL);
if (UNIV_UNLIKELY
(!srv_locks_unsafe_for_binlog
@@ -4621,7 +4626,7 @@ row_mysql_drop_temp_tables(void)
Drop all foreign keys in a database, see Bug#18942.
Called at the end of row_drop_database_for_mysql().
@return error code or DB_SUCCESS */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
drop_all_foreign_keys_in_db(
/*========================*/
@@ -4813,7 +4818,7 @@ loop:
Checks if a table name contains the string "/#sql" which denotes temporary
tables in MySQL.
@return true if temporary table */
-UNIV_INTERN __attribute__((warn_unused_result))
+UNIV_INTERN MY_ATTRIBUTE((warn_unused_result))
bool
row_is_mysql_tmp_table_name(
/*========================*/
@@ -4827,7 +4832,7 @@ row_is_mysql_tmp_table_name(
/****************************************************************//**
Delete a single constraint.
@return error code or DB_SUCCESS */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_delete_constraint_low(
/*======================*/
@@ -4850,7 +4855,7 @@ row_delete_constraint_low(
/****************************************************************//**
Delete a single constraint.
@return error code or DB_SUCCESS */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_delete_constraint(
/*==================*/
diff --git a/storage/xtradb/row/row0purge.cc b/storage/xtradb/row/row0purge.cc
index b26ba971a95..bc2e0b0e1cb 100644
--- a/storage/xtradb/row/row0purge.cc
+++ b/storage/xtradb/row/row0purge.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1997, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 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
@@ -69,7 +69,8 @@ row_purge_node_create(
{
purge_node_t* node;
- ut_ad(parent && heap);
+ ut_ad(parent != NULL);
+ ut_ad(heap != NULL);
node = static_cast<purge_node_t*>(
mem_heap_zalloc(heap, sizeof(*node)));
@@ -120,7 +121,7 @@ row_purge_reposition_pcur(
Removes a delete marked clustered index record if possible.
@retval true if the row was not found, or it was successfully removed
@retval false if the row was modified after the delete marking */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
row_purge_remove_clust_if_poss_low(
/*===============================*/
@@ -202,7 +203,7 @@ marking.
@retval true if the row was not found, or it was successfully removed
@retval false the purge needs to be suspended because of running out
of file space. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
row_purge_remove_clust_if_poss(
/*===========================*/
@@ -274,7 +275,7 @@ row_purge_poss_sec(
Removes a secondary index entry if possible, by modifying the
index tree. Does not try to buffer the delete.
@return TRUE if success or if not found */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
ibool
row_purge_remove_sec_if_poss_tree(
/*==============================*/
@@ -396,7 +397,7 @@ Removes a secondary index entry without modifying the index tree,
if possible.
@retval true if success or if not found
@retval false if row_purge_remove_sec_if_poss_tree() should be invoked */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
row_purge_remove_sec_if_poss_leaf(
/*==============================*/
@@ -507,7 +508,7 @@ row_purge_remove_sec_if_poss_leaf(
/***********************************************************//**
Removes a secondary index entry if possible. */
-UNIV_INLINE __attribute__((nonnull(1,2)))
+UNIV_INLINE MY_ATTRIBUTE((nonnull(1,2)))
void
row_purge_remove_sec_if_poss(
/*=========================*/
@@ -554,7 +555,7 @@ Purges a delete marking of a record.
@retval true if the row was not found, or it was successfully removed
@retval false the purge needs to be suspended because of
running out of file space */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
row_purge_del_mark(
/*===============*/
@@ -745,7 +746,8 @@ row_purge_parse_undo_rec(
ulint info_bits;
ulint type;
- ut_ad(node && thr);
+ ut_ad(node != NULL);
+ ut_ad(thr != NULL);
ptr = trx_undo_rec_get_pars(
undo_rec, &type, &node->cmpl_info,
@@ -830,7 +832,7 @@ err_exit:
/***********************************************************//**
Purges the parsed record.
@return true if purged, false if skipped */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
row_purge_record_func(
/*==================*/
@@ -895,7 +897,7 @@ row_purge_record_func(
Fetches an undo log record and does the purge for the recorded operation.
If none left, or the current purge completed, returns the control to the
parent node, which is always a query thread node. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
row_purge(
/*======*/
diff --git a/storage/xtradb/row/row0quiesce.cc b/storage/xtradb/row/row0quiesce.cc
index ecd6f47947b..583fbe60fb3 100644
--- a/storage/xtradb/row/row0quiesce.cc
+++ b/storage/xtradb/row/row0quiesce.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 2012, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2012, 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
@@ -37,7 +37,7 @@ Created 2012-02-08 by Sunny Bains.
/*********************************************************************//**
Write the meta data (index user fields) config file.
@return DB_SUCCESS or error code. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_quiesce_write_index_fields(
/*===========================*/
@@ -97,7 +97,7 @@ row_quiesce_write_index_fields(
/*********************************************************************//**
Write the meta data config file index information.
@return DB_SUCCESS or error code. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_quiesce_write_indexes(
/*======================*/
@@ -210,7 +210,7 @@ Write the meta data (table columns) config file. Serialise the contents of
dict_col_t structure, along with the column name. All fields are serialized
as ib_uint32_t.
@return DB_SUCCESS or error code. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_quiesce_write_table(
/*====================*/
@@ -293,7 +293,7 @@ row_quiesce_write_table(
/*********************************************************************//**
Write the meta data config file header.
@return DB_SUCCESS or error code. */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_quiesce_write_header(
/*=====================*/
@@ -415,7 +415,7 @@ row_quiesce_write_header(
/*********************************************************************//**
Write the table meta data after quiesce.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_quiesce_write_cfg(
/*==================*/
@@ -530,10 +530,8 @@ row_quiesce_table_start(
trx_purge_stop();
}
- ut_a(table->id > 0);
-
for (ulint count = 0;
- ibuf_contract_in_background(table->id, TRUE) != 0
+ ibuf_merge_space(table->space) != 0
&& !trx_is_interrupted(trx);
++count) {
if (!(count % 20)) {
diff --git a/storage/xtradb/row/row0row.cc b/storage/xtradb/row/row0row.cc
index be786f954fb..96d25e15777 100644
--- a/storage/xtradb/row/row0row.cc
+++ b/storage/xtradb/row/row0row.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -240,7 +240,9 @@ row_build(
ulint offsets_[REC_OFFS_NORMAL_SIZE];
rec_offs_init(offsets_);
- ut_ad(index && rec && heap);
+ ut_ad(index != NULL);
+ ut_ad(rec != NULL);
+ ut_ad(heap != NULL);
ut_ad(dict_index_is_clust(index));
ut_ad(!mutex_own(&trx_sys->mutex));
ut_ad(!col_map || col_table);
@@ -409,7 +411,9 @@ row_rec_to_index_entry_low(
ulint len;
ulint rec_len;
- ut_ad(rec && heap && index);
+ ut_ad(rec != NULL);
+ ut_ad(heap != NULL);
+ ut_ad(index != NULL);
/* 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. */
@@ -464,7 +468,9 @@ row_rec_to_index_entry(
byte* buf;
const rec_t* copy_rec;
- ut_ad(rec && heap && index);
+ ut_ad(rec != NULL);
+ ut_ad(heap != NULL);
+ ut_ad(index != NULL);
ut_ad(rec_offs_validate(rec, index, offsets));
/* Take a copy of rec to heap */
@@ -523,7 +529,9 @@ row_build_row_ref(
ulint* offsets = offsets_;
rec_offs_init(offsets_);
- ut_ad(index && rec && heap);
+ ut_ad(index != NULL);
+ ut_ad(rec != NULL);
+ ut_ad(heap != NULL);
ut_ad(!dict_index_is_clust(index));
offsets = rec_get_offsets(rec, index, offsets,
diff --git a/storage/xtradb/row/row0sel.cc b/storage/xtradb/row/row0sel.cc
index 2bebfb7a0f1..9732a5f9400 100644
--- a/storage/xtradb/row/row0sel.cc
+++ b/storage/xtradb/row/row0sel.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1997, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
Copyright (c) 2015, MariaDB Corporation.
@@ -679,7 +679,7 @@ sel_enqueue_prefetched_row(
/*********************************************************************//**
Builds a previous version of a clustered index record for a consistent read
@return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_sel_build_prev_vers(
/*====================*/
@@ -714,7 +714,7 @@ row_sel_build_prev_vers(
/*********************************************************************//**
Builds the last committed version of a clustered index record for a
semi-consistent read. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
row_sel_build_committed_vers_for_mysql(
/*===================================*/
@@ -812,7 +812,7 @@ row_sel_test_other_conds(
Retrieves the clustered index record corresponding to a record in a
non-clustered index. Does the necessary locking.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_sel_get_clust_rec(
/*==================*/
@@ -1316,7 +1316,7 @@ func_exit:
/*********************************************************************//**
Performs a select step.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_sel(
/*====*/
@@ -2564,7 +2564,7 @@ row_sel_store_row_id_to_prebuilt(
/**************************************************************//**
Stores a non-SQL-NULL field in the MySQL format. The counterpart of this
function is row_mysql_store_col_in_innobase_format() in row0mysql.cc. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
row_sel_field_store_in_mysql_format_func(
/*=====================================*/
@@ -2753,7 +2753,7 @@ row_sel_field_store_in_mysql_format_func(
#endif /* UNIV_DEBUG */
/**************************************************************//**
Convert a field in the Innobase format to a field in the MySQL format. */
-static __attribute__((warn_unused_result))
+static MY_ATTRIBUTE((warn_unused_result))
ibool
row_sel_store_mysql_field_func(
/*===========================*/
@@ -2906,7 +2906,7 @@ Note that the template in prebuilt may advise us to copy only a few
columns to mysql_rec, other columns are left blank. All columns may not
be needed in the query.
@return TRUE on success, FALSE if not all columns could be retrieved */
-static __attribute__((warn_unused_result))
+static MY_ATTRIBUTE((warn_unused_result))
ibool
row_sel_store_mysql_rec(
/*====================*/
@@ -2973,7 +2973,7 @@ row_sel_store_mysql_rec(
/*********************************************************************//**
Builds a previous version of a clustered index record for a consistent read
@return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_sel_build_prev_vers_for_mysql(
/*==============================*/
@@ -3010,7 +3010,7 @@ Retrieves the clustered index record corresponding to a record in a
non-clustered index. Does the necessary locking. Used in the MySQL
interface.
@return DB_SUCCESS, DB_SUCCESS_LOCKED_REC, or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_sel_get_clust_rec_for_mysql(
/*============================*/
diff --git a/storage/xtradb/row/row0uins.cc b/storage/xtradb/row/row0uins.cc
index 849bf096492..651042fb820 100644
--- a/storage/xtradb/row/row0uins.cc
+++ b/storage/xtradb/row/row0uins.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1997, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 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
@@ -61,7 +61,7 @@ introduced where a call to log_free_check() is bypassed. */
Removes a clustered index record. The pcur in node was positioned on the
record, now it is detached.
@return DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_undo_ins_remove_clust_rec(
/*==========================*/
@@ -176,7 +176,7 @@ func_exit:
/***************************************************************//**
Removes a secondary index entry if found.
@return DB_SUCCESS, DB_FAIL, or DB_OUT_OF_FILE_SPACE */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_undo_ins_remove_sec_low(
/*========================*/
@@ -251,7 +251,7 @@ func_exit_no_pcur:
Removes a secondary index entry from the index if found. Tries first
optimistic, then pessimistic descent down the tree.
@return DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_undo_ins_remove_sec(
/*====================*/
@@ -350,7 +350,7 @@ close_table:
/***************************************************************//**
Removes secondary index records.
@return DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_undo_ins_remove_sec_rec(
/*========================*/
diff --git a/storage/xtradb/row/row0umod.cc b/storage/xtradb/row/row0umod.cc
index 675d4fa3632..19576d976bd 100644
--- a/storage/xtradb/row/row0umod.cc
+++ b/storage/xtradb/row/row0umod.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1997, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 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
@@ -72,7 +72,7 @@ introduced where a call to log_free_check() is bypassed. */
/***********************************************************//**
Undoes a modify in a clustered index record.
@return DB_SUCCESS, DB_FAIL, or error code: we may run out of file space */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_undo_mod_clust_low(
/*===================*/
@@ -154,7 +154,7 @@ This is attempted when the record was inserted by updating a
delete-marked record and there no longer exist transactions
that would see the delete-marked record.
@return DB_SUCCESS, DB_FAIL, or error code: we may run out of file space */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_undo_mod_remove_clust_low(
/*==========================*/
@@ -243,7 +243,7 @@ row_undo_mod_remove_clust_low(
Undoes a modify in a clustered index record. Sets also the node state for the
next round of undo.
@return DB_SUCCESS or error code: we may run out of file space */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_undo_mod_clust(
/*===============*/
@@ -387,7 +387,7 @@ row_undo_mod_clust(
/***********************************************************//**
Delete marks or removes a secondary index entry if found.
@return DB_SUCCESS, DB_FAIL, or DB_OUT_OF_FILE_SPACE */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_undo_mod_del_mark_or_remove_sec_low(
/*====================================*/
@@ -523,7 +523,7 @@ not cause problems because in row0sel.cc, in queries we always retrieve the
clustered index record or an earlier version of it, if the secondary index
record through which we do the search is delete-marked.
@return DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_undo_mod_del_mark_or_remove_sec(
/*================================*/
@@ -556,7 +556,7 @@ fields but alphabetically they stayed the same, e.g., 'abc' -> 'aBc'.
@retval DB_OUT_OF_FILE_SPACE when running out of tablespace
@retval DB_DUPLICATE_KEY if the value was missing
and an insert would lead to a duplicate exists */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_undo_mod_del_unmark_sec_and_undo_update(
/*========================================*/
@@ -752,7 +752,7 @@ func_exit_no_pcur:
/***********************************************************//**
Flags a secondary index corrupted. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
row_undo_mod_sec_flag_corrupted(
/*============================*/
@@ -784,7 +784,7 @@ row_undo_mod_sec_flag_corrupted(
/***********************************************************//**
Undoes a modify in secondary indexes when undo record type is UPD_DEL.
@return DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_undo_mod_upd_del_sec(
/*=====================*/
@@ -851,7 +851,7 @@ row_undo_mod_upd_del_sec(
/***********************************************************//**
Undoes a modify in secondary indexes when undo record type is DEL_MARK.
@return DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_undo_mod_del_mark_sec(
/*======================*/
@@ -919,7 +919,7 @@ row_undo_mod_del_mark_sec(
/***********************************************************//**
Undoes a modify in secondary indexes when undo record type is UPD_EXIST.
@return DB_SUCCESS or DB_OUT_OF_FILE_SPACE */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_undo_mod_upd_exist_sec(
/*=======================*/
@@ -1035,7 +1035,7 @@ row_undo_mod_upd_exist_sec(
/***********************************************************//**
Parses the row reference and other info in a modify undo log record. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
row_undo_mod_parse_undo_rec(
/*========================*/
@@ -1112,7 +1112,8 @@ row_undo_mod(
dberr_t err;
ibool dict_locked;
- ut_ad(node && thr);
+ ut_ad(node != NULL);
+ ut_ad(thr != NULL);
ut_ad(node->state == UNDO_NODE_MODIFY);
dict_locked = thr_get_trx(thr)->dict_operation_lock_mode == RW_X_LATCH;
diff --git a/storage/xtradb/row/row0undo.cc b/storage/xtradb/row/row0undo.cc
index 9977a1e8f04..149dc671930 100644
--- a/storage/xtradb/row/row0undo.cc
+++ b/storage/xtradb/row/row0undo.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1997, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1997, 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
@@ -245,7 +245,7 @@ Fetches an undo log record and does the undo for the recorded operation.
If none left, or a partial rollback completed, returns control to the
parent node, which is always a query thread node.
@return DB_SUCCESS if operation successfully completed, else error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_undo(
/*=====*/
@@ -257,7 +257,8 @@ row_undo(
roll_ptr_t roll_ptr;
ibool locked_data_dict;
- ut_ad(node && thr);
+ ut_ad(node != NULL);
+ ut_ad(thr != NULL);
trx = node->trx;
diff --git a/storage/xtradb/row/row0upd.cc b/storage/xtradb/row/row0upd.cc
index ee7eec9fcb9..d1a23748aa1 100644
--- a/storage/xtradb/row/row0upd.cc
+++ b/storage/xtradb/row/row0upd.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -221,7 +221,7 @@ NOTE that this function will temporarily commit mtr and lose the
pcur position!
@return DB_SUCCESS or an error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_upd_check_references_constraints(
/*=================================*/
@@ -415,7 +415,7 @@ wsrep_row_upd_check_foreign_constraints(
dict_table_open_on_name(
foreign->referenced_table_name_lookup,
FALSE, FALSE, DICT_ERR_IGNORE_NONE);
- opened = TRUE;
+ opened = (foreign->referenced_table) ? TRUE : FALSE;
}
if (foreign->referenced_table) {
@@ -438,7 +438,7 @@ wsrep_row_upd_check_foreign_constraints(
->n_foreign_key_checks_running);
if (opened == TRUE) {
- dict_table_close(foreign->referenced_table, TRUE, FALSE);
+ dict_table_close(foreign->referenced_table, FALSE, FALSE);
opened = FALSE;
}
}
@@ -778,7 +778,7 @@ row_upd_write_sys_vals_to_log(
roll_ptr_t roll_ptr,/*!< in: roll ptr of the undo log record */
byte* log_ptr,/*!< pointer to a buffer of size > 20 opened
in mlog */
- mtr_t* mtr __attribute__((unused))) /*!< in: mtr */
+ mtr_t* mtr MY_ATTRIBUTE((unused))) /*!< in: mtr */
{
ut_ad(dict_index_is_clust(index));
ut_ad(mtr);
@@ -1813,7 +1813,7 @@ row_upd_store_row(
Updates a secondary index entry of a row.
@return DB_SUCCESS if operation successfully completed, else error
code or DB_LOCK_WAIT */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_upd_sec_index_entry(
/*====================*/
@@ -2055,7 +2055,7 @@ Updates the secondary index record if it is changed in the row update or
deletes it if this is a delete.
@return DB_SUCCESS if operation successfully completed, else error
code or DB_LOCK_WAIT */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_upd_sec_step(
/*=============*/
@@ -2088,7 +2088,7 @@ updated. We must mark them as inherited in entry, so that they are not
freed in a rollback. A limited version of this function used to be
called btr_cur_mark_dtuple_inherited_extern().
@return TRUE if any columns were inherited */
-static __attribute__((warn_unused_result))
+static MY_ATTRIBUTE((warn_unused_result))
ibool
row_upd_clust_rec_by_insert_inherit_func(
/*=====================================*/
@@ -2167,7 +2167,7 @@ fields of the clustered index record change. This should be quite rare in
database applications.
@return DB_SUCCESS if operation successfully completed, else error
code or DB_LOCK_WAIT */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_upd_clust_rec_by_insert(
/*========================*/
@@ -2329,7 +2329,7 @@ Updates a clustered index record of a row when the ordering fields do
not change.
@return DB_SUCCESS if operation successfully completed, else error
code or DB_LOCK_WAIT */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_upd_clust_rec(
/*==============*/
@@ -2491,7 +2491,7 @@ func_exit:
/***********************************************************//**
Delete marks a clustered index record.
@return DB_SUCCESS if operation successfully completed, else error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_upd_del_mark_clust_rec(
/*=======================*/
@@ -2584,7 +2584,7 @@ row_upd_del_mark_clust_rec(
Updates the clustered index record.
@return DB_SUCCESS if operation successfully completed, DB_LOCK_WAIT
in case of a lock wait, else error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_upd_clust_step(
/*===============*/
@@ -2813,7 +2813,7 @@ to this node, we assume that we have a persistent cursor which was on a
record, and the position of the cursor is stored in the cursor.
@return DB_SUCCESS if operation successfully completed, else error
code or DB_LOCK_WAIT */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
row_upd(
/*====*/
@@ -2822,7 +2822,8 @@ row_upd(
{
dberr_t err = DB_SUCCESS;
- ut_ad(node && thr);
+ ut_ad(node != NULL);
+ ut_ad(thr != NULL);
if (UNIV_LIKELY(node->in_mysql_interface)) {
diff --git a/storage/xtradb/srv/srv0srv.cc b/storage/xtradb/srv/srv0srv.cc
index 85e988e16b2..50565de69b0 100644
--- a/storage/xtradb/srv/srv0srv.cc
+++ b/storage/xtradb/srv/srv0srv.cc
@@ -578,16 +578,16 @@ UNIV_INTERN ib_uint64_t srv_index_page_decompressed = 0;
/* Ensure status variables are on separate cache lines */
-#define CACHE_ALIGNED __attribute__ ((aligned (CACHE_LINE_SIZE)))
+#define CACHE_ALIGNED MY_ATTRIBUTE((aligned (CACHE_LINE_SIZE)))
UNIV_INTERN byte
-counters_pad_start[CACHE_LINE_SIZE] __attribute__((unused)) = {0};
+counters_pad_start[CACHE_LINE_SIZE] MY_ATTRIBUTE((unused)) = {0};
UNIV_INTERN ulint srv_read_views_memory CACHE_ALIGNED = 0;
UNIV_INTERN ulint srv_descriptors_memory CACHE_ALIGNED = 0;
UNIV_INTERN byte
-counters_pad_end[CACHE_LINE_SIZE] __attribute__((unused)) = {0};
+counters_pad_end[CACHE_LINE_SIZE] MY_ATTRIBUTE((unused)) = {0};
/* Set the following to 0 if you want InnoDB to write messages on
stderr on startup/shutdown. */
@@ -2088,7 +2088,7 @@ extern "C" UNIV_INTERN
os_thread_ret_t
DECLARE_THREAD(srv_monitor_thread)(
/*===============================*/
- void* arg __attribute__((unused)))
+ void* arg MY_ATTRIBUTE((unused)))
/*!< in: a dummy parameter required by
os_thread_create */
{
@@ -2265,7 +2265,7 @@ extern "C" UNIV_INTERN
os_thread_ret_t
DECLARE_THREAD(srv_error_monitor_thread)(
/*=====================================*/
- void* arg __attribute__((unused)))
+ void* arg MY_ATTRIBUTE((unused)))
/*!< in: a dummy parameter required by
os_thread_create */
{
@@ -2518,7 +2518,7 @@ extern "C" UNIV_INTERN
os_thread_ret_t
DECLARE_THREAD(srv_redo_log_follow_thread)(
/*=======================================*/
- void* arg __attribute__((unused))) /*!< in: a dummy parameter
+ void* arg MY_ATTRIBUTE((unused))) /*!< in: a dummy parameter
required by
os_thread_create */
{
@@ -2966,7 +2966,7 @@ srv_master_do_active_tasks(void)
/* Do an ibuf merge */
srv_main_thread_op_info = "doing insert buffer merge";
counter_time = ut_time_us(NULL);
- ibuf_contract_in_background(0, FALSE);
+ ibuf_merge_in_background(false);
MONITOR_INC_TIME_IN_MICRO_SECS(
MONITOR_SRV_IBUF_MERGE_MICROSECOND, counter_time);
@@ -3061,7 +3061,7 @@ srv_master_do_idle_tasks(void)
/* Do an ibuf merge */
counter_time = ut_time_us(NULL);
srv_main_thread_op_info = "doing insert buffer merge";
- ibuf_contract_in_background(0, TRUE);
+ ibuf_merge_in_background(true);
MONITOR_INC_TIME_IN_MICRO_SECS(
MONITOR_SRV_IBUF_MERGE_MICROSECOND, counter_time);
@@ -3149,7 +3149,7 @@ srv_master_do_shutdown_tasks(
/* Do an ibuf merge */
srv_main_thread_op_info = "doing insert buffer merge";
- n_bytes_merged = ibuf_contract_in_background(0, TRUE);
+ n_bytes_merged = ibuf_merge_in_background(true);
/* Flush logs if needed */
srv_sync_log_buffer_in_background();
@@ -3189,7 +3189,7 @@ extern "C" UNIV_INTERN
os_thread_ret_t
DECLARE_THREAD(srv_master_thread)(
/*==============================*/
- void* arg __attribute__((unused)))
+ void* arg MY_ATTRIBUTE((unused)))
/*!< in: a dummy parameter required by
os_thread_create */
{
@@ -3349,7 +3349,7 @@ extern "C" UNIV_INTERN
os_thread_ret_t
DECLARE_THREAD(srv_worker_thread)(
/*==============================*/
- void* arg __attribute__((unused))) /*!< in: a dummy parameter
+ void* arg MY_ATTRIBUTE((unused))) /*!< in: a dummy parameter
required by os_thread_create */
{
srv_slot_t* slot;
@@ -3617,7 +3617,7 @@ extern "C" UNIV_INTERN
os_thread_ret_t
DECLARE_THREAD(srv_purge_coordinator_thread)(
/*=========================================*/
- void* arg __attribute__((unused))) /*!< in: a dummy parameter
+ void* arg MY_ATTRIBUTE((unused))) /*!< in: a dummy parameter
required by os_thread_create */
{
srv_slot_t* slot;
diff --git a/storage/xtradb/srv/srv0start.cc b/storage/xtradb/srv/srv0start.cc
index 6a3e756cb44..87ceeaf65c3 100644
--- a/storage/xtradb/srv/srv0start.cc
+++ b/storage/xtradb/srv/srv0start.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
+Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2008, Google Inc.
Copyright (c) 2009, Percona Inc.
Copyright (c) 2013, 2015, MariaDB Corporation
@@ -562,7 +562,7 @@ UNIV_INTERN
void
srv_normalize_path_for_win(
/*=======================*/
- char* str __attribute__((unused))) /*!< in/out: null-terminated
+ char* str MY_ATTRIBUTE((unused))) /*!< in/out: null-terminated
character string */
{
#ifdef __WIN__
@@ -579,7 +579,7 @@ srv_normalize_path_for_win(
/*********************************************************************//**
Creates a log file.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
create_log_file(
/*============*/
@@ -797,7 +797,7 @@ create_log_files_rename(
/*********************************************************************//**
Opens a log file.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
open_log_file(
/*==========*/
@@ -825,7 +825,7 @@ open_log_file(
/*********************************************************************//**
Creates or opens database data files and closes them.
@return DB_SUCCESS or error code */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
open_or_create_data_files(
/*======================*/
diff --git a/storage/xtradb/sync/sync0sync.cc b/storage/xtradb/sync/sync0sync.cc
index c699fbf2ded..7458a052224 100644
--- a/storage/xtradb/sync/sync0sync.cc
+++ b/storage/xtradb/sync/sync0sync.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
Portions of this file contain modifications contributed and copyrighted by
@@ -435,10 +435,10 @@ ulint
mutex_enter_nowait_func(
/*====================*/
ib_mutex_t* mutex, /*!< in: pointer to mutex */
- const char* file_name __attribute__((unused)),
+ const char* file_name MY_ATTRIBUTE((unused)),
/*!< in: file name where mutex
requested */
- ulint line __attribute__((unused)))
+ ulint line MY_ATTRIBUTE((unused)))
/*!< in: line where requested */
{
ut_ad(mutex_validate(mutex));
diff --git a/storage/xtradb/trx/trx0purge.cc b/storage/xtradb/trx/trx0purge.cc
index 9d9fe73de6e..d9e40c5d6f5 100644
--- a/storage/xtradb/trx/trx0purge.cc
+++ b/storage/xtradb/trx/trx0purge.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -917,7 +917,7 @@ Fetches the next undo log record from the history list to purge. It must be
released with the corresponding release function.
@return copy of an undo log record or pointer to trx_purge_dummy_rec,
if the whole undo log can skipped in purge; NULL if none left */
-static __attribute__((warn_unused_result, nonnull))
+static MY_ATTRIBUTE((warn_unused_result, nonnull))
trx_undo_rec_t*
trx_purge_fetch_next_rec(
/*=====================*/
diff --git a/storage/xtradb/trx/trx0rec.cc b/storage/xtradb/trx/trx0rec.cc
index fa3fe0904b8..74a63b60286 100644
--- a/storage/xtradb/trx/trx0rec.cc
+++ b/storage/xtradb/trx/trx0rec.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2012, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -1133,7 +1133,7 @@ trx_undo_rec_get_partial_row(
/***********************************************************************//**
Erases the unused undo log page end.
@return TRUE if the page contained something, FALSE if it was empty */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
ibool
trx_undo_erase_page_end(
/*====================*/
@@ -1159,7 +1159,7 @@ byte*
trx_undo_parse_erase_page_end(
/*==========================*/
byte* ptr, /*!< in: buffer */
- byte* end_ptr __attribute__((unused)), /*!< in: buffer end */
+ byte* end_ptr MY_ATTRIBUTE((unused)), /*!< in: buffer end */
page_t* page, /*!< in: page or NULL */
mtr_t* mtr) /*!< in: mtr or NULL */
{
@@ -1442,7 +1442,7 @@ NOTE: the caller must have latches on the clustered index page.
@retval true if the undo log has been
truncated and we cannot fetch the old version
@retval false if the undo log record is available */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
bool
trx_undo_get_undo_rec(
/*==================*/
@@ -1470,7 +1470,7 @@ trx_undo_get_undo_rec(
#ifdef UNIV_DEBUG
#define ATTRIB_USED_ONLY_IN_DEBUG
#else /* UNIV_DEBUG */
-#define ATTRIB_USED_ONLY_IN_DEBUG __attribute__((unused))
+#define ATTRIB_USED_ONLY_IN_DEBUG MY_ATTRIBUTE((unused))
#endif /* UNIV_DEBUG */
/*******************************************************************//**
diff --git a/storage/xtradb/trx/trx0roll.cc b/storage/xtradb/trx/trx0roll.cc
index 4e8547c7d64..4618cf653f0 100644
--- a/storage/xtradb/trx/trx0roll.cc
+++ b/storage/xtradb/trx/trx0roll.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -341,7 +341,7 @@ the row, these locks are naturally released in the rollback. Savepoints which
were set after this savepoint are deleted.
@return if no savepoint of the name found then DB_NO_SAVEPOINT,
otherwise DB_SUCCESS */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
trx_rollback_to_savepoint_for_mysql_low(
/*====================================*/
@@ -808,7 +808,7 @@ extern "C" UNIV_INTERN
os_thread_ret_t
DECLARE_THREAD(trx_rollback_or_clean_all_recovered)(
/*================================================*/
- void* arg __attribute__((unused)))
+ void* arg MY_ATTRIBUTE((unused)))
/*!< in: a dummy parameter required by
os_thread_create */
{
diff --git a/storage/xtradb/trx/trx0trx.cc b/storage/xtradb/trx/trx0trx.cc
index a3342ee36df..41f8c166190 100644
--- a/storage/xtradb/trx/trx0trx.cc
+++ b/storage/xtradb/trx/trx0trx.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -1179,7 +1179,7 @@ trx_serialisation_number_get(
/****************************************************************//**
Assign the transaction its history serialisation number and write the
update UNDO log record to the assigned rollback segment. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
trx_write_serialisation_history(
/*============================*/
@@ -1266,7 +1266,7 @@ trx_write_serialisation_history(
/********************************************************************
Finalize a transaction containing updates for a FTS table. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
trx_finalize_for_fts_table(
/*=======================*/
@@ -1299,7 +1299,7 @@ trx_finalize_for_fts_table(
/******************************************************************//**
Finalize a transaction containing updates to FTS tables. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
trx_finalize_for_fts(
/*=================*/
@@ -1374,7 +1374,7 @@ trx_flush_log_if_needed_low(
/**********************************************************************//**
If required, flushes the log to disk based on the value of
innodb_flush_log_at_trx_commit. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
trx_flush_log_if_needed(
/*====================*/
@@ -1389,7 +1389,7 @@ trx_flush_log_if_needed(
/****************************************************************//**
Commits a transaction in memory. */
-static __attribute__((nonnull))
+static MY_ATTRIBUTE((nonnull))
void
trx_commit_in_memory(
/*=================*/
@@ -2441,7 +2441,7 @@ which is in the prepared state
@return trx on match, the trx->xid will be invalidated;
note that the trx may have been committed, unless the caller is
holding lock_sys->mutex */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
trx_t*
trx_get_trx_by_xid_low(
/*===================*/
diff --git a/storage/xtradb/trx/trx0undo.cc b/storage/xtradb/trx/trx0undo.cc
index edb85a89c17..cdd23726f2e 100644
--- a/storage/xtradb/trx/trx0undo.cc
+++ b/storage/xtradb/trx/trx0undo.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
-Copyright (c) 1996, 2013, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1996, 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
@@ -419,11 +419,11 @@ trx_undo_page_init(
Creates a new undo log segment in file.
@return DB_SUCCESS if page creation OK possible error codes are:
DB_TOO_MANY_CONCURRENT_TRXS DB_OUT_OF_FILE_SPACE */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
trx_undo_seg_create(
/*================*/
- trx_rseg_t* rseg __attribute__((unused)),/*!< in: rollback segment */
+ trx_rseg_t* rseg MY_ATTRIBUTE((unused)),/*!< in: rollback segment */
trx_rsegf_t* rseg_hdr,/*!< in: rollback segment header, page
x-latched */
ulint type, /*!< in: type of the segment: TRX_UNDO_INSERT or
@@ -443,7 +443,9 @@ trx_undo_seg_create(
ibool success;
dberr_t err = DB_SUCCESS;
- ut_ad(mtr && id && rseg_hdr);
+ ut_ad(mtr != NULL);
+ ut_ad(id != NULL);
+ ut_ad(rseg_hdr != NULL);
ut_ad(mutex_own(&(rseg->mutex)));
/* fputs(type == TRX_UNDO_INSERT
@@ -827,7 +829,7 @@ byte*
trx_undo_parse_discard_latest(
/*==========================*/
byte* ptr, /*!< in: buffer */
- byte* end_ptr __attribute__((unused)), /*!< in: buffer end */
+ byte* end_ptr MY_ATTRIBUTE((unused)), /*!< in: buffer end */
page_t* page, /*!< in: page or NULL */
mtr_t* mtr) /*!< in: mtr or NULL */
{
@@ -1555,7 +1557,7 @@ Creates a new undo log.
@return DB_SUCCESS if successful in creating the new undo lob object,
possible error codes are: DB_TOO_MANY_CONCURRENT_TRXS
DB_OUT_OF_FILE_SPACE DB_OUT_OF_MEMORY */
-static __attribute__((nonnull, warn_unused_result))
+static MY_ATTRIBUTE((nonnull, warn_unused_result))
dberr_t
trx_undo_create(
/*============*/
diff --git a/storage/xtradb/ut/crc32_power8/crc32_constants.h b/storage/xtradb/ut/crc32_power8/crc32_constants.h
deleted file mode 100644
index ba2592b829c..00000000000
--- a/storage/xtradb/ut/crc32_power8/crc32_constants.h
+++ /dev/null
@@ -1,911 +0,0 @@
-#ifndef CRC32_CONSTANTS_H
-#define CRC32_CONSTANTS_H
-
-#ifdef __powerpc__
-
-
-#define CRC 0x1edc6f41
-#define CRC_XOR
-#define REFLECT
-
-#ifndef __ASSEMBLY__
-#ifdef CRC_TABLE
-static const unsigned int crc_table[] = {
- 0x00000000, 0xf26b8303, 0xe13b70f7, 0x1350f3f4,
- 0xc79a971f, 0x35f1141c, 0x26a1e7e8, 0xd4ca64eb,
- 0x8ad958cf, 0x78b2dbcc, 0x6be22838, 0x9989ab3b,
- 0x4d43cfd0, 0xbf284cd3, 0xac78bf27, 0x5e133c24,
- 0x105ec76f, 0xe235446c, 0xf165b798, 0x030e349b,
- 0xd7c45070, 0x25afd373, 0x36ff2087, 0xc494a384,
- 0x9a879fa0, 0x68ec1ca3, 0x7bbcef57, 0x89d76c54,
- 0x5d1d08bf, 0xaf768bbc, 0xbc267848, 0x4e4dfb4b,
- 0x20bd8ede, 0xd2d60ddd, 0xc186fe29, 0x33ed7d2a,
- 0xe72719c1, 0x154c9ac2, 0x061c6936, 0xf477ea35,
- 0xaa64d611, 0x580f5512, 0x4b5fa6e6, 0xb93425e5,
- 0x6dfe410e, 0x9f95c20d, 0x8cc531f9, 0x7eaeb2fa,
- 0x30e349b1, 0xc288cab2, 0xd1d83946, 0x23b3ba45,
- 0xf779deae, 0x05125dad, 0x1642ae59, 0xe4292d5a,
- 0xba3a117e, 0x4851927d, 0x5b016189, 0xa96ae28a,
- 0x7da08661, 0x8fcb0562, 0x9c9bf696, 0x6ef07595,
- 0x417b1dbc, 0xb3109ebf, 0xa0406d4b, 0x522bee48,
- 0x86e18aa3, 0x748a09a0, 0x67dafa54, 0x95b17957,
- 0xcba24573, 0x39c9c670, 0x2a993584, 0xd8f2b687,
- 0x0c38d26c, 0xfe53516f, 0xed03a29b, 0x1f682198,
- 0x5125dad3, 0xa34e59d0, 0xb01eaa24, 0x42752927,
- 0x96bf4dcc, 0x64d4cecf, 0x77843d3b, 0x85efbe38,
- 0xdbfc821c, 0x2997011f, 0x3ac7f2eb, 0xc8ac71e8,
- 0x1c661503, 0xee0d9600, 0xfd5d65f4, 0x0f36e6f7,
- 0x61c69362, 0x93ad1061, 0x80fde395, 0x72966096,
- 0xa65c047d, 0x5437877e, 0x4767748a, 0xb50cf789,
- 0xeb1fcbad, 0x197448ae, 0x0a24bb5a, 0xf84f3859,
- 0x2c855cb2, 0xdeeedfb1, 0xcdbe2c45, 0x3fd5af46,
- 0x7198540d, 0x83f3d70e, 0x90a324fa, 0x62c8a7f9,
- 0xb602c312, 0x44694011, 0x5739b3e5, 0xa55230e6,
- 0xfb410cc2, 0x092a8fc1, 0x1a7a7c35, 0xe811ff36,
- 0x3cdb9bdd, 0xceb018de, 0xdde0eb2a, 0x2f8b6829,
- 0x82f63b78, 0x709db87b, 0x63cd4b8f, 0x91a6c88c,
- 0x456cac67, 0xb7072f64, 0xa457dc90, 0x563c5f93,
- 0x082f63b7, 0xfa44e0b4, 0xe9141340, 0x1b7f9043,
- 0xcfb5f4a8, 0x3dde77ab, 0x2e8e845f, 0xdce5075c,
- 0x92a8fc17, 0x60c37f14, 0x73938ce0, 0x81f80fe3,
- 0x55326b08, 0xa759e80b, 0xb4091bff, 0x466298fc,
- 0x1871a4d8, 0xea1a27db, 0xf94ad42f, 0x0b21572c,
- 0xdfeb33c7, 0x2d80b0c4, 0x3ed04330, 0xccbbc033,
- 0xa24bb5a6, 0x502036a5, 0x4370c551, 0xb11b4652,
- 0x65d122b9, 0x97baa1ba, 0x84ea524e, 0x7681d14d,
- 0x2892ed69, 0xdaf96e6a, 0xc9a99d9e, 0x3bc21e9d,
- 0xef087a76, 0x1d63f975, 0x0e330a81, 0xfc588982,
- 0xb21572c9, 0x407ef1ca, 0x532e023e, 0xa145813d,
- 0x758fe5d6, 0x87e466d5, 0x94b49521, 0x66df1622,
- 0x38cc2a06, 0xcaa7a905, 0xd9f75af1, 0x2b9cd9f2,
- 0xff56bd19, 0x0d3d3e1a, 0x1e6dcdee, 0xec064eed,
- 0xc38d26c4, 0x31e6a5c7, 0x22b65633, 0xd0ddd530,
- 0x0417b1db, 0xf67c32d8, 0xe52cc12c, 0x1747422f,
- 0x49547e0b, 0xbb3ffd08, 0xa86f0efc, 0x5a048dff,
- 0x8ecee914, 0x7ca56a17, 0x6ff599e3, 0x9d9e1ae0,
- 0xd3d3e1ab, 0x21b862a8, 0x32e8915c, 0xc083125f,
- 0x144976b4, 0xe622f5b7, 0xf5720643, 0x07198540,
- 0x590ab964, 0xab613a67, 0xb831c993, 0x4a5a4a90,
- 0x9e902e7b, 0x6cfbad78, 0x7fab5e8c, 0x8dc0dd8f,
- 0xe330a81a, 0x115b2b19, 0x020bd8ed, 0xf0605bee,
- 0x24aa3f05, 0xd6c1bc06, 0xc5914ff2, 0x37faccf1,
- 0x69e9f0d5, 0x9b8273d6, 0x88d28022, 0x7ab90321,
- 0xae7367ca, 0x5c18e4c9, 0x4f48173d, 0xbd23943e,
- 0xf36e6f75, 0x0105ec76, 0x12551f82, 0xe03e9c81,
- 0x34f4f86a, 0xc69f7b69, 0xd5cf889d, 0x27a40b9e,
- 0x79b737ba, 0x8bdcb4b9, 0x988c474d, 0x6ae7c44e,
- 0xbe2da0a5, 0x4c4623a6, 0x5f16d052, 0xad7d5351,};
-
-#endif
-#else
-#define MAX_SIZE 32768
-.constants:
-
- /* Reduce 262144 kbits to 1024 bits */
- /* x^261120 mod p(x)` << 1, x^261184 mod p(x)` << 1 */
- .octa 0x00000000b6ca9e20000000009c37c408
-
- /* x^260096 mod p(x)` << 1, x^260160 mod p(x)` << 1 */
- .octa 0x00000000350249a800000001b51df26c
-
- /* x^259072 mod p(x)` << 1, x^259136 mod p(x)` << 1 */
- .octa 0x00000001862dac54000000000724b9d0
-
- /* x^258048 mod p(x)` << 1, x^258112 mod p(x)` << 1 */
- .octa 0x00000001d87fb48c00000001c00532fe
-
- /* x^257024 mod p(x)` << 1, x^257088 mod p(x)` << 1 */
- .octa 0x00000001f39b699e00000000f05a9362
-
- /* x^256000 mod p(x)` << 1, x^256064 mod p(x)` << 1 */
- .octa 0x0000000101da11b400000001e1007970
-
- /* x^254976 mod p(x)` << 1, x^255040 mod p(x)` << 1 */
- .octa 0x00000001cab571e000000000a57366ee
-
- /* x^253952 mod p(x)` << 1, x^254016 mod p(x)` << 1 */
- .octa 0x00000000c7020cfe0000000192011284
-
- /* x^252928 mod p(x)` << 1, x^252992 mod p(x)` << 1 */
- .octa 0x00000000cdaed1ae0000000162716d9a
-
- /* x^251904 mod p(x)` << 1, x^251968 mod p(x)` << 1 */
- .octa 0x00000001e804effc00000000cd97ecde
-
- /* x^250880 mod p(x)` << 1, x^250944 mod p(x)` << 1 */
- .octa 0x0000000077c3ea3a0000000058812bc0
-
- /* x^249856 mod p(x)` << 1, x^249920 mod p(x)` << 1 */
- .octa 0x0000000068df31b40000000088b8c12e
-
- /* x^248832 mod p(x)` << 1, x^248896 mod p(x)` << 1 */
- .octa 0x00000000b059b6c200000001230b234c
-
- /* x^247808 mod p(x)` << 1, x^247872 mod p(x)` << 1 */
- .octa 0x0000000145fb8ed800000001120b416e
-
- /* x^246784 mod p(x)` << 1, x^246848 mod p(x)` << 1 */
- .octa 0x00000000cbc0916800000001974aecb0
-
- /* x^245760 mod p(x)` << 1, x^245824 mod p(x)` << 1 */
- .octa 0x000000005ceeedc2000000008ee3f226
-
- /* x^244736 mod p(x)` << 1, x^244800 mod p(x)` << 1 */
- .octa 0x0000000047d74e8600000001089aba9a
-
- /* x^243712 mod p(x)` << 1, x^243776 mod p(x)` << 1 */
- .octa 0x00000001407e9e220000000065113872
-
- /* x^242688 mod p(x)` << 1, x^242752 mod p(x)` << 1 */
- .octa 0x00000001da967bda000000005c07ec10
-
- /* x^241664 mod p(x)` << 1, x^241728 mod p(x)` << 1 */
- .octa 0x000000006c8983680000000187590924
-
- /* x^240640 mod p(x)` << 1, x^240704 mod p(x)` << 1 */
- .octa 0x00000000f2d14c9800000000e35da7c6
-
- /* x^239616 mod p(x)` << 1, x^239680 mod p(x)` << 1 */
- .octa 0x00000001993c6ad4000000000415855a
-
- /* x^238592 mod p(x)` << 1, x^238656 mod p(x)` << 1 */
- .octa 0x000000014683d1ac0000000073617758
-
- /* x^237568 mod p(x)` << 1, x^237632 mod p(x)` << 1 */
- .octa 0x00000001a7c93e6c0000000176021d28
-
- /* x^236544 mod p(x)` << 1, x^236608 mod p(x)` << 1 */
- .octa 0x000000010211e90a00000001c358fd0a
-
- /* x^235520 mod p(x)` << 1, x^235584 mod p(x)` << 1 */
- .octa 0x000000001119403e00000001ff7a2c18
-
- /* x^234496 mod p(x)` << 1, x^234560 mod p(x)` << 1 */
- .octa 0x000000001c3261aa00000000f2d9f7e4
-
- /* x^233472 mod p(x)` << 1, x^233536 mod p(x)` << 1 */
- .octa 0x000000014e37a634000000016cf1f9c8
-
- /* x^232448 mod p(x)` << 1, x^232512 mod p(x)` << 1 */
- .octa 0x0000000073786c0c000000010af9279a
-
- /* x^231424 mod p(x)` << 1, x^231488 mod p(x)` << 1 */
- .octa 0x000000011dc037f80000000004f101e8
-
- /* x^230400 mod p(x)` << 1, x^230464 mod p(x)` << 1 */
- .octa 0x0000000031433dfc0000000070bcf184
-
- /* x^229376 mod p(x)` << 1, x^229440 mod p(x)` << 1 */
- .octa 0x000000009cde8348000000000a8de642
-
- /* x^228352 mod p(x)` << 1, x^228416 mod p(x)` << 1 */
- .octa 0x0000000038d3c2a60000000062ea130c
-
- /* x^227328 mod p(x)` << 1, x^227392 mod p(x)` << 1 */
- .octa 0x000000011b25f26000000001eb31cbb2
-
- /* x^226304 mod p(x)` << 1, x^226368 mod p(x)` << 1 */
- .octa 0x000000001629e6f00000000170783448
-
- /* x^225280 mod p(x)` << 1, x^225344 mod p(x)` << 1 */
- .octa 0x0000000160838b4c00000001a684b4c6
-
- /* x^224256 mod p(x)` << 1, x^224320 mod p(x)` << 1 */
- .octa 0x000000007a44011c00000000253ca5b4
-
- /* x^223232 mod p(x)` << 1, x^223296 mod p(x)` << 1 */
- .octa 0x00000000226f417a0000000057b4b1e2
-
- /* x^222208 mod p(x)` << 1, x^222272 mod p(x)` << 1 */
- .octa 0x0000000045eb2eb400000000b6bd084c
-
- /* x^221184 mod p(x)` << 1, x^221248 mod p(x)` << 1 */
- .octa 0x000000014459d70c0000000123c2d592
-
- /* x^220160 mod p(x)` << 1, x^220224 mod p(x)` << 1 */
- .octa 0x00000001d406ed8200000000159dafce
-
- /* x^219136 mod p(x)` << 1, x^219200 mod p(x)` << 1 */
- .octa 0x0000000160c8e1a80000000127e1a64e
-
- /* x^218112 mod p(x)` << 1, x^218176 mod p(x)` << 1 */
- .octa 0x0000000027ba80980000000056860754
-
- /* x^217088 mod p(x)` << 1, x^217152 mod p(x)` << 1 */
- .octa 0x000000006d92d01800000001e661aae8
-
- /* x^216064 mod p(x)` << 1, x^216128 mod p(x)` << 1 */
- .octa 0x000000012ed7e3f200000000f82c6166
-
- /* x^215040 mod p(x)` << 1, x^215104 mod p(x)` << 1 */
- .octa 0x000000002dc8778800000000c4f9c7ae
-
- /* x^214016 mod p(x)` << 1, x^214080 mod p(x)` << 1 */
- .octa 0x0000000018240bb80000000074203d20
-
- /* x^212992 mod p(x)` << 1, x^213056 mod p(x)` << 1 */
- .octa 0x000000001ad381580000000198173052
-
- /* x^211968 mod p(x)` << 1, x^212032 mod p(x)` << 1 */
- .octa 0x00000001396b78f200000001ce8aba54
-
- /* x^210944 mod p(x)` << 1, x^211008 mod p(x)` << 1 */
- .octa 0x000000011a68133400000001850d5d94
-
- /* x^209920 mod p(x)` << 1, x^209984 mod p(x)` << 1 */
- .octa 0x000000012104732e00000001d609239c
-
- /* x^208896 mod p(x)` << 1, x^208960 mod p(x)` << 1 */
- .octa 0x00000000a140d90c000000001595f048
-
- /* x^207872 mod p(x)` << 1, x^207936 mod p(x)` << 1 */
- .octa 0x00000001b7215eda0000000042ccee08
-
- /* x^206848 mod p(x)` << 1, x^206912 mod p(x)` << 1 */
- .octa 0x00000001aaf1df3c000000010a389d74
-
- /* x^205824 mod p(x)` << 1, x^205888 mod p(x)` << 1 */
- .octa 0x0000000029d15b8a000000012a840da6
-
- /* x^204800 mod p(x)` << 1, x^204864 mod p(x)` << 1 */
- .octa 0x00000000f1a96922000000001d181c0c
-
- /* x^203776 mod p(x)` << 1, x^203840 mod p(x)` << 1 */
- .octa 0x00000001ac80d03c0000000068b7d1f6
-
- /* x^202752 mod p(x)` << 1, x^202816 mod p(x)` << 1 */
- .octa 0x000000000f11d56a000000005b0f14fc
-
- /* x^201728 mod p(x)` << 1, x^201792 mod p(x)` << 1 */
- .octa 0x00000001f1c022a20000000179e9e730
-
- /* x^200704 mod p(x)` << 1, x^200768 mod p(x)` << 1 */
- .octa 0x0000000173d00ae200000001ce1368d6
-
- /* x^199680 mod p(x)` << 1, x^199744 mod p(x)` << 1 */
- .octa 0x00000001d4ffe4ac0000000112c3a84c
-
- /* x^198656 mod p(x)` << 1, x^198720 mod p(x)` << 1 */
- .octa 0x000000016edc5ae400000000de940fee
-
- /* x^197632 mod p(x)` << 1, x^197696 mod p(x)` << 1 */
- .octa 0x00000001f1a0214000000000fe896b7e
-
- /* x^196608 mod p(x)` << 1, x^196672 mod p(x)` << 1 */
- .octa 0x00000000ca0b28a000000001f797431c
-
- /* x^195584 mod p(x)` << 1, x^195648 mod p(x)` << 1 */
- .octa 0x00000001928e30a20000000053e989ba
-
- /* x^194560 mod p(x)` << 1, x^194624 mod p(x)` << 1 */
- .octa 0x0000000097b1b002000000003920cd16
-
- /* x^193536 mod p(x)` << 1, x^193600 mod p(x)` << 1 */
- .octa 0x00000000b15bf90600000001e6f579b8
-
- /* x^192512 mod p(x)` << 1, x^192576 mod p(x)` << 1 */
- .octa 0x00000000411c5d52000000007493cb0a
-
- /* x^191488 mod p(x)` << 1, x^191552 mod p(x)` << 1 */
- .octa 0x00000001c36f330000000001bdd376d8
-
- /* x^190464 mod p(x)` << 1, x^190528 mod p(x)` << 1 */
- .octa 0x00000001119227e0000000016badfee6
-
- /* x^189440 mod p(x)` << 1, x^189504 mod p(x)` << 1 */
- .octa 0x00000000114d47020000000071de5c58
-
- /* x^188416 mod p(x)` << 1, x^188480 mod p(x)` << 1 */
- .octa 0x00000000458b5b9800000000453f317c
-
- /* x^187392 mod p(x)` << 1, x^187456 mod p(x)` << 1 */
- .octa 0x000000012e31fb8e0000000121675cce
-
- /* x^186368 mod p(x)` << 1, x^186432 mod p(x)` << 1 */
- .octa 0x000000005cf619d800000001f409ee92
-
- /* x^185344 mod p(x)` << 1, x^185408 mod p(x)` << 1 */
- .octa 0x0000000063f4d8b200000000f36b9c88
-
- /* x^184320 mod p(x)` << 1, x^184384 mod p(x)` << 1 */
- .octa 0x000000004138dc8a0000000036b398f4
-
- /* x^183296 mod p(x)` << 1, x^183360 mod p(x)` << 1 */
- .octa 0x00000001d29ee8e000000001748f9adc
-
- /* x^182272 mod p(x)` << 1, x^182336 mod p(x)` << 1 */
- .octa 0x000000006a08ace800000001be94ec00
-
- /* x^181248 mod p(x)` << 1, x^181312 mod p(x)` << 1 */
- .octa 0x0000000127d4201000000000b74370d6
-
- /* x^180224 mod p(x)` << 1, x^180288 mod p(x)` << 1 */
- .octa 0x0000000019d76b6200000001174d0b98
-
- /* x^179200 mod p(x)` << 1, x^179264 mod p(x)` << 1 */
- .octa 0x00000001b1471f6e00000000befc06a4
-
- /* x^178176 mod p(x)` << 1, x^178240 mod p(x)` << 1 */
- .octa 0x00000001f64c19cc00000001ae125288
-
- /* x^177152 mod p(x)` << 1, x^177216 mod p(x)` << 1 */
- .octa 0x00000000003c0ea00000000095c19b34
-
- /* x^176128 mod p(x)` << 1, x^176192 mod p(x)` << 1 */
- .octa 0x000000014d73abf600000001a78496f2
-
- /* x^175104 mod p(x)` << 1, x^175168 mod p(x)` << 1 */
- .octa 0x00000001620eb84400000001ac5390a0
-
- /* x^174080 mod p(x)` << 1, x^174144 mod p(x)` << 1 */
- .octa 0x0000000147655048000000002a80ed6e
-
- /* x^173056 mod p(x)` << 1, x^173120 mod p(x)` << 1 */
- .octa 0x0000000067b5077e00000001fa9b0128
-
- /* x^172032 mod p(x)` << 1, x^172096 mod p(x)` << 1 */
- .octa 0x0000000010ffe20600000001ea94929e
-
- /* x^171008 mod p(x)` << 1, x^171072 mod p(x)` << 1 */
- .octa 0x000000000fee8f1e0000000125f4305c
-
- /* x^169984 mod p(x)` << 1, x^170048 mod p(x)` << 1 */
- .octa 0x00000001da26fbae00000001471e2002
-
- /* x^168960 mod p(x)` << 1, x^169024 mod p(x)` << 1 */
- .octa 0x00000001b3a8bd880000000132d2253a
-
- /* x^167936 mod p(x)` << 1, x^168000 mod p(x)` << 1 */
- .octa 0x00000000e8f3898e00000000f26b3592
-
- /* x^166912 mod p(x)` << 1, x^166976 mod p(x)` << 1 */
- .octa 0x00000000b0d0d28c00000000bc8b67b0
-
- /* x^165888 mod p(x)` << 1, x^165952 mod p(x)` << 1 */
- .octa 0x0000000030f2a798000000013a826ef2
-
- /* x^164864 mod p(x)` << 1, x^164928 mod p(x)` << 1 */
- .octa 0x000000000fba10020000000081482c84
-
- /* x^163840 mod p(x)` << 1, x^163904 mod p(x)` << 1 */
- .octa 0x00000000bdb9bd7200000000e77307c2
-
- /* x^162816 mod p(x)` << 1, x^162880 mod p(x)` << 1 */
- .octa 0x0000000075d3bf5a00000000d4a07ec8
-
- /* x^161792 mod p(x)` << 1, x^161856 mod p(x)` << 1 */
- .octa 0x00000000ef1f98a00000000017102100
-
- /* x^160768 mod p(x)` << 1, x^160832 mod p(x)` << 1 */
- .octa 0x00000000689c760200000000db406486
-
- /* x^159744 mod p(x)` << 1, x^159808 mod p(x)` << 1 */
- .octa 0x000000016d5fa5fe0000000192db7f88
-
- /* x^158720 mod p(x)` << 1, x^158784 mod p(x)` << 1 */
- .octa 0x00000001d0d2b9ca000000018bf67b1e
-
- /* x^157696 mod p(x)` << 1, x^157760 mod p(x)` << 1 */
- .octa 0x0000000041e7b470000000007c09163e
-
- /* x^156672 mod p(x)` << 1, x^156736 mod p(x)` << 1 */
- .octa 0x00000001cbb6495e000000000adac060
-
- /* x^155648 mod p(x)` << 1, x^155712 mod p(x)` << 1 */
- .octa 0x000000010052a0b000000000bd8316ae
-
- /* x^154624 mod p(x)` << 1, x^154688 mod p(x)` << 1 */
- .octa 0x00000001d8effb5c000000019f09ab54
-
- /* x^153600 mod p(x)` << 1, x^153664 mod p(x)` << 1 */
- .octa 0x00000001d969853c0000000125155542
-
- /* x^152576 mod p(x)` << 1, x^152640 mod p(x)` << 1 */
- .octa 0x00000000523ccce2000000018fdb5882
-
- /* x^151552 mod p(x)` << 1, x^151616 mod p(x)` << 1 */
- .octa 0x000000001e2436bc00000000e794b3f4
-
- /* x^150528 mod p(x)` << 1, x^150592 mod p(x)` << 1 */
- .octa 0x00000000ddd1c3a2000000016f9bb022
-
- /* x^149504 mod p(x)` << 1, x^149568 mod p(x)` << 1 */
- .octa 0x0000000019fcfe3800000000290c9978
-
- /* x^148480 mod p(x)` << 1, x^148544 mod p(x)` << 1 */
- .octa 0x00000001ce95db640000000083c0f350
-
- /* x^147456 mod p(x)` << 1, x^147520 mod p(x)` << 1 */
- .octa 0x00000000af5828060000000173ea6628
-
- /* x^146432 mod p(x)` << 1, x^146496 mod p(x)` << 1 */
- .octa 0x00000001006388f600000001c8b4e00a
-
- /* x^145408 mod p(x)` << 1, x^145472 mod p(x)` << 1 */
- .octa 0x0000000179eca00a00000000de95d6aa
-
- /* x^144384 mod p(x)` << 1, x^144448 mod p(x)` << 1 */
- .octa 0x0000000122410a6a000000010b7f7248
-
- /* x^143360 mod p(x)` << 1, x^143424 mod p(x)` << 1 */
- .octa 0x000000004288e87c00000001326e3a06
-
- /* x^142336 mod p(x)` << 1, x^142400 mod p(x)` << 1 */
- .octa 0x000000016c5490da00000000bb62c2e6
-
- /* x^141312 mod p(x)` << 1, x^141376 mod p(x)` << 1 */
- .octa 0x00000000d1c71f6e0000000156a4b2c2
-
- /* x^140288 mod p(x)` << 1, x^140352 mod p(x)` << 1 */
- .octa 0x00000001b4ce08a6000000011dfe763a
-
- /* x^139264 mod p(x)` << 1, x^139328 mod p(x)` << 1 */
- .octa 0x00000001466ba60c000000007bcca8e2
-
- /* x^138240 mod p(x)` << 1, x^138304 mod p(x)` << 1 */
- .octa 0x00000001f6c488a40000000186118faa
-
- /* x^137216 mod p(x)` << 1, x^137280 mod p(x)` << 1 */
- .octa 0x000000013bfb06820000000111a65a88
-
- /* x^136192 mod p(x)` << 1, x^136256 mod p(x)` << 1 */
- .octa 0x00000000690e9e54000000003565e1c4
-
- /* x^135168 mod p(x)` << 1, x^135232 mod p(x)` << 1 */
- .octa 0x00000000281346b6000000012ed02a82
-
- /* x^134144 mod p(x)` << 1, x^134208 mod p(x)` << 1 */
- .octa 0x000000015646402400000000c486ecfc
-
- /* x^133120 mod p(x)` << 1, x^133184 mod p(x)` << 1 */
- .octa 0x000000016063a8dc0000000001b951b2
-
- /* x^132096 mod p(x)` << 1, x^132160 mod p(x)` << 1 */
- .octa 0x0000000116a663620000000048143916
-
- /* x^131072 mod p(x)` << 1, x^131136 mod p(x)` << 1 */
- .octa 0x000000017e8aa4d200000001dc2ae124
-
- /* x^130048 mod p(x)` << 1, x^130112 mod p(x)` << 1 */
- .octa 0x00000001728eb10c00000001416c58d6
-
- /* x^129024 mod p(x)` << 1, x^129088 mod p(x)` << 1 */
- .octa 0x00000001b08fd7fa00000000a479744a
-
- /* x^128000 mod p(x)` << 1, x^128064 mod p(x)` << 1 */
- .octa 0x00000001092a16e80000000096ca3a26
-
- /* x^126976 mod p(x)` << 1, x^127040 mod p(x)` << 1 */
- .octa 0x00000000a505637c00000000ff223d4e
-
- /* x^125952 mod p(x)` << 1, x^126016 mod p(x)` << 1 */
- .octa 0x00000000d94869b2000000010e84da42
-
- /* x^124928 mod p(x)` << 1, x^124992 mod p(x)` << 1 */
- .octa 0x00000001c8b203ae00000001b61ba3d0
-
- /* x^123904 mod p(x)` << 1, x^123968 mod p(x)` << 1 */
- .octa 0x000000005704aea000000000680f2de8
-
- /* x^122880 mod p(x)` << 1, x^122944 mod p(x)` << 1 */
- .octa 0x000000012e295fa2000000008772a9a8
-
- /* x^121856 mod p(x)` << 1, x^121920 mod p(x)` << 1 */
- .octa 0x000000011d0908bc0000000155f295bc
-
- /* x^120832 mod p(x)` << 1, x^120896 mod p(x)` << 1 */
- .octa 0x0000000193ed97ea00000000595f9282
-
- /* x^119808 mod p(x)` << 1, x^119872 mod p(x)` << 1 */
- .octa 0x000000013a0f1c520000000164b1c25a
-
- /* x^118784 mod p(x)` << 1, x^118848 mod p(x)` << 1 */
- .octa 0x000000010c2c40c000000000fbd67c50
-
- /* x^117760 mod p(x)` << 1, x^117824 mod p(x)` << 1 */
- .octa 0x00000000ff6fac3e0000000096076268
-
- /* x^116736 mod p(x)` << 1, x^116800 mod p(x)` << 1 */
- .octa 0x000000017b3609c000000001d288e4cc
-
- /* x^115712 mod p(x)` << 1, x^115776 mod p(x)` << 1 */
- .octa 0x0000000088c8c92200000001eaac1bdc
-
- /* x^114688 mod p(x)` << 1, x^114752 mod p(x)` << 1 */
- .octa 0x00000001751baae600000001f1ea39e2
-
- /* x^113664 mod p(x)` << 1, x^113728 mod p(x)` << 1 */
- .octa 0x000000010795297200000001eb6506fc
-
- /* x^112640 mod p(x)` << 1, x^112704 mod p(x)` << 1 */
- .octa 0x0000000162b00abe000000010f806ffe
-
- /* x^111616 mod p(x)` << 1, x^111680 mod p(x)` << 1 */
- .octa 0x000000000d7b404c000000010408481e
-
- /* x^110592 mod p(x)` << 1, x^110656 mod p(x)` << 1 */
- .octa 0x00000000763b13d40000000188260534
-
- /* x^109568 mod p(x)` << 1, x^109632 mod p(x)` << 1 */
- .octa 0x00000000f6dc22d80000000058fc73e0
-
- /* x^108544 mod p(x)` << 1, x^108608 mod p(x)` << 1 */
- .octa 0x000000007daae06000000000391c59b8
-
- /* x^107520 mod p(x)` << 1, x^107584 mod p(x)` << 1 */
- .octa 0x000000013359ab7c000000018b638400
-
- /* x^106496 mod p(x)` << 1, x^106560 mod p(x)` << 1 */
- .octa 0x000000008add438a000000011738f5c4
-
- /* x^105472 mod p(x)` << 1, x^105536 mod p(x)` << 1 */
- .octa 0x00000001edbefdea000000008cf7c6da
-
- /* x^104448 mod p(x)` << 1, x^104512 mod p(x)` << 1 */
- .octa 0x000000004104e0f800000001ef97fb16
-
- /* x^103424 mod p(x)` << 1, x^103488 mod p(x)` << 1 */
- .octa 0x00000000b48a82220000000102130e20
-
- /* x^102400 mod p(x)` << 1, x^102464 mod p(x)` << 1 */
- .octa 0x00000001bcb4684400000000db968898
-
- /* x^101376 mod p(x)` << 1, x^101440 mod p(x)` << 1 */
- .octa 0x000000013293ce0a00000000b5047b5e
-
- /* x^100352 mod p(x)` << 1, x^100416 mod p(x)` << 1 */
- .octa 0x00000001710d0844000000010b90fdb2
-
- /* x^99328 mod p(x)` << 1, x^99392 mod p(x)` << 1 */
- .octa 0x0000000117907f6e000000004834a32e
-
- /* x^98304 mod p(x)` << 1, x^98368 mod p(x)` << 1 */
- .octa 0x0000000087ddf93e0000000059c8f2b0
-
- /* x^97280 mod p(x)` << 1, x^97344 mod p(x)` << 1 */
- .octa 0x000000005970e9b00000000122cec508
-
- /* x^96256 mod p(x)` << 1, x^96320 mod p(x)` << 1 */
- .octa 0x0000000185b2b7d0000000000a330cda
-
- /* x^95232 mod p(x)` << 1, x^95296 mod p(x)` << 1 */
- .octa 0x00000001dcee0efc000000014a47148c
-
- /* x^94208 mod p(x)` << 1, x^94272 mod p(x)` << 1 */
- .octa 0x0000000030da27220000000042c61cb8
-
- /* x^93184 mod p(x)` << 1, x^93248 mod p(x)` << 1 */
- .octa 0x000000012f925a180000000012fe6960
-
- /* x^92160 mod p(x)` << 1, x^92224 mod p(x)` << 1 */
- .octa 0x00000000dd2e357c00000000dbda2c20
-
- /* x^91136 mod p(x)` << 1, x^91200 mod p(x)` << 1 */
- .octa 0x00000000071c80de000000011122410c
-
- /* x^90112 mod p(x)` << 1, x^90176 mod p(x)` << 1 */
- .octa 0x000000011513140a00000000977b2070
-
- /* x^89088 mod p(x)` << 1, x^89152 mod p(x)` << 1 */
- .octa 0x00000001df876e8e000000014050438e
-
- /* x^88064 mod p(x)` << 1, x^88128 mod p(x)` << 1 */
- .octa 0x000000015f81d6ce0000000147c840e8
-
- /* x^87040 mod p(x)` << 1, x^87104 mod p(x)` << 1 */
- .octa 0x000000019dd94dbe00000001cc7c88ce
-
- /* x^86016 mod p(x)` << 1, x^86080 mod p(x)` << 1 */
- .octa 0x00000001373d206e00000001476b35a4
-
- /* x^84992 mod p(x)` << 1, x^85056 mod p(x)` << 1 */
- .octa 0x00000000668ccade000000013d52d508
-
- /* x^83968 mod p(x)` << 1, x^84032 mod p(x)` << 1 */
- .octa 0x00000001b192d268000000008e4be32e
-
- /* x^82944 mod p(x)` << 1, x^83008 mod p(x)` << 1 */
- .octa 0x00000000e30f3a7800000000024120fe
-
- /* x^81920 mod p(x)` << 1, x^81984 mod p(x)` << 1 */
- .octa 0x000000010ef1f7bc00000000ddecddb4
-
- /* x^80896 mod p(x)` << 1, x^80960 mod p(x)` << 1 */
- .octa 0x00000001f5ac738000000000d4d403bc
-
- /* x^79872 mod p(x)` << 1, x^79936 mod p(x)` << 1 */
- .octa 0x000000011822ea7000000001734b89aa
-
- /* x^78848 mod p(x)` << 1, x^78912 mod p(x)` << 1 */
- .octa 0x00000000c3a33848000000010e7a58d6
-
- /* x^77824 mod p(x)` << 1, x^77888 mod p(x)` << 1 */
- .octa 0x00000001bd151c2400000001f9f04e9c
-
- /* x^76800 mod p(x)` << 1, x^76864 mod p(x)` << 1 */
- .octa 0x0000000056002d7600000000b692225e
-
- /* x^75776 mod p(x)` << 1, x^75840 mod p(x)` << 1 */
- .octa 0x000000014657c4f4000000019b8d3f3e
-
- /* x^74752 mod p(x)` << 1, x^74816 mod p(x)` << 1 */
- .octa 0x0000000113742d7c00000001a874f11e
-
- /* x^73728 mod p(x)` << 1, x^73792 mod p(x)` << 1 */
- .octa 0x000000019c5920ba000000010d5a4254
-
- /* x^72704 mod p(x)` << 1, x^72768 mod p(x)` << 1 */
- .octa 0x000000005216d2d600000000bbb2f5d6
-
- /* x^71680 mod p(x)` << 1, x^71744 mod p(x)` << 1 */
- .octa 0x0000000136f5ad8a0000000179cc0e36
-
- /* x^70656 mod p(x)` << 1, x^70720 mod p(x)` << 1 */
- .octa 0x000000018b07beb600000001dca1da4a
-
- /* x^69632 mod p(x)` << 1, x^69696 mod p(x)` << 1 */
- .octa 0x00000000db1e93b000000000feb1a192
-
- /* x^68608 mod p(x)` << 1, x^68672 mod p(x)` << 1 */
- .octa 0x000000000b96fa3a00000000d1eeedd6
-
- /* x^67584 mod p(x)` << 1, x^67648 mod p(x)` << 1 */
- .octa 0x00000001d9968af0000000008fad9bb4
-
- /* x^66560 mod p(x)` << 1, x^66624 mod p(x)` << 1 */
- .octa 0x000000000e4a77a200000001884938e4
-
- /* x^65536 mod p(x)` << 1, x^65600 mod p(x)` << 1 */
- .octa 0x00000000508c2ac800000001bc2e9bc0
-
- /* x^64512 mod p(x)` << 1, x^64576 mod p(x)` << 1 */
- .octa 0x0000000021572a8000000001f9658a68
-
- /* x^63488 mod p(x)` << 1, x^63552 mod p(x)` << 1 */
- .octa 0x00000001b859daf2000000001b9224fc
-
- /* x^62464 mod p(x)` << 1, x^62528 mod p(x)` << 1 */
- .octa 0x000000016f7884740000000055b2fb84
-
- /* x^61440 mod p(x)` << 1, x^61504 mod p(x)` << 1 */
- .octa 0x00000001b438810e000000018b090348
-
- /* x^60416 mod p(x)` << 1, x^60480 mod p(x)` << 1 */
- .octa 0x0000000095ddc6f2000000011ccbd5ea
-
- /* x^59392 mod p(x)` << 1, x^59456 mod p(x)` << 1 */
- .octa 0x00000001d977c20c0000000007ae47f8
-
- /* x^58368 mod p(x)` << 1, x^58432 mod p(x)` << 1 */
- .octa 0x00000000ebedb99a0000000172acbec0
-
- /* x^57344 mod p(x)` << 1, x^57408 mod p(x)` << 1 */
- .octa 0x00000001df9e9e9200000001c6e3ff20
-
- /* x^56320 mod p(x)` << 1, x^56384 mod p(x)` << 1 */
- .octa 0x00000001a4a3f95200000000e1b38744
-
- /* x^55296 mod p(x)` << 1, x^55360 mod p(x)` << 1 */
- .octa 0x00000000e2f5122000000000791585b2
-
- /* x^54272 mod p(x)` << 1, x^54336 mod p(x)` << 1 */
- .octa 0x000000004aa01f3e00000000ac53b894
-
- /* x^53248 mod p(x)` << 1, x^53312 mod p(x)` << 1 */
- .octa 0x00000000b3e90a5800000001ed5f2cf4
-
- /* x^52224 mod p(x)` << 1, x^52288 mod p(x)` << 1 */
- .octa 0x000000000c9ca2aa00000001df48b2e0
-
- /* x^51200 mod p(x)` << 1, x^51264 mod p(x)` << 1 */
- .octa 0x000000015168231600000000049c1c62
-
- /* x^50176 mod p(x)` << 1, x^50240 mod p(x)` << 1 */
- .octa 0x0000000036fce78c000000017c460c12
-
- /* x^49152 mod p(x)` << 1, x^49216 mod p(x)` << 1 */
- .octa 0x000000009037dc10000000015be4da7e
-
- /* x^48128 mod p(x)` << 1, x^48192 mod p(x)` << 1 */
- .octa 0x00000000d3298582000000010f38f668
-
- /* x^47104 mod p(x)` << 1, x^47168 mod p(x)` << 1 */
- .octa 0x00000001b42e8ad60000000039f40a00
-
- /* x^46080 mod p(x)` << 1, x^46144 mod p(x)` << 1 */
- .octa 0x00000000142a983800000000bd4c10c4
-
- /* x^45056 mod p(x)` << 1, x^45120 mod p(x)` << 1 */
- .octa 0x0000000109c7f1900000000042db1d98
-
- /* x^44032 mod p(x)` << 1, x^44096 mod p(x)` << 1 */
- .octa 0x0000000056ff931000000001c905bae6
-
- /* x^43008 mod p(x)` << 1, x^43072 mod p(x)` << 1 */
- .octa 0x00000001594513aa00000000069d40ea
-
- /* x^41984 mod p(x)` << 1, x^42048 mod p(x)` << 1 */
- .octa 0x00000001e3b5b1e8000000008e4fbad0
-
- /* x^40960 mod p(x)` << 1, x^41024 mod p(x)` << 1 */
- .octa 0x000000011dd5fc080000000047bedd46
-
- /* x^39936 mod p(x)` << 1, x^40000 mod p(x)` << 1 */
- .octa 0x00000001675f0cc20000000026396bf8
-
- /* x^38912 mod p(x)` << 1, x^38976 mod p(x)` << 1 */
- .octa 0x00000000d1c8dd4400000000379beb92
-
- /* x^37888 mod p(x)` << 1, x^37952 mod p(x)` << 1 */
- .octa 0x0000000115ebd3d8000000000abae54a
-
- /* x^36864 mod p(x)` << 1, x^36928 mod p(x)` << 1 */
- .octa 0x00000001ecbd0dac0000000007e6a128
-
- /* x^35840 mod p(x)` << 1, x^35904 mod p(x)` << 1 */
- .octa 0x00000000cdf67af2000000000ade29d2
-
- /* x^34816 mod p(x)` << 1, x^34880 mod p(x)` << 1 */
- .octa 0x000000004c01ff4c00000000f974c45c
-
- /* x^33792 mod p(x)` << 1, x^33856 mod p(x)` << 1 */
- .octa 0x00000000f2d8657e00000000e77ac60a
-
- /* x^32768 mod p(x)` << 1, x^32832 mod p(x)` << 1 */
- .octa 0x000000006bae74c40000000145895816
-
- /* x^31744 mod p(x)` << 1, x^31808 mod p(x)` << 1 */
- .octa 0x0000000152af8aa00000000038e362be
-
- /* x^30720 mod p(x)` << 1, x^30784 mod p(x)` << 1 */
- .octa 0x0000000004663802000000007f991a64
-
- /* x^29696 mod p(x)` << 1, x^29760 mod p(x)` << 1 */
- .octa 0x00000001ab2f5afc00000000fa366d3a
-
- /* x^28672 mod p(x)` << 1, x^28736 mod p(x)` << 1 */
- .octa 0x0000000074a4ebd400000001a2bb34f0
-
- /* x^27648 mod p(x)` << 1, x^27712 mod p(x)` << 1 */
- .octa 0x00000001d7ab3a4c0000000028a9981e
-
- /* x^26624 mod p(x)` << 1, x^26688 mod p(x)` << 1 */
- .octa 0x00000001a8da60c600000001dbc672be
-
- /* x^25600 mod p(x)` << 1, x^25664 mod p(x)` << 1 */
- .octa 0x000000013cf6382000000000b04d77f6
-
- /* x^24576 mod p(x)` << 1, x^24640 mod p(x)` << 1 */
- .octa 0x00000000bec12e1e0000000124400d96
-
- /* x^23552 mod p(x)` << 1, x^23616 mod p(x)` << 1 */
- .octa 0x00000001c6368010000000014ca4b414
-
- /* x^22528 mod p(x)` << 1, x^22592 mod p(x)` << 1 */
- .octa 0x00000001e6e78758000000012fe2c938
-
- /* x^21504 mod p(x)` << 1, x^21568 mod p(x)` << 1 */
- .octa 0x000000008d7f2b3c00000001faed01e6
-
- /* x^20480 mod p(x)` << 1, x^20544 mod p(x)` << 1 */
- .octa 0x000000016b4a156e000000007e80ecfe
-
- /* x^19456 mod p(x)` << 1, x^19520 mod p(x)` << 1 */
- .octa 0x00000001c63cfeb60000000098daee94
-
- /* x^18432 mod p(x)` << 1, x^18496 mod p(x)` << 1 */
- .octa 0x000000015f902670000000010a04edea
-
- /* x^17408 mod p(x)` << 1, x^17472 mod p(x)` << 1 */
- .octa 0x00000001cd5de11e00000001c00b4524
-
- /* x^16384 mod p(x)` << 1, x^16448 mod p(x)` << 1 */
- .octa 0x000000001acaec540000000170296550
-
- /* x^15360 mod p(x)` << 1, x^15424 mod p(x)` << 1 */
- .octa 0x000000002bd0ca780000000181afaa48
-
- /* x^14336 mod p(x)` << 1, x^14400 mod p(x)` << 1 */
- .octa 0x0000000032d63d5c0000000185a31ffa
-
- /* x^13312 mod p(x)` << 1, x^13376 mod p(x)` << 1 */
- .octa 0x000000001c6d4e4c000000002469f608
-
- /* x^12288 mod p(x)` << 1, x^12352 mod p(x)` << 1 */
- .octa 0x0000000106a60b92000000006980102a
-
- /* x^11264 mod p(x)` << 1, x^11328 mod p(x)` << 1 */
- .octa 0x00000000d3855e120000000111ea9ca8
-
- /* x^10240 mod p(x)` << 1, x^10304 mod p(x)` << 1 */
- .octa 0x00000000e312563600000001bd1d29ce
-
- /* x^9216 mod p(x)` << 1, x^9280 mod p(x)` << 1 */
- .octa 0x000000009e8f7ea400000001b34b9580
-
- /* x^8192 mod p(x)` << 1, x^8256 mod p(x)` << 1 */
- .octa 0x00000001c82e562c000000003076054e
-
- /* x^7168 mod p(x)` << 1, x^7232 mod p(x)` << 1 */
- .octa 0x00000000ca9f09ce000000012a608ea4
-
- /* x^6144 mod p(x)` << 1, x^6208 mod p(x)` << 1 */
- .octa 0x00000000c63764e600000000784d05fe
-
- /* x^5120 mod p(x)` << 1, x^5184 mod p(x)` << 1 */
- .octa 0x0000000168d2e49e000000016ef0d82a
-
- /* x^4096 mod p(x)` << 1, x^4160 mod p(x)` << 1 */
- .octa 0x00000000e986c1480000000075bda454
-
- /* x^3072 mod p(x)` << 1, x^3136 mod p(x)` << 1 */
- .octa 0x00000000cfb65894000000003dc0a1c4
-
- /* x^2048 mod p(x)` << 1, x^2112 mod p(x)` << 1 */
- .octa 0x0000000111cadee400000000e9a5d8be
-
- /* x^1024 mod p(x)` << 1, x^1088 mod p(x)` << 1 */
- .octa 0x0000000171fb63ce00000001609bc4b4
-
-.short_constants:
-
- /* Reduce final 1024-2048 bits to 64 bits, shifting 32 bits to include the trailing 32 bits of zeros */
- /* x^1952 mod p(x)`, x^1984 mod p(x)`, x^2016 mod p(x)`, x^2048 mod p(x)` */
- .octa 0x7fec2963e5bf80485cf015c388e56f72
-
- /* x^1824 mod p(x)`, x^1856 mod p(x)`, x^1888 mod p(x)`, x^1920 mod p(x)` */
- .octa 0x38e888d4844752a9963a18920246e2e6
-
- /* x^1696 mod p(x)`, x^1728 mod p(x)`, x^1760 mod p(x)`, x^1792 mod p(x)` */
- .octa 0x42316c00730206ad419a441956993a31
-
- /* x^1568 mod p(x)`, x^1600 mod p(x)`, x^1632 mod p(x)`, x^1664 mod p(x)` */
- .octa 0x543d5c543e65ddf9924752ba2b830011
-
- /* x^1440 mod p(x)`, x^1472 mod p(x)`, x^1504 mod p(x)`, x^1536 mod p(x)` */
- .octa 0x78e87aaf56767c9255bd7f9518e4a304
-
- /* x^1312 mod p(x)`, x^1344 mod p(x)`, x^1376 mod p(x)`, x^1408 mod p(x)` */
- .octa 0x8f68fcec1903da7f6d76739fe0553f1e
-
- /* x^1184 mod p(x)`, x^1216 mod p(x)`, x^1248 mod p(x)`, x^1280 mod p(x)` */
- .octa 0x3f4840246791d588c133722b1fe0b5c3
-
- /* x^1056 mod p(x)`, x^1088 mod p(x)`, x^1120 mod p(x)`, x^1152 mod p(x)` */
- .octa 0x34c96751b04de25a64b67ee0e55ef1f3
-
- /* x^928 mod p(x)`, x^960 mod p(x)`, x^992 mod p(x)`, x^1024 mod p(x)` */
- .octa 0x156c8e180b4a395b069db049b8fdb1e7
-
- /* x^800 mod p(x)`, x^832 mod p(x)`, x^864 mod p(x)`, x^896 mod p(x)` */
- .octa 0xe0b99ccbe661f7bea11bfaf3c9e90b9e
-
- /* x^672 mod p(x)`, x^704 mod p(x)`, x^736 mod p(x)`, x^768 mod p(x)` */
- .octa 0x041d37768cd75659817cdc5119b29a35
-
- /* x^544 mod p(x)`, x^576 mod p(x)`, x^608 mod p(x)`, x^640 mod p(x)` */
- .octa 0x3a0777818cfaa9651ce9d94b36c41f1c
-
- /* x^416 mod p(x)`, x^448 mod p(x)`, x^480 mod p(x)`, x^512 mod p(x)` */
- .octa 0x0e148e8252377a554f256efcb82be955
-
- /* x^288 mod p(x)`, x^320 mod p(x)`, x^352 mod p(x)`, x^384 mod p(x)` */
- .octa 0x9c25531d19e65ddeec1631edb2dea967
-
- /* x^160 mod p(x)`, x^192 mod p(x)`, x^224 mod p(x)`, x^256 mod p(x)` */
- .octa 0x790606ff9957c0a65d27e147510ac59a
-
- /* x^32 mod p(x)`, x^64 mod p(x)`, x^96 mod p(x)`, x^128 mod p(x)` */
- .octa 0x82f63b786ea2d55ca66805eb18b8ea18
-
-
-.barrett_constants:
- /* 33 bit reflected Barrett constant m - (4^32)/n */
- .octa 0x000000000000000000000000dea713f1 /* x^64 div p(x)` */
- /* 33 bit reflected Barrett constant n */
- .octa 0x00000000000000000000000105ec76f1
-#endif
-
-#endif /* __powerpc__ */
-
-#endif
diff --git a/storage/xtradb/ut/crc32_power8/crc32_wrapper.c b/storage/xtradb/ut/crc32_power8/crc32_wrapper.c
deleted file mode 100644
index d4c91371fa1..00000000000
--- a/storage/xtradb/ut/crc32_power8/crc32_wrapper.c
+++ /dev/null
@@ -1,68 +0,0 @@
-#ifdef __powerpc__
-
-#define CRC_TABLE
-#include "crc32_constants.h"
-
-#define VMX_ALIGN 16
-#define VMX_ALIGN_MASK (VMX_ALIGN-1)
-
-#ifdef REFLECT
-static unsigned int crc32_align(unsigned int crc, unsigned char *p,
- unsigned long len)
-{
- while (len--)
- crc = crc_table[(crc ^ *p++) & 0xff] ^ (crc >> 8);
- return crc;
-}
-#else
-static unsigned int crc32_align(unsigned int crc, unsigned char *p,
- unsigned long len)
-{
- while (len--)
- crc = crc_table[((crc >> 24) ^ *p++) & 0xff] ^ (crc << 8);
- return crc;
-}
-#endif
-
-unsigned int __crc32_vpmsum(unsigned int crc, unsigned char *p,
- unsigned long len);
-
-unsigned int crc32_vpmsum(unsigned int crc, unsigned char *p,
- unsigned long len)
-{
- unsigned int prealign;
- unsigned int tail;
-
-#ifdef CRC_XOR
- crc ^= 0xffffffff;
-#endif
-
- if (len < VMX_ALIGN + VMX_ALIGN_MASK) {
- crc = crc32_align(crc, p, len);
- goto out;
- }
-
- if ((unsigned long)p & VMX_ALIGN_MASK) {
- prealign = VMX_ALIGN - ((unsigned long)p & VMX_ALIGN_MASK);
- crc = crc32_align(crc, p, prealign);
- len -= prealign;
- p += prealign;
- }
-
- crc = __crc32_vpmsum(crc, p, len & ~VMX_ALIGN_MASK);
-
- tail = len & VMX_ALIGN_MASK;
- if (tail) {
- p += len & ~VMX_ALIGN_MASK;
- crc = crc32_align(crc, p, tail);
- }
-
-out:
-#ifdef CRC_XOR
- crc ^= 0xffffffff;
-#endif
-
- return crc;
-}
-
-#endif /* __powerpc__ */
diff --git a/storage/xtradb/ut/crc32_power8/ppc-opcode.h b/storage/xtradb/ut/crc32_power8/ppc-opcode.h
deleted file mode 100644
index 5942bd4923a..00000000000
--- a/storage/xtradb/ut/crc32_power8/ppc-opcode.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef __OPCODES_H
-#define __OPCODES_H
-
-#define __PPC_RA(a) (((a) & 0x1f) << 16)
-#define __PPC_RB(b) (((b) & 0x1f) << 11)
-#define __PPC_XA(a) ((((a) & 0x1f) << 16) | (((a) & 0x20) >> 3))
-#define __PPC_XB(b) ((((b) & 0x1f) << 11) | (((b) & 0x20) >> 4))
-#define __PPC_XS(s) ((((s) & 0x1f) << 21) | (((s) & 0x20) >> 5))
-#define __PPC_XT(s) __PPC_XS(s)
-#define VSX_XX3(t, a, b) (__PPC_XT(t) | __PPC_XA(a) | __PPC_XB(b))
-#define VSX_XX1(s, a, b) (__PPC_XS(s) | __PPC_RA(a) | __PPC_RB(b))
-
-#define PPC_INST_VPMSUMW 0x10000488
-#define PPC_INST_VPMSUMD 0x100004c8
-#define PPC_INST_MFVSRD 0x7c000066
-#define PPC_INST_MTVSRD 0x7c000166
-
-#define VPMSUMW(t, a, b) .long PPC_INST_VPMSUMW | VSX_XX3((t), a, b)
-#define VPMSUMD(t, a, b) .long PPC_INST_VPMSUMD | VSX_XX3((t), a, b)
-#define MFVRD(a, t) .long PPC_INST_MFVSRD | VSX_XX1((t)+32, a, 0)
-#define MTVRD(t, a) .long PPC_INST_MTVSRD | VSX_XX1((t)+32, a, 0)
-
-#endif
diff --git a/storage/xtradb/ut/ut0crc32.cc b/storage/xtradb/ut/ut0crc32.cc
index 2e3924a997e..1484d245953 100644
--- a/storage/xtradb/ut/ut0crc32.cc
+++ b/storage/xtradb/ut/ut0crc32.cc
@@ -104,6 +104,7 @@ UNIV_INTERN bool ut_crc32_power8_enabled = false;
/********************************************************************//**
Initializes the table that is used to generate the CRC32 if the CPU does
not have support for it. */
+#ifndef HAVE_CRC32_VPMSUM
static
void
ut_crc32_slice8_table_init()
@@ -133,6 +134,7 @@ ut_crc32_slice8_table_init()
ut_crc32_slice8_table_initialized = TRUE;
}
+#endif
#if defined(__GNUC__) && defined(__x86_64__)
/********************************************************************//**
@@ -181,27 +183,22 @@ for RHEL4 support (GCC 3 doesn't support this instruction) */
len -= 8, buf += 8
#endif /* defined(__GNUC__) && defined(__x86_64__) */
-#if defined(__powerpc__)
+
+#ifdef HAVE_CRC32_VPMSUM
extern "C" {
-unsigned int crc32_vpmsum(unsigned int crc, const unsigned char *p, unsigned long len);
+unsigned int crc32c_vpmsum(unsigned int crc, const unsigned char *p, unsigned long len);
};
-#endif /* __powerpc__ */
UNIV_INLINE
ib_uint32_t
ut_crc32_power8(
/*===========*/
const byte* buf, /*!< in: data over which to calculate CRC32 */
- ulint len) /*!< in: data length */
+ ulint len) /*!< in: data length */
{
-#if defined(__powerpc__) && !defined(WORDS_BIGENDIAN)
- return crc32_vpmsum(0, buf, len);
-#else
- ut_error;
- /* silence compiler warning about unused parameters */
- return((ib_uint32_t) buf[len]);
-#endif /* __powerpc__ */
+ return crc32c_vpmsum(0, buf, len);
}
+#endif
/********************************************************************//**
Calculates CRC32 using CPU instructions.
@@ -338,18 +335,15 @@ ut_crc32_init()
#endif /* defined(__GNUC__) && defined(__x86_64__) */
-#if defined(__linux__) && defined(__powerpc__) && defined(AT_HWCAP2) \
- && !defined(WORDS_BIGENDIAN)
- if (getauxval(AT_HWCAP2) & PPC_FEATURE2_ARCH_2_07)
- ut_crc32_power8_enabled = true;
-#endif /* defined(__linux__) && defined(__powerpc__) */
-
+#ifdef HAVE_CRC32_VPMSUM
+ ut_crc32_power8_enabled = true;
+ ut_crc32 = ut_crc32_power8;
+#else
if (ut_crc32_sse2_enabled) {
ut_crc32 = ut_crc32_sse42;
- } else if (ut_crc32_power8_enabled) {
- ut_crc32 = ut_crc32_power8;
} else {
ut_crc32_slice8_table_init();
ut_crc32 = ut_crc32_slice8;
}
+#endif
}
diff --git a/strings/conf_to_src.c b/strings/conf_to_src.c
index 5b9793f388d..c7f25331534 100644
--- a/strings/conf_to_src.c
+++ b/strings/conf_to_src.c
@@ -25,7 +25,17 @@
#define ROW16_LEN 8
#define MAX_BUF (64*1024)
-static struct charset_info_st all_charsets[512];
+
+#define MY_ALL_CHARSETS_SIZE 2048
+
+static struct charset_info_st all_charsets[MY_ALL_CHARSETS_SIZE];
+static uint refids[MY_ALL_CHARSETS_SIZE];
+
+static CHARSET_INFO *inheritance_source(uint id)
+{
+ return &all_charsets[refids[id]];
+}
+
void
print_array(FILE *f, const char *set, const char *name, const uchar *a, int n)
@@ -61,14 +71,30 @@ print_array16(FILE *f, const char *set, const char *name, const uint16 *a, int n
}
-static int get_charset_number(const char *charset_name)
+static uint get_collation_number(const char *name)
{
CHARSET_INFO *cs;
for (cs= all_charsets;
cs < all_charsets + array_elements(all_charsets);
cs++)
{
- if ( cs->name && !strcmp(cs->name, charset_name))
+ if (cs->name && !strcmp(cs->name, name))
+ return cs->number;
+ }
+ return 0;
+}
+
+
+static uint
+get_charset_number_internal(const char *charset_name, uint cs_flags)
+{
+ CHARSET_INFO *cs;
+ for (cs= all_charsets;
+ cs < all_charsets + array_elements(all_charsets);
+ cs++)
+ {
+ if (cs->csname && (cs->state & cs_flags) &&
+ !strcmp(cs->csname, charset_name))
return cs->number;
}
return 0;
@@ -93,7 +119,10 @@ static void simple_cs_copy_data(struct charset_info_st *to, CHARSET_INFO *from)
if (from->name)
to->name= strdup(from->name);
-
+
+ if (from->tailoring)
+ to->tailoring= strdup(from->tailoring);
+
if (from->ctype)
to->ctype= (uchar*) mdup((char*) from->ctype, MY_CS_CTYPE_TABLE_SIZE);
if (from->to_lower)
@@ -117,17 +146,67 @@ static void simple_cs_copy_data(struct charset_info_st *to, CHARSET_INFO *from)
}
}
+
+/*
+ cs->xxx arrays can be NULL in case when a collation has an entry only
+ in Index.xml and has no entry in csname.xml (e.g. in case of a binary
+ collation or a collation using <import> command).
+
+ refcs->xxx arrays can be NULL if <import> refers to a collation
+ which is not defined in csname.xml, e.g. an always compiled collation
+ such as latin1_swedish_ci.
+*/
+static void inherit_charset_data(struct charset_info_st *cs,
+ CHARSET_INFO *refcs)
+{
+ cs->state|= (refcs->state & (MY_CS_PUREASCII|MY_CS_NONASCII));
+ if (refcs->ctype && cs->ctype &&
+ !memcmp(cs->ctype, refcs->ctype, MY_CS_CTYPE_TABLE_SIZE))
+ cs->ctype= NULL;
+ if (refcs->to_lower && cs->to_lower &&
+ !memcmp(cs->to_lower, refcs->to_lower, MY_CS_TO_LOWER_TABLE_SIZE))
+ cs->to_lower= NULL;
+ if (refcs->to_upper && cs->to_upper &&
+ !memcmp(cs->to_upper, refcs->to_upper, MY_CS_TO_LOWER_TABLE_SIZE))
+ cs->to_upper= NULL;
+ if (refcs->tab_to_uni && cs->tab_to_uni &&
+ !memcmp(cs->tab_to_uni, refcs->tab_to_uni,
+ MY_CS_TO_UNI_TABLE_SIZE * sizeof(uint16)))
+ cs->tab_to_uni= NULL;
+}
+
+
+static CHARSET_INFO *find_charset_data_inheritance_source(CHARSET_INFO *cs)
+{
+ CHARSET_INFO *refcs;
+ uint refid= get_charset_number_internal(cs->csname, MY_CS_PRIMARY);
+ return refid && refid != cs->number &&
+ (refcs= &all_charsets[refid]) &&
+ (refcs->state & MY_CS_LOADED) ? refcs : NULL;
+}
+
+
+/**
+ Detect if "cs" needs further loading from csname.xml
+ @param cs - the character set pointer
+ @retval FALSE - if the current data (e.g. loaded from from Index.xml)
+ is not enough to dump the character set and requires
+ further reading from the csname.xml file.
+ @retval TRUE - if the current data is enough to dump,
+ no reading of csname.xml is needed.
+*/
static my_bool simple_cs_is_full(CHARSET_INFO *cs)
{
return ((cs->csname && cs->tab_to_uni && cs->ctype && cs->to_upper &&
cs->to_lower) &&
(cs->number && cs->name &&
- (cs->sort_order || (cs->state & MY_CS_BINSORT))));
+ (cs->sort_order || cs->tailoring || (cs->state & MY_CS_BINSORT))));
}
static int add_collation(struct charset_info_st *cs)
{
- if (cs->name && (cs->number || (cs->number=get_charset_number(cs->name))))
+ if (cs->name &&
+ (cs->number || (cs->number= get_collation_number(cs->name))))
{
if (!(all_charsets[cs->number].state & MY_CS_COMPILED))
{
@@ -137,6 +216,7 @@ static int add_collation(struct charset_info_st *cs)
cs->number= 0;
cs->name= NULL;
+ cs->tailoring= NULL;
cs->state= 0;
cs->sort_order= NULL;
cs->state= 0;
@@ -193,12 +273,74 @@ static int my_read_charset_file(const char *filename)
return FALSE;
}
-static int
-is_case_sensitive(CHARSET_INFO *cs)
+
+void print_arrays(FILE *f, CHARSET_INFO *cs)
{
- return (cs->sort_order &&
- cs->sort_order['A'] < cs->sort_order['a'] &&
- cs->sort_order['a'] < cs->sort_order['B']) ? 1 : 0;
+ if (cs->ctype)
+ print_array(f, cs->name, "ctype", cs->ctype, MY_CS_CTYPE_TABLE_SIZE);
+ if (cs->to_lower)
+ print_array(f, cs->name, "to_lower", cs->to_lower, MY_CS_TO_LOWER_TABLE_SIZE);
+ if (cs->to_upper)
+ print_array(f, cs->name, "to_upper", cs->to_upper, MY_CS_TO_UPPER_TABLE_SIZE);
+ if (cs->sort_order)
+ print_array(f, cs->name, "sort_order", cs->sort_order, MY_CS_SORT_ORDER_TABLE_SIZE);
+ if (cs->tab_to_uni)
+ print_array16(f, cs->name, "to_uni", cs->tab_to_uni, MY_CS_TO_UNI_TABLE_SIZE);
+}
+
+
+/**
+ Print an array member of a CHARSET_INFO.
+ @param f - the file to print into
+ @param cs0 - reference to the CHARSET_INFO to print
+ @param array0 - pointer to the array data (can be NULL)
+ @param cs1 - reference to the CHARSET_INFO that the data
+ can be inherited from (e.g. primary collation)
+ @param array1 - pointer to the array data in cs1 (can be NULL)
+ @param name - name of the member
+
+ If array0 is not null, then the CHARSET_INFO being dumped has its
+ own array (e.g. the default collation for the character set).
+ We print the name of this array using cs0->name and return.
+
+ If array1 is not null, then the CHARSET_INFO being dumpled reuses
+ the array from another collation. We print the name of the array of
+ the referenced collation using cs1->name and return.
+
+ Otherwise (if both array0 and array1 are NULL), we have a collation
+ of a character set whose primary collation is not available now,
+ and which does not have its own entry in csname.xml file.
+
+ For example, Index.xml has this entry:
+ <collation name="latin1_swedish_ci_copy">
+ <rules>
+ <import source="latin1_swedish_ci"/>
+ </rules>
+ </collation>
+ and latin1.xml does not have entries for latin1_swedish_ci_copy.
+
+ In such cases we print NULL as a pointer to the array.
+ It will be set to a not-null data during the first initialization
+ by the inherit_charset_data() call (see mysys/charset.c for details).
+*/
+static void
+print_array_ref(FILE *f,
+ CHARSET_INFO *cs0, const void *array0,
+ CHARSET_INFO *cs1, const void *array1,
+ const char *name)
+{
+ CHARSET_INFO *cs= array0 ? cs0 : array1 ? cs1 : NULL;
+ if (cs)
+ fprintf(f," %s_%s, /* %s */\n",
+ name, cs->name, name);
+ else
+ fprintf(f," NULL, /* %s */\n", name);
+}
+
+
+static const char *nopad_infix(CHARSET_INFO *cs)
+{
+ return (cs->state & MY_CS_NOPAD) ? "_nopad" : "";
}
@@ -206,28 +348,37 @@ void dispcset(FILE *f,CHARSET_INFO *cs)
{
fprintf(f,"{\n");
fprintf(f," %d,%d,%d,\n",cs->number,0,0);
- fprintf(f," MY_CS_COMPILED%s%s%s%s%s,\n",
+ fprintf(f," MY_CS_COMPILED%s%s%s%s%s%s,\n",
cs->state & MY_CS_BINSORT ? "|MY_CS_BINSORT" : "",
cs->state & MY_CS_PRIMARY ? "|MY_CS_PRIMARY" : "",
- is_case_sensitive(cs) ? "|MY_CS_CSSORT" : "",
- my_charset_is_8bit_pure_ascii(cs) ? "|MY_CS_PUREASCII" : "",
- !my_charset_is_ascii_compatible(cs) ? "|MY_CS_NONASCII": "");
+ cs->state & MY_CS_CSSORT ? "|MY_CS_CSSORT" : "",
+ cs->state & MY_CS_PUREASCII ? "|MY_CS_PUREASCII" : "",
+ cs->state & MY_CS_NONASCII ? "|MY_CS_NONASCII" : "",
+ cs->state & MY_CS_NOPAD ? "|MY_CS_NOPAD" : "");
if (cs->name)
{
+ CHARSET_INFO *srccs= inheritance_source(cs->number);
fprintf(f," \"%s\", /* cset name */\n",cs->csname);
fprintf(f," \"%s\", /* coll name */\n",cs->name);
fprintf(f," \"\", /* comment */\n");
- fprintf(f," NULL, /* tailoring */\n");
- fprintf(f," ctype_%s, /* ctype */\n",cs->name);
- fprintf(f," to_lower_%s, /* lower */\n",cs->name);
- fprintf(f," to_upper_%s, /* upper */\n",cs->name);
+ if (cs->tailoring)
+ fprintf(f, " \"%s\", /* tailoring */\n", cs->tailoring);
+ else
+ fprintf(f," NULL, /* tailoring */\n");
+
+ print_array_ref(f, cs, cs->ctype, srccs, srccs->ctype, "ctype");
+ print_array_ref(f, cs, cs->to_lower, srccs, srccs->to_lower, "to_lower");
+ print_array_ref(f, cs, cs->to_upper, srccs, srccs->to_upper, "to_upper");
+
if (cs->sort_order)
fprintf(f," sort_order_%s, /* sort_order */\n",cs->name);
else
fprintf(f," NULL, /* sort_order */\n");
+
fprintf(f," NULL, /* uca */\n");
- fprintf(f," to_uni_%s, /* to_uni */\n",cs->name);
+
+ print_array_ref(f, cs, cs->tab_to_uni, srccs, srccs->tab_to_uni, "to_uni");
}
else
{
@@ -258,10 +409,11 @@ void dispcset(FILE *f,CHARSET_INFO *cs)
fprintf(f," 0, /* escape_with_backslash_is_dangerous */\n");
fprintf(f," 1, /* levels_for_order */\n");
fprintf(f," &my_charset_8bit_handler,\n");
+
if (cs->state & MY_CS_BINSORT)
- fprintf(f," &my_collation_8bit_bin_handler,\n");
+ fprintf(f," &my_collation_8bit%s_bin_handler,\n", nopad_infix(cs));
else
- fprintf(f," &my_collation_8bit_simple_ci_handler,\n");
+ fprintf(f," &my_collation_8bit_simple%s_ci_handler,\n", nopad_infix(cs));
fprintf(f,"}\n");
}
@@ -271,8 +423,8 @@ fprint_copyright(FILE *file)
{
fprintf(file,
"/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.\n"
-" Copyright 2010-2011 Monty Program Ab\n"
" Copyright (c) 2000, 2011, Oracle and/or its affiliates.\n"
+" Copyright 2008-2016 MariaDB Corporation\n"
"\n"
" This program is free software; you can redistribute it and/or modify\n"
" it under the terms of the GNU General Public License as published by\n"
@@ -293,8 +445,7 @@ fprint_copyright(FILE *file)
int
main(int argc, char **argv __attribute__((unused)))
{
- struct charset_info_st ncs;
- CHARSET_INFO *cs;
+ struct charset_info_st ncs, *cs;
char filename[256];
FILE *f= stdout;
@@ -306,6 +457,7 @@ main(int argc, char **argv __attribute__((unused)))
bzero((void*)&ncs,sizeof(ncs));
bzero((void*)&all_charsets,sizeof(all_charsets));
+ bzero((void*) refids, sizeof(refids));
sprintf(filename,"%s/%s",argv[1],"Index.xml");
my_read_charset_file(filename);
@@ -321,6 +473,7 @@ main(int argc, char **argv __attribute__((unused)))
sprintf(filename,"%s/%s.xml",argv[1],cs->csname);
my_read_charset_file(filename);
}
+ cs->state|= MY_CS_LOADED;
}
}
@@ -341,15 +494,18 @@ main(int argc, char **argv __attribute__((unused)))
cs < all_charsets + array_elements(all_charsets);
cs++)
{
- if (simple_cs_is_full(cs))
+ if (cs->state & MY_CS_LOADED)
{
+ CHARSET_INFO *refcs= find_charset_data_inheritance_source(cs);
+ cs->state|= my_8bit_charset_flags_from_data(cs) |
+ my_8bit_collation_flags_from_data(cs);
+ if (refcs)
+ {
+ refids[cs->number]= refcs->number;
+ inherit_charset_data(cs, refcs);
+ }
fprintf(f,"#ifdef HAVE_CHARSET_%s\n",cs->csname);
- print_array(f, cs->name, "ctype", cs->ctype, MY_CS_CTYPE_TABLE_SIZE);
- print_array(f, cs->name, "to_lower", cs->to_lower, MY_CS_TO_LOWER_TABLE_SIZE);
- print_array(f, cs->name, "to_upper", cs->to_upper, MY_CS_TO_UPPER_TABLE_SIZE);
- if (cs->sort_order)
- print_array(f, cs->name, "sort_order", cs->sort_order, MY_CS_SORT_ORDER_TABLE_SIZE);
- print_array16(f, cs->name, "to_uni", cs->tab_to_uni, MY_CS_TO_UNI_TABLE_SIZE);
+ print_arrays(f, cs);
fprintf(f,"#endif\n");
fprintf(f,"\n");
}
@@ -360,7 +516,7 @@ main(int argc, char **argv __attribute__((unused)))
cs < all_charsets + array_elements(all_charsets);
cs++)
{
- if (simple_cs_is_full(cs))
+ if (cs->state & MY_CS_LOADED)
{
fprintf(f,"#ifdef HAVE_CHARSET_%s\n",cs->csname);
dispcset(f,cs);
diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c
index 9ae394eeedc..dd66da224ba 100644
--- a/strings/ctype-big5.c
+++ b/strings/ctype-big5.c
@@ -6690,6 +6690,22 @@ my_mb_wc_big5(CHARSET_INFO *cs __attribute__((unused)),
#include "strcoll.ic"
+#define DEFINE_STRNNCOLLSP_NOPAD
+#define MY_FUNCTION_NAME(x) my_ ## x ## _big5_chinese_nopad_ci
+#define WEIGHT_MB1(x) (sort_order_big5[(uchar) (x)])
+#define WEIGHT_MB2(x,y) (big5code(x, y))
+#define WEIGHT_MB2_FRM(x,y) (big5strokexfrm((uint16) WEIGHT_MB2(x, y)))
+#define DEFINE_STRNXFRM
+#include "strcoll.ic"
+
+
+#define DEFINE_STRNNCOLLSP_NOPAD
+#define MY_FUNCTION_NAME(x) my_ ## x ## _big5_nopad_bin
+#define WEIGHT_MB1(x) ((uchar) (x))
+#define WEIGHT_MB2(x,y) (big5code(x, y))
+#include "strcoll.ic"
+
+
static MY_COLLATION_HANDLER my_collation_handler_big5_chinese_ci=
{
NULL, /* init */
@@ -6722,6 +6738,38 @@ static MY_COLLATION_HANDLER my_collation_handler_big5_bin=
};
+static MY_COLLATION_HANDLER my_collation_handler_big5_chinese_nopad_ci=
+{
+ NULL, /* init */
+ my_strnncoll_big5_chinese_ci,
+ my_strnncollsp_big5_chinese_nopad_ci,
+ my_strnxfrm_big5_chinese_nopad_ci,
+ my_strnxfrmlen_simple,
+ my_like_range_mb,
+ my_wildcmp_mb,
+ my_strcasecmp_mb,
+ my_instr_mb,
+ my_hash_sort_simple_nopad,
+ my_propagate_simple
+};
+
+
+static MY_COLLATION_HANDLER my_collation_handler_big5_nopad_bin=
+{
+ NULL, /* init */
+ my_strnncoll_big5_bin,
+ my_strnncollsp_big5_nopad_bin,
+ my_strnxfrm_mb_nopad,
+ my_strnxfrmlen_simple,
+ my_like_range_mb,
+ my_wildcmp_mb_bin,
+ my_strcasecmp_mb_bin,
+ my_instr_mb,
+ my_hash_sort_mb_nopad_bin,
+ my_propagate_simple
+};
+
+
static MY_CHARSET_HANDLER my_charset_big5_handler=
{
NULL, /* init */
@@ -6821,4 +6869,70 @@ struct charset_info_st my_charset_big5_bin=
};
+struct charset_info_st my_charset_big5_chinese_nopad_ci=
+{
+ MY_NOPAD_ID(1),0,0, /* number */
+ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_NOPAD, /* state */
+ "big5", /* cs name */
+ "big5_chinese_nopad_ci", /* name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_big5,
+ to_lower_big5,
+ to_upper_big5,
+ sort_order_big5,
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_caseinfo_big5, /* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
+ 1, /* mbminlen */
+ 2, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 0xF9D5, /* max_sort_char */
+ ' ', /* pad char */
+ 1, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_big5_handler,
+ &my_collation_handler_big5_chinese_nopad_ci
+};
+
+
+struct charset_info_st my_charset_big5_nopad_bin=
+{
+ MY_NOPAD_ID(84),0,0, /* number */
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD, /* state */
+ "big5", /* cs name */
+ "big5_nopad_bin", /* name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_big5,
+ to_lower_big5,
+ to_upper_big5,
+ NULL, /* sort_order */
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_caseinfo_big5, /* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
+ 1, /* mbminlen */
+ 2, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 0xF9FE, /* max_sort_char */
+ ' ', /* pad char */
+ 1, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_big5_handler,
+ &my_collation_handler_big5_nopad_bin
+};
+
+
#endif
diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c
index aab7f2b7448..5655edd6063 100644
--- a/strings/ctype-bin.c
+++ b/strings/ctype-bin.c
@@ -199,6 +199,15 @@ static int my_strnncollsp_8bit_bin(CHARSET_INFO * cs __attribute__((unused)),
}
+static int my_strnncollsp_8bit_nopad_bin(CHARSET_INFO * cs
+ __attribute__((unused)),
+ const uchar *a, size_t a_length,
+ const uchar *b, size_t b_length)
+{
+ return my_strnncoll_8bit_bin(cs, a, a_length, b, b_length, FALSE);
+}
+
+
/* This function is used for all conversion functions */
static size_t my_case_str_bin(CHARSET_INFO *cs __attribute__((unused)),
@@ -253,19 +262,13 @@ int my_wc_mb_bin(CHARSET_INFO *cs __attribute__((unused)),
}
-void my_hash_sort_8bit_bin(CHARSET_INFO *cs __attribute__((unused)),
- const uchar *key, size_t len,
- ulong *nr1, ulong *nr2)
+void my_hash_sort_bin(CHARSET_INFO *cs __attribute__((unused)),
+ const uchar *key, size_t len,ulong *nr1, ulong *nr2)
{
+ const uchar *end = key + len;
ulong tmp1= *nr1;
ulong tmp2= *nr2;
- /*
- Remove trailing spaces. We have to do this to be able to compare
- 'A ' and 'A' as identical
- */
- const uchar *end = skip_trailing_space(key, len);
-
for (; key < end ; key++)
{
MY_HASH_ADD(tmp1, tmp2, (uint) *key);
@@ -276,20 +279,16 @@ void my_hash_sort_8bit_bin(CHARSET_INFO *cs __attribute__((unused)),
}
-void my_hash_sort_bin(CHARSET_INFO *cs __attribute__((unused)),
- const uchar *key, size_t len,ulong *nr1, ulong *nr2)
+void my_hash_sort_8bit_bin(CHARSET_INFO *cs __attribute__((unused)),
+ const uchar *key, size_t len,
+ ulong *nr1, ulong *nr2)
{
- const uchar *end = key + len;
- ulong tmp1= *nr1;
- ulong tmp2= *nr2;
-
- for (; key < end ; key++)
- {
- MY_HASH_ADD(tmp1, tmp2, (uint) *key);
- }
-
- *nr1= tmp1;
- *nr2= tmp2;
+ /*
+ Remove trailing spaces. We have to do this to be able to compare
+ 'A ' and 'A' as identical
+ */
+ const uchar *end= skip_trailing_space(key, len);
+ my_hash_sort_bin(cs, key, end - key, nr1, nr2);
}
@@ -407,6 +406,21 @@ my_strnxfrm_8bit_bin(CHARSET_INFO *cs,
}
+static size_t
+my_strnxfrm_8bit_nopad_bin(CHARSET_INFO *cs,
+ uchar * dst, size_t dstlen, uint nweights,
+ const uchar *src, size_t srclen, uint flags)
+{
+ set_if_smaller(srclen, dstlen);
+ set_if_smaller(srclen, nweights);
+ if (dst != src)
+ memcpy(dst, src, srclen);
+ return my_strxfrm_pad_desc_and_reverse_nopad(cs, dst, dst + srclen,
+ dst + dstlen, nweights - srclen,
+ flags, 0);
+}
+
+
static
uint my_instr_bin(CHARSET_INFO *cs __attribute__((unused)),
const char *b, size_t b_length,
@@ -484,6 +498,22 @@ MY_COLLATION_HANDLER my_collation_8bit_bin_handler =
};
+MY_COLLATION_HANDLER my_collation_8bit_nopad_bin_handler =
+{
+ my_coll_init_8bit_bin,
+ my_strnncoll_8bit_bin,
+ my_strnncollsp_8bit_nopad_bin,
+ my_strnxfrm_8bit_nopad_bin,
+ my_strnxfrmlen_simple,
+ my_like_range_simple,
+ my_wildcmp_bin,
+ my_strcasecmp_bin,
+ my_instr_bin,
+ my_hash_sort_bin,
+ my_propagate_simple
+};
+
+
static MY_COLLATION_HANDLER my_collation_binary_handler =
{
NULL, /* init */
diff --git a/strings/ctype-cp932.c b/strings/ctype-cp932.c
index 151fac8a052..83f8d40c480 100644
--- a/strings/ctype-cp932.c
+++ b/strings/ctype-cp932.c
@@ -34646,6 +34646,22 @@ size_t my_numcells_cp932(CHARSET_INFO *cs __attribute__((unused)),
#include "strcoll.ic"
+#define DEFINE_STRNNCOLLSP_NOPAD
+#define MY_FUNCTION_NAME(x) my_ ## x ## _cp932_japanese_nopad_ci
+#define WEIGHT_PAD_SPACE (256 * (int) ' ')
+#define WEIGHT_MB1(x) (256 * (int) sort_order_cp932[(uchar) (x)])
+#define WEIGHT_MB2(x,y) (cp932code(x, y))
+#include "strcoll.ic"
+
+
+#define DEFINE_STRNNCOLLSP_NOPAD
+#define MY_FUNCTION_NAME(x) my_ ## x ## _cp932_nopad_bin
+#define WEIGHT_PAD_SPACE (256 * (int) ' ')
+#define WEIGHT_MB1(x) (256 * (int) (uchar) (x))
+#define WEIGHT_MB2(x,y) (cp932code(x, y))
+#include "strcoll.ic"
+
+
static MY_COLLATION_HANDLER my_collation_handler_cp932_japanese_ci=
{
NULL, /* init */
@@ -34678,6 +34694,38 @@ static MY_COLLATION_HANDLER my_collation_handler_cp932_bin=
};
+static MY_COLLATION_HANDLER my_collation_handler_cp932_japanese_nopad_ci=
+{
+ NULL, /* init */
+ my_strnncoll_cp932_japanese_ci,
+ my_strnncollsp_cp932_japanese_nopad_ci,
+ my_strnxfrm_mb_nopad,
+ my_strnxfrmlen_simple,
+ my_like_range_mb,
+ my_wildcmp_mb,
+ my_strcasecmp_8bit,
+ my_instr_mb,
+ my_hash_sort_simple_nopad,
+ my_propagate_simple
+};
+
+
+static MY_COLLATION_HANDLER my_collation_handler_cp932_nopad_bin=
+{
+ NULL, /* init */
+ my_strnncoll_cp932_bin,
+ my_strnncollsp_cp932_nopad_bin,
+ my_strnxfrm_mb_nopad,
+ my_strnxfrmlen_simple,
+ my_like_range_mb,
+ my_wildcmp_mb_bin,
+ my_strcasecmp_mb_bin,
+ my_instr_mb,
+ my_hash_sort_mb_nopad_bin,
+ my_propagate_simple
+};
+
+
static MY_CHARSET_HANDLER my_charset_handler=
{
NULL, /* init */
@@ -34776,4 +34824,69 @@ struct charset_info_st my_charset_cp932_bin=
&my_collation_handler_cp932_bin
};
+
+struct charset_info_st my_charset_cp932_japanese_nopad_ci=
+{
+ MY_NOPAD_ID(95),0,0, /* number */
+ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_NOPAD, /* state */
+ "cp932", /* cs name */
+ "cp932_japanese_nopad_ci",/* name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_cp932,
+ to_lower_cp932,
+ to_upper_cp932,
+ sort_order_cp932,
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_caseinfo_cp932, /* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
+ 1, /* mbminlen */
+ 2, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 0xFCFC, /* max_sort_char */
+ ' ', /* pad char */
+ 1, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_handler,
+ &my_collation_handler_cp932_japanese_nopad_ci
+};
+
+struct charset_info_st my_charset_cp932_nopad_bin=
+{
+ MY_NOPAD_ID(96),0,0, /* number */
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD, /* state */
+ "cp932", /* cs name */
+ "cp932_nopad_bin", /* name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_cp932,
+ to_lower_cp932,
+ to_upper_cp932,
+ NULL, /* sort_order */
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_caseinfo_cp932, /* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
+ 1, /* mbminlen */
+ 2, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 0xFCFC, /* max_sort_char */
+ ' ', /* pad char */
+ 1, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_handler,
+ &my_collation_handler_cp932_nopad_bin
+};
+
#endif
diff --git a/strings/ctype-euc_kr.c b/strings/ctype-euc_kr.c
index d2389136c49..e2a50da2ed4 100644
--- a/strings/ctype-euc_kr.c
+++ b/strings/ctype-euc_kr.c
@@ -9938,6 +9938,20 @@ my_mb_wc_euc_kr(CHARSET_INFO *cs __attribute__((unused)),
#include "strcoll.ic"
+#define DEFINE_STRNNCOLLSP_NOPAD
+#define MY_FUNCTION_NAME(x) my_ ## x ## _euckr_korean_nopad_ci
+#define WEIGHT_MB1(x) (sort_order_euc_kr[(uchar) (x)])
+#define WEIGHT_MB2(x,y) (euckrcode(x, y))
+#include "strcoll.ic"
+
+
+#define DEFINE_STRNNCOLLSP_NOPAD
+#define MY_FUNCTION_NAME(x) my_ ## x ## _euckr_nopad_bin
+#define WEIGHT_MB1(x) ((uchar) (x))
+#define WEIGHT_MB2(x,y) (euckrcode(x, y))
+#include "strcoll.ic"
+
+
static MY_COLLATION_HANDLER my_collation_handler_euckr_korean_ci=
{
NULL, /* init */
@@ -9970,6 +9984,38 @@ static MY_COLLATION_HANDLER my_collation_handler_euckr_bin=
};
+static MY_COLLATION_HANDLER my_collation_handler_euckr_korean_nopad_ci=
+{
+ NULL, /* init */
+ my_strnncoll_euckr_korean_ci,
+ my_strnncollsp_euckr_korean_nopad_ci,
+ my_strnxfrm_mb_nopad,
+ my_strnxfrmlen_simple,
+ my_like_range_mb,
+ my_wildcmp_mb,
+ my_strcasecmp_mb,
+ my_instr_mb,
+ my_hash_sort_simple_nopad,
+ my_propagate_simple
+};
+
+
+static MY_COLLATION_HANDLER my_collation_handler_euckr_nopad_bin=
+{
+ NULL, /* init */
+ my_strnncoll_euckr_bin,
+ my_strnncollsp_euckr_nopad_bin,
+ my_strnxfrm_mb_nopad,
+ my_strnxfrmlen_simple,
+ my_like_range_mb,
+ my_wildcmp_mb_bin,
+ my_strcasecmp_mb_bin,
+ my_instr_mb,
+ my_hash_sort_mb_nopad_bin,
+ my_propagate_simple
+};
+
+
static MY_CHARSET_HANDLER my_charset_handler=
{
NULL, /* init */
@@ -10069,4 +10115,70 @@ struct charset_info_st my_charset_euckr_bin=
&my_collation_handler_euckr_bin
};
+
+struct charset_info_st my_charset_euckr_korean_nopad_ci=
+{
+ MY_NOPAD_ID(19),0,0,/* number */
+ MY_CS_COMPILED|MY_CS_NOPAD, /* state */
+ "euckr", /* cs name */
+ "euckr_korean_nopad_ci", /* name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_euc_kr,
+ to_lower_euc_kr,
+ to_upper_euc_kr,
+ sort_order_euc_kr,
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_caseinfo_euckr, /* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
+ 1, /* mbminlen */
+ 2, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 0xFEFE, /* max_sort_char */
+ ' ', /* pad char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_handler,
+ &my_collation_handler_euckr_korean_nopad_ci
+};
+
+
+struct charset_info_st my_charset_euckr_nopad_bin=
+{
+ MY_NOPAD_ID(85),0,0,/* number */
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD, /* state */
+ "euckr", /* cs name */
+ "euckr_nopad_bin", /* name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_euc_kr,
+ to_lower_euc_kr,
+ to_upper_euc_kr,
+ NULL, /* sort_order */
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_caseinfo_euckr, /* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
+ 1, /* mbminlen */
+ 2, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 0xFEFE, /* max_sort_char */
+ ' ', /* pad char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_handler,
+ &my_collation_handler_euckr_nopad_bin
+};
+
#endif
diff --git a/strings/ctype-eucjpms.c b/strings/ctype-eucjpms.c
index caafd1d13b4..47d03bd5d99 100644
--- a/strings/ctype-eucjpms.c
+++ b/strings/ctype-eucjpms.c
@@ -221,6 +221,26 @@ static const uchar sort_order_eucjpms[]=
#include "strcoll.ic"
+#define DEFINE_STRNNCOLLSP_NOPAD
+#define MY_FUNCTION_NAME(x) my_ ## x ## _eucjpms_japanese_nopad_ci
+#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
+#define WEIGHT_MB1(x) ((int) sort_order_eucjpms[(uchar) (x)])
+#define WEIGHT_MB2(x,y) ((((uint) (uchar)(x)) << 16) | \
+ (((uint) (uchar) (y)) << 8))
+#define WEIGHT_MB3(x,y,z) (WEIGHT_MB2(x,y) | ((uint) (uchar) z))
+#include "strcoll.ic"
+
+
+#define DEFINE_STRNNCOLLSP_NOPAD
+#define MY_FUNCTION_NAME(x) my_ ## x ## _eucjpms_nopad_bin
+#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
+#define WEIGHT_MB1(x) ((int) (uchar) (x))
+#define WEIGHT_MB2(x,y) ((((uint) (uchar)(x)) << 16) | \
+ (((uint) (uchar) (y)) << 8))
+#define WEIGHT_MB3(x,y,z) (WEIGHT_MB2(x,y) | ((uint) (uchar) z))
+#include "strcoll.ic"
+
+
/* Case info pages for JIS-X-0208 range */
static MY_UNICASE_CHARACTER cA2[256]=
@@ -67502,6 +67522,38 @@ static MY_COLLATION_HANDLER my_collation_eucjpms_bin_handler =
};
+static MY_COLLATION_HANDLER my_collation_eucjpms_japanese_nopad_ci_handler =
+{
+ NULL, /* init */
+ my_strnncoll_eucjpms_japanese_ci,
+ my_strnncollsp_eucjpms_japanese_nopad_ci,
+ my_strnxfrm_mb_nopad, /* strnxfrm */
+ my_strnxfrmlen_simple,
+ my_like_range_mb, /* like_range */
+ my_wildcmp_mb, /* wildcmp */
+ my_strcasecmp_mb,
+ my_instr_mb,
+ my_hash_sort_simple_nopad,
+ my_propagate_simple
+};
+
+
+static MY_COLLATION_HANDLER my_collation_eucjpms_nopad_bin_handler =
+{
+ NULL, /* init */
+ my_strnncoll_eucjpms_bin,
+ my_strnncollsp_eucjpms_nopad_bin,
+ my_strnxfrm_mb_nopad,
+ my_strnxfrmlen_simple,
+ my_like_range_mb,
+ my_wildcmp_mb_bin,
+ my_strcasecmp_mb_bin,
+ my_instr_mb,
+ my_hash_sort_mb_nopad_bin,
+ my_propagate_simple
+};
+
+
static MY_CHARSET_HANDLER my_charset_handler=
{
NULL, /* init */
@@ -67603,4 +67655,70 @@ struct charset_info_st my_charset_eucjpms_bin=
};
+struct charset_info_st my_charset_eucjpms_japanese_nopad_ci=
+{
+ MY_NOPAD_ID(97),0,0, /* number */
+ MY_CS_COMPILED|MY_CS_NOPAD,/* state */
+ "eucjpms", /* cs name */
+ "eucjpms_japanese_nopad_ci", /* name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_eucjpms,
+ to_lower_eucjpms,
+ to_upper_eucjpms,
+ sort_order_eucjpms,
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_caseinfo_eucjpms,/* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 2, /* casedn_multiply */
+ 1, /* mbminlen */
+ 3, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 0xFEFE, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_handler,
+ &my_collation_eucjpms_japanese_nopad_ci_handler
+};
+
+
+struct charset_info_st my_charset_eucjpms_nopad_bin=
+{
+ MY_NOPAD_ID(98),0,0, /* number */
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD, /* state */
+ "eucjpms", /* cs name */
+ "eucjpms_nopad_bin", /* name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_eucjpms,
+ to_lower_eucjpms,
+ to_upper_eucjpms,
+ NULL, /* sort_order */
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_caseinfo_eucjpms,/* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 2, /* casedn_multiply */
+ 1, /* mbminlen */
+ 3, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 0xFEFE, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_handler,
+ &my_collation_eucjpms_nopad_bin_handler
+};
+
+
#endif
diff --git a/strings/ctype-extra.c b/strings/ctype-extra.c
index c690b6d0c18..a2eb2b80e49 100644
--- a/strings/ctype-extra.c
+++ b/strings/ctype-extra.c
@@ -8,6 +8,7 @@
/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
Copyright (c) 2000, 2011, Oracle and/or its affiliates.
+ Copyright 2008-2016 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
@@ -946,64 +947,6 @@ static const uint16 to_uni_ascii_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_cp1251
-static const uchar ctype_cp1251_bulgarian_ci[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00,
-0x01,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x01,0x01,0x01,
-0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x02,0x02,0x02,0x02,
-0x00,0x01,0x02,0x01,0x00,0x01,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x01,
-0x00,0x00,0x01,0x02,0x02,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x02,0x01,0x02,0x02,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02
-};
-
-static const uchar to_lower_cp1251_bulgarian_ci[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x90,0x83,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x9A,0x8B,0x9C,0x9D,0x9E,0x9F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA2,0xA2,0xBC,0xA4,0xB4,0xA6,0xA7,0xB8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xBF,
-0xB0,0xB1,0xB3,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBE,0xBE,0xBF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_cp1251_bulgarian_ci[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x81,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x80,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x8A,0x9B,0x8C,0x9D,0x8E,0x8F,
-0xA0,0xA1,0xA1,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB2,0xA5,0xB5,0xB6,0xB7,0xA8,0xB9,0xAA,0xBB,0xA3,0xBD,0xBD,0xAF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF
-};
-
static const uchar sort_order_cp1251_bulgarian_ci[] = {
0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
@@ -1023,41 +966,6 @@ static const uchar sort_order_cp1251_bulgarian_ci[] = {
0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B
};
-static const uint16 to_uni_cp1251_bulgarian_ci[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x0402,0x0403,0x201A,0x0453,0x201E,0x2026,0x2020,0x2021,
-0x20AC,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F,
-0x0452,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
-0x0000,0x2122,0x0459,0x203A,0x045A,0x045C,0x045B,0x045F,
-0x00A0,0x040E,0x045E,0x0408,0x00A4,0x0490,0x00A6,0x00A7,
-0x0401,0x00A9,0x0404,0x00AB,0x00AC,0x00AD,0x00AE,0x0407,
-0x00B0,0x00B1,0x0406,0x0456,0x0491,0x00B5,0x00B6,0x00B7,
-0x0451,0x2116,0x0454,0x00BB,0x0458,0x0405,0x0455,0x0457,
-0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417,
-0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,0x041F,
-0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426,0x0427,
-0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F,
-0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,
-0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,
-0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446,0x0447,
-0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E,0x044F
-};
-
#endif
#ifdef HAVE_CHARSET_latin1
@@ -1291,64 +1199,6 @@ static const uint16 to_uni_hebrew_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_latin7
-static const uchar ctype_latin7_estonian_cs[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20,
-0x01,0x20,0x10,0x20,0x10,0x10,0x00,0x00,0x20,0x10,0x20,0x10,0x20,0x10,0x10,0x10,
-0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20,0x00,0x20,0x10,0x20,0x10,0x10,0x20,
-0x48,0x20,0x10,0x10,0x10,0x20,0x10,0x10,0x10,0x10,0x01,0x10,0x10,0x10,0x10,0x01,
-0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x02,0x10,0x10,0x10,0x10,0x02,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10
-};
-
-static const uchar to_lower_latin7_estonian_cs[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xB8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xBF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_latin7_estonian_cs[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xA8,0xB9,0xAA,0xBB,0xBC,0xBD,0xBE,0xAF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
-};
-
static const uchar sort_order_latin7_estonian_cs[] = {
0x00,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x2E,0x2F,0x30,0x31,0x32,0x0A,0x0B,
0x0C,0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,
@@ -1368,102 +1218,9 @@ static const uchar sort_order_latin7_estonian_cs[] = {
0xDC,0xC3,0xC5,0xC9,0xCB,0xF3,0xF7,0x65,0xED,0xBD,0xD9,0xEB,0xF9,0xE2,0xE4,0x53
};
-static const uint16 to_uni_latin7_estonian_cs[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
-0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,
-0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,
-0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,
-0x00A0,0x201D,0x00A2,0x00A3,0x00A4,0x201E,0x00A6,0x00A7,
-0x00D8,0x00A9,0x0156,0x00AB,0x00AC,0x00AD,0x00AE,0x00C6,
-0x00B0,0x00B1,0x00B2,0x00B3,0x201C,0x00B5,0x00B6,0x00B7,
-0x00F8,0x00B9,0x0157,0x00BB,0x00BC,0x00BD,0x00BE,0x00E6,
-0x0104,0x012E,0x0100,0x0106,0x00C4,0x00C5,0x0118,0x0112,
-0x010C,0x00C9,0x0179,0x0116,0x0122,0x0136,0x012A,0x013B,
-0x0160,0x0143,0x0145,0x00D3,0x014C,0x00D5,0x00D6,0x00D7,
-0x0172,0x0141,0x015A,0x016A,0x00DC,0x017B,0x017D,0x00DF,
-0x0105,0x012F,0x0101,0x0107,0x00E4,0x00E5,0x0119,0x0113,
-0x010D,0x00E9,0x017A,0x0117,0x0123,0x0137,0x012B,0x013C,
-0x0161,0x0144,0x0146,0x00F3,0x014D,0x00F5,0x00F6,0x00F7,
-0x0173,0x0142,0x015B,0x016B,0x00FC,0x017C,0x017E,0x2019
-};
-
#endif
#ifdef HAVE_CHARSET_latin2
-static const uchar ctype_latin2_hungarian_ci[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x48,0x01,0x10,0x01,0x10,0x01,0x01,0x10,0x10,0x01,0x01,0x01,0x01,0x10,0x01,0x01,
-0x10,0x02,0x10,0x02,0x10,0x02,0x02,0x10,0x10,0x02,0x02,0x02,0x02,0x10,0x02,0x02,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10
-};
-
-static const uchar to_lower_latin2_hungarian_ci[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xB1,0xA2,0xB3,0xA4,0xB5,0xB6,0xA7,0xA8,0xB9,0xBA,0xBB,0xBC,0xAD,0xBE,0xBF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_latin2_hungarian_ci[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xA1,0xB2,0xA3,0xB4,0xA5,0xA6,0xB7,0xB8,0xA9,0xAA,0xAB,0xAC,0xBD,0xAE,0xAF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
-};
-
static const uchar sort_order_latin2_hungarian_ci[] = {
0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
@@ -1483,41 +1240,6 @@ static const uchar sort_order_latin2_hungarian_ci[] = {
0xFF,0x62,0x63,0x64,0x66,0x67,0x67,0xFF,0x6D,0x77,0x75,0x78,0x78,0x7E,0x74,0xFF
};
-static const uint16 to_uni_latin2_hungarian_ci[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
-0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,
-0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,
-0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,
-0x00A0,0x0104,0x02D8,0x0141,0x00A4,0x013D,0x015A,0x00A7,
-0x00A8,0x0160,0x015E,0x0164,0x0179,0x00AD,0x017D,0x017B,
-0x00B0,0x0105,0x02DB,0x0142,0x00B4,0x013E,0x015B,0x02C7,
-0x00B8,0x0161,0x015F,0x0165,0x017A,0x02DD,0x017E,0x017C,
-0x0154,0x00C1,0x00C2,0x0102,0x00C4,0x0139,0x0106,0x00C7,
-0x010C,0x00C9,0x0118,0x00CB,0x011A,0x00CD,0x00CE,0x010E,
-0x0110,0x0143,0x0147,0x00D3,0x00D4,0x0150,0x00D6,0x00D7,
-0x0158,0x016E,0x00DA,0x0170,0x00DC,0x00DD,0x0162,0x00DF,
-0x0155,0x00E1,0x00E2,0x0103,0x00E4,0x013A,0x0107,0x00E7,
-0x010D,0x00E9,0x0119,0x00EB,0x011B,0x00ED,0x00EE,0x010F,
-0x0111,0x0144,0x0148,0x00F3,0x00F4,0x0151,0x00F6,0x00F7,
-0x0159,0x016F,0x00FA,0x0171,0x00FC,0x00FD,0x0163,0x02D9
-};
-
#endif
#ifdef HAVE_CHARSET_koi8u
@@ -1636,64 +1358,6 @@ static const uint16 to_uni_koi8u_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_cp1251
-static const uchar ctype_cp1251_ukrainian_ci[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00,
-0x01,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x01,0x01,0x01,
-0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x02,0x02,0x02,0x02,
-0x00,0x01,0x02,0x01,0x00,0x01,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x01,
-0x00,0x00,0x01,0x02,0x02,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x02,0x01,0x02,0x02,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02
-};
-
-static const uchar to_lower_cp1251_ukrainian_ci[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x90,0x83,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x9A,0x8B,0x9C,0x9D,0x9E,0x9F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA2,0xA2,0xBC,0xA4,0xB4,0xA6,0xA7,0xB8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xBF,
-0xB0,0xB1,0xB3,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBE,0xBE,0xBF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_cp1251_ukrainian_ci[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x81,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x80,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x8A,0x9B,0x8C,0x9D,0x8E,0x8F,
-0xA0,0xA1,0xA1,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB2,0xA5,0xB5,0xB6,0xB7,0xA8,0xB9,0xAA,0xBB,0xA3,0xBD,0xBD,0xAF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF
-};
-
static const uchar sort_order_cp1251_ukrainian_ci[] = {
0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
@@ -1713,41 +1377,6 @@ static const uchar sort_order_cp1251_ukrainian_ci[] = {
0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,0xA0,0xA1,0xA2,0xA3,0xA4
};
-static const uint16 to_uni_cp1251_ukrainian_ci[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x0402,0x0403,0x201A,0x0453,0x201E,0x2026,0x2020,0x2021,
-0x20AC,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F,
-0x0452,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
-0x0000,0x2122,0x0459,0x203A,0x045A,0x045C,0x045B,0x045F,
-0x00A0,0x040E,0x045E,0x0408,0x00A4,0x0490,0x00A6,0x00A7,
-0x0401,0x00A9,0x0404,0x00AB,0x00AC,0x00AD,0x00AE,0x0407,
-0x00B0,0x00B1,0x0406,0x0456,0x0491,0x00B5,0x00B6,0x00B7,
-0x0451,0x2116,0x0454,0x00BB,0x0458,0x0405,0x0455,0x0457,
-0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417,
-0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,0x041F,
-0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426,0x0427,
-0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F,
-0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,
-0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,
-0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446,0x0447,
-0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E,0x044F
-};
-
#endif
#ifdef HAVE_CHARSET_greek
@@ -1981,64 +1610,6 @@ static const uint16 to_uni_cp1250_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_latin2
-static const uchar ctype_latin2_croatian_ci[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x48,0x01,0x10,0x01,0x10,0x01,0x01,0x10,0x10,0x01,0x01,0x01,0x01,0x10,0x01,0x01,
-0x10,0x02,0x10,0x02,0x10,0x02,0x02,0x10,0x10,0x02,0x02,0x02,0x02,0x10,0x02,0x02,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10
-};
-
-static const uchar to_lower_latin2_croatian_ci[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xB1,0xA2,0xB3,0xA4,0xB5,0xB6,0xA7,0xA8,0xB9,0xBA,0xBB,0xBC,0xAD,0xBE,0xBF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_latin2_croatian_ci[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xA1,0xB2,0xA3,0xB4,0xA5,0xA6,0xB7,0xB8,0xA9,0xAA,0xAB,0xAC,0xBD,0xAE,0xAF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
-};
-
static const uchar sort_order_latin2_croatian_ci[] = {
0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
@@ -2058,102 +1629,9 @@ static const uchar sort_order_latin2_croatian_ci[] = {
0x4A,0x57,0x57,0x59,0x59,0x59,0x59,0xFE,0x5D,0x64,0x64,0x64,0x64,0x69,0x62,0xFF
};
-static const uint16 to_uni_latin2_croatian_ci[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
-0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,
-0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,
-0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,
-0x00A0,0x0104,0x02D8,0x0141,0x00A4,0x013D,0x015A,0x00A7,
-0x00A8,0x0160,0x015E,0x0164,0x0179,0x00AD,0x017D,0x017B,
-0x00B0,0x0105,0x02DB,0x0142,0x00B4,0x013E,0x015B,0x02C7,
-0x00B8,0x0161,0x015F,0x0165,0x017A,0x02DD,0x017E,0x017C,
-0x0154,0x00C1,0x00C2,0x0102,0x00C4,0x0139,0x0106,0x00C7,
-0x010C,0x00C9,0x0118,0x00CB,0x011A,0x00CD,0x00CE,0x010E,
-0x0110,0x0143,0x0147,0x00D3,0x00D4,0x0150,0x00D6,0x00D7,
-0x0158,0x016E,0x00DA,0x0170,0x00DC,0x00DD,0x0162,0x00DF,
-0x0155,0x00E1,0x00E2,0x0103,0x00E4,0x013A,0x0107,0x00E7,
-0x010D,0x00E9,0x0119,0x00EB,0x011B,0x00ED,0x00EE,0x010F,
-0x0111,0x0144,0x0148,0x00F3,0x00F4,0x0151,0x00F6,0x00F7,
-0x0159,0x016F,0x00FA,0x0171,0x00FC,0x00FD,0x0163,0x02D9
-};
-
#endif
#ifdef HAVE_CHARSET_cp1257
-static const uchar ctype_cp1257_lithuanian_ci[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x01,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x02,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00
-};
-
-static const uchar to_lower_cp1257_lithuanian_ci[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xB8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xBF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_cp1257_lithuanian_ci[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xA8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xAF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
-};
-
static const uchar sort_order_cp1257_lithuanian_ci[] = {
0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
@@ -2173,41 +1651,6 @@ static const uchar sort_order_cp1257_lithuanian_ci[] = {
0x5A,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x5E,0xFF,0xFF,0x5D,0xFF,0xFF,0xFF,0xFF
};
-static const uint16 to_uni_cp1257_lithuanian_ci[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x20AC,0x0000,0x201A,0x0000,0x201E,0x2026,0x2020,0x2021,
-0x0000,0x2030,0x0000,0x2039,0x0000,0x00A8,0x02C7,0x00B8,
-0x0000,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
-0x0000,0x2122,0x0000,0x203A,0x0000,0x00AF,0x02DB,0x0000,
-0x00A0,0x0000,0x00A2,0x00A3,0x00A4,0x0000,0x00A6,0x00A7,
-0x00D8,0x00A9,0x0156,0x00AB,0x00AC,0x00AD,0x00AE,0x00C6,
-0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,
-0x00F8,0x00B9,0x0157,0x00BB,0x00BC,0x00BD,0x00BE,0x00E6,
-0x0104,0x012E,0x0100,0x0106,0x00C4,0x00C5,0x0118,0x0112,
-0x010C,0x00C9,0x0179,0x0116,0x0122,0x0136,0x012A,0x013B,
-0x0160,0x0143,0x0145,0x00D3,0x014C,0x00D5,0x00D6,0x00D7,
-0x0172,0x0141,0x015A,0x016A,0x00DC,0x017B,0x017D,0x00DF,
-0x0105,0x012F,0x0101,0x0107,0x00E4,0x00E5,0x0119,0x0113,
-0x010D,0x00E9,0x017A,0x0117,0x0123,0x0137,0x012B,0x013C,
-0x0161,0x0144,0x0146,0x00F3,0x014D,0x00F5,0x00F6,0x00F7,
-0x0173,0x0142,0x015B,0x016B,0x00FC,0x017C,0x017E,0x02D9
-};
-
#endif
#ifdef HAVE_CHARSET_latin5
@@ -3131,64 +2574,6 @@ static const uint16 to_uni_latin7_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_latin7
-static const uchar ctype_latin7_general_cs[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20,
-0x01,0x20,0x10,0x20,0x10,0x10,0x00,0x00,0x20,0x10,0x20,0x10,0x20,0x10,0x10,0x10,
-0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20,0x00,0x20,0x10,0x20,0x10,0x10,0x20,
-0x48,0x20,0x10,0x10,0x10,0x20,0x10,0x10,0x10,0x10,0x01,0x10,0x10,0x10,0x10,0x01,
-0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x02,0x10,0x10,0x10,0x10,0x02,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10
-};
-
-static const uchar to_lower_latin7_general_cs[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xB8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xBF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_latin7_general_cs[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xA8,0xB9,0xAA,0xBB,0xBC,0xBD,0xBE,0xAF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
-};
-
static const uchar sort_order_latin7_general_cs[] = {
0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
@@ -3208,198 +2593,12 @@ static const uchar sort_order_latin7_general_cs[] = {
0xE2,0xC5,0xC7,0xCB,0xCF,0xD1,0xCD,0x64,0xED,0xBD,0xDF,0xEB,0xE9,0xFB,0xFD,0x52
};
-static const uint16 to_uni_latin7_general_cs[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
-0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,
-0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,
-0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,
-0x00A0,0x201D,0x00A2,0x00A3,0x00A4,0x201E,0x00A6,0x00A7,
-0x00D8,0x00A9,0x0156,0x00AB,0x00AC,0x00AD,0x00AE,0x00C6,
-0x00B0,0x00B1,0x00B2,0x00B3,0x201C,0x00B5,0x00B6,0x00B7,
-0x00F8,0x00B9,0x0157,0x00BB,0x00BC,0x00BD,0x00BE,0x00E6,
-0x0104,0x012E,0x0100,0x0106,0x00C4,0x00C5,0x0118,0x0112,
-0x010C,0x00C9,0x0179,0x0116,0x0122,0x0136,0x012A,0x013B,
-0x0160,0x0143,0x0145,0x00D3,0x014C,0x00D5,0x00D6,0x00D7,
-0x0172,0x0141,0x015A,0x016A,0x00DC,0x017B,0x017D,0x00DF,
-0x0105,0x012F,0x0101,0x0107,0x00E4,0x00E5,0x0119,0x0113,
-0x010D,0x00E9,0x017A,0x0117,0x0123,0x0137,0x012B,0x013C,
-0x0161,0x0144,0x0146,0x00F3,0x014D,0x00F5,0x00F6,0x00F7,
-0x0173,0x0142,0x015B,0x016B,0x00FC,0x017C,0x017E,0x2019
-};
-
#endif
#ifdef HAVE_CHARSET_macce
-static const uchar ctype_macce_bin[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00,
-0x01,0x01,0x02,0x01,0x01,0x01,0x01,0x02,0x02,0x01,0x02,0x02,0x01,0x02,0x02,0x01,
-0x02,0x01,0x02,0x02,0x01,0x02,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x02,0x02,
-0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x02,0x01,
-0x02,0x01,0x00,0x00,0x02,0x01,0x00,0x00,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,
-0x02,0x01,0x00,0x00,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x01,0x02,0x01,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x02,0x01,0x00,0x00,0x02,0x01,
-0x02,0x01,0x00,0x00,0x02,0x01,0x02,0x01,0x01,0x02,0x01,0x01,0x02,0x01,0x01,0x01,
-0x02,0x01,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x02,0x01,0x01,0x02,0x01,0x00
-};
-
-static const uchar to_lower_macce_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x54,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x54,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x8A,0x82,0x82,0x8E,0x88,0x9A,0x9F,0x87,0x88,0x8B,0x8A,0x8B,0x8D,0x8D,0x8E,0x90,
-0x90,0x93,0x92,0x93,0x95,0x95,0x98,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9E,0x9E,0x9F,
-0xA0,0xA1,0xAB,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xB0,
-0xB0,0xB4,0xB2,0xB3,0xB4,0xFA,0xB6,0xB7,0xB8,0xBA,0xBA,0xBC,0xBC,0xBE,0xBE,0xC0,
-0xC0,0xC4,0xC2,0xC3,0xC4,0xCB,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCE,0x9B,0xCE,0xD8,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xDA,0xDA,0xDE,0xDC,0xDD,0xDE,0xE0,
-0xE0,0xE4,0xE2,0xE3,0xE4,0xE6,0xE6,0x87,0xE9,0xE9,0x92,0xEC,0xEC,0xF0,0x97,0x99,
-0xF0,0xF3,0x9C,0xF3,0xF5,0xF5,0xF7,0xF7,0xF9,0xF9,0xFA,0xFD,0xB8,0xFD,0xAE,0xFF
-};
-
-static const uchar to_upper_macce_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x74,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x74,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x81,0x83,0x84,0x85,0x86,0xE7,0x84,0x89,0x80,0x89,0x8C,0x8C,0x83,0x8F,
-0x8F,0x91,0xEA,0x91,0x94,0x94,0x96,0xEE,0x96,0xEF,0x85,0xCD,0xF2,0x9D,0x9D,0x86,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xA2,0xAC,0xAD,0xFE,0xAF,
-0xAF,0xB1,0xB2,0xB3,0xB1,0xB5,0xB6,0xB7,0xFC,0xB9,0xB9,0xBB,0xBB,0xBD,0xBD,0xBF,
-0xBF,0xC1,0xC2,0xC3,0xC1,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xC5,0xCC,0xCD,0xCC,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xCF,0xD9,0xD9,0xDB,0xDC,0xDD,0xDB,0xDF,
-0xDF,0xE1,0xE2,0xE3,0xE1,0xE5,0xE5,0xE7,0xE8,0xE8,0xEA,0xEB,0xEB,0xED,0xEE,0xEF,
-0xED,0xF1,0xF2,0xF1,0xF4,0xF4,0xF6,0xF6,0xF8,0xF8,0xB5,0xFB,0xFC,0xFB,0xFE,0xFF
-};
-
-static const uint16 to_uni_macce_bin[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x00C4,0x0100,0x0101,0x00C9,0x0104,0x00D6,0x00DC,0x00E1,
-0x0105,0x010C,0x00E4,0x010D,0x0106,0x0107,0x00E9,0x0179,
-0x017A,0x010E,0x00ED,0x010F,0x0112,0x0113,0x0116,0x00F3,
-0x0117,0x00F4,0x00F6,0x00F5,0x00FA,0x011A,0x011B,0x00FC,
-0x2020,0x00B0,0x0118,0x00A3,0x00A7,0x2022,0x00B6,0x00DF,
-0x00AE,0x00A9,0x2122,0x0119,0x00A8,0x2260,0x0123,0x012E,
-0x012F,0x012A,0x2264,0x2265,0x012B,0x0136,0x2202,0x2211,
-0x0142,0x013B,0x013C,0x013D,0x013E,0x0139,0x013A,0x0145,
-0x0146,0x0143,0x00AC,0x221A,0x0144,0x0147,0x2206,0x00AB,
-0x00BB,0x2026,0x00A0,0x0148,0x0150,0x00D5,0x0151,0x014C,
-0x2013,0x2014,0x201C,0x201D,0x2018,0x2019,0x00F7,0x25CA,
-0x014D,0x0154,0x0155,0x0158,0x2039,0x203A,0x0159,0x0156,
-0x0157,0x0160,0x201A,0x201E,0x0161,0x015A,0x015B,0x00C1,
-0x0164,0x0165,0x00CD,0x017D,0x017E,0x016A,0x00D3,0x00D4,
-0x016B,0x016E,0x00DA,0x016F,0x0170,0x0171,0x0172,0x0173,
-0x00DD,0x00FD,0x0137,0x017B,0x0141,0x017C,0x0122,0x02C7
-};
-
#endif
#ifdef HAVE_CHARSET_cp1250
-static const uchar ctype_cp1250_croatian_ci[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20,
-0x20,0x20,0x10,0x20,0x10,0x10,0x10,0x10,0x20,0x10,0x01,0x10,0x01,0x01,0x01,0x01,
-0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20,0x10,0x02,0x10,0x02,0x02,0x02,0x02,
-0x48,0x10,0x10,0x01,0x10,0x01,0x10,0x01,0x10,0x10,0x01,0x10,0x10,0x10,0x10,0x01,
-0x10,0x10,0x10,0x02,0x10,0x10,0x10,0x10,0x10,0x02,0x02,0x10,0x01,0x10,0x02,0x02,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10
-};
-
-static const uchar to_lower_cp1250_croatian_ci[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x9A,0x8B,0x9C,0x9D,0x9E,0x9F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xB3,0xA4,0xB9,0xA6,0xA7,0xA8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xBF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBE,0xBD,0xBE,0xBF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_cp1250_croatian_ci[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x8A,0x9B,0x8C,0x8D,0x8E,0x8F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xA3,0xB4,0xB5,0xB6,0xB7,0xB8,0xA5,0xAA,0xBB,0xBC,0xBD,0xBC,0xAF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
-};
-
static const uchar sort_order_cp1250_croatian_ci[] = {
0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
@@ -3419,41 +2618,6 @@ static const uchar sort_order_cp1250_croatian_ci[] = {
0x4A,0x57,0x57,0x59,0x59,0x59,0x59,0xC9,0x5D,0x64,0x64,0x64,0x64,0x69,0x62,0xFF
};
-static const uint16 to_uni_cp1250_croatian_ci[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x20AC,0x0000,0x201A,0x0000,0x201E,0x2026,0x2020,0x2021,
-0x0000,0x2030,0x0160,0x2039,0x015A,0x0164,0x017D,0x0179,
-0x0000,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
-0x0000,0x2122,0x0161,0x203A,0x015B,0x0165,0x017E,0x017A,
-0x00A0,0x02C7,0x02D8,0x0141,0x00A4,0x0104,0x00A6,0x00A7,
-0x00A8,0x00A9,0x015E,0x00AB,0x00AC,0x00AD,0x00AE,0x017B,
-0x00B0,0x00B1,0x02DB,0x0142,0x00B4,0x00B5,0x00B6,0x00B7,
-0x00B8,0x0105,0x015F,0x00BB,0x013D,0x02DD,0x013E,0x017C,
-0x0154,0x00C1,0x00C2,0x0102,0x00C4,0x0139,0x0106,0x00C7,
-0x010C,0x00C9,0x0118,0x00CB,0x011A,0x00CD,0x00CE,0x010E,
-0x0110,0x0143,0x0147,0x00D3,0x00D4,0x0150,0x00D6,0x00D7,
-0x0158,0x016E,0x00DA,0x0170,0x00DC,0x00DD,0x0162,0x00DF,
-0x0155,0x00E1,0x00E2,0x0103,0x00E4,0x013A,0x0107,0x00E7,
-0x010D,0x00E9,0x0119,0x00EB,0x011B,0x00ED,0x00EE,0x010F,
-0x0111,0x0144,0x0148,0x00F3,0x00F4,0x0151,0x00F6,0x00F7,
-0x0159,0x016F,0x00FA,0x0171,0x00FC,0x00FD,0x0163,0x02D9
-};
-
#endif
#ifdef HAVE_CHARSET_latin1
@@ -3687,99 +2851,6 @@ static const uint16 to_uni_latin1_general_cs[] = {
#endif
#ifdef HAVE_CHARSET_cp1251
-static const uchar ctype_cp1251_bin[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00,
-0x01,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x01,0x01,0x01,
-0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x02,0x02,0x02,0x02,
-0x00,0x01,0x02,0x01,0x00,0x01,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x01,
-0x00,0x00,0x01,0x02,0x02,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x02,0x01,0x02,0x02,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02
-};
-
-static const uchar to_lower_cp1251_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x90,0x83,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x9A,0x8B,0x9C,0x9D,0x9E,0x9F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA2,0xA2,0xBC,0xA4,0xB4,0xA6,0xA7,0xB8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xBF,
-0xB0,0xB1,0xB3,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBE,0xBE,0xBF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_cp1251_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x81,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x80,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x8A,0x9B,0x8C,0x9D,0x8E,0x8F,
-0xA0,0xA1,0xA1,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB2,0xA5,0xB5,0xB6,0xB7,0xA8,0xB9,0xAA,0xBB,0xA3,0xBD,0xBD,0xAF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF
-};
-
-static const uint16 to_uni_cp1251_bin[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x0402,0x0403,0x201A,0x0453,0x201E,0x2026,0x2020,0x2021,
-0x20AC,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F,
-0x0452,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
-0x0000,0x2122,0x0459,0x203A,0x045A,0x045C,0x045B,0x045F,
-0x00A0,0x040E,0x045E,0x0408,0x00A4,0x0490,0x00A6,0x00A7,
-0x0401,0x00A9,0x0404,0x00AB,0x00AC,0x00AD,0x00AE,0x0407,
-0x00B0,0x00B1,0x0406,0x0456,0x0491,0x00B5,0x00B6,0x00B7,
-0x0451,0x2116,0x0454,0x00BB,0x0458,0x0405,0x0455,0x0457,
-0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417,
-0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,0x041F,
-0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426,0x0427,
-0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F,
-0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,
-0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,
-0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446,0x0447,
-0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E,0x044F
-};
-
#endif
#ifdef HAVE_CHARSET_cp1251
@@ -3898,64 +2969,6 @@ static const uint16 to_uni_cp1251_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_cp1251
-static const uchar ctype_cp1251_general_cs[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00,
-0x01,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x01,0x01,0x01,
-0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x02,0x02,0x02,0x02,
-0x00,0x01,0x02,0x01,0x00,0x01,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x01,
-0x00,0x00,0x01,0x02,0x02,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x02,0x01,0x02,0x02,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02
-};
-
-static const uchar to_lower_cp1251_general_cs[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x90,0x83,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x9A,0x8B,0x9C,0x9D,0x9E,0x9F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA2,0xA2,0xBC,0xA4,0xB4,0xA6,0xA7,0xB8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xBF,
-0xB0,0xB1,0xB3,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBE,0xBE,0xBF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_cp1251_general_cs[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x81,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x80,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x8A,0x9B,0x8C,0x9D,0x8E,0x8F,
-0xA0,0xA1,0xA1,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB2,0xA5,0xB5,0xB6,0xB7,0xA8,0xB9,0xAA,0xBB,0xA3,0xBD,0xBD,0xAF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF
-};
-
static const uchar sort_order_cp1251_general_cs[] = {
0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
@@ -3975,137 +2988,9 @@ static const uchar sort_order_cp1251_general_cs[] = {
0xAE,0xB0,0xB2,0xB6,0xBA,0xBC,0xBE,0xC0,0xC4,0xC6,0xC8,0xCA,0xCC,0xCE,0xD0,0xD2
};
-static const uint16 to_uni_cp1251_general_cs[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x0402,0x0403,0x201A,0x0453,0x201E,0x2026,0x2020,0x2021,
-0x20AC,0x2030,0x0409,0x2039,0x040A,0x040C,0x040B,0x040F,
-0x0452,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
-0x0000,0x2122,0x0459,0x203A,0x045A,0x045C,0x045B,0x045F,
-0x00A0,0x040E,0x045E,0x0408,0x00A4,0x0490,0x00A6,0x00A7,
-0x0401,0x00A9,0x0404,0x00AB,0x00AC,0x00AD,0x00AE,0x0407,
-0x00B0,0x00B1,0x0406,0x0456,0x0491,0x00B5,0x00B6,0x00B7,
-0x0451,0x2116,0x0454,0x00BB,0x0458,0x0405,0x0455,0x0457,
-0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417,
-0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,0x041F,
-0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426,0x0427,
-0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F,
-0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,
-0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,
-0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446,0x0447,
-0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E,0x044F
-};
-
#endif
#ifdef HAVE_CHARSET_macroman
-static const uchar ctype_macroman_bin[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x10,
-0x20,0x01,0x01,0x01,0x01,0x01,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x02,
-0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x01,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x00,0x01,0x01,0x01,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
-};
-
-static const uchar to_lower_macroman_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x8A,0x8C,0x8D,0x8E,0x96,0x9A,0x9F,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xBE,0xBF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0x88,0x8B,0x9B,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD8,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0x89,0x90,0x87,0x91,0x8F,0x92,0x94,0x95,0x93,0x97,0x99,
-0xF0,0x98,0x9C,0x9E,0x9D,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_macroman_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0xE7,0xCB,0xE5,0x80,0xCC,0x81,0x82,0x83,0xE9,
-0xE6,0xE8,0xEA,0xED,0xEB,0xEC,0x84,0xEE,0xF1,0xEF,0x85,0xCD,0xF2,0xF4,0xF3,0x86,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xAE,0xAF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD9,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uint16 to_uni_macroman_bin[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x00C4,0x00C5,0x00C7,0x00C9,0x00D1,0x00D6,0x00DC,0x00E1,
-0x00E0,0x00E2,0x00E4,0x00E3,0x00E5,0x00E7,0x00E9,0x00E8,
-0x00EA,0x00EB,0x00ED,0x00EC,0x00EE,0x00EF,0x00F1,0x00F3,
-0x00F2,0x00F4,0x00F6,0x00F5,0x00FA,0x00F9,0x00FB,0x00FC,
-0x2020,0x00B0,0x00A2,0x00A3,0x00A7,0x2022,0x00B6,0x00DF,
-0x00AE,0x00A9,0x2122,0x00B4,0x00A8,0x2260,0x00C6,0x00D8,
-0x221E,0x00B1,0x2264,0x2265,0x00A5,0x00B5,0x2202,0x2211,
-0x220F,0x03C0,0x222B,0x00AA,0x00BA,0x03A9,0x00E6,0x00F8,
-0x00BF,0x00A1,0x00AC,0x221A,0x0192,0x2248,0x2206,0x00AB,
-0x00BB,0x2026,0x00A0,0x00C0,0x00C3,0x00D5,0x0152,0x0153,
-0x2013,0x2014,0x201C,0x201D,0x2018,0x2019,0x00F7,0x25CA,
-0x00FF,0x0178,0x2044,0x20AC,0x2039,0x203A,0xFB01,0xFB02,
-0x2021,0x00B7,0x201A,0x201E,0x2030,0x00C2,0x00CA,0x00C1,
-0x00CB,0x00C8,0x00CD,0x00CE,0x00CF,0x00CC,0x00D3,0x00D4,
-0xF8FF,0x00D2,0x00DA,0x00DB,0x00D9,0x0131,0x02C6,0x02DC,
-0x00AF,0x02D8,0x02D9,0x02DA,0x00B8,0x02DD,0x02DB,0x02C7
-};
-
#endif
#ifdef HAVE_CHARSET_cp1256
@@ -4224,99 +3109,6 @@ static const uint16 to_uni_cp1256_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_cp1257
-static const uchar ctype_cp1257_bin[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x01,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x02,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00
-};
-
-static const uchar to_lower_cp1257_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xB8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xBF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_cp1257_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xA8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xAF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
-};
-
-static const uint16 to_uni_cp1257_bin[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x20AC,0x0000,0x201A,0x0000,0x201E,0x2026,0x2020,0x2021,
-0x0000,0x2030,0x0000,0x2039,0x0000,0x00A8,0x02C7,0x00B8,
-0x0000,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
-0x0000,0x2122,0x0000,0x203A,0x0000,0x00AF,0x02DB,0x0000,
-0x00A0,0x0000,0x00A2,0x00A3,0x00A4,0x0000,0x00A6,0x00A7,
-0x00D8,0x00A9,0x0156,0x00AB,0x00AC,0x00AD,0x00AE,0x00C6,
-0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,
-0x00F8,0x00B9,0x0157,0x00BB,0x00BC,0x00BD,0x00BE,0x00E6,
-0x0104,0x012E,0x0100,0x0106,0x00C4,0x00C5,0x0118,0x0112,
-0x010C,0x00C9,0x0179,0x0116,0x0122,0x0136,0x012A,0x013B,
-0x0160,0x0143,0x0145,0x00D3,0x014C,0x00D5,0x00D6,0x00D7,
-0x0172,0x0141,0x015A,0x016A,0x00DC,0x017B,0x017D,0x00DF,
-0x0105,0x012F,0x0101,0x0107,0x00E4,0x00E5,0x0119,0x0113,
-0x010D,0x00E9,0x017A,0x0117,0x0123,0x0137,0x012B,0x013C,
-0x0161,0x0144,0x0146,0x00F3,0x014D,0x00F5,0x00F6,0x00F7,
-0x0173,0x0142,0x015B,0x016B,0x00FC,0x017C,0x017E,0x02D9
-};
-
#endif
#ifdef HAVE_CHARSET_cp1257
@@ -4435,1731 +3227,57 @@ static const uint16 to_uni_cp1257_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_armscii8
-static const uchar ctype_armscii8_bin[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x10,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,
-0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,
-0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,
-0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,
-0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x10,0x10
-};
-
-static const uchar to_lower_armscii8_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xB8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB3,0xB3,0xB5,0xB5,0xB7,0xB7,0xB9,0xB9,0xBB,0xBB,0xBD,0xBD,0xBF,0xBF,
-0xC1,0xC1,0xC3,0xC3,0xC5,0xC5,0xC7,0xC7,0xC9,0xC9,0xCB,0xCB,0xCD,0xCD,0xCF,0xCF,
-0xD1,0xD1,0xD3,0xD3,0xD5,0xD5,0xD7,0xD7,0xD9,0xD9,0xDB,0xDB,0xDD,0xDD,0xDF,0xDF,
-0xE1,0xE1,0xE3,0xE3,0xE5,0xE5,0xE7,0xE7,0xE9,0xE9,0xEB,0xEB,0xED,0xED,0xEF,0xEF,
-0xF1,0xF1,0xF3,0xF3,0xF5,0xF5,0xF7,0xF7,0xF9,0xF9,0xFB,0xFB,0xFD,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_armscii8_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB2,0xB4,0xB4,0xB6,0xB6,0xB8,0xB8,0xBA,0xBA,0xBC,0xBC,0xBE,0xBE,
-0xC0,0xC0,0xC2,0xC2,0xC4,0xC4,0xC6,0xC6,0xC8,0xC8,0xCA,0xCA,0xCC,0xCC,0xCE,0xCE,
-0xD0,0xD0,0xD2,0xD2,0xD4,0xD4,0xD6,0xD6,0xD8,0xD8,0xDA,0xDA,0xDC,0xDC,0xDE,0xDE,
-0xE0,0xE0,0xE2,0xE2,0xE4,0xE4,0xE6,0xE6,0xE8,0xE8,0xEA,0xEA,0xEC,0xEC,0xEE,0xEE,
-0xF0,0xF0,0xF2,0xF2,0xF4,0xF4,0xF6,0xF6,0xF8,0xF8,0xFA,0xFA,0xFC,0xFC,0xFE,0xFF
-};
-
-static const uint16 to_uni_armscii8_bin[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
-0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,
-0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,
-0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,
-0x00A0,0x2741,0x00A7,0x0589,0x0029,0x0028,0x00BB,0x00AB,
-0x2014,0x002E,0x055D,0x002C,0x002D,0x055F,0x2026,0x055C,
-0x055B,0x055E,0x0531,0x0561,0x0532,0x0562,0x0533,0x0563,
-0x0534,0x0564,0x0535,0x0565,0x0536,0x0566,0x0537,0x0567,
-0x0538,0x0568,0x0539,0x0569,0x053A,0x056A,0x053B,0x056B,
-0x053C,0x056C,0x053D,0x056D,0x053E,0x056E,0x053F,0x056F,
-0x0540,0x0570,0x0541,0x0571,0x0542,0x0572,0x0543,0x0573,
-0x0544,0x0574,0x0545,0x0575,0x0546,0x0576,0x0547,0x0577,
-0x0548,0x0578,0x0549,0x0579,0x054A,0x057A,0x054B,0x057B,
-0x054C,0x057C,0x054D,0x057D,0x054E,0x057E,0x054F,0x057F,
-0x0550,0x0580,0x0551,0x0581,0x0552,0x0582,0x0553,0x0583,
-0x0554,0x0584,0x0555,0x0585,0x0556,0x0586,0x2019,0x0027
-};
-
#endif
#ifdef HAVE_CHARSET_ascii
-static const uchar ctype_ascii_bin[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
-};
-
-static const uchar to_lower_ascii_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_ascii_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uint16 to_uni_ascii_bin[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
-};
-
#endif
#ifdef HAVE_CHARSET_cp1250
-static const uchar ctype_cp1250_bin[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20,
-0x20,0x20,0x10,0x20,0x10,0x10,0x10,0x10,0x20,0x10,0x01,0x10,0x01,0x01,0x01,0x01,
-0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20,0x10,0x02,0x10,0x02,0x02,0x02,0x02,
-0x48,0x10,0x10,0x01,0x10,0x01,0x10,0x01,0x10,0x10,0x01,0x10,0x10,0x10,0x10,0x01,
-0x10,0x10,0x10,0x02,0x10,0x10,0x10,0x10,0x10,0x02,0x02,0x10,0x01,0x10,0x02,0x02,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10
-};
-
-static const uchar to_lower_cp1250_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x9A,0x8B,0x9C,0x9D,0x9E,0x9F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xB3,0xA4,0xB9,0xA6,0xA7,0xA8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xBF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBE,0xBD,0xBE,0xBF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_cp1250_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x8A,0x9B,0x8C,0x8D,0x8E,0x8F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xA3,0xB4,0xB5,0xB6,0xB7,0xB8,0xA5,0xAA,0xBB,0xBC,0xBD,0xBC,0xAF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
-};
-
-static const uint16 to_uni_cp1250_bin[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x20AC,0x0000,0x201A,0x0000,0x201E,0x2026,0x2020,0x2021,
-0x0000,0x2030,0x0160,0x2039,0x015A,0x0164,0x017D,0x0179,
-0x0000,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
-0x0000,0x2122,0x0161,0x203A,0x015B,0x0165,0x017E,0x017A,
-0x00A0,0x02C7,0x02D8,0x0141,0x00A4,0x0104,0x00A6,0x00A7,
-0x00A8,0x00A9,0x015E,0x00AB,0x00AC,0x00AD,0x00AE,0x017B,
-0x00B0,0x00B1,0x02DB,0x0142,0x00B4,0x00B5,0x00B6,0x00B7,
-0x00B8,0x0105,0x015F,0x00BB,0x013D,0x02DD,0x013E,0x017C,
-0x0154,0x00C1,0x00C2,0x0102,0x00C4,0x0139,0x0106,0x00C7,
-0x010C,0x00C9,0x0118,0x00CB,0x011A,0x00CD,0x00CE,0x010E,
-0x0110,0x0143,0x0147,0x00D3,0x00D4,0x0150,0x00D6,0x00D7,
-0x0158,0x016E,0x00DA,0x0170,0x00DC,0x00DD,0x0162,0x00DF,
-0x0155,0x00E1,0x00E2,0x0103,0x00E4,0x013A,0x0107,0x00E7,
-0x010D,0x00E9,0x0119,0x00EB,0x011B,0x00ED,0x00EE,0x010F,
-0x0111,0x0144,0x0148,0x00F3,0x00F4,0x0151,0x00F6,0x00F7,
-0x0159,0x016F,0x00FA,0x0171,0x00FC,0x00FD,0x0163,0x02D9
-};
-
#endif
#ifdef HAVE_CHARSET_cp1256
-static const uchar ctype_cp1256_bin[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x00,0x00,
-0x00,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20,
-0x00,0x03,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x03,0x00,
-0x03,0x10,0x10,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,
-0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x00,0x00,
-0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x00,0x00,0x00,0x10,
-0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
-0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
-0x02,0x03,0x02,0x03,0x03,0x03,0x03,0x02,0x02,0x02,0x02,0x02,0x03,0x03,0x02,0x02,
-0x03,0x03,0x03,0x03,0x02,0x03,0x03,0x00,0x03,0x02,0x03,0x02,0x02,0x00,0x00,0x00
-};
-
-static const uchar to_lower_cp1256_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x54,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x54,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x9C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_cp1256_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x74,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5F,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x74,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7F,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x8C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uint16 to_uni_cp1256_bin[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x20AC,0x067E,0x201A,0x0192,0x201E,0x2026,0x2020,0x2021,
-0x02C6,0x2030,0x0000,0x2039,0x0152,0x0686,0x0698,0x0000,
-0x06AF,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
-0x0000,0x2122,0x0000,0x203A,0x0153,0x200C,0x200D,0x0000,
-0x00A0,0x060C,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,
-0x00A8,0x00A9,0x0000,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,
-0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,
-0x00B8,0x00B9,0x061B,0x00BB,0x00BC,0x00BD,0x00BE,0x061F,
-0x0000,0x0621,0x0622,0x0623,0x0624,0x0625,0x0626,0x0627,
-0x0628,0x0629,0x062A,0x062B,0x062C,0x062D,0x062E,0x062F,
-0x0630,0x0631,0x0632,0x0633,0x0634,0x0635,0x0636,0x00D7,
-0x0637,0x0638,0x0639,0x063A,0x0640,0x0641,0x0642,0x0643,
-0x00E0,0x0644,0x00E2,0x0645,0x0646,0x0647,0x0648,0x00E7,
-0x00E8,0x00E9,0x00EA,0x00EB,0x0649,0x064A,0x00EE,0x00EF,
-0x064B,0x064C,0x064D,0x064E,0x00F4,0x064F,0x0650,0x00F7,
-0x0651,0x00F9,0x0652,0x00FB,0x00FC,0x200E,0x200F,0x0000
-};
-
#endif
#ifdef HAVE_CHARSET_cp866
-static const uchar ctype_cp866_bin[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48
-};
-
-static const uchar to_lower_cp866_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0x86,0x87,0x88,0x89,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0x86,0x87,0x88,0x89,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF1,0xF1,0xF3,0xF3,0xF5,0xF5,0xF7,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_cp866_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xF0,0xF0,0xF2,0xF2,0xF4,0xF4,0xF6,0xF6,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uint16 to_uni_cp866_bin[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0416,0x0417,
-0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,0x041F,
-0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426,0x0427,
-0x0428,0x0429,0x042A,0x042B,0x042C,0x042D,0x042E,0x042F,
-0x0430,0x0431,0x0432,0x0433,0x0434,0x0435,0x0436,0x0437,
-0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,0x043F,
-0x2591,0x2592,0x2593,0x2502,0x2524,0x2561,0x2562,0x2556,
-0x2555,0x2563,0x2551,0x2557,0x255D,0x255C,0x255B,0x2510,
-0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x255E,0x255F,
-0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x2567,
-0x2568,0x2564,0x2565,0x2559,0x2558,0x2552,0x2553,0x256B,
-0x256A,0x2518,0x250C,0x2588,0x2584,0x258C,0x2590,0x2580,
-0x0440,0x0441,0x0442,0x0443,0x0444,0x0445,0x0446,0x0447,
-0x0448,0x0449,0x044A,0x044B,0x044C,0x044D,0x044E,0x044F,
-0x0401,0x0451,0x0404,0x0454,0x0407,0x0457,0x040E,0x045E,
-0x00B0,0x2219,0x00B7,0x221A,0x207F,0x00B2,0x25A0,0x00A0
-};
-
#endif
#ifdef HAVE_CHARSET_dec8
-static const uchar ctype_dec8_bin[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02
-};
-
-static const uchar to_lower_dec8_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_dec8_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
-};
-
-static const uint16 to_uni_dec8_bin[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
-0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,
-0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,
-0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,
-0x00A0,0x00A1,0x00A2,0x00A3,0x0000,0x00A5,0x0000,0x00A7,
-0x00A4,0x00A9,0x00AA,0x00AB,0x0000,0x0000,0x0000,0x0000,
-0x00B0,0x00B1,0x00B2,0x00B3,0x0000,0x00B5,0x00B6,0x00B7,
-0x0000,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x0000,0x00BF,
-0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7,
-0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF,
-0x0000,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x0152,
-0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x0178,0x0000,0x00DF,
-0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7,
-0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF,
-0x0000,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x0153,
-0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FF,0x0000,0x0000
-};
-
#endif
#ifdef HAVE_CHARSET_greek
-static const uchar ctype_greek_bin[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x48,0x10,0x10,0x10,0x00,0x00,0x10,0x10,0x10,0x10,0x00,0x10,0x10,0x10,0x00,0x10,
-0x10,0x10,0x10,0x10,0x10,0x10,0x01,0x10,0x01,0x01,0x01,0x10,0x01,0x10,0x01,0x01,
-0x02,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00
-};
-
-static const uchar to_lower_greek_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xDC,0xB7,0xDD,0xDE,0xDF,0xBB,0xFC,0xBD,0xFD,0xFE,
-0xC0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xD2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xDC,0xDD,0xDE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_greek_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xDA,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xC1,0xC5,0xC7,0xC9,
-0xDB,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD3,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xCF,0xD5,0xD9,0xFF
-};
-
-static const uint16 to_uni_greek_bin[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
-0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,
-0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,
-0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,
-0x00A0,0x02BD,0x02BC,0x00A3,0x0000,0x0000,0x00A6,0x00A7,
-0x00A8,0x00A9,0x0000,0x00AB,0x00AC,0x00AD,0x0000,0x2015,
-0x00B0,0x00B1,0x00B2,0x00B3,0x0384,0x0385,0x0386,0x00B7,
-0x0388,0x0389,0x038A,0x00BB,0x038C,0x00BD,0x038E,0x038F,
-0x0390,0x0391,0x0392,0x0393,0x0394,0x0395,0x0396,0x0397,
-0x0398,0x0399,0x039A,0x039B,0x039C,0x039D,0x039E,0x039F,
-0x03A0,0x03A1,0x0000,0x03A3,0x03A4,0x03A5,0x03A6,0x03A7,
-0x03A8,0x03A9,0x03AA,0x03AB,0x03AC,0x03AD,0x03AE,0x03AF,
-0x03B0,0x03B1,0x03B2,0x03B3,0x03B4,0x03B5,0x03B6,0x03B7,
-0x03B8,0x03B9,0x03BA,0x03BB,0x03BC,0x03BD,0x03BE,0x03BF,
-0x03C0,0x03C1,0x03C2,0x03C3,0x03C4,0x03C5,0x03C6,0x03C7,
-0x03C8,0x03C9,0x03CA,0x03CB,0x03CC,0x03CD,0x03CE,0x0000
-};
-
#endif
#ifdef HAVE_CHARSET_hebrew
-static const uchar ctype_hebrew_bin[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x00,0x20,0x20,0x00
-};
-
-static const uchar to_lower_hebrew_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_hebrew_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uint16 to_uni_hebrew_bin[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
-0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,
-0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,
-0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,
-0x00A0,0x0000,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,
-0x00A8,0x00A9,0x00D7,0x00AB,0x00AC,0x00AD,0x00AE,0x203E,
-0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,
-0x00B8,0x00B9,0x00F7,0x00BB,0x00BC,0x00BD,0x00BE,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x2017,
-0x05D0,0x05D1,0x05D2,0x05D3,0x05D4,0x05D5,0x05D6,0x05D7,
-0x05D8,0x05D9,0x05DA,0x05DB,0x05DC,0x05DD,0x05DE,0x05DF,
-0x05E0,0x05E1,0x05E2,0x05E3,0x05E4,0x05E5,0x05E6,0x05E7,
-0x05E8,0x05E9,0x05EA,0x0000,0x0000,0x200E,0x200F,0x0000
-};
-
#endif
#ifdef HAVE_CHARSET_hp8
-static const uchar ctype_hp8_bin[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x20,0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x10,0x10,0x10,0x10,0x02,0x10,0x10,0x10,0x10,0x10,0x10,0x02,0x10,0x02,0x02,
-0x01,0x10,0x10,0x01,0x02,0x10,0x10,0x02,0x01,0x10,0x01,0x01,0x01,0x10,0x10,0x10,
-0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x10,0x20,0x20,0x20,0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20
-};
-
-static const uchar to_lower_hp8_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xC8,0xC0,0xC9,0xC1,0xCD,0xD1,0xDD,0xA8,0xA9,0xAA,0xAB,0xAC,0xCB,0xC3,0xAF,
-0xB0,0xB2,0xB2,0xB3,0xB5,0xB5,0xB7,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD4,0xD1,0xD6,0xD7,0xD4,0xD5,0xD6,0xD7,0xCC,0xD9,0xCE,0xCF,0xC5,0xDD,0xDE,0xC2,
-0xC4,0xE2,0xE2,0xE4,0xE4,0xD5,0xD9,0xC6,0xCA,0xEA,0xEA,0xEC,0xEC,0xC7,0xEF,0xEF,
-0xF1,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_hp8_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB1,0xB3,0xB4,0xB4,0xB6,0xB6,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xA2,0xA4,0xDF,0xAE,0xE0,0xDC,0xE7,0xED,0xA1,0xA3,0xE8,0xAD,0xD8,0xA5,0xDA,0xDB,
-0xD0,0xA6,0xD2,0xD3,0xD0,0xE5,0xD2,0xD3,0xD8,0xE6,0xDA,0xDB,0xDC,0xA7,0xDE,0xDF,
-0xE0,0xE1,0xE1,0xE3,0xE3,0xE5,0xE6,0xE7,0xE8,0xE9,0xE9,0xEB,0xEB,0xED,0xEE,0xEE,
-0xF0,0xF0,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uint16 to_uni_hp8_bin[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
-0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,
-0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,
-0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,
-0x00A0,0x00C0,0x00C2,0x00C8,0x00CA,0x00CB,0x00CE,0x00CF,
-0x00B4,0x02CB,0x02C6,0x00A8,0x02DC,0x00D9,0x00DB,0x20A4,
-0x00AF,0x00DD,0x00FD,0x00B0,0x00C7,0x00E7,0x00D1,0x00F1,
-0x00A1,0x00BF,0x00A4,0x00A3,0x00A5,0x00A7,0x0192,0x00A2,
-0x00E2,0x00EA,0x00F4,0x00FB,0x00E1,0x00E9,0x00F3,0x00FA,
-0x00E0,0x00E8,0x00F2,0x00F9,0x00E4,0x00EB,0x00F6,0x00FC,
-0x00C5,0x00EE,0x00D8,0x00C6,0x00E5,0x00ED,0x00F8,0x00E6,
-0x00C4,0x00EC,0x00D6,0x00DC,0x00C9,0x00EF,0x00DF,0x00D4,
-0x00C1,0x00C3,0x00E3,0x00D0,0x00F0,0x00CD,0x00CC,0x00D3,
-0x00D2,0x00D5,0x00F5,0x0160,0x0161,0x00DA,0x0178,0x00FF,
-0x00DE,0x00FE,0x00B7,0x00B5,0x00B6,0x00BE,0x2014,0x00BC,
-0x00BD,0x00AA,0x00BA,0x00AB,0x25A0,0x00BB,0x00B1,0x0000
-};
-
#endif
#ifdef HAVE_CHARSET_keybcs2
-static const uchar ctype_keybcs2_bin[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00,
-0x01,0x02,0x82,0x02,0x02,0x01,0x01,0x02,0x82,0x81,0x01,0x01,0x02,0x02,0x01,0x01,
-0x81,0x02,0x01,0x02,0x02,0x01,0x02,0x01,0x02,0x01,0x01,0x01,0x01,0x01,0x01,0x02,
-0x02,0x02,0x02,0x02,0x02,0x01,0x01,0x01,0x02,0x02,0x02,0x01,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x02,0x02,0x01,0x02,0x01,0x02,0x00,0x02,0x01,0x01,0x01,0x02,0x00,0x02,0x02,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48
-};
-
-static const uchar to_lower_keybcs2_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x87,0x81,0x82,0x83,0x84,0x83,0x86,0x87,0x88,0x88,0x8D,0xA1,0x8C,0x8D,0x84,0xA0,
-0x82,0x91,0x91,0x93,0x94,0xA2,0x96,0xA3,0x98,0x94,0x81,0x9B,0x8C,0x98,0xA9,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA4,0x96,0x93,0x9B,0xA9,0xAA,0xAA,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xED,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_keybcs2_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x68,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x87,0x9A,0x90,0x85,0x8E,0x85,0x86,0x80,0x89,0x89,0x8A,0x8B,0x9C,0x8A,0x8E,0x8F,
-0x90,0x92,0x92,0xA7,0x99,0x95,0xA6,0x97,0x9D,0x99,0x9A,0xA8,0x9C,0x9D,0x9E,0x9F,
-0x8F,0x8B,0x95,0x97,0xA5,0xA5,0xA6,0xA7,0xA8,0x9E,0xAB,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xE8,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uint16 to_uni_keybcs2_bin[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x010C,0x00FC,0x00E9,0x010F,0x00E4,0x010E,0x0164,0x010D,
-0x011B,0x011A,0x0139,0x00CD,0x013E,0x013A,0x00C4,0x00C1,
-0x00C9,0x017E,0x017D,0x00F4,0x00F6,0x00D3,0x016F,0x00DA,
-0x00FD,0x00D6,0x00DC,0x0160,0x013D,0x00DD,0x0158,0x0165,
-0x00E1,0x00ED,0x00F3,0x00FA,0x0148,0x0147,0x016E,0x00D4,
-0x0161,0x0159,0x0155,0x0154,0x00BC,0x00A1,0x00AB,0x00BB,
-0x2591,0x2592,0x2593,0x2502,0x2524,0x2561,0x2562,0x2556,
-0x2555,0x2563,0x2551,0x2557,0x255D,0x255C,0x255B,0x2510,
-0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x255E,0x255F,
-0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x2567,
-0x2568,0x2564,0x2565,0x2559,0x2558,0x2552,0x2553,0x256B,
-0x256A,0x2518,0x250C,0x2588,0x2584,0x258C,0x2590,0x2580,
-0x03B1,0x00DF,0x0393,0x03C0,0x03A3,0x03C3,0x00B5,0x03C4,
-0x03A6,0x0398,0x03A9,0x03B4,0x221E,0x03C6,0x03B5,0x2229,
-0x2261,0x00B1,0x2265,0x2264,0x2320,0x2321,0x00F7,0x2248,
-0x00B0,0x2219,0x00B7,0x221A,0x207F,0x00B2,0x25A0,0x00A0
-};
-
#endif
#ifdef HAVE_CHARSET_koi8r
-static const uchar ctype_koi8r_bin[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20,
-0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x10,0x10,0x02,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x10,0x10,0x01,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01
-};
-
-static const uchar to_lower_koi8r_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xA3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF
-};
-
-static const uchar to_upper_koi8r_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xB3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uint16 to_uni_koi8r_bin[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x2500,0x2502,0x250C,0x2510,0x2514,0x2518,0x251C,0x2524,
-0x252C,0x2534,0x253C,0x2580,0x2584,0x2588,0x258C,0x2590,
-0x2591,0x2592,0x2593,0x2320,0x25A0,0x2219,0x221A,0x2248,
-0x2264,0x2265,0x00A0,0x2321,0x00B0,0x00B2,0x00B7,0x00F7,
-0x2550,0x2551,0x2552,0x0451,0x2553,0x2554,0x2555,0x2556,
-0x2557,0x2558,0x2559,0x255A,0x255B,0x255C,0x255D,0x255E,
-0x255F,0x2560,0x2561,0x0401,0x2562,0x2563,0x2564,0x2565,
-0x2566,0x2567,0x2568,0x2569,0x256A,0x256B,0x256C,0x00A9,
-0x044E,0x0430,0x0431,0x0446,0x0434,0x0435,0x0444,0x0433,
-0x0445,0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,
-0x043F,0x044F,0x0440,0x0441,0x0442,0x0443,0x0436,0x0432,
-0x044C,0x044B,0x0437,0x0448,0x044D,0x0449,0x0447,0x044A,
-0x042E,0x0410,0x0411,0x0426,0x0414,0x0415,0x0424,0x0413,
-0x0425,0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,
-0x041F,0x042F,0x0420,0x0421,0x0422,0x0423,0x0416,0x0412,
-0x042C,0x042B,0x0417,0x0428,0x042D,0x0429,0x0427,0x042A
-};
-
#endif
#ifdef HAVE_CHARSET_koi8u
-static const uchar ctype_koi8u_bin[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20,
-0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x10,0x10,0x02,0x02,0x10,0x02,0x02,0x10,0x10,0x10,0x10,0x10,0x02,0x10,0x10,
-0x10,0x10,0x10,0x01,0x01,0x10,0x01,0x01,0x10,0x10,0x10,0x10,0x10,0x01,0x10,0x10,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01
-};
-
-static const uchar to_lower_koi8u_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x20,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x20,0x20,0x20,0xA3,0xA4,0x20,0xA6,0xA7,0x20,0x20,0x20,0x20,0x20,0xAD,0x20,0x20,
-0x20,0x20,0x20,0xA3,0xA4,0x20,0xA6,0xA7,0x20,0x20,0x20,0x20,0x20,0xAD,0x20,0x20,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF
-};
-
-static const uchar to_upper_koi8u_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x20,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x20,0x20,0x20,0xB3,0xB4,0x20,0xB6,0xB7,0x20,0x20,0x20,0x20,0x20,0xBD,0x20,0x20,
-0x20,0x20,0x20,0xB3,0xB4,0x20,0xB6,0xB7,0x20,0x20,0x20,0x20,0x20,0xBD,0x20,0x20,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uint16 to_uni_koi8u_bin[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x2500,0x2502,0x250C,0x2510,0x2514,0x2518,0x251C,0x2524,
-0x252C,0x2534,0x253C,0x2580,0x2584,0x2588,0x258C,0x2590,
-0x2591,0x2592,0x2593,0x2320,0x25A0,0x2022,0x221A,0x2248,
-0x2264,0x2265,0x00A0,0x2321,0x00B0,0x00B2,0x00B7,0x00F7,
-0x2550,0x2551,0x2552,0x0451,0x0454,0x2554,0x0456,0x0457,
-0x2557,0x2558,0x2559,0x255A,0x255B,0x0491,0x255D,0x255E,
-0x255F,0x2560,0x2561,0x0401,0x0404,0x2563,0x0406,0x0407,
-0x2566,0x2567,0x2568,0x2569,0x256A,0x0490,0x256C,0x00A9,
-0x044E,0x0430,0x0431,0x0446,0x0434,0x0435,0x0444,0x0433,
-0x0445,0x0438,0x0439,0x043A,0x043B,0x043C,0x043D,0x043E,
-0x043F,0x044F,0x0440,0x0441,0x0442,0x0443,0x0436,0x0432,
-0x044C,0x044B,0x0437,0x0448,0x044D,0x0449,0x0447,0x044A,
-0x042E,0x0410,0x0411,0x0426,0x0414,0x0415,0x0424,0x0413,
-0x0425,0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,
-0x041F,0x042F,0x0420,0x0421,0x0422,0x0423,0x0416,0x0412,
-0x042C,0x042B,0x0417,0x0428,0x042D,0x0429,0x0427,0x042A
-};
-
#endif
#ifdef HAVE_CHARSET_latin2
-static const uchar ctype_latin2_bin[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x48,0x01,0x10,0x01,0x10,0x01,0x01,0x10,0x10,0x01,0x01,0x01,0x01,0x10,0x01,0x01,
-0x10,0x02,0x10,0x02,0x10,0x02,0x02,0x10,0x10,0x02,0x02,0x02,0x02,0x10,0x02,0x02,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10
-};
-
-static const uchar to_lower_latin2_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xB1,0xA2,0xB3,0xA4,0xB5,0xB6,0xA7,0xA8,0xB9,0xBA,0xBB,0xBC,0xAD,0xBE,0xBF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_latin2_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xA1,0xB2,0xA3,0xB4,0xA5,0xA6,0xB7,0xB8,0xA9,0xAA,0xAB,0xAC,0xBD,0xAE,0xAF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
-};
-
-static const uint16 to_uni_latin2_bin[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
-0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,
-0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,
-0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,
-0x00A0,0x0104,0x02D8,0x0141,0x00A4,0x013D,0x015A,0x00A7,
-0x00A8,0x0160,0x015E,0x0164,0x0179,0x00AD,0x017D,0x017B,
-0x00B0,0x0105,0x02DB,0x0142,0x00B4,0x013E,0x015B,0x02C7,
-0x00B8,0x0161,0x015F,0x0165,0x017A,0x02DD,0x017E,0x017C,
-0x0154,0x00C1,0x00C2,0x0102,0x00C4,0x0139,0x0106,0x00C7,
-0x010C,0x00C9,0x0118,0x00CB,0x011A,0x00CD,0x00CE,0x010E,
-0x0110,0x0143,0x0147,0x00D3,0x00D4,0x0150,0x00D6,0x00D7,
-0x0158,0x016E,0x00DA,0x0170,0x00DC,0x00DD,0x0162,0x00DF,
-0x0155,0x00E1,0x00E2,0x0103,0x00E4,0x013A,0x0107,0x00E7,
-0x010D,0x00E9,0x0119,0x00EB,0x011B,0x00ED,0x00EE,0x010F,
-0x0111,0x0144,0x0148,0x00F3,0x00F4,0x0151,0x00F6,0x00F7,
-0x0159,0x016F,0x00FA,0x0171,0x00FC,0x00FD,0x0163,0x02D9
-};
-
#endif
#ifdef HAVE_CHARSET_latin5
-static const uchar ctype_latin5_bin[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02
-};
-
-static const uchar to_lower_latin5_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0xFD,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0x69,0xFE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_latin5_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0xDD,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0x49,0xDE,0xFF
-};
-
-static const uint16 to_uni_latin5_bin[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
-0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,
-0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,
-0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,
-0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,
-0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,
-0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,
-0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF,
-0x00C0,0x00C1,0x00C2,0x00C3,0x00C4,0x00C5,0x00C6,0x00C7,
-0x00C8,0x00C9,0x00CA,0x00CB,0x00CC,0x00CD,0x00CE,0x00CF,
-0x011E,0x00D1,0x00D2,0x00D3,0x00D4,0x00D5,0x00D6,0x00D7,
-0x00D8,0x00D9,0x00DA,0x00DB,0x00DC,0x0130,0x015E,0x00DF,
-0x00E0,0x00E1,0x00E2,0x00E3,0x00E4,0x00E5,0x00E6,0x00E7,
-0x00E8,0x00E9,0x00EA,0x00EB,0x00EC,0x00ED,0x00EE,0x00EF,
-0x011F,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7,
-0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x0131,0x015F,0x00FF
-};
-
#endif
#ifdef HAVE_CHARSET_latin7
-static const uchar ctype_latin7_bin[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20,
-0x01,0x20,0x10,0x20,0x10,0x10,0x00,0x00,0x20,0x10,0x20,0x10,0x20,0x10,0x10,0x10,
-0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20,0x00,0x20,0x10,0x20,0x10,0x10,0x20,
-0x48,0x20,0x10,0x10,0x10,0x20,0x10,0x10,0x10,0x10,0x01,0x10,0x10,0x10,0x10,0x01,
-0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x02,0x10,0x10,0x10,0x10,0x02,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10
-};
-
-static const uchar to_lower_latin7_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xB8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xBF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_latin7_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xA8,0xB9,0xAA,0xBB,0xBC,0xBD,0xBE,0xAF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
-};
-
-static const uint16 to_uni_latin7_bin[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,
-0x0088,0x0089,0x008A,0x008B,0x008C,0x008D,0x008E,0x008F,
-0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,
-0x0098,0x0099,0x009A,0x009B,0x009C,0x009D,0x009E,0x009F,
-0x00A0,0x201D,0x00A2,0x00A3,0x00A4,0x201E,0x00A6,0x00A7,
-0x00D8,0x00A9,0x0156,0x00AB,0x00AC,0x00AD,0x00AE,0x00C6,
-0x00B0,0x00B1,0x00B2,0x00B3,0x201C,0x00B5,0x00B6,0x00B7,
-0x00F8,0x00B9,0x0157,0x00BB,0x00BC,0x00BD,0x00BE,0x00E6,
-0x0104,0x012E,0x0100,0x0106,0x00C4,0x00C5,0x0118,0x0112,
-0x010C,0x00C9,0x0179,0x0116,0x0122,0x0136,0x012A,0x013B,
-0x0160,0x0143,0x0145,0x00D3,0x014C,0x00D5,0x00D6,0x00D7,
-0x0172,0x0141,0x015A,0x016A,0x00DC,0x017B,0x017D,0x00DF,
-0x0105,0x012F,0x0101,0x0107,0x00E4,0x00E5,0x0119,0x0113,
-0x010D,0x00E9,0x017A,0x0117,0x0123,0x0137,0x012B,0x013C,
-0x0161,0x0144,0x0146,0x00F3,0x014D,0x00F5,0x00F6,0x00F7,
-0x0173,0x0142,0x015B,0x016B,0x00FC,0x017C,0x017E,0x2019
-};
-
#endif
#ifdef HAVE_CHARSET_cp850
-static const uchar ctype_cp850_bin[] = {
-0x00,
-0x20,0x30,0x30,0x30,0x30,0x30,0x30,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x30,0x30,
-0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x20,0x30,0x30,0x30,0x30,0x30,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x30,
-0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x01,
-0x01,0x02,0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x01,0x02,0x10,0x01,0x10,0x10,
-0x02,0x02,0x02,0x02,0x02,0x01,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x10,0x10,0x10,0x10,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x10,0x10,0x10,0x10,0x10,0x02,0x01,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x02,0x01,0x01,0x01,0x01,0x02,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,0x01,0x10,
-0x01,0x02,0x01,0x01,0x02,0x01,0x10,0x02,0x01,0x01,0x01,0x01,0x02,0x01,0x10,0x10,
-0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20
-};
-
-static const uchar to_lower_cp850_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x87,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x84,0x86,
-0x82,0x91,0x91,0x93,0x94,0x95,0x96,0x97,0x98,0x94,0x81,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA4,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_cp850_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x9A,0x90,0x41,0x8E,0x41,0x8F,0x80,0x45,0x45,0x45,0x49,0x49,0x49,0x8E,0x8F,
-0x90,0x92,0x92,0x4F,0x99,0x4F,0x55,0x55,0x59,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0x41,0x49,0x4F,0x55,0xA5,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uint16 to_uni_cp850_bin[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x00C7,0x00FC,0x00E9,0x00E2,0x00E4,0x00E0,0x00E5,0x00E7,
-0x00EA,0x00EB,0x00E8,0x00EF,0x00EE,0x00EC,0x00C4,0x00C5,
-0x00C9,0x00E6,0x00C6,0x00F4,0x00F6,0x00F2,0x00FB,0x00F9,
-0x00FF,0x00D6,0x00DC,0x00F8,0x00A3,0x00D8,0x00D7,0x0192,
-0x00E1,0x00ED,0x00F3,0x00FA,0x00F1,0x00D1,0x00AA,0x00BA,
-0x00BF,0x00AE,0x00AC,0x00BD,0x00BC,0x00A1,0x00AB,0x00BB,
-0x2591,0x2592,0x2593,0x2502,0x2524,0x00C1,0x00C2,0x00C0,
-0x00A9,0x2563,0x2551,0x2557,0x255D,0x00A2,0x00A5,0x2510,
-0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x00E3,0x00C3,
-0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x00A4,
-0x00F0,0x00D0,0x00CA,0x00CB,0x00C8,0x0131,0x00CD,0x00CE,
-0x00CF,0x2518,0x250C,0x2588,0x2584,0x00A6,0x00CC,0x2580,
-0x00D3,0x00DF,0x00D4,0x00D2,0x00F5,0x00D5,0x00B5,0x00FE,
-0x00DE,0x00DA,0x00DB,0x00D9,0x00FD,0x00DD,0x00AF,0x00B4,
-0x00AD,0x00B1,0x2017,0x00BE,0x00B6,0x00A7,0x00F7,0x00B8,
-0x00B0,0x00A8,0x00B7,0x00B9,0x00B3,0x00B2,0x25A0,0x00A0
-};
-
#endif
#ifdef HAVE_CHARSET_cp852
-static const uchar ctype_cp852_bin[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x00,
-0x01,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x02,0x02,0x01,0x01,0x01,
-0x01,0x01,0x02,0x02,0x02,0x01,0x02,0x01,0x02,0x01,0x01,0x01,0x02,0x01,0x00,0x02,
-0x02,0x02,0x02,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x00,0x02,0x01,0x01,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x02,0x00,0x00,0x00,0x00,0x01,0x02,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x02,0x01,0x01,0x01,0x02,0x01,0x01,0x01,0x02,0x00,0x00,0x00,0x00,0x01,0x01,0x00,
-0x01,0x02,0x01,0x01,0x02,0x02,0x01,0x02,0x01,0x01,0x02,0x01,0x02,0x01,0x02,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x01,0x02,0x00,0x48
-};
-
-static const uchar to_lower_cp852_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x87,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8B,0x8B,0x8C,0xAB,0x84,0x86,
-0x82,0x92,0x92,0x93,0x94,0x96,0x96,0x98,0x98,0x94,0x81,0x9C,0x9C,0x88,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA5,0xA5,0xA7,0xA7,0xA9,0xA9,0xAA,0xAB,0x9F,0xB8,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xA0,0x83,0xD8,0xB8,0xB9,0xBA,0xBB,0xBC,0xBE,0xBE,0xBF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC7,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD0,0xD4,0x89,0xD4,0xE5,0xA1,0x8C,0xD8,0xD9,0xDA,0xDB,0xDC,0xEE,0x85,0xDF,
-0xA2,0xE1,0x93,0xE4,0xE4,0xE5,0xE7,0xE7,0xEA,0xA3,0xE8,0xFB,0xEC,0xEC,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_cp852_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x9A,0x90,0xB6,0x8E,0xDE,0x8F,0x80,0x9D,0xD3,0x8A,0x8A,0xD7,0x8D,0x8E,0x8F,
-0x90,0x91,0x91,0xE2,0x99,0x95,0x95,0x97,0x97,0x99,0x9A,0x9B,0x9B,0x9D,0x9E,0xAC,
-0xB5,0xD6,0xE0,0xE9,0xA4,0xA4,0xA6,0xA6,0xA8,0xA8,0xAA,0x8D,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xAD,0xB9,0xBA,0xBB,0xBC,0xBE,0xBD,0xBF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC6,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD1,0xD1,0xD2,0xD3,0xD2,0xD5,0xD6,0xD7,0xB7,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE3,0xD5,0xE6,0xE6,0xE8,0xE9,0xE8,0xEB,0xED,0xED,0xDD,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xEB,0xFC,0xFC,0xFE,0xFF
-};
-
-static const uint16 to_uni_cp852_bin[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x00C7,0x00FC,0x00E9,0x00E2,0x00E4,0x016F,0x0107,0x00E7,
-0x0142,0x00EB,0x0150,0x0151,0x00EE,0x0179,0x00C4,0x0106,
-0x00C9,0x0139,0x013A,0x00F4,0x00F6,0x013D,0x013E,0x015A,
-0x015B,0x00D6,0x00DC,0x0164,0x0165,0x0141,0x00D7,0x010D,
-0x00E1,0x00ED,0x00F3,0x00FA,0x0104,0x0105,0x017D,0x017E,
-0x0118,0x0119,0x00AC,0x017A,0x010C,0x015F,0x00AB,0x00BB,
-0x2591,0x2592,0x2593,0x2502,0x2524,0x00C1,0x00C2,0x011A,
-0x015E,0x2563,0x2551,0x2557,0x255D,0x017B,0x017C,0x2510,
-0x2514,0x2534,0x252C,0x251C,0x2500,0x253C,0x0102,0x0103,
-0x255A,0x2554,0x2569,0x2566,0x2560,0x2550,0x256C,0x00A4,
-0x0111,0x0110,0x010E,0x00CB,0x010F,0x0147,0x00CD,0x00CE,
-0x011B,0x2518,0x250C,0x2588,0x2584,0x0162,0x016E,0x2580,
-0x00D3,0x00DF,0x00D4,0x0143,0x0144,0x0148,0x0160,0x0161,
-0x0154,0x00DA,0x0155,0x0170,0x00FD,0x00DD,0x0163,0x00B4,
-0x00AD,0x02DD,0x02DB,0x02C7,0x02D8,0x00A7,0x00F7,0x00B8,
-0x00B0,0x00A8,0x02D9,0x0171,0x0158,0x0159,0x25A0,0x00A0
-};
-
#endif
#ifdef HAVE_CHARSET_swe7
-static const uchar ctype_swe7_bin[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x01,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,
-0x01,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x20,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
-};
-
-static const uchar to_lower_swe7_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_swe7_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uint16 to_uni_swe7_bin[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x00C9,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x00C4,0x00D6,0x00C5,0x00DC,0x005F,
-0x00E9,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x00E4,0x00F6,0x00E5,0x00FC,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
-};
-
#endif
#ifdef HAVE_CHARSET_geostd8
@@ -6278,99 +3396,6 @@ static const uint16 to_uni_geostd8_general_ci[] = {
#endif
#ifdef HAVE_CHARSET_geostd8
-static const uchar ctype_geostd8_bin[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20,
-0x00,0x00,0x10,0x00,0x10,0x10,0x10,0x10,0x00,0x10,0x00,0x10,0x00,0x00,0x00,0x00,
-0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,
-0x48,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
-0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
-0x03,0x03,0x03,0x03,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
-};
-
-static const uchar to_lower_geostd8_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_geostd8_bin[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBC,0xBD,0xBE,0xBF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uint16 to_uni_geostd8_bin[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x20AC,0x0000,0x201A,0x0000,0x201E,0x2026,0x2020,0x2021,
-0x0000,0x2030,0x0000,0x2039,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
-0x0000,0x0000,0x0000,0x203A,0x0000,0x0000,0x0000,0x0000,
-0x00A0,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,
-0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,
-0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,
-0x00B8,0x00B9,0x00BA,0x00BB,0x00BC,0x00BD,0x00BE,0x00BF,
-0x10D0,0x10D1,0x10D2,0x10D3,0x10D4,0x10D5,0x10D6,0x10F1,
-0x10D7,0x10D8,0x10D9,0x10DA,0x10DB,0x10DC,0x10F2,0x10DD,
-0x10DE,0x10DF,0x10E0,0x10E1,0x10E2,0x10F3,0x10E3,0x10E4,
-0x10E5,0x10E6,0x10E7,0x10E8,0x10E9,0x10EA,0x10EB,0x10EC,
-0x10ED,0x10EE,0x10F4,0x10EF,0x10F0,0x10F5,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-0x0000,0x0000,0x0000,0x0000,0x0000,0x2116,0x0000,0x0000
-};
-
#endif
#ifdef HAVE_CHARSET_latin1
@@ -6489,64 +3514,6 @@ static const uint16 to_uni_latin1_spanish_ci[] = {
#endif
#ifdef HAVE_CHARSET_cp1250
-static const uchar ctype_cp1250_polish_ci[] = {
-0x00,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x28,0x28,0x28,0x28,0x28,0x20,0x20,
-0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
-0x48,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
-0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x10,0x10,0x10,0x10,0x10,0x10,
-0x10,0x81,0x81,0x81,0x81,0x81,0x81,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x10,0x10,0x10,0x10,
-0x10,0x82,0x82,0x82,0x82,0x82,0x82,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x10,0x10,0x10,0x20,
-0x20,0x20,0x10,0x20,0x10,0x10,0x10,0x10,0x20,0x10,0x01,0x10,0x01,0x01,0x01,0x01,
-0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x20,0x10,0x02,0x10,0x02,0x02,0x02,0x02,
-0x48,0x10,0x10,0x01,0x10,0x01,0x10,0x01,0x10,0x10,0x01,0x10,0x10,0x10,0x10,0x01,
-0x10,0x10,0x10,0x02,0x10,0x10,0x10,0x10,0x10,0x02,0x02,0x10,0x01,0x10,0x02,0x02,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
-0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x10,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x10
-};
-
-static const uchar to_lower_cp1250_polish_ci[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6A,0x6B,0x6C,0x6D,0x6E,0x6F,
-0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x9A,0x8B,0x9C,0x9D,0x9E,0x9F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9A,0x9B,0x9C,0x9D,0x9E,0x9F,
-0xA0,0xA1,0xA2,0xB3,0xA4,0xB9,0xA6,0xA7,0xA8,0xA9,0xBA,0xAB,0xAC,0xAD,0xAE,0xBF,
-0xB0,0xB1,0xB2,0xB3,0xB4,0xB5,0xB6,0xB7,0xB8,0xB9,0xBA,0xBB,0xBE,0xBD,0xBE,0xBF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xD7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xDF,
-0xE0,0xE1,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xEA,0xEB,0xEC,0xED,0xEE,0xEF,
-0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
-};
-
-static const uchar to_upper_cp1250_polish_ci[] = {
-0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
-0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
-0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
-0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F,
-0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F,
-0x60,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4A,0x4B,0x4C,0x4D,0x4E,0x4F,
-0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x7B,0x7C,0x7D,0x7E,0x7F,
-0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8A,0x8B,0x8C,0x8D,0x8E,0x8F,
-0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x8A,0x9B,0x8C,0x8D,0x8E,0x8F,
-0xA0,0xA1,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xAA,0xAB,0xAC,0xAD,0xAE,0xAF,
-0xB0,0xB1,0xB2,0xA3,0xB4,0xB5,0xB6,0xB7,0xB8,0xA5,0xAA,0xBB,0xBC,0xBD,0xBC,0xAF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xD7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xDF,
-0xC0,0xC1,0xC2,0xC3,0xC4,0xC5,0xC6,0xC7,0xC8,0xC9,0xCA,0xCB,0xCC,0xCD,0xCE,0xCF,
-0xD0,0xD1,0xD2,0xD3,0xD4,0xD5,0xD6,0xF7,0xD8,0xD9,0xDA,0xDB,0xDC,0xDD,0xDE,0xFF
-};
-
static const uchar sort_order_cp1250_polish_ci[] = {
0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
@@ -6566,41 +3533,144 @@ static const uchar sort_order_cp1250_polish_ci[] = {
0x48,0x58,0x57,0x5A,0x59,0x59,0x59,0xC9,0x5D,0x64,0x64,0x64,0x64,0x69,0x62,0xFF
};
-static const uint16 to_uni_cp1250_polish_ci[] = {
-0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
-0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
-0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
-0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,0x001F,
-0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,
-0x0028,0x0029,0x002A,0x002B,0x002C,0x002D,0x002E,0x002F,
-0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,
-0x0038,0x0039,0x003A,0x003B,0x003C,0x003D,0x003E,0x003F,
-0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,
-0x0048,0x0049,0x004A,0x004B,0x004C,0x004D,0x004E,0x004F,
-0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,
-0x0058,0x0059,0x005A,0x005B,0x005C,0x005D,0x005E,0x005F,
-0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,
-0x0068,0x0069,0x006A,0x006B,0x006C,0x006D,0x006E,0x006F,
-0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,
-0x0078,0x0079,0x007A,0x007B,0x007C,0x007D,0x007E,0x007F,
-0x20AC,0x0000,0x201A,0x0000,0x201E,0x2026,0x2020,0x2021,
-0x0000,0x2030,0x0160,0x2039,0x015A,0x0164,0x017D,0x0179,
-0x0000,0x2018,0x2019,0x201C,0x201D,0x2022,0x2013,0x2014,
-0x0000,0x2122,0x0161,0x203A,0x015B,0x0165,0x017E,0x017A,
-0x00A0,0x02C7,0x02D8,0x0141,0x00A4,0x0104,0x00A6,0x00A7,
-0x00A8,0x00A9,0x015E,0x00AB,0x00AC,0x00AD,0x00AE,0x017B,
-0x00B0,0x00B1,0x02DB,0x0142,0x00B4,0x00B5,0x00B6,0x00B7,
-0x00B8,0x0105,0x015F,0x00BB,0x013D,0x02DD,0x013E,0x017C,
-0x0154,0x00C1,0x00C2,0x0102,0x00C4,0x0139,0x0106,0x00C7,
-0x010C,0x00C9,0x0118,0x00CB,0x011A,0x00CD,0x00CE,0x010E,
-0x0110,0x0143,0x0147,0x00D3,0x00D4,0x0150,0x00D6,0x00D7,
-0x0158,0x016E,0x00DA,0x0170,0x00DC,0x00DD,0x0162,0x00DF,
-0x0155,0x00E1,0x00E2,0x0103,0x00E4,0x013A,0x0107,0x00E7,
-0x010D,0x00E9,0x0119,0x00EB,0x011B,0x00ED,0x00EE,0x010F,
-0x0111,0x0144,0x0148,0x00F3,0x00F4,0x0151,0x00F6,0x00F7,
-0x0159,0x016F,0x00FA,0x0171,0x00FC,0x00FD,0x0163,0x02D9
-};
+#endif
+
+#ifdef HAVE_CHARSET_dec8
+#endif
+#ifdef HAVE_CHARSET_cp850
+#endif
+
+#ifdef HAVE_CHARSET_hp8
+#endif
+
+#ifdef HAVE_CHARSET_koi8r
+#endif
+
+#ifdef HAVE_CHARSET_latin2
+#endif
+
+#ifdef HAVE_CHARSET_swe7
+#endif
+
+#ifdef HAVE_CHARSET_ascii
+#endif
+
+#ifdef HAVE_CHARSET_hebrew
+#endif
+
+#ifdef HAVE_CHARSET_koi8u
+#endif
+
+#ifdef HAVE_CHARSET_greek
+#endif
+
+#ifdef HAVE_CHARSET_cp1250
+#endif
+
+#ifdef HAVE_CHARSET_latin5
+#endif
+
+#ifdef HAVE_CHARSET_armscii8
+#endif
+
+#ifdef HAVE_CHARSET_cp866
+#endif
+
+#ifdef HAVE_CHARSET_keybcs2
+#endif
+
+#ifdef HAVE_CHARSET_macce
+#endif
+
+#ifdef HAVE_CHARSET_macroman
+#endif
+
+#ifdef HAVE_CHARSET_cp852
+#endif
+
+#ifdef HAVE_CHARSET_latin7
+#endif
+
+#ifdef HAVE_CHARSET_macce
+#endif
+
+#ifdef HAVE_CHARSET_cp1251
+#endif
+
+#ifdef HAVE_CHARSET_cp1251
+#endif
+
+#ifdef HAVE_CHARSET_macroman
+#endif
+
+#ifdef HAVE_CHARSET_cp1256
+#endif
+
+#ifdef HAVE_CHARSET_cp1257
+#endif
+
+#ifdef HAVE_CHARSET_cp1257
+#endif
+
+#ifdef HAVE_CHARSET_armscii8
+#endif
+
+#ifdef HAVE_CHARSET_ascii
+#endif
+
+#ifdef HAVE_CHARSET_cp1250
+#endif
+
+#ifdef HAVE_CHARSET_cp1256
+#endif
+
+#ifdef HAVE_CHARSET_cp866
+#endif
+
+#ifdef HAVE_CHARSET_dec8
+#endif
+
+#ifdef HAVE_CHARSET_greek
+#endif
+
+#ifdef HAVE_CHARSET_hebrew
+#endif
+
+#ifdef HAVE_CHARSET_hp8
+#endif
+
+#ifdef HAVE_CHARSET_keybcs2
+#endif
+
+#ifdef HAVE_CHARSET_koi8r
+#endif
+
+#ifdef HAVE_CHARSET_koi8u
+#endif
+
+#ifdef HAVE_CHARSET_latin2
+#endif
+
+#ifdef HAVE_CHARSET_latin5
+#endif
+
+#ifdef HAVE_CHARSET_latin7
+#endif
+
+#ifdef HAVE_CHARSET_cp850
+#endif
+
+#ifdef HAVE_CHARSET_cp852
+#endif
+
+#ifdef HAVE_CHARSET_swe7
+#endif
+
+#ifdef HAVE_CHARSET_geostd8
+#endif
+
+#ifdef HAVE_CHARSET_geostd8
#endif
struct charset_info_st compiled_charsets[] = {
@@ -6613,11 +3683,11 @@ struct charset_info_st compiled_charsets[] = {
"", /* comment */
NULL, /* tailoring */
ctype_dec8_swedish_ci, /* ctype */
- to_lower_dec8_swedish_ci, /* lower */
- to_upper_dec8_swedish_ci, /* upper */
+ to_lower_dec8_swedish_ci, /* to_lower */
+ to_upper_dec8_swedish_ci, /* to_upper */
sort_order_dec8_swedish_ci, /* sort_order */
NULL, /* uca */
- to_uni_dec8_swedish_ci, /* to_uni */
+ to_uni_dec8_swedish_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -6646,11 +3716,11 @@ struct charset_info_st compiled_charsets[] = {
"", /* comment */
NULL, /* tailoring */
ctype_cp850_general_ci, /* ctype */
- to_lower_cp850_general_ci, /* lower */
- to_upper_cp850_general_ci, /* upper */
+ to_lower_cp850_general_ci, /* to_lower */
+ to_upper_cp850_general_ci, /* to_upper */
sort_order_cp850_general_ci, /* sort_order */
NULL, /* uca */
- to_uni_cp850_general_ci, /* to_uni */
+ to_uni_cp850_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -6679,11 +3749,11 @@ struct charset_info_st compiled_charsets[] = {
"", /* comment */
NULL, /* tailoring */
ctype_latin1_german1_ci, /* ctype */
- to_lower_latin1_german1_ci, /* lower */
- to_upper_latin1_german1_ci, /* upper */
+ to_lower_latin1_german1_ci, /* to_lower */
+ to_upper_latin1_german1_ci, /* to_upper */
sort_order_latin1_german1_ci, /* sort_order */
NULL, /* uca */
- to_uni_latin1_german1_ci, /* to_uni */
+ to_uni_latin1_german1_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -6712,11 +3782,11 @@ struct charset_info_st compiled_charsets[] = {
"", /* comment */
NULL, /* tailoring */
ctype_hp8_english_ci, /* ctype */
- to_lower_hp8_english_ci, /* lower */
- to_upper_hp8_english_ci, /* upper */
+ to_lower_hp8_english_ci, /* to_lower */
+ to_upper_hp8_english_ci, /* to_upper */
sort_order_hp8_english_ci, /* sort_order */
NULL, /* uca */
- to_uni_hp8_english_ci, /* to_uni */
+ to_uni_hp8_english_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -6745,11 +3815,11 @@ struct charset_info_st compiled_charsets[] = {
"", /* comment */
NULL, /* tailoring */
ctype_koi8r_general_ci, /* ctype */
- to_lower_koi8r_general_ci, /* lower */
- to_upper_koi8r_general_ci, /* upper */
+ to_lower_koi8r_general_ci, /* to_lower */
+ to_upper_koi8r_general_ci, /* to_upper */
sort_order_koi8r_general_ci, /* sort_order */
NULL, /* uca */
- to_uni_koi8r_general_ci, /* to_uni */
+ to_uni_koi8r_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -6778,11 +3848,11 @@ struct charset_info_st compiled_charsets[] = {
"", /* comment */
NULL, /* tailoring */
ctype_latin2_general_ci, /* ctype */
- to_lower_latin2_general_ci, /* lower */
- to_upper_latin2_general_ci, /* upper */
+ to_lower_latin2_general_ci, /* to_lower */
+ to_upper_latin2_general_ci, /* to_upper */
sort_order_latin2_general_ci, /* sort_order */
NULL, /* uca */
- to_uni_latin2_general_ci, /* to_uni */
+ to_uni_latin2_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -6811,11 +3881,11 @@ struct charset_info_st compiled_charsets[] = {
"", /* comment */
NULL, /* tailoring */
ctype_swe7_swedish_ci, /* ctype */
- to_lower_swe7_swedish_ci, /* lower */
- to_upper_swe7_swedish_ci, /* upper */
+ to_lower_swe7_swedish_ci, /* to_lower */
+ to_upper_swe7_swedish_ci, /* to_upper */
sort_order_swe7_swedish_ci, /* sort_order */
NULL, /* uca */
- to_uni_swe7_swedish_ci, /* to_uni */
+ to_uni_swe7_swedish_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -6844,11 +3914,11 @@ struct charset_info_st compiled_charsets[] = {
"", /* comment */
NULL, /* tailoring */
ctype_ascii_general_ci, /* ctype */
- to_lower_ascii_general_ci, /* lower */
- to_upper_ascii_general_ci, /* upper */
+ to_lower_ascii_general_ci, /* to_lower */
+ to_upper_ascii_general_ci, /* to_upper */
sort_order_ascii_general_ci, /* sort_order */
NULL, /* uca */
- to_uni_ascii_general_ci, /* to_uni */
+ to_uni_ascii_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -6876,12 +3946,12 @@ struct charset_info_st compiled_charsets[] = {
"cp1251_bulgarian_ci", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_cp1251_bulgarian_ci, /* ctype */
- to_lower_cp1251_bulgarian_ci, /* lower */
- to_upper_cp1251_bulgarian_ci, /* upper */
+ ctype_cp1251_general_ci, /* ctype */
+ to_lower_cp1251_general_ci, /* to_lower */
+ to_upper_cp1251_general_ci, /* to_upper */
sort_order_cp1251_bulgarian_ci, /* sort_order */
NULL, /* uca */
- to_uni_cp1251_bulgarian_ci, /* to_uni */
+ to_uni_cp1251_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -6910,11 +3980,11 @@ struct charset_info_st compiled_charsets[] = {
"", /* comment */
NULL, /* tailoring */
ctype_latin1_danish_ci, /* ctype */
- to_lower_latin1_danish_ci, /* lower */
- to_upper_latin1_danish_ci, /* upper */
+ to_lower_latin1_danish_ci, /* to_lower */
+ to_upper_latin1_danish_ci, /* to_upper */
sort_order_latin1_danish_ci, /* sort_order */
NULL, /* uca */
- to_uni_latin1_danish_ci, /* to_uni */
+ to_uni_latin1_danish_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -6943,11 +4013,11 @@ struct charset_info_st compiled_charsets[] = {
"", /* comment */
NULL, /* tailoring */
ctype_hebrew_general_ci, /* ctype */
- to_lower_hebrew_general_ci, /* lower */
- to_upper_hebrew_general_ci, /* upper */
+ to_lower_hebrew_general_ci, /* to_lower */
+ to_upper_hebrew_general_ci, /* to_upper */
sort_order_hebrew_general_ci, /* sort_order */
NULL, /* uca */
- to_uni_hebrew_general_ci, /* to_uni */
+ to_uni_hebrew_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -6975,12 +4045,12 @@ struct charset_info_st compiled_charsets[] = {
"latin7_estonian_cs", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_latin7_estonian_cs, /* ctype */
- to_lower_latin7_estonian_cs, /* lower */
- to_upper_latin7_estonian_cs, /* upper */
+ ctype_latin7_general_ci, /* ctype */
+ to_lower_latin7_general_ci, /* to_lower */
+ to_upper_latin7_general_ci, /* to_upper */
sort_order_latin7_estonian_cs, /* sort_order */
NULL, /* uca */
- to_uni_latin7_estonian_cs, /* to_uni */
+ to_uni_latin7_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7008,12 +4078,12 @@ struct charset_info_st compiled_charsets[] = {
"latin2_hungarian_ci", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_latin2_hungarian_ci, /* ctype */
- to_lower_latin2_hungarian_ci, /* lower */
- to_upper_latin2_hungarian_ci, /* upper */
+ ctype_latin2_general_ci, /* ctype */
+ to_lower_latin2_general_ci, /* to_lower */
+ to_upper_latin2_general_ci, /* to_upper */
sort_order_latin2_hungarian_ci, /* sort_order */
NULL, /* uca */
- to_uni_latin2_hungarian_ci, /* to_uni */
+ to_uni_latin2_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7042,11 +4112,11 @@ struct charset_info_st compiled_charsets[] = {
"", /* comment */
NULL, /* tailoring */
ctype_koi8u_general_ci, /* ctype */
- to_lower_koi8u_general_ci, /* lower */
- to_upper_koi8u_general_ci, /* upper */
+ to_lower_koi8u_general_ci, /* to_lower */
+ to_upper_koi8u_general_ci, /* to_upper */
sort_order_koi8u_general_ci, /* sort_order */
NULL, /* uca */
- to_uni_koi8u_general_ci, /* to_uni */
+ to_uni_koi8u_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7074,12 +4144,12 @@ struct charset_info_st compiled_charsets[] = {
"cp1251_ukrainian_ci", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_cp1251_ukrainian_ci, /* ctype */
- to_lower_cp1251_ukrainian_ci, /* lower */
- to_upper_cp1251_ukrainian_ci, /* upper */
+ ctype_cp1251_general_ci, /* ctype */
+ to_lower_cp1251_general_ci, /* to_lower */
+ to_upper_cp1251_general_ci, /* to_upper */
sort_order_cp1251_ukrainian_ci, /* sort_order */
NULL, /* uca */
- to_uni_cp1251_ukrainian_ci, /* to_uni */
+ to_uni_cp1251_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7108,11 +4178,11 @@ struct charset_info_st compiled_charsets[] = {
"", /* comment */
NULL, /* tailoring */
ctype_greek_general_ci, /* ctype */
- to_lower_greek_general_ci, /* lower */
- to_upper_greek_general_ci, /* upper */
+ to_lower_greek_general_ci, /* to_lower */
+ to_upper_greek_general_ci, /* to_upper */
sort_order_greek_general_ci, /* sort_order */
NULL, /* uca */
- to_uni_greek_general_ci, /* to_uni */
+ to_uni_greek_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7141,11 +4211,11 @@ struct charset_info_st compiled_charsets[] = {
"", /* comment */
NULL, /* tailoring */
ctype_cp1250_general_ci, /* ctype */
- to_lower_cp1250_general_ci, /* lower */
- to_upper_cp1250_general_ci, /* upper */
+ to_lower_cp1250_general_ci, /* to_lower */
+ to_upper_cp1250_general_ci, /* to_upper */
sort_order_cp1250_general_ci, /* sort_order */
NULL, /* uca */
- to_uni_cp1250_general_ci, /* to_uni */
+ to_uni_cp1250_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7173,12 +4243,12 @@ struct charset_info_st compiled_charsets[] = {
"latin2_croatian_ci", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_latin2_croatian_ci, /* ctype */
- to_lower_latin2_croatian_ci, /* lower */
- to_upper_latin2_croatian_ci, /* upper */
+ ctype_latin2_general_ci, /* ctype */
+ to_lower_latin2_general_ci, /* to_lower */
+ to_upper_latin2_general_ci, /* to_upper */
sort_order_latin2_croatian_ci, /* sort_order */
NULL, /* uca */
- to_uni_latin2_croatian_ci, /* to_uni */
+ to_uni_latin2_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7206,12 +4276,12 @@ struct charset_info_st compiled_charsets[] = {
"cp1257_lithuanian_ci", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_cp1257_lithuanian_ci, /* ctype */
- to_lower_cp1257_lithuanian_ci, /* lower */
- to_upper_cp1257_lithuanian_ci, /* upper */
+ ctype_cp1257_general_ci, /* ctype */
+ to_lower_cp1257_general_ci, /* to_lower */
+ to_upper_cp1257_general_ci, /* to_upper */
sort_order_cp1257_lithuanian_ci, /* sort_order */
NULL, /* uca */
- to_uni_cp1257_lithuanian_ci, /* to_uni */
+ to_uni_cp1257_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7240,11 +4310,11 @@ struct charset_info_st compiled_charsets[] = {
"", /* comment */
NULL, /* tailoring */
ctype_latin5_turkish_ci, /* ctype */
- to_lower_latin5_turkish_ci, /* lower */
- to_upper_latin5_turkish_ci, /* upper */
+ to_lower_latin5_turkish_ci, /* to_lower */
+ to_upper_latin5_turkish_ci, /* to_upper */
sort_order_latin5_turkish_ci, /* sort_order */
NULL, /* uca */
- to_uni_latin5_turkish_ci, /* to_uni */
+ to_uni_latin5_turkish_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7273,11 +4343,11 @@ struct charset_info_st compiled_charsets[] = {
"", /* comment */
NULL, /* tailoring */
ctype_armscii8_general_ci, /* ctype */
- to_lower_armscii8_general_ci, /* lower */
- to_upper_armscii8_general_ci, /* upper */
+ to_lower_armscii8_general_ci, /* to_lower */
+ to_upper_armscii8_general_ci, /* to_upper */
sort_order_armscii8_general_ci, /* sort_order */
NULL, /* uca */
- to_uni_armscii8_general_ci, /* to_uni */
+ to_uni_armscii8_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7306,11 +4376,11 @@ struct charset_info_st compiled_charsets[] = {
"", /* comment */
NULL, /* tailoring */
ctype_cp866_general_ci, /* ctype */
- to_lower_cp866_general_ci, /* lower */
- to_upper_cp866_general_ci, /* upper */
+ to_lower_cp866_general_ci, /* to_lower */
+ to_upper_cp866_general_ci, /* to_upper */
sort_order_cp866_general_ci, /* sort_order */
NULL, /* uca */
- to_uni_cp866_general_ci, /* to_uni */
+ to_uni_cp866_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7339,11 +4409,11 @@ struct charset_info_st compiled_charsets[] = {
"", /* comment */
NULL, /* tailoring */
ctype_keybcs2_general_ci, /* ctype */
- to_lower_keybcs2_general_ci, /* lower */
- to_upper_keybcs2_general_ci, /* upper */
+ to_lower_keybcs2_general_ci, /* to_lower */
+ to_upper_keybcs2_general_ci, /* to_upper */
sort_order_keybcs2_general_ci, /* sort_order */
NULL, /* uca */
- to_uni_keybcs2_general_ci, /* to_uni */
+ to_uni_keybcs2_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7372,11 +4442,11 @@ struct charset_info_st compiled_charsets[] = {
"", /* comment */
NULL, /* tailoring */
ctype_macce_general_ci, /* ctype */
- to_lower_macce_general_ci, /* lower */
- to_upper_macce_general_ci, /* upper */
+ to_lower_macce_general_ci, /* to_lower */
+ to_upper_macce_general_ci, /* to_upper */
sort_order_macce_general_ci, /* sort_order */
NULL, /* uca */
- to_uni_macce_general_ci, /* to_uni */
+ to_uni_macce_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7405,11 +4475,11 @@ struct charset_info_st compiled_charsets[] = {
"", /* comment */
NULL, /* tailoring */
ctype_macroman_general_ci, /* ctype */
- to_lower_macroman_general_ci, /* lower */
- to_upper_macroman_general_ci, /* upper */
+ to_lower_macroman_general_ci, /* to_lower */
+ to_upper_macroman_general_ci, /* to_upper */
sort_order_macroman_general_ci, /* sort_order */
NULL, /* uca */
- to_uni_macroman_general_ci, /* to_uni */
+ to_uni_macroman_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7438,11 +4508,11 @@ struct charset_info_st compiled_charsets[] = {
"", /* comment */
NULL, /* tailoring */
ctype_cp852_general_ci, /* ctype */
- to_lower_cp852_general_ci, /* lower */
- to_upper_cp852_general_ci, /* upper */
+ to_lower_cp852_general_ci, /* to_lower */
+ to_upper_cp852_general_ci, /* to_upper */
sort_order_cp852_general_ci, /* sort_order */
NULL, /* uca */
- to_uni_cp852_general_ci, /* to_uni */
+ to_uni_cp852_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7471,11 +4541,11 @@ struct charset_info_st compiled_charsets[] = {
"", /* comment */
NULL, /* tailoring */
ctype_latin7_general_ci, /* ctype */
- to_lower_latin7_general_ci, /* lower */
- to_upper_latin7_general_ci, /* upper */
+ to_lower_latin7_general_ci, /* to_lower */
+ to_upper_latin7_general_ci, /* to_upper */
sort_order_latin7_general_ci, /* sort_order */
NULL, /* uca */
- to_uni_latin7_general_ci, /* to_uni */
+ to_uni_latin7_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7503,12 +4573,12 @@ struct charset_info_st compiled_charsets[] = {
"latin7_general_cs", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_latin7_general_cs, /* ctype */
- to_lower_latin7_general_cs, /* lower */
- to_upper_latin7_general_cs, /* upper */
+ ctype_latin7_general_ci, /* ctype */
+ to_lower_latin7_general_ci, /* to_lower */
+ to_upper_latin7_general_ci, /* to_upper */
sort_order_latin7_general_cs, /* sort_order */
NULL, /* uca */
- to_uni_latin7_general_cs, /* to_uni */
+ to_uni_latin7_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7536,12 +4606,12 @@ struct charset_info_st compiled_charsets[] = {
"macce_bin", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_macce_bin, /* ctype */
- to_lower_macce_bin, /* lower */
- to_upper_macce_bin, /* upper */
+ ctype_macce_general_ci, /* ctype */
+ to_lower_macce_general_ci, /* to_lower */
+ to_upper_macce_general_ci, /* to_upper */
NULL, /* sort_order */
NULL, /* uca */
- to_uni_macce_bin, /* to_uni */
+ to_uni_macce_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7569,12 +4639,12 @@ struct charset_info_st compiled_charsets[] = {
"cp1250_croatian_ci", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_cp1250_croatian_ci, /* ctype */
- to_lower_cp1250_croatian_ci, /* lower */
- to_upper_cp1250_croatian_ci, /* upper */
+ ctype_cp1250_general_ci, /* ctype */
+ to_lower_cp1250_general_ci, /* to_lower */
+ to_upper_cp1250_general_ci, /* to_upper */
sort_order_cp1250_croatian_ci, /* sort_order */
NULL, /* uca */
- to_uni_cp1250_croatian_ci, /* to_uni */
+ to_uni_cp1250_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7603,11 +4673,11 @@ struct charset_info_st compiled_charsets[] = {
"", /* comment */
NULL, /* tailoring */
ctype_latin1_general_ci, /* ctype */
- to_lower_latin1_general_ci, /* lower */
- to_upper_latin1_general_ci, /* upper */
+ to_lower_latin1_general_ci, /* to_lower */
+ to_upper_latin1_general_ci, /* to_upper */
sort_order_latin1_general_ci, /* sort_order */
NULL, /* uca */
- to_uni_latin1_general_ci, /* to_uni */
+ to_uni_latin1_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7636,11 +4706,11 @@ struct charset_info_st compiled_charsets[] = {
"", /* comment */
NULL, /* tailoring */
ctype_latin1_general_cs, /* ctype */
- to_lower_latin1_general_cs, /* lower */
- to_upper_latin1_general_cs, /* upper */
+ to_lower_latin1_general_cs, /* to_lower */
+ to_upper_latin1_general_cs, /* to_upper */
sort_order_latin1_general_cs, /* sort_order */
NULL, /* uca */
- to_uni_latin1_general_cs, /* to_uni */
+ to_uni_latin1_general_cs, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7668,12 +4738,12 @@ struct charset_info_st compiled_charsets[] = {
"cp1251_bin", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_cp1251_bin, /* ctype */
- to_lower_cp1251_bin, /* lower */
- to_upper_cp1251_bin, /* upper */
+ ctype_cp1251_general_ci, /* ctype */
+ to_lower_cp1251_general_ci, /* to_lower */
+ to_upper_cp1251_general_ci, /* to_upper */
NULL, /* sort_order */
NULL, /* uca */
- to_uni_cp1251_bin, /* to_uni */
+ to_uni_cp1251_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7702,11 +4772,11 @@ struct charset_info_st compiled_charsets[] = {
"", /* comment */
NULL, /* tailoring */
ctype_cp1251_general_ci, /* ctype */
- to_lower_cp1251_general_ci, /* lower */
- to_upper_cp1251_general_ci, /* upper */
+ to_lower_cp1251_general_ci, /* to_lower */
+ to_upper_cp1251_general_ci, /* to_upper */
sort_order_cp1251_general_ci, /* sort_order */
NULL, /* uca */
- to_uni_cp1251_general_ci, /* to_uni */
+ to_uni_cp1251_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7734,12 +4804,12 @@ struct charset_info_st compiled_charsets[] = {
"cp1251_general_cs", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_cp1251_general_cs, /* ctype */
- to_lower_cp1251_general_cs, /* lower */
- to_upper_cp1251_general_cs, /* upper */
+ ctype_cp1251_general_ci, /* ctype */
+ to_lower_cp1251_general_ci, /* to_lower */
+ to_upper_cp1251_general_ci, /* to_upper */
sort_order_cp1251_general_cs, /* sort_order */
NULL, /* uca */
- to_uni_cp1251_general_cs, /* to_uni */
+ to_uni_cp1251_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7767,12 +4837,12 @@ struct charset_info_st compiled_charsets[] = {
"macroman_bin", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_macroman_bin, /* ctype */
- to_lower_macroman_bin, /* lower */
- to_upper_macroman_bin, /* upper */
+ ctype_macroman_general_ci, /* ctype */
+ to_lower_macroman_general_ci, /* to_lower */
+ to_upper_macroman_general_ci, /* to_upper */
NULL, /* sort_order */
NULL, /* uca */
- to_uni_macroman_bin, /* to_uni */
+ to_uni_macroman_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7801,11 +4871,11 @@ struct charset_info_st compiled_charsets[] = {
"", /* comment */
NULL, /* tailoring */
ctype_cp1256_general_ci, /* ctype */
- to_lower_cp1256_general_ci, /* lower */
- to_upper_cp1256_general_ci, /* upper */
+ to_lower_cp1256_general_ci, /* to_lower */
+ to_upper_cp1256_general_ci, /* to_upper */
sort_order_cp1256_general_ci, /* sort_order */
NULL, /* uca */
- to_uni_cp1256_general_ci, /* to_uni */
+ to_uni_cp1256_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7833,12 +4903,12 @@ struct charset_info_st compiled_charsets[] = {
"cp1257_bin", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_cp1257_bin, /* ctype */
- to_lower_cp1257_bin, /* lower */
- to_upper_cp1257_bin, /* upper */
+ ctype_cp1257_general_ci, /* ctype */
+ to_lower_cp1257_general_ci, /* to_lower */
+ to_upper_cp1257_general_ci, /* to_upper */
NULL, /* sort_order */
NULL, /* uca */
- to_uni_cp1257_bin, /* to_uni */
+ to_uni_cp1257_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7867,11 +4937,11 @@ struct charset_info_st compiled_charsets[] = {
"", /* comment */
NULL, /* tailoring */
ctype_cp1257_general_ci, /* ctype */
- to_lower_cp1257_general_ci, /* lower */
- to_upper_cp1257_general_ci, /* upper */
+ to_lower_cp1257_general_ci, /* to_lower */
+ to_upper_cp1257_general_ci, /* to_upper */
sort_order_cp1257_general_ci, /* sort_order */
NULL, /* uca */
- to_uni_cp1257_general_ci, /* to_uni */
+ to_uni_cp1257_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7899,12 +4969,12 @@ struct charset_info_st compiled_charsets[] = {
"armscii8_bin", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_armscii8_bin, /* ctype */
- to_lower_armscii8_bin, /* lower */
- to_upper_armscii8_bin, /* upper */
+ ctype_armscii8_general_ci, /* ctype */
+ to_lower_armscii8_general_ci, /* to_lower */
+ to_upper_armscii8_general_ci, /* to_upper */
NULL, /* sort_order */
NULL, /* uca */
- to_uni_armscii8_bin, /* to_uni */
+ to_uni_armscii8_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7932,12 +5002,12 @@ struct charset_info_st compiled_charsets[] = {
"ascii_bin", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_ascii_bin, /* ctype */
- to_lower_ascii_bin, /* lower */
- to_upper_ascii_bin, /* upper */
+ ctype_ascii_general_ci, /* ctype */
+ to_lower_ascii_general_ci, /* to_lower */
+ to_upper_ascii_general_ci, /* to_upper */
NULL, /* sort_order */
NULL, /* uca */
- to_uni_ascii_bin, /* to_uni */
+ to_uni_ascii_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7965,12 +5035,12 @@ struct charset_info_st compiled_charsets[] = {
"cp1250_bin", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_cp1250_bin, /* ctype */
- to_lower_cp1250_bin, /* lower */
- to_upper_cp1250_bin, /* upper */
+ ctype_cp1250_general_ci, /* ctype */
+ to_lower_cp1250_general_ci, /* to_lower */
+ to_upper_cp1250_general_ci, /* to_upper */
NULL, /* sort_order */
NULL, /* uca */
- to_uni_cp1250_bin, /* to_uni */
+ to_uni_cp1250_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -7998,12 +5068,12 @@ struct charset_info_st compiled_charsets[] = {
"cp1256_bin", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_cp1256_bin, /* ctype */
- to_lower_cp1256_bin, /* lower */
- to_upper_cp1256_bin, /* upper */
+ ctype_cp1256_general_ci, /* ctype */
+ to_lower_cp1256_general_ci, /* to_lower */
+ to_upper_cp1256_general_ci, /* to_upper */
NULL, /* sort_order */
NULL, /* uca */
- to_uni_cp1256_bin, /* to_uni */
+ to_uni_cp1256_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -8031,12 +5101,12 @@ struct charset_info_st compiled_charsets[] = {
"cp866_bin", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_cp866_bin, /* ctype */
- to_lower_cp866_bin, /* lower */
- to_upper_cp866_bin, /* upper */
+ ctype_cp866_general_ci, /* ctype */
+ to_lower_cp866_general_ci, /* to_lower */
+ to_upper_cp866_general_ci, /* to_upper */
NULL, /* sort_order */
NULL, /* uca */
- to_uni_cp866_bin, /* to_uni */
+ to_uni_cp866_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -8064,12 +5134,12 @@ struct charset_info_st compiled_charsets[] = {
"dec8_bin", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_dec8_bin, /* ctype */
- to_lower_dec8_bin, /* lower */
- to_upper_dec8_bin, /* upper */
+ ctype_dec8_swedish_ci, /* ctype */
+ to_lower_dec8_swedish_ci, /* to_lower */
+ to_upper_dec8_swedish_ci, /* to_upper */
NULL, /* sort_order */
NULL, /* uca */
- to_uni_dec8_bin, /* to_uni */
+ to_uni_dec8_swedish_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -8097,12 +5167,12 @@ struct charset_info_st compiled_charsets[] = {
"greek_bin", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_greek_bin, /* ctype */
- to_lower_greek_bin, /* lower */
- to_upper_greek_bin, /* upper */
+ ctype_greek_general_ci, /* ctype */
+ to_lower_greek_general_ci, /* to_lower */
+ to_upper_greek_general_ci, /* to_upper */
NULL, /* sort_order */
NULL, /* uca */
- to_uni_greek_bin, /* to_uni */
+ to_uni_greek_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -8130,12 +5200,12 @@ struct charset_info_st compiled_charsets[] = {
"hebrew_bin", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_hebrew_bin, /* ctype */
- to_lower_hebrew_bin, /* lower */
- to_upper_hebrew_bin, /* upper */
+ ctype_hebrew_general_ci, /* ctype */
+ to_lower_hebrew_general_ci, /* to_lower */
+ to_upper_hebrew_general_ci, /* to_upper */
NULL, /* sort_order */
NULL, /* uca */
- to_uni_hebrew_bin, /* to_uni */
+ to_uni_hebrew_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -8163,12 +5233,12 @@ struct charset_info_st compiled_charsets[] = {
"hp8_bin", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_hp8_bin, /* ctype */
- to_lower_hp8_bin, /* lower */
- to_upper_hp8_bin, /* upper */
+ ctype_hp8_english_ci, /* ctype */
+ to_lower_hp8_english_ci, /* to_lower */
+ to_upper_hp8_english_ci, /* to_upper */
NULL, /* sort_order */
NULL, /* uca */
- to_uni_hp8_bin, /* to_uni */
+ to_uni_hp8_english_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -8196,12 +5266,12 @@ struct charset_info_st compiled_charsets[] = {
"keybcs2_bin", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_keybcs2_bin, /* ctype */
- to_lower_keybcs2_bin, /* lower */
- to_upper_keybcs2_bin, /* upper */
+ ctype_keybcs2_general_ci, /* ctype */
+ to_lower_keybcs2_general_ci, /* to_lower */
+ to_upper_keybcs2_general_ci, /* to_upper */
NULL, /* sort_order */
NULL, /* uca */
- to_uni_keybcs2_bin, /* to_uni */
+ to_uni_keybcs2_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -8229,12 +5299,12 @@ struct charset_info_st compiled_charsets[] = {
"koi8r_bin", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_koi8r_bin, /* ctype */
- to_lower_koi8r_bin, /* lower */
- to_upper_koi8r_bin, /* upper */
+ ctype_koi8r_general_ci, /* ctype */
+ to_lower_koi8r_general_ci, /* to_lower */
+ to_upper_koi8r_general_ci, /* to_upper */
NULL, /* sort_order */
NULL, /* uca */
- to_uni_koi8r_bin, /* to_uni */
+ to_uni_koi8r_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -8262,12 +5332,12 @@ struct charset_info_st compiled_charsets[] = {
"koi8u_bin", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_koi8u_bin, /* ctype */
- to_lower_koi8u_bin, /* lower */
- to_upper_koi8u_bin, /* upper */
+ ctype_koi8u_general_ci, /* ctype */
+ to_lower_koi8u_general_ci, /* to_lower */
+ to_upper_koi8u_general_ci, /* to_upper */
NULL, /* sort_order */
NULL, /* uca */
- to_uni_koi8u_bin, /* to_uni */
+ to_uni_koi8u_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -8295,12 +5365,12 @@ struct charset_info_st compiled_charsets[] = {
"latin2_bin", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_latin2_bin, /* ctype */
- to_lower_latin2_bin, /* lower */
- to_upper_latin2_bin, /* upper */
+ ctype_latin2_general_ci, /* ctype */
+ to_lower_latin2_general_ci, /* to_lower */
+ to_upper_latin2_general_ci, /* to_upper */
NULL, /* sort_order */
NULL, /* uca */
- to_uni_latin2_bin, /* to_uni */
+ to_uni_latin2_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -8328,12 +5398,12 @@ struct charset_info_st compiled_charsets[] = {
"latin5_bin", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_latin5_bin, /* ctype */
- to_lower_latin5_bin, /* lower */
- to_upper_latin5_bin, /* upper */
+ ctype_latin5_turkish_ci, /* ctype */
+ to_lower_latin5_turkish_ci, /* to_lower */
+ to_upper_latin5_turkish_ci, /* to_upper */
NULL, /* sort_order */
NULL, /* uca */
- to_uni_latin5_bin, /* to_uni */
+ to_uni_latin5_turkish_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -8361,12 +5431,12 @@ struct charset_info_st compiled_charsets[] = {
"latin7_bin", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_latin7_bin, /* ctype */
- to_lower_latin7_bin, /* lower */
- to_upper_latin7_bin, /* upper */
+ ctype_latin7_general_ci, /* ctype */
+ to_lower_latin7_general_ci, /* to_lower */
+ to_upper_latin7_general_ci, /* to_upper */
NULL, /* sort_order */
NULL, /* uca */
- to_uni_latin7_bin, /* to_uni */
+ to_uni_latin7_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -8394,12 +5464,12 @@ struct charset_info_st compiled_charsets[] = {
"cp850_bin", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_cp850_bin, /* ctype */
- to_lower_cp850_bin, /* lower */
- to_upper_cp850_bin, /* upper */
+ ctype_cp850_general_ci, /* ctype */
+ to_lower_cp850_general_ci, /* to_lower */
+ to_upper_cp850_general_ci, /* to_upper */
NULL, /* sort_order */
NULL, /* uca */
- to_uni_cp850_bin, /* to_uni */
+ to_uni_cp850_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -8427,12 +5497,12 @@ struct charset_info_st compiled_charsets[] = {
"cp852_bin", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_cp852_bin, /* ctype */
- to_lower_cp852_bin, /* lower */
- to_upper_cp852_bin, /* upper */
+ ctype_cp852_general_ci, /* ctype */
+ to_lower_cp852_general_ci, /* to_lower */
+ to_upper_cp852_general_ci, /* to_upper */
NULL, /* sort_order */
NULL, /* uca */
- to_uni_cp852_bin, /* to_uni */
+ to_uni_cp852_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -8460,12 +5530,12 @@ struct charset_info_st compiled_charsets[] = {
"swe7_bin", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_swe7_bin, /* ctype */
- to_lower_swe7_bin, /* lower */
- to_upper_swe7_bin, /* upper */
+ ctype_swe7_swedish_ci, /* ctype */
+ to_lower_swe7_swedish_ci, /* to_lower */
+ to_upper_swe7_swedish_ci, /* to_upper */
NULL, /* sort_order */
NULL, /* uca */
- to_uni_swe7_bin, /* to_uni */
+ to_uni_swe7_swedish_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -8494,11 +5564,11 @@ struct charset_info_st compiled_charsets[] = {
"", /* comment */
NULL, /* tailoring */
ctype_geostd8_general_ci, /* ctype */
- to_lower_geostd8_general_ci, /* lower */
- to_upper_geostd8_general_ci, /* upper */
+ to_lower_geostd8_general_ci, /* to_lower */
+ to_upper_geostd8_general_ci, /* to_upper */
sort_order_geostd8_general_ci, /* sort_order */
NULL, /* uca */
- to_uni_geostd8_general_ci, /* to_uni */
+ to_uni_geostd8_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -8526,12 +5596,12 @@ struct charset_info_st compiled_charsets[] = {
"geostd8_bin", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_geostd8_bin, /* ctype */
- to_lower_geostd8_bin, /* lower */
- to_upper_geostd8_bin, /* upper */
+ ctype_geostd8_general_ci, /* ctype */
+ to_lower_geostd8_general_ci, /* to_lower */
+ to_upper_geostd8_general_ci, /* to_upper */
NULL, /* sort_order */
NULL, /* uca */
- to_uni_geostd8_bin, /* to_uni */
+ to_uni_geostd8_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -8560,11 +5630,11 @@ struct charset_info_st compiled_charsets[] = {
"", /* comment */
NULL, /* tailoring */
ctype_latin1_spanish_ci, /* ctype */
- to_lower_latin1_spanish_ci, /* lower */
- to_upper_latin1_spanish_ci, /* upper */
+ to_lower_latin1_spanish_ci, /* to_lower */
+ to_upper_latin1_spanish_ci, /* to_upper */
sort_order_latin1_spanish_ci, /* sort_order */
NULL, /* uca */
- to_uni_latin1_spanish_ci, /* to_uni */
+ to_uni_latin1_spanish_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -8592,12 +5662,12 @@ struct charset_info_st compiled_charsets[] = {
"cp1250_polish_ci", /* coll name */
"", /* comment */
NULL, /* tailoring */
- ctype_cp1250_polish_ci, /* ctype */
- to_lower_cp1250_polish_ci, /* lower */
- to_upper_cp1250_polish_ci, /* upper */
+ ctype_cp1250_general_ci, /* ctype */
+ to_lower_cp1250_general_ci, /* to_lower */
+ to_upper_cp1250_general_ci, /* to_upper */
sort_order_cp1250_polish_ci, /* sort_order */
NULL, /* uca */
- to_uni_cp1250_polish_ci, /* to_uni */
+ to_uni_cp1250_general_ci, /* to_uni */
NULL, /* from_uni */
&my_unicase_default, /* caseinfo */
NULL, /* state map */
@@ -8617,6 +5687,1524 @@ struct charset_info_st compiled_charsets[] = {
}
,
#endif
+#ifdef HAVE_CHARSET_dec8
+{
+ 1027,0,0,
+ MY_CS_COMPILED|MY_CS_NOPAD,
+ "dec8", /* cset name */
+ "dec8_swedish_nopad_ci", /* coll name */
+ "", /* comment */
+ "[import dec8_swedish_ci]", /* tailoring */
+ ctype_dec8_swedish_ci, /* ctype */
+ to_lower_dec8_swedish_ci, /* to_lower */
+ to_upper_dec8_swedish_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_dec8_swedish_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_simple_nopad_ci_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_cp850
+{
+ 1028,0,0,
+ MY_CS_COMPILED|MY_CS_NOPAD,
+ "cp850", /* cset name */
+ "cp850_general_nopad_ci", /* coll name */
+ "", /* comment */
+ "[import cp850_general_ci]", /* tailoring */
+ ctype_cp850_general_ci, /* ctype */
+ to_lower_cp850_general_ci, /* to_lower */
+ to_upper_cp850_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_cp850_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_simple_nopad_ci_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_hp8
+{
+ 1030,0,0,
+ MY_CS_COMPILED|MY_CS_NOPAD,
+ "hp8", /* cset name */
+ "hp8_english_nopad_ci", /* coll name */
+ "", /* comment */
+ "[import hp8_english_ci]", /* tailoring */
+ ctype_hp8_english_ci, /* ctype */
+ to_lower_hp8_english_ci, /* to_lower */
+ to_upper_hp8_english_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_hp8_english_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_simple_nopad_ci_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_koi8r
+{
+ 1031,0,0,
+ MY_CS_COMPILED|MY_CS_NOPAD,
+ "koi8r", /* cset name */
+ "koi8r_general_nopad_ci", /* coll name */
+ "", /* comment */
+ "[import koi8r_general_ci]", /* tailoring */
+ ctype_koi8r_general_ci, /* ctype */
+ to_lower_koi8r_general_ci, /* to_lower */
+ to_upper_koi8r_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_koi8r_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_simple_nopad_ci_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_latin2
+{
+ 1033,0,0,
+ MY_CS_COMPILED|MY_CS_NOPAD,
+ "latin2", /* cset name */
+ "latin2_general_nopad_ci", /* coll name */
+ "", /* comment */
+ "[import latin2_general_ci]", /* tailoring */
+ ctype_latin2_general_ci, /* ctype */
+ to_lower_latin2_general_ci, /* to_lower */
+ to_upper_latin2_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_latin2_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_simple_nopad_ci_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_swe7
+{
+ 1034,0,0,
+ MY_CS_COMPILED|MY_CS_NONASCII|MY_CS_NOPAD,
+ "swe7", /* cset name */
+ "swe7_swedish_nopad_ci", /* coll name */
+ "", /* comment */
+ "[import swe7_swedish_ci]", /* tailoring */
+ ctype_swe7_swedish_ci, /* ctype */
+ to_lower_swe7_swedish_ci, /* to_lower */
+ to_upper_swe7_swedish_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_swe7_swedish_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_simple_nopad_ci_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_ascii
+{
+ 1035,0,0,
+ MY_CS_COMPILED|MY_CS_PUREASCII|MY_CS_NOPAD,
+ "ascii", /* cset name */
+ "ascii_general_nopad_ci", /* coll name */
+ "", /* comment */
+ "[import ascii_general_ci]", /* tailoring */
+ ctype_ascii_general_ci, /* ctype */
+ to_lower_ascii_general_ci, /* to_lower */
+ to_upper_ascii_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_ascii_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_simple_nopad_ci_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_hebrew
+{
+ 1040,0,0,
+ MY_CS_COMPILED|MY_CS_NOPAD,
+ "hebrew", /* cset name */
+ "hebrew_general_nopad_ci", /* coll name */
+ "", /* comment */
+ "[import hebrew_general_ci]", /* tailoring */
+ ctype_hebrew_general_ci, /* ctype */
+ to_lower_hebrew_general_ci, /* to_lower */
+ to_upper_hebrew_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_hebrew_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_simple_nopad_ci_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_koi8u
+{
+ 1046,0,0,
+ MY_CS_COMPILED|MY_CS_NOPAD,
+ "koi8u", /* cset name */
+ "koi8u_general_nopad_ci", /* coll name */
+ "", /* comment */
+ "[import koi8u_general_ci]", /* tailoring */
+ ctype_koi8u_general_ci, /* ctype */
+ to_lower_koi8u_general_ci, /* to_lower */
+ to_upper_koi8u_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_koi8u_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_simple_nopad_ci_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_greek
+{
+ 1049,0,0,
+ MY_CS_COMPILED|MY_CS_NOPAD,
+ "greek", /* cset name */
+ "greek_general_nopad_ci", /* coll name */
+ "", /* comment */
+ "[import greek_general_ci]", /* tailoring */
+ ctype_greek_general_ci, /* ctype */
+ to_lower_greek_general_ci, /* to_lower */
+ to_upper_greek_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_greek_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_simple_nopad_ci_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_cp1250
+{
+ 1050,0,0,
+ MY_CS_COMPILED|MY_CS_NOPAD,
+ "cp1250", /* cset name */
+ "cp1250_general_nopad_ci", /* coll name */
+ "", /* comment */
+ "[import cp1250_general_ci]", /* tailoring */
+ ctype_cp1250_general_ci, /* ctype */
+ to_lower_cp1250_general_ci, /* to_lower */
+ to_upper_cp1250_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_cp1250_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_simple_nopad_ci_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_latin5
+{
+ 1054,0,0,
+ MY_CS_COMPILED|MY_CS_NOPAD,
+ "latin5", /* cset name */
+ "latin5_turkish_nopad_ci", /* coll name */
+ "", /* comment */
+ "[import latin5_turkish_ci]", /* tailoring */
+ ctype_latin5_turkish_ci, /* ctype */
+ to_lower_latin5_turkish_ci, /* to_lower */
+ to_upper_latin5_turkish_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_latin5_turkish_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_simple_nopad_ci_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_armscii8
+{
+ 1056,0,0,
+ MY_CS_COMPILED|MY_CS_NOPAD,
+ "armscii8", /* cset name */
+ "armscii8_general_nopad_ci", /* coll name */
+ "", /* comment */
+ "[import armscii8_general_ci]", /* tailoring */
+ ctype_armscii8_general_ci, /* ctype */
+ to_lower_armscii8_general_ci, /* to_lower */
+ to_upper_armscii8_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_armscii8_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_simple_nopad_ci_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_cp866
+{
+ 1060,0,0,
+ MY_CS_COMPILED|MY_CS_NOPAD,
+ "cp866", /* cset name */
+ "cp866_general_nopad_ci", /* coll name */
+ "", /* comment */
+ "[import cp866_general_ci]", /* tailoring */
+ ctype_cp866_general_ci, /* ctype */
+ to_lower_cp866_general_ci, /* to_lower */
+ to_upper_cp866_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_cp866_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_simple_nopad_ci_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_keybcs2
+{
+ 1061,0,0,
+ MY_CS_COMPILED|MY_CS_NOPAD,
+ "keybcs2", /* cset name */
+ "keybcs2_general_nopad_ci", /* coll name */
+ "", /* comment */
+ "[import keybcs2_general_ci]", /* tailoring */
+ ctype_keybcs2_general_ci, /* ctype */
+ to_lower_keybcs2_general_ci, /* to_lower */
+ to_upper_keybcs2_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_keybcs2_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_simple_nopad_ci_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_macce
+{
+ 1062,0,0,
+ MY_CS_COMPILED|MY_CS_NOPAD,
+ "macce", /* cset name */
+ "macce_general_nopad_ci", /* coll name */
+ "", /* comment */
+ "[import macce_general_ci]", /* tailoring */
+ ctype_macce_general_ci, /* ctype */
+ to_lower_macce_general_ci, /* to_lower */
+ to_upper_macce_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_macce_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_simple_nopad_ci_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_macroman
+{
+ 1063,0,0,
+ MY_CS_COMPILED|MY_CS_NOPAD,
+ "macroman", /* cset name */
+ "macroman_general_nopad_ci", /* coll name */
+ "", /* comment */
+ "[import macroman_general_ci]", /* tailoring */
+ ctype_macroman_general_ci, /* ctype */
+ to_lower_macroman_general_ci, /* to_lower */
+ to_upper_macroman_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_macroman_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_simple_nopad_ci_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_cp852
+{
+ 1064,0,0,
+ MY_CS_COMPILED|MY_CS_NOPAD,
+ "cp852", /* cset name */
+ "cp852_general_nopad_ci", /* coll name */
+ "", /* comment */
+ "[import cp852_general_ci]", /* tailoring */
+ ctype_cp852_general_ci, /* ctype */
+ to_lower_cp852_general_ci, /* to_lower */
+ to_upper_cp852_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_cp852_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_simple_nopad_ci_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_latin7
+{
+ 1065,0,0,
+ MY_CS_COMPILED|MY_CS_NOPAD,
+ "latin7", /* cset name */
+ "latin7_general_nopad_ci", /* coll name */
+ "", /* comment */
+ "[import latin7_general_ci]", /* tailoring */
+ ctype_latin7_general_ci, /* ctype */
+ to_lower_latin7_general_ci, /* to_lower */
+ to_upper_latin7_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_latin7_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_simple_nopad_ci_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_macce
+{
+ 1067,0,0,
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD,
+ "macce", /* cset name */
+ "macce_nopad_bin", /* coll name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_macce_general_ci, /* ctype */
+ to_lower_macce_general_ci, /* to_lower */
+ to_upper_macce_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_macce_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_nopad_bin_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_cp1251
+{
+ 1074,0,0,
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD,
+ "cp1251", /* cset name */
+ "cp1251_nopad_bin", /* coll name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_cp1251_general_ci, /* ctype */
+ to_lower_cp1251_general_ci, /* to_lower */
+ to_upper_cp1251_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_cp1251_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_nopad_bin_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_cp1251
+{
+ 1075,0,0,
+ MY_CS_COMPILED|MY_CS_NOPAD,
+ "cp1251", /* cset name */
+ "cp1251_general_nopad_ci", /* coll name */
+ "", /* comment */
+ "[import cp1251_general_ci]", /* tailoring */
+ ctype_cp1251_general_ci, /* ctype */
+ to_lower_cp1251_general_ci, /* to_lower */
+ to_upper_cp1251_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_cp1251_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_simple_nopad_ci_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_macroman
+{
+ 1077,0,0,
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD,
+ "macroman", /* cset name */
+ "macroman_nopad_bin", /* coll name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_macroman_general_ci, /* ctype */
+ to_lower_macroman_general_ci, /* to_lower */
+ to_upper_macroman_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_macroman_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_nopad_bin_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_cp1256
+{
+ 1081,0,0,
+ MY_CS_COMPILED|MY_CS_NOPAD,
+ "cp1256", /* cset name */
+ "cp1256_general_nopad_ci", /* coll name */
+ "", /* comment */
+ "[import cp1256_general_ci]", /* tailoring */
+ ctype_cp1256_general_ci, /* ctype */
+ to_lower_cp1256_general_ci, /* to_lower */
+ to_upper_cp1256_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_cp1256_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_simple_nopad_ci_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_cp1257
+{
+ 1082,0,0,
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD,
+ "cp1257", /* cset name */
+ "cp1257_nopad_bin", /* coll name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_cp1257_general_ci, /* ctype */
+ to_lower_cp1257_general_ci, /* to_lower */
+ to_upper_cp1257_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_cp1257_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_nopad_bin_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_cp1257
+{
+ 1083,0,0,
+ MY_CS_COMPILED|MY_CS_NOPAD,
+ "cp1257", /* cset name */
+ "cp1257_general_nopad_ci", /* coll name */
+ "", /* comment */
+ "[import cp1257_general_ci]", /* tailoring */
+ ctype_cp1257_general_ci, /* ctype */
+ to_lower_cp1257_general_ci, /* to_lower */
+ to_upper_cp1257_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_cp1257_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_simple_nopad_ci_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_armscii8
+{
+ 1088,0,0,
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD,
+ "armscii8", /* cset name */
+ "armscii8_nopad_bin", /* coll name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_armscii8_general_ci, /* ctype */
+ to_lower_armscii8_general_ci, /* to_lower */
+ to_upper_armscii8_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_armscii8_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_nopad_bin_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_ascii
+{
+ 1089,0,0,
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_PUREASCII|MY_CS_NOPAD,
+ "ascii", /* cset name */
+ "ascii_nopad_bin", /* coll name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_ascii_general_ci, /* ctype */
+ to_lower_ascii_general_ci, /* to_lower */
+ to_upper_ascii_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_ascii_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_nopad_bin_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_cp1250
+{
+ 1090,0,0,
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD,
+ "cp1250", /* cset name */
+ "cp1250_nopad_bin", /* coll name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_cp1250_general_ci, /* ctype */
+ to_lower_cp1250_general_ci, /* to_lower */
+ to_upper_cp1250_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_cp1250_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_nopad_bin_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_cp1256
+{
+ 1091,0,0,
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD,
+ "cp1256", /* cset name */
+ "cp1256_nopad_bin", /* coll name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_cp1256_general_ci, /* ctype */
+ to_lower_cp1256_general_ci, /* to_lower */
+ to_upper_cp1256_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_cp1256_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_nopad_bin_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_cp866
+{
+ 1092,0,0,
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD,
+ "cp866", /* cset name */
+ "cp866_nopad_bin", /* coll name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_cp866_general_ci, /* ctype */
+ to_lower_cp866_general_ci, /* to_lower */
+ to_upper_cp866_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_cp866_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_nopad_bin_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_dec8
+{
+ 1093,0,0,
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD,
+ "dec8", /* cset name */
+ "dec8_nopad_bin", /* coll name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_dec8_swedish_ci, /* ctype */
+ to_lower_dec8_swedish_ci, /* to_lower */
+ to_upper_dec8_swedish_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_dec8_swedish_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_nopad_bin_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_greek
+{
+ 1094,0,0,
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD,
+ "greek", /* cset name */
+ "greek_nopad_bin", /* coll name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_greek_general_ci, /* ctype */
+ to_lower_greek_general_ci, /* to_lower */
+ to_upper_greek_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_greek_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_nopad_bin_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_hebrew
+{
+ 1095,0,0,
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD,
+ "hebrew", /* cset name */
+ "hebrew_nopad_bin", /* coll name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_hebrew_general_ci, /* ctype */
+ to_lower_hebrew_general_ci, /* to_lower */
+ to_upper_hebrew_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_hebrew_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_nopad_bin_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_hp8
+{
+ 1096,0,0,
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD,
+ "hp8", /* cset name */
+ "hp8_nopad_bin", /* coll name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_hp8_english_ci, /* ctype */
+ to_lower_hp8_english_ci, /* to_lower */
+ to_upper_hp8_english_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_hp8_english_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_nopad_bin_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_keybcs2
+{
+ 1097,0,0,
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD,
+ "keybcs2", /* cset name */
+ "keybcs2_nopad_bin", /* coll name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_keybcs2_general_ci, /* ctype */
+ to_lower_keybcs2_general_ci, /* to_lower */
+ to_upper_keybcs2_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_keybcs2_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_nopad_bin_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_koi8r
+{
+ 1098,0,0,
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD,
+ "koi8r", /* cset name */
+ "koi8r_nopad_bin", /* coll name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_koi8r_general_ci, /* ctype */
+ to_lower_koi8r_general_ci, /* to_lower */
+ to_upper_koi8r_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_koi8r_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_nopad_bin_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_koi8u
+{
+ 1099,0,0,
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD,
+ "koi8u", /* cset name */
+ "koi8u_nopad_bin", /* coll name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_koi8u_general_ci, /* ctype */
+ to_lower_koi8u_general_ci, /* to_lower */
+ to_upper_koi8u_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_koi8u_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_nopad_bin_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_latin2
+{
+ 1101,0,0,
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD,
+ "latin2", /* cset name */
+ "latin2_nopad_bin", /* coll name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_latin2_general_ci, /* ctype */
+ to_lower_latin2_general_ci, /* to_lower */
+ to_upper_latin2_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_latin2_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_nopad_bin_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_latin5
+{
+ 1102,0,0,
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD,
+ "latin5", /* cset name */
+ "latin5_nopad_bin", /* coll name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_latin5_turkish_ci, /* ctype */
+ to_lower_latin5_turkish_ci, /* to_lower */
+ to_upper_latin5_turkish_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_latin5_turkish_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_nopad_bin_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_latin7
+{
+ 1103,0,0,
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD,
+ "latin7", /* cset name */
+ "latin7_nopad_bin", /* coll name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_latin7_general_ci, /* ctype */
+ to_lower_latin7_general_ci, /* to_lower */
+ to_upper_latin7_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_latin7_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_nopad_bin_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_cp850
+{
+ 1104,0,0,
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD,
+ "cp850", /* cset name */
+ "cp850_nopad_bin", /* coll name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_cp850_general_ci, /* ctype */
+ to_lower_cp850_general_ci, /* to_lower */
+ to_upper_cp850_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_cp850_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_nopad_bin_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_cp852
+{
+ 1105,0,0,
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD,
+ "cp852", /* cset name */
+ "cp852_nopad_bin", /* coll name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_cp852_general_ci, /* ctype */
+ to_lower_cp852_general_ci, /* to_lower */
+ to_upper_cp852_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_cp852_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_nopad_bin_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_swe7
+{
+ 1106,0,0,
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NONASCII|MY_CS_NOPAD,
+ "swe7", /* cset name */
+ "swe7_nopad_bin", /* coll name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_swe7_swedish_ci, /* ctype */
+ to_lower_swe7_swedish_ci, /* to_lower */
+ to_upper_swe7_swedish_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_swe7_swedish_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_nopad_bin_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_geostd8
+{
+ 1116,0,0,
+ MY_CS_COMPILED|MY_CS_NOPAD,
+ "geostd8", /* cset name */
+ "geostd8_general_nopad_ci", /* coll name */
+ "", /* comment */
+ "[import geostd8_general_ci]", /* tailoring */
+ ctype_geostd8_general_ci, /* ctype */
+ to_lower_geostd8_general_ci, /* to_lower */
+ to_upper_geostd8_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_geostd8_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_simple_nopad_ci_handler,
+}
+,
+#endif
+#ifdef HAVE_CHARSET_geostd8
+{
+ 1117,0,0,
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD,
+ "geostd8", /* cset name */
+ "geostd8_nopad_bin", /* coll name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_geostd8_general_ci, /* ctype */
+ to_lower_geostd8_general_ci, /* to_lower */
+ to_upper_geostd8_general_ci, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ to_uni_geostd8_general_ci, /* to_uni */
+ NULL, /* from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state map */
+ NULL, /* ident map */
+ 1, /* strxfrm_multiply*/
+ 1, /* caseup_multiply*/
+ 1, /* casedn_multiply*/
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad_char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_8bit_handler,
+ &my_collation_8bit_nopad_bin_handler,
+}
+,
+#endif
{
0,0,0,
MY_CS_COMPILED,
diff --git a/strings/ctype-gb2312.c b/strings/ctype-gb2312.c
index dbb92fabc4b..832c6c7f038 100644
--- a/strings/ctype-gb2312.c
+++ b/strings/ctype-gb2312.c
@@ -6343,6 +6343,20 @@ my_mb_wc_gb2312(CHARSET_INFO *cs __attribute__((unused)),
#include "strcoll.ic"
+#define DEFINE_STRNNCOLLSP_NOPAD
+#define MY_FUNCTION_NAME(x) my_ ## x ## _gb2312_chinese_nopad_ci
+#define WEIGHT_MB1(x) (sort_order_gb2312[(uchar) (x)])
+#define WEIGHT_MB2(x,y) (gb2312code(x, y))
+#include "strcoll.ic"
+
+
+#define DEFINE_STRNNCOLLSP_NOPAD
+#define MY_FUNCTION_NAME(x) my_ ## x ## _gb2312_nopad_bin
+#define WEIGHT_MB1(x) ((uchar) (x))
+#define WEIGHT_MB2(x,y) (gb2312code(x, y))
+#include "strcoll.ic"
+
+
static MY_COLLATION_HANDLER my_collation_handler_gb2312_chinese_ci=
{
NULL, /* init */
@@ -6375,6 +6389,37 @@ static MY_COLLATION_HANDLER my_collation_handler_gb2312_bin=
};
+static MY_COLLATION_HANDLER my_collation_handler_gb2312_chinese_nopad_ci=
+{
+ NULL, /* init */
+ my_strnncoll_gb2312_chinese_ci,
+ my_strnncollsp_gb2312_chinese_nopad_ci,
+ my_strnxfrm_mb_nopad,
+ my_strnxfrmlen_simple,
+ my_like_range_mb,
+ my_wildcmp_mb,
+ my_strcasecmp_mb,
+ my_instr_mb,
+ my_hash_sort_simple_nopad,
+ my_propagate_simple
+};
+
+
+static MY_COLLATION_HANDLER my_collation_handler_gb2312_nopad_bin=
+{
+ NULL, /* init */
+ my_strnncoll_gb2312_bin,
+ my_strnncollsp_gb2312_nopad_bin,
+ my_strnxfrm_mb_nopad,
+ my_strnxfrmlen_simple,
+ my_like_range_mb,
+ my_wildcmp_mb_bin,
+ my_strcasecmp_mb_bin,
+ my_instr_mb,
+ my_hash_sort_mb_nopad_bin,
+ my_propagate_simple
+};
+
static MY_CHARSET_HANDLER my_charset_handler=
{
@@ -6475,4 +6520,70 @@ struct charset_info_st my_charset_gb2312_bin=
&my_collation_handler_gb2312_bin
};
+
+struct charset_info_st my_charset_gb2312_chinese_nopad_ci=
+{
+ MY_NOPAD_ID(24),0,0,/* number */
+ MY_CS_COMPILED|MY_CS_NOPAD, /* state */
+ "gb2312", /* cs name */
+ "gb2312_chinese_nopad_ci",/* name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_gb2312,
+ to_lower_gb2312,
+ to_upper_gb2312,
+ sort_order_gb2312,
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_caseinfo_gb2312,/* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
+ 1, /* mbminlen */
+ 2, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 0xF7FE, /* max_sort_char */
+ ' ', /* pad char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_handler,
+ &my_collation_handler_gb2312_chinese_nopad_ci
+};
+
+
+struct charset_info_st my_charset_gb2312_nopad_bin=
+{
+ MY_NOPAD_ID(86),0,0,/* number */
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD, /* state */
+ "gb2312", /* cs name */
+ "gb2312_nopad_bin", /* name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_gb2312,
+ to_lower_gb2312,
+ to_upper_gb2312,
+ NULL, /* sort_order */
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_caseinfo_gb2312,/* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
+ 1, /* mbminlen */
+ 2, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 0xF7FE, /* max_sort_char */
+ ' ', /* pad char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_handler,
+ &my_collation_handler_gb2312_nopad_bin
+};
+
#endif
diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c
index 617d72dc4d9..d24b77950c2 100644
--- a/strings/ctype-gbk.c
+++ b/strings/ctype-gbk.c
@@ -10625,6 +10625,21 @@ my_mb_wc_gbk(CHARSET_INFO *cs __attribute__((unused)),
#include "strcoll.ic"
+#define DEFINE_STRNNCOLLSP_NOPAD
+#define MY_FUNCTION_NAME(x) my_ ## x ## _gbk_chinese_nopad_ci
+#define WEIGHT_MB1(x) (sort_order_gbk[(uchar) (x)])
+#define WEIGHT_MB2(x,y) (gbksortorder(gbkcode(x,y)))
+#define DEFINE_STRNXFRM
+#include "strcoll.ic"
+
+
+#define DEFINE_STRNNCOLLSP_NOPAD
+#define MY_FUNCTION_NAME(x) my_ ## x ## _gbk_nopad_bin
+#define WEIGHT_MB1(x) ((uchar) (x))
+#define WEIGHT_MB2(x,y) (gbkcode(x,y))
+#include "strcoll.ic"
+
+
static MY_COLLATION_HANDLER my_collation_handler_gbk_chinese_ci=
{
NULL, /* init */
@@ -10657,6 +10672,36 @@ static MY_COLLATION_HANDLER my_collation_handler_gbk_bin=
};
+static MY_COLLATION_HANDLER my_collation_handler_gbk_chinese_nopad_ci=
+{
+ NULL, /* init */
+ my_strnncoll_gbk_chinese_ci,
+ my_strnncollsp_gbk_chinese_nopad_ci,
+ my_strnxfrm_gbk_chinese_nopad_ci,
+ my_strnxfrmlen_simple,
+ my_like_range_mb,
+ my_wildcmp_mb,
+ my_strcasecmp_mb,
+ my_instr_mb,
+ my_hash_sort_simple_nopad,
+ my_propagate_simple
+};
+
+
+static MY_COLLATION_HANDLER my_collation_handler_gbk_nopad_bin=
+{
+ NULL, /* init */
+ my_strnncoll_gbk_bin,
+ my_strnncollsp_gbk_nopad_bin,
+ my_strnxfrm_mb_nopad,
+ my_strnxfrmlen_simple,
+ my_like_range_mb,
+ my_wildcmp_mb_bin,
+ my_strcasecmp_mb_bin,
+ my_instr_mb,
+ my_hash_sort_mb_nopad_bin,
+ my_propagate_simple
+};
static MY_CHARSET_HANDLER my_charset_handler=
{
@@ -10757,4 +10802,68 @@ struct charset_info_st my_charset_gbk_bin=
};
+struct charset_info_st my_charset_gbk_chinese_nopad_ci=
+{
+ MY_NOPAD_ID(28),0,0,/* number */
+ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_NOPAD, /* state */
+ "gbk", /* cs name */
+ "gbk_chinese_nopad_ci",/* name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_gbk,
+ to_lower_gbk,
+ to_upper_gbk,
+ sort_order_gbk,
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_caseinfo_gbk, /* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
+ 1, /* mbminlen */
+ 2, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 0xA967, /* max_sort_char */
+ ' ', /* pad char */
+ 1, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_handler,
+ &my_collation_handler_gbk_chinese_nopad_ci
+};
+
+struct charset_info_st my_charset_gbk_nopad_bin=
+{
+ MY_NOPAD_ID(87),0,0,/* number */
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD, /* state */
+ "gbk", /* cs name */
+ "gbk_nopad_bin", /* name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_gbk,
+ to_lower_gbk,
+ to_upper_gbk,
+ NULL, /* sort_order */
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_caseinfo_gbk, /* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
+ 1, /* mbminlen */
+ 2, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 0xFEFE, /* max_sort_char */
+ ' ', /* pad char */
+ 1, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_handler,
+ &my_collation_handler_gbk_nopad_bin
+};
+
#endif
diff --git a/strings/ctype-latin1.c b/strings/ctype-latin1.c
index fe255349530..6f71c7a0c76 100644
--- a/strings/ctype-latin1.c
+++ b/strings/ctype-latin1.c
@@ -460,6 +460,39 @@ struct charset_info_st my_charset_latin1=
};
+struct charset_info_st my_charset_latin1_nopad=
+{
+ MY_NOPAD_ID(8),0,0, /* number */
+ MY_CS_COMPILED | MY_CS_NOPAD, /* state */
+ "latin1", /* cs name */
+ "latin1_swedish_nopad_ci", /* name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_latin1,
+ to_lower_latin1,
+ to_upper_latin1,
+ sort_order_latin1,
+ NULL, /* uca */
+ cs_to_uni, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_handler,
+ &my_collation_8bit_simple_nopad_ci_handler
+};
+
+
/*
@@ -770,3 +803,36 @@ struct charset_info_st my_charset_latin1_bin=
&my_collation_8bit_bin_handler
};
+
+struct charset_info_st my_charset_latin1_nopad_bin=
+{
+ MY_NOPAD_ID(47),0,0, /* number */
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD,/* state */
+ "latin1", /* cs name */
+ "latin1_nopad_bin", /* name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_latin1,
+ to_lower_latin1,
+ to_upper_latin1,
+ NULL, /* sort_order */
+ NULL, /* uca */
+ cs_to_uni, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_handler,
+ &my_collation_8bit_nopad_bin_handler
+};
+
diff --git a/strings/ctype-mb.c b/strings/ctype-mb.c
index 56b3309ca10..d78e758010d 100644
--- a/strings/ctype-mb.c
+++ b/strings/ctype-mb.c
@@ -602,13 +602,10 @@ uint my_instr_mb(CHARSET_INFO *cs,
characters having multibyte weights *equal* to their codes:
cp932, euckr, gb2312, sjis, eucjpms, ujis.
*/
-size_t
-my_strnxfrm_mb(CHARSET_INFO *cs,
- uchar *dst, size_t dstlen, uint nweights,
- const uchar *src, size_t srclen, uint flags)
+size_t my_strnxfrm_mb_internal(CHARSET_INFO *cs, uchar *dst, uchar *de,
+ uint *nweights, const uchar *src, size_t srclen)
{
uchar *d0= dst;
- uchar *de= dst + dstlen;
const uchar *se= src + srclen;
const uchar *sort_order= cs->sort_order;
@@ -619,12 +616,12 @@ my_strnxfrm_mb(CHARSET_INFO *cs,
then we can run a simplified loop -
without checking "nweights" and "de".
*/
- if (dstlen >= srclen && nweights >= srclen)
+ if (de >= d0 + srclen && *nweights >= srclen)
{
if (sort_order)
{
/* Optimized version for a case insensitive collation */
- for (; src < se; nweights--)
+ for (; src < se; (*nweights)--)
{
if (*src < 128) /* quickly catch ASCII characters */
*dst++= sort_order[*src++];
@@ -635,7 +632,7 @@ my_strnxfrm_mb(CHARSET_INFO *cs,
else
{
/* Optimized version for a case sensitive collation (no sort_order) */
- for (; src < se; nweights--)
+ for (; src < se; (*nweights)--)
{
if (*src < 128) /* quickly catch ASCII characters */
*dst++= *src++;
@@ -643,14 +640,14 @@ my_strnxfrm_mb(CHARSET_INFO *cs,
my_strnxfrm_mb_non_ascii_char(cs, dst, src, se);
}
}
- goto pad;
+ goto end;
}
/*
A thourough loop, checking all possible limits:
"se", "nweights" and "de".
*/
- for (; src < se && nweights && dst < de; nweights--)
+ for (; src < se && *nweights && dst < de; (*nweights)--)
{
int chlen;
if (*src < 128 || !(chlen= my_ismbchar(cs, (const char *) src,
@@ -669,11 +666,36 @@ my_strnxfrm_mb(CHARSET_INFO *cs,
}
}
-pad:
+end:
+ return dst - d0;
+}
+
+
+size_t
+my_strnxfrm_mb(CHARSET_INFO *cs,
+ uchar *dst, size_t dstlen, uint nweights,
+ const uchar *src, size_t srclen, uint flags)
+{
+ uchar *de= dst + dstlen;
+ uchar *d0= dst;
+ dst= d0 + my_strnxfrm_mb_internal(cs, dst, de, &nweights, src, srclen);
return my_strxfrm_pad_desc_and_reverse(cs, d0, dst, de, nweights, flags, 0);
}
+size_t
+my_strnxfrm_mb_nopad(CHARSET_INFO *cs,
+ uchar *dst, size_t dstlen, uint nweights,
+ const uchar *src, size_t srclen, uint flags)
+{
+ uchar *de= dst + dstlen;
+ uchar *d0= dst;
+ dst= d0 + my_strnxfrm_mb_internal(cs, dst, de, &nweights, src, srclen);
+ return my_strxfrm_pad_desc_and_reverse_nopad(cs, d0, dst, de, nweights,
+ flags, 0);
+}
+
+
int
my_strcasecmp_mb_bin(CHARSET_INFO * cs __attribute__((unused)),
const char *s, const char *t)
@@ -682,18 +704,13 @@ my_strcasecmp_mb_bin(CHARSET_INFO * cs __attribute__((unused)),
}
+
void
-my_hash_sort_mb_bin(CHARSET_INFO *cs __attribute__((unused)),
- const uchar *key, size_t len,ulong *nr1, ulong *nr2)
+my_hash_sort_mb_nopad_bin(CHARSET_INFO *cs __attribute__((unused)),
+ const uchar *key, size_t len,ulong *nr1, ulong *nr2)
{
register ulong m1= *nr1, m2= *nr2;
-
- /*
- Remove trailing spaces. We have to do this to be able to compare
- 'A ' and 'A' as identical
- */
- const uchar *end = skip_trailing_space(key, len);
-
+ const uchar *end= key + len;
for (; key < end ; key++)
{
MY_HASH_ADD(m1, m2, (uint)*key);
@@ -703,6 +720,19 @@ my_hash_sort_mb_bin(CHARSET_INFO *cs __attribute__((unused)),
}
+void
+my_hash_sort_mb_bin(CHARSET_INFO *cs __attribute__((unused)),
+ const uchar *key, size_t len,ulong *nr1, ulong *nr2)
+{
+ /*
+ Remove trailing spaces. We have to do this to be able to compare
+ 'A ' and 'A' as identical
+ */
+ const uchar *end= skip_trailing_space(key, len);
+ my_hash_sort_mb_nopad_bin(cs, key, end - key, nr1, nr2);
+}
+
+
/*
Fill the given buffer with 'maximum character' for given charset
SYNOPSIS
diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c
index f405c4f327b..b142aab18a6 100644
--- a/strings/ctype-simple.c
+++ b/strings/ctype-simple.c
@@ -71,14 +71,14 @@ size_t my_strnxfrmlen_simple(CHARSET_INFO *cs, size_t len)
*/
-size_t my_strnxfrm_simple(CHARSET_INFO * cs,
- uchar *dst, size_t dstlen, uint nweights,
- const uchar *src, size_t srclen, uint flags)
+size_t my_strnxfrm_simple_internal(CHARSET_INFO * cs,
+ uchar *dst, size_t dstlen, uint *nweights,
+ const uchar *src, size_t srclen)
{
const uchar *map= cs->sort_order;
uchar *d0= dst;
uint frmlen;
- if ((frmlen= MY_MIN(dstlen, nweights)) > srclen)
+ if ((frmlen= MY_MIN(dstlen, *nweights)) > srclen)
frmlen= srclen;
if (dst != src)
{
@@ -92,8 +92,32 @@ size_t my_strnxfrm_simple(CHARSET_INFO * cs,
for (end= dst + frmlen; dst < end; dst++)
*dst= map[(uchar) *dst];
}
+ *nweights-= frmlen;
+ return dst - d0;
+}
+
+
+size_t my_strnxfrm_simple(CHARSET_INFO * cs,
+ uchar *dst, size_t dstlen, uint nweights,
+ const uchar *src, size_t srclen, uint flags)
+{
+ uchar *d0= dst;
+ dst= d0 + my_strnxfrm_simple_internal(cs, dst, dstlen, &nweights,
+ src, srclen);
return my_strxfrm_pad_desc_and_reverse(cs, d0, dst, d0 + dstlen,
- nweights - frmlen, flags, 0);
+ nweights, flags, 0);
+}
+
+
+size_t my_strnxfrm_simple_nopad(CHARSET_INFO * cs,
+ uchar *dst, size_t dstlen, uint nweights,
+ const uchar *src, size_t srclen, uint flags)
+{
+ uchar *d0= dst;
+ dst= d0 + my_strnxfrm_simple_internal(cs, dst, dstlen, &nweights,
+ src, srclen);
+ return my_strxfrm_pad_desc_and_reverse_nopad(cs, d0, dst, d0 + dstlen,
+ nweights, flags, 0);
}
@@ -184,6 +208,14 @@ int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, size_t a_length,
}
+int my_strnncollsp_simple_nopad(CHARSET_INFO * cs,
+ const uchar *a, size_t a_length,
+ const uchar *b, size_t b_length)
+{
+ return my_strnncoll_simple(cs, a, a_length, b, b_length, FALSE);
+}
+
+
size_t my_caseup_str_8bit(CHARSET_INFO * cs,char *str)
{
register const uchar *map= cs->to_upper;
@@ -297,13 +329,28 @@ size_t my_snprintf_8bit(CHARSET_INFO *cs __attribute__((unused)),
}
+void my_hash_sort_simple_nopad(CHARSET_INFO *cs,
+ const uchar *key, size_t len,
+ ulong *nr1, ulong *nr2)
+{
+ register const uchar *sort_order=cs->sort_order;
+ const uchar *end= key + len;
+ register ulong m1= *nr1, m2= *nr2;
+ for (; key < (uchar*) end ; key++)
+ {
+ MY_HASH_ADD(m1, m2, (uint) sort_order[(uint) *key]);
+ }
+ *nr1= m1;
+ *nr2= m2;
+}
+
+
void my_hash_sort_simple(CHARSET_INFO *cs,
- const uchar *key, size_t len,
- ulong *nr1, ulong *nr2)
+ const uchar *key, size_t len,
+ ulong *nr1, ulong *nr2)
{
register const uchar *sort_order=cs->sort_order;
const uchar *end;
- register ulong m1= *nr1, m2= *nr2;
uint16 space_weight= sort_order[' '];
/*
@@ -338,13 +385,7 @@ void my_hash_sort_simple(CHARSET_INFO *cs,
break;
}
}
-
- for (; key < (uchar*) end ; key++)
- {
- MY_HASH_ADD(m1, m2, (uint) sort_order[(uint) *key]);
- }
- *nr1= m1;
- *nr2= m2;
+ my_hash_sort_simple_nopad(cs, key, end - key, nr1, nr2);
}
@@ -1340,12 +1381,85 @@ create_fromuni(struct charset_info_st *cs,
return FALSE;
}
+
+/*
+ Detect if a character set is 8bit,
+ and it is pure ascii, i.e. doesn't have
+ characters outside U+0000..U+007F
+ This functions is shared between "conf_to_src"
+ and dynamic charsets loader in "mysqld".
+*/
+static my_bool
+my_charset_is_8bit_pure_ascii(CHARSET_INFO *cs)
+{
+ size_t code;
+ if (!cs->tab_to_uni)
+ return 0;
+ for (code= 0; code < 256; code++)
+ {
+ if (cs->tab_to_uni[code] > 0x7F)
+ return 0;
+ }
+ return 1;
+}
+
+
+/*
+ Shared function between conf_to_src and mysys.
+ Check if a 8bit character set is compatible with
+ ascii on the range 0x00..0x7F.
+*/
+static my_bool
+my_charset_is_ascii_compatible(CHARSET_INFO *cs)
+{
+ uint i;
+ if (!cs->tab_to_uni)
+ return 1;
+ for (i= 0; i < 128; i++)
+ {
+ if (cs->tab_to_uni[i] != i)
+ return 0;
+ }
+ return 1;
+}
+
+
+uint my_8bit_charset_flags_from_data(CHARSET_INFO *cs)
+{
+ uint flags= 0;
+ if (my_charset_is_8bit_pure_ascii(cs))
+ flags|= MY_CS_PUREASCII;
+ if (!my_charset_is_ascii_compatible(cs))
+ flags|= MY_CS_NONASCII;
+ return flags;
+}
+
+
+/*
+ Check if case sensitive sort order: A < a < B.
+ We need MY_CS_FLAG for regex library, and for
+ case sensitivity flag for 5.0 client protocol,
+ to support isCaseSensitive() method in JDBC driver
+*/
+uint my_8bit_collation_flags_from_data(CHARSET_INFO *cs)
+{
+ uint flags= 0;
+ if (cs->sort_order && cs->sort_order['A'] < cs->sort_order['a'] &&
+ cs->sort_order['a'] < cs->sort_order['B'])
+ flags|= MY_CS_CSSORT;
+ return flags;
+}
+
+
static my_bool
my_cset_init_8bit(struct charset_info_st *cs, MY_CHARSET_LOADER *loader)
{
+ cs->state|= my_8bit_charset_flags_from_data(cs);
cs->caseup_multiply= 1;
cs->casedn_multiply= 1;
cs->pad_char= ' ';
+ if (!cs->to_lower || !cs->to_upper || !cs->ctype || !cs->tab_to_uni)
+ return TRUE;
return create_fromuni(cs, loader);
}
@@ -1371,6 +1485,9 @@ static void set_max_sort_char(struct charset_info_st *cs)
static my_bool my_coll_init_simple(struct charset_info_st *cs,
MY_CHARSET_LOADER *loader __attribute__((unused)))
{
+ if (!cs->sort_order)
+ return TRUE;
+ cs->state|= my_8bit_collation_flags_from_data(cs);
set_max_sort_char(cs);
return FALSE;
}
@@ -1920,6 +2037,28 @@ my_strxfrm_pad_desc_and_reverse(CHARSET_INFO *cs,
}
+size_t
+my_strxfrm_pad_desc_and_reverse_nopad(CHARSET_INFO *cs,
+ uchar *str, uchar *frmend, uchar *strend,
+ uint nweights, uint flags, uint level)
+{
+ if (nweights && frmend < strend && (flags & MY_STRXFRM_PAD_WITH_SPACE))
+ {
+ uint fill_length= MY_MIN((uint) (strend - frmend), nweights * cs->mbminlen);
+ memset(frmend, 0x00, fill_length);
+ frmend+= fill_length;
+ }
+ my_strxfrm_desc_and_reverse(str, frmend, flags, level);
+ if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && frmend < strend)
+ {
+ uint fill_length= strend - frmend;
+ memset(frmend, 0x00, fill_length);
+ frmend= strend;
+ }
+ return frmend - str;
+}
+
+
MY_CHARSET_HANDLER my_charset_8bit_handler=
{
my_cset_init_8bit,
@@ -1967,3 +2106,19 @@ MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler =
my_hash_sort_simple,
my_propagate_simple
};
+
+
+MY_COLLATION_HANDLER my_collation_8bit_simple_nopad_ci_handler =
+{
+ my_coll_init_simple, /* init */
+ my_strnncoll_simple,
+ my_strnncollsp_simple_nopad,
+ my_strnxfrm_simple_nopad,
+ my_strnxfrmlen_simple,
+ my_like_range_simple,
+ my_wildcmp_8bit,
+ my_strcasecmp_8bit,
+ my_instr_simple,
+ my_hash_sort_simple_nopad,
+ my_propagate_simple
+};
diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c
index e0546146008..94fd69c79c0 100644
--- a/strings/ctype-sjis.c
+++ b/strings/ctype-sjis.c
@@ -34025,6 +34025,22 @@ size_t my_numcells_sjis(CHARSET_INFO *cs __attribute__((unused)),
#include "strcoll.ic"
+#define DEFINE_STRNNCOLLSP_NOPAD
+#define MY_FUNCTION_NAME(x) my_ ## x ## _sjis_japanese_nopad_ci
+#define WEIGHT_PAD_SPACE (256 * (int) ' ')
+#define WEIGHT_MB1(x) (256 * (int) sort_order_sjis[(uchar) (x)])
+#define WEIGHT_MB2(x,y) (sjiscode(x, y))
+#include "strcoll.ic"
+
+
+#define DEFINE_STRNNCOLLSP_NOPAD
+#define MY_FUNCTION_NAME(x) my_ ## x ## _sjis_nopad_bin
+#define WEIGHT_PAD_SPACE (256 * (int) ' ')
+#define WEIGHT_MB1(x) (256 * (int) (uchar) (x))
+#define WEIGHT_MB2(x,y) (sjiscode(x, y))
+#include "strcoll.ic"
+
+
static MY_COLLATION_HANDLER my_collation_handler_sjis_japanese_ci=
{
NULL, /* init */
@@ -34057,6 +34073,38 @@ static MY_COLLATION_HANDLER my_collation_handler_sjis_bin=
};
+static MY_COLLATION_HANDLER my_collation_handler_sjis_japanese_nopad_ci=
+{
+ NULL, /* init */
+ my_strnncoll_sjis_japanese_ci,
+ my_strnncollsp_sjis_japanese_nopad_ci,
+ my_strnxfrm_mb_nopad,
+ my_strnxfrmlen_simple,
+ my_like_range_mb,
+ my_wildcmp_mb,
+ my_strcasecmp_8bit,
+ my_instr_mb,
+ my_hash_sort_simple_nopad,
+ my_propagate_simple
+};
+
+
+static MY_COLLATION_HANDLER my_collation_handler_sjis_nopad_bin=
+{
+ NULL, /* init */
+ my_strnncoll_sjis_bin,
+ my_strnncollsp_sjis_nopad_bin,
+ my_strnxfrm_mb_nopad,
+ my_strnxfrmlen_simple,
+ my_like_range_mb,
+ my_wildcmp_mb_bin,
+ my_strcasecmp_mb_bin,
+ my_instr_mb,
+ my_hash_sort_mb_nopad_bin,
+ my_propagate_simple
+};
+
+
static MY_CHARSET_HANDLER my_charset_handler=
{
NULL, /* init */
@@ -34155,4 +34203,69 @@ struct charset_info_st my_charset_sjis_bin=
&my_collation_handler_sjis_bin
};
+
+struct charset_info_st my_charset_sjis_japanese_nopad_ci=
+{
+ MY_NOPAD_ID(13),0,0, /* number */
+ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_NONASCII|MY_CS_NOPAD, /* state */
+ "sjis", /* cs name */
+ "sjis_japanese_nopad_ci", /* name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_sjis,
+ to_lower_sjis,
+ to_upper_sjis,
+ sort_order_sjis,
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_caseinfo_sjis, /* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
+ 1, /* mbminlen */
+ 2, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 0xFCFC, /* max_sort_char */
+ ' ', /* pad char */
+ 1, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_handler,
+ &my_collation_handler_sjis_japanese_nopad_ci
+};
+
+struct charset_info_st my_charset_sjis_nopad_bin=
+{
+ MY_NOPAD_ID(88),0,0, /* number */
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NONASCII|MY_CS_NOPAD, /* state */
+ "sjis", /* cs name */
+ "sjis_nopad_bin", /* name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_sjis,
+ to_lower_sjis,
+ to_upper_sjis,
+ NULL, /* sort_order */
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_caseinfo_sjis, /* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
+ 1, /* mbminlen */
+ 2, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 0xFCFC, /* max_sort_char */
+ ' ', /* pad char */
+ 1, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_handler,
+ &my_collation_handler_sjis_nopad_bin
+};
+
#endif
diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c
index 7f3bdc9140a..72a33036085 100644
--- a/strings/ctype-tis620.c
+++ b/strings/ctype-tis620.c
@@ -541,7 +541,7 @@ int my_strnncoll_tis620(CHARSET_INFO *cs __attribute__((unused)),
static
int my_strnncollsp_tis620(CHARSET_INFO * cs __attribute__((unused)),
- const uchar *a0, size_t a_length,
+ const uchar *a0, size_t a_length,
const uchar *b0, size_t b_length)
{
uchar buf[80], *end, *a, *b, *alloced= NULL;
@@ -583,6 +583,13 @@ ret:
}
+static
+int my_strnncollsp_tis620_nopad(CHARSET_INFO * cs __attribute__((unused)),
+ const uchar *a0, size_t a_length,
+ const uchar *b0, size_t b_length)
+{
+ return my_strnncoll_tis620(cs, a0, a_length, b0, b_length, FALSE);
+}
/*
strnxfrm replacment, convert Thai string to sortable string
@@ -613,6 +620,29 @@ my_strnxfrm_tis620(CHARSET_INFO *cs,
}
+static size_t
+my_strnxfrm_tis620_nopad(CHARSET_INFO *cs,
+ uchar *dst, size_t dstlen, uint nweights,
+ const uchar *src, size_t srclen, uint flags)
+{
+ size_t len, dstlen0= dstlen;
+ len= (uint) (strmake((char*) dst, (char*) src, MY_MIN(dstlen, srclen)) -
+ (char*) dst);
+ len= thai2sortable(dst, len);
+ set_if_smaller(dstlen, nweights);
+ set_if_smaller(len, dstlen);
+ len= my_strxfrm_pad_desc_and_reverse_nopad(cs, dst, dst + len, dst + dstlen,
+ dstlen - len, flags, 0);
+ if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len < dstlen0)
+ {
+ uint fill_length= dstlen0 - len;
+ memset(dst + len, 0x00, fill_length);
+ len= dstlen0;
+ }
+ return len;
+}
+
+
static const unsigned short cs_to_uni[256]={
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
@@ -830,6 +860,21 @@ static MY_COLLATION_HANDLER my_collation_ci_handler =
my_propagate_simple
};
+static MY_COLLATION_HANDLER my_collation_nopad_ci_handler =
+{
+ NULL, /* init */
+ my_strnncoll_tis620,
+ my_strnncollsp_tis620_nopad,
+ my_strnxfrm_tis620_nopad,
+ my_strnxfrmlen_simple,
+ my_like_range_simple,
+ my_wildcmp_8bit, /* wildcmp */
+ my_strcasecmp_8bit,
+ my_instr_simple, /* QQ: To be fixed */
+ my_hash_sort_simple_nopad,
+ my_propagate_simple
+};
+
static MY_CHARSET_HANDLER my_charset_handler=
{
NULL, /* init */
@@ -930,4 +975,70 @@ struct charset_info_st my_charset_tis620_bin=
};
+struct charset_info_st my_charset_tis620_thai_nopad_ci=
+{
+ MY_NOPAD_ID(18),0,0, /* number */
+ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_NON1TO1|MY_CS_NOPAD, /* state */
+ "tis620", /* cs name */
+ "tis620_thai_nopad_ci",/* name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_tis620,
+ to_lower_tis620,
+ to_upper_tis620,
+ sort_order_tis620,
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 4, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_handler,
+ &my_collation_nopad_ci_handler
+};
+
+
+struct charset_info_st my_charset_tis620_nopad_bin=
+{
+ MY_NOPAD_ID(89),0,0, /* number */
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD, /* state */
+ "tis620", /* cs name */
+ "tis620_nopad_bin", /* name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_tis620,
+ to_lower_tis620,
+ to_upper_tis620,
+ NULL, /* sort_order */
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
+ 1, /* mbminlen */
+ 1, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 255, /* max_sort_char */
+ ' ', /* pad char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_handler,
+ &my_collation_8bit_nopad_bin_handler
+};
+
+
#endif
diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c
index 06dab08a772..9d8353103f0 100644
--- a/strings/ctype-ucs2.c
+++ b/strings/ctype-ucs2.c
@@ -1243,6 +1243,20 @@ static inline int my_weight_mb2_utf16mb2_general_ci(uchar b0, uchar b1)
#define WEIGHT_MB4(b0,b1,b2,b3) ((int) MY_UTF16_WC4(b0, b1, b2, b3))
#include "strcoll.ic"
+#define DEFINE_STRNNCOLLSP_NOPAD
+#define MY_FUNCTION_NAME(x) my_ ## x ## _utf16_general_nopad_ci
+#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
+#define WEIGHT_MB2(b0,b1) my_weight_mb2_utf16mb2_general_ci(b0,b1)
+#define WEIGHT_MB4(b0,b1,b2,b3) MY_CS_REPLACEMENT_CHARACTER
+#include "strcoll.ic"
+
+#define DEFINE_STRNNCOLLSP_NOPAD
+#define MY_FUNCTION_NAME(x) my_ ## x ## _utf16_nopad_bin
+#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
+#define WEIGHT_MB2(b0,b1) ((int) MY_UTF16_WC2(b0, b1))
+#define WEIGHT_MB4(b0,b1,b2,b3) ((int) MY_UTF16_WC4(b0, b1, b2, b3))
+#include "strcoll.ic"
+
#undef IS_MB2_CHAR
#undef IS_MB4_CHAR
@@ -1370,13 +1384,14 @@ my_caseup_utf16(CHARSET_INFO *cs, char *src, size_t srclen,
static void
-my_hash_sort_utf16(CHARSET_INFO *cs, const uchar *s, size_t slen,
- ulong *nr1, ulong *nr2)
+my_hash_sort_utf16_nopad(CHARSET_INFO *cs,
+ const uchar *s, size_t slen,
+ ulong *nr1, ulong *nr2)
{
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
int res;
- const uchar *e= s + cs->cset->lengthsp(cs, (const char *) s, slen);
+ const uchar *e= s + slen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
register ulong m1= *nr1, m2= *nr2;
@@ -1391,6 +1406,15 @@ my_hash_sort_utf16(CHARSET_INFO *cs, const uchar *s, size_t slen,
}
+static void
+my_hash_sort_utf16(CHARSET_INFO *cs, const uchar *s, size_t slen,
+ ulong *nr1, ulong *nr2)
+{
+ size_t lengthsp= cs->cset->lengthsp(cs, (const char *) s, slen);
+ my_hash_sort_utf16_nopad(cs, s, lengthsp, nr1, nr2);
+}
+
+
static size_t
my_casedn_utf16(CHARSET_INFO *cs, char *src, size_t srclen,
char *dst __attribute__((unused)),
@@ -1511,10 +1535,11 @@ my_wildcmp_utf16_bin(CHARSET_INFO *cs,
static void
-my_hash_sort_utf16_bin(CHARSET_INFO *cs,
- const uchar *pos, size_t len, ulong *nr1, ulong *nr2)
+my_hash_sort_utf16_nopad_bin(CHARSET_INFO *cs __attribute__((unused)),
+ const uchar *pos, size_t len,
+ ulong *nr1, ulong *nr2)
{
- const uchar *end= pos + cs->cset->lengthsp(cs, (const char *) pos, len);
+ const uchar *end= pos + len;
register ulong m1= *nr1, m2= *nr2;
for ( ; pos < end ; pos++)
@@ -1526,6 +1551,15 @@ my_hash_sort_utf16_bin(CHARSET_INFO *cs,
}
+static void
+my_hash_sort_utf16_bin(CHARSET_INFO *cs,
+ const uchar *pos, size_t len, ulong *nr1, ulong *nr2)
+{
+ size_t lengthsp= cs->cset->lengthsp(cs, (const char *) pos, len);
+ my_hash_sort_utf16_nopad_bin(cs, pos, lengthsp, nr1, nr2);
+}
+
+
static MY_COLLATION_HANDLER my_collation_utf16_general_ci_handler =
{
NULL, /* init */
@@ -1558,6 +1592,38 @@ static MY_COLLATION_HANDLER my_collation_utf16_bin_handler =
};
+static MY_COLLATION_HANDLER my_collation_utf16_general_nopad_ci_handler =
+{
+ NULL, /* init */
+ my_strnncoll_utf16_general_ci,
+ my_strnncollsp_utf16_general_nopad_ci,
+ my_strnxfrm_unicode_nopad,
+ my_strnxfrmlen_unicode,
+ my_like_range_generic,
+ my_wildcmp_utf16_ci,
+ my_strcasecmp_mb2_or_mb4,
+ my_instr_mb,
+ my_hash_sort_utf16_nopad,
+ my_propagate_simple
+};
+
+
+static MY_COLLATION_HANDLER my_collation_utf16_nopad_bin_handler =
+{
+ NULL, /* init */
+ my_strnncoll_utf16_bin,
+ my_strnncollsp_utf16_nopad_bin,
+ my_strnxfrm_unicode_full_nopad_bin,
+ my_strnxfrmlen_unicode_full_bin,
+ my_like_range_generic,
+ my_wildcmp_utf16_bin,
+ my_strcasecmp_mb2_or_mb4,
+ my_instr_mb,
+ my_hash_sort_utf16_nopad_bin,
+ my_propagate_simple
+};
+
+
MY_CHARSET_HANDLER my_charset_utf16_handler=
{
NULL, /* init */
@@ -1658,6 +1724,73 @@ struct charset_info_st my_charset_utf16_bin=
};
+struct charset_info_st my_charset_utf16_general_nopad_ci=
+{
+ MY_NOPAD_ID(54),0,0, /* number */
+ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII|MY_CS_NOPAD,
+ "utf16", /* cs name */
+ "utf16_general_nopad_ci", /* name */
+ "UTF-16 Unicode", /* comment */
+ NULL, /* tailoring */
+ NULL, /* ctype */
+ NULL, /* to_lower */
+ NULL, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
+ 2, /* mbminlen */
+ 4, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_utf16_handler,
+ &my_collation_utf16_general_nopad_ci_handler
+};
+
+
+struct charset_info_st my_charset_utf16_nopad_bin=
+{
+ MY_NOPAD_ID(55),0,0, /* number */
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII|
+ MY_CS_NOPAD,
+ "utf16", /* cs name */
+ "utf16_nopad_bin", /* name */
+ "UTF-16 Unicode", /* comment */
+ NULL, /* tailoring */
+ NULL, /* ctype */
+ NULL, /* to_lower */
+ NULL, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
+ 2, /* mbminlen */
+ 4, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_utf16_handler,
+ &my_collation_utf16_nopad_bin_handler
+};
+
+
#define IS_MB2_CHAR(b0,b1) (!MY_UTF16_SURROGATE_HEAD(b1))
#define IS_MB4_CHAR(b0,b1,b2,b3) (MY_UTF16_HIGH_HEAD(b1) && MY_UTF16_LOW_HEAD(b3))
@@ -1673,6 +1806,20 @@ struct charset_info_st my_charset_utf16_bin=
#define WEIGHT_MB4(b0,b1,b2,b3) ((int) MY_UTF16_WC4(b1, b0, b3, b2))
#include "strcoll.ic"
+#define DEFINE_STRNNCOLLSP_NOPAD
+#define MY_FUNCTION_NAME(x) my_ ## x ## _utf16le_general_nopad_ci
+#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
+#define WEIGHT_MB2(b0,b1) my_weight_mb2_utf16mb2_general_ci(b1,b0)
+#define WEIGHT_MB4(b0,b1,b2,b3) MY_CS_REPLACEMENT_CHARACTER
+#include "strcoll.ic"
+
+#define DEFINE_STRNNCOLLSP_NOPAD
+#define MY_FUNCTION_NAME(x) my_ ## x ## _utf16le_nopad_bin
+#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
+#define WEIGHT_MB2(b0,b1) ((int) MY_UTF16_WC2(b1, b0))
+#define WEIGHT_MB4(b0,b1,b2,b3) ((int) MY_UTF16_WC4(b1, b0, b3, b2))
+#include "strcoll.ic"
+
#undef IS_MB2_CHAR
#undef IS_MB4_CHAR
@@ -1779,6 +1926,38 @@ static MY_COLLATION_HANDLER my_collation_utf16le_bin_handler =
};
+static MY_COLLATION_HANDLER my_collation_utf16le_general_nopad_ci_handler =
+{
+ NULL, /* init */
+ my_strnncoll_utf16le_general_ci,
+ my_strnncollsp_utf16le_general_nopad_ci,
+ my_strnxfrm_unicode_nopad,
+ my_strnxfrmlen_unicode,
+ my_like_range_generic,
+ my_wildcmp_utf16_ci,
+ my_strcasecmp_mb2_or_mb4,
+ my_instr_mb,
+ my_hash_sort_utf16_nopad,
+ my_propagate_simple
+};
+
+
+static MY_COLLATION_HANDLER my_collation_utf16le_nopad_bin_handler =
+{
+ NULL, /* init */
+ my_strnncoll_utf16le_bin,
+ my_strnncollsp_utf16le_nopad_bin,
+ my_strnxfrm_unicode_full_nopad_bin,
+ my_strnxfrmlen_unicode_full_bin,
+ my_like_range_generic,
+ my_wildcmp_utf16_bin,
+ my_strcasecmp_mb2_or_mb4,
+ my_instr_mb,
+ my_hash_sort_utf16_nopad_bin,
+ my_propagate_simple
+};
+
+
static MY_CHARSET_HANDLER my_charset_utf16le_handler=
{
NULL, /* init */
@@ -1879,6 +2058,73 @@ struct charset_info_st my_charset_utf16le_bin=
};
+struct charset_info_st my_charset_utf16le_general_nopad_ci=
+{
+ MY_NOPAD_ID(56),0,0, /* number */
+ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII|MY_CS_NOPAD,
+ "utf16le", /* cs name */
+ "utf16le_general_nopad_ci",/* name */
+ "UTF-16LE Unicode", /* comment */
+ NULL, /* tailoring */
+ NULL, /* ctype */
+ NULL, /* to_lower */
+ NULL, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
+ 2, /* mbminlen */
+ 4, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_utf16le_handler,
+ &my_collation_utf16le_general_nopad_ci_handler
+};
+
+
+struct charset_info_st my_charset_utf16le_nopad_bin=
+{
+ MY_NOPAD_ID(62),0,0, /* number */
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII|
+ MY_CS_NOPAD,
+ "utf16le", /* cs name */
+ "utf16le_nopad_bin", /* name */
+ "UTF-16LE Unicode", /* comment */
+ NULL, /* tailoring */
+ NULL, /* ctype */
+ NULL, /* to_lower */
+ NULL, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
+ 2, /* mbminlen */
+ 4, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_utf16le_handler,
+ &my_collation_utf16le_nopad_bin_handler
+};
+
+
#endif /* HAVE_CHARSET_utf16 */
@@ -1916,6 +2162,18 @@ static inline int my_weight_utf32_general_ci(uchar b0, uchar b1,
#define WEIGHT_MB4(b0,b1,b2,b3) ((int) MY_UTF32_WC4(b0, b1, b2, b3))
#include "strcoll.ic"
+#define DEFINE_STRNNCOLLSP_NOPAD
+#define MY_FUNCTION_NAME(x) my_ ## x ## _utf32_general_nopad_ci
+#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
+#define WEIGHT_MB4(b0,b1,b2,b3) my_weight_utf32_general_ci(b0, b1, b2, b3)
+#include "strcoll.ic"
+
+#define DEFINE_STRNNCOLLSP_NOPAD
+#define MY_FUNCTION_NAME(x) my_ ## x ## _utf32_nopad_bin
+#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
+#define WEIGHT_MB4(b0,b1,b2,b3) ((int) MY_UTF32_WC4(b0, b1, b2, b3))
+#include "strcoll.ic"
+
#undef IS_MB2_CHAR
#undef IS_MB4_CHAR
@@ -1984,6 +2242,18 @@ my_tosort_utf32(MY_UNICASE_INFO *uni_plane, my_wc_t *wc)
static size_t
+my_lengthsp_utf32(CHARSET_INFO *cs __attribute__((unused)),
+ const char *ptr, size_t length)
+{
+ const char *end= ptr + length;
+ DBUG_ASSERT((length % 4) == 0);
+ while (end > ptr + 3 && end[-1] == ' ' && !end[-2] && !end[-3] && !end[-4])
+ end-= 4;
+ return (size_t) (end - ptr);
+}
+
+
+static size_t
my_caseup_utf32(CHARSET_INFO *cs, char *src, size_t srclen,
char *dst __attribute__((unused)),
size_t dstlen __attribute__((unused)))
@@ -2007,8 +2277,8 @@ my_caseup_utf32(CHARSET_INFO *cs, char *src, size_t srclen,
static void
-my_hash_sort_utf32(CHARSET_INFO *cs, const uchar *s, size_t slen,
- ulong *nr1, ulong *nr2)
+my_hash_sort_utf32_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen,
+ ulong *nr1, ulong *nr2)
{
my_wc_t wc;
int res;
@@ -2016,10 +2286,6 @@ my_hash_sort_utf32(CHARSET_INFO *cs, const uchar *s, size_t slen,
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
register ulong m1= *nr1, m2= *nr2;
- /* Skip trailing spaces */
- while (e > s + 3 && e[-1] == ' ' && !e[-2] && !e[-3] && !e[-4])
- e-= 4;
-
while ((res= my_utf32_uni(cs, &wc, (uchar*) s, (uchar*) e)) > 0)
{
my_tosort_utf32(uni_plane, &wc);
@@ -2034,6 +2300,15 @@ my_hash_sort_utf32(CHARSET_INFO *cs, const uchar *s, size_t slen,
}
+static void
+my_hash_sort_utf32(CHARSET_INFO *cs, const uchar *s, size_t slen,
+ ulong *nr1, ulong *nr2)
+{
+ size_t lengthsp= my_lengthsp_utf32(cs, (const char *) s, slen);
+ my_hash_sort_utf32_nopad(cs, s, lengthsp, nr1, nr2);
+}
+
+
static size_t
my_casedn_utf32(CHARSET_INFO *cs, char *src, size_t srclen,
char *dst __attribute__((unused)),
@@ -2415,18 +2690,6 @@ void my_fill_utf32(CHARSET_INFO *cs,
}
-static size_t
-my_lengthsp_utf32(CHARSET_INFO *cs __attribute__((unused)),
- const char *ptr, size_t length)
-{
- const char *end= ptr + length;
- DBUG_ASSERT((length % 4) == 0);
- while (end > ptr + 3 && end[-1] == ' ' && !end[-2] && !end[-3] && !end[-4])
- end-= 4;
- return (size_t) (end - ptr);
-}
-
-
static int
my_wildcmp_utf32_ci(CHARSET_INFO *cs,
const char *str, const char *str_end,
@@ -2509,6 +2772,38 @@ static MY_COLLATION_HANDLER my_collation_utf32_bin_handler =
};
+static MY_COLLATION_HANDLER my_collation_utf32_general_nopad_ci_handler =
+{
+ NULL, /* init */
+ my_strnncoll_utf32_general_ci,
+ my_strnncollsp_utf32_general_nopad_ci,
+ my_strnxfrm_unicode_nopad,
+ my_strnxfrmlen_unicode,
+ my_like_range_generic,
+ my_wildcmp_utf32_ci,
+ my_strcasecmp_mb2_or_mb4,
+ my_instr_mb,
+ my_hash_sort_utf32_nopad,
+ my_propagate_simple
+};
+
+
+static MY_COLLATION_HANDLER my_collation_utf32_nopad_bin_handler =
+{
+ NULL, /* init */
+ my_strnncoll_utf32_bin,
+ my_strnncollsp_utf32_nopad_bin,
+ my_strnxfrm_unicode_full_nopad_bin,
+ my_strnxfrmlen_unicode_full_bin,
+ my_like_range_generic,
+ my_wildcmp_utf32_bin,
+ my_strcasecmp_mb2_or_mb4,
+ my_instr_mb,
+ my_hash_sort_utf32_nopad,
+ my_propagate_simple
+};
+
+
MY_CHARSET_HANDLER my_charset_utf32_handler=
{
NULL, /* init */
@@ -2609,6 +2904,73 @@ struct charset_info_st my_charset_utf32_bin=
};
+struct charset_info_st my_charset_utf32_general_nopad_ci=
+{
+ MY_NOPAD_ID(60),0,0, /* number */
+ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII|MY_CS_NOPAD,
+ "utf32", /* cs name */
+ "utf32_general_nopad_ci", /* name */
+ "UTF-32 Unicode", /* comment */
+ NULL, /* tailoring */
+ NULL, /* ctype */
+ NULL, /* to_lower */
+ NULL, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
+ 4, /* mbminlen */
+ 4, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_utf32_handler,
+ &my_collation_utf32_general_nopad_ci_handler
+};
+
+
+struct charset_info_st my_charset_utf32_nopad_bin=
+{
+ MY_NOPAD_ID(61),0,0, /* number */
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII|
+ MY_CS_NOPAD,
+ "utf32", /* cs name */
+ "utf32_nopad_bin", /* name */
+ "UTF-32 Unicode", /* comment */
+ NULL, /* tailoring */
+ NULL, /* ctype */
+ NULL, /* to_lower */
+ NULL, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
+ 4, /* mbminlen */
+ 4, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_utf32_handler,
+ &my_collation_utf32_nopad_bin_handler
+};
+
+
#endif /* HAVE_CHARSET_utf32 */
@@ -2698,6 +3060,20 @@ static inline int my_weight_mb2_ucs2_general_ci(uchar b0, uchar b1)
#include "strcoll.ic"
+#define DEFINE_STRNNCOLLSP_NOPAD
+#define MY_FUNCTION_NAME(x) my_ ## x ## _ucs2_general_nopad_ci
+#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
+#define WEIGHT_MB2(b0,b1) my_weight_mb2_ucs2_general_ci(b0,b1)
+#include "strcoll.ic"
+
+
+#define DEFINE_STRNNCOLLSP_NOPAD
+#define MY_FUNCTION_NAME(x) my_ ## x ## _ucs2_nopad_bin
+#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
+#define WEIGHT_MB2(b0,b1) UCS2_CODE(b0,b1)
+#include "strcoll.ic"
+
+
static int
my_charlen_ucs2(CHARSET_INFO *cs __attribute__((unused)),
const uchar *s, const uchar *e)
@@ -2779,8 +3155,9 @@ static size_t my_caseup_ucs2(CHARSET_INFO *cs, char *src, size_t srclen,
}
-static void my_hash_sort_ucs2(CHARSET_INFO *cs, const uchar *s, size_t slen,
- ulong *nr1, ulong *nr2)
+static void
+my_hash_sort_ucs2_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen,
+ ulong *nr1, ulong *nr2)
{
my_wc_t wc;
int res;
@@ -2788,9 +3165,6 @@ static void my_hash_sort_ucs2(CHARSET_INFO *cs, const uchar *s, size_t slen,
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
register ulong m1= *nr1, m2= *nr2;
- while (e > s+1 && e[-1] == ' ' && e[-2] == '\0')
- e-= 2;
-
while ((s < e) && (res=my_ucs2_uni(cs,&wc, (uchar *)s, (uchar*)e)) >0)
{
my_tosort_ucs2(uni_plane, &wc);
@@ -2802,6 +3176,13 @@ static void my_hash_sort_ucs2(CHARSET_INFO *cs, const uchar *s, size_t slen,
}
+static void my_hash_sort_ucs2(CHARSET_INFO *cs, const uchar *s, size_t slen,
+ ulong *nr1, ulong *nr2)
+{
+ size_t lengthsp= my_lengthsp_mb2(cs, (const char *) s, slen);
+ my_hash_sort_ucs2_nopad(cs, s, lengthsp, nr1, nr2);
+}
+
static size_t my_casedn_ucs2(CHARSET_INFO *cs, char *src, size_t srclen,
char *dst __attribute__((unused)),
size_t dstlen __attribute__((unused)))
@@ -2928,17 +3309,14 @@ int my_wildcmp_ucs2_bin(CHARSET_INFO *cs,
}
-static
-void my_hash_sort_ucs2_bin(CHARSET_INFO *cs __attribute__((unused)),
- const uchar *key, size_t len,ulong *nr1, ulong *nr2)
+static void
+my_hash_sort_ucs2_nopad_bin(CHARSET_INFO *cs __attribute__((unused)),
+ const uchar *key, size_t len,
+ ulong *nr1, ulong *nr2)
{
- const uchar *end = key + len;
+ const uchar *end= key + len;
register ulong m1= *nr1, m2= *nr2;
-
- while (end > key+1 && end[-1] == ' ' && end[-2] == '\0')
- end-= 2;
-
- for (; key < (uchar*) end ; key++)
+ for ( ; key < end ; key++)
{
MY_HASH_ADD(m1, m2, (uint)*key);
}
@@ -2947,6 +3325,15 @@ void my_hash_sort_ucs2_bin(CHARSET_INFO *cs __attribute__((unused)),
}
+static void
+my_hash_sort_ucs2_bin(CHARSET_INFO *cs,
+ const uchar *key, size_t len, ulong *nr1, ulong *nr2)
+{
+ size_t lengthsp= my_lengthsp_mb2(cs, (const char *) key, len);
+ my_hash_sort_ucs2_nopad_bin(cs, key, lengthsp, nr1, nr2);
+}
+
+
static MY_COLLATION_HANDLER my_collation_ucs2_general_ci_handler =
{
NULL, /* init */
@@ -2979,6 +3366,38 @@ static MY_COLLATION_HANDLER my_collation_ucs2_bin_handler =
};
+static MY_COLLATION_HANDLER my_collation_ucs2_general_nopad_ci_handler =
+{
+ NULL, /* init */
+ my_strnncoll_ucs2_general_ci,
+ my_strnncollsp_ucs2_general_nopad_ci,
+ my_strnxfrm_unicode_nopad,
+ my_strnxfrmlen_unicode,
+ my_like_range_generic,
+ my_wildcmp_ucs2_ci,
+ my_strcasecmp_mb2_or_mb4,
+ my_instr_mb,
+ my_hash_sort_ucs2_nopad,
+ my_propagate_simple
+};
+
+
+static MY_COLLATION_HANDLER my_collation_ucs2_nopad_bin_handler =
+{
+ NULL, /* init */
+ my_strnncoll_ucs2_bin,
+ my_strnncollsp_ucs2_nopad_bin,
+ my_strnxfrm_unicode_nopad,
+ my_strnxfrmlen_unicode,
+ my_like_range_generic,
+ my_wildcmp_ucs2_bin,
+ my_strcasecmp_mb2_or_mb4,
+ my_instr_mb,
+ my_hash_sort_ucs2_nopad_bin,
+ my_propagate_simple
+};
+
+
MY_CHARSET_HANDLER my_charset_ucs2_handler=
{
NULL, /* init */
@@ -3112,4 +3531,69 @@ struct charset_info_st my_charset_ucs2_bin=
};
+struct charset_info_st my_charset_ucs2_general_nopad_ci=
+{
+ MY_NOPAD_ID(35),0,0, /* number */
+ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII|MY_CS_NOPAD,
+ "ucs2", /* cs name */
+ "ucs2_general_nopad_ci", /* name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_ucs2, /* ctype */
+ to_lower_ucs2, /* to_lower */
+ to_upper_ucs2, /* to_upper */
+ to_upper_ucs2, /* sort_order */
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
+ 2, /* mbminlen */
+ 2, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_ucs2_handler,
+ &my_collation_ucs2_general_nopad_ci_handler
+};
+
+
+struct charset_info_st my_charset_ucs2_nopad_bin=
+{
+ MY_NOPAD_ID(90),0,0, /* number */
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_UNICODE|MY_CS_NONASCII|MY_CS_NOPAD,
+ "ucs2", /* cs name */
+ "ucs2_nopad_bin", /* name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_ucs2, /* ctype */
+ to_lower_ucs2, /* to_lower */
+ to_upper_ucs2, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
+ 2, /* mbminlen */
+ 2, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_ucs2_handler,
+ &my_collation_ucs2_nopad_bin_handler
+};
+
#endif /* HAVE_CHARSET_ucs2 */
diff --git a/strings/ctype-ujis.c b/strings/ctype-ujis.c
index 786ae991aef..8c08e906284 100644
--- a/strings/ctype-ujis.c
+++ b/strings/ctype-ujis.c
@@ -220,6 +220,26 @@ static const uchar sort_order_ujis[]=
#include "strcoll.ic"
+#define DEFINE_STRNNCOLLSP_NOPAD
+#define MY_FUNCTION_NAME(x) my_ ## x ## _ujis_japanese_nopad_ci
+#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
+#define WEIGHT_MB1(x) ((int) sort_order_ujis[(uchar) (x)])
+#define WEIGHT_MB2(x,y) ((((uint) (uchar)(x)) << 16) | \
+ (((uint) (uchar) (y)) << 8))
+#define WEIGHT_MB3(x,y,z) (WEIGHT_MB2(x,y) | ((uint) (uchar) z))
+#include "strcoll.ic"
+
+
+#define DEFINE_STRNNCOLLSP_NOPAD
+#define MY_FUNCTION_NAME(x) my_ ## x ## _ujis_nopad_bin
+#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
+#define WEIGHT_MB1(x) ((int) (uchar) (x))
+#define WEIGHT_MB2(x,y) ((((uint) (uchar)(x)) << 16) | \
+ (((uint) (uchar) (y)) << 8))
+#define WEIGHT_MB3(x,y,z) (WEIGHT_MB2(x,y) | ((uint) (uchar) z))
+#include "strcoll.ic"
+
+
static
size_t my_numcells_eucjp(CHARSET_INFO *cs __attribute__((unused)),
const char *str, const char *str_end)
@@ -67246,6 +67266,38 @@ static MY_COLLATION_HANDLER my_collation_ujis_bin_handler =
};
+static MY_COLLATION_HANDLER my_collation_ujis_japanese_nopad_ci_handler =
+{
+ NULL, /* init */
+ my_strnncoll_ujis_japanese_ci,
+ my_strnncollsp_ujis_japanese_nopad_ci,
+ my_strnxfrm_mb_nopad,
+ my_strnxfrmlen_simple,
+ my_like_range_mb,
+ my_wildcmp_mb,
+ my_strcasecmp_mb,
+ my_instr_mb,
+ my_hash_sort_simple_nopad,
+ my_propagate_simple
+};
+
+
+static MY_COLLATION_HANDLER my_collation_ujis_nopad_bin_handler =
+{
+ NULL, /* init */
+ my_strnncoll_ujis_bin,
+ my_strnncollsp_ujis_nopad_bin,
+ my_strnxfrm_mb_nopad,
+ my_strnxfrmlen_simple,
+ my_like_range_mb,
+ my_wildcmp_mb_bin,
+ my_strcasecmp_mb_bin,
+ my_instr_mb,
+ my_hash_sort_mb_nopad_bin,
+ my_propagate_simple
+};
+
+
static MY_CHARSET_HANDLER my_charset_handler=
{
NULL, /* init */
@@ -67347,4 +67399,70 @@ struct charset_info_st my_charset_ujis_bin=
};
+struct charset_info_st my_charset_ujis_japanese_nopad_ci=
+{
+ MY_NOPAD_ID(12),0,0,/* number */
+ MY_CS_COMPILED|MY_CS_NOPAD, /* state */
+ "ujis", /* cs name */
+ "ujis_japanese_nopad_ci", /* name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_ujis,
+ to_lower_ujis,
+ to_upper_ujis,
+ sort_order_ujis,
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_caseinfo_ujis, /* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 2, /* casedn_multiply */
+ 1, /* mbminlen */
+ 3, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 0xFEFE, /* max_sort_char */
+ ' ', /* pad char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_handler,
+ &my_collation_ujis_japanese_nopad_ci_handler
+};
+
+
+struct charset_info_st my_charset_ujis_nopad_bin=
+{
+ MY_NOPAD_ID(91),0,0,/* number */
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NOPAD, /* state */
+ "ujis", /* cs name */
+ "ujis_nopad_bin", /* name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_ujis,
+ to_lower_ujis,
+ to_upper_ujis,
+ NULL, /* sort_order */
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_caseinfo_ujis, /* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 2, /* casedn_multiply */
+ 1, /* mbminlen */
+ 3, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 0xFEFE, /* max_sort_char */
+ ' ', /* pad char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_handler,
+ &my_collation_ujis_nopad_bin_handler
+};
+
+
#endif /* HAVE_CHARSET_ujis */
diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c
index 494e292aac6..39d3521baa4 100644
--- a/strings/ctype-utf8.c
+++ b/strings/ctype-utf8.c
@@ -111,7 +111,9 @@
#define MY_UTF8MB3_BIN MY_UTF8MB3 "_bin"
#define MY_UTF8MB4_GENERAL_CI MY_UTF8MB4 "_general_ci"
#define MY_UTF8MB4_GENERAL_CS MY_UTF8MB4 "_general_cs"
+#define MY_UTF8MB4_GENERAL_NOPAD_CI MY_UTF8MB4 "_general_nopad_ci"
#define MY_UTF8MB4_BIN MY_UTF8MB4 "_bin"
+#define MY_UTF8MB4_NOPAD_BIN MY_UTF8MB4 "_nopad_bin"
@@ -4692,30 +4694,19 @@ my_strxfrm_pad_unicode(uchar *str, uchar *strend)
}
-/*
- Store sorting weights using 2 bytes per character.
-
- This function is shared between
- - utf8mb3_general_ci, utf8_bin, ucs2_general_ci, ucs2_bin
- which support BMP only (U+0000..U+FFFF).
- - utf8mb4_general_ci, utf16_general_ci, utf32_general_ci,
- which map all supplementary characters to weight 0xFFFD.
-*/
-size_t
-my_strnxfrm_unicode(CHARSET_INFO *cs,
- uchar *dst, size_t dstlen, uint nweights,
- const uchar *src, size_t srclen, uint flags)
+size_t my_strnxfrm_unicode_internal(CHARSET_INFO *cs,
+ uchar *dst, uchar *de, uint *nweights,
+ const uchar *src, const uchar *se)
{
my_wc_t UNINIT_VAR(wc);
int res;
uchar *dst0= dst;
- uchar *de= dst + dstlen;
- const uchar *se= src + srclen;
MY_UNICASE_INFO *uni_plane= (cs->state & MY_CS_BINSORT) ?
NULL : cs->caseinfo;
- DBUG_ASSERT(!srclen || src);
- for (; dst < de && nweights; nweights--)
+ DBUG_ASSERT(src || !se);
+
+ for (; dst < de && *nweights; (*nweights)--)
{
if ((res= cs->cset->mb_wc(cs, &wc, src, se)) <= 0)
break;
@@ -4728,6 +4719,29 @@ my_strnxfrm_unicode(CHARSET_INFO *cs,
if (dst < de)
*dst++= (uchar) (wc & 0xFF);
}
+ return dst - dst0;
+}
+
+
+/*
+ Store sorting weights using 2 bytes per character.
+
+ This function is shared between
+ - utf8mb3_general_ci, utf8_bin, ucs2_general_ci, ucs2_bin
+ which support BMP only (U+0000..U+FFFF).
+ - utf8mb4_general_ci, utf16_general_ci, utf32_general_ci,
+ which map all supplementary characters to weight 0xFFFD.
+*/
+size_t
+my_strnxfrm_unicode(CHARSET_INFO *cs,
+ uchar *dst, size_t dstlen, uint nweights,
+ const uchar *src, size_t srclen, uint flags)
+{
+ uchar *dst0= dst;
+ uchar *de= dst + dstlen;
+ dst+= my_strnxfrm_unicode_internal(cs, dst, de, &nweights,
+ src, src + srclen);
+ DBUG_ASSERT(dst <= de); /* Safety */
if (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE))
dst+= my_strxfrm_pad_nweights_unicode(dst, de, nweights);
@@ -4740,6 +4754,35 @@ my_strnxfrm_unicode(CHARSET_INFO *cs,
}
+size_t
+my_strnxfrm_unicode_nopad(CHARSET_INFO *cs,
+ uchar *dst, size_t dstlen, uint nweights,
+ const uchar *src, size_t srclen, uint flags)
+{
+ uchar *dst0= dst;
+ uchar *de= dst + dstlen;
+ dst+= my_strnxfrm_unicode_internal(cs, dst, de, &nweights,
+ src, src + srclen);
+ DBUG_ASSERT(dst <= de); /* Safety */
+
+ if (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE))
+ {
+ size_t len= de - dst;
+ set_if_smaller(len, nweights * 2);
+ memset(dst, 0x00, len);
+ dst+= len;
+ }
+
+ my_strxfrm_desc_and_reverse(dst0, dst, flags, 0);
+
+ if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && dst < de)
+ {
+ memset(dst, 0x00, de - dst);
+ dst= de;
+ }
+ return dst - dst0;
+}
+
/*
For BMP-only collations that use 2 bytes per weight.
*/
@@ -4750,24 +4793,18 @@ my_strnxfrmlen_unicode(CHARSET_INFO *cs, size_t len)
return ((len + cs->mbmaxlen - 1) / cs->mbmaxlen) * 2;
}
-/*
- Store sorting weights using 3 bytes per character.
- This function is shared between utf8mb4_bin, utf16_bin, utf32_bin.
-*/
size_t
-my_strnxfrm_unicode_full_bin(CHARSET_INFO *cs,
- uchar *dst, size_t dstlen, uint nweights,
- const uchar *src, size_t srclen, uint flags)
+my_strnxfrm_unicode_full_bin_internal(CHARSET_INFO *cs,
+ uchar *dst, uchar *de, uint *nweights,
+ const uchar *src, const uchar *se)
{
my_wc_t UNINIT_VAR(wc);
uchar *dst0= dst;
- uchar *de= dst + dstlen;
- const uchar *se = src + srclen;
- DBUG_ASSERT(!srclen || src);
+ DBUG_ASSERT(src || !se);
DBUG_ASSERT(cs->state & MY_CS_BINSORT);
- for ( ; dst < de && nweights; nweights--)
+ for (; dst < de && *nweights; (*nweights)--)
{
int res;
if ((res= cs->cset->mb_wc(cs, &wc, src, se)) <= 0)
@@ -4781,6 +4818,26 @@ my_strnxfrm_unicode_full_bin(CHARSET_INFO *cs,
*dst++= (uchar) (wc & 0xFF);
}
}
+ return dst - dst0;
+}
+
+
+/*
+ Store sorting weights using 3 bytes per character.
+ This function is shared between utf8mb4_bin, utf16_bin, utf32_bin.
+*/
+size_t
+my_strnxfrm_unicode_full_bin(CHARSET_INFO *cs,
+ uchar *dst, size_t dstlen, uint nweights,
+ const uchar *src, size_t srclen, uint flags)
+{
+ my_wc_t UNINIT_VAR(wc);
+ uchar *dst0= dst;
+ uchar *de= dst + dstlen;
+
+ dst+= my_strnxfrm_unicode_full_bin_internal(cs, dst, de, &nweights,
+ src, src + srclen);
+ DBUG_ASSERT(dst <= de); /* Safety */
if (flags & MY_STRXFRM_PAD_WITH_SPACE)
{
@@ -4795,7 +4852,7 @@ my_strnxfrm_unicode_full_bin(CHARSET_INFO *cs,
}
}
}
-
+
my_strxfrm_desc_and_reverse(dst0, dst, flags, 0);
if (flags & MY_STRXFRM_PAD_TO_MAXLEN)
@@ -4816,6 +4873,38 @@ my_strnxfrm_unicode_full_bin(CHARSET_INFO *cs,
size_t
+my_strnxfrm_unicode_full_nopad_bin(CHARSET_INFO *cs,
+ uchar *dst, size_t dstlen, uint nweights,
+ const uchar *src, size_t srclen, uint flags)
+{
+ my_wc_t UNINIT_VAR(wc);
+ uchar *dst0= dst;
+ uchar *de= dst + dstlen;
+
+ dst+= my_strnxfrm_unicode_full_bin_internal(cs, dst, de, &nweights,
+ src, src + srclen);
+ DBUG_ASSERT(dst <= de); /* Safety */
+
+ if (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE))
+ {
+ size_t len= de - dst;
+ set_if_smaller(len, nweights * 3);
+ memset(dst, 0x00, len);
+ dst+= len;
+ }
+
+ my_strxfrm_desc_and_reverse(dst0, dst, flags, 0);
+
+ if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && dst < de)
+ {
+ memset(dst, 0x00, de - dst);
+ dst= de;
+ }
+ return dst - dst0;
+}
+
+
+size_t
my_strnxfrmlen_unicode_full_bin(CHARSET_INFO *cs, size_t len)
{
return ((len + 3) / cs->mbmaxlen) * 3;
@@ -5092,33 +5181,40 @@ static size_t my_caseup_utf8(CHARSET_INFO *cs, char *src, size_t srclen,
}
-static void my_hash_sort_utf8(CHARSET_INFO *cs, const uchar *s, size_t slen,
- ulong *nr1, ulong *nr2)
+static void my_hash_sort_utf8_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen,
+ ulong *nr1, ulong *nr2)
{
my_wc_t wc;
int res;
- const uchar *e=s+slen;
+ const uchar *e= s+slen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
register ulong m1= *nr1, m2= *nr2;
- /*
- Remove end space. We have to do this to be able to compare
- 'A ' and 'A' as identical
- */
- while (e > s && e[-1] == ' ')
- e--;
-
while ((s < e) && (res=my_utf8_uni(cs,&wc, (uchar *)s, (uchar*)e))>0 )
{
my_tosort_unicode(uni_plane, &wc, cs->state);
MY_HASH_ADD_16(m1, m2, wc);
- s+=res;
+ s+= res;
}
*nr1= m1;
*nr2= m2;
}
+static void my_hash_sort_utf8(CHARSET_INFO *cs, const uchar *s, size_t slen,
+ ulong *nr1, ulong *nr2)
+{
+ const uchar *e= s+slen;
+ /*
+ Remove end space. We have to do this to be able to compare
+ 'A ' and 'A' as identical
+ */
+ while (e > s && e[-1] == ' ')
+ e--;
+ my_hash_sort_utf8_nopad(cs, s, e - s, nr1, nr2);
+}
+
+
static size_t my_caseup_str_utf8(CHARSET_INFO *cs, char *src)
{
my_wc_t wc;
@@ -5387,6 +5483,15 @@ static inline int my_weight_mb3_utf8_general_ci(uchar b0, uchar b1, uchar b2)
#include "strcoll.ic"
+#define DEFINE_STRNNCOLLSP_NOPAD
+#define MY_FUNCTION_NAME(x) my_ ## x ## _utf8_general_nopad_ci
+#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
+#define WEIGHT_MB1(x) my_weight_mb1_utf8_general_ci(x)
+#define WEIGHT_MB2(x,y) my_weight_mb2_utf8_general_ci(x,y)
+#define WEIGHT_MB3(x,y,z) my_weight_mb3_utf8_general_ci(x,y,z)
+#include "strcoll.ic"
+
+
static inline int my_weight_mb1_utf8_general_mysql500_ci(uchar b)
{
return (int) plane00_mysql500[b & 0xFF].sort;
@@ -5426,6 +5531,14 @@ my_weight_mb3_utf8_general_mysql500_ci(uchar b0, uchar b1, uchar b2)
#include "strcoll.ic"
+#define DEFINE_STRNNCOLLSP_NOPAD
+#define MY_FUNCTION_NAME(x) my_ ## x ## _utf8_nopad_bin
+#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
+#define WEIGHT_MB1(x) ((int) (uchar) (x))
+#define WEIGHT_MB2(x,y) ((int) UTF8MB2_CODE(x,y))
+#define WEIGHT_MB3(x,y,z) ((int) UTF8MB3_CODE(x,y,z))
+#include "strcoll.ic"
+
/*
TODO-10.2: join this with pad_max_char() in ctype-mb.c
*/
@@ -5505,6 +5618,39 @@ static MY_COLLATION_HANDLER my_collation_utf8_bin_handler =
my_propagate_simple
};
+
+static MY_COLLATION_HANDLER my_collation_utf8_general_nopad_ci_handler =
+{
+ NULL, /* init */
+ my_strnncoll_utf8_general_ci,
+ my_strnncollsp_utf8_general_nopad_ci,
+ my_strnxfrm_unicode_nopad,
+ my_strnxfrmlen_unicode,
+ my_like_range_mb,
+ my_wildcmp_utf8,
+ my_strcasecmp_utf8,
+ my_instr_mb,
+ my_hash_sort_utf8_nopad,
+ my_propagate_complex
+};
+
+
+static MY_COLLATION_HANDLER my_collation_utf8_nopad_bin_handler =
+{
+ NULL, /* init */
+ my_strnncoll_utf8_bin,
+ my_strnncollsp_utf8_nopad_bin,
+ my_strnxfrm_unicode_nopad,
+ my_strnxfrmlen_unicode,
+ my_like_range_mb,
+ my_wildcmp_mb_bin,
+ my_strcasecmp_mb_bin,
+ my_instr_mb,
+ my_hash_sort_mb_nopad_bin,
+ my_propagate_simple
+};
+
+
MY_CHARSET_HANDLER my_charset_utf8_handler=
{
NULL, /* init */
@@ -5638,6 +5784,73 @@ struct charset_info_st my_charset_utf8_bin=
&my_collation_utf8_bin_handler
};
+
+struct charset_info_st my_charset_utf8_general_nopad_ci=
+{
+ MY_NOPAD_ID(33),0,0, /* number */
+ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NOPAD, /* state */
+ "utf8", /* cs name */
+ "utf8_general_nopad_ci", /* name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_utf8, /* ctype */
+ to_lower_utf8, /* to_lower */
+ to_upper_utf8, /* to_upper */
+ to_upper_utf8, /* sort_order */
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_unicase_default, /* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
+ 1, /* mbminlen */
+ 3, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_utf8_handler,
+ &my_collation_utf8_general_nopad_ci_handler
+};
+
+
+struct charset_info_st my_charset_utf8_nopad_bin=
+{
+ MY_NOPAD_ID(83),0,0,/* number */
+ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_BINSORT|MY_CS_UNICODE|MY_CS_NOPAD,
+ "utf8", /* cs name */
+ "utf8_nopad_bin", /* name */
+ "", /* comment */
+ NULL, /* tailoring */
+ ctype_utf8, /* ctype */
+ to_lower_utf8, /* to_lower */
+ to_upper_utf8, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_unicase_default,/* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
+ 1, /* mbminlen */
+ 3, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_utf8_handler,
+ &my_collation_utf8_nopad_bin_handler
+};
+
+
#ifdef HAVE_UTF8_GENERAL_CS
/*
@@ -7427,7 +7640,7 @@ my_caseup_utf8mb4(CHARSET_INFO *cs, char *src, size_t srclen,
static void
-my_hash_sort_utf8mb4(CHARSET_INFO *cs, const uchar *s, size_t slen,
+my_hash_sort_utf8mb4_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen,
ulong *nr1, ulong *nr2)
{
my_wc_t wc;
@@ -7436,13 +7649,6 @@ my_hash_sort_utf8mb4(CHARSET_INFO *cs, const uchar *s, size_t slen,
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
register ulong m1= *nr1, m2= *nr2;
- /*
- Remove end space. We do this to be able to compare
- 'A ' and 'A' as identical
- */
- while (e > s && e[-1] == ' ')
- e--;
-
while ((res= my_mb_wc_utf8mb4(cs, &wc, (uchar*) s, (uchar*) e)) > 0)
{
my_tosort_unicode(uni_plane, &wc, cs->state);
@@ -7465,6 +7671,21 @@ my_hash_sort_utf8mb4(CHARSET_INFO *cs, const uchar *s, size_t slen,
}
+static void
+my_hash_sort_utf8mb4(CHARSET_INFO *cs, const uchar *s, size_t slen,
+ ulong *nr1, ulong *nr2)
+{
+ const uchar *e= s + slen;
+ /*
+ Remove end space. We do this to be able to compare
+ 'A ' and 'A' as identical
+ */
+ while (e > s && e[-1] == ' ')
+ e--;
+ my_hash_sort_utf8mb4_nopad(cs, s, e - s, nr1, nr2);
+}
+
+
static size_t
my_caseup_str_utf8mb4(CHARSET_INFO *cs, char *src)
{
@@ -7719,6 +7940,30 @@ size_t my_well_formed_len_utf8mb4(CHARSET_INFO *cs,
#include "strcoll.ic"
+#define DEFINE_STRNNCOLLSP_NOPAD
+#define MY_FUNCTION_NAME(x) my_ ## x ## _utf8mb4_general_nopad_ci
+#define IS_MB4_CHAR(b0,b1,b2,b3) IS_UTF8MB4_STEP3(b0,b1,b2,b3)
+#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
+#define WEIGHT_MB1(b0) my_weight_mb1_utf8_general_ci(b0)
+#define WEIGHT_MB2(b0,b1) my_weight_mb2_utf8_general_ci(b0,b1)
+#define WEIGHT_MB3(b0,b1,b2) my_weight_mb3_utf8_general_ci(b0,b1,b2)
+/*
+ All non-BMP characters have the same weight.
+*/
+#define WEIGHT_MB4(b0,b1,b2,b3) MY_CS_REPLACEMENT_CHARACTER
+#include "strcoll.ic"
+
+
+#define DEFINE_STRNNCOLLSP_NOPAD
+#define MY_FUNCTION_NAME(x) my_ ## x ## _utf8mb4_nopad_bin
+#define WEIGHT_ILSEQ(x) (0xFF0000 + (uchar) (x))
+#define WEIGHT_MB1(b0) ((int) (uchar) (b0))
+#define WEIGHT_MB2(b0,b1) ((int) UTF8MB2_CODE(b0,b1))
+#define WEIGHT_MB3(b0,b1,b2) ((int) UTF8MB3_CODE(b0,b1,b2))
+#define WEIGHT_MB4(b0,b1,b2,b3) ((int) UTF8MB4_CODE(b0,b1,b2,b3))
+#include "strcoll.ic"
+
+
static MY_COLLATION_HANDLER my_collation_utf8mb4_general_ci_handler=
{
NULL, /* init */
@@ -7737,7 +7982,7 @@ static MY_COLLATION_HANDLER my_collation_utf8mb4_general_ci_handler=
static MY_COLLATION_HANDLER my_collation_utf8mb4_bin_handler =
{
- NULL, /* init */
+ NULL, /* init */
my_strnncoll_utf8mb4_bin,
my_strnncollsp_utf8mb4_bin,
my_strnxfrm_unicode_full_bin,
@@ -7751,6 +7996,38 @@ static MY_COLLATION_HANDLER my_collation_utf8mb4_bin_handler =
};
+static MY_COLLATION_HANDLER my_collation_utf8mb4_general_nopad_ci_handler=
+{
+ NULL, /* init */
+ my_strnncoll_utf8mb4_general_ci,
+ my_strnncollsp_utf8mb4_general_nopad_ci,
+ my_strnxfrm_unicode_nopad,
+ my_strnxfrmlen_unicode,
+ my_like_range_mb,
+ my_wildcmp_utf8mb4,
+ my_strcasecmp_utf8mb4,
+ my_instr_mb,
+ my_hash_sort_utf8mb4_nopad,
+ my_propagate_complex
+};
+
+
+static MY_COLLATION_HANDLER my_collation_utf8mb4_nopad_bin_handler =
+{
+ NULL, /* init */
+ my_strnncoll_utf8mb4_bin,
+ my_strnncollsp_utf8mb4_nopad_bin,
+ my_strnxfrm_unicode_full_nopad_bin,
+ my_strnxfrmlen_unicode_full_bin,
+ my_like_range_mb,
+ my_wildcmp_mb_bin,
+ my_strcasecmp_mb_bin,
+ my_instr_mb,
+ my_hash_sort_mb_nopad_bin,
+ my_propagate_simple
+};
+
+
MY_CHARSET_HANDLER my_charset_utf8mb4_handler=
{
NULL, /* init */
@@ -7852,4 +8129,72 @@ struct charset_info_st my_charset_utf8mb4_bin=
&my_collation_utf8mb4_bin_handler
};
+
+struct charset_info_st my_charset_utf8mb4_general_nopad_ci=
+{
+ MY_NOPAD_ID(45),0,0,/* number */
+ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_UNICODE_SUPPLEMENT|
+ MY_CS_NOPAD, /* state */
+ MY_UTF8MB4, /* cs name */
+ MY_UTF8MB4_GENERAL_NOPAD_CI,/* name */
+ "UTF-8 Unicode", /* comment */
+ NULL, /* tailoring */
+ ctype_utf8mb4, /* ctype */
+ to_lower_utf8mb4, /* to_lower */
+ to_upper_utf8mb4, /* to_upper */
+ to_upper_utf8mb4, /* sort_order */
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_unicase_default,/* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
+ 1, /* mbminlen */
+ 4, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_utf8mb4_handler,
+ &my_collation_utf8mb4_general_nopad_ci_handler
+};
+
+
+struct charset_info_st my_charset_utf8mb4_nopad_bin=
+{
+ MY_NOPAD_ID(46),0,0, /* number */
+ MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_STRNXFRM|MY_CS_UNICODE|
+ MY_CS_UNICODE_SUPPLEMENT|MY_CS_NOPAD, /* state */
+ MY_UTF8MB4, /* cs name */
+ MY_UTF8MB4_NOPAD_BIN, /* name */
+ "UTF-8 Unicode", /* comment */
+ NULL, /* tailoring */
+ ctype_utf8mb4, /* ctype */
+ to_lower_utf8mb4, /* to_lower */
+ to_upper_utf8mb4, /* to_upper */
+ NULL, /* sort_order */
+ NULL, /* uca */
+ NULL, /* tab_to_uni */
+ NULL, /* tab_from_uni */
+ &my_unicase_default,/* caseinfo */
+ NULL, /* state_map */
+ NULL, /* ident_map */
+ 1, /* strxfrm_multiply */
+ 1, /* caseup_multiply */
+ 1, /* casedn_multiply */
+ 1, /* mbminlen */
+ 4, /* mbmaxlen */
+ 0, /* min_sort_char */
+ 0xFFFF, /* max_sort_char */
+ ' ', /* pad char */
+ 0, /* escape_with_backslash_is_dangerous */
+ 1, /* levels_for_order */
+ &my_charset_utf8mb4_handler,
+ &my_collation_utf8mb4_nopad_bin_handler
+};
+
#endif /* HAVE_CHARSET_utf8mb4 */
diff --git a/strings/ctype.c b/strings/ctype.c
index 620c7e13503..7d9789e48e2 100644
--- a/strings/ctype.c
+++ b/strings/ctype.c
@@ -88,6 +88,8 @@ struct my_cs_file_section_st
#define _CS_CL_SUPPRESS_CONTRACTIONS 101
#define _CS_CL_OPTIMIZE 102
#define _CS_CL_SHIFT_AFTER_METHOD 103
+#define _CS_CL_RULES_IMPORT 104
+#define _CS_CL_RULES_IMPORT_SOURCE 105
/* Collation Settings */
@@ -188,6 +190,8 @@ static const struct my_cs_file_section_st sec[] =
{_CS_CL_SUPPRESS_CONTRACTIONS, "charsets/charset/collation/suppress_contractions"},
{_CS_CL_OPTIMIZE, "charsets/charset/collation/optimize"},
{_CS_CL_SHIFT_AFTER_METHOD, "charsets/charset/collation/shift-after-method"},
+ {_CS_CL_RULES_IMPORT, "charsets/charset/collation/rules/import"},
+ {_CS_CL_RULES_IMPORT_SOURCE, "charsets/charset/collation/rules/import/source"},
/* Collation Settings */
{_CS_ST_SETTINGS, "charsets/charset/collation/settings"},
@@ -614,6 +618,8 @@ static int cs_value(MY_XML_PARSER *st,const char *attr, size_t len)
i->cs.state|= MY_CS_BINSORT;
else if (!strncmp("compiled",attr,len))
i->cs.state|= MY_CS_COMPILED;
+ else if (!strncmp("nopad",attr,len))
+ i->cs.state|= MY_CS_NOPAD;
break;
case _CS_UPPERMAP:
fill_uchar(i->to_upper,MY_CS_TO_UPPER_TABLE_SIZE,attr,len);
@@ -641,6 +647,10 @@ static int cs_value(MY_XML_PARSER *st,const char *attr, size_t len)
rc= tailoring_append(st, "[version %.*s]", len, attr);
break;
+ case _CS_CL_RULES_IMPORT_SOURCE:
+ rc= tailoring_append(st, "[import %.*s]", len, attr);
+ break;
+
case _CS_CL_SUPPRESS_CONTRACTIONS:
rc= tailoring_append(st, "[suppress contractions %.*s]", len, attr);
break;
@@ -974,48 +984,6 @@ my_charset_is_ascii_based(CHARSET_INFO *cs)
/*
- Detect if a character set is 8bit,
- and it is pure ascii, i.e. doesn't have
- characters outside U+0000..U+007F
- This functions is shared between "conf_to_src"
- and dynamic charsets loader in "mysqld".
-*/
-my_bool
-my_charset_is_8bit_pure_ascii(CHARSET_INFO *cs)
-{
- size_t code;
- if (!cs->tab_to_uni)
- return 0;
- for (code= 0; code < 256; code++)
- {
- if (cs->tab_to_uni[code] > 0x7F)
- return 0;
- }
- return 1;
-}
-
-
-/*
- Shared function between conf_to_src and mysys.
- Check if a 8bit character set is compatible with
- ascii on the range 0x00..0x7F.
-*/
-my_bool
-my_charset_is_ascii_compatible(CHARSET_INFO *cs)
-{
- uint i;
- if (!cs->tab_to_uni)
- return 1;
- for (i= 0; i < 128; i++)
- {
- if (cs->tab_to_uni[i] != i)
- return 0;
- }
- return 1;
-}
-
-
-/*
Convert a string between two character sets.
'to' must be large enough to store (form_length * to_cs->mbmaxlen) bytes.
diff --git a/strings/strcoll.ic b/strings/strcoll.ic
index a9693b1f3c0..c647a5ef57e 100644
--- a/strings/strcoll.ic
+++ b/strings/strcoll.ic
@@ -202,8 +202,10 @@ MY_FUNCTION_NAME(strnncoll)(CHARSET_INFO *cs __attribute__((unused)),
}
+#ifdef DEFINE_STRNNCOLLSP_NOPAD
+
/**
- Compare two strings according to the collation, with PAD SPACE handling.
+ Compare two strings according to the collation, with NO PAD handling.
@param cs - the character set and collation
@param a - the left string
@@ -212,7 +214,24 @@ MY_FUNCTION_NAME(strnncoll)(CHARSET_INFO *cs __attribute__((unused)),
@param b_length - the length of the right string
@return - the comparison result
*/
+static int
+MY_FUNCTION_NAME(strnncollsp)(CHARSET_INFO *cs __attribute__((unused)),
+ const uchar *a, size_t a_length,
+ const uchar *b, size_t b_length)
+{
+ return MY_FUNCTION_NAME(strnncoll)(cs, a, a_length, b, b_length, FALSE);
+}
+#else
+/**
+ Compare two strings according to the collation, with PAD SPACE handling.
+ @param cs - the character set and collation
+ @param a - the left string
+ @param a_length - the length of the left string
+ @param b - the right string
+ @param b_length - the length of the right string
+ @return - the comparison result
+*/
static int
MY_FUNCTION_NAME(strnncollsp)(CHARSET_INFO *cs __attribute__((unused)),
const uchar *a, size_t a_length,
@@ -257,6 +276,7 @@ MY_FUNCTION_NAME(strnncollsp)(CHARSET_INFO *cs __attribute__((unused)),
DBUG_ASSERT(0);
return 0;
}
+#endif
#ifdef DEFINE_STRNXFRM
@@ -292,7 +312,12 @@ MY_FUNCTION_NAME(strnxfrm)(CHARSET_INFO *cs,
else
*dst++= sort_order ? sort_order[*src++] : *src++;
}
+#ifdef DEFINE_STRNNCOLLSP_NOPAD
+ return my_strxfrm_pad_desc_and_reverse_nopad(cs, d0, dst, de,
+ nweights, flags, 0);
+#else
return my_strxfrm_pad_desc_and_reverse(cs, d0, dst, de, nweights, flags, 0);
+#endif
}
#endif /* DEFINE_STRNXFRM */
@@ -310,3 +335,4 @@ MY_FUNCTION_NAME(strnxfrm)(CHARSET_INFO *cs,
#undef WEIGHT_PAD_SPACE
#undef WEIGHT_MB2_FRM
#undef DEFINE_STRNXFRM
+#undef DEFINE_STRNNCOLLSP_NOPAD
diff --git a/strings/strings_def.h b/strings/strings_def.h
index fb280b6bb6b..8bdb806d1d2 100644
--- a/strings/strings_def.h
+++ b/strings/strings_def.h
@@ -32,6 +32,8 @@
#define DBUG_ASSERT(A) assert(A)
#endif
+#define MY_NOPAD_ID(x) ((x)+0x400)
+
/* SPACE_INT is a word that contains only spaces */
#if SIZEOF_INT == 4
#define SPACE_INT 0x20202020
@@ -101,6 +103,11 @@ static inline const uchar *skip_trailing_space(const uchar *ptr,size_t len)
return (end);
}
+
+uint my_8bit_charset_flags_from_data(CHARSET_INFO *cs);
+uint my_8bit_collation_flags_from_data(CHARSET_INFO *cs);
+
+
/* Macros for hashing characters */
#define MY_HASH_ADD(A, B, value) \
diff --git a/support-files/mariadb.service.in b/support-files/mariadb.service.in
index 55202c696fb..15f41c6377f 100644
--- a/support-files/mariadb.service.in
+++ b/support-files/mariadb.service.in
@@ -45,16 +45,31 @@ Group=mysql
# To allow memlock to be used as non-root user if set in configuration
CapabilityBoundingSet=CAP_IPC_LOCK
+# Prevent writes to /usr, /boot, and /etc
+ProtectSystem=full
+
+# Doesn't yet work properly with SELinux enabled
+# NoNewPrivileges=true
+
+PrivateDevices=true
+
+# Prevent accessing /home, /root and /run/user
+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.
# It is always safe to unset _WSREP_START_POSITION environment variable.
+# Do not panic if galera_recovery script is not available. (MDEV-10538)
ExecStartPre=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION"
-ExecStartPre=/bin/sh -c "VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && \
- systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1"
+ExecStartPre=/bin/sh -c "[ ! -e /usr/bin/galera_recovery ] && VAR= || \
+ VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] \
+ && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1"
# Needed to create system tables etc.
# ExecStartPre=/usr/bin/mysql_install_db -u mysql
@@ -64,7 +79,6 @@ ExecStartPre=/bin/sh -c "VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && \
# Use the [service] section and Environment="MYSQLD_OPTS=...".
# This isn't a replacement for my.cnf.
# _WSREP_NEW_CLUSTER is for the exclusive use of the script galera_new_cluster
-@SYSTEMD_EXECSTARTPRE@
ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION
@SYSTEMD_EXECSTARTPOST@
diff --git a/support-files/mariadb@.service.in b/support-files/mariadb@.service.in
index 18adf0e0eac..e941f21526e 100644
--- a/support-files/mariadb@.service.in
+++ b/support-files/mariadb@.service.in
@@ -52,6 +52,17 @@ Group=mysql
# To allow memlock to be used as non-root user if set in configuration
CapabilityBoundingSet=CAP_IPC_LOCK
+# Prevent writes to /usr, /boot, and /etc
+ProtectSystem=full
+
+# Doesn't yet work properly with SELinux enabled
+# NoNewPrivileges=true
+
+PrivateDevices=true
+
+# Prevent accessing /home, /root and /run/user
+ProtectHome=true
+
# Execute pre and post scripts as root, otherwise it does it as User=
PermissionsStartOnly=true
@@ -59,16 +70,19 @@ PermissionsStartOnly=true
# galera_recovery simply returns an empty string. In any case, however,
# the script is not expected to return with a non-zero status.
# It is always safe to unset _WSREP_START_POSITION%I environment variable.
+# Do not panic if galera_recovery script is not available. (MDEV-10538)
ExecStartPre=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION%I"
-ExecStartPre=/bin/sh -c "VAR=`/usr/bin/galera_recovery \
- --defaults-file=@INSTALL_SYSCONF2DIR@/my%I.cnf`; [ $? -eq 0 ] && \
- systemctl set-environment _WSREP_START_POSITION%I=$VAR || exit 1"
+
+ExecStartPre=/bin/sh -c "[ ! -e /usr/bin/galera_recovery ] && VAR= || \
+ VAR=`/usr/bin/galera_recovery --defaults-file=@INSTALL_SYSCONF2DIR@/my%I.cnf`; [ $? -eq 0 ] \
+ && systemctl set-environment _WSREP_START_POSITION%I=$VAR || exit 1"
+
# Alternate: (remove ConditionPathExists above)
# use [mysqld.INSTANCENAME] as sections in my.cnf
#
-#ExecStartPre=/bin/sh -c "VAR=`/usr/bin/galera_recovery \
-# --defaults-group-suffix=%I`; [ $? -eq 0 ] && \
-# systemctl set-environment _WSREP_START_POSITION%I=$VAR || exit 1"
+#ExecStartPre=/bin/sh -c "[ ! -e /usr/bin/galera_recovery ] && VAR= || \
+# VAR=`/usr/bin/galera_recovery --defaults-group-suffix=%I`; [ $? -eq 0 ] \
+# && systemctl set-environment _WSREP_START_POSITION%I=$VAR || exit 1"
# Needed to create system tables etc.
# ExecStartPre=/usr/bin/mysql_install_db -u mysql
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 806924e8e0e..31e3150b237 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -18508,6 +18508,7 @@ static void test_bug58036()
/* Part1: try to connect with ucs2 client character set */
conn= mysql_client_init(NULL);
mysql_options(conn, MYSQL_SET_CHARSET_NAME, "ucs2");
+
if (mysql_real_connect(conn, opt_host, opt_user,
opt_password, opt_db ? opt_db : "test",
opt_port, opt_unix_socket, 0))
@@ -18558,7 +18559,6 @@ static void test_bug58036()
printf("Got mysql_change_user() error (expected): %s (%d)\n",
mysql_error(conn), mysql_errno(conn));
mysql_close(conn);
-
DBUG_VOID_RETURN;
}
@@ -19417,6 +19417,7 @@ static void test_big_packet()
opt_password, current_db, opt_port,
opt_unix_socket, 0)))
{
+ mysql_close(mysql_local);
fprintf(stderr, "\n connection failed(%s)", mysql_error(mysql_local));
exit(1);
}
diff --git a/vio/viosocket.c b/vio/viosocket.c
index a33de48c020..074948badec 100644
--- a/vio/viosocket.c
+++ b/vio/viosocket.c
@@ -190,6 +190,12 @@ size_t vio_read(Vio *vio, uchar *buf, size_t size)
{
DBUG_PRINT("vio_error", ("Got error %d during read", errno));
}
+#ifndef DEBUG_DATA_PACKETS
+ else
+ {
+ DBUG_DUMP("read_data", buf, ret);
+ }
+#endif /* DEBUG_DATA_PACKETS */
#endif /* DBUG_OFF */
DBUG_PRINT("exit", ("%d", (int) ret));
DBUG_RETURN(ret);
@@ -369,6 +375,13 @@ int vio_blocking(Vio *vio, my_bool set_blocking_mode, my_bool *old_mode)
DBUG_RETURN(r);
}
+/*
+ Check if vio is blocking
+
+ @retval 0 is not blocking
+ @retval 1 is blocking
+*/
+
my_bool
vio_is_blocking(Vio * vio)
{
@@ -523,7 +536,9 @@ int vio_keepalive(Vio* vio, my_bool set_keep_alive)
my_bool
vio_should_retry(Vio *vio)
{
- return (vio_errno(vio) == SOCKET_EINTR);
+ DBUG_ENTER("vio_should_retry");
+ DBUG_PRINT("info", ("vio_errno: %d", vio_errno(vio)));
+ DBUG_RETURN(vio_errno(vio) == SOCKET_EINTR);
}
@@ -548,8 +563,9 @@ int vio_close(Vio *vio)
{
int r=0;
DBUG_ENTER("vio_close");
+ DBUG_PRINT("enter", ("sd: %d", mysql_socket_getfd(vio->mysql_socket)));
- if (vio->type != VIO_CLOSED)
+ if (vio->type != VIO_CLOSED)
{
DBUG_ASSERT(vio->type == VIO_TYPE_TCPIP ||
vio->type == VIO_TYPE_SOCKET ||
@@ -880,6 +896,7 @@ int vio_io_wait(Vio *vio, enum enum_vio_io_event event, int timeout)
my_socket sd= mysql_socket_getfd(vio->mysql_socket);
MYSQL_SOCKET_WAIT_VARIABLES(locker, state) /* no ';' */
DBUG_ENTER("vio_io_wait");
+ DBUG_PRINT("enter", ("timeout: %d", timeout));
/*
Note that if zero timeout, then we will not block, so we do not need to
@@ -891,7 +908,10 @@ int vio_io_wait(Vio *vio, enum enum_vio_io_event event, int timeout)
PSI_SOCKET_SELECT, timeout);
ret= my_io_wait_async(vio->async_context, event, timeout);
if (ret == 0)
+ {
+ DBUG_PRINT("info", ("timeout"));
errno= SOCKET_ETIMEDOUT;
+ }
END_SOCKET_WAIT(locker,timeout);
DBUG_RETURN(ret);
}
@@ -925,6 +945,7 @@ int vio_io_wait(Vio *vio, enum enum_vio_io_event event, int timeout)
switch ((ret= poll(&pfd, 1, timeout)))
{
case -1:
+ DBUG_PRINT("error", ("poll returned -1"));
/* On error, -1 is returned. */
break;
case 0:
@@ -932,6 +953,7 @@ int vio_io_wait(Vio *vio, enum enum_vio_io_event event, int timeout)
Set errno to indicate a timeout error.
(This is not compiled in on WIN32.)
*/
+ DBUG_PRINT("info", ("poll timeout"));
errno= SOCKET_ETIMEDOUT;
break;
default:
diff --git a/wsrep/wsrep_dummy.c b/wsrep/wsrep_dummy.c
index fa726877fcf..eae084f1979 100644
--- a/wsrep/wsrep_dummy.c
+++ b/wsrep/wsrep_dummy.c
@@ -84,8 +84,15 @@ static wsrep_status_t dummy_options_set(
static char* dummy_options_get (wsrep_t* w)
{
- WSREP_DBUG_ENTER(w);
- return WSREP_DUMMY(w)->options;
+ char *options;
+
+ WSREP_DBUG_ENTER(w);
+ options= WSREP_DUMMY(w)->options;
+
+ if (options)
+ options= strdup(WSREP_DUMMY(w)->options);
+
+ return options;
}
static wsrep_status_t dummy_connect(
diff --git a/wsrep/wsrep_loader.c b/wsrep/wsrep_loader.c
index 5c4e61e1832..f4d5991339e 100644
--- a/wsrep/wsrep_loader.c
+++ b/wsrep/wsrep_loader.c
@@ -37,6 +37,22 @@ static wsrep_log_cb_t logger = default_logger;
* Library loader
**************************************************************************/
+static int wsrep_check_iface_version(const char* found, const char* iface_ver)
+{
+ const size_t msg_len = 128;
+ char msg[128];
+
+ if (strcmp(found, iface_ver)) {
+ snprintf (msg, msg_len,
+ "provider interface version mismatch: need '%s', found '%s'",
+ iface_ver, found);
+ logger (WSREP_LOG_ERROR, msg);
+ return EINVAL;
+ }
+
+ return 0;
+}
+
static int verify(const wsrep_t *wh, const char *iface_ver)
{
char msg[128];
@@ -50,13 +66,8 @@ static int verify(const wsrep_t *wh, const char *iface_ver)
VERIFY(wh);
VERIFY(wh->version);
- if (strcmp(wh->version, iface_ver)) {
- snprintf (msg, sizeof(msg),
- "provider interface version mismatch: need '%s', found '%s'",
- iface_ver, wh->version);
- logger (WSREP_LOG_ERROR, msg);
+ if (wsrep_check_iface_version(wh->version, iface_ver))
return EINVAL;
- }
VERIFY(wh->init);
VERIFY(wh->options_set);
@@ -107,6 +118,15 @@ static wsrep_loader_fun wsrep_dlf(void *dlh, const char *sym)
return alias.dlfun;
}
+static int wsrep_check_version_symbol(void *dlh)
+{
+ char** dlversion = NULL;
+ dlversion = (char**) dlsym(dlh, "wsrep_interface_version");
+ if (dlversion == NULL)
+ return 0;
+ return wsrep_check_iface_version(*dlversion, WSREP_INTERFACE_VERSION);
+}
+
extern int wsrep_dummy_loader(wsrep_t *w);
int wsrep_load(const char *spec, wsrep_t **hptr, wsrep_log_cb_t log_cb)
@@ -152,6 +172,11 @@ int wsrep_load(const char *spec, wsrep_t **hptr, wsrep_log_cb_t log_cb)
goto out;
}
+ if (wsrep_check_version_symbol(dlh) != 0) {
+ ret = EINVAL;
+ goto out;
+ }
+
if ((ret = (*dlfun)(*hptr)) != 0) {
snprintf(msg, sizeof(msg)-1, "wsrep_load(): loader failed: %s",
strerror(ret));