Merge lp:~cbjchen/ubuntu/trusty/mysql-5.6/fix-for-1500684 into lp:ubuntu/trusty/mysql-5.6

Proposed by Liang Chen
Status: Needs review
Proposed branch: lp:~cbjchen/ubuntu/trusty/mysql-5.6/fix-for-1500684
Merge into: lp:ubuntu/trusty/mysql-5.6
Diff against target: 290173 lines (+114282/-69896)
2751 files modified
.pc/CVE-2014-0001.patch/client/mysql.cc (+0/-5557)
.pc/applied-patches (+0/-1)
.pc/fix_standalone_tests.patch/mysql-test/lib/mtr_cases.pm (+2/-2)
.pc/spelling.patch/mysql-test/extra/rpl_tests/rpl_ddl.test (+4/-4)
.pc/spelling.patch/mysql-test/extra/rpl_tests/rpl_row_basic.test (+44/-42)
.pc/spelling.patch/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test (+17/-17)
.pc/spelling.patch/sql/log_event.cc (+174/-57)
.pc/spelling.patch/sql/sql_yacc.cc (+3737/-8151)
.pc/spelling.patch/sql/sql_yacc.yy (+15/-1)
BUILD/README (+8/-3)
CMakeLists.txt (+106/-68)
Docs/ChangeLog (+1645/-1373)
Docs/INFO_SRC (+6/-6)
Docs/INSTALL-BINARY (+2074/-1494)
INSTALL-SOURCE (+7311/-6067)
README (+1/-1)
VERSION (+1/-1)
client/client_priv.h (+2/-1)
client/mysql.cc (+14/-3)
client/mysql_config_editor.cc (+36/-31)
client/mysql_upgrade.c (+1/-0)
client/mysqladmin.cc (+120/-14)
client/mysqlbinlog.cc (+220/-52)
client/mysqlcheck.c (+7/-2)
client/mysqldump.c (+66/-45)
client/mysqlimport.c (+7/-2)
client/mysqlshow.c (+7/-1)
client/mysqlslap.c (+46/-8)
cmake/build_configurations/compiler_options.cmake (+18/-43)
cmake/build_configurations/feature_set.cmake (+0/-1)
cmake/build_configurations/mysql_release.cmake (+1/-0)
cmake/compile_flags.cmake (+44/-0)
cmake/cpack_source_ignore_files.cmake (+1/-4)
cmake/dtrace.cmake (+23/-4)
cmake/info_macros.cmake.in (+38/-18)
cmake/info_src.cmake (+4/-4)
cmake/install_macros.cmake (+14/-5)
cmake/libutils.cmake (+1/-1)
cmake/maintainer.cmake (+37/-42)
cmake/make_dist.cmake.in (+49/-34)
cmake/os/Darwin.cmake (+0/-18)
cmake/os/Linux.cmake (+0/-1)
cmake/os/Windows.cmake (+28/-19)
cmake/os/WindowsCache.cmake (+4/-3)
cmake/plugin.cmake (+0/-7)
cmake/ssl.cmake (+25/-7)
cmd-line-utils/libedit/el_terminal.h (+2/-2)
cmd-line-utils/libedit/emacs.c (+5/-3)
cmd-line-utils/libedit/terminal.c (+10/-5)
cmd-line-utils/libedit/vi.c (+5/-3)
config.h.cmake (+2/-2)
configure.cmake (+24/-24)
debian/changelog (+58/-0)
debian/control (+2/-1)
debian/patches/CVE-2014-0001.patch (+0/-14)
debian/patches/disable_tests.patch (+1/-1)
debian/patches/fix-man-page-links.patch (+4/-4)
debian/patches/fix_standalone_tests.patch (+2/-4)
debian/patches/mysql-5.6.26-fix-build.patch (+16/-0)
debian/patches/scripts__mysqld_safe.sh__signals.patch (+3/-3)
debian/patches/series (+1/-1)
debian/patches/spelling.patch (+17/-17)
debian/rules (+1/-1)
extra/charset2html.c (+0/-179)
extra/my_print_defaults.c (+11/-2)
extra/mysql_waitpid.c (+5/-1)
extra/replace.c (+2/-2)
extra/yassl/CMakeLists.txt (+1/-2)
extra/yassl/README (+69/-1)
extra/yassl/certs/ca-cert.pem (+73/-42)
extra/yassl/certs/ca-key.pem (+25/-7)
extra/yassl/certs/client-cert.pem (+71/-39)
extra/yassl/certs/client-key.pem (+25/-7)
extra/yassl/certs/client-keyEnc.pem (+8/-8)
extra/yassl/certs/dsa-cert.pem (+20/-68)
extra/yassl/certs/dsa1024.pem (+12/-0)
extra/yassl/certs/dsa512.pem (+0/-8)
extra/yassl/certs/server-cert.pem (+169/-35)
extra/yassl/certs/server-key.pem (+25/-7)
extra/yassl/certs/server-keyEnc.pem (+26/-8)
extra/yassl/examples/client/client.cpp (+10/-1)
extra/yassl/examples/server/server.cpp (+21/-2)
extra/yassl/include/buffer.hpp (+14/-4)
extra/yassl/include/cert_wrapper.hpp (+5/-2)
extra/yassl/include/openssl/crypto.h (+4/-7)
extra/yassl/include/openssl/des.h (+1/-0)
extra/yassl/include/openssl/des_old.h (+1/-0)
extra/yassl/include/openssl/engine.h (+1/-0)
extra/yassl/include/openssl/err.h (+1/-0)
extra/yassl/include/openssl/evp.h (+1/-0)
extra/yassl/include/openssl/generate_prefix_files.pl (+1/-0)
extra/yassl/include/openssl/hmac.h (+1/-0)
extra/yassl/include/openssl/lhash.h (+1/-0)
extra/yassl/include/openssl/md4.h (+1/-0)
extra/yassl/include/openssl/md5.h (+1/-0)
extra/yassl/include/openssl/objects.h (+1/-0)
extra/yassl/include/openssl/opensslv.h (+1/-0)
extra/yassl/include/openssl/pem.h (+1/-0)
extra/yassl/include/openssl/pkcs12.h (+1/-0)
extra/yassl/include/openssl/prefix_crypto.h (+1/-0)
extra/yassl/include/openssl/rand.h (+1/-0)
extra/yassl/include/openssl/rsa.h (+1/-0)
extra/yassl/include/openssl/sha.h (+1/-0)
extra/yassl/include/openssl/ssl.h (+2/-2)
extra/yassl/include/openssl/x509.h (+1/-0)
extra/yassl/include/openssl/x509v3.h (+1/-0)
extra/yassl/include/yassl_int.hpp (+21/-0)
extra/yassl/src/buffer.cpp (+88/-27)
extra/yassl/src/cert_wrapper.cpp (+12/-2)
extra/yassl/src/crypto_wrapper.cpp (+2/-2)
extra/yassl/src/handshake.cpp (+20/-9)
extra/yassl/src/ssl.cpp (+33/-3)
extra/yassl/src/yassl_imp.cpp (+212/-34)
extra/yassl/src/yassl_int.cpp (+80/-3)
extra/yassl/taocrypt/CMakeLists.txt (+1/-2)
extra/yassl/taocrypt/include/asn.hpp (+8/-8)
extra/yassl/taocrypt/include/block.hpp (+3/-3)
extra/yassl/taocrypt/include/integer.hpp (+9/-1)
extra/yassl/taocrypt/include/misc.hpp (+8/-1)
extra/yassl/taocrypt/include/pwdbased.hpp (+3/-5)
extra/yassl/taocrypt/include/runtime.hpp (+14/-3)
extra/yassl/taocrypt/include/sha.hpp (+1/-1)
extra/yassl/taocrypt/src/aes.cpp (+55/-30)
extra/yassl/taocrypt/src/algebra.cpp (+5/-4)
extra/yassl/taocrypt/src/arc4.cpp (+30/-22)
extra/yassl/taocrypt/src/asn.cpp (+11/-11)
extra/yassl/taocrypt/src/blowfish.cpp (+25/-18)
extra/yassl/taocrypt/src/des.cpp (+27/-25)
extra/yassl/taocrypt/src/integer.cpp (+24/-26)
extra/yassl/taocrypt/src/md5.cpp (+29/-21)
extra/yassl/taocrypt/src/misc.cpp (+10/-12)
extra/yassl/taocrypt/src/rabbit.cpp (+11/-6)
extra/yassl/taocrypt/src/random.cpp (+2/-1)
extra/yassl/taocrypt/src/ripemd.cpp (+31/-21)
extra/yassl/taocrypt/src/rsa.cpp (+5/-1)
extra/yassl/taocrypt/src/sha.cpp (+32/-22)
extra/yassl/taocrypt/src/twofish.cpp (+29/-21)
extra/yassl/taocrypt/test/test.cpp (+7/-7)
extra/yassl/testsuite/cipher-test.sh (+131/-0)
extra/yassl/testsuite/test.hpp (+37/-5)
include/atomic/nolock.h (+2/-2)
include/base64.h (+6/-6)
include/errmsg.h (+4/-2)
include/lf.h (+4/-1)
include/my_aes.h (+103/-41)
include/my_base.h (+6/-4)
include/my_default.h (+2/-1)
include/my_getopt.h (+2/-1)
include/my_global.h (+19/-32)
include/my_pthread.h (+14/-15)
include/my_rnd.h (+1/-0)
include/mysql/plugin.h (+1/-1)
include/mysql/psi/mysql_statement.h (+9/-17)
include/mysql/psi/psi.h (+16/-41)
include/mysql/psi/psi_abi_v0.h.pp (+1/-1)
include/mysql/psi/psi_abi_v1.h.pp (+5/-19)
include/mysql/psi/psi_abi_v2.h.pp (+1/-1)
include/mysql/thread_pool_priv.h (+2/-1)
include/mysql_version.h.in (+4/-3)
include/queues.h (+1/-0)
include/t_ctype.h (+1/-0)
include/violite.h (+3/-2)
include/welcome_copyright_notice.h (+2/-2)
libmysql/CMakeLists.txt (+1/-2)
libmysql/authentication_win/CMakeLists.txt (+1/-2)
libmysql/errmsg.c (+3/-1)
libmysql/libmysql.c (+26/-2)
libmysqld/CMakeLists.txt (+35/-1)
libmysqld/examples/test-run (+1/-0)
libmysqld/lib_sql.cc (+3/-4)
man/comp_err.1 (+6/-6)
man/innochecksum.1 (+3/-3)
man/msql2mysql.1 (+19/-3)
man/my_print_defaults.1 (+31/-6)
man/myisam_ftdump.1 (+3/-3)
man/myisamchk.1 (+109/-9)
man/myisamlog.1 (+3/-3)
man/myisampack.1 (+15/-8)
man/mysql-stress-test.pl.1 (+4/-4)
man/mysql-test-run.pl.1 (+125/-73)
man/mysql.1 (+200/-32)
man/mysql.server.1 (+224/-55)
man/mysql_client_test.1 (+3/-3)
man/mysql_config.1 (+32/-3)
man/mysql_config_editor.1 (+722/-572)
man/mysql_convert_table_format.1 (+19/-3)
man/mysql_find_rows.1 (+19/-3)
man/mysql_fix_extensions.1 (+19/-3)
man/mysql_install_db.1 (+193/-51)
man/mysql_plugin.1 (+5/-5)
man/mysql_secure_installation.1 (+4/-4)
man/mysql_setpermission.1 (+19/-3)
man/mysql_tzinfo_to_sql.1 (+4/-4)
man/mysql_upgrade.1 (+427/-34)
man/mysql_waitpid.1 (+5/-3)
man/mysql_zap.1 (+5/-3)
man/mysqlaccess.1 (+19/-3)
man/mysqladmin.1 (+196/-14)
man/mysqlbinlog.1 (+276/-41)
man/mysqlbug.1 (+4/-4)
man/mysqlcheck.1 (+211/-13)
man/mysqld.8 (+3/-3)
man/mysqld_multi.1 (+12/-12)
man/mysqld_safe.1 (+43/-43)
man/mysqldump.1 (+269/-60)
man/mysqldumpslow.1 (+3/-3)
man/mysqlhotcopy.1 (+21/-5)
man/mysqlimport.1 (+194/-12)
man/mysqlshow.1 (+194/-12)
man/mysqlslap.1 (+189/-27)
man/mysqltest.1 (+43/-9)
man/ndb-common-options.1 (+55/-94)
man/ndb_blob_tool.1 (+23/-56)
man/ndb_config.1 (+133/-183)
man/ndb_cpcd.1 (+3/-3)
man/ndb_delete_all.1 (+14/-14)
man/ndb_desc.1 (+21/-22)
man/ndb_drop_index.1 (+10/-10)
man/ndb_drop_table.1 (+9/-9)
man/ndb_error_reporter.1 (+22/-38)
man/ndb_index_stat.1 (+311/-270)
man/ndb_mgm.1 (+13/-29)
man/ndb_mgmd.8 (+104/-186)
man/ndb_print_backup_file.1 (+6/-7)
man/ndb_print_file.1 (+123/-0)
man/ndb_print_schema_file.1 (+7/-8)
man/ndb_print_sys_file.1 (+7/-8)
man/ndb_restore.1 (+265/-173)
man/ndb_select_all.1 (+42/-28)
man/ndb_select_count.1 (+16/-16)
man/ndb_setup.py.1 (+59/-146)
man/ndb_show_tables.1 (+12/-12)
man/ndb_size.pl.1 (+23/-23)
man/ndb_waiter.1 (+16/-16)
man/ndbd.8 (+88/-125)
man/ndbd_redo_log_reader.1 (+16/-24)
man/ndbinfo_select_all.1 (+33/-35)
man/ndbmtd.8 (+4/-4)
man/perror.1 (+4/-4)
man/replace.1 (+3/-3)
man/resolve_stack_dump.1 (+4/-4)
man/resolveip.1 (+3/-3)
mysql-test/CMakeLists.txt (+2/-2)
mysql-test/collections/default.daily (+5/-1)
mysql-test/collections/default.experimental (+0/-2)
mysql-test/collections/default.push (+2/-2)
mysql-test/collections/default.release (+1/-2)
mysql-test/collections/default.release.done (+1/-1)
mysql-test/collections/default.release.in (+1/-2)
mysql-test/collections/default.weekly (+3/-1)
mysql-test/collections/default.weekly.basic (+1/-1)
mysql-test/collections/disabled-gtid-on.list (+1/-0)
mysql-test/extra/binlog_tests/binlog_mysqlbinlog_fill.inc (+53/-0)
mysql-test/extra/binlog_tests/binlog_mysqlbinlog_start_stop.inc (+4/-31)
mysql-test/extra/binlog_tests/mysqlbinlog_start_stop_1.inc (+22/-22)
mysql-test/extra/binlog_tests/mysqlbinlog_start_stop_2.inc (+14/-5)
mysql-test/extra/rpl_tests/grep_pattern.inc (+22/-0)
mysql-test/extra/rpl_tests/rpl_auto_increment.test (+18/-18)
mysql-test/extra/rpl_tests/rpl_auto_increment_insert_view.test (+2/-2)
mysql-test/extra/rpl_tests/rpl_auto_increment_invoke_trigger.test (+2/-2)
mysql-test/extra/rpl_tests/rpl_autoinc_func_invokes_trigger.test (+2/-2)
mysql-test/extra/rpl_tests/rpl_binlog_error.inc (+483/-0)
mysql-test/extra/rpl_tests/rpl_blackhole.test (+1/-1)
mysql-test/extra/rpl_tests/rpl_change_master.test (+4/-4)
mysql-test/extra/rpl_tests/rpl_charset.test (+8/-8)
mysql-test/extra/rpl_tests/rpl_commit_after_flush.test (+2/-2)
mysql-test/extra/rpl_tests/rpl_conflicts.test (+3/-4)
mysql-test/extra/rpl_tests/rpl_crash_safe.inc (+4/-1)
mysql-test/extra/rpl_tests/rpl_crash_safe.test (+18/-14)
mysql-test/extra/rpl_tests/rpl_ddl.test (+4/-4)
mysql-test/extra/rpl_tests/rpl_deadlock.test (+0/-2)
mysql-test/extra/rpl_tests/rpl_delete_no_where.test (+3/-3)
mysql-test/extra/rpl_tests/rpl_do_table_filter_insensitive.inc (+16/-0)
mysql-test/extra/rpl_tests/rpl_do_table_filter_sensitive.inc (+16/-0)
mysql-test/extra/rpl_tests/rpl_filters.test (+2/-3)
mysql-test/extra/rpl_tests/rpl_flsh_tbls.test (+1/-1)
mysql-test/extra/rpl_tests/rpl_foreign_key.test (+4/-4)
mysql-test/extra/rpl_tests/rpl_gtid_drop_table.inc (+48/-0)
mysql-test/extra/rpl_tests/rpl_gtid_mts_relay_log_recovery.test (+118/-0)
mysql-test/extra/rpl_tests/rpl_gtids_restart_slave_io_lost_trx.test (+112/-0)
mysql-test/extra/rpl_tests/rpl_heartbeat_2slaves.inc (+133/-0)
mysql-test/extra/rpl_tests/rpl_ignore_table_filter_insensitive.inc (+15/-0)
mysql-test/extra/rpl_tests/rpl_ignore_table_filter_sensitive.inc (+15/-0)
mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test (+2/-2)
mysql-test/extra/rpl_tests/rpl_insert_delayed.test (+6/-6)
mysql-test/extra/rpl_tests/rpl_insert_id.test (+21/-21)
mysql-test/extra/rpl_tests/rpl_insert_id_pk.test (+5/-5)
mysql-test/extra/rpl_tests/rpl_insert_ignore.test (+4/-2)
mysql-test/extra/rpl_tests/rpl_insert_ignore_gtid_on.inc (+17/-0)
mysql-test/extra/rpl_tests/rpl_kill_query.inc (+129/-0)
mysql-test/extra/rpl_tests/rpl_loaddata.test (+5/-5)
mysql-test/extra/rpl_tests/rpl_loaddata_s.inc (+26/-0)
mysql-test/extra/rpl_tests/rpl_loadfile.test (+2/-2)
mysql-test/extra/rpl_tests/rpl_log.test (+19/-6)
mysql-test/extra/rpl_tests/rpl_max_relay_size.test (+2/-2)
mysql-test/extra/rpl_tests/rpl_mts_crash_safe.inc (+0/-4)
mysql-test/extra/rpl_tests/rpl_mts_crash_safe.test (+3/-3)
mysql-test/extra/rpl_tests/rpl_mts_execute_partial_trx_in_relay_log.inc (+36/-0)
mysql-test/extra/rpl_tests/rpl_multi_query.test (+1/-1)
mysql-test/extra/rpl_tests/rpl_multi_update.test (+1/-1)
mysql-test/extra/rpl_tests/rpl_multi_update2.test (+5/-6)
mysql-test/extra/rpl_tests/rpl_multi_update3.test (+4/-4)
mysql-test/extra/rpl_tests/rpl_not_null.test (+8/-8)
mysql-test/extra/rpl_tests/rpl_parallel_load.test (+3/-3)
mysql-test/extra/rpl_tests/rpl_parallel_load_innodb.test (+3/-3)
mysql-test/extra/rpl_tests/rpl_record_compare.test (+6/-6)
mysql-test/extra/rpl_tests/rpl_relayrotate.test (+1/-1)
mysql-test/extra/rpl_tests/rpl_row_001.test (+2/-0)
mysql-test/extra/rpl_tests/rpl_row_UUID.test (+1/-1)
mysql-test/extra/rpl_tests/rpl_row_basic.test (+44/-42)
mysql-test/extra/rpl_tests/rpl_row_blob.test (+5/-17)
mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test (+1/-0)
mysql-test/extra/rpl_tests/rpl_row_event_max_size.inc (+95/-0)
mysql-test/extra/rpl_tests/rpl_row_func003.test (+2/-8)
mysql-test/extra/rpl_tests/rpl_row_idempotency.test (+55/-55)
mysql-test/extra/rpl_tests/rpl_row_show_relaylog_events.inc (+20/-0)
mysql-test/extra/rpl_tests/rpl_row_sp002.test (+6/-6)
mysql-test/extra/rpl_tests/rpl_row_sp003.test (+3/-6)
mysql-test/extra/rpl_tests/rpl_row_sp006.test (+3/-3)
mysql-test/extra/rpl_tests/rpl_row_sp007.test (+2/-2)
mysql-test/extra/rpl_tests/rpl_set_null.test (+6/-6)
mysql-test/extra/rpl_tests/rpl_show_relaylog_events.inc (+2/-2)
mysql-test/extra/rpl_tests/rpl_stm_insert_delayed.inc (+10/-0)
mysql-test/extra/rpl_tests/rpl_stm_mix_show_relaylog_events.inc (+20/-0)
mysql-test/extra/rpl_tests/rpl_stop_slave.test (+4/-0)
mysql-test/extra/rpl_tests/rpl_stress_test.inc (+1/-1)
mysql-test/extra/rpl_tests/rpl_sv_relay_space.test (+1/-1)
mysql-test/extra/rpl_tests/rpl_trig004.test (+2/-5)
mysql-test/extra/rpl_tests/rpl_truncate_helper.test (+5/-5)
mysql-test/include/assert_grep.inc (+154/-0)
mysql-test/include/begin_include_file.inc (+8/-0)
mysql-test/include/change_file_perms.inc (+12/-0)
mysql-test/include/default_my.cnf (+1/-0)
mysql-test/include/eval.inc (+0/-1)
mysql-test/include/func_aes_block.inc (+130/-0)
mysql-test/include/get_file_permissions.inc (+9/-0)
mysql-test/include/get_ndb_epochs.inc (+60/-0)
mysql-test/include/gtid_step_assert.inc (+96/-0)
mysql-test/include/gtid_step_reset.inc (+18/-0)
mysql-test/include/gtid_utils.inc (+156/-72)
mysql-test/include/gtid_utils_end.inc (+8/-2)
mysql-test/include/have_mysql_no_login_plugin.inc (+21/-0)
mysql-test/include/have_perfschema.inc (+1/-0)
mysql-test/include/have_util_nc.inc (+53/-0)
mysql-test/include/install_semisync.inc (+0/-1)
mysql-test/include/linux.inc (+5/-0)
mysql-test/include/master-slave.inc (+2/-1)
mysql-test/include/mtr_warnings.sql (+2/-2)
mysql-test/include/no_protocol.inc (+8/-0)
mysql-test/include/plugin.defs (+1/-0)
mysql-test/include/range.inc (+0/-1)
mysql-test/include/rpl_change_topology.inc (+10/-0)
mysql-test/include/rpl_connection_master1.inc (+2/-0)
mysql-test/include/rpl_end.inc (+14/-0)
mysql-test/include/rpl_init.inc (+13/-0)
mysql-test/include/rpl_stop_server.inc (+10/-3)
mysql-test/include/save_io_thread_pos.inc (+1/-1)
mysql-test/include/save_master_pos.inc (+6/-3)
mysql-test/include/show_all_binlogs.inc (+66/-0)
mysql-test/include/show_all_relay_logs.inc (+70/-0)
mysql-test/include/show_rpl_debug_info.inc (+18/-1)
mysql-test/include/stop_dump_threads.inc (+2/-3)
mysql-test/include/subquery.inc (+16/-0)
mysql-test/include/subquery_mat.inc (+47/-0)
mysql-test/include/subquery_sj.inc (+157/-0)
mysql-test/include/sync_slave_sql.inc (+41/-6)
mysql-test/include/sync_slave_sql_with_master.inc (+1/-0)
mysql-test/include/truncate_file.inc (+3/-3)
mysql-test/include/uninstall_semisync.inc (+5/-0)
mysql-test/include/wait_for_ndb_committed_to_binlog.inc (+57/-0)
mysql-test/include/wait_for_ndb_to_binlog.inc (+0/-26)
mysql-test/include/wait_for_slave_param.inc (+1/-1)
mysql-test/include/wait_for_slave_sql_error.inc (+17/-3)
mysql-test/include/wait_for_slave_sql_to_stop.inc (+1/-0)
mysql-test/include/wait_for_slave_to_sync_with_master.inc (+27/-0)
mysql-test/include/wait_show_condition.inc (+6/-1)
mysql-test/include/write_result_to_file.inc (+31/-3)
mysql-test/lib/My/SafeProcess/CMakeLists.txt (+1/-1)
mysql-test/lib/mtr_cases.pm (+2/-2)
mysql-test/lib/mtr_match.pm (+1/-0)
mysql-test/mtr.out-of-source (+3/-3)
mysql-test/mysql-test-run.pl (+102/-26)
mysql-test/purify.supp (+1/-0)
mysql-test/r/alter_table.result (+564/-22)
mysql-test/r/bug17076131.result (+12/-0)
mysql-test/r/check_auto_permission.result (+3/-0)
mysql-test/r/connect.result (+6/-0)
mysql-test/r/count_distinct.result (+158/-0)
mysql-test/r/create.result (+3/-1)
mysql-test/r/ctype_binary.result (+7/-0)
mysql-test/r/ctype_cp1251.result (+7/-0)
mysql-test/r/ctype_cp932.result (+35/-0)
mysql-test/r/ctype_latin1.result (+7/-0)
mysql-test/r/ctype_ldml.result (+1/-1)
mysql-test/r/ctype_uca.result (+14/-0)
mysql-test/r/ctype_ucs.result (+7/-0)
mysql-test/r/ctype_utf8.result (+7/-0)
mysql-test/r/ddl_i18n_koi8r.result (+168/-168)
mysql-test/r/ddl_i18n_utf8.result (+168/-168)
mysql-test/r/debug_sync.result (+16/-16)
mysql-test/r/delayed.result (+5/-0)
mysql-test/r/derived.result (+226/-0)
mysql-test/r/distinct.result (+3/-3)
mysql-test/r/dynamic_tracing.result (+39/-0)
mysql-test/r/events_bugs.result (+4/-0)
mysql-test/r/file_contents.result (+1/-1)
mysql-test/r/func_aes.result (+411/-0)
mysql-test/r/func_aes_cfb1.result (+132/-0)
mysql-test/r/func_aes_cfb128.result (+132/-0)
mysql-test/r/func_aes_cfb8.result (+132/-0)
mysql-test/r/func_aes_misc.result (+255/-0)
mysql-test/r/func_aes_ofb.result (+132/-0)
mysql-test/r/func_crypt.result (+23/-0)
mysql-test/r/grant.result (+1/-0)
mysql-test/r/group_min_max.result (+80/-2)
mysql-test/r/group_min_max_innodb.result (+202/-0)
mysql-test/r/have_cp1251.require (+1/-1)
mysql-test/r/have_cp866.require (+1/-1)
mysql-test/r/have_koi8r.require (+1/-1)
mysql-test/r/having.result (+78/-0)
mysql-test/r/information_schema-big.result (+4/-2)
mysql-test/r/information_schema.result (+15/-0)
mysql-test/r/innodb_mysql_lock.result (+4/-1)
mysql-test/r/innodb_mysql_sync.result (+181/-0)
mysql-test/r/innodb_recovery_with_upper_case_names.result (+48/-0)
mysql-test/r/insert.result (+2/-0)
mysql-test/r/loaddata.result (+12/-0)
mysql-test/r/lock_sync.result (+92/-2)
mysql-test/r/log_empty_name.result (+6/-0)
mysql-test/r/log_errchk.result (+10/-0)
mysql-test/r/merge_recover.result (+0/-103)
mysql-test/r/myisam.result (+79/-0)
mysql-test/r/myisam_recover.result (+152/-0)
mysql-test/r/mysql_config_editor.result (+1/-1)
mysql-test/r/mysql_upgrade.result (+100/-0)
mysql-test/r/mysqlbinlog_debug.result (+7/-0)
mysql-test/r/mysqlbinlog_mixed_or_statment.result (+26/-0)
mysql-test/r/mysqlcheck.result (+0/-3)
mysql-test/r/mysqld--help-notwin.result (+59/-4)
mysql-test/r/mysqld--help-win.result (+59/-4)
mysql-test/r/mysqldump.result (+59/-64)
mysql-test/r/not_embedded_server.result (+1/-0)
mysql-test/r/openssl_1.result (+3/-3)
mysql-test/r/outfile_loaddata.result (+16/-8)
mysql-test/r/parser.result (+25/-0)
mysql-test/r/partition.result (+2/-0)
mysql-test/r/partition_archive.result (+26/-0)
mysql-test/r/partition_index_innodb.result (+116/-0)
mysql-test/r/partition_index_myisam.result (+86/-0)
mysql-test/r/partition_innodb.result (+202/-18)
mysql-test/r/partition_pruning.result (+114/-0)
mysql-test/r/plugin.result (+70/-0)
mysql-test/r/plugin_auth.result (+22/-0)
mysql-test/r/plugin_auth_qa_3.result (+1/-1)
mysql-test/r/plugin_auth_sha256.result (+9/-9)
mysql-test/r/plugin_auth_sha256_2.result (+5/-5)
mysql-test/r/plugin_auth_sha256_server_default.result (+5/-5)
mysql-test/r/plugin_auth_sha256_server_default_tls.result (+5/-5)
mysql-test/r/plugin_auth_sha256_tls.result (+1/-1)
mysql-test/r/ps_grant.result (+3/-3)
mysql-test/r/query_cache.result (+56/-0)
mysql-test/r/rewrite_general_log.result (+28/-0)
mysql-test/r/show_processlist.result (+47/-0)
mysql-test/r/sp-threads.result (+1/-1)
mysql-test/r/sp.result (+110/-0)
mysql-test/r/sp_validation.result (+0/-1)
mysql-test/r/ssl.result (+2/-2)
mysql-test/r/status_debug.result (+23/-0)
mysql-test/r/strict.result (+17/-0)
mysql-test/r/subquery_all.result (+13/-0)
mysql-test/r/subquery_all_bka.result (+13/-0)
mysql-test/r/subquery_all_bka_nixbnl.result (+13/-0)
mysql-test/r/subquery_mat.result (+53/-0)
mysql-test/r/subquery_mat_all.result (+53/-0)
mysql-test/r/subquery_mat_none.result (+53/-0)
mysql-test/r/subquery_nomat_nosj.result (+13/-0)
mysql-test/r/subquery_nomat_nosj_bka.result (+13/-0)
mysql-test/r/subquery_nomat_nosj_bka_nixbnl.result (+13/-0)
mysql-test/r/subquery_none.result (+13/-0)
mysql-test/r/subquery_none_bka.result (+13/-0)
mysql-test/r/subquery_none_bka_nixbnl.result (+13/-0)
mysql-test/r/subquery_sj_all.result (+224/-46)
mysql-test/r/subquery_sj_all_bka.result (+225/-47)
mysql-test/r/subquery_sj_all_bka_nixbnl.result (+225/-47)
mysql-test/r/subquery_sj_all_bkaunique.result (+225/-47)
mysql-test/r/subquery_sj_dupsweed.result (+195/-27)
mysql-test/r/subquery_sj_dupsweed_bka.result (+195/-27)
mysql-test/r/subquery_sj_dupsweed_bka_nixbnl.result (+170/-2)
mysql-test/r/subquery_sj_dupsweed_bkaunique.result (+195/-27)
mysql-test/r/subquery_sj_firstmatch.result (+267/-116)
mysql-test/r/subquery_sj_firstmatch_bka.result (+267/-116)
mysql-test/r/subquery_sj_firstmatch_bka_nixbnl.result (+170/-2)
mysql-test/r/subquery_sj_firstmatch_bkaunique.result (+267/-116)
mysql-test/r/subquery_sj_innodb_all.result (+9/-6)
mysql-test/r/subquery_sj_innodb_all_bka.result (+9/-6)
mysql-test/r/subquery_sj_innodb_all_bka_nixbnl.result (+9/-6)
mysql-test/r/subquery_sj_innodb_all_bkaunique.result (+9/-6)
mysql-test/r/subquery_sj_loosescan.result (+195/-27)
mysql-test/r/subquery_sj_loosescan_bka.result (+195/-27)
mysql-test/r/subquery_sj_loosescan_bka_nixbnl.result (+170/-2)
mysql-test/r/subquery_sj_loosescan_bkaunique.result (+195/-27)
mysql-test/r/subquery_sj_mat.result (+224/-46)
mysql-test/r/subquery_sj_mat_bka.result (+224/-46)
mysql-test/r/subquery_sj_mat_bka_nixbnl.result (+224/-46)
mysql-test/r/subquery_sj_mat_bkaunique.result (+224/-46)
mysql-test/r/subquery_sj_mat_nosj.result (+168/-0)
mysql-test/r/subquery_sj_none.result (+168/-0)
mysql-test/r/subquery_sj_none_bka.result (+168/-0)
mysql-test/r/subquery_sj_none_bka_nixbnl.result (+168/-0)
mysql-test/r/subquery_sj_none_bkaunique.result (+168/-0)
mysql-test/r/system_mysql_db.result (+1/-1)
mysql-test/r/temp_pool.result (+19/-0)
mysql-test/r/temporal_literal.result (+44/-0)
mysql-test/r/trigger-trans.result (+25/-0)
mysql-test/r/trigger.result (+17/-0)
mysql-test/r/type_date.result (+16/-0)
mysql-test/r/type_datetime.result (+16/-0)
mysql-test/r/type_temporal_fractional.result (+257/-0)
mysql-test/r/type_timestamp.result (+16/-0)
mysql-test/r/type_timestamp_explicit.result (+16/-0)
mysql-test/r/union.result (+34/-0)
mysql-test/r/user_var.result (+6/-6)
mysql-test/r/validate_password_plugin.result (+67/-4)
mysql-test/r/variables.result (+4/-0)
mysql-test/r/view.result (+233/-0)
mysql-test/r/windows.result (+5/-0)
mysql-test/std_data/cacert.pem (+77/-15)
mysql-test/std_data/client-cert.pem (+73/-37)
mysql-test/std_data/client-key.pem (+25/-13)
mysql-test/std_data/dtrace.d (+119/-0)
mysql-test/std_data/server-cert.pem (+73/-32)
mysql-test/std_data/server-key.pem (+25/-7)
mysql-test/std_data/server8k-cert.pem (+205/-49)
mysql-test/std_data/server8k-key.pem (+97/-97)
mysql-test/std_data/slave-relay-bin_linux.index (+1/-0)
mysql-test/std_data/slave-relay-bin_win.index (+1/-0)
mysql-test/std_data/system_tap.stp (+168/-0)
mysql-test/suite/auth_sec/r/access_credential_control.result (+6/-6)
mysql-test/suite/auth_sec/r/mysql_no_login.result (+43/-0)
mysql-test/suite/auth_sec/t/mysql_no_login-master.opt (+1/-0)
mysql-test/suite/auth_sec/t/mysql_no_login.test (+128/-0)
mysql-test/suite/binlog/r/binlog_error_action.result (+77/-0)
mysql-test/suite/binlog/r/binlog_gtid_mysqlbinlog_start_stop.result (+16/-176)
mysql-test/suite/binlog/r/binlog_gtid_simple_recovery.result (+47/-0)
mysql-test/suite/binlog/r/binlog_gtid_utils.result (+137/-0)
mysql-test/suite/binlog/r/binlog_mysqlbinlog_concat.result (+20/-0)
mysql-test/suite/binlog/r/binlog_mysqlbinlog_start_stop.result (+0/-176)
mysql-test/suite/binlog/r/binlog_mysqlbinlog_start_stop_slave_server_id.result (+153/-0)
mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result (+1/-2)
mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result (+2/-1)
mysql-test/suite/binlog/r/binlog_stm_drop_tmp_tbl.result (+1/-2)
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result (+2/-1)
mysql-test/suite/binlog/r/binlog_switch_inside_trans.result (+1/-7)
mysql-test/suite/binlog/r/binlog_truncate_kill.result (+37/-0)
mysql-test/suite/binlog/r/binlog_unsafe.result (+9/-0)
mysql-test/suite/binlog/r/binlog_xa_handling.result (+10/-0)
mysql-test/suite/binlog/t/binlog_error_action.test (+169/-0)
mysql-test/suite/binlog/t/binlog_grant.test (+1/-1)
mysql-test/suite/binlog/t/binlog_gtid_simple_recovery.test (+120/-0)
mysql-test/suite/binlog/t/binlog_gtid_utils.test (+71/-0)
mysql-test/suite/binlog/t/binlog_killed.test (+8/-0)
mysql-test/suite/binlog/t/binlog_mysqlbinlog_concat.test (+103/-0)
mysql-test/suite/binlog/t/binlog_mysqlbinlog_start_stop_slave_server_id.test (+54/-0)
mysql-test/suite/binlog/t/binlog_simplified_binlog_gtid_recovery-master.opt (+1/-0)
mysql-test/suite/binlog/t/binlog_switch_inside_trans.test (+1/-5)
mysql-test/suite/binlog/t/binlog_truncate_kill.test (+56/-0)
mysql-test/suite/binlog/t/binlog_unsafe.test (+3/-0)
mysql-test/suite/binlog/t/binlog_xa_handling.test (+22/-0)
mysql-test/suite/funcs_1/datadict/processlist_priv.inc (+33/-0)
mysql-test/suite/funcs_1/datadict/processlist_val.inc (+14/-0)
mysql-test/suite/funcs_1/r/innodb_trig_03.result (+14/-14)
mysql-test/suite/funcs_1/r/innodb_trig_03e.result (+3/-3)
mysql-test/suite/funcs_1/r/is_columns_mysql.result (+1/-1)
mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result (+1/-1)
mysql-test/suite/funcs_1/r/memory_trig_03.result (+14/-14)
mysql-test/suite/funcs_1/r/memory_trig_03e.result (+3/-3)
mysql-test/suite/funcs_1/r/myisam_trig_03.result (+14/-14)
mysql-test/suite/funcs_1/r/myisam_trig_03e.result (+3/-3)
mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result (+23/-23)
mysql-test/suite/funcs_1/r/processlist_priv_ps.result (+23/-23)
mysql-test/suite/funcs_1/r/processlist_val_no_prot.result (+5/-5)
mysql-test/suite/funcs_1/r/processlist_val_ps.result (+5/-5)
mysql-test/suite/funcs_1/r/storedproc.result (+2/-0)
mysql-test/suite/innodb/include/checksum_not_strict.inc (+5/-0)
mysql-test/suite/innodb/include/import.inc (+21/-0)
mysql-test/suite/innodb/r/add_foreign_key.result (+31/-0)
mysql-test/suite/innodb/r/blob-update-debug.result (+15/-0)
mysql-test/suite/innodb/r/blob_redo.result (+42/-0)
mysql-test/suite/innodb/r/checksum.result (+12/-0)
mysql-test/suite/innodb/r/create-index.result (+9/-0)
mysql-test/suite/innodb/r/dropdb.result (+8/-0)
mysql-test/suite/innodb/r/foreign_key.result (+126/-0)
mysql-test/suite/innodb/r/import.result (+56/-0)
mysql-test/suite/innodb/r/index_tree_operation.result (+55/-0)
mysql-test/suite/innodb/r/innodb-alter-tempfile.result (+38/-0)
mysql-test/suite/innodb/r/innodb-alter.result (+113/-2)
mysql-test/suite/innodb/r/innodb-autoinc.result (+27/-0)
mysql-test/suite/innodb/r/innodb-double-write.result (+254/-0)
mysql-test/suite/innodb/r/innodb-lock.result (+13/-0)
mysql-test/suite/innodb/r/innodb-update-insert.result (+43/-0)
mysql-test/suite/innodb/r/innodb-wl5980-alter.result (+144/-0)
mysql-test/suite/innodb/r/innodb.result (+1/-1)
mysql-test/suite/innodb/r/innodb_blob_unrecoverable_crash.result (+23/-0)
mysql-test/suite/innodb/r/innodb_bug34300.result (+3/-4)
mysql-test/suite/innodb/r/innodb_corrupt_bit.result (+1/-0)
mysql-test/suite/innodb/r/innodb_ctype_ldml.result (+1/-1)
mysql-test/suite/innodb/r/innodb_monitor.result (+0/-549)
mysql-test/suite/innodb/r/innodb_stats_external_pages.result (+19/-0)
mysql-test/suite/innodb/r/insert_debug.result (+11/-0)
mysql-test/suite/innodb/r/monitor.result (+549/-0)
mysql-test/suite/innodb/r/monitor_debug.result (+20/-0)
mysql-test/suite/innodb/r/sp_temp_table.result (+253/-0)
mysql-test/suite/innodb/r/strict_checksum.result (+24/-0)
mysql-test/suite/innodb/r/strict_mode.result (+242/-0)
mysql-test/suite/innodb/r/xa_recovery.result (+17/-0)
mysql-test/suite/innodb/t/add_foreign_key.test (+38/-0)
mysql-test/suite/innodb/t/blob-update-debug.test (+17/-0)
mysql-test/suite/innodb/t/blob_redo-master.opt (+1/-0)
mysql-test/suite/innodb/t/blob_redo.test (+92/-0)
mysql-test/suite/innodb/t/checksum.test (+15/-0)
mysql-test/suite/innodb/t/create-index.test (+11/-0)
mysql-test/suite/innodb/t/dropdb.test (+11/-0)
mysql-test/suite/innodb/t/foreign_key.test (+87/-0)
mysql-test/suite/innodb/t/import.test (+25/-0)
mysql-test/suite/innodb/t/index_tree_operation.test (+74/-0)
mysql-test/suite/innodb/t/innodb-alter-tempfile.test (+72/-0)
mysql-test/suite/innodb/t/innodb-alter.test (+53/-2)
mysql-test/suite/innodb/t/innodb-autoinc.test (+14/-0)
mysql-test/suite/innodb/t/innodb-double-write.test (+388/-0)
mysql-test/suite/innodb/t/innodb-lock.test (+19/-0)
mysql-test/suite/innodb/t/innodb-update-insert.test (+38/-0)
mysql-test/suite/innodb/t/innodb-wl5980-alter.test (+1/-1)
mysql-test/suite/innodb/t/innodb-wl5980-linux.test (+1/-1)
mysql-test/suite/innodb/t/innodb_blob_unrecoverable_crash.test (+55/-0)
mysql-test/suite/innodb/t/innodb_bug34300.test (+5/-5)
mysql-test/suite/innodb/t/innodb_bug60196-master.opt (+1/-1)
mysql-test/suite/innodb/t/innodb_corrupt_bit.test (+9/-3)
mysql-test/suite/innodb/t/innodb_monitor.test (+0/-387)
mysql-test/suite/innodb/t/innodb_stats_external_pages.test (+83/-0)
mysql-test/suite/innodb/t/insert_debug.test (+16/-0)
mysql-test/suite/innodb/t/monitor.test (+387/-0)
mysql-test/suite/innodb/t/monitor_debug.test (+40/-0)
mysql-test/suite/innodb/t/sp_temp_table.test (+103/-0)
mysql-test/suite/innodb/t/strict_checksum.test (+68/-0)
mysql-test/suite/innodb/t/strict_mode.test (+249/-0)
mysql-test/suite/innodb/t/xa_recovery.test (+43/-0)
mysql-test/suite/innodb_fts/r/fts_compatibility.result (+263/-0)
mysql-test/suite/innodb_fts/r/fts_compatibility_win.result (+263/-0)
mysql-test/suite/innodb_fts/r/fulltext_misc.result (+115/-0)
mysql-test/suite/innodb_fts/r/innodb-fts-ddl.result (+2/-0)
mysql-test/suite/innodb_fts/r/innodb_fts_misc.result (+437/-0)
mysql-test/suite/innodb_fts/r/innodb_fts_misc_1.result (+3/-0)
mysql-test/suite/innodb_fts/r/phrase.result (+84/-0)
mysql-test/suite/innodb_fts/r/subexpr.result (+105/-0)
mysql-test/suite/innodb_fts/t/fts_compatibility.test (+270/-0)
mysql-test/suite/innodb_fts/t/fts_compatibility_win.test (+264/-0)
mysql-test/suite/innodb_fts/t/fulltext_misc.test (+85/-1)
mysql-test/suite/innodb_fts/t/innodb_fts_misc.test (+152/-0)
mysql-test/suite/innodb_fts/t/innodb_fts_misc_1.test (+3/-0)
mysql-test/suite/innodb_fts/t/phrase.test (+39/-0)
mysql-test/suite/innodb_fts/t/subexpr.test (+58/-0)
mysql-test/suite/innodb_stress/include/innodb_stress.inc (+183/-0)
mysql-test/suite/innodb_stress/r/innodb_bigstress.result (+28/-0)
mysql-test/suite/innodb_stress/r/innodb_bigstress_blob.result (+28/-0)
mysql-test/suite/innodb_stress/r/innodb_bigstress_blob_nocompress.result (+26/-0)
mysql-test/suite/innodb_stress/r/innodb_bigstress_crash.result (+34/-0)
mysql-test/suite/innodb_stress/r/innodb_bigstress_crash_blob.result (+34/-0)
mysql-test/suite/innodb_stress/r/innodb_bigstress_crash_blob_nocompress.result (+32/-0)
mysql-test/suite/innodb_stress/r/innodb_bigstress_crash_nocompress.result (+32/-0)
mysql-test/suite/innodb_stress/r/innodb_bigstress_nocompress.result (+26/-0)
mysql-test/suite/innodb_stress/r/innodb_hugestress.result (+28/-0)
mysql-test/suite/innodb_stress/r/innodb_hugestress_blob.result (+28/-0)
mysql-test/suite/innodb_stress/r/innodb_hugestress_blob_nocompress.result (+26/-0)
mysql-test/suite/innodb_stress/r/innodb_hugestress_crash.result (+34/-0)
mysql-test/suite/innodb_stress/r/innodb_hugestress_crash_blob.result (+34/-0)
mysql-test/suite/innodb_stress/r/innodb_hugestress_crash_blob_nocompress.result (+32/-0)
mysql-test/suite/innodb_stress/r/innodb_hugestress_crash_nocompress.result (+32/-0)
mysql-test/suite/innodb_stress/r/innodb_hugestress_nocompress.result (+26/-0)
mysql-test/suite/innodb_stress/r/innodb_stress.result (+28/-0)
mysql-test/suite/innodb_stress/r/innodb_stress_blob.result (+28/-0)
mysql-test/suite/innodb_stress/r/innodb_stress_blob_nocompress.result (+26/-0)
mysql-test/suite/innodb_stress/r/innodb_stress_crash.result (+29/-0)
mysql-test/suite/innodb_stress/r/innodb_stress_crash_blob.result (+29/-0)
mysql-test/suite/innodb_stress/r/innodb_stress_crash_blob_nocompress.result (+27/-0)
mysql-test/suite/innodb_stress/r/innodb_stress_crash_nocompress.result (+27/-0)
mysql-test/suite/innodb_stress/r/innodb_stress_nocompress.result (+26/-0)
mysql-test/suite/innodb_stress/t/Readme (+5/-0)
mysql-test/suite/innodb_stress/t/innodb_bigstress-master.opt (+6/-0)
mysql-test/suite/innodb_stress/t/innodb_bigstress-slave.opt (+3/-0)
mysql-test/suite/innodb_stress/t/innodb_bigstress.test (+41/-0)
mysql-test/suite/innodb_stress/t/innodb_bigstress_blob-master.opt (+6/-0)
mysql-test/suite/innodb_stress/t/innodb_bigstress_blob-slave.opt (+3/-0)
mysql-test/suite/innodb_stress/t/innodb_bigstress_blob.test (+41/-0)
mysql-test/suite/innodb_stress/t/innodb_bigstress_blob_nocompress-master.opt (+6/-0)
mysql-test/suite/innodb_stress/t/innodb_bigstress_blob_nocompress-slave.opt (+3/-0)
mysql-test/suite/innodb_stress/t/innodb_bigstress_blob_nocompress.test (+40/-0)
mysql-test/suite/innodb_stress/t/innodb_bigstress_crash-master.opt (+6/-0)
mysql-test/suite/innodb_stress/t/innodb_bigstress_crash-slave.opt (+3/-0)
mysql-test/suite/innodb_stress/t/innodb_bigstress_crash.test (+41/-0)
mysql-test/suite/innodb_stress/t/innodb_bigstress_crash_blob-master.opt (+6/-0)
mysql-test/suite/innodb_stress/t/innodb_bigstress_crash_blob-slave.opt (+3/-0)
mysql-test/suite/innodb_stress/t/innodb_bigstress_crash_blob.test (+41/-0)
mysql-test/suite/innodb_stress/t/innodb_bigstress_crash_blob_nocompress-master.opt (+6/-0)
mysql-test/suite/innodb_stress/t/innodb_bigstress_crash_blob_nocompress-slave.opt (+3/-0)
mysql-test/suite/innodb_stress/t/innodb_bigstress_crash_blob_nocompress.test (+39/-0)
mysql-test/suite/innodb_stress/t/innodb_bigstress_crash_nocompress-master.opt (+6/-0)
mysql-test/suite/innodb_stress/t/innodb_bigstress_crash_nocompress-slave.opt (+3/-0)
mysql-test/suite/innodb_stress/t/innodb_bigstress_crash_nocompress.test (+40/-0)
mysql-test/suite/innodb_stress/t/innodb_bigstress_nocompress-master.opt (+6/-0)
mysql-test/suite/innodb_stress/t/innodb_bigstress_nocompress-slave.opt (+3/-0)
mysql-test/suite/innodb_stress/t/innodb_bigstress_nocompress.test (+39/-0)
mysql-test/suite/innodb_stress/t/innodb_hugestress-master.opt (+6/-0)
mysql-test/suite/innodb_stress/t/innodb_hugestress-slave.opt (+3/-0)
mysql-test/suite/innodb_stress/t/innodb_hugestress.test (+44/-0)
mysql-test/suite/innodb_stress/t/innodb_hugestress_blob-master.opt (+6/-0)
mysql-test/suite/innodb_stress/t/innodb_hugestress_blob-slave.opt (+3/-0)
mysql-test/suite/innodb_stress/t/innodb_hugestress_blob.test (+44/-0)
mysql-test/suite/innodb_stress/t/innodb_hugestress_blob_nocompress-master.opt (+6/-0)
mysql-test/suite/innodb_stress/t/innodb_hugestress_blob_nocompress-slave.opt (+3/-0)
mysql-test/suite/innodb_stress/t/innodb_hugestress_blob_nocompress.test (+42/-0)
mysql-test/suite/innodb_stress/t/innodb_hugestress_crash-master.opt (+6/-0)
mysql-test/suite/innodb_stress/t/innodb_hugestress_crash-slave.opt (+3/-0)
mysql-test/suite/innodb_stress/t/innodb_hugestress_crash.test (+41/-0)
mysql-test/suite/innodb_stress/t/innodb_hugestress_crash_blob-master.opt (+6/-0)
mysql-test/suite/innodb_stress/t/innodb_hugestress_crash_blob-slave.opt (+3/-0)
mysql-test/suite/innodb_stress/t/innodb_hugestress_crash_blob.test (+41/-0)
mysql-test/suite/innodb_stress/t/innodb_hugestress_crash_blob_nocompress-master.opt (+6/-0)
mysql-test/suite/innodb_stress/t/innodb_hugestress_crash_blob_nocompress-slave.opt (+3/-0)
mysql-test/suite/innodb_stress/t/innodb_hugestress_crash_blob_nocompress.test (+39/-0)
mysql-test/suite/innodb_stress/t/innodb_hugestress_crash_nocompress-master.opt (+6/-0)
mysql-test/suite/innodb_stress/t/innodb_hugestress_crash_nocompress-slave.opt (+3/-0)
mysql-test/suite/innodb_stress/t/innodb_hugestress_crash_nocompress.test (+39/-0)
mysql-test/suite/innodb_stress/t/innodb_hugestress_nocompress-master.opt (+6/-0)
mysql-test/suite/innodb_stress/t/innodb_hugestress_nocompress-slave.opt (+3/-0)
mysql-test/suite/innodb_stress/t/innodb_hugestress_nocompress.test (+42/-0)
mysql-test/suite/innodb_stress/t/innodb_stress-master.opt (+5/-0)
mysql-test/suite/innodb_stress/t/innodb_stress-slave.opt (+2/-0)
mysql-test/suite/innodb_stress/t/innodb_stress.test (+40/-0)
mysql-test/suite/innodb_stress/t/innodb_stress_blob-master.opt (+5/-0)
mysql-test/suite/innodb_stress/t/innodb_stress_blob-slave.opt (+2/-0)
mysql-test/suite/innodb_stress/t/innodb_stress_blob.test (+40/-0)
mysql-test/suite/innodb_stress/t/innodb_stress_blob_nocompress-master.opt (+5/-0)
mysql-test/suite/innodb_stress/t/innodb_stress_blob_nocompress-slave.opt (+2/-0)
mysql-test/suite/innodb_stress/t/innodb_stress_blob_nocompress.test (+39/-0)
mysql-test/suite/innodb_stress/t/innodb_stress_crash-master.opt (+5/-0)
mysql-test/suite/innodb_stress/t/innodb_stress_crash-slave.opt (+2/-0)
mysql-test/suite/innodb_stress/t/innodb_stress_crash.test (+43/-0)
mysql-test/suite/innodb_stress/t/innodb_stress_crash_blob-master.opt (+5/-0)
mysql-test/suite/innodb_stress/t/innodb_stress_crash_blob-slave.opt (+2/-0)
mysql-test/suite/innodb_stress/t/innodb_stress_crash_blob.test (+43/-0)
mysql-test/suite/innodb_stress/t/innodb_stress_crash_blob_nocompress-master.opt (+5/-0)
mysql-test/suite/innodb_stress/t/innodb_stress_crash_blob_nocompress-slave.opt (+2/-0)
mysql-test/suite/innodb_stress/t/innodb_stress_crash_blob_nocompress.test (+41/-0)
mysql-test/suite/innodb_stress/t/innodb_stress_crash_nocompress-master.opt (+5/-0)
mysql-test/suite/innodb_stress/t/innodb_stress_crash_nocompress-slave.opt (+2/-0)
mysql-test/suite/innodb_stress/t/innodb_stress_crash_nocompress.test (+41/-0)
mysql-test/suite/innodb_stress/t/innodb_stress_nocompress-master.opt (+5/-0)
mysql-test/suite/innodb_stress/t/innodb_stress_nocompress-slave.opt (+2/-0)
mysql-test/suite/innodb_stress/t/innodb_stress_nocompress.test (+38/-0)
mysql-test/suite/innodb_stress/t/load_generator.py (+435/-0)
mysql-test/suite/innodb_zip/r/innodb_16k.result (+1/-1)
mysql-test/suite/innodb_zip/t/innodb_16k.test (+1/-1)
mysql-test/suite/large_tests/r/alter_table.result (+1/-1)
mysql-test/suite/large_tests/t/alter_table.test (+9/-3)
mysql-test/suite/ndb/r/ndb_restore_discover.result (+33/-0)
mysql-test/suite/ndb/t/ndb_restore_discover.test (+70/-0)
mysql-test/suite/opt_trace/include/bugs.inc (+71/-0)
mysql-test/suite/opt_trace/r/bugs_no_prot_all.result (+65/-0)
mysql-test/suite/opt_trace/r/bugs_no_prot_none.result (+65/-0)
mysql-test/suite/opt_trace/r/bugs_ps_prot_all.result (+65/-0)
mysql-test/suite/opt_trace/r/bugs_ps_prot_none.result (+65/-0)
mysql-test/suite/opt_trace/r/subquery_no_prot.result (+2/-2)
mysql-test/suite/opt_trace/r/subquery_ps_prot.result (+2/-2)
mysql-test/suite/parts/r/partition_debug.result (+16/-0)
mysql-test/suite/parts/r/partition_special_innodb.result (+33/-0)
mysql-test/suite/parts/t/partition_debug.test (+18/-0)
mysql-test/suite/parts/t/partition_special_innodb.test (+44/-0)
mysql-test/suite/perfschema/include/connection_setup.inc (+1/-1)
mysql-test/suite/perfschema/include/digest_setup.inc (+1/-1)
mysql-test/suite/perfschema/include/event_aggregate_setup.inc (+1/-1)
mysql-test/suite/perfschema/include/no_protocol.inc (+0/-10)
mysql-test/suite/perfschema/include/sizing_auto.inc (+10/-2)
mysql-test/suite/perfschema/include/socket_event.inc (+1/-1)
mysql-test/suite/perfschema/include/stage_setup.inc (+1/-1)
mysql-test/suite/perfschema/include/start_server_common.inc (+3/-1)
mysql-test/suite/perfschema/include/table_aggregate_load.inc (+3/-1)
mysql-test/suite/perfschema/include/table_aggregate_setup.inc (+1/-1)
mysql-test/suite/perfschema/r/digest_null_literal.result (+27/-0)
mysql-test/suite/perfschema/r/digest_table_full.result (+1/-1)
mysql-test/suite/perfschema/r/func_file_io.result (+1/-0)
mysql-test/suite/perfschema/r/func_mutex.result (+1/-0)
mysql-test/suite/perfschema/r/global_read_lock.result (+4/-2)
mysql-test/suite/perfschema/r/innodb_table_io.result (+0/-3)
mysql-test/suite/perfschema/r/myisam_file_io.result (+1/-0)
mysql-test/suite/perfschema/r/ortho_iter.result (+4/-27)
mysql-test/suite/perfschema/r/privilege_table_io.result (+4/-2)
mysql-test/suite/perfschema/r/rpl_gtid_func.result (+2/-2)
mysql-test/suite/perfschema/r/rpl_statements.result (+40/-41)
mysql-test/suite/perfschema/r/sizing_default.result (+4/-159)
mysql-test/suite/perfschema/r/sizing_high.result (+4/-159)
mysql-test/suite/perfschema/r/sizing_low.result (+4/-159)
mysql-test/suite/perfschema/r/sizing_med.result (+4/-159)
mysql-test/suite/perfschema/r/sizing_off.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_disable_idle.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_disable_stages.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_disable_statements.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_disable_waits.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_innodb.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_low_digest.result (+12/-0)
mysql-test/suite/perfschema/r/start_server_no_account.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_no_cond_class.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_no_cond_inst.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_no_file_class.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_no_file_inst.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_no_host.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_no_mutex_class.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_no_setup_actors.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_no_setup_objects.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_no_socket_class.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_no_socket_inst.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_no_stage_class.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_no_stages_history.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_no_statement_class.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_no_statements_history.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_no_table_hdl.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_no_table_inst.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_no_thread_class.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_no_thread_inst.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_no_user.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_no_waits_history.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_nothing.result (+5/-2)
mysql-test/suite/perfschema/r/start_server_off.result (+4/-2)
mysql-test/suite/perfschema/r/start_server_on.result (+4/-2)
mysql-test/suite/perfschema/r/statement_digest.result (+32/-34)
mysql-test/suite/perfschema/r/statement_digest_consumers.result (+32/-34)
mysql-test/suite/perfschema/r/statement_digest_long_query.result (+2/-2)
mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result (+4/-2)
mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result (+4/-2)
mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result (+4/-2)
mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result (+4/-2)
mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result (+4/-2)
mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result (+4/-2)
mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result (+4/-2)
mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result (+4/-2)
mysql-test/suite/perfschema/r/table_aggregate_off.result (+4/-2)
mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result (+4/-2)
mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result (+4/-2)
mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result (+4/-2)
mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result (+4/-2)
mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result (+4/-2)
mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result (+4/-2)
mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result (+4/-2)
mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result (+4/-2)
mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result (+4/-2)
mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result (+4/-2)
mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result (+4/-2)
mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result (+4/-2)
mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result (+4/-2)
mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result (+4/-2)
mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result (+4/-2)
mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result (+4/-2)
mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result (+4/-2)
mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result (+4/-2)
mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result (+4/-2)
mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result (+4/-2)
mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result (+4/-2)
mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result (+4/-2)
mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result (+4/-2)
mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result (+4/-2)
mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result (+4/-2)
mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result (+4/-2)
mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result (+4/-2)
mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result (+4/-2)
mysql-test/suite/perfschema/r/threads_mysql.result (+1/-1)
mysql-test/suite/perfschema/r/unary_digest.result (+47/-0)
mysql-test/suite/perfschema/t/digest_null_literal.test (+32/-0)
mysql-test/suite/perfschema/t/func_file_io.test (+1/-0)
mysql-test/suite/perfschema/t/func_mutex.test (+1/-0)
mysql-test/suite/perfschema/t/global_read_lock.test (+3/-1)
mysql-test/suite/perfschema/t/myisam_file_io.test (+1/-0)
mysql-test/suite/perfschema/t/nesting.test (+2/-1)
mysql-test/suite/perfschema/t/ortho_iter.test (+3/-2)
mysql-test/suite/perfschema/t/privilege_table_io.test (+3/-1)
mysql-test/suite/perfschema/t/rpl_gtid_func.test (+1/-1)
mysql-test/suite/perfschema/t/rpl_statements.test (+1/-1)
mysql-test/suite/perfschema/t/sizing_off.test (+3/-1)
mysql-test/suite/perfschema/t/socket_summary_by_event_name_func.test (+1/-1)
mysql-test/suite/perfschema/t/socket_summary_by_instance_func.test (+1/-1)
mysql-test/suite/perfschema/t/socket_summary_by_instance_func_win.test (+1/-1)
mysql-test/suite/perfschema/t/start_server_low_digest-master.opt (+1/-0)
mysql-test/suite/perfschema/t/start_server_low_digest.test (+21/-0)
mysql-test/suite/perfschema/t/statement_digest_long_query.test (+1/-1)
mysql-test/suite/perfschema/t/unary_digest.test (+98/-0)
mysql-test/suite/rpl/r/rpl_000010.result (+2/-0)
mysql-test/suite/rpl/r/rpl_000011.result (+3/-0)
mysql-test/suite/rpl/r/rpl_000017.result (+1/-0)
mysql-test/suite/rpl/r/rpl_4threads_deadlock.result (+54/-0)
mysql-test/suite/rpl/r/rpl_DML_error.result (+4/-0)
mysql-test/suite/rpl/r/rpl_LD_INFILE.result (+2/-0)
mysql-test/suite/rpl/r/rpl_alter.result (+2/-0)
mysql-test/suite/rpl/r/rpl_alter_db.result (+2/-0)
mysql-test/suite/rpl/r/rpl_alter_repository.result (+5/-0)
mysql-test/suite/rpl/r/rpl_apply_binlog_with_anonymous_gtid.result (+30/-0)
mysql-test/suite/rpl/r/rpl_apply_binlog_with_anonymous_gtid_when_gtid_mode_on.result (+30/-0)
mysql-test/suite/rpl/r/rpl_apply_binlog_with_gtid_when_gtid_mode_off.result (+30/-0)
mysql-test/suite/rpl/r/rpl_auto_increment.result (+18/-0)
mysql-test/suite/rpl/r/rpl_auto_increment_11932.result (+1/-0)
mysql-test/suite/rpl/r/rpl_auto_increment_bug45679.result (+2/-0)
mysql-test/suite/rpl/r/rpl_auto_increment_update_failure.result (+28/-0)
mysql-test/suite/rpl/r/rpl_avoid_temporal_upgrade.result (+170/-0)
mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result (+3/-0)
mysql-test/suite/rpl/r/rpl_binlog_gcommit_options.result (+2/-0)
mysql-test/suite/rpl/r/rpl_bit.result (+2/-0)
mysql-test/suite/rpl/r/rpl_bit_npk.result (+3/-0)
mysql-test/suite/rpl/r/rpl_blackhole.result (+12/-0)
mysql-test/suite/rpl/r/rpl_bug31076.result (+1/-0)
mysql-test/suite/rpl/r/rpl_bug37426.result (+2/-0)
mysql-test/suite/rpl/r/rpl_bug41902.result (+1/-0)
mysql-test/suite/rpl/r/rpl_charset.result (+8/-0)
mysql-test/suite/rpl/r/rpl_charset_sjis.result (+2/-0)
mysql-test/suite/rpl/r/rpl_check_gtid.result (+32/-0)
mysql-test/suite/rpl/r/rpl_checksum_cache.result (+7/-0)
mysql-test/suite/rpl/r/rpl_colSize.result (+21/-0)
mysql-test/suite/rpl/r/rpl_commit_after_flush.result (+2/-0)
mysql-test/suite/rpl/r/rpl_concurrency_error.result (+2/-0)
mysql-test/suite/rpl/r/rpl_conditional_comments.result (+3/-0)
mysql-test/suite/rpl/r/rpl_corruption.result (+3/-0)
mysql-test/suite/rpl/r/rpl_crash_safe_master.result (+6/-0)
mysql-test/suite/rpl/r/rpl_create_database.result (+4/-0)
mysql-test/suite/rpl/r/rpl_create_drop_temp_table.result (+13/-0)
mysql-test/suite/rpl/r/rpl_create_if_not_exists.result (+5/-0)
mysql-test/suite/rpl/r/rpl_current_user.result (+8/-0)
mysql-test/suite/rpl/r/rpl_deadlock_innodb.result (+0/-11)
mysql-test/suite/rpl/r/rpl_delete_no_where.result (+3/-0)
mysql-test/suite/rpl/r/rpl_do_db_filter.result (+2/-0)
mysql-test/suite/rpl/r/rpl_do_table_filter_insensitive.result (+2/-0)
mysql-test/suite/rpl/r/rpl_do_table_filter_sensitive.result (+2/-0)
mysql-test/suite/rpl/r/rpl_drop.result (+1/-0)
mysql-test/suite/rpl/r/rpl_drop_db_fail.result (+21/-0)
mysql-test/suite/rpl/r/rpl_drop_temp_gtid.result (+35/-0)
mysql-test/suite/rpl/r/rpl_drop_view.result (+2/-0)
mysql-test/suite/rpl/r/rpl_dual_pos_advance.result (+4/-0)
mysql-test/suite/rpl/r/rpl_err_ignoredtable.result (+4/-0)
mysql-test/suite/rpl/r/rpl_events.result (+3/-0)
mysql-test/suite/rpl/r/rpl_extra_row_data.result (+2/-0)
mysql-test/suite/rpl/r/rpl_filter_database.result (+3/-0)
mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result (+7/-0)
mysql-test/suite/rpl/r/rpl_filter_warnings.result (+26/-0)
mysql-test/suite/rpl/r/rpl_flush_logs.result (+7/-0)
mysql-test/suite/rpl/r/rpl_flushlog_loop.result (+4/-0)
mysql-test/suite/rpl/r/rpl_foreign_key_innodb.result (+4/-0)
mysql-test/suite/rpl/r/rpl_free_items.result (+2/-0)
mysql-test/suite/rpl/r/rpl_function_defaults.result (+2/-0)
mysql-test/suite/rpl/r/rpl_general_log.result (+2/-0)
mysql-test/suite/rpl/r/rpl_geometry.result (+1/-0)
mysql-test/suite/rpl/r/rpl_get_lock.result (+2/-0)
mysql-test/suite/rpl/r/rpl_grant.result (+12/-0)
mysql-test/suite/rpl/r/rpl_grant_plugin.result (+4/-0)
mysql-test/suite/rpl/r/rpl_group_commit_deadlock.result (+2/-0)
mysql-test/suite/rpl/r/rpl_gtid_binary_log_as_relay_log.result (+23/-0)
mysql-test/suite/rpl/r/rpl_gtid_binlog_errors.result (+270/-0)
mysql-test/suite/rpl/r/rpl_gtid_do_table_filter_insensitive.result (+40/-0)
mysql-test/suite/rpl/r/rpl_gtid_do_table_filter_sensitive.result (+40/-0)
mysql-test/suite/rpl/r/rpl_gtid_drop_table.result (+204/-0)
mysql-test/suite/rpl/r/rpl_gtid_empty_group.result (+0/-41)
mysql-test/suite/rpl/r/rpl_gtid_empty_transaction.result (+111/-0)
mysql-test/suite/rpl/r/rpl_gtid_execution.result (+110/-2)
mysql-test/suite/rpl/r/rpl_gtid_failover.result (+4/-0)
mysql-test/suite/rpl/r/rpl_gtid_heartbeat_2slave.result (+53/-0)
mysql-test/suite/rpl/r/rpl_gtid_ignore_table_filter_insensitive.result (+40/-0)
mysql-test/suite/rpl/r/rpl_gtid_ignore_table_filter_sensitive.result (+40/-0)
mysql-test/suite/rpl/r/rpl_gtid_loaddata_s.result (+21/-0)
mysql-test/suite/rpl/r/rpl_gtid_mode.result (+8/-0)
mysql-test/suite/rpl/r/rpl_gtid_mode_off_new_master.result (+25/-0)
mysql-test/suite/rpl/r/rpl_gtid_mode_on_new_master.result (+25/-0)
mysql-test/suite/rpl/r/rpl_gtid_mts_relay_log_recovery_auto_pos_on_off.result (+151/-0)
mysql-test/suite/rpl/r/rpl_gtid_parallel.result (+1/-0)
mysql-test/suite/rpl/r/rpl_gtid_purged_fail_to_connect.result (+2/-2)
mysql-test/suite/rpl/r/rpl_gtid_purged_maintained.result (+11/-2)
mysql-test/suite/rpl/r/rpl_gtid_replay_relaylog.result (+28/-0)
mysql-test/suite/rpl/r/rpl_gtid_row_event_max_size.result (+70/-0)
mysql-test/suite/rpl/r/rpl_gtid_row_show_relaylog_events.result (+203/-0)
mysql-test/suite/rpl/r/rpl_gtid_server_sighup.result (+41/-0)
mysql-test/suite/rpl/r/rpl_gtid_sql_until_before_after.result (+1/-0)
mysql-test/suite/rpl/r/rpl_gtid_stm_insert_delayed.result (+84/-0)
mysql-test/suite/rpl/r/rpl_gtid_stm_mix_show_relaylog_events.result (+182/-0)
mysql-test/suite/rpl/r/rpl_gtid_stress_failover.result (+1/-0)
mysql-test/suite/rpl/r/rpl_gtid_validate_slave_gtids.result (+28/-0)
mysql-test/suite/rpl/r/rpl_gtids_restart_slave_io_lost_trx.result (+74/-0)
mysql-test/suite/rpl/r/rpl_heartbeat.result (+2/-0)
mysql-test/suite/rpl/r/rpl_heartbeat_2slaves.result (+2/-0)
mysql-test/suite/rpl/r/rpl_heartbeat_basic.result (+10/-0)
mysql-test/suite/rpl/r/rpl_idempotency.result (+40/-35)
mysql-test/suite/rpl/r/rpl_ignore_db_filter.result (+2/-0)
mysql-test/suite/rpl/r/rpl_ignore_revoke.result (+3/-0)
mysql-test/suite/rpl/r/rpl_ignore_table_filter_insensitive.result (+2/-0)
mysql-test/suite/rpl/r/rpl_ignore_table_filter_sensitive.result (+2/-0)
mysql-test/suite/rpl/r/rpl_incident.result (+1/-0)
mysql-test/suite/rpl/r/rpl_init_slave.result (+3/-0)
mysql-test/suite/rpl/r/rpl_innodb_bug28430.result (+1/-0)
mysql-test/suite/rpl/r/rpl_innodb_bug30888.result (+1/-0)
mysql-test/suite/rpl/r/rpl_insert.result (+2/-0)
mysql-test/suite/rpl/r/rpl_insert_id.result (+21/-0)
mysql-test/suite/rpl/r/rpl_insert_id_pk.result (+5/-0)
mysql-test/suite/rpl/r/rpl_insert_ignore.result (+4/-0)
mysql-test/suite/rpl/r/rpl_insert_on_update.result (+12/-0)
mysql-test/suite/rpl/r/rpl_invoked_features.result (+3/-0)
mysql-test/suite/rpl/r/rpl_kill_query.result (+124/-0)
mysql-test/suite/rpl/r/rpl_killed_ddl.result (+1/-0)
mysql-test/suite/rpl/r/rpl_known_bugs_detection.result (+2/-0)
mysql-test/suite/rpl/r/rpl_lcase_tblnames_rewrite_db.result (+1/-0)
mysql-test/suite/rpl/r/rpl_loaddata.result (+5/-0)
mysql-test/suite/rpl/r/rpl_loaddata_charset.result (+2/-0)
mysql-test/suite/rpl/r/rpl_loaddata_fatal.result (+2/-0)
mysql-test/suite/rpl/r/rpl_loaddata_m.result (+2/-0)
mysql-test/suite/rpl/r/rpl_loaddata_map.result (+2/-0)
mysql-test/suite/rpl/r/rpl_loaddata_s.result (+2/-0)
mysql-test/suite/rpl/r/rpl_loaddata_simple.result (+2/-0)
mysql-test/suite/rpl/r/rpl_loaddata_symlink.result (+2/-0)
mysql-test/suite/rpl/r/rpl_loaddatalocal.result (+13/-0)
mysql-test/suite/rpl/r/rpl_loadfile.result (+3/-0)
mysql-test/suite/rpl/r/rpl_locale.result (+2/-0)
mysql-test/suite/rpl/r/rpl_log_pos.result (+2/-0)
mysql-test/suite/rpl/r/rpl_lost_events_on_rotate.result (+1/-0)
mysql-test/suite/rpl/r/rpl_low_slave_net_time_out.result (+28/-0)
mysql-test/suite/rpl/r/rpl_manual_change_index_file.result (+5/-0)
mysql-test/suite/rpl/r/rpl_many_optimize.result (+1/-0)
mysql-test/suite/rpl/r/rpl_master_pos_wait.result (+1/-0)
mysql-test/suite/rpl/r/rpl_migration_crash_safe.result (+2/-0)
mysql-test/suite/rpl/r/rpl_misc_functions.result (+3/-0)
mysql-test/suite/rpl/r/rpl_mix_found_rows.result (+6/-0)
mysql-test/suite/rpl/r/rpl_mix_insert_delayed.result (+6/-0)
mysql-test/suite/rpl/r/rpl_mixed_bit_pk.result (+2/-0)
mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result (+3/-0)
mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result (+7/-20)
mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result (+2/-0)
mysql-test/suite/rpl/r/rpl_mts_debug.result (+3/-0)
mysql-test/suite/rpl/r/rpl_mts_execute_partial_trx_with_auto_pos_off.result (+26/-0)
mysql-test/suite/rpl/r/rpl_mts_execute_partial_trx_with_auto_pos_on.result (+26/-0)
mysql-test/suite/rpl/r/rpl_mts_gtids_restart_slave_io_lost_trx.result (+74/-0)
mysql-test/suite/rpl/r/rpl_mts_slave_hang_with_partial_trx.result (+28/-0)
mysql-test/suite/rpl/r/rpl_mts_stop_slave.result (+61/-0)
mysql-test/suite/rpl/r/rpl_multi_delete.result (+1/-0)
mysql-test/suite/rpl/r/rpl_multi_delete2.result (+1/-0)
mysql-test/suite/rpl/r/rpl_multi_engine.result (+254/-249)
mysql-test/suite/rpl/r/rpl_multi_update.result (+1/-0)
mysql-test/suite/rpl/r/rpl_multi_update2.result (+4/-0)
mysql-test/suite/rpl/r/rpl_multi_update3.result (+4/-0)
mysql-test/suite/rpl/r/rpl_multi_update4.result (+2/-0)
mysql-test/suite/rpl/r/rpl_mysql_upgrade.result (+2/-0)
mysql-test/suite/rpl/r/rpl_mysqlbinlog_gtid_on.result (+1/-0)
mysql-test/suite/rpl/r/rpl_name_const.result (+1/-0)
mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result (+1/-0)
mysql-test/suite/rpl/r/rpl_not_null_innodb.result (+8/-0)
mysql-test/suite/rpl/r/rpl_not_null_myisam.result (+8/-0)
mysql-test/suite/rpl/r/rpl_optimize.result (+1/-0)
mysql-test/suite/rpl/r/rpl_packet.result (+9/-0)
mysql-test/suite/rpl/r/rpl_parallel.result (+18/-0)
mysql-test/suite/rpl/r/rpl_parallel_change_master.result (+45/-0)
mysql-test/suite/rpl/r/rpl_parallel_conf_limits.result (+2/-0)
mysql-test/suite/rpl/r/rpl_parallel_conflicts.result (+2/-0)
mysql-test/suite/rpl/r/rpl_parallel_ddl.result (+3/-0)
mysql-test/suite/rpl/r/rpl_parallel_innodb.result (+18/-0)
mysql-test/suite/rpl/r/rpl_parallel_multi_db.result (+6/-0)
mysql-test/suite/rpl/r/rpl_parallel_seconds_behind_master.result (+5/-3)
mysql-test/suite/rpl/r/rpl_parallel_start_stop.result (+9/-0)
mysql-test/suite/rpl/r/rpl_parallel_temp_query.result (+4/-0)
mysql-test/suite/rpl/r/rpl_parallel_worker_error.result (+16/-0)
mysql-test/suite/rpl/r/rpl_ps.result (+3/-0)
mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result (+1/-0)
mysql-test/suite/rpl/r/rpl_read_old_relay_log_info.result (+1/-0)
mysql-test/suite/rpl/r/rpl_read_only.result (+5/-0)
mysql-test/suite/rpl/r/rpl_recovery_empty_sqlthd_pos.result (+25/-0)
mysql-test/suite/rpl/r/rpl_recovery_replicate_same_server_id.result (+26/-0)
mysql-test/suite/rpl/r/rpl_relay_space_innodb.result (+1/-0)
mysql-test/suite/rpl/r/rpl_relay_space_myisam.result (+1/-0)
mysql-test/suite/rpl/r/rpl_relayrotate.result (+1/-0)
mysql-test/suite/rpl/r/rpl_replicate_do.result (+5/-0)
mysql-test/suite/rpl/r/rpl_replicate_event_after_sync_stage.result (+31/-0)
mysql-test/suite/rpl/r/rpl_replicate_ignore_db.result (+3/-0)
mysql-test/suite/rpl/r/rpl_report_port.result (+1/-0)
mysql-test/suite/rpl/r/rpl_rewrite_db_filter.result (+2/-0)
mysql-test/suite/rpl/r/rpl_rewrt_db.result (+9/-0)
mysql-test/suite/rpl/r/rpl_rotate_gtid.result (+39/-0)
mysql-test/suite/rpl/r/rpl_rotate_logs.result (+6/-0)
mysql-test/suite/rpl/r/rpl_rotate_purge_deadlock.result (+2/-0)
mysql-test/suite/rpl/r/rpl_rotate_row_trans.result (+39/-0)
mysql-test/suite/rpl/r/rpl_row_001.result (+1/-0)
mysql-test/suite/rpl/r/rpl_row_4_bytes.result (+2/-0)
mysql-test/suite/rpl/r/rpl_row_NOW.result (+2/-0)
mysql-test/suite/rpl/r/rpl_row_USER.result (+36/-3)
mysql-test/suite/rpl/r/rpl_row_UUID.result (+1/-0)
mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result (+17/-0)
mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result (+42/-0)
mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result (+42/-0)
mysql-test/suite/rpl/r/rpl_row_basic_8partition.result (+9/-0)
mysql-test/suite/rpl/r/rpl_row_basic_allow_batching.result (+42/-0)
mysql-test/suite/rpl/r/rpl_row_blob_innodb.result (+5/-0)
mysql-test/suite/rpl/r/rpl_row_blob_myisam.result (+5/-0)
mysql-test/suite/rpl/r/rpl_row_colSize.result (+2/-0)
mysql-test/suite/rpl/r/rpl_row_conflicts.result (+6/-0)
mysql-test/suite/rpl/r/rpl_row_corrupt.result (+14/-0)
mysql-test/suite/rpl/r/rpl_row_corruption.result (+4/-0)
mysql-test/suite/rpl/r/rpl_row_crash_safe.result (+473/-4)
mysql-test/suite/rpl/r/rpl_row_create_select.result (+31/-0)
mysql-test/suite/rpl/r/rpl_row_drop.result (+5/-0)
mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result (+7/-22)
mysql-test/suite/rpl/r/rpl_row_event_max_size.result (+4/-0)
mysql-test/suite/rpl/r/rpl_row_find_row.result (+8/-0)
mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result (+1/-0)
mysql-test/suite/rpl/r/rpl_row_func001.result (+2/-0)
mysql-test/suite/rpl/r/rpl_row_func002.result (+2/-0)
mysql-test/suite/rpl/r/rpl_row_func003.result (+1/-0)
mysql-test/suite/rpl/r/rpl_row_hash_scan.result (+18/-0)
mysql-test/suite/rpl/r/rpl_row_hash_scan_sanity.result (+23/-0)
mysql-test/suite/rpl/r/rpl_row_idempotency.result (+100/-70)
mysql-test/suite/rpl/r/rpl_row_ignorable_event.result (+1/-0)
mysql-test/suite/rpl/r/rpl_row_img_misc.result (+2/-0)
mysql-test/suite/rpl/r/rpl_row_img_sanity.result (+48/-0)
mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result (+2/-0)
mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result (+1/-0)
mysql-test/suite/rpl/r/rpl_row_insert_delayed.result (+6/-0)
mysql-test/suite/rpl/r/rpl_row_log.result (+4/-0)
mysql-test/suite/rpl/r/rpl_row_log_innodb.result (+4/-0)
mysql-test/suite/rpl/r/rpl_row_max_relay_size.result (+2/-0)
mysql-test/suite/rpl/r/rpl_row_merge_engine.result (+3/-0)
mysql-test/suite/rpl/r/rpl_row_mts_crash_safe.result (+1/-2736)
mysql-test/suite/rpl/r/rpl_row_mts_rec_crash_safe.result (+1/-2736)
mysql-test/suite/rpl/r/rpl_row_mts_show_relaylog_events.result (+2/-0)
mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result (+6/-0)
mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result (+8/-0)
mysql-test/suite/rpl/r/rpl_row_record_find_myisam.result (+1/-0)
mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result (+2/-0)
mysql-test/suite/rpl/r/rpl_row_sp001.result (+5/-0)
mysql-test/suite/rpl/r/rpl_row_sp002_innodb.result (+6/-0)
mysql-test/suite/rpl/r/rpl_row_sp003.result (+3/-0)
mysql-test/suite/rpl/r/rpl_row_sp005.result (+3/-0)
mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result (+3/-0)
mysql-test/suite/rpl/r/rpl_row_sp007_innodb.result (+2/-0)
mysql-test/suite/rpl/r/rpl_row_sp008.result (+2/-0)
mysql-test/suite/rpl/r/rpl_row_sp009.result (+4/-0)
mysql-test/suite/rpl/r/rpl_row_sp010.result (+3/-0)
mysql-test/suite/rpl/r/rpl_row_sp011.result (+2/-0)
mysql-test/suite/rpl/r/rpl_row_sp012.result (+2/-0)
mysql-test/suite/rpl/r/rpl_row_tbl_metadata.result (+13/-0)
mysql-test/suite/rpl/r/rpl_row_trig001.result (+3/-0)
mysql-test/suite/rpl/r/rpl_row_trig002.result (+4/-0)
mysql-test/suite/rpl/r/rpl_row_trig003.result (+1/-0)
mysql-test/suite/rpl/r/rpl_row_trig004.result (+2/-0)
mysql-test/suite/rpl/r/rpl_row_trunc_temp.result (+2/-0)
mysql-test/suite/rpl/r/rpl_row_unsafe_funcs.result (+2/-0)
mysql-test/suite/rpl/r/rpl_row_until.result (+4/-0)
mysql-test/suite/rpl/r/rpl_row_utf16.result (+1/-0)
mysql-test/suite/rpl/r/rpl_row_utf32.result (+1/-0)
mysql-test/suite/rpl/r/rpl_row_view01.result (+4/-0)
mysql-test/suite/rpl/r/rpl_row_wide_table.result (+2/-0)
mysql-test/suite/rpl/r/rpl_sbm_previous_gtid_event.result (+61/-0)
mysql-test/suite/rpl/r/rpl_seconds_behind_master.result (+5/-0)
mysql-test/suite/rpl/r/rpl_semi_sync.result (+13/-2)
mysql-test/suite/rpl/r/rpl_semi_sync_deadlock.result (+3/-1)
mysql-test/suite/rpl/r/rpl_semi_sync_event.result (+1/-0)
mysql-test/suite/rpl/r/rpl_semi_sync_future_logpos.result (+32/-0)
mysql-test/suite/rpl/r/rpl_semi_sync_group_commit_deadlock.result (+2/-0)
mysql-test/suite/rpl/r/rpl_semi_sync_non_group_commit_deadlock.result (+2/-0)
mysql-test/suite/rpl/r/rpl_semi_sync_shutdown_hang.result (+24/-0)
mysql-test/suite/rpl/r/rpl_semi_sync_uninstall_plugin.result (+39/-0)
mysql-test/suite/rpl/r/rpl_sequential.result (+18/-0)
mysql-test/suite/rpl/r/rpl_server_id2.result (+1/-0)
mysql-test/suite/rpl/r/rpl_server_id_ignore.result (+3/-0)
mysql-test/suite/rpl/r/rpl_server_uuid.result (+25/-3)
mysql-test/suite/rpl/r/rpl_session_var.result (+4/-0)
mysql-test/suite/rpl/r/rpl_set_charset.result (+2/-0)
mysql-test/suite/rpl/r/rpl_set_null_innodb.result (+6/-0)
mysql-test/suite/rpl/r/rpl_set_null_myisam.result (+6/-0)
mysql-test/suite/rpl/r/rpl_show_errors.result (+1/-0)
mysql-test/suite/rpl/r/rpl_show_slave_running.result (+1/-0)
mysql-test/suite/rpl/r/rpl_show_slave_status_deadlock.result (+33/-0)
mysql-test/suite/rpl/r/rpl_skip_error.result (+9/-0)
mysql-test/suite/rpl/r/rpl_skip_incident.result (+2/-0)
mysql-test/suite/rpl/r/rpl_skip_slave_err_warnings.result (+13/-0)
mysql-test/suite/rpl/r/rpl_slave_grp_exec.result (+6/-0)
mysql-test/suite/rpl/r/rpl_slave_load_in.result (+2/-0)
mysql-test/suite/rpl/r/rpl_slave_skip.result (+7/-0)
mysql-test/suite/rpl/r/rpl_slave_status.result (+3/-0)
mysql-test/suite/rpl/r/rpl_slow_query_log.result (+7/-0)
mysql-test/suite/rpl/r/rpl_sp.result (+28/-0)
mysql-test/suite/rpl/r/rpl_sp004.result (+4/-0)
mysql-test/suite/rpl/r/rpl_sp_effects.result (+10/-0)
mysql-test/suite/rpl/r/rpl_sp_privileges.result (+65/-0)
mysql-test/suite/rpl/r/rpl_spec_variables.result (+8/-0)
mysql-test/suite/rpl/r/rpl_special_charset.result (+10/-0)
mysql-test/suite/rpl/r/rpl_sporadic_master.result (+3/-0)
mysql-test/suite/rpl/r/rpl_sql_thread_killed_waiting_commit_lock.result (+38/-0)
mysql-test/suite/rpl/r/rpl_ssl.result (+27/-7)
mysql-test/suite/rpl/r/rpl_ssl1.result (+5/-0)
mysql-test/suite/rpl/r/rpl_stm_000001.result (+6/-0)
mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result (+4/-0)
mysql-test/suite/rpl/r/rpl_stm_conflicts.result (+3/-0)
mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result (+7/-20)
mysql-test/suite/rpl/r/rpl_stm_flsh_tbls.result (+1/-0)
mysql-test/suite/rpl/r/rpl_stm_found_rows.result (+3/-0)
mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result (+2/-0)
mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result (+6/-0)
mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result (+5/-0)
mysql-test/suite/rpl/r/rpl_stm_loadfile.result (+2/-0)
mysql-test/suite/rpl/r/rpl_stm_log.result (+4/-0)
mysql-test/suite/rpl/r/rpl_stm_max_relay_size.result (+2/-0)
mysql-test/suite/rpl/r/rpl_stm_mix_mts_show_relaylog_events.result (+2/-0)
mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result (+2/-0)
mysql-test/suite/rpl/r/rpl_stm_mixed_crash_safe.result (+381/-10)
mysql-test/suite/rpl/r/rpl_stm_mixed_mts_crash_safe.result (+1/-2736)
mysql-test/suite/rpl/r/rpl_stm_mixed_mts_rec_crash_safe.result (+1/-2736)
mysql-test/suite/rpl/r/rpl_stm_mixed_mts_rec_crash_safe_checksum.result (+1/-2736)
mysql-test/suite/rpl/r/rpl_stm_mixed_mts_rec_crash_safe_small.result (+1/-798)
mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result (+3/-0)
mysql-test/suite/rpl/r/rpl_stm_multi_query.result (+1/-0)
mysql-test/suite/rpl/r/rpl_stm_no_op.result (+10/-0)
mysql-test/suite/rpl/r/rpl_stm_relay_ign_space.result (+3/-0)
mysql-test/suite/rpl/r/rpl_stm_sql_mode.result (+1/-0)
mysql-test/suite/rpl/r/rpl_stm_until.result (+3/-0)
mysql-test/suite/rpl/r/rpl_stm_until_pos_middle_gtid.result (+27/-0)
mysql-test/suite/rpl/r/rpl_stm_user_variables.result (+9/-0)
mysql-test/suite/rpl/r/rpl_stop_slave.result (+9/-2)
mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result (+14/-0)
mysql-test/suite/rpl/r/rpl_sync.result (+3/-0)
mysql-test/suite/rpl/r/rpl_temp_table.result (+1/-0)
mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result (+8/-0)
mysql-test/suite/rpl/r/rpl_temporal_fractional.result (+6/-0)
mysql-test/suite/rpl/r/rpl_temporary.result (+10/-0)
mysql-test/suite/rpl/r/rpl_temporary_errors.result (+2/-0)
mysql-test/suite/rpl/r/rpl_timestamp_upgrage_55.result (+26/-0)
mysql-test/suite/rpl/r/rpl_timezone.result (+10/-0)
mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result (+6/-0)
mysql-test/suite/rpl/r/rpl_trigger.result (+40/-0)
mysql-test/suite/rpl/r/rpl_trunc_temp.result (+3/-0)
mysql-test/suite/rpl/r/rpl_truncate_2myisam.result (+10/-0)
mysql-test/suite/rpl/r/rpl_truncate_3innodb.result (+10/-0)
mysql-test/suite/rpl/r/rpl_typeconv.result (+1/-0)
mysql-test/suite/rpl/r/rpl_typeconv_innodb.result (+2/-0)
mysql-test/suite/rpl/r/rpl_unknown_ignorable_event.result (+28/-0)
mysql-test/suite/rpl/r/rpl_user.result (+6/-0)
mysql-test/suite/rpl/r/rpl_user_variables.result (+17/-0)
mysql-test/suite/rpl/r/rpl_variables.result (+5/-0)
mysql-test/suite/rpl/r/rpl_variables_stm.result (+3/-0)
mysql-test/suite/rpl/r/rpl_view.result (+15/-1)
mysql-test/suite/rpl/r/rpl_view_multi.result (+4/-0)
mysql-test/suite/rpl/t/rpl_000010.test (+3/-2)
mysql-test/suite/rpl/t/rpl_000011.test (+3/-3)
mysql-test/suite/rpl/t/rpl_000017.test (+1/-1)
mysql-test/suite/rpl/t/rpl_4threads_deadlock.test (+120/-0)
mysql-test/suite/rpl/t/rpl_DML_error.test (+4/-4)
mysql-test/suite/rpl/t/rpl_LD_INFILE.test (+2/-3)
mysql-test/suite/rpl/t/rpl_alter.test (+2/-2)
mysql-test/suite/rpl/t/rpl_alter_db.test (+2/-2)
mysql-test/suite/rpl/t/rpl_alter_repository.test (+6/-5)
mysql-test/suite/rpl/t/rpl_apply_binlog_with_anonymous_gtid.test (+72/-0)
mysql-test/suite/rpl/t/rpl_apply_binlog_with_anonymous_gtid_when_gtid_mode_on.test (+74/-0)
mysql-test/suite/rpl/t/rpl_apply_binlog_with_gtid_when_gtid_mode_off.test (+68/-0)
mysql-test/suite/rpl/t/rpl_auto_increment_11932.test (+1/-1)
mysql-test/suite/rpl/t/rpl_auto_increment_bug33029.test (+1/-0)
mysql-test/suite/rpl/t/rpl_auto_increment_bug45679.test (+2/-2)
mysql-test/suite/rpl/t/rpl_auto_increment_update_failure.test (+8/-8)
mysql-test/suite/rpl/t/rpl_avoid_temporal_upgrade.test (+116/-0)
mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test (+3/-3)
mysql-test/suite/rpl/t/rpl_binlog_corruption.test (+1/-0)
mysql-test/suite/rpl/t/rpl_binlog_errors.test (+3/-481)
mysql-test/suite/rpl/t/rpl_binlog_gcommit_options.test (+3/-2)
mysql-test/suite/rpl/t/rpl_binlog_index.test (+1/-0)
mysql-test/suite/rpl/t/rpl_bit.test (+2/-2)
mysql-test/suite/rpl/t/rpl_bit_npk.test (+3/-3)
mysql-test/suite/rpl/t/rpl_blackhole.test (+2/-2)
mysql-test/suite/rpl/t/rpl_bug31076.test (+1/-1)
mysql-test/suite/rpl/t/rpl_bug37426.test (+2/-2)
mysql-test/suite/rpl/t/rpl_bug41902.test (+1/-1)
mysql-test/suite/rpl/t/rpl_charset_sjis.test (+2/-2)
mysql-test/suite/rpl/t/rpl_check_gtid.test (+12/-12)
mysql-test/suite/rpl/t/rpl_checksum.test (+1/-0)
mysql-test/suite/rpl/t/rpl_checksum_cache.test (+7/-12)
mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test (+1/-0)
mysql-test/suite/rpl/t/rpl_colSize.test (+60/-8)
mysql-test/suite/rpl/t/rpl_concurrency_error.test (+2/-2)
mysql-test/suite/rpl/t/rpl_conditional_comments.test (+3/-3)
mysql-test/suite/rpl/t/rpl_corruption.test (+3/-3)
mysql-test/suite/rpl/t/rpl_crash_safe_master.test (+7/-6)
mysql-test/suite/rpl/t/rpl_create_database.test (+4/-4)
mysql-test/suite/rpl/t/rpl_create_drop_temp_table.test (+74/-0)
mysql-test/suite/rpl/t/rpl_create_if_not_exists.test (+5/-5)
mysql-test/suite/rpl/t/rpl_critical_errors.test (+1/-1)
mysql-test/suite/rpl/t/rpl_current_user.test (+13/-8)
mysql-test/suite/rpl/t/rpl_deadlock_innodb.test (+1/-0)
mysql-test/suite/rpl/t/rpl_delayed_slave.test (+3/-3)
mysql-test/suite/rpl/t/rpl_do_db_filter.test (+1/-1)
mysql-test/suite/rpl/t/rpl_do_grant.test (+1/-0)
mysql-test/suite/rpl/t/rpl_do_table_filter_insensitive.test (+2/-8)
mysql-test/suite/rpl/t/rpl_do_table_filter_sensitive.test (+2/-9)
mysql-test/suite/rpl/t/rpl_drop.test (+1/-1)
mysql-test/suite/rpl/t/rpl_drop_db.test (+1/-0)
mysql-test/suite/rpl/t/rpl_drop_db_fail.test (+33/-0)
mysql-test/suite/rpl/t/rpl_drop_temp.test (+1/-0)
mysql-test/suite/rpl/t/rpl_drop_temp_gtid.test (+53/-0)
mysql-test/suite/rpl/t/rpl_drop_view.test (+2/-2)
mysql-test/suite/rpl/t/rpl_dual_pos_advance.test (+18/-4)
mysql-test/suite/rpl/t/rpl_err_ignoredtable.test (+4/-4)
mysql-test/suite/rpl/t/rpl_events.test (+3/-3)
mysql-test/suite/rpl/t/rpl_extra_col_master_innodb.test (+1/-0)
mysql-test/suite/rpl/t/rpl_extra_col_master_myisam.test (+1/-0)
mysql-test/suite/rpl/t/rpl_extra_col_slave_innodb.test (+1/-0)
mysql-test/suite/rpl/t/rpl_extra_col_slave_myisam.test (+1/-0)
mysql-test/suite/rpl/t/rpl_extra_row_data.test (+2/-2)
mysql-test/suite/rpl/t/rpl_failed_optimize.test (+4/-0)
mysql-test/suite/rpl/t/rpl_filter_database.test (+3/-3)
mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test (+8/-7)
mysql-test/suite/rpl/t/rpl_filter_warnings-slave.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_filter_warnings.test (+55/-0)
mysql-test/suite/rpl/t/rpl_flush_logs.test (+8/-5)
mysql-test/suite/rpl/t/rpl_flushlog_loop.test (+8/-4)
mysql-test/suite/rpl/t/rpl_free_items.test (+2/-2)
mysql-test/suite/rpl/t/rpl_function_defaults.test (+2/-2)
mysql-test/suite/rpl/t/rpl_general_log.test (+2/-2)
mysql-test/suite/rpl/t/rpl_geometry.test (+1/-1)
mysql-test/suite/rpl/t/rpl_get_lock.test (+2/-2)
mysql-test/suite/rpl/t/rpl_grant.test (+13/-12)
mysql-test/suite/rpl/t/rpl_grant_plugin.test (+4/-4)
mysql-test/suite/rpl/t/rpl_gtid_binary_log_as_relay_log.test (+57/-0)
mysql-test/suite/rpl/t/rpl_gtid_binlog_errors-master.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_gtid_binlog_errors.test (+6/-0)
mysql-test/suite/rpl/t/rpl_gtid_do_table_filter_insensitive-master.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_gtid_do_table_filter_insensitive-slave.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_gtid_do_table_filter_insensitive.test (+9/-0)
mysql-test/suite/rpl/t/rpl_gtid_do_table_filter_sensitive-master.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_gtid_do_table_filter_sensitive-slave.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_gtid_do_table_filter_sensitive.test (+9/-0)
mysql-test/suite/rpl/t/rpl_gtid_drop_table.cnf (+11/-0)
mysql-test/suite/rpl/t/rpl_gtid_drop_table.test (+338/-0)
mysql-test/suite/rpl/t/rpl_gtid_empty_group-master.opt (+0/-1)
mysql-test/suite/rpl/t/rpl_gtid_empty_group-slave.opt (+0/-1)
mysql-test/suite/rpl/t/rpl_gtid_empty_group.test (+0/-73)
mysql-test/suite/rpl/t/rpl_gtid_empty_transaction.cnf (+25/-0)
mysql-test/suite/rpl/t/rpl_gtid_empty_transaction.test (+301/-0)
mysql-test/suite/rpl/t/rpl_gtid_execution-master.opt (+1/-1)
mysql-test/suite/rpl/t/rpl_gtid_execution-slave.opt (+1/-1)
mysql-test/suite/rpl/t/rpl_gtid_execution.test (+2/-5)
mysql-test/suite/rpl/t/rpl_gtid_failover.test (+8/-4)
mysql-test/suite/rpl/t/rpl_gtid_heartbeat_2slave.cnf (+12/-0)
mysql-test/suite/rpl/t/rpl_gtid_heartbeat_2slave.test (+10/-0)
mysql-test/suite/rpl/t/rpl_gtid_ignore_table_filter_insensitive-master.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_gtid_ignore_table_filter_insensitive-slave.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_gtid_ignore_table_filter_insensitive.test (+8/-0)
mysql-test/suite/rpl/t/rpl_gtid_ignore_table_filter_sensitive-master.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_gtid_ignore_table_filter_sensitive-slave.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_gtid_ignore_table_filter_sensitive.test (+9/-0)
mysql-test/suite/rpl/t/rpl_gtid_loaddata_s-slave.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_gtid_loaddata_s.test (+7/-0)
mysql-test/suite/rpl/t/rpl_gtid_mode.test (+11/-4)
mysql-test/suite/rpl/t/rpl_gtid_mode_off_new_master.test (+63/-0)
mysql-test/suite/rpl/t/rpl_gtid_mode_on_new_master.test (+43/-0)
mysql-test/suite/rpl/t/rpl_gtid_mts_relay_log_recovery_auto_pos_on_off-master.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_gtid_mts_relay_log_recovery_auto_pos_on_off-slave.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_gtid_mts_relay_log_recovery_auto_pos_on_off.test (+60/-0)
mysql-test/suite/rpl/t/rpl_gtid_parallel-master.opt (+0/-1)
mysql-test/suite/rpl/t/rpl_gtid_parallel-slave.opt (+0/-1)
mysql-test/suite/rpl/t/rpl_gtid_parallel.test (+1/-0)
mysql-test/suite/rpl/t/rpl_gtid_purged_fail_to_connect-master.opt (+1/-1)
mysql-test/suite/rpl/t/rpl_gtid_purged_fail_to_connect-slave.opt (+1/-1)
mysql-test/suite/rpl/t/rpl_gtid_purged_fail_to_connect.test (+3/-4)
mysql-test/suite/rpl/t/rpl_gtid_purged_maintained.test (+4/-5)
mysql-test/suite/rpl/t/rpl_gtid_replay_relaylog.test (+81/-0)
mysql-test/suite/rpl/t/rpl_gtid_row_event_max_size-master.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_gtid_row_event_max_size-slave.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_gtid_row_event_max_size.test (+10/-0)
mysql-test/suite/rpl/t/rpl_gtid_row_show_relaylog_events.test (+15/-0)
mysql-test/suite/rpl/t/rpl_gtid_server_sighup.test (+135/-0)
mysql-test/suite/rpl/t/rpl_gtid_sql_until_before_after.test (+1/-1)
mysql-test/suite/rpl/t/rpl_gtid_stm_insert_delayed.test (+2/-0)
mysql-test/suite/rpl/t/rpl_gtid_stm_mix_show_relaylog_events.test (+15/-0)
mysql-test/suite/rpl/t/rpl_gtid_stress_failover.test (+20/-7)
mysql-test/suite/rpl/t/rpl_gtid_validate_slave_gtids.test (+128/-0)
mysql-test/suite/rpl/t/rpl_gtids_restart_slave_io_lost_trx.test (+12/-0)
mysql-test/suite/rpl/t/rpl_heartbeat.test (+2/-2)
mysql-test/suite/rpl/t/rpl_heartbeat_2slaves.test (+2/-131)
mysql-test/suite/rpl/t/rpl_heartbeat_basic.test (+12/-11)
mysql-test/suite/rpl/t/rpl_heartbeat_ssl.test (+1/-0)
mysql-test/suite/rpl/t/rpl_idempotency.test (+5/-5)
mysql-test/suite/rpl/t/rpl_ignore_db_filter.test (+1/-1)
mysql-test/suite/rpl/t/rpl_ignore_revoke.test (+3/-3)
mysql-test/suite/rpl/t/rpl_ignore_table.test (+1/-0)
mysql-test/suite/rpl/t/rpl_ignore_table_filter_insensitive.test (+2/-9)
mysql-test/suite/rpl/t/rpl_ignore_table_filter_sensitive.test (+2/-9)
mysql-test/suite/rpl/t/rpl_incident.test (+2/-1)
mysql-test/suite/rpl/t/rpl_init_slave.test (+3/-3)
mysql-test/suite/rpl/t/rpl_innodb_bug28430.test (+1/-1)
mysql-test/suite/rpl/t/rpl_innodb_bug30888.test (+1/-1)
mysql-test/suite/rpl/t/rpl_insert.test (+3/-2)
mysql-test/suite/rpl/t/rpl_insert_on_update.test (+40/-0)
mysql-test/suite/rpl/t/rpl_invoked_features.test (+6/-3)
mysql-test/suite/rpl/t/rpl_kill_query-slave.opt (+2/-0)
mysql-test/suite/rpl/t/rpl_kill_query.test (+93/-0)
mysql-test/suite/rpl/t/rpl_killed_ddl.test (+1/-1)
mysql-test/suite/rpl/t/rpl_known_bugs_detection.test (+2/-2)
mysql-test/suite/rpl/t/rpl_lcase_tblnames_rewrite_db.test (+1/-1)
mysql-test/suite/rpl/t/rpl_loaddata.test (+1/-0)
mysql-test/suite/rpl/t/rpl_loaddata_charset.test (+2/-2)
mysql-test/suite/rpl/t/rpl_loaddata_fatal.test (+3/-2)
mysql-test/suite/rpl/t/rpl_loaddata_m.test (+2/-2)
mysql-test/suite/rpl/t/rpl_loaddata_map.test (+2/-2)
mysql-test/suite/rpl/t/rpl_loaddata_s.test (+2/-22)
mysql-test/suite/rpl/t/rpl_loaddata_simple.test (+2/-2)
mysql-test/suite/rpl/t/rpl_loaddata_symlink-master.sh (+2/-0)
mysql-test/suite/rpl/t/rpl_loaddata_symlink-slave.sh (+2/-0)
mysql-test/suite/rpl/t/rpl_loaddata_symlink.test (+2/-2)
mysql-test/suite/rpl/t/rpl_loaddatalocal.test (+9/-9)
mysql-test/suite/rpl/t/rpl_loadfile.test (+1/-1)
mysql-test/suite/rpl/t/rpl_locale.test (+2/-2)
mysql-test/suite/rpl/t/rpl_log_pos.test (+3/-2)
mysql-test/suite/rpl/t/rpl_lost_events_on_rotate.test (+1/-1)
mysql-test/suite/rpl/t/rpl_low_slave_net_time_out.test (+106/-0)
mysql-test/suite/rpl/t/rpl_manual_change_index_file.test (+6/-5)
mysql-test/suite/rpl/t/rpl_many_optimize.test (+1/-1)
mysql-test/suite/rpl/t/rpl_master_pos_wait.test (+1/-1)
mysql-test/suite/rpl/t/rpl_migration_crash_safe.test (+2/-2)
mysql-test/suite/rpl/t/rpl_misc_functions-slave.sh (+2/-0)
mysql-test/suite/rpl/t/rpl_misc_functions.test (+3/-3)
mysql-test/suite/rpl/t/rpl_mix_found_rows.test (+6/-6)
mysql-test/suite/rpl/t/rpl_mix_insert_delayed.test (+1/-0)
mysql-test/suite/rpl/t/rpl_mixed_bit_pk.test (+2/-2)
mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test (+3/-3)
mysql-test/suite/rpl/t/rpl_mts_debug.test (+4/-3)
mysql-test/suite/rpl/t/rpl_mts_execute_partial_trx_with_auto_pos_off-slave.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_mts_execute_partial_trx_with_auto_pos_off.test (+21/-0)
mysql-test/suite/rpl/t/rpl_mts_execute_partial_trx_with_auto_pos_on-slave.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_mts_execute_partial_trx_with_auto_pos_on.test (+21/-0)
mysql-test/suite/rpl/t/rpl_mts_gtids_restart_slave_io_lost_trx-slave.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_mts_gtids_restart_slave_io_lost_trx.test (+13/-0)
mysql-test/suite/rpl/t/rpl_mts_slave_hang_with_partial_trx-slave.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_mts_slave_hang_with_partial_trx.test (+77/-0)
mysql-test/suite/rpl/t/rpl_mts_stop_slave-slave.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_mts_stop_slave.test (+121/-0)
mysql-test/suite/rpl/t/rpl_multi_delete.test (+1/-1)
mysql-test/suite/rpl/t/rpl_multi_delete2.test (+1/-1)
mysql-test/suite/rpl/t/rpl_multi_engine.test (+5/-5)
mysql-test/suite/rpl/t/rpl_multi_update2.test (+1/-0)
mysql-test/suite/rpl/t/rpl_multi_update4.test (+3/-2)
mysql-test/suite/rpl/t/rpl_mysql_upgrade.test (+2/-2)
mysql-test/suite/rpl/t/rpl_mysqlbinlog_gtid_on-master.opt (+0/-1)
mysql-test/suite/rpl/t/rpl_mysqlbinlog_gtid_on-slave.opt (+0/-1)
mysql-test/suite/rpl/t/rpl_mysqlbinlog_gtid_on.test (+3/-1)
mysql-test/suite/rpl/t/rpl_name_const.test (+1/-1)
mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test (+1/-1)
mysql-test/suite/rpl/t/rpl_optimize.test (+1/-1)
mysql-test/suite/rpl/t/rpl_packet.test (+9/-8)
mysql-test/suite/rpl/t/rpl_parallel_change_master.test (+87/-2)
mysql-test/suite/rpl/t/rpl_parallel_conf_limits.test (+2/-2)
mysql-test/suite/rpl/t/rpl_parallel_conflicts.test (+2/-2)
mysql-test/suite/rpl/t/rpl_parallel_ddl.test (+3/-3)
mysql-test/suite/rpl/t/rpl_parallel_multi_db.test (+6/-6)
mysql-test/suite/rpl/t/rpl_parallel_seconds_behind_master.test (+6/-25)
mysql-test/suite/rpl/t/rpl_parallel_start_stop.test (+9/-9)
mysql-test/suite/rpl/t/rpl_parallel_switch_sequential.test (+1/-0)
mysql-test/suite/rpl/t/rpl_parallel_temp_query.test (+4/-4)
mysql-test/suite/rpl/t/rpl_parallel_worker_error.test (+58/-0)
mysql-test/suite/rpl/t/rpl_plugin_load.test (+2/-2)
mysql-test/suite/rpl/t/rpl_ps.test (+4/-4)
mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test (+1/-1)
mysql-test/suite/rpl/t/rpl_read_old_relay_log_info.test (+2/-1)
mysql-test/suite/rpl/t/rpl_read_only.test (+5/-5)
mysql-test/suite/rpl/t/rpl_recovery_empty_sqlthd_pos-slave.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_recovery_empty_sqlthd_pos.test (+64/-0)
mysql-test/suite/rpl/t/rpl_recovery_replicate_same_server_id-slave.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_recovery_replicate_same_server_id.test (+84/-0)
mysql-test/suite/rpl/t/rpl_replicate_do.test (+5/-5)
mysql-test/suite/rpl/t/rpl_replicate_event_after_sync_stage.test (+66/-0)
mysql-test/suite/rpl/t/rpl_replicate_ignore_db.test (+4/-3)
mysql-test/suite/rpl/t/rpl_report_port.test (+1/-1)
mysql-test/suite/rpl/t/rpl_rewrt_db.test (+9/-9)
mysql-test/suite/rpl/t/rpl_rotate_gtid.test (+95/-0)
mysql-test/suite/rpl/t/rpl_rotate_logs.test (+6/-6)
mysql-test/suite/rpl/t/rpl_rotate_purge_deadlock.test (+6/-2)
mysql-test/suite/rpl/t/rpl_rotate_row_trans.test (+94/-0)
mysql-test/suite/rpl/t/rpl_row_4_bytes.test (+2/-2)
mysql-test/suite/rpl/t/rpl_row_NOW.test (+2/-2)
mysql-test/suite/rpl/t/rpl_row_USER.test (+50/-8)
mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test (+17/-17)
mysql-test/suite/rpl/t/rpl_row_basic_8partition.test (+9/-9)
mysql-test/suite/rpl/t/rpl_row_colSize.test (+2/-2)
mysql-test/suite/rpl/t/rpl_row_corrupt-master.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_row_corrupt-slave.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_row_corrupt.test (+36/-0)
mysql-test/suite/rpl/t/rpl_row_corruption.test (+4/-4)
mysql-test/suite/rpl/t/rpl_row_create_select.test (+29/-0)
mysql-test/suite/rpl/t/rpl_row_create_table.test (+19/-19)
mysql-test/suite/rpl/t/rpl_row_drop.test (+5/-5)
mysql-test/suite/rpl/t/rpl_row_event_max_size.test (+6/-90)
mysql-test/suite/rpl/t/rpl_row_find_row.test (+8/-8)
mysql-test/suite/rpl/t/rpl_row_func001.test (+2/-2)
mysql-test/suite/rpl/t/rpl_row_func002.test (+5/-5)
mysql-test/suite/rpl/t/rpl_row_hash_scan.test (+19/-18)
mysql-test/suite/rpl/t/rpl_row_hash_scan_sanity.test (+40/-2)
mysql-test/suite/rpl/t/rpl_row_ignorable_event.test (+1/-1)
mysql-test/suite/rpl/t/rpl_row_img_eng_full.test (+1/-0)
mysql-test/suite/rpl/t/rpl_row_img_misc.test (+2/-2)
mysql-test/suite/rpl/t/rpl_row_img_sanity.test (+16/-16)
mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test (+1/-1)
mysql-test/suite/rpl/t/rpl_row_insert_delayed.test (+1/-0)
mysql-test/suite/rpl/t/rpl_row_lcase_tblnames.test (+1/-0)
mysql-test/suite/rpl/t/rpl_row_merge_engine.test (+3/-3)
mysql-test/suite/rpl/t/rpl_row_mts_crash_safe.test (+1/-0)
mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test (+1/-0)
mysql-test/suite/rpl/t/rpl_row_rec_comp_myisam.test (+2/-2)
mysql-test/suite/rpl/t/rpl_row_record_find_myisam.test (+1/-1)
mysql-test/suite/rpl/t/rpl_row_show_relaylog_events.test (+3/-18)
mysql-test/suite/rpl/t/rpl_row_sp001.test (+6/-6)
mysql-test/suite/rpl/t/rpl_row_sp005.test (+3/-3)
mysql-test/suite/rpl/t/rpl_row_sp008.test (+2/-2)
mysql-test/suite/rpl/t/rpl_row_sp009.test (+4/-4)
mysql-test/suite/rpl/t/rpl_row_sp010.test (+3/-3)
mysql-test/suite/rpl/t/rpl_row_sp011.test (+2/-2)
mysql-test/suite/rpl/t/rpl_row_sp012.test (+2/-2)
mysql-test/suite/rpl/t/rpl_row_tabledefs_2myisam.test (+1/-1)
mysql-test/suite/rpl/t/rpl_row_tabledefs_3innodb.test (+1/-1)
mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test (+17/-5)
mysql-test/suite/rpl/t/rpl_row_trig001.test (+3/-3)
mysql-test/suite/rpl/t/rpl_row_trig002.test (+4/-4)
mysql-test/suite/rpl/t/rpl_row_trig003.test (+1/-1)
mysql-test/suite/rpl/t/rpl_row_trunc_temp.test (+2/-2)
mysql-test/suite/rpl/t/rpl_row_unsafe_funcs.test (+2/-2)
mysql-test/suite/rpl/t/rpl_row_until.test (+5/-4)
mysql-test/suite/rpl/t/rpl_row_utf16.test (+1/-1)
mysql-test/suite/rpl/t/rpl_row_utf32.test (+1/-1)
mysql-test/suite/rpl/t/rpl_row_view01.test (+4/-4)
mysql-test/suite/rpl/t/rpl_row_wide_table.test (+2/-2)
mysql-test/suite/rpl/t/rpl_sbm_previous_gtid_event-slave.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_sbm_previous_gtid_event.test (+111/-0)
mysql-test/suite/rpl/t/rpl_seconds_behind_master.test (+5/-5)
mysql-test/suite/rpl/t/rpl_semi_sync.test (+16/-24)
mysql-test/suite/rpl/t/rpl_semi_sync_deadlock.test (+3/-3)
mysql-test/suite/rpl/t/rpl_semi_sync_event.test (+1/-1)
mysql-test/suite/rpl/t/rpl_semi_sync_future_logpos-master.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_semi_sync_future_logpos-slave.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_semi_sync_future_logpos.test (+66/-0)
mysql-test/suite/rpl/t/rpl_semi_sync_shutdown_hang-master.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_semi_sync_shutdown_hang-slave.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_semi_sync_shutdown_hang.test (+64/-0)
mysql-test/suite/rpl/t/rpl_semi_sync_uninstall_plugin-master.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_semi_sync_uninstall_plugin-slave.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_semi_sync_uninstall_plugin.test (+145/-0)
mysql-test/suite/rpl/t/rpl_server_id2-master.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_server_id2-slave.opt (+1/-1)
mysql-test/suite/rpl/t/rpl_server_id2.test (+2/-2)
mysql-test/suite/rpl/t/rpl_server_id_ignore-master.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_server_id_ignore-slave.opt (+1/-1)
mysql-test/suite/rpl/t/rpl_server_id_ignore.test (+3/-3)
mysql-test/suite/rpl/t/rpl_server_uuid.cnf (+5/-0)
mysql-test/suite/rpl/t/rpl_server_uuid.test (+87/-8)
mysql-test/suite/rpl/t/rpl_session_var.test (+4/-4)
mysql-test/suite/rpl/t/rpl_set_charset.test (+2/-2)
mysql-test/suite/rpl/t/rpl_show_errors.test (+1/-1)
mysql-test/suite/rpl/t/rpl_show_slave_running.test (+1/-1)
mysql-test/suite/rpl/t/rpl_show_slave_status_deadlock.test (+69/-0)
mysql-test/suite/rpl/t/rpl_skip_error.test (+9/-9)
mysql-test/suite/rpl/t/rpl_skip_incident.test (+2/-2)
mysql-test/suite/rpl/t/rpl_skip_slave_err_warnings-slave.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_skip_slave_err_warnings.test (+38/-0)
mysql-test/suite/rpl/t/rpl_slave_grp_exec.test (+6/-6)
mysql-test/suite/rpl/t/rpl_slave_load_in.test (+2/-2)
mysql-test/suite/rpl/t/rpl_slave_skip.test (+8/-7)
mysql-test/suite/rpl/t/rpl_slave_status.test (+3/-3)
mysql-test/suite/rpl/t/rpl_slow_query_log.test (+7/-7)
mysql-test/suite/rpl/t/rpl_sp.test (+28/-28)
mysql-test/suite/rpl/t/rpl_sp004.test (+4/-4)
mysql-test/suite/rpl/t/rpl_sp_effects.test (+10/-10)
mysql-test/suite/rpl/t/rpl_sp_privileges.test (+134/-0)
mysql-test/suite/rpl/t/rpl_spec_variables.test (+8/-8)
mysql-test/suite/rpl/t/rpl_special_charset-master.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_special_charset-slave.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_special_charset.test (+25/-0)
mysql-test/suite/rpl/t/rpl_sporadic_master.test (+4/-3)
mysql-test/suite/rpl/t/rpl_sql_thread_killed_waiting_commit_lock-slave.opt (+1/-0)
mysql-test/suite/rpl/t/rpl_sql_thread_killed_waiting_commit_lock.test (+122/-0)
mysql-test/suite/rpl/t/rpl_ssl.test (+36/-13)
mysql-test/suite/rpl/t/rpl_ssl1.test (+5/-5)
mysql-test/suite/rpl/t/rpl_stm_000001.test (+7/-6)
mysql-test/suite/rpl/t/rpl_stm_auto_increment_bug33029.test (+4/-4)
mysql-test/suite/rpl/t/rpl_stm_found_rows.test (+3/-3)
mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test (+2/-10)
mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames.test (+1/-0)
mysql-test/suite/rpl/t/rpl_stm_loaddata_concurrent.test (+2/-0)
mysql-test/suite/rpl/t/rpl_stm_mix_show_relaylog_events.test (+2/-18)
mysql-test/suite/rpl/t/rpl_stm_mixed_mts_crash_safe.test (+1/-0)
mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test (+3/-3)
mysql-test/suite/rpl/t/rpl_stm_no_op.test (+10/-10)
mysql-test/suite/rpl/t/rpl_stm_relay_ign_space.test (+3/-3)
mysql-test/suite/rpl/t/rpl_stm_sql_mode.test (+1/-1)
mysql-test/suite/rpl/t/rpl_stm_until.test (+3/-2)
mysql-test/suite/rpl/t/rpl_stm_until_pos_middle_gtid.test (+91/-0)
mysql-test/suite/rpl/t/rpl_stm_user_variables.test (+9/-9)
mysql-test/suite/rpl/t/rpl_stop_slave.test (+29/-4)
mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test (+14/-14)
mysql-test/suite/rpl/t/rpl_sync.test (+3/-3)
mysql-test/suite/rpl/t/rpl_temp_table.test (+1/-1)
mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test (+8/-8)
mysql-test/suite/rpl/t/rpl_temporal_fractional.test (+6/-6)
mysql-test/suite/rpl/t/rpl_temporary.test (+14/-13)
mysql-test/suite/rpl/t/rpl_temporary_errors.test (+2/-2)
mysql-test/suite/rpl/t/rpl_timestamp_upgrage_55.test (+75/-0)
mysql-test/suite/rpl/t/rpl_timezone.test (+10/-10)
mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test (+11/-1)
mysql-test/suite/rpl/t/rpl_trigger.test (+13/-13)
mysql-test/suite/rpl/t/rpl_trunc_temp.test (+3/-3)
mysql-test/suite/rpl/t/rpl_typeconv.test (+2/-1)
mysql-test/suite/rpl/t/rpl_typeconv_innodb.test (+2/-2)
mysql-test/suite/rpl/t/rpl_unknown_ignorable_event.test (+69/-0)
mysql-test/suite/rpl/t/rpl_user.test (+6/-6)
mysql-test/suite/rpl/t/rpl_user_variables.test (+18/-14)
mysql-test/suite/rpl/t/rpl_variables.test (+3/-3)
mysql-test/suite/rpl/t/rpl_variables_stm.test (+3/-3)
mysql-test/suite/rpl/t/rpl_view.test (+15/-16)
mysql-test/suite/rpl/t/rpl_view_multi.test (+4/-4)
mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result (+1/-0)
mysql-test/suite/rpl_ndb/r/rpl_ndb_blob2.result (+5/-0)
mysql-test/suite/rpl_ndb/r/rpl_ndb_delete_nowhere.result (+3/-0)
mysql-test/suite/rpl_ndb/r/rpl_ndb_func003.result (+1/-0)
mysql-test/suite/rpl_ndb/r/rpl_ndb_insert_ignore.result (+2/-0)
mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update2.result (+4/-0)
mysql-test/suite/rpl_ndb/r/rpl_ndb_multi_update3.result (+4/-0)
mysql-test/suite/rpl_ndb/r/rpl_ndb_relayrotate.result (+1/-0)
mysql-test/suite/rpl_ndb/r/rpl_ndb_row_001.result (+1/-0)
mysql-test/suite/rpl_ndb/r/rpl_ndb_row_basic.result (+41/-0)
mysql-test/suite/rpl_ndb/r/rpl_ndb_sp003.result (+3/-0)
mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result (+3/-0)
mysql-test/suite/rpl_ndb/r/rpl_ndb_trig004.result (+2/-0)
mysql-test/suite/sys_vars/inc/transaction_alloc_block_size_basic.inc (+0/-234)
mysql-test/suite/sys_vars/inc/transaction_prealloc_size_basic.inc (+0/-225)
mysql-test/suite/sys_vars/r/avoid_temporal_upgrade_basic.result (+78/-0)
mysql-test/suite/sys_vars/r/binlog_error_action_basic.result (+45/-0)
mysql-test/suite/sys_vars/r/binlog_gtid_simple_recovery_basic.result (+27/-0)
mysql-test/suite/sys_vars/r/binlogging_impossible_mode_basic.result (+67/-0)
mysql-test/suite/sys_vars/r/block_encryption_mode_basic.result (+200/-0)
mysql-test/suite/sys_vars/r/debug_sync_basic.result (+3/-3)
mysql-test/suite/sys_vars/r/general_log_file_basic.result (+1/-0)
mysql-test/suite/sys_vars/r/innodb_fil_make_page_dirty_debug_basic.result (+26/-0)
mysql-test/suite/sys_vars/r/innodb_ft_result_cache_limit_basic.result (+10/-4)
mysql-test/suite/sys_vars/r/innodb_saved_page_number_debug_basic.result (+26/-0)
mysql-test/suite/sys_vars/r/innodb_thread_sleep_delay_basic.result (+30/-0)
mysql-test/suite/sys_vars/r/log_slow_admin_statements_func.result (+22/-10)
mysql-test/suite/sys_vars/r/max_digest_length_basic.result (+23/-0)
mysql-test/suite/sys_vars/r/pfs_max_digest_length_basic.result (+23/-0)
mysql-test/suite/sys_vars/r/secure_auth_func.result (+2/-0)
mysql-test/suite/sys_vars/r/show_old_temporals_basic.result (+130/-0)
mysql-test/suite/sys_vars/r/simplified_binlog_gtid_recovery_basic.result (+33/-0)
mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result (+1/-0)
mysql-test/suite/sys_vars/r/sql_log_bin_basic.result (+6/-1)
mysql-test/suite/sys_vars/r/sql_mode_basic.result (+16/-0)
mysql-test/suite/sys_vars/r/timed_mutexes_basic.result (+46/-0)
mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result (+176/-0)
mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_32.result (+0/-188)
mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_64.result (+0/-188)
mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic.result (+168/-0)
mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_32.result (+0/-172)
mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_64.result (+0/-170)
mysql-test/suite/sys_vars/t/avoid_temporal_upgrade_basic.test (+45/-0)
mysql-test/suite/sys_vars/t/binlog_error_action_basic.test (+69/-0)
mysql-test/suite/sys_vars/t/binlog_gtid_simple_recovery_basic.test (+21/-0)
mysql-test/suite/sys_vars/t/binlogging_impossible_mode_basic.test (+69/-0)
mysql-test/suite/sys_vars/t/block_encryption_mode_basic.test (+225/-0)
mysql-test/suite/sys_vars/t/disabled.def (+0/-2)
mysql-test/suite/sys_vars/t/general_log_file_basic.test (+1/-1)
mysql-test/suite/sys_vars/t/innodb_fil_make_page_dirty_debug_basic.test (+34/-0)
mysql-test/suite/sys_vars/t/innodb_ft_result_cache_limit_basic.test (+4/-1)
mysql-test/suite/sys_vars/t/innodb_saved_page_number_debug_basic.test (+35/-0)
mysql-test/suite/sys_vars/t/innodb_thread_sleep_delay_basic.test (+18/-0)
mysql-test/suite/sys_vars/t/log_slow_admin_statements_func.test (+31/-11)
mysql-test/suite/sys_vars/t/max_digest_length_basic-master.opt (+1/-0)
mysql-test/suite/sys_vars/t/max_digest_length_basic.test (+32/-0)
mysql-test/suite/sys_vars/t/pfs_digests_size_basic.test (+1/-0)
mysql-test/suite/sys_vars/t/pfs_max_digest_length_basic-master.opt (+1/-0)
mysql-test/suite/sys_vars/t/pfs_max_digest_length_basic.test (+34/-0)
mysql-test/suite/sys_vars/t/pfs_session_connect_attrs_size_basic.test (+1/-0)
mysql-test/suite/sys_vars/t/show_old_temporals_basic.test (+65/-0)
mysql-test/suite/sys_vars/t/simplified_binlog_gtid_recovery_basic.test (+21/-0)
mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test (+1/-1)
mysql-test/suite/sys_vars/t/sql_log_bin_basic.test (+5/-1)
mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic.test (+228/-0)
mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic_32.test (+0/-9)
mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic_64.test (+0/-9)
mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic.test (+218/-0)
mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic_32.test (+0/-9)
mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic_64.test (+0/-9)
mysql-test/t/alter_table.test (+452/-22)
mysql-test/t/audit_plugin.test (+1/-1)
mysql-test/t/bug17076131-master.opt (+2/-0)
mysql-test/t/bug17076131.test (+28/-0)
mysql-test/t/check_auto_permission.test (+60/-0)
mysql-test/t/count_distinct.test (+140/-0)
mysql-test/t/ctype_cp932.test (+29/-0)
mysql-test/t/ctype_uca.test (+48/-0)
mysql-test/t/derived.test (+168/-0)
mysql-test/t/dynamic_tracing.test (+152/-0)
mysql-test/t/file_contents.test (+14/-6)
mysql-test/t/func_aes.test (+225/-0)
mysql-test/t/func_aes_cfb1.test (+20/-0)
mysql-test/t/func_aes_cfb128.test (+20/-0)
mysql-test/t/func_aes_cfb8.test (+20/-0)
mysql-test/t/func_aes_misc.test (+180/-0)
mysql-test/t/func_aes_ofb.test (+20/-0)
mysql-test/t/grant.test (+3/-0)
mysql-test/t/group_min_max.test (+44/-0)
mysql-test/t/group_min_max_innodb.test (+119/-0)
mysql-test/t/having.test (+54/-0)
mysql-test/t/information_schema-big.test (+2/-0)
mysql-test/t/information_schema.test (+17/-0)
mysql-test/t/innodb_mysql_sync.test (+199/-0)
mysql-test/t/innodb_recovery_with_upper_case_names-master.opt (+1/-0)
mysql-test/t/innodb_recovery_with_upper_case_names.test (+63/-0)
mysql-test/t/loaddata.test (+21/-0)
mysql-test/t/lock_sync.test (+113/-2)
mysql-test/t/log_empty_name.opt (+2/-0)
mysql-test/t/log_empty_name.test (+7/-0)
mysql-test/t/log_errchk.test (+65/-0)
mysql-test/t/long_tmpdir-master.sh (+2/-0)
mysql-test/t/lowercase_mixed_tmpdir-master.sh (+2/-0)
mysql-test/t/lowercase_mixed_tmpdir_innodb-master.sh (+2/-0)
mysql-test/t/lowercase_table4-master.opt (+1/-1)
mysql-test/t/merge_recover-master.opt (+0/-1)
mysql-test/t/merge_recover.test (+0/-113)
mysql-test/t/myisam.test (+70/-0)
mysql-test/t/myisam_recover-master.opt (+1/-0)
mysql-test/t/myisam_recover.test (+181/-0)
mysql-test/t/mysql_upgrade.test (+53/-0)
mysql-test/t/mysqlbinlog_debug.test (+24/-0)
mysql-test/t/mysqlbinlog_mixed_or_statment.test (+44/-0)
mysql-test/t/mysqlcheck.test (+0/-3)
mysql-test/t/mysqldump.test (+39/-0)
mysql-test/t/not_embedded_server.test (+1/-0)
mysql-test/t/openssl_1.test (+3/-3)
mysql-test/t/outfile_loaddata.test (+4/-0)
mysql-test/t/parser.test (+25/-0)
mysql-test/t/partition_archive.test (+17/-0)
mysql-test/t/partition_index_innodb.test (+146/-0)
mysql-test/t/partition_index_myisam.test (+113/-0)
mysql-test/t/partition_innodb.test (+228/-26)
mysql-test/t/partition_pruning.test (+48/-0)
mysql-test/t/plugin.test (+117/-0)
mysql-test/t/plugin_auth.test (+34/-0)
mysql-test/t/query_cache.test (+53/-2)
mysql-test/t/rewrite_general_log.test (+27/-1)
mysql-test/t/show_processlist.test (+62/-0)
mysql-test/t/sp-threads.test (+1/-0)
mysql-test/t/sp.test (+118/-0)
mysql-test/t/sp_validation.test (+0/-1)
mysql-test/t/status_debug.test (+45/-0)
mysql-test/t/temp_pool-master.opt (+1/-0)
mysql-test/t/temp_pool.test (+33/-0)
mysql-test/t/temporal_literal.test (+28/-0)
mysql-test/t/trigger-trans.test (+54/-0)
mysql-test/t/trigger.test (+30/-0)
mysql-test/t/type_temporal_fractional.test (+147/-0)
mysql-test/t/union.test (+30/-0)
mysql-test/t/validate_password_plugin.test (+93/-29)
mysql-test/t/variables-big.test (+7/-3)
mysql-test/t/view.test (+315/-0)
mysql-test/t/windows.test (+16/-0)
mysql-test/t/wl6443_deprecation.test (+1/-0)
mysql-test/valgrind.supp (+29/-195)
mysys/CMakeLists.txt (+5/-3)
mysys/base64.c (+39/-20)
mysys/lf_hash.c (+185/-1)
mysys/mf_arr_appstr.c (+1/-0)
mysys/mf_iocache2.c (+7/-0)
mysys/mf_qsort2.c (+1/-0)
mysys/mf_same.c (+1/-0)
mysys/mf_soundex.c (+1/-0)
mysys/mf_wcomp.c (+1/-0)
mysys/mulalloc.c (+1/-0)
mysys/my_alarm.c (+1/-0)
mysys/my_crc32.c (+1/-0)
mysys/my_div.c (+1/-0)
mysys/my_fopen.c (+3/-0)
mysys/my_fstream.c (+2/-1)
mysys/my_getpagesize.c (+1/-0)
mysys/my_handler_errors.h (+2/-1)
mysys/my_isnan.c (+0/-27)
mysys/my_libwrap.c (+1/-0)
mysys/my_memmem.c (+1/-0)
mysys/my_pread.c (+52/-25)
mysys/my_pthread.c (+0/-2)
mysys/my_redel.c (+3/-11)
mysys/my_sync.c (+8/-4)
mysys/my_thr_init.c (+4/-63)
mysys/my_wincond.c (+1/-23)
mysys/my_write.c (+58/-39)
mysys/psi_noop.c (+6/-7)
mysys/ptr_cmp.c (+14/-1)
mysys/test_dir.c (+1/-0)
mysys/test_xml.c (+1/-0)
mysys/thr_alarm.c (+2/-27)
mysys/thr_lock.c (+1/-13)
mysys/waiting_threads.c (+5/-2)
mysys_ssl/CMakeLists.txt (+13/-2)
mysys_ssl/my_aes.cc (+31/-272)
mysys_ssl/my_aes_impl.h (+31/-0)
mysys_ssl/my_aes_openssl.cc (+213/-0)
mysys_ssl/my_aes_yassl.cc (+240/-0)
mysys_ssl/my_default.cc (+6/-7)
mysys_ssl/my_getopt.cc (+43/-4)
mysys_ssl/my_rnd.cc (+39/-23)
packaging/WiX/CPackWixConfig.cmake (+6/-6)
packaging/WiX/custom_ui.wxs (+2/-2)
packaging/deb-jessie/changelog (+95/-0)
packaging/deb-jessie/compat (+1/-0)
packaging/deb-jessie/control (+188/-0)
packaging/deb-jessie/copyright (+41/-0)
packaging/deb-jessie/extra/my.cnf (+57/-0)
packaging/deb-jessie/extra/mysql-systemd-start (+82/-0)
packaging/deb-jessie/extra/mysql_embedded.1 (+1/-0)
packaging/deb-jessie/libmysqlclient-dev.dirs (+17/-0)
packaging/deb-jessie/libmysqlclient-dev.install (+29/-0)
packaging/deb-jessie/libmysqlclient-dev.lintian-overrides (+21/-0)
packaging/deb-jessie/libmysqlclient18.install (+19/-0)
packaging/deb-jessie/libmysqlclient18.lintian-overrides (+21/-0)
packaging/deb-jessie/libmysqld-dev.install (+20/-0)
packaging/deb-jessie/libmysqld-dev.lintian-overrides (+19/-0)
packaging/deb-jessie/mysql-client.install (+18/-0)
packaging/deb-jessie/mysql-client.lintian-overrides (+19/-0)
packaging/deb-jessie/mysql-common.dirs (+16/-0)
packaging/deb-jessie/mysql-common.install (+30/-0)
packaging/deb-jessie/mysql-common.lintian-overrides (+19/-0)
packaging/deb-jessie/mysql-community-bench.dirs (+17/-0)
packaging/deb-jessie/mysql-community-bench.install (+19/-0)
packaging/deb-jessie/mysql-community-bench.lintian-overrides (+19/-0)
packaging/deb-jessie/mysql-community-client.install (+60/-0)
packaging/deb-jessie/mysql-community-client.lintian-overrides (+21/-0)
packaging/deb-jessie/mysql-community-server.config (+88/-0)
packaging/deb-jessie/mysql-community-server.dirs (+19/-0)
packaging/deb-jessie/mysql-community-server.install (+85/-0)
packaging/deb-jessie/mysql-community-server.lintian-overrides (+23/-0)
packaging/deb-jessie/mysql-community-server.mysql.init (+172/-0)
packaging/deb-jessie/mysql-community-server.mysql.service (+33/-0)
packaging/deb-jessie/mysql-community-server.postinst (+93/-0)
packaging/deb-jessie/mysql-community-server.postrm (+154/-0)
packaging/deb-jessie/mysql-community-server.preinst (+123/-0)
packaging/deb-jessie/mysql-community-server.prerm (+24/-0)
packaging/deb-jessie/mysql-community-server.templates (+33/-0)
packaging/deb-jessie/mysql-community-source.install (+20/-0)
packaging/deb-jessie/mysql-community-source.lintian-overrides (+19/-0)
packaging/deb-jessie/mysql-community-test.dirs (+16/-0)
packaging/deb-jessie/mysql-community-test.install (+20/-0)
packaging/deb-jessie/mysql-community-test.links (+17/-0)
packaging/deb-jessie/mysql-community-test.lintian-overrides (+19/-0)
packaging/deb-jessie/mysql-server.install (+18/-0)
packaging/deb-jessie/mysql-server.lintian-overrides (+19/-0)
packaging/deb-jessie/mysql-testsuite.install (+18/-0)
packaging/deb-jessie/mysql-testsuite.lintian-overrides (+19/-0)
packaging/deb-jessie/patches/fix-man-page-links.patch (+14/-0)
packaging/deb-jessie/patches/fix-mtr-search-paths.patch (+13/-0)
packaging/deb-jessie/patches/fix-mysql_install_db.patch (+43/-0)
packaging/deb-jessie/patches/series (+18/-0)
packaging/deb-jessie/rules (+136/-0)
packaging/deb-jessie/source/format (+1/-0)
packaging/deb-jessie/source/include-binaries (+33/-0)
packaging/deb-jessie/source/lintian-overrides (+18/-0)
packaging/deb-jessie/watch (+2/-0)
packaging/deb-precise/changelog (+86/-0)
packaging/deb-precise/compat (+1/-0)
packaging/deb-precise/control (+188/-0)
packaging/deb-precise/copyright (+41/-0)
packaging/deb-precise/extra/apparmor-profile (+49/-0)
packaging/deb-precise/extra/my.cnf (+57/-0)
packaging/deb-precise/extra/mysql_embedded.1 (+1/-0)
packaging/deb-precise/libmysqlclient-dev.dirs (+17/-0)
packaging/deb-precise/libmysqlclient-dev.install (+29/-0)
packaging/deb-precise/libmysqlclient-dev.lintian-overrides (+21/-0)
packaging/deb-precise/libmysqlclient18.install (+19/-0)
packaging/deb-precise/libmysqlclient18.lintian-overrides (+21/-0)
packaging/deb-precise/libmysqld-dev.install (+20/-0)
packaging/deb-precise/libmysqld-dev.lintian-overrides (+19/-0)
packaging/deb-precise/mysql-client.install (+18/-0)
packaging/deb-precise/mysql-client.lintian-overrides (+19/-0)
packaging/deb-precise/mysql-common.dirs (+16/-0)
packaging/deb-precise/mysql-common.install (+30/-0)
packaging/deb-precise/mysql-common.lintian-overrides (+19/-0)
packaging/deb-precise/mysql-community-bench.dirs (+17/-0)
packaging/deb-precise/mysql-community-bench.install (+19/-0)
packaging/deb-precise/mysql-community-bench.lintian-overrides (+19/-0)
packaging/deb-precise/mysql-community-client.install (+60/-0)
packaging/deb-precise/mysql-community-client.lintian-overrides (+21/-0)
packaging/deb-precise/mysql-community-server.config (+88/-0)
packaging/deb-precise/mysql-community-server.dirs (+19/-0)
packaging/deb-precise/mysql-community-server.install (+86/-0)
packaging/deb-precise/mysql-community-server.lintian-overrides (+23/-0)
packaging/deb-precise/mysql-community-server.mysql.init (+174/-0)
packaging/deb-precise/mysql-community-server.postinst (+93/-0)
packaging/deb-precise/mysql-community-server.postrm (+154/-0)
packaging/deb-precise/mysql-community-server.preinst (+123/-0)
packaging/deb-precise/mysql-community-server.prerm (+24/-0)
packaging/deb-precise/mysql-community-server.templates (+33/-0)
packaging/deb-precise/mysql-community-source.install (+20/-0)
packaging/deb-precise/mysql-community-source.lintian-overrides (+19/-0)
packaging/deb-precise/mysql-community-test.dirs (+16/-0)
packaging/deb-precise/mysql-community-test.install (+20/-0)
packaging/deb-precise/mysql-community-test.links (+17/-0)
packaging/deb-precise/mysql-community-test.lintian-overrides (+19/-0)
packaging/deb-precise/mysql-server.install (+18/-0)
packaging/deb-precise/mysql-server.lintian-overrides (+19/-0)
packaging/deb-precise/mysql-testsuite.install (+18/-0)
packaging/deb-precise/mysql-testsuite.lintian-overrides (+19/-0)
packaging/deb-precise/patches/fix-man-page-links.patch (+14/-0)
packaging/deb-precise/patches/fix-mtr-search-paths.patch (+13/-0)
packaging/deb-precise/patches/fix-mysql_install_db.patch (+43/-0)
packaging/deb-precise/patches/series (+18/-0)
packaging/deb-precise/rules (+135/-0)
packaging/deb-precise/source/format (+1/-0)
packaging/deb-precise/source/include-binaries (+33/-0)
packaging/deb-precise/watch (+2/-0)
packaging/deb-trusty/changelog (+93/-0)
packaging/deb-trusty/compat (+1/-0)
packaging/deb-trusty/control (+189/-0)
packaging/deb-trusty/copyright (+41/-0)
packaging/deb-trusty/extra/apparmor-profile (+49/-0)
packaging/deb-trusty/extra/my.cnf (+57/-0)
packaging/deb-trusty/extra/mysql_embedded.1 (+1/-0)
packaging/deb-trusty/libmysqlclient-dev.install (+29/-0)
packaging/deb-trusty/libmysqlclient-dev.lintian-overrides (+21/-0)
packaging/deb-trusty/libmysqlclient18.install (+19/-0)
packaging/deb-trusty/libmysqlclient18.lintian-overrides (+21/-0)
packaging/deb-trusty/libmysqld-dev.install (+20/-0)
packaging/deb-trusty/libmysqld-dev.lintian-overrides (+19/-0)
packaging/deb-trusty/mysql-client.install (+18/-0)
packaging/deb-trusty/mysql-client.lintian-overrides (+19/-0)
packaging/deb-trusty/mysql-common.dirs (+16/-0)
packaging/deb-trusty/mysql-common.install (+30/-0)
packaging/deb-trusty/mysql-common.lintian-overrides (+19/-0)
packaging/deb-trusty/mysql-community-bench.install (+19/-0)
packaging/deb-trusty/mysql-community-bench.lintian-overrides (+19/-0)
packaging/deb-trusty/mysql-community-client.install (+60/-0)
packaging/deb-trusty/mysql-community-client.lintian-overrides (+21/-0)
packaging/deb-trusty/mysql-community-server.config (+88/-0)
packaging/deb-trusty/mysql-community-server.dirs (+19/-0)
packaging/deb-trusty/mysql-community-server.install (+86/-0)
packaging/deb-trusty/mysql-community-server.lintian-overrides (+23/-0)
packaging/deb-trusty/mysql-community-server.mysql.init (+174/-0)
packaging/deb-trusty/mysql-community-server.postinst (+93/-0)
packaging/deb-trusty/mysql-community-server.postrm (+154/-0)
packaging/deb-trusty/mysql-community-server.preinst (+123/-0)
packaging/deb-trusty/mysql-community-server.prerm (+24/-0)
packaging/deb-trusty/mysql-community-server.templates (+33/-0)
packaging/deb-trusty/mysql-community-source.install (+20/-0)
packaging/deb-trusty/mysql-community-source.lintian-overrides (+19/-0)
packaging/deb-trusty/mysql-community-test.install (+20/-0)
packaging/deb-trusty/mysql-community-test.links (+17/-0)
packaging/deb-trusty/mysql-community-test.lintian-overrides (+19/-0)
packaging/deb-trusty/mysql-server.install (+18/-0)
packaging/deb-trusty/mysql-server.lintian-overrides (+19/-0)
packaging/deb-trusty/mysql-testsuite.install (+18/-0)
packaging/deb-trusty/mysql-testsuite.lintian-overrides (+19/-0)
packaging/deb-trusty/patches/fix-man-page-links.patch (+14/-0)
packaging/deb-trusty/patches/fix-mtr-search-paths.patch (+13/-0)
packaging/deb-trusty/patches/fix-mysql_install_db.patch (+43/-0)
packaging/deb-trusty/patches/series (+18/-0)
packaging/deb-trusty/rules (+135/-0)
packaging/deb-trusty/source/format (+1/-0)
packaging/deb-trusty/source/include-binaries (+33/-0)
packaging/deb-trusty/watch (+2/-0)
packaging/deb-utopic/changelog (+96/-0)
packaging/deb-utopic/compat (+1/-0)
packaging/deb-utopic/control (+190/-0)
packaging/deb-utopic/copyright (+41/-0)
packaging/deb-utopic/extra/apparmor-profile (+49/-0)
packaging/deb-utopic/extra/my.cnf (+57/-0)
packaging/deb-utopic/extra/mysql_embedded.1 (+1/-0)
packaging/deb-utopic/libmysqlclient-dev.install (+29/-0)
packaging/deb-utopic/libmysqlclient-dev.lintian-overrides (+21/-0)
packaging/deb-utopic/libmysqlclient18.install (+19/-0)
packaging/deb-utopic/libmysqlclient18.lintian-overrides (+21/-0)
packaging/deb-utopic/libmysqld-dev.install (+20/-0)
packaging/deb-utopic/libmysqld-dev.lintian-overrides (+19/-0)
packaging/deb-utopic/mysql-client.install (+18/-0)
packaging/deb-utopic/mysql-client.lintian-overrides (+19/-0)
packaging/deb-utopic/mysql-common.dirs (+16/-0)
packaging/deb-utopic/mysql-common.install (+30/-0)
packaging/deb-utopic/mysql-common.lintian-overrides (+19/-0)
packaging/deb-utopic/mysql-community-bench.install (+19/-0)
packaging/deb-utopic/mysql-community-bench.lintian-overrides (+19/-0)
packaging/deb-utopic/mysql-community-client.install (+60/-0)
packaging/deb-utopic/mysql-community-client.lintian-overrides (+21/-0)
packaging/deb-utopic/mysql-community-server.config (+88/-0)
packaging/deb-utopic/mysql-community-server.dirs (+19/-0)
packaging/deb-utopic/mysql-community-server.install (+86/-0)
packaging/deb-utopic/mysql-community-server.lintian-overrides (+23/-0)
packaging/deb-utopic/mysql-community-server.mysql.init (+174/-0)
packaging/deb-utopic/mysql-community-server.postinst (+93/-0)
packaging/deb-utopic/mysql-community-server.postrm (+154/-0)
packaging/deb-utopic/mysql-community-server.preinst (+123/-0)
packaging/deb-utopic/mysql-community-server.prerm (+24/-0)
packaging/deb-utopic/mysql-community-server.templates (+33/-0)
packaging/deb-utopic/mysql-community-source.install (+21/-0)
packaging/deb-utopic/mysql-community-source.lintian-overrides (+19/-0)
packaging/deb-utopic/mysql-community-test.install (+20/-0)
packaging/deb-utopic/mysql-community-test.links (+17/-0)
packaging/deb-utopic/mysql-community-test.lintian-overrides (+19/-0)
packaging/deb-utopic/mysql-server.install (+18/-0)
packaging/deb-utopic/mysql-server.lintian-overrides (+19/-0)
packaging/deb-utopic/mysql-testsuite.install (+18/-0)
packaging/deb-utopic/mysql-testsuite.lintian-overrides (+19/-0)
packaging/deb-utopic/patches/fix-man-page-links.patch (+14/-0)
packaging/deb-utopic/patches/fix-mtr-search-paths.patch (+13/-0)
packaging/deb-utopic/patches/fix-mysql_install_db.patch (+43/-0)
packaging/deb-utopic/patches/series (+18/-0)
packaging/deb-utopic/rules (+135/-0)
packaging/deb-utopic/source/format (+1/-0)
packaging/deb-utopic/source/include-binaries (+33/-0)
packaging/deb-utopic/watch (+2/-0)
packaging/deb-vivid/changelog (+131/-0)
packaging/deb-vivid/compat (+1/-0)
packaging/deb-vivid/control (+192/-0)
packaging/deb-vivid/copyright (+41/-0)
packaging/deb-vivid/extra/apparmor-profile (+47/-0)
packaging/deb-vivid/extra/my.cnf.fallback (+25/-0)
packaging/deb-vivid/extra/mysql-systemd-start (+84/-0)
packaging/deb-vivid/extra/mysql.cnf (+26/-0)
packaging/deb-vivid/extra/mysql.conf.cnf (+22/-0)
packaging/deb-vivid/extra/mysql_embedded.1 (+1/-0)
packaging/deb-vivid/extra/mysqld.cnf (+48/-0)
packaging/deb-vivid/libmysqlclient-dev.install (+29/-0)
packaging/deb-vivid/libmysqlclient-dev.lintian-overrides (+21/-0)
packaging/deb-vivid/libmysqlclient18.install (+19/-0)
packaging/deb-vivid/libmysqlclient18.lintian-overrides (+21/-0)
packaging/deb-vivid/libmysqld-dev.install (+20/-0)
packaging/deb-vivid/libmysqld-dev.lintian-overrides (+19/-0)
packaging/deb-vivid/mysql-client.install (+18/-0)
packaging/deb-vivid/mysql-client.lintian-overrides (+19/-0)
packaging/deb-vivid/mysql-common.dirs (+16/-0)
packaging/deb-vivid/mysql-common.install (+33/-0)
packaging/deb-vivid/mysql-common.lintian-overrides (+19/-0)
packaging/deb-vivid/mysql-common.postinst (+25/-0)
packaging/deb-vivid/mysql-common.postrm (+25/-0)
packaging/deb-vivid/mysql-community-bench.install (+19/-0)
packaging/deb-vivid/mysql-community-bench.lintian-overrides (+19/-0)
packaging/deb-vivid/mysql-community-client.install (+56/-0)
packaging/deb-vivid/mysql-community-client.lintian-overrides (+21/-0)
packaging/deb-vivid/mysql-community-server.config (+88/-0)
packaging/deb-vivid/mysql-community-server.dirs (+19/-0)
packaging/deb-vivid/mysql-community-server.install (+94/-0)
packaging/deb-vivid/mysql-community-server.lintian-overrides (+23/-0)
packaging/deb-vivid/mysql-community-server.mysql.init (+174/-0)
packaging/deb-vivid/mysql-community-server.mysql.service (+33/-0)
packaging/deb-vivid/mysql-community-server.postinst (+95/-0)
packaging/deb-vivid/mysql-community-server.postrm (+155/-0)
packaging/deb-vivid/mysql-community-server.preinst (+123/-0)
packaging/deb-vivid/mysql-community-server.prerm (+24/-0)
packaging/deb-vivid/mysql-community-server.templates (+33/-0)
packaging/deb-vivid/mysql-community-source.install (+21/-0)
packaging/deb-vivid/mysql-community-source.lintian-overrides (+19/-0)
packaging/deb-vivid/mysql-community-test.install (+20/-0)
packaging/deb-vivid/mysql-community-test.links (+17/-0)
packaging/deb-vivid/mysql-community-test.lintian-overrides (+19/-0)
packaging/deb-vivid/mysql-server.install (+18/-0)
packaging/deb-vivid/mysql-server.lintian-overrides (+19/-0)
packaging/deb-vivid/mysql-testsuite.install (+18/-0)
packaging/deb-vivid/mysql-testsuite.lintian-overrides (+19/-0)
packaging/deb-vivid/patches/fix-man-page-links.patch (+14/-0)
packaging/deb-vivid/patches/fix-mtr-search-paths.patch (+13/-0)
packaging/deb-vivid/patches/fix-mysql_install_db.patch (+43/-0)
packaging/deb-vivid/patches/series (+18/-0)
packaging/deb-vivid/rules (+137/-0)
packaging/deb-vivid/source/format (+1/-0)
packaging/deb-vivid/source/include-binaries (+33/-0)
packaging/deb-vivid/watch (+2/-0)
packaging/deb-wheezy/changelog (+82/-0)
packaging/deb-wheezy/compat (+1/-0)
packaging/deb-wheezy/control (+188/-0)
packaging/deb-wheezy/copyright (+41/-0)
packaging/deb-wheezy/extra/my.cnf (+57/-0)
packaging/deb-wheezy/extra/mysql_embedded.1 (+1/-0)
packaging/deb-wheezy/libmysqlclient-dev.dirs (+17/-0)
packaging/deb-wheezy/libmysqlclient-dev.install (+29/-0)
packaging/deb-wheezy/libmysqlclient-dev.lintian-overrides (+21/-0)
packaging/deb-wheezy/libmysqlclient18.install (+19/-0)
packaging/deb-wheezy/libmysqlclient18.lintian-overrides (+21/-0)
packaging/deb-wheezy/libmysqld-dev.install (+20/-0)
packaging/deb-wheezy/libmysqld-dev.lintian-overrides (+19/-0)
packaging/deb-wheezy/mysql-client.install (+18/-0)
packaging/deb-wheezy/mysql-client.lintian-overrides (+19/-0)
packaging/deb-wheezy/mysql-common.dirs (+16/-0)
packaging/deb-wheezy/mysql-common.install (+30/-0)
packaging/deb-wheezy/mysql-common.lintian-overrides (+19/-0)
packaging/deb-wheezy/mysql-community-bench.dirs (+17/-0)
packaging/deb-wheezy/mysql-community-bench.install (+19/-0)
packaging/deb-wheezy/mysql-community-bench.lintian-overrides (+19/-0)
packaging/deb-wheezy/mysql-community-client.install (+60/-0)
packaging/deb-wheezy/mysql-community-client.lintian-overrides (+21/-0)
packaging/deb-wheezy/mysql-community-server.config (+88/-0)
packaging/deb-wheezy/mysql-community-server.dirs (+19/-0)
packaging/deb-wheezy/mysql-community-server.install (+84/-0)
packaging/deb-wheezy/mysql-community-server.lintian-overrides (+23/-0)
packaging/deb-wheezy/mysql-community-server.mysql.init (+172/-0)
packaging/deb-wheezy/mysql-community-server.postinst (+93/-0)
packaging/deb-wheezy/mysql-community-server.postrm (+154/-0)
packaging/deb-wheezy/mysql-community-server.preinst (+123/-0)
packaging/deb-wheezy/mysql-community-server.prerm (+24/-0)
packaging/deb-wheezy/mysql-community-server.templates (+33/-0)
packaging/deb-wheezy/mysql-community-source.install (+20/-0)
packaging/deb-wheezy/mysql-community-source.lintian-overrides (+19/-0)
packaging/deb-wheezy/mysql-community-test.dirs (+16/-0)
packaging/deb-wheezy/mysql-community-test.install (+20/-0)
packaging/deb-wheezy/mysql-community-test.links (+17/-0)
packaging/deb-wheezy/mysql-community-test.lintian-overrides (+19/-0)
packaging/deb-wheezy/mysql-server.install (+18/-0)
packaging/deb-wheezy/mysql-server.lintian-overrides (+19/-0)
packaging/deb-wheezy/mysql-testsuite.install (+18/-0)
packaging/deb-wheezy/mysql-testsuite.lintian-overrides (+19/-0)
packaging/deb-wheezy/patches/fix-man-page-links.patch (+14/-0)
packaging/deb-wheezy/patches/fix-mtr-search-paths.patch (+13/-0)
packaging/deb-wheezy/patches/fix-mysql_install_db.patch (+43/-0)
packaging/deb-wheezy/patches/series (+18/-0)
packaging/deb-wheezy/rules (+132/-0)
packaging/deb-wheezy/source/format (+1/-0)
packaging/deb-wheezy/source/include-binaries (+33/-0)
packaging/deb-wheezy/source/lintian-overrides (+18/-0)
packaging/deb-wheezy/watch (+2/-0)
packaging/rpm-docker/CMakeLists.txt (+29/-0)
packaging/rpm-docker/my.cnf (+30/-0)
packaging/rpm-docker/mysql.spec.in (+1170/-0)
packaging/rpm-fedora/CMakeLists.txt (+1/-2)
packaging/rpm-fedora/mysql-5.6-libmysqlclient-symbols.patch (+65/-143)
packaging/rpm-fedora/mysql-5.6.14-mysql-install.patch (+0/-204)
packaging/rpm-fedora/mysql-5.6.16-mysql-install.patch (+39/-0)
packaging/rpm-fedora/mysql-embedded-check.c (+0/-26)
packaging/rpm-fedora/mysql-systemd-start (+19/-3)
packaging/rpm-fedora/mysql.spec.in (+168/-156)
packaging/rpm-oel/CMakeLists.txt (+2/-2)
packaging/rpm-oel/filter-requires.sh (+1/-1)
packaging/rpm-oel/mysql-5.6-libmysqlclient-symbols.patch (+960/-0)
packaging/rpm-oel/mysql-5.6.14-mysql-install.patch (+0/-204)
packaging/rpm-oel/mysql-5.6.16-mysql-install.patch (+39/-0)
packaging/rpm-oel/mysql-embedded-check.c (+0/-26)
packaging/rpm-oel/mysql-systemd-start (+19/-3)
packaging/rpm-oel/mysql.init (+6/-2)
packaging/rpm-oel/mysql.spec.in (+276/-66)
packaging/rpm-sles/CMakeLists.txt (+28/-0)
packaging/rpm-sles/filter-provides.sh (+6/-0)
packaging/rpm-sles/filter-requires.sh (+6/-0)
packaging/rpm-sles/my.cnf (+31/-0)
packaging/rpm-sles/my_config.h (+30/-0)
packaging/rpm-sles/mysql-systemd-start (+53/-0)
packaging/rpm-sles/mysql.conf (+1/-0)
packaging/rpm-sles/mysql.init (+252/-0)
packaging/rpm-sles/mysql.spec.in (+1685/-0)
packaging/rpm-sles/mysqld.service (+48/-0)
packaging/rpm-uln/CMakeLists.txt (+0/-38)
packaging/rpm-uln/README-ULN (+0/-15)
packaging/rpm-uln/README.mysql-docs (+0/-4)
packaging/rpm-uln/filter-requires-mysql.sh (+0/-3)
packaging/rpm-uln/generate-tarball.sh (+0/-15)
packaging/rpm-uln/my.cnf (+0/-10)
packaging/rpm-uln/my_config.h (+0/-29)
packaging/rpm-uln/mysql-5.5-fix-tests.patch (+0/-34)
packaging/rpm-uln/mysql-5.5-libdir.patch (+0/-28)
packaging/rpm-uln/mysql-5.5-mtr1.patch (+0/-25)
packaging/rpm-uln/mysql-5.5-testing.patch (+0/-23)
packaging/rpm-uln/mysql-chain-certs.patch (+0/-45)
packaging/rpm-uln/mysql-embedded-check.c (+0/-26)
packaging/rpm-uln/mysql-expired-certs.patch (+0/-555)
packaging/rpm-uln/mysql-install-test.patch (+0/-33)
packaging/rpm-uln/mysql-strmov.patch (+0/-32)
packaging/rpm-uln/mysql.init (+0/-209)
packaging/rpm-uln/mysql.spec.sh (+0/-2002)
packaging/rpm-uln/scriptstub.c (+0/-32)
packaging/solaris/CMakeLists.txt (+5/-1)
plugin/auth/CMakeLists.txt (+7/-2)
plugin/auth/mysql_no_login.c (+64/-0)
plugin/innodb_memcached/CMakeLists.txt (+4/-2)
plugin/innodb_memcached/daemon_memcached/CMakeLists.txt (+2/-2)
plugin/innodb_memcached/daemon_memcached/daemon/memcached.c (+24/-1)
plugin/innodb_memcached/daemon_memcached/daemon/memcached_mysql.cc (+14/-1)
plugin/innodb_memcached/daemon_memcached/daemon/memcached_mysql.h (+3/-1)
plugin/innodb_memcached/daemon_memcached/include/memcached/protocol_binary.h (+1/-0)
plugin/innodb_memcached/daemon_memcached/utilities/util.c (+9/-0)
plugin/innodb_memcached/innodb_memcache/CMakeLists.txt (+2/-2)
plugin/innodb_memcached/innodb_memcache/cache-src/default_engine.c (+7/-1)
plugin/innodb_memcached/innodb_memcache/include/handler_api.h (+10/-1)
plugin/innodb_memcached/innodb_memcache/include/innodb_api.h (+4/-1)
plugin/innodb_memcached/innodb_memcache/include/innodb_cb_api.h (+9/-1)
plugin/innodb_memcached/innodb_memcache/include/innodb_engine.h (+7/-1)
plugin/innodb_memcached/innodb_memcache/src/handler_api.cc (+21/-1)
plugin/innodb_memcached/innodb_memcache/src/innodb_api.c (+91/-53)
plugin/innodb_memcached/innodb_memcache/src/innodb_engine.c (+289/-61)
plugin/innodb_memcached/innodb_memcache/src/innodb_engine_private.h (+8/-1)
plugin/password_validation/validate_password.cc (+145/-32)
plugin/semisync/semisync.cc (+1/-0)
plugin/semisync/semisync.h (+1/-0)
plugin/semisync/semisync_master.cc (+138/-74)
plugin/semisync/semisync_master.h (+29/-10)
plugin/semisync/semisync_master_plugin.cc (+6/-1)
plugin/semisync/semisync_slave_plugin.cc (+1/-0)
regex/regcomp.c (+23/-1)
scripts/CMakeLists.txt (+32/-13)
scripts/fill_help_tables.sql (+2468/-2165)
scripts/msql2mysql.sh (+3/-1)
scripts/mysql_config.pl.in (+2/-2)
scripts/mysql_config.sh (+8/-7)
scripts/mysql_convert_table_format.sh (+3/-1)
scripts/mysql_find_rows.sh (+3/-1)
scripts/mysql_fix_extensions.sh (+2/-1)
scripts/mysql_install_db.pl.in (+97/-46)
scripts/mysql_install_db.sh (+2/-2)
scripts/mysql_setpermission.sh (+6/-4)
scripts/mysql_system_tables.sql (+2/-2)
scripts/mysql_system_tables_data.sql (+5/-5)
scripts/mysql_system_tables_fix.sql (+22/-3)
scripts/mysql_test_data_timezone.sql (+1/-0)
scripts/mysql_zap.sh (+3/-1)
scripts/mysqlaccess.sh (+4/-2)
scripts/mysqlbug.sh (+3/-1)
scripts/mysqld_safe.sh (+1/-1)
scripts/mysqld_safe.sh.orig (+864/-0)
scripts/mysqlhotcopy.sh (+2/-0)
sql-bench/graph-compare-results.sh (+2/-0)
sql-bench/innotest1.sh (+140/-140)
sql-bench/innotest1a.sh (+106/-106)
sql-bench/innotest1b.sh (+99/-99)
sql-bench/innotest2.sh (+148/-148)
sql-bench/innotest2a.sh (+92/-92)
sql-bench/innotest2b.sh (+102/-102)
sql-common/client.c (+48/-16)
sql-common/client_authentication.cc (+6/-1)
sql-common/my_time.c (+11/-1)
sql-common/pack.c (+1/-0)
sql/CMakeLists.txt (+31/-7)
sql/binlog.cc (+286/-80)
sql/binlog.h (+7/-3)
sql/debug_sync.cc (+148/-64)
sql/event_data_objects.cc (+5/-1)
sql/event_scheduler.cc (+8/-3)
sql/field.cc (+6/-9)
sql/field.h (+1/-1)
sql/filesort.cc (+33/-13)
sql/gcalc_tools.cc (+2/-2)
sql/gen_lex_token.cc (+359/-0)
sql/global_threads.h (+24/-8)
sql/ha_ndbcluster.cc (+2/-2)
sql/ha_ndbcluster_binlog.cc (+3/-2)
sql/ha_partition.cc (+233/-20)
sql/ha_partition.h (+13/-7)
sql/handler.cc (+11/-3)
sql/handler.h (+10/-3)
sql/hostname.cc (+2/-2)
sql/item.cc (+52/-8)
sql/item.h (+23/-3)
sql/item_create.cc (+94/-19)
sql/item_func.cc (+74/-15)
sql/item_func.h (+2/-2)
sql/item_row.cc (+25/-1)
sql/item_row.h (+1/-0)
sql/item_strfunc.cc (+287/-81)
sql/item_strfunc.h (+20/-0)
sql/item_subselect.cc (+11/-10)
sql/item_sum.cc (+66/-15)
sql/item_sum.h (+20/-10)
sql/item_timefunc.h (+3/-0)
sql/key.cc (+83/-1)
sql/key.h (+4/-1)
sql/lock.cc (+10/-3)
sql/log.cc (+58/-22)
sql/log.h (+3/-2)
sql/log_event.cc (+522/-196)
sql/log_event.h (+145/-38)
sql/log_event_old.cc (+4/-3)
sql/mdl.cc (+3/-3)
sql/mysqld.cc (+82/-41)
sql/mysqld.h (+22/-4)
sql/opt_range.cc (+165/-61)
sql/parse_file.h (+1/-1)
sql/partition_info.cc (+14/-3)
sql/partition_info.h (+2/-1)
sql/records.cc (+16/-3)
sql/replication.h (+18/-23)
sql/rpl_constants.h (+2/-0)
sql/rpl_gtid.h (+27/-1)
sql/rpl_gtid_execution.cc (+7/-1)
sql/rpl_gtid_set.cc (+45/-1)
sql/rpl_handler.cc (+12/-2)
sql/rpl_handler.h (+3/-2)
sql/rpl_info_factory.cc (+2/-1)
sql/rpl_info_table_access.cc (+7/-8)
sql/rpl_info_table_access.h (+3/-3)
sql/rpl_master.cc (+281/-64)
sql/rpl_master.h (+2/-2)
sql/rpl_reporting.cc (+3/-3)
sql/rpl_rli.cc (+9/-5)
sql/rpl_rli.h (+21/-12)
sql/rpl_rli_pdb.cc (+155/-23)
sql/rpl_rli_pdb.h (+38/-2)
sql/rpl_slave.cc (+524/-191)
sql/rpl_utility.cc (+62/-7)
sql/rpl_utility.h (+1/-1)
sql/scheduler.cc (+2/-5)
sql/share/charsets/Index.xml (+1/-0)
sql/share/charsets/armscii8.xml (+1/-0)
sql/share/charsets/ascii.xml (+1/-0)
sql/share/charsets/cp1250.xml (+1/-0)
sql/share/charsets/cp1256.xml (+1/-0)
sql/share/charsets/cp1257.xml (+1/-0)
sql/share/charsets/cp850.xml (+1/-0)
sql/share/charsets/cp852.xml (+1/-0)
sql/share/charsets/cp866.xml (+1/-0)
sql/share/charsets/dec8.xml (+1/-0)
sql/share/charsets/geostd8.xml (+1/-0)
sql/share/charsets/greek.xml (+1/-0)
sql/share/charsets/hebrew.xml (+1/-0)
sql/share/charsets/hp8.xml (+1/-0)
sql/share/charsets/keybcs2.xml (+1/-0)
sql/share/charsets/koi8r.xml (+1/-0)
sql/share/charsets/koi8u.xml (+1/-0)
sql/share/charsets/languages.html (+1/-0)
sql/share/charsets/latin1.xml (+1/-0)
sql/share/charsets/latin2.xml (+1/-0)
sql/share/charsets/latin5.xml (+1/-0)
sql/share/charsets/latin7.xml (+1/-0)
sql/share/charsets/macce.xml (+1/-0)
sql/share/charsets/macroman.xml (+1/-0)
sql/share/charsets/swe7.xml (+1/-0)
sql/share/errmsg-utf8.txt (+13/-0)
sql/signal_handler.cc (+0/-18)
sql/sp.cc (+12/-1)
sql/sp_head.cc (+23/-1)
sql/sp_head.h (+15/-8)
sql/sp_instr.cc (+32/-9)
sql/sp_instr.h (+12/-1)
sql/sql_acl.cc (+218/-303)
sql/sql_admin.cc (+30/-7)
sql/sql_alter.h (+3/-1)
sql/sql_audit.cc (+10/-3)
sql/sql_audit.h (+47/-17)
sql/sql_base.cc (+243/-79)
sql/sql_binlog.cc (+5/-5)
sql/sql_class.cc (+73/-30)
sql/sql_class.h (+62/-10)
sql/sql_cursor.cc (+15/-1)
sql/sql_db.cc (+1/-1)
sql/sql_delete.cc (+2/-1)
sql/sql_digest.cc (+697/-0)
sql/sql_digest.h (+132/-0)
sql/sql_digest_stream.h (+51/-0)
sql/sql_executor.cc (+8/-5)
sql/sql_executor.h (+3/-1)
sql/sql_handler.cc (+47/-0)
sql/sql_handler.h (+1/-0)
sql/sql_insert.cc (+3/-3)
sql/sql_lex.cc (+66/-30)
sql/sql_lex.h (+31/-4)
sql/sql_load.cc (+46/-29)
sql/sql_optimizer.cc (+43/-11)
sql/sql_optimizer.h (+2/-1)
sql/sql_parse.cc (+258/-43)
sql/sql_parse.h (+3/-0)
sql/sql_partition.cc (+146/-121)
sql/sql_partition.h (+6/-3)
sql/sql_planner.cc (+37/-24)
sql/sql_plugin.cc (+75/-5)
sql/sql_plugin.h (+1/-0)
sql/sql_prepare.cc (+52/-30)
sql/sql_priv.h (+28/-1)
sql/sql_reload.cc (+45/-25)
sql/sql_resolver.cc (+13/-2)
sql/sql_select.cc (+81/-53)
sql/sql_show.cc (+274/-42)
sql/sql_show.h (+4/-2)
sql/sql_signal.cc (+1/-16)
sql/sql_state.c (+1/-0)
sql/sql_string.cc (+36/-0)
sql/sql_string.h (+3/-0)
sql/sql_table.cc (+223/-89)
sql/sql_table.h (+6/-2)
sql/sql_tmp_table.cc (+18/-5)
sql/sql_tmp_table.h (+1/-1)
sql/sql_trigger.cc (+64/-30)
sql/sql_trigger.h (+6/-1)
sql/sql_truncate.cc (+43/-12)
sql/sql_truncate.h (+8/-2)
sql/sql_union.cc (+15/-4)
sql/sql_update.cc (+2/-1)
sql/sql_view.cc (+50/-15)
sql/sql_yacc.cc (+2555/-2521)
sql/sql_yacc.h (+2/-2)
sql/sql_yacc.yy (+45/-15)
sql/string_service.cc (+3/-6)
sql/sys_vars.cc (+136/-20)
sql/sys_vars.h (+2/-2)
sql/table.cc (+72/-29)
sql/table.h (+12/-1)
sql/udf_example.cc (+4/-1)
sql/unireg.cc (+1/-2)
storage/archive/archive_test.c (+1/-0)
storage/federated/ha_federated.cc (+12/-5)
storage/heap/_check.c (+1/-0)
storage/heap/_rectest.c (+1/-0)
storage/heap/hp_block.c (+3/-2)
storage/heap/hp_create.c (+2/-2)
storage/heap/hp_extra.c (+1/-0)
storage/heap/hp_hash.c (+2/-2)
storage/heap/hp_rfirst.c (+1/-0)
storage/heap/hp_rlast.c (+1/-0)
storage/heap/hp_rnext.c (+1/-0)
storage/heap/hp_rprev.c (+1/-0)
storage/heap/hp_rrnd.c (+1/-0)
storage/heap/hp_rsame.c (+1/-0)
storage/heap/hp_scan.c (+1/-0)
storage/heap/hp_update.c (+1/-0)
storage/innobase/CMakeLists.txt (+54/-2)
storage/innobase/api/api0api.cc (+76/-241)
storage/innobase/btr/btr0btr.cc (+136/-0)
storage/innobase/btr/btr0cur.cc (+90/-29)
storage/innobase/buf/buf0buddy.cc (+1/-1)
storage/innobase/buf/buf0buf.cc (+214/-148)
storage/innobase/buf/buf0checksum.cc (+7/-4)
storage/innobase/buf/buf0dblwr.cc (+37/-17)
storage/innobase/buf/buf0flu.cc (+30/-28)
storage/innobase/buf/buf0lru.cc (+8/-33)
storage/innobase/dict/dict0crea.cc (+20/-26)
storage/innobase/dict/dict0dict.cc (+370/-276)
storage/innobase/dict/dict0load.cc (+4/-1)
storage/innobase/dict/dict0mem.cc (+194/-40)
storage/innobase/dict/dict0stats.cc (+435/-220)
storage/innobase/fil/fil0fil.cc (+77/-71)
storage/innobase/fsp/fsp0fsp.cc (+1/-39)
storage/innobase/fts/fts0ast.cc (+150/-36)
storage/innobase/fts/fts0blex.cc (+235/-237)
storage/innobase/fts/fts0blex.l (+4/-4)
storage/innobase/fts/fts0fts.cc (+598/-226)
storage/innobase/fts/fts0opt.cc (+21/-14)
storage/innobase/fts/fts0pars.cc (+54/-21)
storage/innobase/fts/fts0pars.y (+11/-11)
storage/innobase/fts/fts0que.cc (+92/-64)
storage/innobase/fts/fts0sql.cc (+3/-2)
storage/innobase/fts/fts0tlex.cc (+42/-41)
storage/innobase/fts/fts0tlex.l (+3/-3)
storage/innobase/handler/ha_innodb.cc (+303/-133)
storage/innobase/handler/ha_innodb.h (+0/-7)
storage/innobase/handler/handler0alter.cc (+202/-123)
storage/innobase/handler/i_s.cc (+182/-128)
storage/innobase/ibuf/ibuf0ibuf.cc (+6/-5)
storage/innobase/include/api0api.h (+9/-1)
storage/innobase/include/btr0cur.h (+12/-1)
storage/innobase/include/btr0cur.ic (+2/-2)
storage/innobase/include/buf0buf.h (+17/-4)
storage/innobase/include/buf0buf.ic (+11/-13)
storage/innobase/include/buf0dblwr.h (+4/-3)
storage/innobase/include/db0err.h (+5/-2)
storage/innobase/include/dict0crea.h (+15/-19)
storage/innobase/include/dict0dict.h (+24/-27)
storage/innobase/include/dict0dict.ic (+1/-1)
storage/innobase/include/dict0mem.h (+319/-22)
storage/innobase/include/dict0types.h (+1/-0)
storage/innobase/include/fil0fil.h (+36/-8)
storage/innobase/include/fts0ast.h (+67/-9)
storage/innobase/include/fts0fts.h (+2/-1)
storage/innobase/include/fts0pars.h (+3/-3)
storage/innobase/include/fts0priv.ic (+23/-3)
storage/innobase/include/ha_prototypes.h (+1/-1)
storage/innobase/include/lock0lock.h (+4/-11)
storage/innobase/include/log0log.h (+3/-3)
storage/innobase/include/log0recv.h (+6/-2)
storage/innobase/include/os0file.h (+5/-5)
storage/innobase/include/os0once.h (+125/-0)
storage/innobase/include/os0sync.h (+56/-4)
storage/innobase/include/os0sync.ic (+4/-2)
storage/innobase/include/page0page.h (+15/-1)
storage/innobase/include/row0log.h (+7/-6)
storage/innobase/include/row0merge.h (+1/-1)
storage/innobase/include/row0mysql.h (+8/-0)
storage/innobase/include/row0purge.h (+11/-1)
storage/innobase/include/sync0rw.h (+2/-2)
storage/innobase/include/sync0rw.ic (+30/-14)
storage/innobase/include/sync0sync.h (+2/-0)
storage/innobase/include/sync0sync.ic (+13/-2)
storage/innobase/include/trx0roll.h (+3/-1)
storage/innobase/include/univ.i (+4/-4)
storage/innobase/include/ut0ut.h (+14/-1)
storage/innobase/lock/lock0lock.cc (+107/-89)
storage/innobase/log/log0log.cc (+15/-4)
storage/innobase/log/log0recv.cc (+16/-26)
storage/innobase/os/os0file.cc (+68/-27)
storage/innobase/os/os0sync.cc (+3/-21)
storage/innobase/os/os0thread.cc (+3/-0)
storage/innobase/page/page0page.cc (+43/-1)
storage/innobase/page/page0zip.cc (+186/-106)
storage/innobase/pars/lexyy.cc (+28/-26)
storage/innobase/pars/pars0pars.cc (+3/-2)
storage/innobase/que/que0que.cc (+1/-27)
storage/innobase/rem/rem0cmp.cc (+16/-15)
storage/innobase/row/row0ftsort.cc (+13/-10)
storage/innobase/row/row0import.cc (+52/-75)
storage/innobase/row/row0ins.cc (+28/-32)
storage/innobase/row/row0log.cc (+299/-97)
storage/innobase/row/row0merge.cc (+134/-17)
storage/innobase/row/row0mysql.cc (+230/-192)
storage/innobase/row/row0purge.cc (+115/-16)
storage/innobase/row/row0quiesce.cc (+6/-7)
storage/innobase/row/row0sel.cc (+7/-11)
storage/innobase/row/row0uins.cc (+2/-3)
storage/innobase/row/row0umod.cc (+9/-6)
storage/innobase/row/row0upd.cc (+27/-64)
storage/innobase/row/row0vers.cc (+34/-9)
storage/innobase/srv/srv0conc.cc (+1/-1)
storage/innobase/srv/srv0mon.cc (+5/-4)
storage/innobase/srv/srv0srv.cc (+11/-5)
storage/innobase/srv/srv0start.cc (+79/-18)
storage/innobase/sync/sync0arr.cc (+9/-5)
storage/innobase/sync/sync0rw.cc (+11/-2)
storage/innobase/sync/sync0sync.cc (+12/-11)
storage/innobase/trx/trx0i_s.cc (+1/-1)
storage/innobase/trx/trx0roll.cc (+9/-15)
storage/innobase/trx/trx0sys.cc (+11/-15)
storage/innobase/trx/trx0trx.cc (+12/-6)
storage/innobase/ut/ut0ut.cc (+5/-1)
storage/myisam/ft_update.c (+4/-3)
storage/myisam/ftbench/Ecompare.pl (+1/-0)
storage/myisam/ftbench/Ecreate.pl (+1/-0)
storage/myisam/ftbench/Ereport.pl (+1/-0)
storage/myisam/ftbench/ft-test-run.sh (+1/-0)
storage/myisam/ha_myisam.cc (+0/-1)
storage/myisam/mi_delete.c (+0/-2)
storage/myisam/mi_key.c (+2/-4)
storage/myisam/mi_open.c (+7/-1)
storage/myisam/mi_rfirst.c (+1/-0)
storage/myisam/mi_rkey.c (+3/-0)
storage/myisam/mi_rlast.c (+1/-0)
storage/myisam/mi_rnext_same.c (+7/-5)
storage/myisam/mi_rrnd.c (+1/-0)
storage/myisam/mi_rsamepos.c (+1/-0)
storage/myisam/mi_test_all.sh (+1/-0)
storage/myisam/mi_unique.c (+0/-3)
storage/myisam/mi_update.c (+0/-3)
storage/myisam/mi_write.c (+0/-3)
storage/myisam/myisamdef.h (+7/-1)
storage/myisam/rt_index.h (+1/-0)
storage/myisam/rt_key.c (+1/-0)
storage/myisam/rt_key.h (+1/-0)
storage/myisam/rt_mbr.h (+1/-0)
storage/myisam/rt_split.c (+8/-1)
storage/myisam/sp_defs.h (+1/-0)
storage/myisam/sp_key.c (+1/-1)
storage/myisammrg/myrg_delete.c (+1/-0)
storage/myisammrg/myrg_locking.c (+1/-0)
storage/myisammrg/myrg_panic.c (+1/-0)
storage/myisammrg/myrg_range.c (+1/-0)
storage/myisammrg/myrg_records.c (+1/-0)
storage/myisammrg/myrg_rfirst.c (+1/-0)
storage/myisammrg/myrg_rlast.c (+1/-0)
storage/myisammrg/myrg_rnext.c (+1/-0)
storage/myisammrg/myrg_rnext_same.c (+1/-0)
storage/myisammrg/myrg_rprev.c (+1/-0)
storage/myisammrg/myrg_rrnd.c (+1/-0)
storage/myisammrg/myrg_rsame.c (+1/-0)
storage/myisammrg/myrg_update.c (+1/-0)
storage/myisammrg/myrg_write.c (+1/-0)
storage/ndb/CMakeLists.txt (+8/-6)
storage/ndb/config/type_mgmapiclient.cmake (+1/-0)
storage/ndb/config/type_ndbapiclient.cmake (+1/-0)
storage/ndb/config/type_util.cmake (+1/-0)
storage/ndb/docs/doxygen/Doxyfile.mgmapi (+1/-0)
storage/ndb/docs/doxygen/Doxyfile.ndb (+1/-0)
storage/ndb/docs/doxygen/Doxyfile.ndbapi (+1/-0)
storage/ndb/docs/doxygen/Doxyfile.odbc (+1/-0)
storage/ndb/docs/doxygen/postdoxy.pl (+1/-0)
storage/ndb/include/kernel/signaldata/AlterIndxImpl.hpp (+1/-0)
storage/ndb/include/kernel/signaldata/BuildIndxImpl.hpp (+1/-0)
storage/ndb/include/kernel/signaldata/CreateIndxImpl.hpp (+1/-0)
storage/ndb/include/kernel/signaldata/CreateNodegroupImpl.hpp (+1/-0)
storage/ndb/include/kernel/signaldata/DictSignal.hpp (+1/-0)
storage/ndb/include/kernel/signaldata/DihScanTab.hpp (+1/-0)
storage/ndb/include/kernel/signaldata/DropIndxImpl.hpp (+1/-0)
storage/ndb/include/kernel/signaldata/DropNodegroup.hpp (+1/-0)
storage/ndb/include/kernel/signaldata/DropNodegroupImpl.hpp (+1/-0)
storage/ndb/include/kernel/signaldata/EnableCom.hpp (+1/-0)
storage/ndb/include/kernel/signaldata/HashMapImpl.hpp (+1/-0)
storage/ndb/include/kernel/signaldata/LqhTransReq.hpp (+1/-0)
storage/ndb/include/kernel/signaldata/StopForCrash.hpp (+1/-0)
storage/ndb/include/kernel/signaldata/TabCommit.hpp (+1/-0)
storage/ndb/src/CMakeLists.txt (+4/-1)
storage/ndb/src/common/CMakeLists.txt (+1/-0)
storage/ndb/src/common/debugger/signaldata/AlterIndxImpl.cpp (+1/-0)
storage/ndb/src/common/debugger/signaldata/BuildIndx.cpp (+1/-0)
storage/ndb/src/common/debugger/signaldata/BuildIndxImpl.cpp (+1/-0)
storage/ndb/src/common/debugger/signaldata/CreateIndxImpl.cpp (+1/-0)
storage/ndb/src/common/debugger/signaldata/CreateTab.cpp (+1/-0)
storage/ndb/src/common/debugger/signaldata/CreateTable.cpp (+1/-0)
storage/ndb/src/common/debugger/signaldata/DropIndxImpl.cpp (+1/-0)
storage/ndb/src/common/debugger/signaldata/DropTable.cpp (+1/-0)
storage/ndb/src/common/debugger/signaldata/DropTrigImpl.cpp (+1/-0)
storage/ndb/src/common/debugger/signaldata/GetTabInfo.cpp (+1/-0)
storage/ndb/src/kernel/blocks/RestoreProxy.cpp (+1/-0)
storage/ndb/src/kernel/blocks/RestoreProxy.hpp (+1/-0)
storage/ndb/src/kernel/blocks/backup/BackupProxy.cpp (+1/-0)
storage/ndb/src/kernel/blocks/backup/BackupProxy.hpp (+1/-0)
storage/ndb/src/kernel/error/CMakeLists.txt (+1/-0)
storage/ndb/src/kernel/vm/GlobalData.cpp (+1/-0)
storage/ndb/src/kernel/vm/SimulatedBlock_mt.cpp (+1/-0)
storage/ndb/src/kernel/vm/SimulatedBlock_nonmt.cpp (+1/-0)
storage/ndb/src/kernel/vm/TransporterCallbackKernel.hpp (+1/-0)
storage/ndb/src/kernel/vm/TransporterCallback_mt.cpp (+1/-0)
storage/ndb/src/kernel/vm/TransporterCallback_nonmt.cpp (+1/-0)
storage/ndb/src/mgmapi/mgmapi.cpp (+6/-2)
storage/ndb/src/mgmclient/CMakeLists.txt (+4/-0)
storage/ndb/src/mgmsrv/CMakeLists.txt (+4/-0)
storage/ndb/src/mgmsrv/Config.cpp (+7/-4)
storage/ndb/test/ndbapi/bank/CMakeLists.txt (+1/-0)
storage/ndb/test/ndbapi/testSingleUserMode.cpp (+1/-0)
storage/ndb/test/run-test/16node-tests.txt (+1/-0)
storage/ndb/test/run-test/atrt-analyze-result.sh (+1/-0)
storage/ndb/test/run-test/atrt-mysql-test-run (+1/-0)
storage/ndb/test/run-test/atrt-testBackup (+1/-0)
storage/ndb/test/run-test/basic.txt (+1/-0)
storage/ndb/test/run-test/make-config.sh (+1/-0)
storage/ndb/test/run-test/make-html-reports.sh (+1/-0)
storage/ndb/test/run-test/make-index.sh (+1/-0)
storage/ndb/test/run-test/ndb-autotest.sh (+1/-0)
storage/ndb/test/run-test/upgrade-boot.sh (+1/-0)
storage/ndb/test/src/getarg.c (+1/-0)
storage/perfschema/CMakeLists.txt (+1/-19)
storage/perfschema/gen_pfs_lex_token.cc (+91/-5)
storage/perfschema/ha_perfschema.cc (+8/-2)
storage/perfschema/ha_perfschema.h (+36/-1)
storage/perfschema/pfs.cc (+63/-22)
storage/perfschema/pfs_account.cc (+4/-6)
storage/perfschema/pfs_column_types.h (+1/-1)
storage/perfschema/pfs_con_slice.cc (+7/-4)
storage/perfschema/pfs_digest.cc (+57/-444)
storage/perfschema/pfs_digest.h (+7/-143)
storage/perfschema/pfs_engine_table.cc (+54/-2)
storage/perfschema/pfs_events_stages.cc (+3/-3)
storage/perfschema/pfs_events_statements.cc (+42/-8)
storage/perfschema/pfs_events_statements.h (+9/-5)
storage/perfschema/pfs_events_waits.cc (+3/-3)
storage/perfschema/pfs_global.cc (+36/-2)
storage/perfschema/pfs_global.h (+12/-6)
storage/perfschema/pfs_host.cc (+3/-5)
storage/perfschema/pfs_instr.cc (+70/-20)
storage/perfschema/pfs_instr.h (+3/-1)
storage/perfschema/pfs_instr_class.cc (+19/-19)
storage/perfschema/pfs_server.cc (+1/-1)
storage/perfschema/pfs_server.h (+3/-1)
storage/perfschema/pfs_setup_actor.cc (+3/-3)
storage/perfschema/pfs_setup_object.cc (+3/-3)
storage/perfschema/pfs_user.cc (+3/-5)
storage/perfschema/table_events_stages.cc (+12/-2)
storage/perfschema/table_events_statements.cc (+37/-33)
storage/perfschema/table_events_statements.h (+4/-3)
storage/perfschema/table_events_waits.cc (+15/-2)
storage/perfschema/table_helper.cc (+11/-11)
storage/perfschema/table_helper.h (+3/-5)
storage/perfschema/table_threads.cc (+16/-2)
storage/perfschema/unittest/CMakeLists.txt (+7/-2)
storage/perfschema/unittest/pfs-t.cc (+4/-2)
storage/perfschema/unittest/pfs_account-oom-t.cc (+1/-2)
storage/perfschema/unittest/pfs_host-oom-t.cc (+1/-2)
storage/perfschema/unittest/pfs_instr-oom-t.cc (+1/-2)
storage/perfschema/unittest/pfs_instr-t.cc (+4/-3)
storage/perfschema/unittest/pfs_instr_class-oom-t.cc (+1/-2)
storage/perfschema/unittest/pfs_instr_class-t.cc (+1/-3)
storage/perfschema/unittest/pfs_misc-t.cc (+71/-0)
storage/perfschema/unittest/pfs_server_stubs.cc (+35/-0)
storage/perfschema/unittest/pfs_user-oom-t.cc (+1/-2)
storage/perfschema/unittest/stub_pfs_global.h (+23/-1)
storage/perfschema/unittest/stub_print_error.h (+18/-1)
storage/perfschema/unittest/stub_server_misc.h (+0/-28)
strings/CMakeLists.txt (+1/-2)
strings/ctype-bin.c (+2/-1)
strings/ctype-eucjpms.c (+2/-1)
strings/ctype-mb.c (+2/-2)
strings/ctype-tis620.c (+18/-5)
strings/ctype-uca.c (+10/-6)
strings/ctype-ucs2.c (+9/-6)
strings/ctype-ujis.c (+2/-1)
strings/ctype-utf8.c (+5/-12)
strings/ctype.c (+2/-2)
strings/decimal.c (+97/-21)
strings/t_ctype.h (+1/-0)
support-files/MacOSX/Description.plist.sh (+1/-0)
support-files/MacOSX/Info.plist.sh (+1/-0)
support-files/MacOSX/MySQLCOM (+1/-0)
support-files/MacOSX/ReadMe.txt (+353/-336)
support-files/MacOSX/StartupItem.Description.plist (+1/-0)
support-files/MacOSX/StartupItem.Info.plist (+1/-0)
support-files/MacOSX/StartupItem.postinstall (+1/-0)
support-files/MacOSX/StartupParameters.plist.sh (+1/-0)
support-files/MacOSX/mwar-wrapper (+1/-0)
support-files/MacOSX/mwcc-wrapper (+1/-0)
support-files/MacOSX/postflight.sh (+1/-0)
support-files/MacOSX/preflight.sh (+1/-0)
support-files/RHEL4-SElinux/mysql.fc (+1/-0)
support-files/RHEL4-SElinux/mysql.te (+1/-0)
support-files/build-tags (+2/-2)
support-files/dtrace/locktime.d (+23/-21)
support-files/dtrace/query-execandqc.d (+20/-18)
support-files/dtrace/query-filesort-time.d (+21/-19)
support-files/dtrace/query-network-time.d (+21/-19)
support-files/dtrace/query-parse-time.d (+20/-18)
support-files/dtrace/query-rowops.d (+21/-19)
support-files/dtrace/query-time.d (+20/-18)
support-files/dtrace/statement-time.d (+21/-19)
support-files/dtrace/statement-type-aggregate.d (+23/-21)
support-files/mysql.5.6.16.spec (+0/-2080)
support-files/mysql.5.6.26.spec (+2103/-0)
support-files/mysql.m4 (+1/-0)
support-files/mysql.spec.sh (+43/-20)
tests/connect_test.c (+1/-0)
tests/deadlock_test.c (+1/-0)
tests/drop_test.pl (+1/-0)
tests/export.pl (+1/-0)
tests/fork2_test.pl (+1/-0)
tests/fork_big.pl (+1/-0)
tests/fork_big2.pl (+1/-0)
tests/index_corrupt.pl (+1/-0)
tests/insert_and_repair.pl (+1/-0)
tests/insert_test.c (+1/-0)
tests/list_test.c (+1/-0)
tests/lock_test.pl (+1/-0)
tests/mysql_client_fw.c (+12/-1)
tests/mysql_client_test.c (+145/-1)
tests/pmail.pl (+1/-0)
tests/rename_test.pl (+1/-0)
tests/select_test.c (+1/-0)
tests/showdb_test.c (+1/-0)
tests/ssl_test.c (+1/-0)
tests/table_types.pl (+1/-0)
tests/test_delayed_insert.pl (+1/-0)
tests/truncate.pl (+1/-0)
unittest/examples/simple-t.c (+1/-0)
unittest/gunit/CMakeLists.txt (+33/-9)
unittest/gunit/debug_sync-t.cc (+197/-0)
unittest/gunit/item_param-t.cc (+51/-0)
unittest/gunit/my_regex-t.cc (+45/-1)
unittest/gunit/mysys_my_pwrite-t.cc (+267/-0)
unittest/gunit/mysys_my_write-t.cc (+258/-0)
unittest/gunit/stdcxx-t.cc (+6/-2)
unittest/gunit/test_utils.cc (+15/-3)
unittest/gunit/yassl/CMakeLists.txt (+1/-2)
vio/CMakeLists.txt (+1/-2)
vio/vio.c (+47/-16)
vio/viosocket.c (+2/-2)
vio/viossl.c (+28/-3)
vio/viosslfactories.c (+62/-20)
win/create_def_file.js (+1/-0)
zlib/CMakeLists.txt (+1/-2)
To merge this branch: bzr merge lp:~cbjchen/ubuntu/trusty/mysql-5.6/fix-for-1500684
Reviewer Review Type Date Requested Status
Robie Basak Abstain
Review via email: mp+273985@code.launchpad.net

Description of the change

update to 5.6.26 to pick up some security fixes.

To post a comment you must log in.
Revision history for this message
Robie Basak (racb) wrote :

I cannot review for the security pocket. Please follow https://wiki.ubuntu.com/SecurityTeam/SponsorsQueue

review: Abstain

Unmerged revisions

7. By Liang Chen <email address hidden>

Update to 5.6.26

Update to 5.6.26 to pick up security fixes.

local changes:
1. mysql-5.6.26-fix-build.patch is to fix a build dependency issue
2. change -fno-exception to -fexceptions in rules to allow catching
   exception

[cbjchen,r=]

6. By James Page

* SECURITY UPDATE: Update to 5.6.19 to fix security issues (LP: #1330168).
  - www.oracle.com/technetwork/topics/security/cpujul2014-1972956.html
  - CVE-2014-2484
  - CVE-2014-4258
  - CVE-2014-4260
  - CVE-2014-4238
  - CVE-2014-4233
  - CVE-2014-4240
  - CVE-2014-4214

5. By James Page

* SECURITY UPDATE: Update to 5.6.17 to fix security issues (LP: #1313566).
  - http://www.oracle.com/technetwork/topics/security/cpuapr2014-1972952.html
  - CVE-2014-0001
  - CVE-2014-2430
  - CVE-2014-2431
  - CVE-2014-2435
  - CVE-2014-2436
  - CVE-2014-2440
* d/p/CVE-2014-0001.patch: Dropped, included in security update.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== removed directory '.pc/CVE-2014-0001.patch'
=== removed directory '.pc/CVE-2014-0001.patch/client'
=== removed file '.pc/CVE-2014-0001.patch/client/mysql.cc'
--- .pc/CVE-2014-0001.patch/client/mysql.cc 2014-03-17 08:56:24 +0000
+++ .pc/CVE-2014-0001.patch/client/mysql.cc 1970-01-01 00:00:00 +0000
@@ -1,5557 +0,0 @@
1/*
2 Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; version 2 of the License.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16*/
17
18/* mysql command tool
19 * Commands compatible with mSQL by David J. Hughes
20 *
21 * Written by:
22 * Michael 'Monty' Widenius
23 * Andi Gutmans <andi@zend.com>
24 * Zeev Suraski <zeev@zend.com>
25 * Jani Tolonen <jani@mysql.com>
26 * Matt Wagner <matt@mysql.com>
27 * Jeremy Cole <jcole@mysql.com>
28 * Tonu Samuel <tonu@mysql.com>
29 * Harrison Fisk <harrison@mysql.com>
30 *
31 **/
32
33#include "client_priv.h"
34#include "my_default.h"
35#include <m_ctype.h>
36#include <stdarg.h>
37#include <my_dir.h>
38#ifndef __GNU_LIBRARY__
39#define __GNU_LIBRARY__ // Skip warnings in getopt.h
40#endif
41#include "my_readline.h"
42#include <signal.h>
43#include <violite.h>
44
45#include <algorithm>
46
47using std::min;
48using std::max;
49
50#if defined(USE_LIBEDIT_INTERFACE) && defined(HAVE_LOCALE_H)
51#include <locale.h>
52#endif
53
54const char *VER= "14.14";
55
56/* Don't try to make a nice table if the data is too big */
57#define MAX_COLUMN_LENGTH 1024
58
59/* Buffer to hold 'version' and 'version_comment' */
60static char *server_version= NULL;
61
62/* Array of options to pass to libemysqld */
63#define MAX_SERVER_ARGS 64
64
65/* Maximum memory limit that can be claimed by alloca(). */
66#define MAX_ALLOCA_SIZE 512
67
68#include "sql_string.h"
69
70extern "C" {
71#if defined(HAVE_CURSES_H) && defined(HAVE_TERM_H)
72#include <curses.h>
73#include <term.h>
74#else
75#if defined(HAVE_TERMIOS_H)
76#include <termios.h>
77#include <unistd.h>
78#elif defined(HAVE_TERMBITS_H)
79#include <termbits.h>
80#elif defined(HAVE_ASM_TERMBITS_H) && (!defined __GLIBC__ || !(__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ > 0))
81#include <asm/termbits.h> // Standard linux
82#endif
83#undef VOID
84#if defined(HAVE_TERMCAP_H)
85#include <termcap.h>
86#else
87#ifdef HAVE_CURSES_H
88#include <curses.h>
89#endif
90#undef SYSV // hack to avoid syntax error
91#ifdef HAVE_TERM_H
92#include <term.h>
93#endif
94#endif
95#endif
96
97#if defined(__WIN__)
98#include <conio.h>
99#else
100#include <readline.h>
101#define HAVE_READLINE
102#define USE_POPEN
103#endif
104 //int vidattr(long unsigned int attrs); // Was missing in sun curses
105}
106
107#if !defined(HAVE_VIDATTR)
108#undef vidattr
109#define vidattr(A) {} // Can't get this to work
110#endif
111
112#ifdef FN_NO_CASE_SENSE
113#define cmp_database(cs,A,B) my_strcasecmp((cs), (A), (B))
114#else
115#define cmp_database(cs,A,B) strcmp((A),(B))
116#endif
117
118#include "completion_hash.h"
119#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
120
121#define PROMPT_CHAR '\\'
122#define DEFAULT_DELIMITER ";"
123
124#define MAX_BATCH_BUFFER_SIZE (1024L * 1024L * 1024L)
125
126typedef struct st_status
127{
128 int exit_status;
129 ulong query_start_line;
130 char *file_name;
131 LINE_BUFFER *line_buff;
132 bool batch,add_to_history;
133} STATUS;
134
135
136static HashTable ht;
137static char **defaults_argv;
138
139enum enum_info_type { INFO_INFO,INFO_ERROR,INFO_RESULT};
140typedef enum enum_info_type INFO_TYPE;
141
142static MYSQL mysql; /* The connection */
143static my_bool ignore_errors=0,wait_flag=0,quick=0,
144 connected=0,opt_raw_data=0,unbuffered=0,output_tables=0,
145 opt_rehash=1,skip_updates=0,safe_updates=0,one_database=0,
146 opt_compress=0, using_opt_local_infile=0,
147 vertical=0, line_numbers=1, column_names=1,opt_html=0,
148 opt_xml=0,opt_nopager=1, opt_outfile=0, named_cmds= 0,
149 tty_password= 0, opt_nobeep=0, opt_reconnect=1,
150 opt_secure_auth= TRUE,
151 default_pager_set= 0, opt_sigint_ignore= 0,
152 auto_vertical_output= 0,
153 show_warnings= 0, executing_query= 0, interrupted_query= 0,
154 ignore_spaces= 0;
155static my_bool debug_info_flag, debug_check_flag;
156static my_bool column_types_flag;
157static my_bool preserve_comments= 0;
158static ulong opt_max_allowed_packet, opt_net_buffer_length;
159static uint verbose=0,opt_silent=0,opt_mysql_port=0, opt_local_infile=0;
160static uint opt_enable_cleartext_plugin= 0;
161static my_bool using_opt_enable_cleartext_plugin= 0;
162static uint my_end_arg;
163static char * opt_mysql_unix_port=0;
164static char *opt_bind_addr = NULL;
165static int connect_flag=CLIENT_INTERACTIVE;
166static my_bool opt_binary_mode= FALSE;
167static my_bool opt_connect_expired_password= FALSE;
168static char *current_host,*current_db,*current_user=0,*opt_password=0,
169 *current_prompt=0, *delimiter_str= 0,
170 *default_charset= (char*) MYSQL_AUTODETECT_CHARSET_NAME,
171 *opt_init_command= 0;
172static char *histfile;
173static char *histfile_tmp;
174static char *opt_histignore= NULL;
175DYNAMIC_STRING histignore_buffer;
176static String glob_buffer,old_buffer;
177static String processed_prompt;
178static char *full_username=0,*part_username=0,*default_prompt=0;
179static int wait_time = 5;
180static STATUS status;
181static ulong select_limit,max_join_size,opt_connect_timeout=0;
182static char mysql_charsets_dir[FN_REFLEN+1];
183static char *opt_plugin_dir= 0, *opt_default_auth= 0;
184#if !defined(HAVE_YASSL)
185static char *opt_server_public_key= 0;
186#endif
187static const char *xmlmeta[] = {
188 "&", "&amp;",
189 "<", "&lt;",
190 ">", "&gt;",
191 "\"", "&quot;",
192 /* Turn \0 into a space. Why not &#0;? That's not valid XML or HTML. */
193 "\0", " ",
194 0, 0
195};
196static const char *day_names[]={"Sun","Mon","Tue","Wed","Thu","Fri","Sat"};
197static const char *month_names[]={"Jan","Feb","Mar","Apr","May","Jun","Jul",
198 "Aug","Sep","Oct","Nov","Dec"};
199static char default_pager[FN_REFLEN];
200static char pager[FN_REFLEN], outfile[FN_REFLEN];
201static FILE *PAGER, *OUTFILE;
202static MEM_ROOT hash_mem_root;
203static uint prompt_counter;
204static char delimiter[16]= DEFAULT_DELIMITER;
205static uint delimiter_length= 1;
206unsigned short terminal_width= 80;
207
208#ifdef HAVE_SMEM
209static char *shared_memory_base_name=0;
210#endif
211static uint opt_protocol=0;
212static const CHARSET_INFO *charset_info= &my_charset_latin1;
213
214#include "sslopt-vars.h"
215
216const char *default_dbug_option="d:t:o,/tmp/mysql.trace";
217
218#ifdef __WIN__
219/*
220 A flag that indicates if --execute buffer has already been converted,
221 to avoid double conversion on reconnect.
222*/
223static my_bool execute_buffer_conversion_done= 0;
224
225/*
226 my_win_is_console(...) is quite slow.
227 We cache my_win_is_console() results for stdout and stderr.
228 Any other output files, except stdout and stderr,
229 cannot be Windows console.
230 Note, if mysql.exe is executed from a service, its _fileno(stdout) is -1,
231 so shift (1 << -1) can return implementation defined result.
232 This corner case is taken into account, as the shift result
233 will be multiplied to 0 and we'll get 0 as a result.
234 The same is true for stderr.
235*/
236static uint win_is_console_cache=
237 (MY_TEST(my_win_is_console(stdout)) * (1 << _fileno(stdout))) |
238 (MY_TEST(my_win_is_console(stderr)) * (1 << _fileno(stderr)));
239
240static inline my_bool
241my_win_is_console_cached(FILE *file)
242{
243 return win_is_console_cache & (1 << _fileno(file));
244}
245#endif /* __WIN__ */
246
247/* Various printing flags */
248#define MY_PRINT_ESC_0 1 /* Replace 0x00 bytes to "\0" */
249#define MY_PRINT_SPS_0 2 /* Replace 0x00 bytes to space */
250#define MY_PRINT_XML 4 /* Encode XML entities */
251#define MY_PRINT_MB 8 /* Recognize multi-byte characters */
252#define MY_PRINT_CTRL 16 /* Replace TAB, NL, CR to "\t", "\n", "\r" */
253
254void tee_write(FILE *file, const char *s, size_t slen, int flags);
255void tee_fprintf(FILE *file, const char *fmt, ...);
256void tee_fputs(const char *s, FILE *file);
257void tee_puts(const char *s, FILE *file);
258void tee_putc(int c, FILE *file);
259static void tee_print_sized_data(const char *, unsigned int, unsigned int, bool);
260/* The names of functions that actually do the manipulation. */
261static int get_options(int argc,char **argv);
262extern "C" my_bool get_one_option(int optid, const struct my_option *opt,
263 char *argument);
264static int com_quit(String *str,char*),
265 com_go(String *str,char*), com_ego(String *str,char*),
266 com_print(String *str,char*),
267 com_help(String *str,char*), com_clear(String *str,char*),
268 com_connect(String *str,char*), com_status(String *str,char*),
269 com_use(String *str,char*), com_source(String *str, char*),
270 com_rehash(String *str, char*), com_tee(String *str, char*),
271 com_notee(String *str, char*), com_charset(String *str,char*),
272 com_prompt(String *str, char*), com_delimiter(String *str, char*),
273 com_warnings(String *str, char*), com_nowarnings(String *str, char*);
274
275#ifdef USE_POPEN
276static int com_nopager(String *str, char*), com_pager(String *str, char*),
277 com_edit(String *str,char*), com_shell(String *str, char *);
278#endif
279
280static int read_and_execute(bool interactive);
281static int sql_connect(char *host,char *database,char *user,char *password,
282 uint silent);
283static const char *server_version_string(MYSQL *mysql);
284static int put_info(const char *str,INFO_TYPE info,uint error=0,
285 const char *sql_state=0);
286static int put_error(MYSQL *mysql);
287static void safe_put_field(const char *pos,ulong length);
288static void xmlencode_print(const char *src, uint length);
289static void init_pager();
290static void end_pager();
291static void init_tee(const char *);
292static void end_tee();
293static const char* construct_prompt();
294static char *get_arg(char *line, my_bool get_next_arg);
295static void init_username();
296static void add_int_to_prompt(int toadd);
297static int get_result_width(MYSQL_RES *res);
298static int get_field_disp_length(MYSQL_FIELD * field);
299static int normalize_dbname(const char *line, char *buff, uint buff_size);
300static int get_quote_count(const char *line);
301
302#if defined(HAVE_READLINE)
303static void add_filtered_history(const char *string);
304static my_bool check_histignore(const char *string);
305static my_bool parse_histignore();
306static my_bool init_hist_patterns();
307static void free_hist_patterns();
308DYNAMIC_ARRAY histignore_patterns;
309#endif /* HAVE_READLINE */
310
311/* A structure which contains information on the commands this program
312 can understand. */
313
314typedef struct {
315 const char *name; /* User printable name of the function. */
316 char cmd_char; /* msql command character */
317 int (*func)(String *str,char *); /* Function to call to do the job. */
318 bool takes_params; /* Max parameters for command */
319 const char *doc; /* Documentation for this function. */
320} COMMANDS;
321
322static COMMANDS commands[] = {
323 { "?", '?', com_help, 1, "Synonym for `help'." },
324 { "clear", 'c', com_clear, 0, "Clear the current input statement."},
325 { "connect",'r', com_connect,1,
326 "Reconnect to the server. Optional arguments are db and host." },
327 { "delimiter", 'd', com_delimiter, 1,
328 "Set statement delimiter." },
329#ifdef USE_POPEN
330 { "edit", 'e', com_edit, 0, "Edit command with $EDITOR."},
331#endif
332 { "ego", 'G', com_ego, 0,
333 "Send command to mysql server, display result vertically."},
334 { "exit", 'q', com_quit, 0, "Exit mysql. Same as quit."},
335 { "go", 'g', com_go, 0, "Send command to mysql server." },
336 { "help", 'h', com_help, 1, "Display this help." },
337#ifdef USE_POPEN
338 { "nopager",'n', com_nopager,0, "Disable pager, print to stdout." },
339#endif
340 { "notee", 't', com_notee, 0, "Don't write into outfile." },
341#ifdef USE_POPEN
342 { "pager", 'P', com_pager, 1,
343 "Set PAGER [to_pager]. Print the query results via PAGER." },
344#endif
345 { "print", 'p', com_print, 0, "Print current command." },
346 { "prompt", 'R', com_prompt, 1, "Change your mysql prompt."},
347 { "quit", 'q', com_quit, 0, "Quit mysql." },
348 { "rehash", '#', com_rehash, 0, "Rebuild completion hash." },
349 { "source", '.', com_source, 1,
350 "Execute an SQL script file. Takes a file name as an argument."},
351 { "status", 's', com_status, 0, "Get status information from the server."},
352#ifdef USE_POPEN
353 { "system", '!', com_shell, 1, "Execute a system shell command."},
354#endif
355 { "tee", 'T', com_tee, 1,
356 "Set outfile [to_outfile]. Append everything into given outfile." },
357 { "use", 'u', com_use, 1,
358 "Use another database. Takes database name as argument." },
359 { "charset", 'C', com_charset, 1,
360 "Switch to another charset. Might be needed for processing binlog with multi-byte charsets." },
361 { "warnings", 'W', com_warnings, 0,
362 "Show warnings after every statement." },
363 { "nowarning", 'w', com_nowarnings, 0,
364 "Don't show warnings after every statement." },
365 /* Get bash-like expansion for some commands */
366 { "create table", 0, 0, 0, ""},
367 { "create database", 0, 0, 0, ""},
368 { "show databases", 0, 0, 0, ""},
369 { "show fields from", 0, 0, 0, ""},
370 { "show keys from", 0, 0, 0, ""},
371 { "show tables", 0, 0, 0, ""},
372 { "load data from", 0, 0, 0, ""},
373 { "alter table", 0, 0, 0, ""},
374 { "set option", 0, 0, 0, ""},
375 { "lock tables", 0, 0, 0, ""},
376 { "unlock tables", 0, 0, 0, ""},
377 /* generated 2006-12-28. Refresh occasionally from lexer. */
378 { "ACTION", 0, 0, 0, ""},
379 { "ADD", 0, 0, 0, ""},
380 { "AFTER", 0, 0, 0, ""},
381 { "AGAINST", 0, 0, 0, ""},
382 { "AGGREGATE", 0, 0, 0, ""},
383 { "ALL", 0, 0, 0, ""},
384 { "ALGORITHM", 0, 0, 0, ""},
385 { "ALTER", 0, 0, 0, ""},
386 { "ANALYZE", 0, 0, 0, ""},
387 { "AND", 0, 0, 0, ""},
388 { "ANY", 0, 0, 0, ""},
389 { "AS", 0, 0, 0, ""},
390 { "ASC", 0, 0, 0, ""},
391 { "ASCII", 0, 0, 0, ""},
392 { "ASENSITIVE", 0, 0, 0, ""},
393 { "AUTO_INCREMENT", 0, 0, 0, ""},
394 { "AVG", 0, 0, 0, ""},
395 { "AVG_ROW_LENGTH", 0, 0, 0, ""},
396 { "BACKUP", 0, 0, 0, ""},
397 { "BDB", 0, 0, 0, ""},
398 { "BEFORE", 0, 0, 0, ""},
399 { "BEGIN", 0, 0, 0, ""},
400 { "BERKELEYDB", 0, 0, 0, ""},
401 { "BETWEEN", 0, 0, 0, ""},
402 { "BIGINT", 0, 0, 0, ""},
403 { "BINARY", 0, 0, 0, ""},
404 { "BINLOG", 0, 0, 0, ""},
405 { "BIT", 0, 0, 0, ""},
406 { "BLOB", 0, 0, 0, ""},
407 { "BOOL", 0, 0, 0, ""},
408 { "BOOLEAN", 0, 0, 0, ""},
409 { "BOTH", 0, 0, 0, ""},
410 { "BTREE", 0, 0, 0, ""},
411 { "BY", 0, 0, 0, ""},
412 { "BYTE", 0, 0, 0, ""},
413 { "CACHE", 0, 0, 0, ""},
414 { "CALL", 0, 0, 0, ""},
415 { "CASCADE", 0, 0, 0, ""},
416 { "CASCADED", 0, 0, 0, ""},
417 { "CASE", 0, 0, 0, ""},
418 { "CHAIN", 0, 0, 0, ""},
419 { "CHANGE", 0, 0, 0, ""},
420 { "CHANGED", 0, 0, 0, ""},
421 { "CHAR", 0, 0, 0, ""},
422 { "CHARACTER", 0, 0, 0, ""},
423 { "CHARSET", 0, 0, 0, ""},
424 { "CHECK", 0, 0, 0, ""},
425 { "CHECKSUM", 0, 0, 0, ""},
426 { "CIPHER", 0, 0, 0, ""},
427 { "CLIENT", 0, 0, 0, ""},
428 { "CLOSE", 0, 0, 0, ""},
429 { "CODE", 0, 0, 0, ""},
430 { "COLLATE", 0, 0, 0, ""},
431 { "COLLATION", 0, 0, 0, ""},
432 { "COLUMN", 0, 0, 0, ""},
433 { "COLUMNS", 0, 0, 0, ""},
434 { "COMMENT", 0, 0, 0, ""},
435 { "COMMIT", 0, 0, 0, ""},
436 { "COMMITTED", 0, 0, 0, ""},
437 { "COMPACT", 0, 0, 0, ""},
438 { "COMPRESSED", 0, 0, 0, ""},
439 { "CONCURRENT", 0, 0, 0, ""},
440 { "CONDITION", 0, 0, 0, ""},
441 { "CONNECTION", 0, 0, 0, ""},
442 { "CONSISTENT", 0, 0, 0, ""},
443 { "CONSTRAINT", 0, 0, 0, ""},
444 { "CONTAINS", 0, 0, 0, ""},
445 { "CONTINUE", 0, 0, 0, ""},
446 { "CONVERT", 0, 0, 0, ""},
447 { "CREATE", 0, 0, 0, ""},
448 { "CROSS", 0, 0, 0, ""},
449 { "CUBE", 0, 0, 0, ""},
450 { "CURRENT_DATE", 0, 0, 0, ""},
451 { "CURRENT_TIME", 0, 0, 0, ""},
452 { "CURRENT_TIMESTAMP", 0, 0, 0, ""},
453 { "CURRENT_USER", 0, 0, 0, ""},
454 { "CURSOR", 0, 0, 0, ""},
455 { "DATA", 0, 0, 0, ""},
456 { "DATABASE", 0, 0, 0, ""},
457 { "DATABASES", 0, 0, 0, ""},
458 { "DATE", 0, 0, 0, ""},
459 { "DATETIME", 0, 0, 0, ""},
460 { "DAY", 0, 0, 0, ""},
461 { "DAY_HOUR", 0, 0, 0, ""},
462 { "DAY_MICROSECOND", 0, 0, 0, ""},
463 { "DAY_MINUTE", 0, 0, 0, ""},
464 { "DAY_SECOND", 0, 0, 0, ""},
465 { "DEALLOCATE", 0, 0, 0, ""},
466 { "DEC", 0, 0, 0, ""},
467 { "DECIMAL", 0, 0, 0, ""},
468 { "DECLARE", 0, 0, 0, ""},
469 { "DEFAULT", 0, 0, 0, ""},
470 { "DEFINER", 0, 0, 0, ""},
471 { "DELAYED", 0, 0, 0, ""},
472 { "DELAY_KEY_WRITE", 0, 0, 0, ""},
473 { "DELETE", 0, 0, 0, ""},
474 { "DESC", 0, 0, 0, ""},
475 { "DESCRIBE", 0, 0, 0, ""},
476 { "DES_KEY_FILE", 0, 0, 0, ""},
477 { "DETERMINISTIC", 0, 0, 0, ""},
478 { "DIRECTORY", 0, 0, 0, ""},
479 { "DISABLE", 0, 0, 0, ""},
480 { "DISCARD", 0, 0, 0, ""},
481 { "DISTINCT", 0, 0, 0, ""},
482 { "DISTINCTROW", 0, 0, 0, ""},
483 { "DIV", 0, 0, 0, ""},
484 { "DO", 0, 0, 0, ""},
485 { "DOUBLE", 0, 0, 0, ""},
486 { "DROP", 0, 0, 0, ""},
487 { "DUAL", 0, 0, 0, ""},
488 { "DUMPFILE", 0, 0, 0, ""},
489 { "DUPLICATE", 0, 0, 0, ""},
490 { "DYNAMIC", 0, 0, 0, ""},
491 { "EACH", 0, 0, 0, ""},
492 { "ELSE", 0, 0, 0, ""},
493 { "ELSEIF", 0, 0, 0, ""},
494 { "ENABLE", 0, 0, 0, ""},
495 { "ENCLOSED", 0, 0, 0, ""},
496 { "END", 0, 0, 0, ""},
497 { "ENGINE", 0, 0, 0, ""},
498 { "ENGINES", 0, 0, 0, ""},
499 { "ENUM", 0, 0, 0, ""},
500 { "ERRORS", 0, 0, 0, ""},
501 { "ESCAPE", 0, 0, 0, ""},
502 { "ESCAPED", 0, 0, 0, ""},
503 { "EVENTS", 0, 0, 0, ""},
504 { "EXECUTE", 0, 0, 0, ""},
505 { "EXISTS", 0, 0, 0, ""},
506 { "EXIT", 0, 0, 0, ""},
507 { "EXPANSION", 0, 0, 0, ""},
508 { "EXPLAIN", 0, 0, 0, ""},
509 { "EXTENDED", 0, 0, 0, ""},
510 { "FALSE", 0, 0, 0, ""},
511 { "FAST", 0, 0, 0, ""},
512 { "FETCH", 0, 0, 0, ""},
513 { "FIELDS", 0, 0, 0, ""},
514 { "FILE", 0, 0, 0, ""},
515 { "FIRST", 0, 0, 0, ""},
516 { "FIXED", 0, 0, 0, ""},
517 { "FLOAT", 0, 0, 0, ""},
518 { "FLOAT4", 0, 0, 0, ""},
519 { "FLOAT8", 0, 0, 0, ""},
520 { "FLUSH", 0, 0, 0, ""},
521 { "FOR", 0, 0, 0, ""},
522 { "FORCE", 0, 0, 0, ""},
523 { "FOREIGN", 0, 0, 0, ""},
524 { "FOUND", 0, 0, 0, ""},
525 { "FROM", 0, 0, 0, ""},
526 { "FULL", 0, 0, 0, ""},
527 { "FULLTEXT", 0, 0, 0, ""},
528 { "FUNCTION", 0, 0, 0, ""},
529 { "GEOMETRY", 0, 0, 0, ""},
530 { "GEOMETRYCOLLECTION", 0, 0, 0, ""},
531 { "GET_FORMAT", 0, 0, 0, ""},
532 { "GLOBAL", 0, 0, 0, ""},
533 { "GRANT", 0, 0, 0, ""},
534 { "GRANTS", 0, 0, 0, ""},
535 { "GROUP", 0, 0, 0, ""},
536 { "HANDLER", 0, 0, 0, ""},
537 { "HASH", 0, 0, 0, ""},
538 { "HAVING", 0, 0, 0, ""},
539 { "HELP", 0, 0, 0, ""},
540 { "HIGH_PRIORITY", 0, 0, 0, ""},
541 { "HOSTS", 0, 0, 0, ""},
542 { "HOUR", 0, 0, 0, ""},
543 { "HOUR_MICROSECOND", 0, 0, 0, ""},
544 { "HOUR_MINUTE", 0, 0, 0, ""},
545 { "HOUR_SECOND", 0, 0, 0, ""},
546 { "IDENTIFIED", 0, 0, 0, ""},
547 { "IF", 0, 0, 0, ""},
548 { "IGNORE", 0, 0, 0, ""},
549 { "IMPORT", 0, 0, 0, ""},
550 { "IN", 0, 0, 0, ""},
551 { "INDEX", 0, 0, 0, ""},
552 { "INDEXES", 0, 0, 0, ""},
553 { "INFILE", 0, 0, 0, ""},
554 { "INNER", 0, 0, 0, ""},
555 { "INNOBASE", 0, 0, 0, ""},
556 { "INNODB", 0, 0, 0, ""},
557 { "INOUT", 0, 0, 0, ""},
558 { "INSENSITIVE", 0, 0, 0, ""},
559 { "INSERT", 0, 0, 0, ""},
560 { "INSERT_METHOD", 0, 0, 0, ""},
561 { "INT", 0, 0, 0, ""},
562 { "INT1", 0, 0, 0, ""},
563 { "INT2", 0, 0, 0, ""},
564 { "INT3", 0, 0, 0, ""},
565 { "INT4", 0, 0, 0, ""},
566 { "INT8", 0, 0, 0, ""},
567 { "INTEGER", 0, 0, 0, ""},
568 { "INTERVAL", 0, 0, 0, ""},
569 { "INTO", 0, 0, 0, ""},
570 { "IO_THREAD", 0, 0, 0, ""},
571 { "IS", 0, 0, 0, ""},
572 { "ISOLATION", 0, 0, 0, ""},
573 { "ISSUER", 0, 0, 0, ""},
574 { "ITERATE", 0, 0, 0, ""},
575 { "INVOKER", 0, 0, 0, ""},
576 { "JOIN", 0, 0, 0, ""},
577 { "KEY", 0, 0, 0, ""},
578 { "KEYS", 0, 0, 0, ""},
579 { "KILL", 0, 0, 0, ""},
580 { "LANGUAGE", 0, 0, 0, ""},
581 { "LAST", 0, 0, 0, ""},
582 { "LEADING", 0, 0, 0, ""},
583 { "LEAVE", 0, 0, 0, ""},
584 { "LEAVES", 0, 0, 0, ""},
585 { "LEFT", 0, 0, 0, ""},
586 { "LEVEL", 0, 0, 0, ""},
587 { "LIKE", 0, 0, 0, ""},
588 { "LIMIT", 0, 0, 0, ""},
589 { "LINES", 0, 0, 0, ""},
590 { "LINESTRING", 0, 0, 0, ""},
591 { "LOAD", 0, 0, 0, ""},
592 { "LOCAL", 0, 0, 0, ""},
593 { "LOCALTIME", 0, 0, 0, ""},
594 { "LOCALTIMESTAMP", 0, 0, 0, ""},
595 { "LOCK", 0, 0, 0, ""},
596 { "LOCKS", 0, 0, 0, ""},
597 { "LOGS", 0, 0, 0, ""},
598 { "LONG", 0, 0, 0, ""},
599 { "LONGBLOB", 0, 0, 0, ""},
600 { "LONGTEXT", 0, 0, 0, ""},
601 { "LOOP", 0, 0, 0, ""},
602 { "LOW_PRIORITY", 0, 0, 0, ""},
603 { "MASTER", 0, 0, 0, ""},
604 { "MASTER_CONNECT_RETRY", 0, 0, 0, ""},
605 { "MASTER_HOST", 0, 0, 0, ""},
606 { "MASTER_LOG_FILE", 0, 0, 0, ""},
607 { "MASTER_LOG_POS", 0, 0, 0, ""},
608 { "MASTER_PASSWORD", 0, 0, 0, ""},
609 { "MASTER_PORT", 0, 0, 0, ""},
610 { "MASTER_SERVER_ID", 0, 0, 0, ""},
611 { "MASTER_SSL", 0, 0, 0, ""},
612 { "MASTER_SSL_CA", 0, 0, 0, ""},
613 { "MASTER_SSL_CAPATH", 0, 0, 0, ""},
614 { "MASTER_SSL_CERT", 0, 0, 0, ""},
615 { "MASTER_SSL_CIPHER", 0, 0, 0, ""},
616 { "MASTER_SSL_KEY", 0, 0, 0, ""},
617 { "MASTER_USER", 0, 0, 0, ""},
618 { "MATCH", 0, 0, 0, ""},
619 { "MAX_CONNECTIONS_PER_HOUR", 0, 0, 0, ""},
620 { "MAX_QUERIES_PER_HOUR", 0, 0, 0, ""},
621 { "MAX_ROWS", 0, 0, 0, ""},
622 { "MAX_UPDATES_PER_HOUR", 0, 0, 0, ""},
623 { "MAX_USER_CONNECTIONS", 0, 0, 0, ""},
624 { "MEDIUM", 0, 0, 0, ""},
625 { "MEDIUMBLOB", 0, 0, 0, ""},
626 { "MEDIUMINT", 0, 0, 0, ""},
627 { "MEDIUMTEXT", 0, 0, 0, ""},
628 { "MERGE", 0, 0, 0, ""},
629 { "MICROSECOND", 0, 0, 0, ""},
630 { "MIDDLEINT", 0, 0, 0, ""},
631 { "MIGRATE", 0, 0, 0, ""},
632 { "MINUTE", 0, 0, 0, ""},
633 { "MINUTE_MICROSECOND", 0, 0, 0, ""},
634 { "MINUTE_SECOND", 0, 0, 0, ""},
635 { "MIN_ROWS", 0, 0, 0, ""},
636 { "MOD", 0, 0, 0, ""},
637 { "MODE", 0, 0, 0, ""},
638 { "MODIFIES", 0, 0, 0, ""},
639 { "MODIFY", 0, 0, 0, ""},
640 { "MONTH", 0, 0, 0, ""},
641 { "MULTILINESTRING", 0, 0, 0, ""},
642 { "MULTIPOINT", 0, 0, 0, ""},
643 { "MULTIPOLYGON", 0, 0, 0, ""},
644 { "MUTEX", 0, 0, 0, ""},
645 { "NAME", 0, 0, 0, ""},
646 { "NAMES", 0, 0, 0, ""},
647 { "NATIONAL", 0, 0, 0, ""},
648 { "NATURAL", 0, 0, 0, ""},
649 { "NDB", 0, 0, 0, ""},
650 { "NDBCLUSTER", 0, 0, 0, ""},
651 { "NCHAR", 0, 0, 0, ""},
652 { "NEW", 0, 0, 0, ""},
653 { "NEXT", 0, 0, 0, ""},
654 { "NO", 0, 0, 0, ""},
655 { "NONE", 0, 0, 0, ""},
656 { "NOT", 0, 0, 0, ""},
657 { "NO_WRITE_TO_BINLOG", 0, 0, 0, ""},
658 { "NULL", 0, 0, 0, ""},
659 { "NUMERIC", 0, 0, 0, ""},
660 { "NVARCHAR", 0, 0, 0, ""},
661 { "OFFSET", 0, 0, 0, ""},
662 { "OLD_PASSWORD", 0, 0, 0, ""},
663 { "ON", 0, 0, 0, ""},
664 { "ONE", 0, 0, 0, ""},
665 { "ONE_SHOT", 0, 0, 0, ""},
666 { "OPEN", 0, 0, 0, ""},
667 { "OPTIMIZE", 0, 0, 0, ""},
668 { "OPTION", 0, 0, 0, ""},
669 { "OPTIONALLY", 0, 0, 0, ""},
670 { "OR", 0, 0, 0, ""},
671 { "ORDER", 0, 0, 0, ""},
672 { "OUT", 0, 0, 0, ""},
673 { "OUTER", 0, 0, 0, ""},
674 { "OUTFILE", 0, 0, 0, ""},
675 { "PACK_KEYS", 0, 0, 0, ""},
676 { "PARTIAL", 0, 0, 0, ""},
677 { "PASSWORD", 0, 0, 0, ""},
678 { "PHASE", 0, 0, 0, ""},
679 { "POINT", 0, 0, 0, ""},
680 { "POLYGON", 0, 0, 0, ""},
681 { "PRECISION", 0, 0, 0, ""},
682 { "PREPARE", 0, 0, 0, ""},
683 { "PREV", 0, 0, 0, ""},
684 { "PRIMARY", 0, 0, 0, ""},
685 { "PRIVILEGES", 0, 0, 0, ""},
686 { "PROCEDURE", 0, 0, 0, ""},
687 { "PROCESS", 0, 0, 0, ""},
688 { "PROCESSLIST", 0, 0, 0, ""},
689 { "PURGE", 0, 0, 0, ""},
690 { "QUARTER", 0, 0, 0, ""},
691 { "QUERY", 0, 0, 0, ""},
692 { "QUICK", 0, 0, 0, ""},
693 { "READ", 0, 0, 0, ""},
694 { "READS", 0, 0, 0, ""},
695 { "REAL", 0, 0, 0, ""},
696 { "RECOVER", 0, 0, 0, ""},
697 { "REDUNDANT", 0, 0, 0, ""},
698 { "REFERENCES", 0, 0, 0, ""},
699 { "REGEXP", 0, 0, 0, ""},
700 { "RELAY_LOG_FILE", 0, 0, 0, ""},
701 { "RELAY_LOG_POS", 0, 0, 0, ""},
702 { "RELAY_THREAD", 0, 0, 0, ""},
703 { "RELEASE", 0, 0, 0, ""},
704 { "RELOAD", 0, 0, 0, ""},
705 { "RENAME", 0, 0, 0, ""},
706 { "REPAIR", 0, 0, 0, ""},
707 { "REPEATABLE", 0, 0, 0, ""},
708 { "REPLACE", 0, 0, 0, ""},
709 { "REPLICATION", 0, 0, 0, ""},
710 { "REPEAT", 0, 0, 0, ""},
711 { "REQUIRE", 0, 0, 0, ""},
712 { "RESET", 0, 0, 0, ""},
713 { "RESTORE", 0, 0, 0, ""},
714 { "RESTRICT", 0, 0, 0, ""},
715 { "RESUME", 0, 0, 0, ""},
716 { "RETURN", 0, 0, 0, ""},
717 { "RETURNS", 0, 0, 0, ""},
718 { "REVOKE", 0, 0, 0, ""},
719 { "RIGHT", 0, 0, 0, ""},
720 { "RLIKE", 0, 0, 0, ""},
721 { "ROLLBACK", 0, 0, 0, ""},
722 { "ROLLUP", 0, 0, 0, ""},
723 { "ROUTINE", 0, 0, 0, ""},
724 { "ROW", 0, 0, 0, ""},
725 { "ROWS", 0, 0, 0, ""},
726 { "ROW_FORMAT", 0, 0, 0, ""},
727 { "RTREE", 0, 0, 0, ""},
728 { "SAVEPOINT", 0, 0, 0, ""},
729 { "SCHEMA", 0, 0, 0, ""},
730 { "SCHEMAS", 0, 0, 0, ""},
731 { "SECOND", 0, 0, 0, ""},
732 { "SECOND_MICROSECOND", 0, 0, 0, ""},
733 { "SECURITY", 0, 0, 0, ""},
734 { "SELECT", 0, 0, 0, ""},
735 { "SENSITIVE", 0, 0, 0, ""},
736 { "SEPARATOR", 0, 0, 0, ""},
737 { "SERIAL", 0, 0, 0, ""},
738 { "SERIALIZABLE", 0, 0, 0, ""},
739 { "SESSION", 0, 0, 0, ""},
740 { "SET", 0, 0, 0, ""},
741 { "SHARE", 0, 0, 0, ""},
742 { "SHOW", 0, 0, 0, ""},
743 { "SHUTDOWN", 0, 0, 0, ""},
744 { "SIGNED", 0, 0, 0, ""},
745 { "SIMPLE", 0, 0, 0, ""},
746 { "SLAVE", 0, 0, 0, ""},
747 { "SNAPSHOT", 0, 0, 0, ""},
748 { "SMALLINT", 0, 0, 0, ""},
749 { "SOME", 0, 0, 0, ""},
750 { "SONAME", 0, 0, 0, ""},
751 { "SOUNDS", 0, 0, 0, ""},
752 { "SPATIAL", 0, 0, 0, ""},
753 { "SPECIFIC", 0, 0, 0, ""},
754 { "SQL", 0, 0, 0, ""},
755 { "SQLEXCEPTION", 0, 0, 0, ""},
756 { "SQLSTATE", 0, 0, 0, ""},
757 { "SQLWARNING", 0, 0, 0, ""},
758 { "SQL_BIG_RESULT", 0, 0, 0, ""},
759 { "SQL_BUFFER_RESULT", 0, 0, 0, ""},
760 { "SQL_CACHE", 0, 0, 0, ""},
761 { "SQL_CALC_FOUND_ROWS", 0, 0, 0, ""},
762 { "SQL_NO_CACHE", 0, 0, 0, ""},
763 { "SQL_SMALL_RESULT", 0, 0, 0, ""},
764 { "SQL_THREAD", 0, 0, 0, ""},
765 { "SQL_TSI_SECOND", 0, 0, 0, ""},
766 { "SQL_TSI_MINUTE", 0, 0, 0, ""},
767 { "SQL_TSI_HOUR", 0, 0, 0, ""},
768 { "SQL_TSI_DAY", 0, 0, 0, ""},
769 { "SQL_TSI_WEEK", 0, 0, 0, ""},
770 { "SQL_TSI_MONTH", 0, 0, 0, ""},
771 { "SQL_TSI_QUARTER", 0, 0, 0, ""},
772 { "SQL_TSI_YEAR", 0, 0, 0, ""},
773 { "SSL", 0, 0, 0, ""},
774 { "START", 0, 0, 0, ""},
775 { "STARTING", 0, 0, 0, ""},
776 { "STATUS", 0, 0, 0, ""},
777 { "STOP", 0, 0, 0, ""},
778 { "STORAGE", 0, 0, 0, ""},
779 { "STRAIGHT_JOIN", 0, 0, 0, ""},
780 { "STRING", 0, 0, 0, ""},
781 { "STRIPED", 0, 0, 0, ""},
782 { "SUBJECT", 0, 0, 0, ""},
783 { "SUPER", 0, 0, 0, ""},
784 { "SUSPEND", 0, 0, 0, ""},
785 { "TABLE", 0, 0, 0, ""},
786 { "TABLES", 0, 0, 0, ""},
787 { "TABLESPACE", 0, 0, 0, ""},
788 { "TEMPORARY", 0, 0, 0, ""},
789 { "TEMPTABLE", 0, 0, 0, ""},
790 { "TERMINATED", 0, 0, 0, ""},
791 { "TEXT", 0, 0, 0, ""},
792 { "THEN", 0, 0, 0, ""},
793 { "TIME", 0, 0, 0, ""},
794 { "TIMESTAMP", 0, 0, 0, ""},
795 { "TIMESTAMPADD", 0, 0, 0, ""},
796 { "TIMESTAMPDIFF", 0, 0, 0, ""},
797 { "TINYBLOB", 0, 0, 0, ""},
798 { "TINYINT", 0, 0, 0, ""},
799 { "TINYTEXT", 0, 0, 0, ""},
800 { "TO", 0, 0, 0, ""},
801 { "TRAILING", 0, 0, 0, ""},
802 { "TRANSACTION", 0, 0, 0, ""},
803 { "TRIGGER", 0, 0, 0, ""},
804 { "TRIGGERS", 0, 0, 0, ""},
805 { "TRUE", 0, 0, 0, ""},
806 { "TRUNCATE", 0, 0, 0, ""},
807 { "TYPE", 0, 0, 0, ""},
808 { "TYPES", 0, 0, 0, ""},
809 { "UNCOMMITTED", 0, 0, 0, ""},
810 { "UNDEFINED", 0, 0, 0, ""},
811 { "UNDO", 0, 0, 0, ""},
812 { "UNICODE", 0, 0, 0, ""},
813 { "UNION", 0, 0, 0, ""},
814 { "UNIQUE", 0, 0, 0, ""},
815 { "UNKNOWN", 0, 0, 0, ""},
816 { "UNLOCK", 0, 0, 0, ""},
817 { "UNSIGNED", 0, 0, 0, ""},
818 { "UNTIL", 0, 0, 0, ""},
819 { "UPDATE", 0, 0, 0, ""},
820 { "UPGRADE", 0, 0, 0, ""},
821 { "USAGE", 0, 0, 0, ""},
822 { "USE", 0, 0, 0, ""},
823 { "USER", 0, 0, 0, ""},
824 { "USER_RESOURCES", 0, 0, 0, ""},
825 { "USE_FRM", 0, 0, 0, ""},
826 { "USING", 0, 0, 0, ""},
827 { "UTC_DATE", 0, 0, 0, ""},
828 { "UTC_TIME", 0, 0, 0, ""},
829 { "UTC_TIMESTAMP", 0, 0, 0, ""},
830 { "VALUE", 0, 0, 0, ""},
831 { "VALUES", 0, 0, 0, ""},
832 { "VARBINARY", 0, 0, 0, ""},
833 { "VARCHAR", 0, 0, 0, ""},
834 { "VARCHARACTER", 0, 0, 0, ""},
835 { "VARIABLES", 0, 0, 0, ""},
836 { "VARYING", 0, 0, 0, ""},
837 { "WARNINGS", 0, 0, 0, ""},
838 { "WEEK", 0, 0, 0, ""},
839 { "WHEN", 0, 0, 0, ""},
840 { "WHERE", 0, 0, 0, ""},
841 { "WHILE", 0, 0, 0, ""},
842 { "VIEW", 0, 0, 0, ""},
843 { "WITH", 0, 0, 0, ""},
844 { "WORK", 0, 0, 0, ""},
845 { "WRITE", 0, 0, 0, ""},
846 { "X509", 0, 0, 0, ""},
847 { "XOR", 0, 0, 0, ""},
848 { "XA", 0, 0, 0, ""},
849 { "YEAR", 0, 0, 0, ""},
850 { "YEAR_MONTH", 0, 0, 0, ""},
851 { "ZEROFILL", 0, 0, 0, ""},
852 { "ABS", 0, 0, 0, ""},
853 { "ACOS", 0, 0, 0, ""},
854 { "ADDDATE", 0, 0, 0, ""},
855 { "ADDTIME", 0, 0, 0, ""},
856 { "AES_ENCRYPT", 0, 0, 0, ""},
857 { "AES_DECRYPT", 0, 0, 0, ""},
858 { "AREA", 0, 0, 0, ""},
859 { "ASIN", 0, 0, 0, ""},
860 { "ASBINARY", 0, 0, 0, ""},
861 { "ASTEXT", 0, 0, 0, ""},
862 { "ASWKB", 0, 0, 0, ""},
863 { "ASWKT", 0, 0, 0, ""},
864 { "ATAN", 0, 0, 0, ""},
865 { "ATAN2", 0, 0, 0, ""},
866 { "BENCHMARK", 0, 0, 0, ""},
867 { "BIN", 0, 0, 0, ""},
868 { "BIT_COUNT", 0, 0, 0, ""},
869 { "BIT_OR", 0, 0, 0, ""},
870 { "BIT_AND", 0, 0, 0, ""},
871 { "BIT_XOR", 0, 0, 0, ""},
872 { "CAST", 0, 0, 0, ""},
873 { "CEIL", 0, 0, 0, ""},
874 { "CEILING", 0, 0, 0, ""},
875 { "BIT_LENGTH", 0, 0, 0, ""},
876 { "CENTROID", 0, 0, 0, ""},
877 { "CHAR_LENGTH", 0, 0, 0, ""},
878 { "CHARACTER_LENGTH", 0, 0, 0, ""},
879 { "COALESCE", 0, 0, 0, ""},
880 { "COERCIBILITY", 0, 0, 0, ""},
881 { "COMPRESS", 0, 0, 0, ""},
882 { "CONCAT", 0, 0, 0, ""},
883 { "CONCAT_WS", 0, 0, 0, ""},
884 { "CONNECTION_ID", 0, 0, 0, ""},
885 { "CONV", 0, 0, 0, ""},
886 { "CONVERT_TZ", 0, 0, 0, ""},
887 { "COUNT", 0, 0, 0, ""},
888 { "COS", 0, 0, 0, ""},
889 { "COT", 0, 0, 0, ""},
890 { "CRC32", 0, 0, 0, ""},
891 { "CROSSES", 0, 0, 0, ""},
892 { "CURDATE", 0, 0, 0, ""},
893 { "CURTIME", 0, 0, 0, ""},
894 { "DATE_ADD", 0, 0, 0, ""},
895 { "DATEDIFF", 0, 0, 0, ""},
896 { "DATE_FORMAT", 0, 0, 0, ""},
897 { "DATE_SUB", 0, 0, 0, ""},
898 { "DAYNAME", 0, 0, 0, ""},
899 { "DAYOFMONTH", 0, 0, 0, ""},
900 { "DAYOFWEEK", 0, 0, 0, ""},
901 { "DAYOFYEAR", 0, 0, 0, ""},
902 { "DECODE", 0, 0, 0, ""},
903 { "DEGREES", 0, 0, 0, ""},
904 { "DES_ENCRYPT", 0, 0, 0, ""},
905 { "DES_DECRYPT", 0, 0, 0, ""},
906 { "DIMENSION", 0, 0, 0, ""},
907 { "DISJOINT", 0, 0, 0, ""},
908 { "ELT", 0, 0, 0, ""},
909 { "ENCODE", 0, 0, 0, ""},
910 { "ENCRYPT", 0, 0, 0, ""},
911 { "ENDPOINT", 0, 0, 0, ""},
912 { "ENVELOPE", 0, 0, 0, ""},
913 { "EQUALS", 0, 0, 0, ""},
914 { "EXTERIORRING", 0, 0, 0, ""},
915 { "EXTRACT", 0, 0, 0, ""},
916 { "EXP", 0, 0, 0, ""},
917 { "EXPORT_SET", 0, 0, 0, ""},
918 { "FIELD", 0, 0, 0, ""},
919 { "FIND_IN_SET", 0, 0, 0, ""},
920 { "FLOOR", 0, 0, 0, ""},
921 { "FORMAT", 0, 0, 0, ""},
922 { "FOUND_ROWS", 0, 0, 0, ""},
923 { "FROM_DAYS", 0, 0, 0, ""},
924 { "FROM_UNIXTIME", 0, 0, 0, ""},
925 { "GET_LOCK", 0, 0, 0, ""},
926 { "GEOMETRYN", 0, 0, 0, ""},
927 { "GEOMETRYTYPE", 0, 0, 0, ""},
928 { "GEOMCOLLFROMTEXT", 0, 0, 0, ""},
929 { "GEOMCOLLFROMWKB", 0, 0, 0, ""},
930 { "GEOMETRYCOLLECTIONFROMTEXT", 0, 0, 0, ""},
931 { "GEOMETRYCOLLECTIONFROMWKB", 0, 0, 0, ""},
932 { "GEOMETRYFROMTEXT", 0, 0, 0, ""},
933 { "GEOMETRYFROMWKB", 0, 0, 0, ""},
934 { "GEOMFROMTEXT", 0, 0, 0, ""},
935 { "GEOMFROMWKB", 0, 0, 0, ""},
936 { "GLENGTH", 0, 0, 0, ""},
937 { "GREATEST", 0, 0, 0, ""},
938 { "GROUP_CONCAT", 0, 0, 0, ""},
939 { "GROUP_UNIQUE_USERS", 0, 0, 0, ""},
940 { "HEX", 0, 0, 0, ""},
941 { "IFNULL", 0, 0, 0, ""},
942 { "INET_ATON", 0, 0, 0, ""},
943 { "INET_NTOA", 0, 0, 0, ""},
944 { "INSTR", 0, 0, 0, ""},
945 { "INTERIORRINGN", 0, 0, 0, ""},
946 { "INTERSECTS", 0, 0, 0, ""},
947 { "ISCLOSED", 0, 0, 0, ""},
948 { "ISEMPTY", 0, 0, 0, ""},
949 { "ISNULL", 0, 0, 0, ""},
950 { "IS_FREE_LOCK", 0, 0, 0, ""},
951 { "IS_USED_LOCK", 0, 0, 0, ""},
952 { "LAST_INSERT_ID", 0, 0, 0, ""},
953 { "ISSIMPLE", 0, 0, 0, ""},
954 { "LAST_DAY", 0, 0, 0, ""},
955 { "LCASE", 0, 0, 0, ""},
956 { "LEAST", 0, 0, 0, ""},
957 { "LENGTH", 0, 0, 0, ""},
958 { "LN", 0, 0, 0, ""},
959 { "LINEFROMTEXT", 0, 0, 0, ""},
960 { "LINEFROMWKB", 0, 0, 0, ""},
961 { "LINESTRINGFROMTEXT", 0, 0, 0, ""},
962 { "LINESTRINGFROMWKB", 0, 0, 0, ""},
963 { "LOAD_FILE", 0, 0, 0, ""},
964 { "LOCATE", 0, 0, 0, ""},
965 { "LOG", 0, 0, 0, ""},
966 { "LOG2", 0, 0, 0, ""},
967 { "LOG10", 0, 0, 0, ""},
968 { "LOWER", 0, 0, 0, ""},
969 { "LPAD", 0, 0, 0, ""},
970 { "LTRIM", 0, 0, 0, ""},
971 { "MAKE_SET", 0, 0, 0, ""},
972 { "MAKEDATE", 0, 0, 0, ""},
973 { "MAKETIME", 0, 0, 0, ""},
974 { "MASTER_POS_WAIT", 0, 0, 0, ""},
975 { "MAX", 0, 0, 0, ""},
976 { "MBRCONTAINS", 0, 0, 0, ""},
977 { "MBRDISJOINT", 0, 0, 0, ""},
978 { "MBREQUAL", 0, 0, 0, ""},
979 { "MBRINTERSECTS", 0, 0, 0, ""},
980 { "MBROVERLAPS", 0, 0, 0, ""},
981 { "MBRTOUCHES", 0, 0, 0, ""},
982 { "MBRWITHIN", 0, 0, 0, ""},
983 { "MD5", 0, 0, 0, ""},
984 { "MID", 0, 0, 0, ""},
985 { "MIN", 0, 0, 0, ""},
986 { "MLINEFROMTEXT", 0, 0, 0, ""},
987 { "MLINEFROMWKB", 0, 0, 0, ""},
988 { "MPOINTFROMTEXT", 0, 0, 0, ""},
989 { "MPOINTFROMWKB", 0, 0, 0, ""},
990 { "MPOLYFROMTEXT", 0, 0, 0, ""},
991 { "MPOLYFROMWKB", 0, 0, 0, ""},
992 { "MONTHNAME", 0, 0, 0, ""},
993 { "MULTILINESTRINGFROMTEXT", 0, 0, 0, ""},
994 { "MULTILINESTRINGFROMWKB", 0, 0, 0, ""},
995 { "MULTIPOINTFROMTEXT", 0, 0, 0, ""},
996 { "MULTIPOINTFROMWKB", 0, 0, 0, ""},
997 { "MULTIPOLYGONFROMTEXT", 0, 0, 0, ""},
998 { "MULTIPOLYGONFROMWKB", 0, 0, 0, ""},
999 { "NAME_CONST", 0, 0, 0, ""},
1000 { "NOW", 0, 0, 0, ""},
1001 { "NULLIF", 0, 0, 0, ""},
1002 { "NUMGEOMETRIES", 0, 0, 0, ""},
1003 { "NUMINTERIORRINGS", 0, 0, 0, ""},
1004 { "NUMPOINTS", 0, 0, 0, ""},
1005 { "OCTET_LENGTH", 0, 0, 0, ""},
1006 { "OCT", 0, 0, 0, ""},
1007 { "ORD", 0, 0, 0, ""},
1008 { "OVERLAPS", 0, 0, 0, ""},
1009 { "PERIOD_ADD", 0, 0, 0, ""},
1010 { "PERIOD_DIFF", 0, 0, 0, ""},
1011 { "PI", 0, 0, 0, ""},
1012 { "POINTFROMTEXT", 0, 0, 0, ""},
1013 { "POINTFROMWKB", 0, 0, 0, ""},
1014 { "POINTN", 0, 0, 0, ""},
1015 { "POLYFROMTEXT", 0, 0, 0, ""},
1016 { "POLYFROMWKB", 0, 0, 0, ""},
1017 { "POLYGONFROMTEXT", 0, 0, 0, ""},
1018 { "POLYGONFROMWKB", 0, 0, 0, ""},
1019 { "POSITION", 0, 0, 0, ""},
1020 { "POW", 0, 0, 0, ""},
1021 { "POWER", 0, 0, 0, ""},
1022 { "QUOTE", 0, 0, 0, ""},
1023 { "RADIANS", 0, 0, 0, ""},
1024 { "RAND", 0, 0, 0, ""},
1025 { "RELEASE_LOCK", 0, 0, 0, ""},
1026 { "REVERSE", 0, 0, 0, ""},
1027 { "ROUND", 0, 0, 0, ""},
1028 { "ROW_COUNT", 0, 0, 0, ""},
1029 { "RPAD", 0, 0, 0, ""},
1030 { "RTRIM", 0, 0, 0, ""},
1031 { "SEC_TO_TIME", 0, 0, 0, ""},
1032 { "SESSION_USER", 0, 0, 0, ""},
1033 { "SUBDATE", 0, 0, 0, ""},
1034 { "SIGN", 0, 0, 0, ""},
1035 { "SIN", 0, 0, 0, ""},
1036 { "SHA", 0, 0, 0, ""},
1037 { "SHA1", 0, 0, 0, ""},
1038 { "SLEEP", 0, 0, 0, ""},
1039 { "SOUNDEX", 0, 0, 0, ""},
1040 { "SPACE", 0, 0, 0, ""},
1041 { "SQRT", 0, 0, 0, ""},
1042 { "SRID", 0, 0, 0, ""},
1043 { "STARTPOINT", 0, 0, 0, ""},
1044 { "STD", 0, 0, 0, ""},
1045 { "STDDEV", 0, 0, 0, ""},
1046 { "STDDEV_POP", 0, 0, 0, ""},
1047 { "STDDEV_SAMP", 0, 0, 0, ""},
1048 { "STR_TO_DATE", 0, 0, 0, ""},
1049 { "STRCMP", 0, 0, 0, ""},
1050 { "SUBSTR", 0, 0, 0, ""},
1051 { "SUBSTRING", 0, 0, 0, ""},
1052 { "SUBSTRING_INDEX", 0, 0, 0, ""},
1053 { "SUBTIME", 0, 0, 0, ""},
1054 { "SUM", 0, 0, 0, ""},
1055 { "SYSDATE", 0, 0, 0, ""},
1056 { "SYSTEM_USER", 0, 0, 0, ""},
1057 { "TAN", 0, 0, 0, ""},
1058 { "TIME_FORMAT", 0, 0, 0, ""},
1059 { "TIME_TO_SEC", 0, 0, 0, ""},
1060 { "TIMEDIFF", 0, 0, 0, ""},
1061 { "TO_DAYS", 0, 0, 0, ""},
1062 { "TOUCHES", 0, 0, 0, ""},
1063 { "TRIM", 0, 0, 0, ""},
1064 { "UCASE", 0, 0, 0, ""},
1065 { "UNCOMPRESS", 0, 0, 0, ""},
1066 { "UNCOMPRESSED_LENGTH", 0, 0, 0, ""},
1067 { "UNHEX", 0, 0, 0, ""},
1068 { "UNIQUE_USERS", 0, 0, 0, ""},
1069 { "UNIX_TIMESTAMP", 0, 0, 0, ""},
1070 { "UPPER", 0, 0, 0, ""},
1071 { "UUID", 0, 0, 0, ""},
1072 { "VARIANCE", 0, 0, 0, ""},
1073 { "VAR_POP", 0, 0, 0, ""},
1074 { "VAR_SAMP", 0, 0, 0, ""},
1075 { "VERSION", 0, 0, 0, ""},
1076 { "WEEKDAY", 0, 0, 0, ""},
1077 { "WEEKOFYEAR", 0, 0, 0, ""},
1078 { "WITHIN", 0, 0, 0, ""},
1079 { "X", 0, 0, 0, ""},
1080 { "Y", 0, 0, 0, ""},
1081 { "YEARWEEK", 0, 0, 0, ""},
1082 /* end sentinel */
1083 { (char *)NULL, 0, 0, 0, ""}
1084};
1085
1086static const char *load_default_groups[]= { "mysql","client",0 };
1087
1088static int embedded_server_arg_count= 0;
1089static char *embedded_server_args[MAX_SERVER_ARGS];
1090static const char *embedded_server_groups[]=
1091{ "server", "embedded", "mysql_SERVER", 0 };
1092
1093#ifdef HAVE_READLINE
1094/*
1095 HIST_ENTRY is defined for libedit, but not for the real readline
1096 Need to redefine it for real readline to find it
1097*/
1098#if !defined(HAVE_HIST_ENTRY)
1099typedef struct _hist_entry {
1100 const char *line;
1101 const char *data;
1102} HIST_ENTRY;
1103#endif
1104
1105extern "C" int add_history(const char *command); /* From readline directory */
1106extern "C" int read_history(const char *command);
1107extern "C" int write_history(const char *command);
1108extern "C" HIST_ENTRY *history_get(int num);
1109extern "C" int history_length;
1110static int not_in_history(const char *line);
1111static void initialize_readline (char *name);
1112static void fix_history(String *final_command);
1113#endif
1114
1115static COMMANDS *find_command(char *name);
1116static COMMANDS *find_command(char cmd_name);
1117static bool add_line(String &buffer, char *line, ulong line_length,
1118 char *in_string, bool *ml_comment, bool truncated);
1119static void remove_cntrl(String &buffer);
1120static void print_table_data(MYSQL_RES *result);
1121static void print_table_data_html(MYSQL_RES *result);
1122static void print_table_data_xml(MYSQL_RES *result);
1123static void print_tab_data(MYSQL_RES *result);
1124static void print_table_data_vertically(MYSQL_RES *result);
1125static void print_warnings(void);
1126static ulong start_timer(void);
1127static void end_timer(ulong start_time,char *buff);
1128static void mysql_end_timer(ulong start_time,char *buff);
1129static void nice_time(double sec,char *buff,bool part_second);
1130extern "C" sig_handler mysql_end(int sig);
1131extern "C" sig_handler handle_kill_signal(int sig);
1132#if defined(HAVE_TERMIOS_H) && defined(GWINSZ_IN_SYS_IOCTL)
1133static sig_handler window_resize(int sig);
1134#endif
1135
1136const char DELIMITER_NAME[]= "delimiter";
1137const uint DELIMITER_NAME_LEN= sizeof(DELIMITER_NAME) - 1;
1138inline bool is_delimiter_command(char *name, ulong len)
1139{
1140 /*
1141 Delimiter command has a parameter, so the length of the whole command
1142 is larger than DELIMITER_NAME_LEN. We don't care the parameter, so
1143 only name(first DELIMITER_NAME_LEN bytes) is checked.
1144 */
1145 return (len >= DELIMITER_NAME_LEN &&
1146 !my_strnncoll(charset_info, (uchar*) name, DELIMITER_NAME_LEN,
1147 (uchar *) DELIMITER_NAME, DELIMITER_NAME_LEN));
1148}
1149
1150/**
1151 Get the index of a command in the commands array.
1152
1153 @param cmd_char Short form command.
1154
1155 @return int
1156 The index of the command is returned if it is found, else -1 is returned.
1157*/
1158inline int get_command_index(char cmd_char)
1159{
1160 /*
1161 All client-specific commands are in the first part of commands array
1162 and have a function to implement it.
1163 */
1164 for (uint i= 0; *commands[i].func; i++)
1165 if (commands[i].cmd_char == cmd_char)
1166 return i;
1167 return -1;
1168}
1169
1170static int delimiter_index= -1;
1171static int charset_index= -1;
1172static bool real_binary_mode= FALSE;
1173
1174#ifdef _WIN32
1175BOOL windows_ctrl_handler(DWORD fdwCtrlType)
1176{
1177 switch (fdwCtrlType)
1178 {
1179 case CTRL_C_EVENT:
1180 case CTRL_BREAK_EVENT:
1181 if (!opt_sigint_ignore)
1182 handle_kill_signal(SIGINT);
1183 /* Indicate that signal has beed handled. */
1184 return TRUE;
1185 case CTRL_CLOSE_EVENT:
1186 case CTRL_LOGOFF_EVENT:
1187 case CTRL_SHUTDOWN_EVENT:
1188 handle_kill_signal(SIGINT + 1);
1189 }
1190 /* Pass signal to the next control handler function. */
1191 return FALSE;
1192}
1193#endif
1194
1195
1196int main(int argc,char *argv[])
1197{
1198 char buff[80];
1199
1200 MY_INIT(argv[0]);
1201 DBUG_ENTER("main");
1202 DBUG_PROCESS(argv[0]);
1203
1204 charset_index= get_command_index('C');
1205 delimiter_index= get_command_index('d');
1206 delimiter_str= delimiter;
1207 default_prompt = my_strdup(getenv("MYSQL_PS1") ?
1208 getenv("MYSQL_PS1") :
1209 "mysql> ",MYF(MY_WME));
1210 current_prompt = my_strdup(default_prompt,MYF(MY_WME));
1211 prompt_counter=0;
1212
1213 outfile[0]=0; // no (default) outfile
1214 strmov(pager, "stdout"); // the default, if --pager wasn't given
1215 {
1216 char *tmp=getenv("PAGER");
1217 if (tmp && strlen(tmp))
1218 {
1219 default_pager_set= 1;
1220 strmov(default_pager, tmp);
1221 }
1222 }
1223 if (!isatty(0) || !isatty(1))
1224 {
1225 status.batch=1; opt_silent=1;
1226 ignore_errors=0;
1227 }
1228 else
1229 status.add_to_history=1;
1230 status.exit_status=1;
1231
1232 {
1233 /*
1234 The file descriptor-layer may be out-of-sync with the file-number layer,
1235 so we make sure that "stdout" is really open. If its file is closed then
1236 explicitly close the FD layer.
1237 */
1238 int stdout_fileno_copy;
1239 stdout_fileno_copy= dup(fileno(stdout)); /* Okay if fileno fails. */
1240 if (stdout_fileno_copy == -1)
1241 fclose(stdout);
1242 else
1243 close(stdout_fileno_copy); /* Clean up dup(). */
1244 }
1245
1246#ifdef __WIN__
1247 /* Convert command line parameters from UTF16LE to UTF8MB4. */
1248 my_win_translate_command_line_args(&my_charset_utf8mb4_bin, &argc, &argv);
1249#endif
1250
1251 my_getopt_use_args_separator= TRUE;
1252 if (load_defaults("my",load_default_groups,&argc,&argv))
1253 {
1254 my_end(0);
1255 exit(1);
1256 }
1257 my_getopt_use_args_separator= FALSE;
1258
1259 defaults_argv=argv;
1260 if (get_options(argc, (char **) argv))
1261 {
1262 free_defaults(defaults_argv);
1263 my_end(0);
1264 exit(1);
1265 }
1266 if (status.batch && !status.line_buff &&
1267 !(status.line_buff= batch_readline_init(MAX_BATCH_BUFFER_SIZE, stdin)))
1268 {
1269 put_info("Can't initialize batch_readline - may be the input source is "
1270 "a directory or a block device.", INFO_ERROR, 0);
1271 free_defaults(defaults_argv);
1272 my_end(0);
1273 exit(1);
1274 }
1275 if (mysql_server_init(embedded_server_arg_count, embedded_server_args,
1276 (char**) embedded_server_groups))
1277 {
1278 put_error(NULL);
1279 free_defaults(defaults_argv);
1280 my_end(0);
1281 exit(1);
1282 }
1283 glob_buffer.realloc(512);
1284 completion_hash_init(&ht, 128);
1285 init_alloc_root(&hash_mem_root, 16384, 0);
1286 memset(&mysql, 0, sizeof(mysql));
1287 if (sql_connect(current_host,current_db,current_user,opt_password,
1288 opt_silent))
1289 {
1290 quick= 1; // Avoid history
1291 status.exit_status= 1;
1292 mysql_end(-1);
1293 }
1294 if (!status.batch)
1295 ignore_errors=1; // Don't abort monitor
1296
1297#ifndef _WIN32
1298 if (opt_sigint_ignore)
1299 signal(SIGINT, SIG_IGN);
1300 else
1301 signal(SIGINT, handle_kill_signal); // Catch SIGINT to clean up
1302 signal(SIGQUIT, mysql_end); // Catch SIGQUIT to clean up
1303 signal(SIGHUP, handle_kill_signal); // Catch SIGHUP to clean up
1304#else
1305 SetConsoleCtrlHandler((PHANDLER_ROUTINE) windows_ctrl_handler, TRUE);
1306#endif
1307
1308
1309#if defined(HAVE_TERMIOS_H) && defined(GWINSZ_IN_SYS_IOCTL)
1310 /* Readline will call this if it installs a handler */
1311 signal(SIGWINCH, window_resize);
1312 /* call the SIGWINCH handler to get the default term width */
1313 window_resize(0);
1314#endif
1315
1316 put_info("Welcome to the MySQL monitor. Commands end with ; or \\g.",
1317 INFO_INFO);
1318 sprintf((char*) glob_buffer.ptr(),
1319 "Your MySQL connection id is %lu\nServer version: %s\n",
1320 mysql_thread_id(&mysql), server_version_string(&mysql));
1321 put_info((char*) glob_buffer.ptr(),INFO_INFO);
1322
1323 put_info(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"), INFO_INFO);
1324
1325#ifdef HAVE_READLINE
1326 initialize_readline((char*) my_progname);
1327 if (!status.batch && !quick && !opt_html && !opt_xml)
1328 {
1329 init_dynamic_string(&histignore_buffer, "*IDENTIFIED*:*PASSWORD*",
1330 1024, 1024);
1331
1332 /*
1333 More history-ignore patterns can be supplied using either --histignore
1334 option or MYSQL_HISTIGNORE environment variable. If supplied, it will
1335 get appended to the default pattern (*IDENTIFIED*:*PASSWORD*). In case
1336 both are specified, pattern(s) supplied using --histignore option will
1337 be used.
1338 */
1339 if (opt_histignore)
1340 {
1341 dynstr_append(&histignore_buffer, ":");
1342 dynstr_append(&histignore_buffer, opt_histignore);
1343 }
1344 else if (getenv("MYSQL_HISTIGNORE"))
1345 {
1346 dynstr_append(&histignore_buffer, ":");
1347 dynstr_append(&histignore_buffer, getenv("MYSQL_HISTIGNORE"));
1348 }
1349
1350 parse_histignore();
1351
1352 /* read-history from file, default ~/.mysql_history*/
1353 if (getenv("MYSQL_HISTFILE"))
1354 histfile=my_strdup(getenv("MYSQL_HISTFILE"),MYF(MY_WME));
1355 else if (getenv("HOME"))
1356 {
1357 histfile=(char*) my_malloc((uint) strlen(getenv("HOME"))
1358 + (uint) strlen("/.mysql_history")+2,
1359 MYF(MY_WME));
1360 if (histfile)
1361 sprintf(histfile,"%s/.mysql_history",getenv("HOME"));
1362 char link_name[FN_REFLEN];
1363 if (my_readlink(link_name, histfile, 0) == 0 &&
1364 strncmp(link_name, "/dev/null", 10) == 0)
1365 {
1366 /* The .mysql_history file is a symlink to /dev/null, don't use it */
1367 my_free(histfile);
1368 histfile= 0;
1369 }
1370 }
1371
1372 /* We used to suggest setting MYSQL_HISTFILE=/dev/null. */
1373 if (histfile && strncmp(histfile, "/dev/null", 10) == 0)
1374 histfile= NULL;
1375
1376 if (histfile && histfile[0])
1377 {
1378 if (verbose)
1379 tee_fprintf(stdout, "Reading history-file %s\n",histfile);
1380 read_history(histfile);
1381 if (!(histfile_tmp= (char*) my_malloc((uint) strlen(histfile) + 5,
1382 MYF(MY_WME))))
1383 {
1384 fprintf(stderr, "Couldn't allocate memory for temp histfile!\n");
1385 exit(1);
1386 }
1387 sprintf(histfile_tmp, "%s.TMP", histfile);
1388 }
1389 }
1390
1391#endif
1392
1393 sprintf(buff, "%s",
1394 "Type 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\n");
1395 put_info(buff,INFO_INFO);
1396 status.exit_status= read_and_execute(!status.batch);
1397 if (opt_outfile)
1398 end_tee();
1399 mysql_end(0);
1400#ifndef _lint
1401 DBUG_RETURN(0); // Keep compiler happy
1402#endif
1403}
1404
1405sig_handler mysql_end(int sig)
1406{
1407 mysql_close(&mysql);
1408#ifdef HAVE_READLINE
1409 if (!status.batch && !quick && !opt_html && !opt_xml &&
1410 histfile && histfile[0])
1411 {
1412 /* write-history */
1413 if (verbose)
1414 tee_fprintf(stdout, "Writing history-file %s\n",histfile);
1415 if (!write_history(histfile_tmp))
1416 my_rename(histfile_tmp, histfile, MYF(MY_WME));
1417 }
1418 batch_readline_end(status.line_buff);
1419 completion_hash_free(&ht);
1420 free_root(&hash_mem_root,MYF(0));
1421
1422 my_free(opt_histignore);
1423 my_free(histfile);
1424 my_free(histfile_tmp);
1425 dynstr_free(&histignore_buffer);
1426 free_hist_patterns();
1427#endif
1428 if (sig >= 0)
1429 put_info(sig ? "Aborted" : "Bye", INFO_RESULT);
1430 glob_buffer.free();
1431 old_buffer.free();
1432 processed_prompt.free();
1433 my_free(server_version);
1434 my_free(opt_password);
1435 my_free(opt_mysql_unix_port);
1436 my_free(current_db);
1437 my_free(current_host);
1438 my_free(current_user);
1439 my_free(full_username);
1440 my_free(part_username);
1441 my_free(default_prompt);
1442#ifdef HAVE_SMEM
1443 my_free(shared_memory_base_name);
1444#endif
1445 my_free(current_prompt);
1446 while (embedded_server_arg_count > 1)
1447 my_free(embedded_server_args[--embedded_server_arg_count]);
1448 mysql_server_end();
1449 free_defaults(defaults_argv);
1450 my_end(my_end_arg);
1451 exit(status.exit_status);
1452}
1453
1454
1455/*
1456 This function handles sigint calls
1457 If query is in process, kill query
1458 no query in process, terminate like previous behavior
1459 */
1460sig_handler handle_kill_signal(int sig)
1461{
1462 char kill_buffer[40];
1463 MYSQL *kill_mysql= NULL;
1464 const char *reason = sig == SIGINT ? "Ctrl-C" : "Terminal close";
1465
1466 /* terminate if no query being executed, or we already tried interrupting */
1467 /* terminate if no query being executed, or we already tried interrupting */
1468 if (!executing_query || (interrupted_query == 2))
1469 {
1470 tee_fprintf(stdout, "%s -- exit!\n", reason);
1471 goto err;
1472 }
1473
1474 kill_mysql= mysql_init(kill_mysql);
1475 mysql_options(kill_mysql, MYSQL_OPT_CONNECT_ATTR_RESET, 0);
1476 mysql_options4(kill_mysql, MYSQL_OPT_CONNECT_ATTR_ADD,
1477 "program_name", "mysql");
1478 if (!mysql_real_connect(kill_mysql,current_host, current_user, opt_password,
1479 "", opt_mysql_port, opt_mysql_unix_port,0))
1480 {
1481 tee_fprintf(stdout, "%s -- sorry, cannot connect to server to kill query, giving up ...\n", reason);
1482 goto err;
1483 }
1484
1485 interrupted_query++;
1486
1487 /* mysqld < 5 does not understand KILL QUERY, skip to KILL CONNECTION */
1488 if ((interrupted_query == 1) && (mysql_get_server_version(&mysql) < 50000))
1489 interrupted_query= 2;
1490
1491 /* kill_buffer is always big enough because max length of %lu is 15 */
1492 sprintf(kill_buffer, "KILL %s%lu",
1493 (interrupted_query == 1) ? "QUERY " : "",
1494 mysql_thread_id(&mysql));
1495 tee_fprintf(stdout, "%s -- sending \"%s\" to server ...\n",
1496 reason, kill_buffer);
1497 mysql_real_query(kill_mysql, kill_buffer, (uint) strlen(kill_buffer));
1498 mysql_close(kill_mysql);
1499 tee_fprintf(stdout, "%s -- query aborted.\n", reason);
1500
1501 return;
1502
1503err:
1504#ifdef _WIN32
1505 /*
1506 When SIGINT is raised on Windows, the OS creates a new thread to handle the
1507 interrupt. Once that thread completes, the main thread continues running
1508 only to find that it's resources have already been free'd when the sigint
1509 handler called mysql_end().
1510 */
1511 mysql_thread_end();
1512 return;
1513#else
1514 mysql_end(sig);
1515#endif
1516}
1517
1518
1519#if defined(HAVE_TERMIOS_H) && defined(GWINSZ_IN_SYS_IOCTL)
1520sig_handler window_resize(int sig)
1521{
1522 struct winsize window_size;
1523
1524 if (ioctl(fileno(stdin), TIOCGWINSZ, &window_size) == 0)
1525 terminal_width= window_size.ws_col;
1526}
1527#endif
1528
1529static struct my_option my_long_options[] =
1530{
1531 {"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0,
1532 0, 0, 0, 0, 0},
1533 {"help", 'I', "Synonym for -?", 0, 0, 0, GET_NO_ARG, NO_ARG, 0,
1534 0, 0, 0, 0, 0},
1535 {"auto-rehash", OPT_AUTO_REHASH,
1536 "Enable automatic rehashing. One doesn't need to use 'rehash' to get table "
1537 "and field completion, but startup and reconnecting may take a longer time. "
1538 "Disable with --disable-auto-rehash.",
1539 &opt_rehash, &opt_rehash, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0,
1540 0, 0},
1541 {"no-auto-rehash", 'A',
1542 "No automatic rehashing. One has to use 'rehash' to get table and field "
1543 "completion. This gives a quicker start of mysql and disables rehashing "
1544 "on reconnect.",
1545 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
1546 {"auto-vertical-output", OPT_AUTO_VERTICAL_OUTPUT,
1547 "Automatically switch to vertical output mode if the result is wider "
1548 "than the terminal width.",
1549 &auto_vertical_output, &auto_vertical_output, 0, GET_BOOL, NO_ARG, 0,
1550 0, 0, 0, 0, 0},
1551 {"batch", 'B',
1552 "Don't use history file. Disable interactive behavior. (Enables --silent.)",
1553 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
1554 {"bind-address", 0, "IP address to bind to.",
1555 (uchar**) &opt_bind_addr, (uchar**) &opt_bind_addr, 0, GET_STR,
1556 REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1557 {"character-sets-dir", OPT_CHARSETS_DIR,
1558 "Directory for character set files.", &charsets_dir,
1559 &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1560 {"column-type-info", OPT_COLUMN_TYPES, "Display column type information.",
1561 &column_types_flag, &column_types_flag,
1562 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1563 {"comments", 'c', "Preserve comments. Send comments to the server."
1564 " The default is --skip-comments (discard comments), enable with --comments.",
1565 &preserve_comments, &preserve_comments,
1566 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1567 {"compress", 'C', "Use compression in server/client protocol.",
1568 &opt_compress, &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
1569 0, 0, 0},
1570#ifdef DBUG_OFF
1571 {"debug", '#', "This is a non-debug version. Catch this and exit.",
1572 0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
1573#else
1574 {"debug", '#', "Output debug log.", &default_dbug_option,
1575 &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
1576#endif
1577 {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
1578 &debug_check_flag, &debug_check_flag, 0,
1579 GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1580 {"debug-info", 'T', "Print some debug info at exit.", &debug_info_flag,
1581 &debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1582 {"database", 'D', "Database to use.", &current_db,
1583 &current_db, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1584 {"default-character-set", OPT_DEFAULT_CHARSET,
1585 "Set the default character set.", &default_charset,
1586 &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1587 {"delimiter", OPT_DELIMITER, "Delimiter to be used.", &delimiter_str,
1588 &delimiter_str, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1589 {"enable_cleartext_plugin", OPT_ENABLE_CLEARTEXT_PLUGIN,
1590 "Enable/disable the clear text authentication plugin.",
1591 &opt_enable_cleartext_plugin, &opt_enable_cleartext_plugin,
1592 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
1593 {"execute", 'e', "Execute command and quit. (Disables --force and history file.)", 0,
1594 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1595 {"vertical", 'E', "Print the output of a query (rows) vertically.",
1596 &vertical, &vertical, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
1597 0},
1598 {"force", 'f', "Continue even if we get an SQL error.",
1599 &ignore_errors, &ignore_errors, 0, GET_BOOL, NO_ARG, 0, 0,
1600 0, 0, 0, 0},
1601 {"named-commands", 'G',
1602 "Enable named commands. Named commands mean this program's internal "
1603 "commands; see mysql> help . When enabled, the named commands can be "
1604 "used from any line of the query, otherwise only from the first line, "
1605 "before an enter. Disable with --disable-named-commands. This option "
1606 "is disabled by default.",
1607 &named_cmds, &named_cmds, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
1608 0, 0},
1609 {"ignore-spaces", 'i', "Ignore space after function names.",
1610 &ignore_spaces, &ignore_spaces, 0, GET_BOOL, NO_ARG, 0, 0,
1611 0, 0, 0, 0},
1612 {"init-command", OPT_INIT_COMMAND,
1613 "SQL Command to execute when connecting to MySQL server. Will "
1614 "automatically be re-executed when reconnecting.",
1615 &opt_init_command, &opt_init_command, 0,
1616 GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1617 {"local-infile", OPT_LOCAL_INFILE, "Enable/disable LOAD DATA LOCAL INFILE.",
1618 &opt_local_infile, &opt_local_infile, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
1619 {"no-beep", 'b', "Turn off beep on error.", &opt_nobeep,
1620 &opt_nobeep, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1621 {"host", 'h', "Connect to host.", &current_host,
1622 &current_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1623 {"html", 'H', "Produce HTML output.", &opt_html, &opt_html,
1624 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1625 {"xml", 'X', "Produce XML output.", &opt_xml, &opt_xml, 0,
1626 GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1627 {"line-numbers", OPT_LINE_NUMBERS, "Write line numbers for errors.",
1628 &line_numbers, &line_numbers, 0, GET_BOOL,
1629 NO_ARG, 1, 0, 0, 0, 0, 0},
1630 {"skip-line-numbers", 'L', "Don't write line number for errors.", 0, 0, 0, GET_NO_ARG,
1631 NO_ARG, 0, 0, 0, 0, 0, 0},
1632 {"unbuffered", 'n', "Flush buffer after each query.", &unbuffered,
1633 &unbuffered, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1634 {"column-names", OPT_COLUMN_NAMES, "Write column names in results.",
1635 &column_names, &column_names, 0, GET_BOOL,
1636 NO_ARG, 1, 0, 0, 0, 0, 0},
1637 {"skip-column-names", 'N',
1638 "Don't write column names in results.",
1639 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
1640 {"sigint-ignore", OPT_SIGINT_IGNORE, "Ignore SIGINT (CTRL-C).",
1641 &opt_sigint_ignore, &opt_sigint_ignore, 0, GET_BOOL,
1642 NO_ARG, 0, 0, 0, 0, 0, 0},
1643 {"one-database", 'o',
1644 "Ignore statements except those that occur while the default "
1645 "database is the one named at the command line.",
1646 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
1647#ifdef USE_POPEN
1648 {"pager", OPT_PAGER,
1649 "Pager to use to display results. If you don't supply an option, the "
1650 "default pager is taken from your ENV variable PAGER. Valid pagers are "
1651 "less, more, cat [> filename], etc. See interactive help (\\h) also. "
1652 "This option does not work in batch mode. Disable with --disable-pager. "
1653 "This option is disabled by default.",
1654 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
1655#endif
1656 {"password", 'p',
1657 "Password to use when connecting to server. If password is not given it's asked from the tty.",
1658 0, 0, 0, GET_PASSWORD, OPT_ARG, 0, 0, 0, 0, 0, 0},
1659#ifdef __WIN__
1660 {"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
1661 NO_ARG, 0, 0, 0, 0, 0, 0},
1662#endif
1663 {"port", 'P', "Port number to use for connection or 0 for default to, in "
1664 "order of preference, my.cnf, $MYSQL_TCP_PORT, "
1665#if MYSQL_PORT_DEFAULT == 0
1666 "/etc/services, "
1667#endif
1668 "built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
1669 &opt_mysql_port,
1670 &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1671 {"prompt", OPT_PROMPT, "Set the mysql prompt to this value.",
1672 &current_prompt, &current_prompt, 0, GET_STR_ALLOC,
1673 REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1674 {"protocol", OPT_MYSQL_PROTOCOL, "The protocol to use for connection (tcp, socket, pipe, memory).",
1675 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1676 {"quick", 'q',
1677 "Don't cache result, print it row by row. This may slow down the server "
1678 "if the output is suspended. Doesn't use history file.",
1679 &quick, &quick, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1680 {"raw", 'r', "Write fields without conversion. Used with --batch.",
1681 &opt_raw_data, &opt_raw_data, 0, GET_BOOL, NO_ARG, 0, 0, 0,
1682 0, 0, 0},
1683 {"reconnect", OPT_RECONNECT, "Reconnect if the connection is lost. Disable "
1684 "with --disable-reconnect. This option is enabled by default.",
1685 &opt_reconnect, &opt_reconnect, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
1686 {"silent", 's', "Be more silent. Print results with a tab as separator, "
1687 "each row on new line.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
1688#ifdef HAVE_SMEM
1689 {"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
1690 "Base name of shared memory.", &shared_memory_base_name,
1691 &shared_memory_base_name, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1692#endif
1693 {"socket", 'S', "The socket file to use for connection.",
1694 &opt_mysql_unix_port, &opt_mysql_unix_port, 0, GET_STR_ALLOC,
1695 REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1696#include "sslopt-longopts.h"
1697 {"table", 't', "Output in table format.", &output_tables,
1698 &output_tables, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1699 {"tee", OPT_TEE,
1700 "Append everything into outfile. See interactive help (\\h) also. "
1701 "Does not work in batch mode. Disable with --disable-tee. "
1702 "This option is disabled by default.",
1703 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1704#ifndef DONT_ALLOW_USER_CHANGE
1705 {"user", 'u', "User for login if not current user.", &current_user,
1706 &current_user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1707#endif
1708 {"safe-updates", 'U', "Only allow UPDATE and DELETE that uses keys.",
1709 &safe_updates, &safe_updates, 0, GET_BOOL, NO_ARG, 0, 0,
1710 0, 0, 0, 0},
1711 {"i-am-a-dummy", 'U', "Synonym for option --safe-updates, -U.",
1712 &safe_updates, &safe_updates, 0, GET_BOOL, NO_ARG, 0, 0,
1713 0, 0, 0, 0},
1714 {"verbose", 'v', "Write more. (-v -v -v gives the table output format).", 0,
1715 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
1716 {"version", 'V', "Output version information and exit.", 0, 0, 0,
1717 GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
1718 {"wait", 'w', "Wait and retry if connection is down.", 0, 0, 0, GET_NO_ARG,
1719 NO_ARG, 0, 0, 0, 0, 0, 0},
1720 {"connect_timeout", OPT_CONNECT_TIMEOUT,
1721 "Number of seconds before connection timeout.",
1722 &opt_connect_timeout, &opt_connect_timeout, 0, GET_ULONG, REQUIRED_ARG,
1723 0, 0, 3600*12, 0, 0, 0},
1724 {"max_allowed_packet", OPT_MAX_ALLOWED_PACKET,
1725 "The maximum packet length to send to or receive from server.",
1726 &opt_max_allowed_packet, &opt_max_allowed_packet, 0,
1727 GET_ULONG, REQUIRED_ARG, 16 *1024L*1024L, 4096,
1728 (longlong) 2*1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0},
1729 {"net_buffer_length", OPT_NET_BUFFER_LENGTH,
1730 "The buffer size for TCP/IP and socket communication.",
1731 &opt_net_buffer_length, &opt_net_buffer_length, 0, GET_ULONG,
1732 REQUIRED_ARG, 16384, 1024, 512*1024*1024L, MALLOC_OVERHEAD, 1024, 0},
1733 {"select_limit", OPT_SELECT_LIMIT,
1734 "Automatic limit for SELECT when using --safe-updates.",
1735 &select_limit, &select_limit, 0, GET_ULONG, REQUIRED_ARG, 1000L,
1736 1, ULONG_MAX, 0, 1, 0},
1737 {"max_join_size", OPT_MAX_JOIN_SIZE,
1738 "Automatic limit for rows in a join when using --safe-updates.",
1739 &max_join_size, &max_join_size, 0, GET_ULONG, REQUIRED_ARG, 1000000L,
1740 1, ULONG_MAX, 0, 1, 0},
1741 {"secure-auth", OPT_SECURE_AUTH, "Refuse client connecting to server if it"
1742 " uses old (pre-4.1.1) protocol.", &opt_secure_auth,
1743 &opt_secure_auth, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
1744 {"server-arg", OPT_SERVER_ARG, "Send embedded server this as a parameter.",
1745 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1746 {"show-warnings", OPT_SHOW_WARNINGS, "Show warnings after every statement.",
1747 &show_warnings, &show_warnings, 0, GET_BOOL, NO_ARG,
1748 0, 0, 0, 0, 0, 0},
1749 {"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
1750 &opt_plugin_dir, &opt_plugin_dir, 0,
1751 GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1752 {"default_auth", OPT_DEFAULT_AUTH,
1753 "Default authentication client-side plugin to use.",
1754 &opt_default_auth, &opt_default_auth, 0,
1755 GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1756 {"histignore", OPT_HISTIGNORE, "A colon-separated list of patterns "
1757 "to keep statements from getting logged into mysql history.",
1758 &opt_histignore, &opt_histignore, 0, GET_STR_ALLOC, REQUIRED_ARG,
1759 0, 0, 0, 0, 0, 0},
1760 {"binary-mode", OPT_BINARY_MODE,
1761 "By default, ASCII '\\0' is disallowed and '\\r\\n' is translated to '\\n'. "
1762 "This switch turns off both features, and also turns off parsing of all client"
1763 "commands except \\C and DELIMITER, in non-interactive mode (for input "
1764 "piped to mysql or loaded using the 'source' command). This is necessary "
1765 "when processing output from mysqlbinlog that may contain blobs.",
1766 &opt_binary_mode, &opt_binary_mode, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1767#if !defined(HAVE_YASSL)
1768 {"server-public-key-path", OPT_SERVER_PUBLIC_KEY,
1769 "File path to the server public RSA key in PEM format.",
1770 &opt_server_public_key, &opt_server_public_key, 0,
1771 GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1772#endif
1773 {"connect-expired-password", 0,
1774 "Notify the server that this client is prepared to handle expired "
1775 "password sandbox mode.",
1776 &opt_connect_expired_password, &opt_connect_expired_password, 0, GET_BOOL,
1777 NO_ARG, 0, 0, 0, 0, 0, 0},
1778 { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
1779};
1780
1781
1782static void usage(int version)
1783{
1784#if defined(USE_LIBEDIT_INTERFACE)
1785 const char* readline= "";
1786#else
1787 const char* readline= "readline";
1788#endif
1789
1790#ifdef HAVE_READLINE
1791 printf("%s Ver %s Distrib %s, for %s (%s) using %s %s\n",
1792 my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE,
1793 readline, rl_library_version);
1794#else
1795 printf("%s Ver %s Distrib %s, for %s (%s)\n", my_progname, VER,
1796 MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
1797#endif
1798
1799 if (version)
1800 return;
1801 puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
1802 printf("Usage: %s [OPTIONS] [database]\n", my_progname);
1803 my_print_help(my_long_options);
1804 print_defaults("my", load_default_groups);
1805 my_print_variables(my_long_options);
1806}
1807
1808
1809my_bool
1810get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
1811 char *argument)
1812{
1813 switch(optid) {
1814 case OPT_CHARSETS_DIR:
1815 strmake(mysql_charsets_dir, argument, sizeof(mysql_charsets_dir) - 1);
1816 charsets_dir = mysql_charsets_dir;
1817 break;
1818 case OPT_DELIMITER:
1819 if (argument == disabled_my_option)
1820 {
1821 strmov(delimiter, DEFAULT_DELIMITER);
1822 }
1823 else
1824 {
1825 /* Check that delimiter does not contain a backslash */
1826 if (!strstr(argument, "\\"))
1827 {
1828 strmake(delimiter, argument, sizeof(delimiter) - 1);
1829 }
1830 else
1831 {
1832 put_info("DELIMITER cannot contain a backslash character", INFO_ERROR);
1833 return 0;
1834 }
1835 }
1836 delimiter_length= (uint)strlen(delimiter);
1837 delimiter_str= delimiter;
1838 break;
1839 case OPT_LOCAL_INFILE:
1840 using_opt_local_infile=1;
1841 break;
1842 case OPT_ENABLE_CLEARTEXT_PLUGIN:
1843 using_opt_enable_cleartext_plugin= TRUE;
1844 break;
1845 case OPT_TEE:
1846 if (argument == disabled_my_option)
1847 {
1848 if (opt_outfile)
1849 end_tee();
1850 }
1851 else
1852 init_tee(argument);
1853 break;
1854 case OPT_PAGER:
1855 if (argument == disabled_my_option)
1856 opt_nopager= 1;
1857 else
1858 {
1859 opt_nopager= 0;
1860 if (argument && strlen(argument))
1861 {
1862 default_pager_set= 1;
1863 strmake(pager, argument, sizeof(pager) - 1);
1864 strmov(default_pager, pager);
1865 }
1866 else if (default_pager_set)
1867 strmov(pager, default_pager);
1868 else
1869 opt_nopager= 1;
1870 }
1871 break;
1872 case OPT_MYSQL_PROTOCOL:
1873#ifndef EMBEDDED_LIBRARY
1874 opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
1875 opt->name);
1876#endif
1877 break;
1878 case OPT_SERVER_ARG:
1879#ifdef EMBEDDED_LIBRARY
1880 /*
1881 When the embedded server is being tested, the client needs to be
1882 able to pass command-line arguments to the embedded server so it can
1883 locate the language files and data directory.
1884 */
1885 if (!embedded_server_arg_count)
1886 {
1887 embedded_server_arg_count= 1;
1888 embedded_server_args[0]= (char*) "";
1889 }
1890 if (embedded_server_arg_count == MAX_SERVER_ARGS-1 ||
1891 !(embedded_server_args[embedded_server_arg_count++]=
1892 my_strdup(argument, MYF(MY_FAE))))
1893 {
1894 put_info("Can't use server argument", INFO_ERROR);
1895 return 0;
1896 }
1897#else /*EMBEDDED_LIBRARY */
1898 printf("WARNING: --server-arg option not supported in this configuration.\n");
1899#endif
1900 break;
1901 case 'A':
1902 opt_rehash= 0;
1903 break;
1904 case 'N':
1905 column_names= 0;
1906 break;
1907 case 'e':
1908 status.batch= 1;
1909 status.add_to_history= 0;
1910 if (!status.line_buff)
1911 ignore_errors= 0; // do it for the first -e only
1912 if (!(status.line_buff= batch_readline_command(status.line_buff, argument)))
1913 return 1;
1914 break;
1915 case 'o':
1916 if (argument == disabled_my_option)
1917 one_database= 0;
1918 else
1919 one_database= skip_updates= 1;
1920 break;
1921 case 'p':
1922 if (argument == disabled_my_option)
1923 argument= (char*) ""; // Don't require password
1924 if (argument)
1925 {
1926 char *start= argument;
1927 my_free(opt_password);
1928 opt_password= my_strdup(argument, MYF(MY_FAE));
1929 while (*argument) *argument++= 'x'; // Destroy argument
1930 if (*start)
1931 start[1]=0 ;
1932 tty_password= 0;
1933 }
1934 else
1935 tty_password= 1;
1936 break;
1937 case '#':
1938 DBUG_PUSH(argument ? argument : default_dbug_option);
1939 debug_info_flag= 1;
1940 break;
1941 case 's':
1942 if (argument == disabled_my_option)
1943 opt_silent= 0;
1944 else
1945 opt_silent++;
1946 break;
1947 case 'v':
1948 if (argument == disabled_my_option)
1949 verbose= 0;
1950 else
1951 verbose++;
1952 break;
1953 case 'B':
1954 status.batch= 1;
1955 status.add_to_history= 0;
1956 set_if_bigger(opt_silent,1); // more silent
1957 break;
1958 case 'W':
1959#ifdef __WIN__
1960 opt_protocol = MYSQL_PROTOCOL_PIPE;
1961#endif
1962 break;
1963#include <sslopt-case.h>
1964 case 'V':
1965 usage(1);
1966 exit(0);
1967 case 'I':
1968 case '?':
1969 usage(0);
1970 exit(0);
1971 }
1972 return 0;
1973}
1974
1975
1976static int get_options(int argc, char **argv)
1977{
1978 char *tmp, *pagpoint;
1979 int ho_error;
1980 MYSQL_PARAMETERS *mysql_params= mysql_get_parameters();
1981
1982 tmp= (char *) getenv("MYSQL_HOST");
1983 if (tmp)
1984 current_host= my_strdup(tmp, MYF(MY_WME));
1985
1986 pagpoint= getenv("PAGER");
1987 if (!((char*) (pagpoint)))
1988 {
1989 strmov(pager, "stdout");
1990 opt_nopager= 1;
1991 }
1992 else
1993 strmov(pager, pagpoint);
1994 strmov(default_pager, pager);
1995
1996 opt_max_allowed_packet= *mysql_params->p_max_allowed_packet;
1997 opt_net_buffer_length= *mysql_params->p_net_buffer_length;
1998
1999 if ((ho_error=handle_options(&argc, &argv, my_long_options, get_one_option)))
2000 exit(ho_error);
2001
2002 *mysql_params->p_max_allowed_packet= opt_max_allowed_packet;
2003 *mysql_params->p_net_buffer_length= opt_net_buffer_length;
2004
2005 if (status.batch) /* disable pager and outfile in this case */
2006 {
2007 strmov(default_pager, "stdout");
2008 strmov(pager, "stdout");
2009 opt_nopager= 1;
2010 default_pager_set= 0;
2011 opt_outfile= 0;
2012 opt_reconnect= 0;
2013 connect_flag= 0; /* Not in interactive mode */
2014 }
2015
2016 if (argc > 1)
2017 {
2018 usage(0);
2019 exit(1);
2020 }
2021 if (argc == 1)
2022 {
2023 skip_updates= 0;
2024 my_free(current_db);
2025 current_db= my_strdup(*argv, MYF(MY_WME));
2026 }
2027 if (tty_password)
2028 opt_password= get_tty_password(NullS);
2029 if (debug_info_flag)
2030 my_end_arg= MY_CHECK_ERROR | MY_GIVE_INFO;
2031 if (debug_check_flag)
2032 my_end_arg= MY_CHECK_ERROR;
2033
2034 if (ignore_spaces)
2035 connect_flag|= CLIENT_IGNORE_SPACE;
2036
2037 return(0);
2038}
2039
2040static int read_and_execute(bool interactive)
2041{
2042#if defined(__WIN__)
2043 String tmpbuf;
2044 String buffer;
2045#endif
2046
2047 char *line= NULL;
2048 char in_string=0;
2049 ulong line_number=0;
2050 bool ml_comment= 0;
2051 COMMANDS *com;
2052 ulong line_length= 0;
2053 status.exit_status=1;
2054
2055 real_binary_mode= !interactive && opt_binary_mode;
2056 for (;;)
2057 {
2058 if (!interactive)
2059 {
2060 /*
2061 batch_readline can return 0 on EOF or error.
2062 In that case, we need to double check that we have a valid
2063 line before actually setting line_length to read_length.
2064 */
2065 line= batch_readline(status.line_buff, real_binary_mode);
2066 if (line)
2067 {
2068 line_length= status.line_buff->read_length;
2069
2070 /*
2071 ASCII 0x00 is not allowed appearing in queries if it is not in binary
2072 mode.
2073 */
2074 if (!real_binary_mode && strlen(line) != line_length)
2075 {
2076 status.exit_status= 1;
2077 String msg;
2078 msg.append("ASCII '\\0' appeared in the statement, but this is not "
2079 "allowed unless option --binary-mode is enabled and mysql is "
2080 "run in non-interactive mode. Set --binary-mode to 1 if ASCII "
2081 "'\\0' is expected. Query: '");
2082 msg.append(glob_buffer);
2083 msg.append(line);
2084 msg.append("'.");
2085 put_info(msg.c_ptr(), INFO_ERROR);
2086 break;
2087 }
2088
2089 /*
2090 Skip UTF8 Byte Order Marker (BOM) 0xEFBBBF.
2091 Editors like "notepad" put this marker in
2092 the very beginning of a text file when
2093 you save the file using "Unicode UTF-8" format.
2094 */
2095 if (!line_number &&
2096 (uchar) line[0] == 0xEF &&
2097 (uchar) line[1] == 0xBB &&
2098 (uchar) line[2] == 0xBF)
2099 {
2100 line+= 3;
2101 // decrease the line length accordingly to the 3 bytes chopped
2102 line_length -=3;
2103 }
2104 }
2105 line_number++;
2106 if (!glob_buffer.length())
2107 status.query_start_line=line_number;
2108 }
2109 else
2110 {
2111 char *prompt= (char*) (ml_comment ? " /*> " :
2112 glob_buffer.is_empty() ? construct_prompt() :
2113 !in_string ? " -> " :
2114 in_string == '\'' ?
2115 " '> " : (in_string == '`' ?
2116 " `> " :
2117 " \"> "));
2118 if (opt_outfile && glob_buffer.is_empty())
2119 fflush(OUTFILE);
2120
2121#if defined(__WIN__)
2122 tee_fputs(prompt, stdout);
2123 if (!tmpbuf.is_alloced())
2124 tmpbuf.alloc(65535);
2125 tmpbuf.length(0);
2126 buffer.length(0);
2127 line= my_win_console_readline(charset_info,
2128 (char *) tmpbuf.ptr(),
2129 tmpbuf.alloced_length());
2130#else
2131 if (opt_outfile)
2132 fputs(prompt, OUTFILE);
2133 /*
2134 free the previous entered line.
2135 Note: my_free() cannot be used here as the memory was allocated under
2136 the readline/libedit library.
2137 */
2138 if (line)
2139 free(line);
2140 line= readline(prompt);
2141#endif /* defined(__WIN__) */
2142
2143 /*
2144 When Ctrl+d or Ctrl+z is pressed, the line may be NULL on some OS
2145 which may cause coredump.
2146 */
2147 if (opt_outfile && line)
2148 fprintf(OUTFILE, "%s\n", line);
2149
2150 line_length= line ? strlen(line) : 0;
2151 }
2152 // End of file or system error
2153 if (!line)
2154 {
2155 if (status.line_buff && status.line_buff->error)
2156 status.exit_status= 1;
2157 else
2158 status.exit_status= 0;
2159 break;
2160 }
2161
2162 /*
2163 Check if line is a mysql command line
2164 (We want to allow help, print and clear anywhere at line start
2165 */
2166 if ((named_cmds || glob_buffer.is_empty())
2167 && !ml_comment && !in_string && (com= find_command(line)))
2168 {
2169 if ((*com->func)(&glob_buffer,line) > 0)
2170 break;
2171 if (glob_buffer.is_empty()) // If buffer was emptied
2172 in_string=0;
2173#ifdef HAVE_READLINE
2174 if (interactive && status.add_to_history && not_in_history(line))
2175 add_filtered_history(line);
2176#endif
2177 continue;
2178 }
2179 if (add_line(glob_buffer, line, line_length, &in_string, &ml_comment,
2180 status.line_buff ? status.line_buff->truncated : 0))
2181 break;
2182 }
2183 /* if in batch mode, send last query even if it doesn't end with \g or go */
2184
2185 if (!interactive && !status.exit_status)
2186 {
2187 remove_cntrl(glob_buffer);
2188 if (!glob_buffer.is_empty())
2189 {
2190 status.exit_status=1;
2191 if (com_go(&glob_buffer,line) <= 0)
2192 status.exit_status=0;
2193 }
2194 }
2195
2196#if defined(__WIN__)
2197 buffer.free();
2198 tmpbuf.free();
2199#else
2200 if (interactive)
2201 /*
2202 free the last entered line.
2203 Note: my_free() cannot be used here as the memory was allocated under
2204 the readline/libedit library.
2205 */
2206 free(line);
2207#endif
2208
2209 /*
2210 If the function is called by 'source' command, it will return to interactive
2211 mode, so real_binary_mode should be FALSE. Otherwise, it will exit the
2212 program, it is safe to set real_binary_mode to FALSE.
2213 */
2214 real_binary_mode= FALSE;
2215 return status.exit_status;
2216}
2217
2218/**
2219 It checks if the input is a short form command. It returns the command's
2220 pointer if a command is found, else return NULL. Note that if binary-mode
2221 is set, then only \C is searched for.
2222
2223 @param cmd_char A character of one byte.
2224
2225 @return
2226 the command's pointer or NULL.
2227*/
2228static COMMANDS *find_command(char cmd_char)
2229{
2230 DBUG_ENTER("find_command");
2231 DBUG_PRINT("enter", ("cmd_char: %d", cmd_char));
2232
2233 int index= -1;
2234
2235 /*
2236 In binary-mode, we disallow all mysql commands except '\C'
2237 and DELIMITER.
2238 */
2239 if (real_binary_mode)
2240 {
2241 if (cmd_char == 'C')
2242 index= charset_index;
2243 }
2244 else
2245 index= get_command_index(cmd_char);
2246
2247 if (index >= 0)
2248 {
2249 DBUG_PRINT("exit",("found command: %s", commands[index].name));
2250 DBUG_RETURN(&commands[index]);
2251 }
2252 else
2253 DBUG_RETURN((COMMANDS *) 0);
2254}
2255
2256/**
2257 It checks if the input is a long form command. It returns the command's
2258 pointer if a command is found, else return NULL. Note that if binary-mode
2259 is set, then only DELIMITER is searched for.
2260
2261 @param name A string.
2262 @return
2263 the command's pointer or NULL.
2264*/
2265static COMMANDS *find_command(char *name)
2266{
2267 uint len;
2268 char *end;
2269 DBUG_ENTER("find_command");
2270
2271 DBUG_ASSERT(name != NULL);
2272 DBUG_PRINT("enter", ("name: '%s'", name));
2273
2274 while (my_isspace(charset_info, *name))
2275 name++;
2276 /*
2277 If there is an \\g in the row or if the row has a delimiter but
2278 this is not a delimiter command, let add_line() take care of
2279 parsing the row and calling find_command().
2280 */
2281 if ((!real_binary_mode && strstr(name, "\\g")) ||
2282 (strstr(name, delimiter) &&
2283 !is_delimiter_command(name, DELIMITER_NAME_LEN)))
2284 DBUG_RETURN((COMMANDS *) 0);
2285
2286 if ((end=strcont(name, " \t")))
2287 {
2288 len=(uint) (end - name);
2289 while (my_isspace(charset_info, *end))
2290 end++;
2291 if (!*end)
2292 end= 0; // no arguments to function
2293 }
2294 else
2295 len= (uint) strlen(name);
2296
2297 int index= -1;
2298 if (real_binary_mode)
2299 {
2300 if (is_delimiter_command(name, len))
2301 index= delimiter_index;
2302 }
2303 else
2304 {
2305 /*
2306 All commands are in the first part of commands array and have a function
2307 to implement it.
2308 */
2309 for (uint i= 0; commands[i].func; i++)
2310 {
2311 if (!my_strnncoll(&my_charset_latin1, (uchar*) name, len,
2312 (uchar*) commands[i].name, len) &&
2313 (commands[i].name[len] == '\0') &&
2314 (!end || commands[i].takes_params))
2315 {
2316 index= i;
2317 break;
2318 }
2319 }
2320 }
2321
2322 if (index >= 0)
2323 {
2324 DBUG_PRINT("exit", ("found command: %s", commands[index].name));
2325 DBUG_RETURN(&commands[index]);
2326 }
2327 DBUG_RETURN((COMMANDS *) 0);
2328}
2329
2330
2331static bool add_line(String &buffer, char *line, ulong line_length,
2332 char *in_string, bool *ml_comment, bool truncated)
2333{
2334 uchar inchar;
2335 char buff[80], *pos, *out;
2336 COMMANDS *com;
2337 bool need_space= 0;
2338 bool ss_comment= 0;
2339 DBUG_ENTER("add_line");
2340
2341 if (!line[0] && buffer.is_empty())
2342 DBUG_RETURN(0);
2343#ifdef HAVE_READLINE
2344 if (status.add_to_history && line[0] && not_in_history(line))
2345 add_filtered_history(line);
2346#endif
2347 char *end_of_line= line + line_length;
2348
2349 for (pos= out= line; pos < end_of_line; pos++)
2350 {
2351 inchar= (uchar) *pos;
2352 if (!preserve_comments)
2353 {
2354 // Skip spaces at the beginning of a statement
2355 if (my_isspace(charset_info,inchar) && (out == line) &&
2356 buffer.is_empty())
2357 continue;
2358 }
2359
2360#ifdef USE_MB
2361 // Accept multi-byte characters as-is
2362 int length;
2363 if (use_mb(charset_info) &&
2364 (length= my_ismbchar(charset_info, pos, end_of_line)))
2365 {
2366 if (!*ml_comment || preserve_comments)
2367 {
2368 while (length--)
2369 *out++ = *pos++;
2370 pos--;
2371 }
2372 else
2373 pos+= length - 1;
2374 continue;
2375 }
2376#endif
2377 if (!*ml_comment && inchar == '\\' &&
2378 !(*in_string &&
2379 (mysql.server_status & SERVER_STATUS_NO_BACKSLASH_ESCAPES)))
2380 {
2381 // Found possbile one character command like \c
2382
2383 if (!(inchar = (uchar) *++pos))
2384 break; // readline adds one '\'
2385 if (*in_string || inchar == 'N') // \N is short for NULL
2386 { // Don't allow commands in string
2387 *out++='\\';
2388 *out++= (char) inchar;
2389 continue;
2390 }
2391 if ((com= find_command((char) inchar)))
2392 {
2393 // Flush previously accepted characters
2394 if (out != line)
2395 {
2396 buffer.append(line, (uint) (out-line));
2397 out= line;
2398 }
2399
2400 if ((*com->func)(&buffer,pos-1) > 0)
2401 DBUG_RETURN(1); // Quit
2402 if (com->takes_params)
2403 {
2404 if (ss_comment)
2405 {
2406 /*
2407 If a client-side macro appears inside a server-side comment,
2408 discard all characters in the comment after the macro (that is,
2409 until the end of the comment rather than the next delimiter)
2410 */
2411 for (pos++; *pos && (*pos != '*' || *(pos + 1) != '/'); pos++)
2412 ;
2413 pos--;
2414 }
2415 else
2416 {
2417 for (pos++ ;
2418 *pos && (*pos != *delimiter ||
2419 !is_prefix(pos + 1, delimiter + 1)) ; pos++)
2420 ; // Remove parameters
2421 if (!*pos)
2422 pos--;
2423 else
2424 pos+= delimiter_length - 1; // Point at last delim char
2425 }
2426 }
2427 }
2428 else
2429 {
2430 sprintf(buff,"Unknown command '\\%c'.",inchar);
2431 if (put_info(buff,INFO_ERROR) > 0)
2432 DBUG_RETURN(1);
2433 *out++='\\';
2434 *out++=(char) inchar;
2435 continue;
2436 }
2437 }
2438 else if (!*ml_comment && !*in_string && is_prefix(pos, delimiter))
2439 {
2440 // Found a statement. Continue parsing after the delimiter
2441 pos+= delimiter_length;
2442
2443 if (preserve_comments)
2444 {
2445 while (my_isspace(charset_info, *pos))
2446 *out++= *pos++;
2447 }
2448 // Flush previously accepted characters
2449 if (out != line)
2450 {
2451 buffer.append(line, (uint32) (out-line));
2452 out= line;
2453 }
2454
2455 if (preserve_comments && ((*pos == '#') ||
2456 ((*pos == '-') &&
2457 (pos[1] == '-') &&
2458 my_isspace(charset_info, pos[2]))))
2459 {
2460 // Add trailing single line comments to this statement
2461 buffer.append(pos);
2462 pos+= strlen(pos);
2463 }
2464
2465 pos--;
2466
2467 if ((com= find_command(buffer.c_ptr())))
2468 {
2469
2470 if ((*com->func)(&buffer, buffer.c_ptr()) > 0)
2471 DBUG_RETURN(1); // Quit
2472 }
2473 else
2474 {
2475 if (com_go(&buffer, 0) > 0) // < 0 is not fatal
2476 DBUG_RETURN(1);
2477 }
2478 buffer.length(0);
2479 }
2480 else if (!*ml_comment && (!*in_string && (inchar == '#' ||
2481 (inchar == '-' && pos[1] == '-' &&
2482 /*
2483 The third byte is either whitespace or is the
2484 end of the line -- which would occur only
2485 because of the user sending newline -- which is
2486 itself whitespace and should also match.
2487 */
2488 (my_isspace(charset_info,pos[2]) ||
2489 !pos[2])))))
2490 {
2491 // Flush previously accepted characters
2492 if (out != line)
2493 {
2494 buffer.append(line, (uint32) (out - line));
2495 out= line;
2496 }
2497
2498 // comment to end of line
2499 if (preserve_comments)
2500 {
2501 bool started_with_nothing= !buffer.length();
2502
2503 buffer.append(pos);
2504
2505 /*
2506 A single-line comment by itself gets sent immediately so that
2507 client commands (delimiter, status, etc) will be interpreted on
2508 the next line.
2509 */
2510 if (started_with_nothing)
2511 {
2512 if (com_go(&buffer, 0) > 0) // < 0 is not fatal
2513 DBUG_RETURN(1);
2514 buffer.length(0);
2515 }
2516 }
2517
2518 break;
2519 }
2520 else if (!*in_string && inchar == '/' && *(pos+1) == '*' &&
2521 *(pos+2) != '!')
2522 {
2523 if (preserve_comments)
2524 {
2525 *out++= *pos++; // copy '/'
2526 *out++= *pos; // copy '*'
2527 }
2528 else
2529 pos++;
2530 *ml_comment= 1;
2531 if (out != line)
2532 {
2533 buffer.append(line,(uint) (out-line));
2534 out=line;
2535 }
2536 }
2537 else if (*ml_comment && !ss_comment && inchar == '*' && *(pos + 1) == '/')
2538 {
2539 if (preserve_comments)
2540 {
2541 *out++= *pos++; // copy '*'
2542 *out++= *pos; // copy '/'
2543 }
2544 else
2545 pos++;
2546 *ml_comment= 0;
2547 if (out != line)
2548 {
2549 buffer.append(line, (uint32) (out - line));
2550 out= line;
2551 }
2552 // Consumed a 2 chars or more, and will add 1 at most,
2553 // so using the 'line' buffer to edit data in place is ok.
2554 need_space= 1;
2555 }
2556 else
2557 { // Add found char to buffer
2558 if (!*in_string && inchar == '/' && *(pos + 1) == '*' &&
2559 *(pos + 2) == '!')
2560 ss_comment= 1;
2561 else if (!*in_string && ss_comment && inchar == '*' && *(pos + 1) == '/')
2562 ss_comment= 0;
2563 if (inchar == *in_string)
2564 *in_string= 0;
2565 else if (!*ml_comment && !*in_string &&
2566 (inchar == '\'' || inchar == '"' || inchar == '`'))
2567 *in_string= (char) inchar;
2568 if (!*ml_comment || preserve_comments)
2569 {
2570 if (need_space && !my_isspace(charset_info, (char)inchar))
2571 *out++= ' ';
2572 need_space= 0;
2573 *out++= (char) inchar;
2574 }
2575 }
2576 }
2577 if (out != line || !buffer.is_empty())
2578 {
2579 uint length=(uint) (out-line);
2580
2581 if (!truncated && (!is_delimiter_command(line, length) ||
2582 (*in_string || *ml_comment)))
2583 {
2584 /*
2585 Don't add a new line in case there's a DELIMITER command to be
2586 added to the glob buffer (e.g. on processing a line like
2587 "<command>;DELIMITER <non-eof>") : similar to how a new line is
2588 not added in the case when the DELIMITER is the first command
2589 entered with an empty glob buffer. However, if the delimiter is
2590 part of a string or a comment, the new line should be added. (e.g.
2591 SELECT '\ndelimiter\n';\n)
2592 */
2593 *out++='\n';
2594 length++;
2595 }
2596 if (buffer.length() + length >= buffer.alloced_length())
2597 buffer.realloc(buffer.length()+length+IO_SIZE);
2598 if ((!*ml_comment || preserve_comments) && buffer.append(line, length))
2599 DBUG_RETURN(1);
2600 }
2601 DBUG_RETURN(0);
2602}
2603
2604/*****************************************************************
2605 Interface to Readline Completion
2606******************************************************************/
2607
2608#ifdef HAVE_READLINE
2609
2610C_MODE_START
2611static char *new_command_generator(const char *text, int);
2612static char **new_mysql_completion(const char *text, int start, int end);
2613C_MODE_END
2614
2615/*
2616 Tell the GNU Readline library how to complete. We want to try to complete
2617 on command names if this is the first word in the line, or on filenames
2618 if not.
2619*/
2620
2621#if defined(USE_NEW_READLINE_INTERFACE)
2622static int fake_magic_space(int, int);
2623extern "C" char *no_completion(const char*,int)
2624#elif defined(USE_LIBEDIT_INTERFACE)
2625static int fake_magic_space(const char *, int);
2626extern "C" int no_completion(const char*,int)
2627#else
2628extern "C" char *no_completion()
2629#endif
2630{
2631 return 0; /* No filename completion */
2632}
2633
2634/* glues pieces of history back together if in pieces */
2635static void fix_history(String *final_command)
2636{
2637 int total_lines = 1;
2638 char *ptr = final_command->c_ptr();
2639 String fixed_buffer; /* Converted buffer */
2640 char str_char = '\0'; /* Character if we are in a string or not */
2641
2642 /* find out how many lines we have and remove newlines */
2643 while (*ptr != '\0')
2644 {
2645 switch (*ptr) {
2646 /* string character */
2647 case '"':
2648 case '\'':
2649 case '`':
2650 if (str_char == '\0') /* open string */
2651 str_char = *ptr;
2652 else if (str_char == *ptr) /* close string */
2653 str_char = '\0';
2654 fixed_buffer.append(ptr,1);
2655 break;
2656 case '\n':
2657 /*
2658 not in string, change to space
2659 if in string, leave it alone
2660 */
2661 fixed_buffer.append(str_char == '\0' ? " " : "\n");
2662 total_lines++;
2663 break;
2664 case '\\':
2665 fixed_buffer.append('\\');
2666 /* need to see if the backslash is escaping anything */
2667 if (str_char)
2668 {
2669 ptr++;
2670 /* special characters that need escaping */
2671 if (*ptr == '\'' || *ptr == '"' || *ptr == '\\')
2672 fixed_buffer.append(ptr,1);
2673 else
2674 ptr--;
2675 }
2676 break;
2677
2678 default:
2679 fixed_buffer.append(ptr,1);
2680 }
2681 ptr++;
2682 }
2683 if (total_lines > 1)
2684 add_filtered_history(fixed_buffer.ptr());
2685}
2686
2687/*
2688 returns 0 if line matches the previous history entry
2689 returns 1 if the line doesn't match the previous history entry
2690*/
2691static int not_in_history(const char *line)
2692{
2693 HIST_ENTRY *oldhist = history_get(history_length);
2694
2695 if (oldhist == 0)
2696 return 1;
2697 if (strcmp(oldhist->line,line) == 0)
2698 return 0;
2699 return 1;
2700}
2701
2702
2703#if defined(USE_NEW_READLINE_INTERFACE)
2704static int fake_magic_space(int, int)
2705#else
2706static int fake_magic_space(const char *, int)
2707#endif
2708{
2709 rl_insert(1, ' ');
2710 return 0;
2711}
2712
2713
2714static void initialize_readline (char *name)
2715{
2716 /* Allow conditional parsing of the ~/.inputrc file. */
2717 rl_readline_name = name;
2718
2719 /* Tell the completer that we want a crack first. */
2720#if defined(USE_NEW_READLINE_INTERFACE)
2721 rl_attempted_completion_function= (rl_completion_func_t*)&new_mysql_completion;
2722 rl_completion_entry_function= (rl_compentry_func_t*)&no_completion;
2723
2724 rl_add_defun("magic-space", (rl_command_func_t *)&fake_magic_space, -1);
2725#elif defined(USE_LIBEDIT_INTERFACE)
2726#ifdef HAVE_LOCALE_H
2727 setlocale(LC_ALL,""); /* so as libedit use isprint */
2728#endif
2729 rl_attempted_completion_function= (CPPFunction*)&new_mysql_completion;
2730 rl_completion_entry_function= &no_completion;
2731 rl_add_defun("magic-space", (Function*)&fake_magic_space, -1);
2732#else
2733 rl_attempted_completion_function= (CPPFunction*)&new_mysql_completion;
2734 rl_completion_entry_function= &no_completion;
2735#endif
2736}
2737
2738/*
2739 Attempt to complete on the contents of TEXT. START and END show the
2740 region of TEXT that contains the word to complete. We can use the
2741 entire line in case we want to do some simple parsing. Return the
2742 array of matches, or NULL if there aren't any.
2743*/
2744
2745static char **new_mysql_completion(const char *text,
2746 int start __attribute__((unused)),
2747 int end __attribute__((unused)))
2748{
2749 if (!status.batch && !quick)
2750#if defined(USE_NEW_READLINE_INTERFACE)
2751 return rl_completion_matches(text, new_command_generator);
2752#else
2753 return completion_matches((char *)text, (CPFunction *)new_command_generator);
2754#endif
2755 else
2756 return (char**) 0;
2757}
2758
2759static char *new_command_generator(const char *text,int state)
2760{
2761 static int textlen;
2762 char *ptr;
2763 static Bucket *b;
2764 static entry *e;
2765 static uint i;
2766
2767 if (!state)
2768 textlen=(uint) strlen(text);
2769
2770 if (textlen>0)
2771 { /* lookup in the hash */
2772 if (!state)
2773 {
2774 uint len;
2775
2776 b = find_all_matches(&ht,text,(uint) strlen(text),&len);
2777 if (!b)
2778 return NullS;
2779 e = b->pData;
2780 }
2781
2782 if (e)
2783 {
2784 ptr= strdup(e->str);
2785 e = e->pNext;
2786 return ptr;
2787 }
2788 }
2789 else
2790 { /* traverse the entire hash, ugly but works */
2791
2792 if (!state)
2793 {
2794 /* find the first used bucket */
2795 for (i=0 ; i < ht.nTableSize ; i++)
2796 {
2797 if (ht.arBuckets[i])
2798 {
2799 b = ht.arBuckets[i];
2800 e = b->pData;
2801 break;
2802 }
2803 }
2804 }
2805 ptr= NullS;
2806 while (e && !ptr)
2807 { /* find valid entry in bucket */
2808 if ((uint) strlen(e->str) == b->nKeyLength)
2809 ptr = strdup(e->str);
2810 /* find the next used entry */
2811 e = e->pNext;
2812 if (!e)
2813 { /* find the next used bucket */
2814 b = b->pNext;
2815 if (!b)
2816 {
2817 for (i++ ; i<ht.nTableSize; i++)
2818 {
2819 if (ht.arBuckets[i])
2820 {
2821 b = ht.arBuckets[i];
2822 e = b->pData;
2823 break;
2824 }
2825 }
2826 }
2827 else
2828 e = b->pData;
2829 }
2830 }
2831 if (ptr)
2832 return ptr;
2833 }
2834 return NullS;
2835}
2836
2837
2838/* Build up the completion hash */
2839
2840static void build_completion_hash(bool rehash, bool write_info)
2841{
2842 COMMANDS *cmd=commands;
2843 MYSQL_RES *databases=0,*tables=0;
2844 MYSQL_RES *fields;
2845 static char ***field_names= 0;
2846 MYSQL_ROW database_row,table_row;
2847 MYSQL_FIELD *sql_field;
2848 char buf[NAME_LEN*2+2]; // table name plus field name plus 2
2849 int i,j,num_fields;
2850 DBUG_ENTER("build_completion_hash");
2851
2852 if (status.batch || quick || !current_db)
2853 DBUG_VOID_RETURN; // We don't need completion in batches
2854 if (!rehash)
2855 DBUG_VOID_RETURN;
2856
2857 /* Free old used memory */
2858 if (field_names)
2859 field_names=0;
2860 completion_hash_clean(&ht);
2861 free_root(&hash_mem_root,MYF(0));
2862
2863 /* hash this file's known subset of SQL commands */
2864 while (cmd->name) {
2865 add_word(&ht,(char*) cmd->name);
2866 cmd++;
2867 }
2868
2869 /* hash MySQL functions (to be implemented) */
2870
2871 /* hash all database names */
2872 if (mysql_query(&mysql,"show databases") == 0)
2873 {
2874 if (!(databases = mysql_store_result(&mysql)))
2875 put_info(mysql_error(&mysql),INFO_INFO);
2876 else
2877 {
2878 while ((database_row=mysql_fetch_row(databases)))
2879 {
2880 char *str=strdup_root(&hash_mem_root, (char*) database_row[0]);
2881 if (str)
2882 add_word(&ht,(char*) str);
2883 }
2884 mysql_free_result(databases);
2885 }
2886 }
2887 /* hash all table names */
2888 if (mysql_query(&mysql,"show tables")==0)
2889 {
2890 if (!(tables = mysql_store_result(&mysql)))
2891 put_info(mysql_error(&mysql),INFO_INFO);
2892 else
2893 {
2894 if (mysql_num_rows(tables) > 0 && !opt_silent && write_info)
2895 {
2896 tee_fprintf(stdout, "\
2897Reading table information for completion of table and column names\n\
2898You can turn off this feature to get a quicker startup with -A\n\n");
2899 }
2900 while ((table_row=mysql_fetch_row(tables)))
2901 {
2902 char *str=strdup_root(&hash_mem_root, (char*) table_row[0]);
2903 if (str &&
2904 !completion_hash_exists(&ht,(char*) str, (uint) strlen(str)))
2905 add_word(&ht,str);
2906 }
2907 }
2908 }
2909
2910 /* hash all field names, both with the table prefix and without it */
2911 if (!tables) /* no tables */
2912 {
2913 DBUG_VOID_RETURN;
2914 }
2915 mysql_data_seek(tables,0);
2916 if (!(field_names= (char ***) alloc_root(&hash_mem_root,sizeof(char **) *
2917 (uint) (mysql_num_rows(tables)+1))))
2918 {
2919 mysql_free_result(tables);
2920 DBUG_VOID_RETURN;
2921 }
2922 i=0;
2923 while ((table_row=mysql_fetch_row(tables)))
2924 {
2925 if ((fields=mysql_list_fields(&mysql,(const char*) table_row[0],NullS)))
2926 {
2927 num_fields=mysql_num_fields(fields);
2928 if (!(field_names[i] = (char **) alloc_root(&hash_mem_root,
2929 sizeof(char *) *
2930 (num_fields*2+1))))
2931 {
2932 mysql_free_result(fields);
2933 break;
2934 }
2935 field_names[i][num_fields*2]= NULL;
2936 j=0;
2937 while ((sql_field=mysql_fetch_field(fields)))
2938 {
2939 sprintf(buf,"%.64s.%.64s",table_row[0],sql_field->name);
2940 field_names[i][j] = strdup_root(&hash_mem_root,buf);
2941 add_word(&ht,field_names[i][j]);
2942 field_names[i][num_fields+j] = strdup_root(&hash_mem_root,
2943 sql_field->name);
2944 if (!completion_hash_exists(&ht,field_names[i][num_fields+j],
2945 (uint) strlen(field_names[i][num_fields+j])))
2946 add_word(&ht,field_names[i][num_fields+j]);
2947 j++;
2948 }
2949 mysql_free_result(fields);
2950 }
2951 else
2952 field_names[i]= 0;
2953
2954 i++;
2955 }
2956 mysql_free_result(tables);
2957 field_names[i]=0; // End pointer
2958 DBUG_VOID_RETURN;
2959}
2960
2961 /* for gnu readline */
2962
2963#ifndef HAVE_INDEX
2964extern "C" {
2965extern char *index(const char *,int c),*rindex(const char *,int);
2966
2967char *index(const char *s,int c)
2968{
2969 for (;;)
2970 {
2971 if (*s == (char) c) return (char*) s;
2972 if (!*s++) return NullS;
2973 }
2974}
2975
2976char *rindex(const char *s,int c)
2977{
2978 reg3 char *t;
2979
2980 t = NullS;
2981 do if (*s == (char) c) t = (char*) s; while (*s++);
2982 return (char*) t;
2983}
2984}
2985#endif
2986
2987/* Add the given line to mysql history. */
2988static void add_filtered_history(const char *string)
2989{
2990 if (!check_histignore(string))
2991 add_history(string);
2992}
2993
2994
2995/**
2996 Perform a check on the given string if it contains
2997 any of the histignore patterns.
2998
2999 @param string [IN] String that needs to be checked.
3000
3001 @return Operation status
3002 @retval 0 No match found
3003 @retval 1 Match found
3004*/
3005
3006static
3007my_bool check_histignore(const char *string)
3008{
3009 uint i;
3010 int rc;
3011
3012 LEX_STRING *tmp;
3013
3014 DBUG_ENTER("check_histignore");
3015
3016 for (i= 0; i < histignore_patterns.elements; i++)
3017 {
3018 tmp= dynamic_element(&histignore_patterns, i, LEX_STRING *);
3019 if ((rc= charset_info->coll->wildcmp(charset_info,
3020 string, string + strlen(string),
3021 tmp->str, tmp->str + tmp->length,
3022 wild_prefix, wild_one,
3023 wild_many)) == 0)
3024 DBUG_RETURN(1);
3025 }
3026 DBUG_RETURN(0);
3027}
3028
3029
3030/**
3031 Parse the histignore list into pattern tokens.
3032
3033 @return Operation status
3034 @retval 0 Success
3035 @retval 1 Failure
3036*/
3037
3038static
3039my_bool parse_histignore()
3040{
3041 LEX_STRING pattern;
3042
3043 char *token;
3044 const char *search= ":";
3045
3046 DBUG_ENTER("parse_histignore");
3047
3048 if (init_hist_patterns())
3049 DBUG_RETURN(1);
3050
3051 token= strtok(histignore_buffer.str, search);
3052
3053 while(token != NULL)
3054 {
3055 pattern.str= token;
3056 pattern.length= strlen(pattern.str);
3057 insert_dynamic(&histignore_patterns, &pattern);
3058 token= strtok(NULL, search);
3059 }
3060 DBUG_RETURN(0);
3061}
3062
3063static
3064my_bool init_hist_patterns()
3065{
3066 return my_init_dynamic_array(&histignore_patterns,
3067 sizeof(LEX_STRING), 50, 50);
3068}
3069
3070static
3071void free_hist_patterns()
3072{
3073 delete_dynamic(&histignore_patterns);
3074}
3075#endif /* HAVE_READLINE */
3076
3077
3078static int reconnect(void)
3079{
3080 /* purecov: begin tested */
3081 if (opt_reconnect)
3082 {
3083 put_info("No connection. Trying to reconnect...",INFO_INFO);
3084 (void) com_connect((String *) 0, 0);
3085 if (opt_rehash)
3086 com_rehash(NULL, NULL);
3087 }
3088 if (!connected)
3089 return put_info("Can't connect to the server\n",INFO_ERROR);
3090 /* purecov: end */
3091 return 0;
3092}
3093
3094static void get_current_db()
3095{
3096 MYSQL_RES *res;
3097
3098 /* If one_database is set, current_db is not supposed to change. */
3099 if (one_database)
3100 return;
3101
3102 my_free(current_db);
3103 current_db= NULL;
3104 /* In case of error below current_db will be NULL */
3105 if (!mysql_query(&mysql, "SELECT DATABASE()") &&
3106 (res= mysql_use_result(&mysql)))
3107 {
3108 MYSQL_ROW row= mysql_fetch_row(res);
3109 if (row && row[0])
3110 current_db= my_strdup(row[0], MYF(MY_WME));
3111 mysql_free_result(res);
3112 }
3113}
3114
3115/***************************************************************************
3116 The different commands
3117***************************************************************************/
3118
3119int mysql_real_query_for_lazy(const char *buf, int length)
3120{
3121 for (uint retry=0;; retry++)
3122 {
3123 int error;
3124 if (!mysql_real_query(&mysql,buf,length))
3125 return 0;
3126 error= put_error(&mysql);
3127 if (mysql_errno(&mysql) != CR_SERVER_GONE_ERROR || retry > 1 ||
3128 !opt_reconnect)
3129 return error;
3130 if (reconnect())
3131 return error;
3132 }
3133}
3134
3135int mysql_store_result_for_lazy(MYSQL_RES **result)
3136{
3137 if ((*result=mysql_store_result(&mysql)))
3138 return 0;
3139
3140 if (mysql_error(&mysql)[0])
3141 return put_error(&mysql);
3142 return 0;
3143}
3144
3145static void print_help_item(MYSQL_ROW *cur, int num_name, int num_cat, char *last_char)
3146{
3147 char ccat= (*cur)[num_cat][0];
3148 if (*last_char != ccat)
3149 {
3150 put_info(ccat == 'Y' ? "categories:" : "topics:", INFO_INFO);
3151 *last_char= ccat;
3152 }
3153 tee_fprintf(PAGER, " %s\n", (*cur)[num_name]);
3154}
3155
3156
3157static int com_server_help(String *buffer __attribute__((unused)),
3158 char *line __attribute__((unused)), char *help_arg)
3159{
3160 MYSQL_ROW cur;
3161 const char *server_cmd;
3162 char cmd_buf[100 + 1];
3163 MYSQL_RES *result;
3164 int error;
3165
3166 if (help_arg[0] != '\'')
3167 {
3168 char *end_arg= strend(help_arg);
3169 if(--end_arg)
3170 {
3171 while (my_isspace(charset_info,*end_arg))
3172 end_arg--;
3173 *++end_arg= '\0';
3174 }
3175 (void) strxnmov(cmd_buf, sizeof(cmd_buf), "help '", help_arg, "'", NullS);
3176 }
3177 else
3178 (void) strxnmov(cmd_buf, sizeof(cmd_buf), "help ", help_arg, NullS);
3179
3180 server_cmd= cmd_buf;
3181
3182 if (!status.batch)
3183 {
3184 old_buffer= *buffer;
3185 old_buffer.copy();
3186 }
3187
3188 if (!connected && reconnect())
3189 return 1;
3190
3191 if ((error= mysql_real_query_for_lazy(server_cmd,(int)strlen(server_cmd))) ||
3192 (error= mysql_store_result_for_lazy(&result)))
3193 return error;
3194
3195 if (result)
3196 {
3197 unsigned int num_fields= mysql_num_fields(result);
3198 my_ulonglong num_rows= mysql_num_rows(result);
3199 mysql_fetch_fields(result);
3200 if (num_fields==3 && num_rows==1)
3201 {
3202 if (!(cur= mysql_fetch_row(result)))
3203 {
3204 error= -1;
3205 goto err;
3206 }
3207
3208 init_pager();
3209 tee_fprintf(PAGER, "Name: \'%s\'\n", cur[0]);
3210 tee_fprintf(PAGER, "Description:\n%s", cur[1]);
3211 if (cur[2] && *((char*)cur[2]))
3212 tee_fprintf(PAGER, "Examples:\n%s", cur[2]);
3213 tee_fprintf(PAGER, "\n");
3214 end_pager();
3215 }
3216 else if (num_fields >= 2 && num_rows)
3217 {
3218 init_pager();
3219 char last_char= 0;
3220
3221 int num_name= 0, num_cat= 0;
3222 LINT_INIT(num_name);
3223 LINT_INIT(num_cat);
3224
3225 if (num_fields == 2)
3226 {
3227 put_info("Many help items for your request exist.", INFO_INFO);
3228 put_info("To make a more specific request, please type 'help <item>',\nwhere <item> is one of the following", INFO_INFO);
3229 num_name= 0;
3230 num_cat= 1;
3231 }
3232 else if ((cur= mysql_fetch_row(result)))
3233 {
3234 tee_fprintf(PAGER, "You asked for help about help category: \"%s\"\n", cur[0]);
3235 put_info("For more information, type 'help <item>', where <item> is one of the following", INFO_INFO);
3236 num_name= 1;
3237 num_cat= 2;
3238 print_help_item(&cur,1,2,&last_char);
3239 }
3240
3241 while ((cur= mysql_fetch_row(result)))
3242 print_help_item(&cur,num_name,num_cat,&last_char);
3243 tee_fprintf(PAGER, "\n");
3244 end_pager();
3245 }
3246 else
3247 {
3248 put_info("\nNothing found", INFO_INFO);
3249 if (strncasecmp(server_cmd, "help 'contents'", 15) == 0)
3250 {
3251 put_info("\nPlease check if 'help tables' are loaded.\n", INFO_INFO);
3252 goto err;
3253 }
3254 put_info("Please try to run 'help contents' for a list of all accessible topics\n", INFO_INFO);
3255 }
3256 }
3257
3258err:
3259 mysql_free_result(result);
3260 return error;
3261}
3262
3263static int
3264com_help(String *buffer __attribute__((unused)),
3265 char *line __attribute__((unused)))
3266{
3267 reg1 int i, j;
3268 char * help_arg= strchr(line,' '), buff[32], *end;
3269 if (help_arg)
3270 {
3271 while (my_isspace(charset_info,*help_arg))
3272 help_arg++;
3273 if (*help_arg)
3274 return com_server_help(buffer,line,help_arg);
3275 }
3276
3277 put_info("\nFor information about MySQL products and services, visit:\n"
3278 " http://www.mysql.com/\n"
3279 "For developer information, including the MySQL Reference Manual, "
3280 "visit:\n"
3281 " http://dev.mysql.com/\n"
3282 "To buy MySQL Enterprise support, training, or other products, visit:\n"
3283 " https://shop.mysql.com/\n", INFO_INFO);
3284 put_info("List of all MySQL commands:", INFO_INFO);
3285 if (!named_cmds)
3286 put_info("Note that all text commands must be first on line and end with ';'",INFO_INFO);
3287 for (i = 0; commands[i].name; i++)
3288 {
3289 end= strmov(buff, commands[i].name);
3290 for (j= (int)strlen(commands[i].name); j < 10; j++)
3291 end= strmov(end, " ");
3292 if (commands[i].func)
3293 tee_fprintf(stdout, "%s(\\%c) %s\n", buff,
3294 commands[i].cmd_char, commands[i].doc);
3295 }
3296 if (connected && mysql_get_server_version(&mysql) >= 40100)
3297 put_info("\nFor server side help, type 'help contents'\n", INFO_INFO);
3298 return 0;
3299}
3300
3301
3302 /* ARGSUSED */
3303static int
3304com_clear(String *buffer,char *line __attribute__((unused)))
3305{
3306#ifdef HAVE_READLINE
3307 if (status.add_to_history)
3308 fix_history(buffer);
3309#endif
3310 buffer->length(0);
3311 return 0;
3312}
3313
3314 /* ARGSUSED */
3315static int
3316com_charset(String *buffer __attribute__((unused)), char *line)
3317{
3318 char buff[256], *param;
3319 const CHARSET_INFO *new_cs;
3320 strmake(buff, line, sizeof(buff) - 1);
3321 param= get_arg(buff, 0);
3322 if (!param || !*param)
3323 {
3324 return put_info("Usage: \\C charset_name | charset charset_name",
3325 INFO_ERROR, 0);
3326 }
3327 new_cs= get_charset_by_csname(param, MY_CS_PRIMARY, MYF(MY_WME));
3328 if (new_cs)
3329 {
3330 charset_info= new_cs;
3331 mysql_set_character_set(&mysql, charset_info->csname);
3332 default_charset= (char *)charset_info->csname;
3333 put_info("Charset changed", INFO_INFO);
3334 }
3335 else put_info("Charset is not found", INFO_INFO);
3336 return 0;
3337}
3338
3339/*
3340 Execute command
3341 Returns: 0 if ok
3342 -1 if not fatal error
3343 1 if fatal error
3344*/
3345
3346
3347static int
3348com_go(String *buffer,char *line __attribute__((unused)))
3349{
3350 char buff[200]; /* about 110 chars used so far */
3351 char time_buff[52+3+1]; /* time max + space&parens + NUL */
3352 MYSQL_RES *result;
3353 ulong timer, warnings= 0;
3354 uint error= 0;
3355 int err= 0;
3356
3357 interrupted_query= 0;
3358 if (!status.batch)
3359 {
3360 old_buffer= *buffer; // Save for edit command
3361 old_buffer.copy();
3362 }
3363
3364 /* Remove garbage for nicer messages */
3365 LINT_INIT(buff[0]);
3366 remove_cntrl(*buffer);
3367
3368 if (buffer->is_empty())
3369 {
3370 if (status.batch) // Ignore empty quries
3371 return 0;
3372 return put_info("No query specified\n",INFO_ERROR);
3373
3374 }
3375 if (!connected && reconnect())
3376 {
3377 buffer->length(0); // Remove query on error
3378 return opt_reconnect ? -1 : 1; // Fatal error
3379 }
3380 if (verbose)
3381 (void) com_print(buffer,0);
3382
3383 if (skip_updates &&
3384 (buffer->length() < 4 || my_strnncoll(charset_info,
3385 (const uchar*)buffer->ptr(),4,
3386 (const uchar*)"SET ",4)))
3387 {
3388 (void) put_info("Ignoring query to other database",INFO_INFO);
3389 return 0;
3390 }
3391
3392 timer=start_timer();
3393 executing_query= 1;
3394 error= mysql_real_query_for_lazy(buffer->ptr(),buffer->length());
3395
3396#ifdef HAVE_READLINE
3397 if (status.add_to_history)
3398 {
3399 buffer->append(vertical ? "\\G" : delimiter);
3400 /* Append final command onto history */
3401 fix_history(buffer);
3402 }
3403#endif
3404
3405 buffer->length(0);
3406
3407 if (error)
3408 goto end;
3409
3410 do
3411 {
3412 char *pos;
3413 bool batchmode= (status.batch && verbose <= 1) ? TRUE : FALSE;
3414 buff[0]= 0;
3415
3416 if (quick)
3417 {
3418 if (!(result=mysql_use_result(&mysql)) && mysql_field_count(&mysql))
3419 {
3420 error= put_error(&mysql);
3421 goto end;
3422 }
3423 }
3424 else
3425 {
3426 error= mysql_store_result_for_lazy(&result);
3427 if (error)
3428 goto end;
3429 }
3430
3431 if (verbose >= 3 || !opt_silent)
3432 mysql_end_timer(timer,time_buff);
3433 else
3434 time_buff[0]= '\0';
3435
3436 /* Every branch must truncate buff . */
3437 if (result)
3438 {
3439 if (!mysql_num_rows(result) && ! quick && !column_types_flag)
3440 {
3441 strmov(buff, "Empty set");
3442 if (opt_xml)
3443 {
3444 /*
3445 We must print XML header and footer
3446 to produce a well-formed XML even if
3447 the result set is empty (Bug#27608).
3448 */
3449 init_pager();
3450 print_table_data_xml(result);
3451 end_pager();
3452 }
3453 }
3454 else
3455 {
3456 init_pager();
3457 if (opt_html)
3458 print_table_data_html(result);
3459 else if (opt_xml)
3460 print_table_data_xml(result);
3461 else if (vertical || (auto_vertical_output && (terminal_width < get_result_width(result))))
3462 print_table_data_vertically(result);
3463 else if (opt_silent && verbose <= 2 && !output_tables)
3464 print_tab_data(result);
3465 else
3466 print_table_data(result);
3467 if( !batchmode )
3468 sprintf(buff,"%lld %s in set",
3469 mysql_num_rows(result),
3470 mysql_num_rows(result) == 1LL ? "row" : "rows");
3471 end_pager();
3472 if (mysql_errno(&mysql))
3473 error= put_error(&mysql);
3474 }
3475 }
3476 else if (mysql_affected_rows(&mysql) == ~(ulonglong) 0)
3477 strmov(buff,"Query OK");
3478 else if( !batchmode )
3479 sprintf(buff,"Query OK, %lld %s affected",
3480 mysql_affected_rows(&mysql),
3481 mysql_affected_rows(&mysql) == 1LL ? "row" : "rows");
3482
3483 pos=strend(buff);
3484 if ((warnings= mysql_warning_count(&mysql)) && !batchmode)
3485 {
3486 *pos++= ',';
3487 *pos++= ' ';
3488 pos=int10_to_str(warnings, pos, 10);
3489 pos=strmov(pos, " warning");
3490 if (warnings != 1)
3491 *pos++= 's';
3492 }
3493 strmov(pos, time_buff);
3494 put_info(buff,INFO_RESULT);
3495 if (mysql_info(&mysql))
3496 put_info(mysql_info(&mysql),INFO_RESULT);
3497 put_info("",INFO_RESULT); // Empty row
3498
3499 if (result && !mysql_eof(result)) /* Something wrong when using quick */
3500 error= put_error(&mysql);
3501 else if (unbuffered)
3502 fflush(stdout);
3503 mysql_free_result(result);
3504 } while (!(err= mysql_next_result(&mysql)));
3505 if (err >= 1)
3506 error= put_error(&mysql);
3507
3508end:
3509
3510 /* Show warnings if any or error occured */
3511 if (show_warnings == 1 && (warnings >= 1 || error))
3512 print_warnings();
3513
3514 if (!error && !status.batch &&
3515 (mysql.server_status & SERVER_STATUS_DB_DROPPED))
3516 get_current_db();
3517
3518 executing_query= 0;
3519 return error; /* New command follows */
3520}
3521
3522
3523static void init_pager()
3524{
3525#ifdef USE_POPEN
3526 if (!opt_nopager)
3527 {
3528 if (!(PAGER= popen(pager, "w")))
3529 {
3530 tee_fprintf(stdout, "popen() failed! defaulting PAGER to stdout!\n");
3531 PAGER= stdout;
3532 }
3533 }
3534 else
3535#endif
3536 PAGER= stdout;
3537}
3538
3539static void end_pager()
3540{
3541#ifdef USE_POPEN
3542 if (!opt_nopager)
3543 pclose(PAGER);
3544#endif
3545}
3546
3547
3548static void init_tee(const char *file_name)
3549{
3550 FILE* new_outfile;
3551 if (opt_outfile)
3552 end_tee();
3553 if (!(new_outfile= my_fopen(file_name, O_APPEND | O_WRONLY, MYF(MY_WME))))
3554 {
3555 tee_fprintf(stdout, "Error logging to file '%s'\n", file_name);
3556 return;
3557 }
3558 OUTFILE = new_outfile;
3559 strmake(outfile, file_name, FN_REFLEN-1);
3560 tee_fprintf(stdout, "Logging to file '%s'\n", file_name);
3561 opt_outfile= 1;
3562 return;
3563}
3564
3565
3566static void end_tee()
3567{
3568 my_fclose(OUTFILE, MYF(0));
3569 OUTFILE= 0;
3570 opt_outfile= 0;
3571 return;
3572}
3573
3574
3575static int
3576com_ego(String *buffer,char *line)
3577{
3578 int result;
3579 bool oldvertical=vertical;
3580 vertical=1;
3581 result=com_go(buffer,line);
3582 vertical=oldvertical;
3583 return result;
3584}
3585
3586
3587static const char *fieldtype2str(enum enum_field_types type)
3588{
3589 switch (type) {
3590 case MYSQL_TYPE_BIT: return "BIT";
3591 case MYSQL_TYPE_BLOB: return "BLOB";
3592 case MYSQL_TYPE_DATE: return "DATE";
3593 case MYSQL_TYPE_DATETIME: return "DATETIME";
3594 case MYSQL_TYPE_NEWDECIMAL: return "NEWDECIMAL";
3595 case MYSQL_TYPE_DECIMAL: return "DECIMAL";
3596 case MYSQL_TYPE_DOUBLE: return "DOUBLE";
3597 case MYSQL_TYPE_ENUM: return "ENUM";
3598 case MYSQL_TYPE_FLOAT: return "FLOAT";
3599 case MYSQL_TYPE_GEOMETRY: return "GEOMETRY";
3600 case MYSQL_TYPE_INT24: return "INT24";
3601 case MYSQL_TYPE_LONG: return "LONG";
3602 case MYSQL_TYPE_LONGLONG: return "LONGLONG";
3603 case MYSQL_TYPE_LONG_BLOB: return "LONG_BLOB";
3604 case MYSQL_TYPE_MEDIUM_BLOB: return "MEDIUM_BLOB";
3605 case MYSQL_TYPE_NEWDATE: return "NEWDATE";
3606 case MYSQL_TYPE_NULL: return "NULL";
3607 case MYSQL_TYPE_SET: return "SET";
3608 case MYSQL_TYPE_SHORT: return "SHORT";
3609 case MYSQL_TYPE_STRING: return "STRING";
3610 case MYSQL_TYPE_TIME: return "TIME";
3611 case MYSQL_TYPE_TIMESTAMP: return "TIMESTAMP";
3612 case MYSQL_TYPE_TINY: return "TINY";
3613 case MYSQL_TYPE_TINY_BLOB: return "TINY_BLOB";
3614 case MYSQL_TYPE_VAR_STRING: return "VAR_STRING";
3615 case MYSQL_TYPE_YEAR: return "YEAR";
3616 default: return "?-unknown-?";
3617 }
3618}
3619
3620static char *fieldflags2str(uint f) {
3621 static char buf[1024];
3622 char *s=buf;
3623 *s=0;
3624#define ff2s_check_flag(X) \
3625 if (f & X ## _FLAG) { s=strmov(s, # X " "); f &= ~ X ## _FLAG; }
3626 ff2s_check_flag(NOT_NULL);
3627 ff2s_check_flag(PRI_KEY);
3628 ff2s_check_flag(UNIQUE_KEY);
3629 ff2s_check_flag(MULTIPLE_KEY);
3630 ff2s_check_flag(BLOB);
3631 ff2s_check_flag(UNSIGNED);
3632 ff2s_check_flag(ZEROFILL);
3633 ff2s_check_flag(BINARY);
3634 ff2s_check_flag(ENUM);
3635 ff2s_check_flag(AUTO_INCREMENT);
3636 ff2s_check_flag(TIMESTAMP);
3637 ff2s_check_flag(SET);
3638 ff2s_check_flag(NO_DEFAULT_VALUE);
3639 ff2s_check_flag(NUM);
3640 ff2s_check_flag(PART_KEY);
3641 ff2s_check_flag(GROUP);
3642 ff2s_check_flag(UNIQUE);
3643 ff2s_check_flag(BINCMP);
3644 ff2s_check_flag(ON_UPDATE_NOW);
3645#undef ff2s_check_flag
3646 if (f)
3647 sprintf(s, " unknows=0x%04x", f);
3648 return buf;
3649}
3650
3651static void
3652print_field_types(MYSQL_RES *result)
3653{
3654 MYSQL_FIELD *field;
3655 uint i=0;
3656
3657 while ((field = mysql_fetch_field(result)))
3658 {
3659 tee_fprintf(PAGER, "Field %3u: `%s`\n"
3660 "Catalog: `%s`\n"
3661 "Database: `%s`\n"
3662 "Table: `%s`\n"
3663 "Org_table: `%s`\n"
3664 "Type: %s\n"
3665 "Collation: %s (%u)\n"
3666 "Length: %lu\n"
3667 "Max_length: %lu\n"
3668 "Decimals: %u\n"
3669 "Flags: %s\n\n",
3670 ++i,
3671 field->name, field->catalog, field->db, field->table,
3672 field->org_table, fieldtype2str(field->type),
3673 get_charset_name(field->charsetnr), field->charsetnr,
3674 field->length, field->max_length, field->decimals,
3675 fieldflags2str(field->flags));
3676 }
3677 tee_puts("", PAGER);
3678}
3679
3680
3681static void
3682print_table_data(MYSQL_RES *result)
3683{
3684 String separator(256);
3685 MYSQL_ROW cur;
3686 MYSQL_FIELD *field;
3687 bool *num_flag;
3688 size_t sz;
3689
3690 sz= sizeof(bool) * mysql_num_fields(result);
3691 num_flag= (bool *) my_safe_alloca(sz, MAX_ALLOCA_SIZE);
3692 if (column_types_flag)
3693 {
3694 print_field_types(result);
3695 if (!mysql_num_rows(result))
3696 return;
3697 mysql_field_seek(result,0);
3698 }
3699 separator.copy("+",1,charset_info);
3700 while ((field = mysql_fetch_field(result)))
3701 {
3702 uint length= column_names ? field->name_length : 0;
3703 if (quick)
3704 length= max<size_t>(length, field->length);
3705 else
3706 length= max<size_t>(length, field->max_length);
3707 if (length < 4 && !IS_NOT_NULL(field->flags))
3708 length=4; // Room for "NULL"
3709 field->max_length=length;
3710 separator.fill(separator.length()+length+2,'-');
3711 separator.append('+');
3712 }
3713 separator.append('\0'); // End marker for \0
3714 tee_puts((char*) separator.ptr(), PAGER);
3715 if (column_names)
3716 {
3717 mysql_field_seek(result,0);
3718 (void) tee_fputs("|", PAGER);
3719 for (uint off=0; (field = mysql_fetch_field(result)) ; off++)
3720 {
3721 uint name_length= (uint) strlen(field->name);
3722 uint numcells= charset_info->cset->numcells(charset_info,
3723 field->name,
3724 field->name + name_length);
3725 uint display_length= field->max_length + name_length - numcells;
3726 tee_fprintf(PAGER, " %-*s |",
3727 min<int>(display_length, MAX_COLUMN_LENGTH),
3728 field->name);
3729 num_flag[off]= IS_NUM(field->type);
3730 }
3731 (void) tee_fputs("\n", PAGER);
3732 tee_puts((char*) separator.ptr(), PAGER);
3733 }
3734
3735 while ((cur= mysql_fetch_row(result)))
3736 {
3737 if (interrupted_query)
3738 break;
3739 ulong *lengths= mysql_fetch_lengths(result);
3740 (void) tee_fputs("| ", PAGER);
3741 mysql_field_seek(result, 0);
3742 for (uint off= 0; off < mysql_num_fields(result); off++)
3743 {
3744 const char *buffer;
3745 uint data_length;
3746 uint field_max_length;
3747 uint visible_length;
3748 uint extra_padding;
3749
3750 if (off)
3751 (void) tee_fputs(" ", PAGER);
3752
3753 if (cur[off] == NULL)
3754 {
3755 buffer= "NULL";
3756 data_length= 4;
3757 }
3758 else
3759 {
3760 buffer= cur[off];
3761 data_length= (uint) lengths[off];
3762 }
3763
3764 field= mysql_fetch_field(result);
3765 field_max_length= field->max_length;
3766
3767 /*
3768 How many text cells on the screen will this string span? If it contains
3769 multibyte characters, then the number of characters we occupy on screen
3770 will be fewer than the number of bytes we occupy in memory.
3771
3772 We need to find how much screen real-estate we will occupy to know how
3773 many extra padding-characters we should send with the printing function.
3774 */
3775 visible_length= charset_info->cset->numcells(charset_info, buffer, buffer + data_length);
3776 extra_padding= data_length - visible_length;
3777
3778 if (field_max_length > MAX_COLUMN_LENGTH)
3779 tee_print_sized_data(buffer, data_length, MAX_COLUMN_LENGTH+extra_padding, FALSE);
3780 else
3781 {
3782 if (num_flag[off] != 0) /* if it is numeric, we right-justify it */
3783 tee_print_sized_data(buffer, data_length, field_max_length+extra_padding, TRUE);
3784 else
3785 tee_print_sized_data(buffer, data_length, field_max_length+extra_padding, FALSE);
3786 }
3787 tee_fputs(" |", PAGER);
3788 }
3789 (void) tee_fputs("\n", PAGER);
3790 }
3791 tee_puts((char*) separator.ptr(), PAGER);
3792 my_safe_afree((bool *) num_flag, sz, MAX_ALLOCA_SIZE);
3793}
3794
3795/**
3796 Return the length of a field after it would be rendered into text.
3797
3798 This doesn't know or care about multibyte characters. Assume we're
3799 using such a charset. We can't know that all of the upcoming rows
3800 for this column will have bytes that each render into some fraction
3801 of a character. It's at least possible that a row has bytes that
3802 all render into one character each, and so the maximum length is
3803 still the number of bytes. (Assumption 1: This can't be better
3804 because we can never know the number of characters that the DB is
3805 going to send -- only the number of bytes. 2: Chars <= Bytes.)
3806
3807 @param field Pointer to a field to be inspected
3808
3809 @returns number of character positions to be used, at most
3810*/
3811static int get_field_disp_length(MYSQL_FIELD *field)
3812{
3813 uint length= column_names ? field->name_length : 0;
3814
3815 if (quick)
3816 length= max<uint>(length, field->length);
3817 else
3818 length= max<uint>(length, field->max_length);
3819
3820 if (length < 4 && !IS_NOT_NULL(field->flags))
3821 length= 4; /* Room for "NULL" */
3822
3823 return length;
3824}
3825
3826/**
3827 For a new result, return the max number of characters that any
3828 upcoming row may return.
3829
3830 @param result Pointer to the result to judge
3831
3832 @returns The max number of characters in any row of this result
3833*/
3834static int get_result_width(MYSQL_RES *result)
3835{
3836 unsigned int len= 0;
3837 MYSQL_FIELD *field;
3838 MYSQL_FIELD_OFFSET offset;
3839
3840#ifndef DBUG_OFF
3841 offset= mysql_field_tell(result);
3842 DBUG_ASSERT(offset == 0);
3843#else
3844 offset= 0;
3845#endif
3846
3847 while ((field= mysql_fetch_field(result)) != NULL)
3848 len+= get_field_disp_length(field) + 3; /* plus bar, space, & final space */
3849
3850 (void) mysql_field_seek(result, offset);
3851
3852 return len + 1; /* plus final bar. */
3853}
3854
3855static void
3856tee_print_sized_data(const char *data, unsigned int data_length, unsigned int total_bytes_to_send, bool right_justified)
3857{
3858 /*
3859 For '\0's print ASCII spaces instead, as '\0' is eaten by (at
3860 least my) console driver, and that messes up the pretty table
3861 grid. (The \0 is also the reason we can't use fprintf() .)
3862 */
3863 unsigned int i;
3864
3865 if (right_justified)
3866 for (i= data_length; i < total_bytes_to_send; i++)
3867 tee_putc((int)' ', PAGER);
3868
3869 tee_write(PAGER, data, data_length, MY_PRINT_SPS_0 | MY_PRINT_MB);
3870
3871 if (! right_justified)
3872 for (i= data_length; i < total_bytes_to_send; i++)
3873 tee_putc((int)' ', PAGER);
3874}
3875
3876
3877
3878static void
3879print_table_data_html(MYSQL_RES *result)
3880{
3881 MYSQL_ROW cur;
3882 MYSQL_FIELD *field;
3883
3884 mysql_field_seek(result,0);
3885 (void) tee_fputs("<TABLE BORDER=1><TR>", PAGER);
3886 if (column_names)
3887 {
3888 while((field = mysql_fetch_field(result)))
3889 {
3890 tee_fputs("<TH>", PAGER);
3891 if (field->name && field->name[0])
3892 xmlencode_print(field->name, field->name_length);
3893 else
3894 tee_fputs(field->name ? " &nbsp; " : "NULL", PAGER);
3895 tee_fputs("</TH>", PAGER);
3896 }
3897 (void) tee_fputs("</TR>", PAGER);
3898 }
3899 while ((cur = mysql_fetch_row(result)))
3900 {
3901 if (interrupted_query)
3902 break;
3903 ulong *lengths=mysql_fetch_lengths(result);
3904 (void) tee_fputs("<TR>", PAGER);
3905 for (uint i=0; i < mysql_num_fields(result); i++)
3906 {
3907 (void) tee_fputs("<TD>", PAGER);
3908 xmlencode_print(cur[i], lengths[i]);
3909 (void) tee_fputs("</TD>", PAGER);
3910 }
3911 (void) tee_fputs("</TR>", PAGER);
3912 }
3913 (void) tee_fputs("</TABLE>", PAGER);
3914}
3915
3916
3917static void
3918print_table_data_xml(MYSQL_RES *result)
3919{
3920 MYSQL_ROW cur;
3921 MYSQL_FIELD *fields;
3922
3923 mysql_field_seek(result,0);
3924
3925 tee_fputs("<?xml version=\"1.0\"?>\n\n<resultset statement=\"", PAGER);
3926 xmlencode_print(glob_buffer.ptr(), (int)strlen(glob_buffer.ptr()));
3927 tee_fputs("\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">",
3928 PAGER);
3929
3930 fields = mysql_fetch_fields(result);
3931 while ((cur = mysql_fetch_row(result)))
3932 {
3933 if (interrupted_query)
3934 break;
3935 ulong *lengths=mysql_fetch_lengths(result);
3936 (void) tee_fputs("\n <row>\n", PAGER);
3937 for (uint i=0; i < mysql_num_fields(result); i++)
3938 {
3939 tee_fprintf(PAGER, "\t<field name=\"");
3940 xmlencode_print(fields[i].name, (uint) strlen(fields[i].name));
3941 if (cur[i])
3942 {
3943 tee_fprintf(PAGER, "\">");
3944 xmlencode_print(cur[i], lengths[i]);
3945 tee_fprintf(PAGER, "</field>\n");
3946 }
3947 else
3948 tee_fprintf(PAGER, "\" xsi:nil=\"true\" />\n");
3949 }
3950 (void) tee_fputs(" </row>\n", PAGER);
3951 }
3952 (void) tee_fputs("</resultset>\n", PAGER);
3953}
3954
3955
3956static void
3957print_table_data_vertically(MYSQL_RES *result)
3958{
3959 MYSQL_ROW cur;
3960 uint max_length=0;
3961 MYSQL_FIELD *field;
3962
3963 while ((field = mysql_fetch_field(result)))
3964 {
3965 uint length= field->name_length;
3966 if (length > max_length)
3967 max_length= length;
3968 field->max_length=length;
3969 }
3970
3971 mysql_field_seek(result,0);
3972 for (uint row_count=1; (cur= mysql_fetch_row(result)); row_count++)
3973 {
3974 if (interrupted_query)
3975 break;
3976 mysql_field_seek(result,0);
3977 tee_fprintf(PAGER,
3978 "*************************** %d. row ***************************\n", row_count);
3979
3980 ulong *lengths= mysql_fetch_lengths(result);
3981
3982 for (uint off=0; off < mysql_num_fields(result); off++)
3983 {
3984 field= mysql_fetch_field(result);
3985 if (column_names)
3986 tee_fprintf(PAGER, "%*s: ",(int) max_length,field->name);
3987 if (cur[off])
3988 {
3989 tee_write(PAGER, cur[off], lengths[off], MY_PRINT_SPS_0 | MY_PRINT_MB);
3990 tee_putc('\n', PAGER);
3991 }
3992 else
3993 tee_fprintf(PAGER, "NULL\n");
3994 }
3995 }
3996}
3997
3998
3999/* print_warnings should be called right after executing a statement */
4000
4001static void print_warnings()
4002{
4003 const char *query;
4004 MYSQL_RES *result;
4005 MYSQL_ROW cur;
4006 my_ulonglong num_rows;
4007
4008 /* Save current error before calling "show warnings" */
4009 uint error= mysql_errno(&mysql);
4010
4011 /* Get the warnings */
4012 query= "show warnings";
4013 mysql_real_query_for_lazy(query, strlen(query));
4014 mysql_store_result_for_lazy(&result);
4015
4016 /* Bail out when no warnings */
4017 if (!result || !(num_rows= mysql_num_rows(result)))
4018 goto end;
4019
4020 cur= mysql_fetch_row(result);
4021
4022 /*
4023 Don't print a duplicate of the current error. It is possible for SHOW
4024 WARNINGS to return multiple errors with the same code, but different
4025 messages. To be safe, skip printing the duplicate only if it is the only
4026 warning.
4027 */
4028 if (!cur || (num_rows == 1 && error == (uint) strtoul(cur[1], NULL, 10)))
4029 goto end;
4030
4031 /* Print the warnings */
4032 init_pager();
4033 do
4034 {
4035 tee_fprintf(PAGER, "%s (Code %s): %s\n", cur[0], cur[1], cur[2]);
4036 } while ((cur= mysql_fetch_row(result)));
4037 end_pager();
4038
4039end:
4040 mysql_free_result(result);
4041}
4042
4043
4044static const char *array_value(const char **array, char key)
4045{
4046 for (; *array; array+= 2)
4047 if (**array == key)
4048 return array[1];
4049 return 0;
4050}
4051
4052
4053static void
4054xmlencode_print(const char *src, uint length)
4055{
4056 if (!src)
4057 tee_fputs("NULL", PAGER);
4058 else
4059 tee_write(PAGER, src, length, MY_PRINT_XML | MY_PRINT_MB);
4060}
4061
4062
4063static void
4064safe_put_field(const char *pos,ulong length)
4065{
4066 if (!pos)
4067 tee_fputs("NULL", PAGER);
4068 else
4069 {
4070 int flags= MY_PRINT_MB | (opt_raw_data ? 0 : (MY_PRINT_ESC_0 | MY_PRINT_CTRL));
4071 /* Can't use tee_fputs(), it stops with NUL characters. */
4072 tee_write(PAGER, pos, length, flags);
4073 }
4074}
4075
4076
4077static void
4078print_tab_data(MYSQL_RES *result)
4079{
4080 MYSQL_ROW cur;
4081 MYSQL_FIELD *field;
4082 ulong *lengths;
4083
4084 if (opt_silent < 2 && column_names)
4085 {
4086 int first=0;
4087 while ((field = mysql_fetch_field(result)))
4088 {
4089 if (first++)
4090 (void) tee_fputs("\t", PAGER);
4091 (void) tee_fputs(field->name, PAGER);
4092 }
4093 (void) tee_fputs("\n", PAGER);
4094 }
4095 while ((cur = mysql_fetch_row(result)))
4096 {
4097 lengths=mysql_fetch_lengths(result);
4098 safe_put_field(cur[0],lengths[0]);
4099 for (uint off=1 ; off < mysql_num_fields(result); off++)
4100 {
4101 (void) tee_fputs("\t", PAGER);
4102 safe_put_field(cur[off], lengths[off]);
4103 }
4104 (void) tee_fputs("\n", PAGER);
4105 }
4106}
4107
4108static int
4109com_tee(String *buffer __attribute__((unused)),
4110 char *line __attribute__((unused)))
4111{
4112 char file_name[FN_REFLEN], *end, *param;
4113
4114 while (my_isspace(charset_info,*line))
4115 line++;
4116 if (!(param = strchr(line, ' '))) // if outfile wasn't given, use the default
4117 {
4118 if (!strlen(outfile))
4119 {
4120 printf("No previous outfile available, you must give a filename!\n");
4121 return 0;
4122 }
4123 else if (opt_outfile)
4124 {
4125 tee_fprintf(stdout, "Currently logging to file '%s'\n", outfile);
4126 return 0;
4127 }
4128 else
4129 param = outfile; //resume using the old outfile
4130 }
4131
4132 /* eliminate the spaces before the parameters */
4133 while (my_isspace(charset_info,*param))
4134 param++;
4135 end= strmake(file_name, param, sizeof(file_name) - 1);
4136 /* remove end space from command line */
4137 while (end > file_name && (my_isspace(charset_info,end[-1]) ||
4138 my_iscntrl(charset_info,end[-1])))
4139 end--;
4140 end[0]= 0;
4141 if (end == file_name)
4142 {
4143 printf("No outfile specified!\n");
4144 return 0;
4145 }
4146 init_tee(file_name);
4147 return 0;
4148}
4149
4150
4151static int
4152com_notee(String *buffer __attribute__((unused)),
4153 char *line __attribute__((unused)))
4154{
4155 if (opt_outfile)
4156 end_tee();
4157 tee_fprintf(stdout, "Outfile disabled.\n");
4158 return 0;
4159}
4160
4161/*
4162 Sorry, this command is not available in Windows.
4163*/
4164
4165#ifdef USE_POPEN
4166static int
4167com_pager(String *buffer __attribute__((unused)),
4168 char *line __attribute__((unused)))
4169{
4170 char pager_name[FN_REFLEN], *end, *param;
4171
4172 if (status.batch)
4173 return 0;
4174 /* Skip spaces in front of the pager command */
4175 while (my_isspace(charset_info, *line))
4176 line++;
4177 /* Skip the pager command */
4178 param= strchr(line, ' ');
4179 /* Skip the spaces between the command and the argument */
4180 while (param && my_isspace(charset_info, *param))
4181 param++;
4182 if (!param || !strlen(param)) // if pager was not given, use the default
4183 {
4184 if (!default_pager_set)
4185 {
4186 tee_fprintf(stdout, "Default pager wasn't set, using stdout.\n");
4187 opt_nopager=1;
4188 strmov(pager, "stdout");
4189 PAGER= stdout;
4190 return 0;
4191 }
4192 strmov(pager, default_pager);
4193 }
4194 else
4195 {
4196 end= strmake(pager_name, param, sizeof(pager_name)-1);
4197 while (end > pager_name && (my_isspace(charset_info,end[-1]) ||
4198 my_iscntrl(charset_info,end[-1])))
4199 end--;
4200 end[0]=0;
4201 strmov(pager, pager_name);
4202 strmov(default_pager, pager_name);
4203 }
4204 opt_nopager=0;
4205 tee_fprintf(stdout, "PAGER set to '%s'\n", pager);
4206 return 0;
4207}
4208
4209
4210static int
4211com_nopager(String *buffer __attribute__((unused)),
4212 char *line __attribute__((unused)))
4213{
4214 strmov(pager, "stdout");
4215 opt_nopager=1;
4216 PAGER= stdout;
4217 tee_fprintf(stdout, "PAGER set to stdout\n");
4218 return 0;
4219}
4220#endif
4221
4222
4223/*
4224 Sorry, you can't send the result to an editor in Win32
4225*/
4226
4227#ifdef USE_POPEN
4228static int
4229com_edit(String *buffer,char *line __attribute__((unused)))
4230{
4231 char filename[FN_REFLEN],buff[160];
4232 int fd,tmp;
4233 const char *editor;
4234
4235 if ((fd=create_temp_file(filename,NullS,"sql", O_CREAT | O_WRONLY,
4236 MYF(MY_WME))) < 0)
4237 goto err;
4238 if (buffer->is_empty() && !old_buffer.is_empty())
4239 (void) my_write(fd,(uchar*) old_buffer.ptr(),old_buffer.length(),
4240 MYF(MY_WME));
4241 else
4242 (void) my_write(fd,(uchar*) buffer->ptr(),buffer->length(),MYF(MY_WME));
4243 (void) my_close(fd,MYF(0));
4244
4245 if (!(editor = (char *)getenv("EDITOR")) &&
4246 !(editor = (char *)getenv("VISUAL")))
4247 editor = "vi";
4248 strxmov(buff,editor," ",filename,NullS);
4249 if(system(buff) == -1)
4250 goto err;
4251
4252 MY_STAT stat_arg;
4253 if (!my_stat(filename,&stat_arg,MYF(MY_WME)))
4254 goto err;
4255 if ((fd = my_open(filename,O_RDONLY, MYF(MY_WME))) < 0)
4256 goto err;
4257 (void) buffer->alloc((uint) stat_arg.st_size);
4258 if ((tmp=read(fd,(char*) buffer->ptr(),buffer->alloced_length())) >= 0L)
4259 buffer->length((uint) tmp);
4260 else
4261 buffer->length(0);
4262 (void) my_close(fd,MYF(0));
4263 (void) my_delete(filename,MYF(MY_WME));
4264err:
4265 return 0;
4266}
4267#endif
4268
4269
4270/* If arg is given, exit without errors. This happens on command 'quit' */
4271
4272static int
4273com_quit(String *buffer __attribute__((unused)),
4274 char *line __attribute__((unused)))
4275{
4276 status.exit_status=0;
4277 return 1;
4278}
4279
4280static int
4281com_rehash(String *buffer __attribute__((unused)),
4282 char *line __attribute__((unused)))
4283{
4284#ifdef HAVE_READLINE
4285 build_completion_hash(1, 0);
4286#endif
4287 return 0;
4288}
4289
4290
4291#ifdef USE_POPEN
4292static int
4293com_shell(String *buffer __attribute__((unused)),
4294 char *line __attribute__((unused)))
4295{
4296 char *shell_cmd;
4297
4298 /* Skip space from line begin */
4299 while (my_isspace(charset_info, *line))
4300 line++;
4301 if (!(shell_cmd = strchr(line, ' ')))
4302 {
4303 put_info("Usage: \\! shell-command", INFO_ERROR);
4304 return -1;
4305 }
4306 /*
4307 The output of the shell command does not
4308 get directed to the pager or the outfile
4309 */
4310 if (system(shell_cmd) == -1)
4311 {
4312 put_info(strerror(errno), INFO_ERROR, errno);
4313 return -1;
4314 }
4315 return 0;
4316}
4317#endif
4318
4319
4320static int
4321com_print(String *buffer,char *line __attribute__((unused)))
4322{
4323 tee_puts("--------------", stdout);
4324 (void) tee_fputs(buffer->c_ptr(), stdout);
4325 if (!buffer->length() || (*buffer)[buffer->length()-1] != '\n')
4326 tee_putc('\n', stdout);
4327 tee_puts("--------------\n", stdout);
4328 return 0; /* If empty buffer */
4329}
4330
4331 /* ARGSUSED */
4332static int
4333com_connect(String *buffer, char *line)
4334{
4335 char *tmp, buff[256];
4336 bool save_rehash= opt_rehash;
4337 int error;
4338
4339 memset(buff, 0, sizeof(buff));
4340 if (buffer)
4341 {
4342 /*
4343 Two null bytes are needed in the end of buff to allow
4344 get_arg to find end of string the second time it's called.
4345 */
4346 tmp= strmake(buff, line, sizeof(buff)-2);
4347#ifdef EXTRA_DEBUG
4348 tmp[1]= 0;
4349#endif
4350 tmp= get_arg(buff, 0);
4351 if (tmp && *tmp)
4352 {
4353 my_free(current_db);
4354 current_db= my_strdup(tmp, MYF(MY_WME));
4355 tmp= get_arg(buff, 1);
4356 if (tmp)
4357 {
4358 my_free(current_host);
4359 current_host=my_strdup(tmp,MYF(MY_WME));
4360 }
4361 }
4362 else
4363 {
4364 /* Quick re-connect */
4365 opt_rehash= 0; /* purecov: tested */
4366 }
4367 buffer->length(0); // command used
4368 }
4369 else
4370 opt_rehash= 0;
4371 error=sql_connect(current_host,current_db,current_user,opt_password,0);
4372 opt_rehash= save_rehash;
4373
4374 if (connected)
4375 {
4376 sprintf(buff,"Connection id: %lu",mysql_thread_id(&mysql));
4377 put_info(buff,INFO_INFO);
4378 sprintf(buff,"Current database: %.128s\n",
4379 current_db ? current_db : "*** NONE ***");
4380 put_info(buff,INFO_INFO);
4381 }
4382 return error;
4383}
4384
4385
4386static int com_source(String *buffer __attribute__((unused)),
4387 char *line)
4388{
4389 char source_name[FN_REFLEN], *end, *param;
4390 LINE_BUFFER *line_buff;
4391 int error;
4392 STATUS old_status;
4393 FILE *sql_file;
4394
4395 /* Skip space from file name */
4396 while (my_isspace(charset_info,*line))
4397 line++;
4398 if (!(param = strchr(line, ' '))) // Skip command name
4399 return put_info("Usage: \\. <filename> | source <filename>",
4400 INFO_ERROR, 0);
4401 while (my_isspace(charset_info,*param))
4402 param++;
4403 end=strmake(source_name,param,sizeof(source_name)-1);
4404 while (end > source_name && (my_isspace(charset_info,end[-1]) ||
4405 my_iscntrl(charset_info,end[-1])))
4406 end--;
4407 end[0]=0;
4408 unpack_filename(source_name,source_name);
4409 /* open file name */
4410 if (!(sql_file = my_fopen(source_name, O_RDONLY | O_BINARY,MYF(0))))
4411 {
4412 char buff[FN_REFLEN+60];
4413 sprintf(buff,"Failed to open file '%s', error: %d", source_name,errno);
4414 return put_info(buff, INFO_ERROR, 0);
4415 }
4416
4417 if (!(line_buff= batch_readline_init(MAX_BATCH_BUFFER_SIZE, sql_file)))
4418 {
4419 my_fclose(sql_file,MYF(0));
4420 return put_info("Can't initialize batch_readline", INFO_ERROR, 0);
4421 }
4422
4423 /* Save old status */
4424 old_status=status;
4425 memset(&status, 0, sizeof(status));
4426
4427 status.batch=old_status.batch; // Run in batch mode
4428 status.line_buff=line_buff;
4429 status.file_name=source_name;
4430 glob_buffer.length(0); // Empty command buffer
4431 error= read_and_execute(false);
4432 status=old_status; // Continue as before
4433 my_fclose(sql_file,MYF(0));
4434 batch_readline_end(line_buff);
4435 return error;
4436}
4437
4438
4439 /* ARGSUSED */
4440static int
4441com_delimiter(String *buffer __attribute__((unused)), char *line)
4442{
4443 char buff[256], *tmp;
4444
4445 strmake(buff, line, sizeof(buff) - 1);
4446 tmp= get_arg(buff, 0);
4447
4448 if (!tmp || !*tmp)
4449 {
4450 put_info("DELIMITER must be followed by a 'delimiter' character or string",
4451 INFO_ERROR);
4452 return 0;
4453 }
4454 else
4455 {
4456 if (strstr(tmp, "\\"))
4457 {
4458 put_info("DELIMITER cannot contain a backslash character", INFO_ERROR);
4459 return 0;
4460 }
4461 }
4462 strmake(delimiter, tmp, sizeof(delimiter) - 1);
4463 delimiter_length= (int)strlen(delimiter);
4464 delimiter_str= delimiter;
4465 return 0;
4466}
4467
4468 /* ARGSUSED */
4469static int
4470com_use(String *buffer __attribute__((unused)), char *line)
4471{
4472 char *tmp, buff[FN_REFLEN + 1];
4473 int select_db;
4474
4475 memset(buff, 0, sizeof(buff));
4476
4477 /*
4478 In case number of quotes exceed 2, we try to get
4479 the normalized db name.
4480 */
4481 if (get_quote_count(line) > 2)
4482 {
4483 if (normalize_dbname(line, buff, sizeof(buff)))
4484 return put_error(&mysql);
4485 tmp= buff;
4486 }
4487 else
4488 {
4489 strmake(buff, line, sizeof(buff) - 1);
4490 tmp= get_arg(buff, 0);
4491 }
4492
4493 if (!tmp || !*tmp)
4494 {
4495 put_info("USE must be followed by a database name", INFO_ERROR);
4496 return 0;
4497 }
4498 /*
4499 We need to recheck the current database, because it may change
4500 under our feet, for example if DROP DATABASE or RENAME DATABASE
4501 (latter one not yet available by the time the comment was written)
4502 */
4503 get_current_db();
4504
4505 if (!current_db || cmp_database(charset_info, current_db,tmp))
4506 {
4507 if (one_database)
4508 {
4509 skip_updates= 1;
4510 select_db= 0; // don't do mysql_select_db()
4511 }
4512 else
4513 select_db= 2; // do mysql_select_db() and build_completion_hash()
4514 }
4515 else
4516 {
4517 /*
4518 USE to the current db specified.
4519 We do need to send mysql_select_db() to make server
4520 update database level privileges, which might
4521 change since last USE (see bug#10979).
4522 For performance purposes, we'll skip rebuilding of completion hash.
4523 */
4524 skip_updates= 0;
4525 select_db= 1; // do only mysql_select_db(), without completion
4526 }
4527
4528 if (select_db)
4529 {
4530 /*
4531 reconnect once if connection is down or if connection was found to
4532 be down during query
4533 */
4534 if (!connected && reconnect())
4535 return opt_reconnect ? -1 : 1; // Fatal error
4536 if (mysql_select_db(&mysql,tmp))
4537 {
4538 if (mysql_errno(&mysql) != CR_SERVER_GONE_ERROR)
4539 return put_error(&mysql);
4540
4541 if (reconnect())
4542 return opt_reconnect ? -1 : 1; // Fatal error
4543 if (mysql_select_db(&mysql,tmp))
4544 return put_error(&mysql);
4545 }
4546 my_free(current_db);
4547 current_db=my_strdup(tmp,MYF(MY_WME));
4548#ifdef HAVE_READLINE
4549 if (select_db > 1)
4550 build_completion_hash(opt_rehash, 1);
4551#endif
4552 }
4553
4554 put_info("Database changed",INFO_INFO);
4555 return 0;
4556}
4557
4558/**
4559 Normalize database name.
4560
4561 @param line [IN] The command.
4562 @param buff [OUT] Normalized db name.
4563 @param buff_size [IN] Buffer size.
4564
4565 @return Operation status
4566 @retval 0 Success
4567 @retval 1 Failure
4568
4569 @note Sometimes server normilizes the database names
4570 & APIs like mysql_select_db() expect normalized
4571 database names. Since it is difficult to perform
4572 the name conversion/normalization on the client
4573 side, this function tries to get the normalized
4574 dbname (indirectly) from the server.
4575*/
4576
4577static int
4578normalize_dbname(const char *line, char *buff, uint buff_size)
4579{
4580 MYSQL_RES *res= NULL;
4581
4582 /* Send the "USE db" commmand to the server. */
4583 if (mysql_query(&mysql, line))
4584 return 1;
4585
4586 /*
4587 Now, get the normalized database name and store it
4588 into the buff.
4589 */
4590 if (!mysql_query(&mysql, "SELECT DATABASE()") &&
4591 (res= mysql_use_result(&mysql)))
4592 {
4593 MYSQL_ROW row= mysql_fetch_row(res);
4594 if (row && row[0])
4595 {
4596 size_t len= strlen(row[0]);
4597 /* Make sure there is enough room to store the dbname. */
4598 if ((len > buff_size) || ! memcpy(buff, row[0], len))
4599 {
4600 mysql_free_result(res);
4601 return 1;
4602 }
4603 }
4604 mysql_free_result(res);
4605 }
4606
4607 /* Restore the original database. */
4608 if (current_db && mysql_select_db(&mysql, current_db))
4609 return 1;
4610
4611 return 0;
4612}
4613
4614static int
4615com_warnings(String *buffer __attribute__((unused)),
4616 char *line __attribute__((unused)))
4617{
4618 show_warnings = 1;
4619 put_info("Show warnings enabled.",INFO_INFO);
4620 return 0;
4621}
4622
4623static int
4624com_nowarnings(String *buffer __attribute__((unused)),
4625 char *line __attribute__((unused)))
4626{
4627 show_warnings = 0;
4628 put_info("Show warnings disabled.",INFO_INFO);
4629 return 0;
4630}
4631
4632/*
4633 Gets argument from a command on the command line. If get_next_arg is
4634 not defined, skips the command and returns the first argument. The
4635 line is modified by adding zero to the end of the argument. If
4636 get_next_arg is defined, then the function searches for end of string
4637 first, after found, returns the next argument and adds zero to the
4638 end. If you ever wish to use this feature, remember to initialize all
4639 items in the array to zero first.
4640*/
4641
4642char *get_arg(char *line, my_bool get_next_arg)
4643{
4644 char *ptr, *start;
4645 my_bool quoted= 0, valid_arg= 0;
4646 char qtype= 0;
4647
4648 ptr= line;
4649 if (get_next_arg)
4650 {
4651 for (; *ptr; ptr++) ;
4652 if (*(ptr + 1))
4653 ptr++;
4654 }
4655 else
4656 {
4657 /* skip leading white spaces */
4658 while (my_isspace(charset_info, *ptr))
4659 ptr++;
4660 if (*ptr == '\\') // short command was used
4661 ptr+= 2;
4662 else
4663 while (*ptr &&!my_isspace(charset_info, *ptr)) // skip command
4664 ptr++;
4665 }
4666 if (!*ptr)
4667 return NullS;
4668 while (my_isspace(charset_info, *ptr))
4669 ptr++;
4670 if (*ptr == '\'' || *ptr == '\"' || *ptr == '`')
4671 {
4672 qtype= *ptr;
4673 quoted= 1;
4674 ptr++;
4675 }
4676 for (start=ptr ; *ptr; ptr++)
4677 {
4678 if (*ptr == '\\' && ptr[1]) // escaped character
4679 {
4680 // Remove the backslash
4681 strmov_overlapp(ptr, ptr+1);
4682 }
4683 else if ((!quoted && *ptr == ' ') || (quoted && *ptr == qtype))
4684 {
4685 *ptr= 0;
4686 break;
4687 }
4688 }
4689 valid_arg= ptr != start;
4690 return valid_arg ? start : NullS;
4691}
4692
4693/*
4694 Number of quotes present in the command's argument.
4695*/
4696static int
4697get_quote_count(const char *line)
4698{
4699 int quote_count;
4700 const char *ptr= line;
4701
4702 for(quote_count= 0; ptr ++ && *ptr; ptr= strpbrk(ptr, "\"\'`"))
4703 quote_count ++;
4704
4705 return quote_count;
4706}
4707
4708static int
4709sql_real_connect(char *host,char *database,char *user,char *password,
4710 uint silent)
4711{
4712 my_bool handle_expired= (opt_connect_expired_password || !status.batch) ?
4713 TRUE : FALSE;
4714
4715 if (connected)
4716 {
4717 connected= 0;
4718 mysql_close(&mysql);
4719 }
4720 mysql_init(&mysql);
4721 if (opt_init_command)
4722 mysql_options(&mysql, MYSQL_INIT_COMMAND, opt_init_command);
4723 if (opt_connect_timeout)
4724 {
4725 uint timeout=opt_connect_timeout;
4726 mysql_options(&mysql,MYSQL_OPT_CONNECT_TIMEOUT,
4727 (char*) &timeout);
4728 }
4729 if (opt_bind_addr)
4730 mysql_options(&mysql, MYSQL_OPT_BIND, opt_bind_addr);
4731 if (opt_compress)
4732 mysql_options(&mysql,MYSQL_OPT_COMPRESS,NullS);
4733 if (!opt_secure_auth)
4734 mysql_options(&mysql, MYSQL_SECURE_AUTH, (char *) &opt_secure_auth);
4735 if (using_opt_local_infile)
4736 mysql_options(&mysql,MYSQL_OPT_LOCAL_INFILE, (char*) &opt_local_infile);
4737#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
4738 if (opt_use_ssl)
4739 {
4740 mysql_ssl_set(&mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
4741 opt_ssl_capath, opt_ssl_cipher);
4742 mysql_options(&mysql, MYSQL_OPT_SSL_CRL, opt_ssl_crl);
4743 mysql_options(&mysql, MYSQL_OPT_SSL_CRLPATH, opt_ssl_crlpath);
4744 }
4745 mysql_options(&mysql,MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
4746 (char*)&opt_ssl_verify_server_cert);
4747#endif
4748 if (opt_protocol)
4749 mysql_options(&mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
4750#ifdef HAVE_SMEM
4751 if (shared_memory_base_name)
4752 mysql_options(&mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
4753#endif
4754 if (safe_updates)
4755 {
4756 char init_command[100];
4757 sprintf(init_command,
4758 "SET SQL_SAFE_UPDATES=1,SQL_SELECT_LIMIT=%lu,MAX_JOIN_SIZE=%lu",
4759 select_limit,max_join_size);
4760 mysql_options(&mysql, MYSQL_INIT_COMMAND, init_command);
4761 }
4762
4763 mysql_set_character_set(&mysql, default_charset);
4764#ifdef __WIN__
4765 uint cnv_errors;
4766 String converted_database, converted_user;
4767 if (!my_charset_same(&my_charset_utf8mb4_bin, mysql.charset))
4768 {
4769 /* Convert user and database from UTF8MB4 to connection character set */
4770 if (user)
4771 {
4772 converted_user.copy(user, strlen(user) + 1,
4773 &my_charset_utf8mb4_bin, mysql.charset,
4774 &cnv_errors);
4775 user= (char *) converted_user.ptr();
4776 }
4777 if (database)
4778 {
4779 converted_database.copy(database, strlen(database) + 1,
4780 &my_charset_utf8mb4_bin, mysql.charset,
4781 &cnv_errors);
4782 database= (char *) converted_database.ptr();
4783 }
4784 }
4785#endif
4786
4787 if (opt_plugin_dir && *opt_plugin_dir)
4788 mysql_options(&mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir);
4789
4790 if (opt_default_auth && *opt_default_auth)
4791 mysql_options(&mysql, MYSQL_DEFAULT_AUTH, opt_default_auth);
4792
4793#if !defined(HAVE_YASSL)
4794 if (opt_server_public_key && *opt_server_public_key)
4795 mysql_options(&mysql, MYSQL_SERVER_PUBLIC_KEY, opt_server_public_key);
4796#endif
4797
4798 if (using_opt_enable_cleartext_plugin)
4799 mysql_options(&mysql, MYSQL_ENABLE_CLEARTEXT_PLUGIN,
4800 (char*) &opt_enable_cleartext_plugin);
4801
4802 mysql_options(&mysql, MYSQL_OPT_CONNECT_ATTR_RESET, 0);
4803 mysql_options4(&mysql, MYSQL_OPT_CONNECT_ATTR_ADD,
4804 "program_name", "mysql");
4805 mysql_options(&mysql, MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS, &handle_expired);
4806
4807 if (!mysql_real_connect(&mysql, host, user, password,
4808 database, opt_mysql_port, opt_mysql_unix_port,
4809 connect_flag | CLIENT_MULTI_STATEMENTS))
4810 {
4811 if (!silent ||
4812 (mysql_errno(&mysql) != CR_CONN_HOST_ERROR &&
4813 mysql_errno(&mysql) != CR_CONNECTION_ERROR))
4814 {
4815 (void) put_error(&mysql);
4816 (void) fflush(stdout);
4817 return ignore_errors ? -1 : 1; // Abort
4818 }
4819 return -1; // Retryable
4820 }
4821
4822#ifdef __WIN__
4823 /* Convert --execute buffer from UTF8MB4 to connection character set */
4824 if (!execute_buffer_conversion_done++ &&
4825 status.line_buff &&
4826 !status.line_buff->file && /* Convert only -e buffer, not real file */
4827 status.line_buff->buffer < status.line_buff->end && /* Non-empty */
4828 !my_charset_same(&my_charset_utf8mb4_bin, mysql.charset))
4829 {
4830 String tmp;
4831 size_t len= status.line_buff->end - status.line_buff->buffer;
4832 uint dummy_errors;
4833 /*
4834 Don't convert trailing '\n' character - it was appended during
4835 last batch_readline_command() call.
4836 Oherwise we'll get an extra line, which makes some tests fail.
4837 */
4838 if (status.line_buff->buffer[len - 1] == '\n')
4839 len--;
4840 if (tmp.copy(status.line_buff->buffer, len,
4841 &my_charset_utf8mb4_bin, mysql.charset, &dummy_errors))
4842 return 1;
4843
4844 /* Free the old line buffer */
4845 batch_readline_end(status.line_buff);
4846
4847 /* Re-initialize line buffer from the converted string */
4848 if (!(status.line_buff= batch_readline_command(NULL, (char *) tmp.c_ptr_safe())))
4849 return 1;
4850 }
4851#endif /* __WIN__ */
4852
4853 charset_info= mysql.charset;
4854
4855 connected=1;
4856#ifndef EMBEDDED_LIBRARY
4857 mysql.reconnect= debug_info_flag; // We want to know if this happens
4858#else
4859 mysql.reconnect= 1;
4860#endif
4861#ifdef HAVE_READLINE
4862 build_completion_hash(opt_rehash, 1);
4863#endif
4864 return 0;
4865}
4866
4867
4868static int
4869sql_connect(char *host,char *database,char *user,char *password,uint silent)
4870{
4871 bool message=0;
4872 uint count=0;
4873 int error;
4874 for (;;)
4875 {
4876 if ((error=sql_real_connect(host,database,user,password,wait_flag)) >= 0)
4877 {
4878 if (count)
4879 {
4880 tee_fputs("\n", stderr);
4881 (void) fflush(stderr);
4882 }
4883 return error;
4884 }
4885 if (!wait_flag)
4886 return ignore_errors ? -1 : 1;
4887 if (!message && !silent)
4888 {
4889 message=1;
4890 tee_fputs("Waiting",stderr); (void) fflush(stderr);
4891 }
4892 (void) sleep(wait_time);
4893 if (!silent)
4894 {
4895 putc('.',stderr); (void) fflush(stderr);
4896 count++;
4897 }
4898 }
4899}
4900
4901
4902
4903static int
4904com_status(String *buffer __attribute__((unused)),
4905 char *line __attribute__((unused)))
4906{
4907 const char *status_str;
4908 char buff[40];
4909 ulonglong id;
4910 MYSQL_RES *result;
4911 LINT_INIT(result);
4912
4913 if (mysql_real_query_for_lazy(
4914 C_STRING_WITH_LEN("select DATABASE(), USER() limit 1")))
4915 return 0;
4916
4917 tee_puts("--------------", stdout);
4918 usage(1); /* Print version */
4919 tee_fprintf(stdout, "\nConnection id:\t\t%lu\n",mysql_thread_id(&mysql));
4920 /*
4921 Don't remove "limit 1",
4922 it is protection againts SQL_SELECT_LIMIT=0
4923 */
4924 if (!mysql_store_result_for_lazy(&result))
4925 {
4926 MYSQL_ROW cur=mysql_fetch_row(result);
4927 if (cur)
4928 {
4929 tee_fprintf(stdout, "Current database:\t%s\n", cur[0] ? cur[0] : "");
4930 tee_fprintf(stdout, "Current user:\t\t%s\n", cur[1]);
4931 }
4932 mysql_free_result(result);
4933 }
4934
4935#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
4936 if ((status_str= mysql_get_ssl_cipher(&mysql)))
4937 tee_fprintf(stdout, "SSL:\t\t\tCipher in use is %s\n",
4938 status_str);
4939 else
4940#endif /* HAVE_OPENSSL && !EMBEDDED_LIBRARY */
4941 tee_puts("SSL:\t\t\tNot in use", stdout);
4942
4943 if (skip_updates)
4944 {
4945 vidattr(A_BOLD);
4946 tee_fprintf(stdout, "\nAll updates ignored to this database\n");
4947 vidattr(A_NORMAL);
4948 }
4949#ifdef USE_POPEN
4950 tee_fprintf(stdout, "Current pager:\t\t%s\n", pager);
4951 tee_fprintf(stdout, "Using outfile:\t\t'%s'\n", opt_outfile ? outfile : "");
4952#endif
4953 tee_fprintf(stdout, "Using delimiter:\t%s\n", delimiter);
4954 tee_fprintf(stdout, "Server version:\t\t%s\n", server_version_string(&mysql));
4955 tee_fprintf(stdout, "Protocol version:\t%d\n", mysql_get_proto_info(&mysql));
4956 tee_fprintf(stdout, "Connection:\t\t%s\n", mysql_get_host_info(&mysql));
4957 if ((id= mysql_insert_id(&mysql)))
4958 tee_fprintf(stdout, "Insert id:\t\t%s\n", llstr(id, buff));
4959
4960 /* "limit 1" is protection against SQL_SELECT_LIMIT=0 */
4961 if (mysql_real_query_for_lazy(C_STRING_WITH_LEN(
4962 "select @@character_set_client, @@character_set_connection, "
4963 "@@character_set_server, @@character_set_database limit 1")))
4964 {
4965 if (mysql_errno(&mysql) == CR_SERVER_GONE_ERROR)
4966 return 0;
4967 }
4968 if (!mysql_store_result_for_lazy(&result))
4969 {
4970 MYSQL_ROW cur=mysql_fetch_row(result);
4971 if (cur)
4972 {
4973 tee_fprintf(stdout, "Server characterset:\t%s\n", cur[2] ? cur[2] : "");
4974 tee_fprintf(stdout, "Db characterset:\t%s\n", cur[3] ? cur[3] : "");
4975 tee_fprintf(stdout, "Client characterset:\t%s\n", cur[0] ? cur[0] : "");
4976 tee_fprintf(stdout, "Conn. characterset:\t%s\n", cur[1] ? cur[1] : "");
4977 }
4978 mysql_free_result(result);
4979 }
4980 else
4981 {
4982 /* Probably pre-4.1 server */
4983 tee_fprintf(stdout, "Client characterset:\t%s\n", charset_info->csname);
4984 tee_fprintf(stdout, "Server characterset:\t%s\n", mysql.charset->csname);
4985 }
4986
4987#ifndef EMBEDDED_LIBRARY
4988 if (strstr(mysql_get_host_info(&mysql),"TCP/IP") || ! mysql.unix_socket)
4989 tee_fprintf(stdout, "TCP port:\t\t%d\n", mysql.port);
4990 else
4991 tee_fprintf(stdout, "UNIX socket:\t\t%s\n", mysql.unix_socket);
4992 if (mysql.net.compress)
4993 tee_fprintf(stdout, "Protocol:\t\tCompressed\n");
4994#endif
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: