Merge lp:~stewart/percona-server/5.6.10 into lp:percona-server/5.6

Proposed by Stewart Smith
Status: Merged
Approved by: Laurynas Biveinis
Approved revision: 314
Merged at revision: 315
Proposed branch: lp:~stewart/percona-server/5.6.10
Merge into: lp:percona-server/5.6
Diff against target: 69681 lines (+23353/-12283)
871 files modified
Percona-Server/.bzrignore (+4/-0)
Percona-Server/BUILD/compile-dist (+1/-4)
Percona-Server/CMakeLists.txt (+2/-2)
Percona-Server/VERSION (+2/-2)
Percona-Server/client/client_priv.h (+1/-1)
Percona-Server/client/mysql.cc (+15/-4)
Percona-Server/client/mysql_config_editor.cc (+712/-291)
Percona-Server/client/mysql_plugin.c (+12/-7)
Percona-Server/client/mysql_upgrade.c (+2/-1)
Percona-Server/client/mysqladmin.cc (+9/-0)
Percona-Server/client/mysqlbinlog.cc (+63/-27)
Percona-Server/client/mysqlcheck.c (+2/-2)
Percona-Server/client/mysqldump.c (+191/-26)
Percona-Server/client/mysqltest.cc (+6/-1)
Percona-Server/client/sql_string.h (+3/-0)
Percona-Server/cmake/install_layout.cmake (+5/-2)
Percona-Server/cmake/mysql_version.cmake (+1/-1)
Percona-Server/cmake/package_name.cmake (+1/-1)
Percona-Server/cmake/plugin.cmake (+1/-0)
Percona-Server/cmd-line-utils/libedit/vi.c (+2/-1)
Percona-Server/configure.cmake (+3/-4)
Percona-Server/dbug/dbug.c (+3/-2)
Percona-Server/extra/yassl/include/yassl_int.hpp (+1/-0)
Percona-Server/extra/yassl/src/buffer.cpp (+2/-0)
Percona-Server/extra/yassl/src/handshake.cpp (+7/-1)
Percona-Server/extra/yassl/src/yassl_int.cpp (+76/-8)
Percona-Server/include/errmsg.h (+2/-1)
Percona-Server/include/m_ctype.h (+2/-0)
Percona-Server/include/my_atomic.h (+2/-0)
Percona-Server/include/my_base.h (+2/-1)
Percona-Server/include/my_getopt.h (+5/-0)
Percona-Server/include/my_pthread.h (+2/-4)
Percona-Server/include/my_sys.h (+26/-2)
Percona-Server/include/mysql.h (+2/-1)
Percona-Server/include/mysql.h.pp (+2/-1)
Percona-Server/include/mysql/plugin.h (+1/-1)
Percona-Server/include/mysql/psi/psi.h (+9/-2)
Percona-Server/include/mysql/psi/psi_abi_v1.h.pp (+4/-2)
Percona-Server/include/mysql/thread_pool_priv.h (+1/-0)
Percona-Server/include/mysql_com.h (+29/-24)
Percona-Server/include/welcome_copyright_notice.h (+1/-1)
Percona-Server/libmysql/errmsg.c (+2/-0)
Percona-Server/libmysql/libmysql.c (+18/-1)
Percona-Server/libmysqld/lib_sql.cc (+3/-0)
Percona-Server/mysql-test/CMakeLists.txt (+4/-2)
Percona-Server/mysql-test/collections/default.daily (+5/-5)
Percona-Server/mysql-test/collections/default.experimental (+0/-6)
Percona-Server/mysql-test/collections/default.push (+5/-5)
Percona-Server/mysql-test/collections/default.release.in (+5/-5)
Percona-Server/mysql-test/collections/default.weekly (+11/-11)
Percona-Server/mysql-test/collections/disabled-gtid-on.list (+1/-1)
Percona-Server/mysql-test/extra/rpl_tests/rpl_extra_col_master.test (+2/-2)
Percona-Server/mysql-test/extra/rpl_tests/rpl_mts_crash_safe.inc (+1/-1)
Percona-Server/mysql-test/extra/rpl_tests/rpl_mts_crash_safe.test (+13/-0)
Percona-Server/mysql-test/include/check-testcase.test (+1/-0)
Percona-Server/mysql-test/include/get_binlog_dump_thread_id.inc (+0/-22)
Percona-Server/mysql-test/include/have_null_audit_plugin.inc (+22/-0)
Percona-Server/mysql-test/include/have_sha256_rsa_auth.inc (+5/-0)
Percona-Server/mysql-test/include/index_merge1.inc (+20/-14)
Percona-Server/mysql-test/include/innodb_pk_extension.inc (+253/-0)
Percona-Server/mysql-test/include/master-slave.inc (+2/-1)
Percona-Server/mysql-test/include/mtr_check.sql (+1/-1)
Percona-Server/mysql-test/include/mtr_warnings.sql (+3/-2)
Percona-Server/mysql-test/include/mysqld--help.inc (+2/-2)
Percona-Server/mysql-test/include/not_ndb_default.inc (+6/-4)
Percona-Server/mysql-test/include/not_sha256_rsa_auth.inc (+5/-0)
Percona-Server/mysql-test/include/read_many_rows.inc (+1/-1)
Percona-Server/mysql-test/include/rpl_init.inc (+4/-0)
Percona-Server/mysql-test/include/rpl_start_server.inc (+2/-2)
Percona-Server/mysql-test/include/save_master_pos.inc (+1/-1)
Percona-Server/mysql-test/include/show_events.inc (+1/-1)
Percona-Server/mysql-test/include/show_rpl_debug_info.inc (+8/-2)
Percona-Server/mysql-test/include/stop_dump_threads.inc (+33/-0)
Percona-Server/mysql-test/include/subquery_sj.inc (+1/-1)
Percona-Server/mysql-test/include/sync_slave_sql.inc (+3/-3)
Percona-Server/mysql-test/include/wait_condition.inc (+3/-10)
Percona-Server/mysql-test/include/wait_time_until_connected_again.inc (+27/-0)
Percona-Server/mysql-test/include/write_result_to_file.inc (+15/-15)
Percona-Server/mysql-test/lib/My/SafeProcess/CMakeLists.txt (+1/-1)
Percona-Server/mysql-test/lib/My/SafeProcess/safe_process.cc (+12/-5)
Percona-Server/mysql-test/lib/My/SafeProcess/safe_process.pl (+0/-166)
Percona-Server/mysql-test/lib/mtr_cases.pm (+6/-12)
Percona-Server/mysql-test/lib/mtr_report.pm (+11/-1)
Percona-Server/mysql-test/mysql-test-run.pl (+94/-64)
Percona-Server/mysql-test/r/alter_table.result (+10/-7)
Percona-Server/mysql-test/r/connect.result (+22/-6)
Percona-Server/mysql-test/r/create.result (+2/-2)
Percona-Server/mysql-test/r/ctype_binary.result (+1/-1)
Percona-Server/mysql-test/r/ctype_cp1251.result (+1/-1)
Percona-Server/mysql-test/r/ctype_latin1.result (+1/-1)
Percona-Server/mysql-test/r/ctype_ucs.result (+1/-1)
Percona-Server/mysql-test/r/ctype_utf8.result (+1/-1)
Percona-Server/mysql-test/r/ddl_i18n_koi8r.result (+8/-8)
Percona-Server/mysql-test/r/ddl_i18n_utf8.result (+8/-8)
Percona-Server/mysql-test/r/derived.result (+6/-2)
Percona-Server/mysql-test/r/disabled_replication.result (+1/-1)
Percona-Server/mysql-test/r/disconnect_on_expired_password_default.result (+34/-0)
Percona-Server/mysql-test/r/disconnect_on_expired_password_off.result (+33/-0)
Percona-Server/mysql-test/r/distinct.result (+40/-3)
Percona-Server/mysql-test/r/explain.result (+3/-0)
Percona-Server/mysql-test/r/explain_json_all.result (+27/-6)
Percona-Server/mysql-test/r/explain_json_none.result (+35/-11)
Percona-Server/mysql-test/r/group_by.result (+2/-7)
Percona-Server/mysql-test/r/host_cache_size_functionality.result (+78/-0)
Percona-Server/mysql-test/r/index_merge_innodb.result (+31/-25)
Percona-Server/mysql-test/r/index_merge_myisam.result (+27/-21)
Percona-Server/mysql-test/r/information_schema.result (+5/-5)
Percona-Server/mysql-test/r/innodb_explain_json_non_select_all.result (+204/-32)
Percona-Server/mysql-test/r/innodb_explain_json_non_select_none.result (+209/-37)
Percona-Server/mysql-test/r/innodb_explain_non_select_all.result (+12/-16)
Percona-Server/mysql-test/r/innodb_explain_non_select_none.result (+12/-16)
Percona-Server/mysql-test/r/innodb_pk_extension_off.result (+395/-0)
Percona-Server/mysql-test/r/innodb_pk_extension_on.result (+395/-0)
Percona-Server/mysql-test/r/insert_update.result (+3/-3)
Percona-Server/mysql-test/r/log_state.result (+1/-1)
Percona-Server/mysql-test/r/log_tables.result (+125/-24)
Percona-Server/mysql-test/r/myisam_explain_json_non_select_all.result (+207/-32)
Percona-Server/mysql-test/r/myisam_explain_json_non_select_none.result (+212/-37)
Percona-Server/mysql-test/r/myisam_explain_non_select_all.result (+12/-16)
Percona-Server/mysql-test/r/myisam_explain_non_select_none.result (+12/-16)
Percona-Server/mysql-test/r/myisam_icp.result (+1/-1)
Percona-Server/mysql-test/r/myisam_icp_all.result (+1/-1)
Percona-Server/mysql-test/r/mysql_config_editor.result (+6/-20)
Percona-Server/mysql-test/r/mysqlbinlog.result (+34/-0)
Percona-Server/mysql-test/r/mysqld--help-notwin.result (+17/-10)
Percona-Server/mysql-test/r/mysqld--help-win.result (+17/-10)
Percona-Server/mysql-test/r/mysqldump.result (+16/-14)
Percona-Server/mysql-test/r/not_ndb_default.require (+0/-2)
Percona-Server/mysql-test/r/optimizer_switch.result (+9/-9)
Percona-Server/mysql-test/r/partition.result (+3/-0)
Percona-Server/mysql-test/r/partition_explicit_prune.result (+2/-2)
Percona-Server/mysql-test/r/partition_locking.result (+6/-6)
Percona-Server/mysql-test/r/plugin_auth.result (+14/-10)
Percona-Server/mysql-test/r/plugin_auth_sha256_server_default.result (+1/-0)
Percona-Server/mysql-test/r/plugin_auth_sha256_server_default_tls.result (+1/-0)
Percona-Server/mysql-test/r/plugin_auth_sha256_tls.result (+14/-0)
Percona-Server/mysql-test/r/ps_ddl1.result (+4/-6)
Percona-Server/mysql-test/r/rewrite_general_log.result (+31/-18)
Percona-Server/mysql-test/r/select_none.result (+2/-2)
Percona-Server/mysql-test/r/select_none_bka.result (+2/-2)
Percona-Server/mysql-test/r/select_none_bka_nixbnl.result (+2/-2)
Percona-Server/mysql-test/r/sort_buffer_size_functionality.result (+99/-83)
Percona-Server/mysql-test/r/sp_notembedded.result (+1/-1)
Percona-Server/mysql-test/r/subquery_sj_all.result (+32/-1)
Percona-Server/mysql-test/r/subquery_sj_all_bka.result (+32/-1)
Percona-Server/mysql-test/r/subquery_sj_all_bka_nixbnl.result (+32/-1)
Percona-Server/mysql-test/r/subquery_sj_all_bkaunique.result (+32/-1)
Percona-Server/mysql-test/r/subquery_sj_dupsweed.result (+35/-1)
Percona-Server/mysql-test/r/subquery_sj_dupsweed_bka.result (+35/-1)
Percona-Server/mysql-test/r/subquery_sj_dupsweed_bka_nixbnl.result (+38/-1)
Percona-Server/mysql-test/r/subquery_sj_dupsweed_bkaunique.result (+35/-1)
Percona-Server/mysql-test/r/subquery_sj_firstmatch.result (+35/-1)
Percona-Server/mysql-test/r/subquery_sj_firstmatch_bka.result (+35/-1)
Percona-Server/mysql-test/r/subquery_sj_firstmatch_bka_nixbnl.result (+38/-1)
Percona-Server/mysql-test/r/subquery_sj_firstmatch_bkaunique.result (+35/-1)
Percona-Server/mysql-test/r/subquery_sj_loosescan.result (+35/-1)
Percona-Server/mysql-test/r/subquery_sj_loosescan_bka.result (+35/-1)
Percona-Server/mysql-test/r/subquery_sj_loosescan_bka_nixbnl.result (+38/-1)
Percona-Server/mysql-test/r/subquery_sj_loosescan_bkaunique.result (+35/-1)
Percona-Server/mysql-test/r/subquery_sj_mat.result (+32/-1)
Percona-Server/mysql-test/r/subquery_sj_mat_bka.result (+32/-1)
Percona-Server/mysql-test/r/subquery_sj_mat_bka_nixbnl.result (+32/-1)
Percona-Server/mysql-test/r/subquery_sj_mat_bkaunique.result (+32/-1)
Percona-Server/mysql-test/r/subquery_sj_mat_nosj.result (+23/-10)
Percona-Server/mysql-test/r/subquery_sj_none.result (+30/-8)
Percona-Server/mysql-test/r/subquery_sj_none_bka.result (+30/-8)
Percona-Server/mysql-test/r/subquery_sj_none_bka_nixbnl.result (+30/-8)
Percona-Server/mysql-test/r/subquery_sj_none_bkaunique.result (+30/-8)
Percona-Server/mysql-test/r/symlink_windows.result (+14/-0)
Percona-Server/mysql-test/r/system_mysql_db.result (+2/-2)
Percona-Server/mysql-test/r/table_definition_cache_functionality.result (+146/-0)
Percona-Server/mysql-test/r/user_var-binlog.result (+2/-0)
Percona-Server/mysql-test/r/validate_password_plugin.result (+13/-6)
Percona-Server/mysql-test/r/wl6443_deprecation.result (+1/-0)
Percona-Server/mysql-test/suite/binlog/r/binlog_base64_flag.result (+2/-0)
Percona-Server/mysql-test/suite/binlog/r/binlog_enforce_gtid_consistency.result (+16/-17)
Percona-Server/mysql-test/suite/binlog/r/binlog_gtid_errors.result (+23/-25)
Percona-Server/mysql-test/suite/binlog/r/binlog_hexdump.result (+2/-0)
Percona-Server/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result (+2/-0)
Percona-Server/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result (+8/-0)
Percona-Server/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result (+8/-0)
Percona-Server/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result (+2/-0)
Percona-Server/mysql-test/suite/binlog/r/binlog_mysqlbinlog_start_stop.result (+66/-0)
Percona-Server/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result (+2/-0)
Percona-Server/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result (+2/-0)
Percona-Server/mysql-test/suite/binlog/r/binlog_stm_disable_gtid_unsafe_statements.result (+0/-109)
Percona-Server/mysql-test/suite/binlog/t/binlog_enforce_gtid_consistency.test (+11/-20)
Percona-Server/mysql-test/suite/binlog/t/binlog_gtid_cache-master.opt (+1/-1)
Percona-Server/mysql-test/suite/binlog/t/binlog_gtid_errors-master.opt (+1/-1)
Percona-Server/mysql-test/suite/binlog/t/binlog_gtid_errors.test (+14/-16)
Percona-Server/mysql-test/suite/binlog/t/binlog_mixed_row_disable_gtid_unsafe_statements.test (+0/-4)
Percona-Server/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_innodb.test (+1/-1)
Percona-Server/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_myisam.test (+1/-1)
Percona-Server/mysql-test/suite/binlog/t/binlog_stm_disable_gtid_unsafe_statements.test (+0/-4)
Percona-Server/mysql-test/suite/engines/funcs/r/crash_manytables_number.result (+1/-0)
Percona-Server/mysql-test/suite/engines/funcs/r/crash_manytables_string.result (+1/-0)
Percona-Server/mysql-test/suite/engines/funcs/r/rpl_row_until.result (+66/-212)
Percona-Server/mysql-test/suite/engines/funcs/t/crash_manytables_number.cnf (+4/-0)
Percona-Server/mysql-test/suite/engines/funcs/t/crash_manytables_number.test (+1/-1)
Percona-Server/mysql-test/suite/engines/funcs/t/crash_manytables_string.cnf (+4/-0)
Percona-Server/mysql-test/suite/engines/funcs/t/crash_manytables_string.test (+1/-1)
Percona-Server/mysql-test/suite/engines/funcs/t/disabled.def (+0/-1)
Percona-Server/mysql-test/suite/engines/funcs/t/rpl_row_until.test (+114/-78)
Percona-Server/mysql-test/suite/funcs_1/r/is_columns_is.result (+2/-2)
Percona-Server/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result (+2/-2)
Percona-Server/mysql-test/suite/funcs_1/r/is_columns_mysql.result (+4/-4)
Percona-Server/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result (+4/-4)
Percona-Server/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result (+2/-2)
Percona-Server/mysql-test/suite/funcs_1/r/processlist_priv_ps.result (+2/-2)
Percona-Server/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result (+1/-1)
Percona-Server/mysql-test/suite/funcs_1/r/processlist_val_ps.result (+1/-1)
Percona-Server/mysql-test/suite/innodb/r/innodb-alter-autoinc.result (+5/-4)
Percona-Server/mysql-test/suite/innodb/r/innodb-alter-nullable.result (+3/-0)
Percona-Server/mysql-test/suite/innodb/r/innodb-alter.result (+12/-23)
Percona-Server/mysql-test/suite/innodb/r/innodb-index-online-delete.result (+1/-0)
Percona-Server/mysql-test/suite/innodb/r/innodb-index-online-fk.result (+14/-5)
Percona-Server/mysql-test/suite/innodb/r/innodb-index-online.result (+6/-4)
Percona-Server/mysql-test/suite/innodb/r/innodb-index.result (+9/-1)
Percona-Server/mysql-test/suite/innodb/r/innodb-table-online.result (+6/-1)
Percona-Server/mysql-test/suite/innodb/r/innodb-wl5980-alter.result (+3/-8)
Percona-Server/mysql-test/suite/innodb/r/innodb-wl5980-discard.result (+60/-35)
Percona-Server/mysql-test/suite/innodb/r/innodb.result (+3/-0)
Percona-Server/mysql-test/suite/innodb/r/innodb_16k.result (+3/-0)
Percona-Server/mysql-test/suite/innodb/r/innodb_buffer_pool_load.result (+3/-3)
Percona-Server/mysql-test/suite/innodb/r/innodb_bug13867871.result (+0/-2)
Percona-Server/mysql-test/suite/innodb/r/innodb_bug14147491.result (+17/-0)
Percona-Server/mysql-test/suite/innodb/r/innodb_bug14676111.result (+64/-0)
Percona-Server/mysql-test/suite/innodb/r/innodb_bug14704286.result (+53/-0)
Percona-Server/mysql-test/suite/innodb/r/innodb_bug54044.result (+9/-4)
Percona-Server/mysql-test/suite/innodb/r/innodb_crash_recov_log_compressed_after_commit_0.result (+0/-48)
Percona-Server/mysql-test/suite/innodb/r/innodb_crash_recov_log_compressed_after_commit_1.result (+0/-48)
Percona-Server/mysql-test/suite/innodb/r/innodb_crash_recov_log_compressed_before_commit_0.result (+0/-52)
Percona-Server/mysql-test/suite/innodb/r/innodb_crash_recov_log_compressed_before_commit_1.result (+0/-51)
Percona-Server/mysql-test/suite/innodb/r/innodb_i_s_innodb_locks.result (+14/-14)
Percona-Server/mysql-test/suite/innodb/r/innodb_information_schema_buffer.result (+8/-8)
Percona-Server/mysql-test/suite/innodb/r/innodb_misc1.result (+3/-0)
Percona-Server/mysql-test/suite/innodb/r/innodb_monitor.result (+2/-0)
Percona-Server/mysql-test/suite/innodb/r/innodb_mysql.result (+1/-1)
Percona-Server/mysql-test/suite/innodb/r/innodb_wl6347_comp_indx_stat.result (+0/-8)
Percona-Server/mysql-test/suite/innodb/t/innodb-alter-autoinc.test (+6/-2)
Percona-Server/mysql-test/suite/innodb/t/innodb-alter-nullable.test (+8/-0)
Percona-Server/mysql-test/suite/innodb/t/innodb-alter.test (+12/-12)
Percona-Server/mysql-test/suite/innodb/t/innodb-index-online-delete.test (+1/-0)
Percona-Server/mysql-test/suite/innodb/t/innodb-index-online-fk.test (+19/-4)
Percona-Server/mysql-test/suite/innodb/t/innodb-index-online.test (+9/-5)
Percona-Server/mysql-test/suite/innodb/t/innodb-index.test (+20/-1)
Percona-Server/mysql-test/suite/innodb/t/innodb-table-online.test (+9/-1)
Percona-Server/mysql-test/suite/innodb/t/innodb-wl5522-debug.test (+3/-0)
Percona-Server/mysql-test/suite/innodb/t/innodb-wl5980-alter.test (+3/-3)
Percona-Server/mysql-test/suite/innodb/t/innodb-wl5980-discard.test (+45/-4)
Percona-Server/mysql-test/suite/innodb/t/innodb.test (+4/-0)
Percona-Server/mysql-test/suite/innodb/t/innodb_16k.test (+5/-0)
Percona-Server/mysql-test/suite/innodb/t/innodb_buffer_pool_load.test (+1/-1)
Percona-Server/mysql-test/suite/innodb/t/innodb_bug13867871.test (+1/-3)
Percona-Server/mysql-test/suite/innodb/t/innodb_bug14147491-master.opt (+1/-0)
Percona-Server/mysql-test/suite/innodb/t/innodb_bug14147491.test (+75/-0)
Percona-Server/mysql-test/suite/innodb/t/innodb_bug14676111.test (+145/-0)
Percona-Server/mysql-test/suite/innodb/t/innodb_bug14704286.test (+97/-0)
Percona-Server/mysql-test/suite/innodb/t/innodb_bug54044.test (+4/-4)
Percona-Server/mysql-test/suite/innodb/t/innodb_corrupt_bit.test (+1/-0)
Percona-Server/mysql-test/suite/innodb/t/innodb_crash_recov_log_compressed_after_commit_0.test (+0/-130)
Percona-Server/mysql-test/suite/innodb/t/innodb_crash_recov_log_compressed_after_commit_1.test (+0/-131)
Percona-Server/mysql-test/suite/innodb/t/innodb_crash_recov_log_compressed_before_commit_0.test (+0/-134)
Percona-Server/mysql-test/suite/innodb/t/innodb_crash_recov_log_compressed_before_commit_1.test (+0/-134)
Percona-Server/mysql-test/suite/innodb/t/innodb_information_schema_buffer.test (+5/-5)
Percona-Server/mysql-test/suite/innodb/t/innodb_misc1.test (+4/-0)
Percona-Server/mysql-test/suite/innodb/t/innodb_mysql.test (+2/-0)
Percona-Server/mysql-test/suite/innodb/t/innodb_wl6347_comp_indx_stat.test (+6/-12)
Percona-Server/mysql-test/suite/innodb_fts/r/innobase_drop_fts_index_table.result (+6/-0)
Percona-Server/mysql-test/suite/innodb_fts/r/innodb-fts-basic.result (+47/-41)
Percona-Server/mysql-test/suite/innodb_fts/r/innodb-fts-ddl.result (+2/-2)
Percona-Server/mysql-test/suite/innodb_fts/r/innodb_fts_large_records.result (+16/-16)
Percona-Server/mysql-test/suite/innodb_fts/r/innodb_fts_misc.result (+56/-39)
Percona-Server/mysql-test/suite/innodb_fts/r/innodb_fts_misc_1.result (+37/-31)
Percona-Server/mysql-test/suite/innodb_fts/r/innodb_fts_multiple_index.result (+44/-41)
Percona-Server/mysql-test/suite/innodb_fts/r/innodb_fts_opt.result (+28/-28)
Percona-Server/mysql-test/suite/innodb_fts/r/innodb_fts_proximity.result (+147/-11)
Percona-Server/mysql-test/suite/innodb_fts/t/innobase_drop_fts_index_table.test (+19/-0)
Percona-Server/mysql-test/suite/innodb_fts/t/innodb-fts-basic.test (+18/-18)
Percona-Server/mysql-test/suite/innodb_fts/t/innodb-fts-ddl.test (+2/-2)
Percona-Server/mysql-test/suite/innodb_fts/t/innodb_fts_large_records.test (+16/-16)
Percona-Server/mysql-test/suite/innodb_fts/t/innodb_fts_misc.test (+38/-22)
Percona-Server/mysql-test/suite/innodb_fts/t/innodb_fts_misc_1.test (+32/-33)
Percona-Server/mysql-test/suite/innodb_fts/t/innodb_fts_multiple_index.test (+19/-19)
Percona-Server/mysql-test/suite/innodb_fts/t/innodb_fts_opt.test (+26/-26)
Percona-Server/mysql-test/suite/innodb_fts/t/innodb_fts_proximity.test (+176/-20)
Percona-Server/mysql-test/suite/large_tests/r/rpl_slave_net_timeout.result (+0/-3)
Percona-Server/mysql-test/suite/large_tests/t/rpl_slave_net_timeout.test (+23/-12)
Percona-Server/mysql-test/suite/opt_trace/include/subquery.inc (+1/-1)
Percona-Server/mysql-test/suite/opt_trace/r/bugs_no_prot_all.result (+4/-1)
Percona-Server/mysql-test/suite/opt_trace/r/bugs_no_prot_none.result (+3/-1)
Percona-Server/mysql-test/suite/opt_trace/r/bugs_ps_prot_all.result (+4/-1)
Percona-Server/mysql-test/suite/opt_trace/r/bugs_ps_prot_none.result (+3/-1)
Percona-Server/mysql-test/suite/opt_trace/r/filesort_pq.result (+3/-4)
Percona-Server/mysql-test/suite/opt_trace/r/general2_no_prot.result (+2/-0)
Percona-Server/mysql-test/suite/opt_trace/r/general2_ps_prot.result (+2/-0)
Percona-Server/mysql-test/suite/opt_trace/r/range_no_prot.result (+59/-17)
Percona-Server/mysql-test/suite/opt_trace/r/range_ps_prot.result (+59/-17)
Percona-Server/mysql-test/suite/opt_trace/r/subquery_no_prot.result (+9/-9)
Percona-Server/mysql-test/suite/opt_trace/r/subquery_ps_prot.result (+9/-9)
Percona-Server/mysql-test/suite/parts/inc/partition_crash.inc (+2/-1)
Percona-Server/mysql-test/suite/parts/r/partition_alter4_innodb.result (+24/-24)
Percona-Server/mysql-test/suite/parts/r/partition_debug_innodb.result (+0/-71)
Percona-Server/mysql-test/suite/parts/t/partition_debug_innodb.test (+4/-0)
Percona-Server/mysql-test/suite/perfschema/include/binlog_common.inc (+0/-41)
Percona-Server/mysql-test/suite/perfschema/include/binlog_edge_common.inc (+188/-0)
Percona-Server/mysql-test/suite/perfschema/include/binlog_ok_common.inc (+146/-0)
Percona-Server/mysql-test/suite/perfschema/include/schema.inc (+1/-0)
Percona-Server/mysql-test/suite/perfschema/r/binlog_edge_mix.result (+178/-0)
Percona-Server/mysql-test/suite/perfschema/r/binlog_edge_row.result (+179/-0)
Percona-Server/mysql-test/suite/perfschema/r/binlog_edge_stmt.result (+258/-0)
Percona-Server/mysql-test/suite/perfschema/r/binlog_mix.result (+0/-50)
Percona-Server/mysql-test/suite/perfschema/r/binlog_ok_mix.result (+119/-0)
Percona-Server/mysql-test/suite/perfschema/r/binlog_ok_row.result (+119/-0)
Percona-Server/mysql-test/suite/perfschema/r/binlog_ok_stmt.result (+119/-0)
Percona-Server/mysql-test/suite/perfschema/r/binlog_row.result (+0/-50)
Percona-Server/mysql-test/suite/perfschema/r/binlog_stmt.result (+0/-63)
Percona-Server/mysql-test/suite/perfschema/r/digest_table_full.result (+4/-4)
Percona-Server/mysql-test/suite/perfschema/r/dml_esms_by_digest.result (+2/-2)
Percona-Server/mysql-test/suite/perfschema/r/pfs_upgrade_event.result (+4/-4)
Percona-Server/mysql-test/suite/perfschema/r/pfs_upgrade_func.result (+4/-4)
Percona-Server/mysql-test/suite/perfschema/r/pfs_upgrade_proc.result (+4/-4)
Percona-Server/mysql-test/suite/perfschema/r/pfs_upgrade_table.result (+4/-4)
Percona-Server/mysql-test/suite/perfschema/r/pfs_upgrade_view.result (+4/-4)
Percona-Server/mysql-test/suite/perfschema/r/rpl_gtid_func.result (+83/-0)
Percona-Server/mysql-test/suite/perfschema/r/schema.result (+51/-18)
Percona-Server/mysql-test/suite/perfschema/r/sizing_default.result (+4/-3)
Percona-Server/mysql-test/suite/perfschema/r/sizing_high.result (+4/-3)
Percona-Server/mysql-test/suite/perfschema/r/sizing_low.result (+4/-3)
Percona-Server/mysql-test/suite/perfschema/r/sizing_med.result (+4/-3)
Percona-Server/mysql-test/suite/perfschema/r/start_server_no_digests.result (+2/-2)
Percona-Server/mysql-test/suite/perfschema/r/start_server_off.result (+20/-19)
Percona-Server/mysql-test/suite/perfschema/r/statement_digest.result (+39/-39)
Percona-Server/mysql-test/suite/perfschema/r/statement_digest_charset.result (+1/-1)
Percona-Server/mysql-test/suite/perfschema/r/statement_digest_consumers.result (+39/-39)
Percona-Server/mysql-test/suite/perfschema/r/statement_digest_consumers2.result (+2/-2)
Percona-Server/mysql-test/suite/perfschema/r/statement_digest_long_query.result (+4/-4)
Percona-Server/mysql-test/suite/perfschema/r/table_schema.result (+47/-46)
Percona-Server/mysql-test/suite/perfschema/t/binlog_edge_mix-master.opt (+2/-0)
Percona-Server/mysql-test/suite/perfschema/t/binlog_edge_mix.test (+10/-0)
Percona-Server/mysql-test/suite/perfschema/t/binlog_edge_row-master.opt (+2/-0)
Percona-Server/mysql-test/suite/perfschema/t/binlog_edge_row.test (+10/-0)
Percona-Server/mysql-test/suite/perfschema/t/binlog_edge_stmt-master.opt (+2/-0)
Percona-Server/mysql-test/suite/perfschema/t/binlog_edge_stmt.test (+10/-0)
Percona-Server/mysql-test/suite/perfschema/t/binlog_mix.test (+0/-10)
Percona-Server/mysql-test/suite/perfschema/t/binlog_ok_mix-master.opt (+2/-0)
Percona-Server/mysql-test/suite/perfschema/t/binlog_ok_mix.test (+10/-0)
Percona-Server/mysql-test/suite/perfschema/t/binlog_ok_row-master.opt (+2/-0)
Percona-Server/mysql-test/suite/perfschema/t/binlog_ok_row.test (+10/-0)
Percona-Server/mysql-test/suite/perfschema/t/binlog_ok_stmt-master.opt (+2/-0)
Percona-Server/mysql-test/suite/perfschema/t/binlog_ok_stmt.test (+10/-0)
Percona-Server/mysql-test/suite/perfschema/t/binlog_row.test (+0/-10)
Percona-Server/mysql-test/suite/perfschema/t/binlog_stmt.test (+0/-11)
Percona-Server/mysql-test/suite/perfschema/t/digest_table_full.test (+1/-1)
Percona-Server/mysql-test/suite/perfschema/t/rpl_gtid_func.test (+91/-0)
Percona-Server/mysql-test/suite/perfschema/t/start_server_no_digests.test (+1/-1)
Percona-Server/mysql-test/suite/perfschema/t/start_server_off.test (+27/-0)
Percona-Server/mysql-test/suite/perfschema/t/statement_digest.test (+1/-1)
Percona-Server/mysql-test/suite/perfschema/t/statement_digest_consumers.test (+1/-1)
Percona-Server/mysql-test/suite/perfschema/t/statement_digest_consumers2.test (+1/-1)
Percona-Server/mysql-test/suite/perfschema/t/statement_digest_long_query.test (+1/-1)
Percona-Server/mysql-test/suite/rpl/r/rpl_bug31076.result (+2/-0)
Percona-Server/mysql-test/suite/rpl/r/rpl_check_gtid.result (+8/-8)
Percona-Server/mysql-test/suite/rpl/r/rpl_checksum.result (+1/-2)
Percona-Server/mysql-test/suite/rpl/r/rpl_do_grant.result (+1/-1)
Percona-Server/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result (+2/-2)
Percona-Server/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result (+2/-2)
Percona-Server/mysql-test/suite/rpl/r/rpl_gtid_execution.result (+332/-332)
Percona-Server/mysql-test/suite/rpl/r/rpl_gtid_mode.result (+2/-2)
Percona-Server/mysql-test/suite/rpl/r/rpl_gtid_parallel.result (+3/-3)
Percona-Server/mysql-test/suite/rpl/r/rpl_gtid_purged_fail_to_connect.result (+5/-2)
Percona-Server/mysql-test/suite/rpl/r/rpl_gtid_sql_until_before_after.result (+1/-1)
Percona-Server/mysql-test/suite/rpl/r/rpl_gtid_stress_failover.result (+1/-1)
Percona-Server/mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result (+1/-1)
Percona-Server/mysql-test/suite/rpl/r/rpl_mts_debug.result (+1/-1)
Percona-Server/mysql-test/suite/rpl/r/rpl_parallel_change_master.result (+1/-0)
Percona-Server/mysql-test/suite/rpl/r/rpl_report_port.result (+2/-0)
Percona-Server/mysql-test/suite/rpl/r/rpl_rotate_logs.result (+11/-23)
Percona-Server/mysql-test/suite/rpl/r/rpl_row_ignorable_event.result (+2/-0)
Percona-Server/mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result (+1/-1)
Percona-Server/mysql-test/suite/rpl/r/rpl_row_mts_show_relaylog_events.result (+204/-0)
Percona-Server/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result (+10/-0)
Percona-Server/mysql-test/suite/rpl/r/rpl_row_until.result (+6/-0)
Percona-Server/mysql-test/suite/rpl/r/rpl_sp.result (+4/-2)
Percona-Server/mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result (+1/-1)
Percona-Server/mysql-test/suite/rpl/r/rpl_stm_mix_mts_show_relaylog_events.result (+183/-0)
Percona-Server/mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result (+1/-1)
Percona-Server/mysql-test/suite/rpl/r/rpl_user.result (+2/-2)
Percona-Server/mysql-test/suite/rpl/t/disabled.def (+0/-1)
Percona-Server/mysql-test/suite/rpl/t/rpl_bug31076.test (+2/-0)
Percona-Server/mysql-test/suite/rpl/t/rpl_check_gtid.test (+9/-6)
Percona-Server/mysql-test/suite/rpl/t/rpl_checksum.test (+3/-2)
Percona-Server/mysql-test/suite/rpl/t/rpl_gtid_empty_group-master.opt (+1/-1)
Percona-Server/mysql-test/suite/rpl/t/rpl_gtid_empty_group-slave.opt (+1/-1)
Percona-Server/mysql-test/suite/rpl/t/rpl_gtid_execution-master.opt (+1/-1)
Percona-Server/mysql-test/suite/rpl/t/rpl_gtid_execution-slave.opt (+1/-1)
Percona-Server/mysql-test/suite/rpl/t/rpl_gtid_execution.test (+29/-29)
Percona-Server/mysql-test/suite/rpl/t/rpl_gtid_failover.cnf (+3/-3)
Percona-Server/mysql-test/suite/rpl/t/rpl_gtid_mode.test (+11/-11)
Percona-Server/mysql-test/suite/rpl/t/rpl_gtid_parallel-master.opt (+1/-1)
Percona-Server/mysql-test/suite/rpl/t/rpl_gtid_parallel-slave.opt (+1/-1)
Percona-Server/mysql-test/suite/rpl/t/rpl_gtid_parallel.test (+6/-6)
Percona-Server/mysql-test/suite/rpl/t/rpl_gtid_purged_fail_to_connect-master.opt (+1/-1)
Percona-Server/mysql-test/suite/rpl/t/rpl_gtid_purged_fail_to_connect-slave.opt (+1/-1)
Percona-Server/mysql-test/suite/rpl/t/rpl_gtid_purged_fail_to_connect.test (+18/-12)
Percona-Server/mysql-test/suite/rpl/t/rpl_gtid_purged_maintained.test (+15/-12)
Percona-Server/mysql-test/suite/rpl/t/rpl_gtid_sql_until_before_after.test (+1/-1)
Percona-Server/mysql-test/suite/rpl/t/rpl_gtid_stress_failover.cnf (+9/-9)
Percona-Server/mysql-test/suite/rpl/t/rpl_gtid_stress_failover.test (+18/-8)
Percona-Server/mysql-test/suite/rpl/t/rpl_insert_id-master.opt (+1/-0)
Percona-Server/mysql-test/suite/rpl/t/rpl_insert_id-slave.opt (+1/-0)
Percona-Server/mysql-test/suite/rpl/t/rpl_mts_debug.test (+1/-1)
Percona-Server/mysql-test/suite/rpl/t/rpl_mysqlbinlog_gtid_on-master.opt (+1/-1)
Percona-Server/mysql-test/suite/rpl/t/rpl_mysqlbinlog_gtid_on-slave.opt (+1/-1)
Percona-Server/mysql-test/suite/rpl/t/rpl_parallel_change_master.test (+8/-1)
Percona-Server/mysql-test/suite/rpl/t/rpl_report_port.test (+6/-0)
Percona-Server/mysql-test/suite/rpl/t/rpl_rotate_logs.test (+57/-7)
Percona-Server/mysql-test/suite/rpl/t/rpl_row_mts_show_relaylog_events.test (+20/-0)
Percona-Server/mysql-test/suite/rpl/t/rpl_row_show_relaylog_events.test (+1/-0)
Percona-Server/mysql-test/suite/rpl/t/rpl_row_until.test (+1/-0)
Percona-Server/mysql-test/suite/rpl/t/rpl_semi_sync.test (+2/-0)
Percona-Server/mysql-test/suite/rpl/t/rpl_stm_mix_mts_show_relaylog_events.test (+20/-0)
Percona-Server/mysql-test/suite/rpl/t/rpl_stm_mix_show_relaylog_events.test (+1/-0)
Percona-Server/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed-master.opt (+1/-0)
Percona-Server/mysql-test/suite/sha256_auth/r/plugin_auth_sha256_tls.result (+0/-32)
Percona-Server/mysql-test/suite/sha256_auth/t/plugin_auth_sha256_tls.test (+0/-53)
Percona-Server/mysql-test/suite/sys_vars/r/disconnect_on_expired_password_basic.result (+25/-0)
Percona-Server/mysql-test/suite/sys_vars/r/enforce_gtid_consistency_basic.result (+27/-27)
Percona-Server/mysql-test/suite/sys_vars/r/gtid_executed_basic.result (+21/-21)
Percona-Server/mysql-test/suite/sys_vars/r/gtid_purged_basic.result (+21/-19)
Percona-Server/mysql-test/suite/sys_vars/r/innodb_ft_cache_size_basic.result (+5/-5)
Percona-Server/mysql-test/suite/sys_vars/r/innodb_limit_optimistic_insert_debug_basic.result (+58/-0)
Percona-Server/mysql-test/suite/sys_vars/r/innodb_log_compressed_pages_basic.result (+0/-69)
Percona-Server/mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result (+2/-0)
Percona-Server/mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result (+2/-0)
Percona-Server/mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result (+2/-0)
Percona-Server/mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result (+2/-0)
Percona-Server/mysql-test/suite/sys_vars/r/innodb_trx_purge_view_update_only_debug_basic.result (+61/-0)
Percona-Server/mysql-test/suite/sys_vars/r/ndb_log_update_as_write_basic.result (+0/-14)
Percona-Server/mysql-test/suite/sys_vars/r/ndb_log_updated_only_basic.result (+0/-14)
Percona-Server/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result (+17/-17)
Percona-Server/mysql-test/suite/sys_vars/r/pseudo_slave_mode_basic.result (+119/-0)
Percona-Server/mysql-test/suite/sys_vars/r/slow_launch_time_func.result (+8/-3)
Percona-Server/mysql-test/suite/sys_vars/t/disconnect_on_expired_password_basic.test (+17/-0)
Percona-Server/mysql-test/suite/sys_vars/t/enforce_gtid_consistency_basic.test (+12/-12)
Percona-Server/mysql-test/suite/sys_vars/t/gtid_executed_basic.test (+8/-8)
Percona-Server/mysql-test/suite/sys_vars/t/gtid_purged_basic.test (+18/-16)
Percona-Server/mysql-test/suite/sys_vars/t/innodb_file_per_table_basic-master.opt (+1/-0)
Percona-Server/mysql-test/suite/sys_vars/t/innodb_limit_optimistic_insert_debug_basic.test (+50/-0)
Percona-Server/mysql-test/suite/sys_vars/t/innodb_log_compressed_pages_basic.test (+0/-88)
Percona-Server/mysql-test/suite/sys_vars/t/innodb_trx_purge_view_update_only_debug_basic.test (+53/-0)
Percona-Server/mysql-test/suite/sys_vars/t/ndb_log_update_as_write_basic.test (+0/-216)
Percona-Server/mysql-test/suite/sys_vars/t/ndb_log_updated_only_basic.test (+0/-216)
Percona-Server/mysql-test/suite/sys_vars/t/pseudo_slave_mode_basic.test (+168/-0)
Percona-Server/mysql-test/suite/sys_vars/t/slow_launch_time_func.test (+7/-5)
Percona-Server/mysql-test/t/alter_table.test (+15/-7)
Percona-Server/mysql-test/t/connect.test (+25/-5)
Percona-Server/mysql-test/t/derived.test (+4/-0)
Percona-Server/mysql-test/t/disconnect_on_expired_password_default.test (+50/-0)
Percona-Server/mysql-test/t/disconnect_on_expired_password_off-master.opt (+1/-0)
Percona-Server/mysql-test/t/disconnect_on_expired_password_off.test (+48/-0)
Percona-Server/mysql-test/t/distinct.test (+17/-8)
Percona-Server/mysql-test/t/group_by.test (+2/-2)
Percona-Server/mysql-test/t/host_cache_size_functionality.test (+183/-0)
Percona-Server/mysql-test/t/information_schema.test (+1/-1)
Percona-Server/mysql-test/t/innodb_pk_extension_off.test (+16/-0)
Percona-Server/mysql-test/t/innodb_pk_extension_on.test (+16/-0)
Percona-Server/mysql-test/t/log_tables.test (+8/-6)
Percona-Server/mysql-test/t/multi_update2.test (+1/-0)
Percona-Server/mysql-test/t/mysql_config_editor.test (+3/-3)
Percona-Server/mysql-test/t/mysql_plugin.test (+4/-4)
Percona-Server/mysql-test/t/mysqldump.test (+1/-0)
Percona-Server/mysql-test/t/plugin_auth.test (+1/-1)
Percona-Server/mysql-test/t/plugin_auth_sha256.test (+2/-0)
Percona-Server/mysql-test/t/plugin_auth_sha256_2-master.opt (+1/-1)
Percona-Server/mysql-test/t/plugin_auth_sha256_2.test (+2/-0)
Percona-Server/mysql-test/t/plugin_auth_sha256_server_default-master.opt (+3/-3)
Percona-Server/mysql-test/t/plugin_auth_sha256_server_default.test (+5/-0)
Percona-Server/mysql-test/t/plugin_auth_sha256_server_default_tls.test (+3/-0)
Percona-Server/mysql-test/t/plugin_auth_sha256_tls.test (+21/-0)
Percona-Server/mysql-test/t/ps_ddl1.test (+0/-2)
Percona-Server/mysql-test/t/query_cache_size_functionality.test (+1/-1)
Percona-Server/mysql-test/t/query_cache_type_functionality.test (+1/-1)
Percona-Server/mysql-test/t/rewrite_general_log.test (+12/-8)
Percona-Server/mysql-test/t/sort_buffer_size_functionality.test (+226/-0)
Percona-Server/mysql-test/t/sp_notembedded.test (+10/-8)
Percona-Server/mysql-test/t/subselect_notembedded-master.opt (+1/-0)
Percona-Server/mysql-test/t/symlink_windows.test (+58/-0)
Percona-Server/mysql-test/t/table_definition_cache_functionality.test (+207/-0)
Percona-Server/mysql-test/t/validate_password_plugin.test (+13/-6)
Percona-Server/mysql-test/t/variables_debug.test (+1/-1)
Percona-Server/mysql-test/t/wl6443_deprecation.test (+3/-0)
Percona-Server/mysql-test/valgrind.supp (+43/-0)
Percona-Server/mysys/mf_format.c (+3/-2)
Percona-Server/mysys/mf_iocache.c (+1/-1)
Percona-Server/mysys/mf_pack.c (+17/-8)
Percona-Server/mysys/my_access.c (+63/-0)
Percona-Server/mysys/my_handler_errors.h (+2/-1)
Percona-Server/mysys/my_lib.c (+3/-2)
Percona-Server/mysys/psi_noop.c (+2/-2)
Percona-Server/mysys_ssl/my_aes.cc (+19/-11)
Percona-Server/mysys_ssl/my_getopt.cc (+86/-25)
Percona-Server/packaging/WiX/CMakeLists.txt (+17/-0)
Percona-Server/packaging/WiX/mysql_server_extra.wxs.in (+9/-0)
Percona-Server/packaging/rpm-uln/CMakeLists.txt (+1/-1)
Percona-Server/packaging/rpm-uln/mysql-5.6-stack-guard.patch (+18/-15)
Percona-Server/packaging/rpm-uln/mysql-chain-certs.patch (+16/-12)
Percona-Server/packaging/rpm-uln/mysql.spec.sh (+50/-19)
Percona-Server/packaging/solaris/CMakeLists.txt (+32/-0)
Percona-Server/packaging/solaris/postinstall-solaris.sh (+124/-0)
Percona-Server/plugin/auth/test_plugin.c (+2/-2)
Percona-Server/plugin/password_validation/validate_password.cc (+89/-11)
Percona-Server/plugin/semisync/semisync_master.cc (+34/-4)
Percona-Server/plugin/semisync/semisync_master.h (+22/-3)
Percona-Server/plugin/semisync/semisync_master_plugin.cc (+19/-11)
Percona-Server/regex/my_regex.h (+1/-1)
Percona-Server/regex/regcomp.c (+1/-1)
Percona-Server/scripts/mysql_install_db.pl.in (+33/-16)
Percona-Server/scripts/mysql_system_tables.sql (+21/-20)
Percona-Server/scripts/mysql_system_tables_fix.sql (+4/-0)
Percona-Server/scripts/mysqld_multi.sh (+22/-0)
Percona-Server/scripts/mysqld_safe.sh (+34/-1)
Percona-Server/scripts/mysqldumpslow.sh (+1/-1)
Percona-Server/sql-common/client.c (+18/-11)
Percona-Server/sql-common/client_authentication.cc (+4/-1)
Percona-Server/sql-common/client_plugin.c (+17/-3)
Percona-Server/sql/CMakeLists.txt (+0/-1)
Percona-Server/sql/abstract_query_plan.cc (+4/-2)
Percona-Server/sql/binlog.cc (+235/-60)
Percona-Server/sql/binlog.h (+23/-0)
Percona-Server/sql/event_db_repository.cc (+1/-1)
Percona-Server/sql/gcalc_slicescan.cc (+3/-0)
Percona-Server/sql/gcalc_slicescan.h (+12/-0)
Percona-Server/sql/gcalc_tools.cc (+22/-74)
Percona-Server/sql/gcalc_tools.h (+65/-10)
Percona-Server/sql/global_threads.h (+2/-1)
Percona-Server/sql/ha_ndbcluster.cc (+38/-23)
Percona-Server/sql/ha_partition.cc (+40/-3)
Percona-Server/sql/handler.cc (+33/-16)
Percona-Server/sql/handler.h (+35/-4)
Percona-Server/sql/hash_filo.h (+51/-13)
Percona-Server/sql/item.cc (+70/-52)
Percona-Server/sql/item.h (+5/-7)
Percona-Server/sql/item_cmpfunc.cc (+14/-10)
Percona-Server/sql/item_cmpfunc.h (+8/-3)
Percona-Server/sql/item_create.cc (+1/-1)
Percona-Server/sql/item_func.cc (+8/-8)
Percona-Server/sql/item_func.h (+4/-3)
Percona-Server/sql/item_geofunc.cc (+7/-5)
Percona-Server/sql/item_row.cc (+2/-3)
Percona-Server/sql/item_row.h (+1/-1)
Percona-Server/sql/item_strfunc.cc (+9/-4)
Percona-Server/sql/item_subselect.cc (+30/-36)
Percona-Server/sql/item_subselect.h (+3/-4)
Percona-Server/sql/item_xmlfunc.cc (+24/-9)
Percona-Server/sql/item_xmlfunc.h (+12/-0)
Percona-Server/sql/key.cc (+4/-4)
Percona-Server/sql/lock.cc (+1/-1)
Percona-Server/sql/log.cc (+12/-12)
Percona-Server/sql/log.h (+4/-4)
Percona-Server/sql/log_event.cc (+114/-33)
Percona-Server/sql/log_event.h (+48/-7)
Percona-Server/sql/log_event_old.cc (+1/-1)
Percona-Server/sql/mdl.h (+10/-2)
Percona-Server/sql/mysqld.cc (+76/-22)
Percona-Server/sql/mysqld.h (+12/-2)
Percona-Server/sql/opt_explain.cc (+40/-14)
Percona-Server/sql/opt_explain_format.h (+3/-0)
Percona-Server/sql/opt_explain_json.cc (+5/-0)
Percona-Server/sql/opt_range.cc (+140/-48)
Percona-Server/sql/opt_range.h (+2/-16)
Percona-Server/sql/opt_sum.cc (+3/-1)
Percona-Server/sql/partition_info.cc (+11/-1)
Percona-Server/sql/partition_info.h (+5/-6)
Percona-Server/sql/records.cc (+1/-1)
Percona-Server/sql/replication.h (+16/-12)
Percona-Server/sql/rpl_constants.cc (+0/-33)
Percona-Server/sql/rpl_constants.h (+0/-14)
Percona-Server/sql/rpl_gtid.h (+47/-5)
Percona-Server/sql/rpl_gtid_cache.cc (+1/-0)
Percona-Server/sql/rpl_gtid_execution.cc (+34/-1)
Percona-Server/sql/rpl_gtid_owned.cc (+2/-2)
Percona-Server/sql/rpl_gtid_set.cc (+210/-83)
Percona-Server/sql/rpl_gtid_specification.cc (+6/-1)
Percona-Server/sql/rpl_gtid_state.cc (+30/-0)
Percona-Server/sql/rpl_handler.cc (+10/-10)
Percona-Server/sql/rpl_handler.h (+3/-2)
Percona-Server/sql/rpl_info_factory.cc (+33/-2)
Percona-Server/sql/rpl_info_factory.h (+1/-0)
Percona-Server/sql/rpl_info_file.cc (+9/-0)
Percona-Server/sql/rpl_info_file.h (+1/-1)
Percona-Server/sql/rpl_info_table_access.cc (+1/-1)
Percona-Server/sql/rpl_master.cc (+248/-88)
Percona-Server/sql/rpl_master.h (+52/-4)
Percona-Server/sql/rpl_rli.cc (+6/-6)
Percona-Server/sql/rpl_rli_pdb.cc (+109/-90)
Percona-Server/sql/rpl_rli_pdb.h (+12/-2)
Percona-Server/sql/rpl_slave.cc (+106/-47)
Percona-Server/sql/rpl_utility.cc (+7/-2)
Percona-Server/sql/set_var.h (+1/-0)
Percona-Server/sql/share/errmsg-utf8.txt (+110/-13)
Percona-Server/sql/sp_head.cc (+28/-24)
Percona-Server/sql/sp_rcontext.cc (+6/-0)
Percona-Server/sql/spatial.cc (+9/-1)
Percona-Server/sql/sql_acl.cc (+254/-48)
Percona-Server/sql/sql_acl.h (+2/-3)
Percona-Server/sql/sql_admin.cc (+23/-3)
Percona-Server/sql/sql_base.cc (+105/-126)
Percona-Server/sql/sql_base.h (+6/-0)
Percona-Server/sql/sql_cache.cc (+46/-37)
Percona-Server/sql/sql_cache.h (+1/-1)
Percona-Server/sql/sql_class.cc (+59/-3)
Percona-Server/sql/sql_class.h (+101/-15)
Percona-Server/sql/sql_cursor.cc (+1/-1)
Percona-Server/sql/sql_db.cc (+8/-1)
Percona-Server/sql/sql_derived.cc (+4/-3)
Percona-Server/sql/sql_error.cc (+2/-1)
Percona-Server/sql/sql_executor.cc (+33/-11)
Percona-Server/sql/sql_handler.cc (+2/-2)
Percona-Server/sql/sql_insert.cc (+0/-10)
Percona-Server/sql/sql_lex.cc (+5/-0)
Percona-Server/sql/sql_lex.h (+35/-0)
Percona-Server/sql/sql_load.cc (+5/-0)
Percona-Server/sql/sql_optimizer.cc (+169/-78)
Percona-Server/sql/sql_optimizer.h (+16/-1)
Percona-Server/sql/sql_parse.cc (+85/-21)
Percona-Server/sql/sql_partition.cc (+4/-4)
Percona-Server/sql/sql_partition.h (+1/-0)
Percona-Server/sql/sql_planner.cc (+29/-18)
Percona-Server/sql/sql_plugin.cc (+3/-2)
Percona-Server/sql/sql_priv.h (+41/-3)
Percona-Server/sql/sql_profile.cc (+19/-10)
Percona-Server/sql/sql_profile.h (+4/-2)
Percona-Server/sql/sql_resolver.cc (+52/-40)
Percona-Server/sql/sql_rewrite.cc (+195/-13)
Percona-Server/sql/sql_select.cc (+237/-134)
Percona-Server/sql/sql_select.h (+6/-2)
Percona-Server/sql/sql_show.cc (+30/-12)
Percona-Server/sql/sql_table.cc (+213/-74)
Percona-Server/sql/sql_table.h (+12/-1)
Percona-Server/sql/sql_tmp_table.cc (+30/-19)
Percona-Server/sql/sql_trigger.cc (+11/-1)
Percona-Server/sql/sql_truncate.cc (+1/-1)
Percona-Server/sql/sql_union.cc (+26/-14)
Percona-Server/sql/sql_update.cc (+2/-1)
Percona-Server/sql/sql_view.cc (+31/-18)
Percona-Server/sql/sql_yacc.yy (+81/-5)
Percona-Server/sql/structs.h (+25/-9)
Percona-Server/sql/sys_vars.cc (+168/-22)
Percona-Server/sql/sys_vars.h (+104/-10)
Percona-Server/sql/table.cc (+259/-53)
Percona-Server/sql/table.h (+36/-5)
Percona-Server/sql/transaction.cc (+17/-3)
Percona-Server/sql/unireg.cc (+15/-8)
Percona-Server/sql/uuid.cc (+1/-1)
Percona-Server/storage/archive/ha_archive.cc (+1/-1)
Percona-Server/storage/federated/ha_federated.cc (+1/-1)
Percona-Server/storage/heap/ha_heap.cc (+6/-6)
Percona-Server/storage/heap/hp_delete.c (+14/-4)
Percona-Server/storage/innobase/btr/btr0btr.cc (+34/-8)
Percona-Server/storage/innobase/btr/btr0cur.cc (+60/-31)
Percona-Server/storage/innobase/btr/btr0pcur.cc (+2/-1)
Percona-Server/storage/innobase/buf/buf0buf.cc (+87/-79)
Percona-Server/storage/innobase/buf/buf0dblwr.cc (+42/-27)
Percona-Server/storage/innobase/buf/buf0flu.cc (+35/-18)
Percona-Server/storage/innobase/buf/buf0lru.cc (+38/-3)
Percona-Server/storage/innobase/dict/dict0crea.cc (+8/-3)
Percona-Server/storage/innobase/dict/dict0dict.cc (+78/-45)
Percona-Server/storage/innobase/dict/dict0load.cc (+13/-8)
Percona-Server/storage/innobase/dict/dict0stats.cc (+89/-179)
Percona-Server/storage/innobase/dict/dict0stats_bg.cc (+8/-1)
Percona-Server/storage/innobase/fil/fil0fil.cc (+28/-2)
Percona-Server/storage/innobase/fts/fts0fts.cc (+58/-29)
Percona-Server/storage/innobase/fts/fts0opt.cc (+5/-4)
Percona-Server/storage/innobase/fts/fts0que.cc (+289/-76)
Percona-Server/storage/innobase/handler/ha_innodb.cc (+239/-256)
Percona-Server/storage/innobase/handler/ha_innodb.h (+10/-1)
Percona-Server/storage/innobase/handler/handler0alter.cc (+263/-105)
Percona-Server/storage/innobase/handler/i_s.cc (+98/-74)
Percona-Server/storage/innobase/ibuf/ibuf0ibuf.cc (+1/-1)
Percona-Server/storage/innobase/include/api0misc.h (+1/-1)
Percona-Server/storage/innobase/include/btr0cur.h (+15/-10)
Percona-Server/storage/innobase/include/btr0cur.ic (+13/-0)
Percona-Server/storage/innobase/include/btr0pcur.h (+9/-6)
Percona-Server/storage/innobase/include/btr0pcur.ic (+14/-16)
Percona-Server/storage/innobase/include/buf0buf.h (+22/-5)
Percona-Server/storage/innobase/include/buf0buf.ic (+4/-4)
Percona-Server/storage/innobase/include/buf0flu.h (+17/-0)
Percona-Server/storage/innobase/include/buf0lru.h (+4/-1)
Percona-Server/storage/innobase/include/data0type.ic (+7/-24)
Percona-Server/storage/innobase/include/db0err.h (+4/-0)
Percona-Server/storage/innobase/include/dict0dict.h (+3/-25)
Percona-Server/storage/innobase/include/dict0dict.ic (+0/-47)
Percona-Server/storage/innobase/include/dict0load.h (+1/-1)
Percona-Server/storage/innobase/include/dict0mem.h (+6/-0)
Percona-Server/storage/innobase/include/fil0fil.h (+16/-1)
Percona-Server/storage/innobase/include/fts0priv.h (+1/-1)
Percona-Server/storage/innobase/include/lock0lock.h (+10/-2)
Percona-Server/storage/innobase/include/log0recv.h (+3/-0)
Percona-Server/storage/innobase/include/os0sync.h (+2/-4)
Percona-Server/storage/innobase/include/rem0rec.h (+40/-47)
Percona-Server/storage/innobase/include/rem0rec.ic (+1/-2)
Percona-Server/storage/innobase/include/rem0types.h (+10/-1)
Percona-Server/storage/innobase/include/row0ftsort.h (+3/-0)
Percona-Server/storage/innobase/include/row0log.h (+24/-6)
Percona-Server/storage/innobase/include/row0log.ic (+84/-0)
Percona-Server/storage/innobase/include/row0merge.h (+8/-10)
Percona-Server/storage/innobase/include/row0mysql.h (+4/-6)
Percona-Server/storage/innobase/include/row0row.h (+1/-1)
Percona-Server/storage/innobase/include/row0sel.h (+0/-9)
Percona-Server/storage/innobase/include/row0types.h (+0/-14)
Percona-Server/storage/innobase/include/row0upd.h (+11/-1)
Percona-Server/storage/innobase/include/row0upd.ic (+10/-3)
Percona-Server/storage/innobase/include/row0vers.h (+7/-7)
Percona-Server/storage/innobase/include/srv0mon.h (+28/-8)
Percona-Server/storage/innobase/include/srv0srv.h (+12/-0)
Percona-Server/storage/innobase/include/sync0sync.h (+1/-0)
Percona-Server/storage/innobase/include/trx0purge.h (+6/-1)
Percona-Server/storage/innobase/include/trx0rec.h (+10/-9)
Percona-Server/storage/innobase/include/trx0sys.h (+4/-0)
Percona-Server/storage/innobase/lock/lock0lock.cc (+122/-29)
Percona-Server/storage/innobase/lock/lock0wait.cc (+1/-1)
Percona-Server/storage/innobase/log/log0log.cc (+4/-8)
Percona-Server/storage/innobase/log/log0recv.cc (+143/-10)
Percona-Server/storage/innobase/os/os0file.cc (+24/-14)
Percona-Server/storage/innobase/os/os0sync.cc (+4/-11)
Percona-Server/storage/innobase/page/page0cur.cc (+2/-2)
Percona-Server/storage/innobase/page/page0zip.cc (+2/-2)
Percona-Server/storage/innobase/rem/rem0rec.cc (+195/-80)
Percona-Server/storage/innobase/row/row0ext.cc (+2/-0)
Percona-Server/storage/innobase/row/row0ftsort.cc (+50/-27)
Percona-Server/storage/innobase/row/row0import.cc (+49/-30)
Percona-Server/storage/innobase/row/row0ins.cc (+181/-205)
Percona-Server/storage/innobase/row/row0log.cc (+121/-304)
Percona-Server/storage/innobase/row/row0merge.cc (+323/-203)
Percona-Server/storage/innobase/row/row0mysql.cc (+40/-22)
Percona-Server/storage/innobase/row/row0purge.cc (+193/-155)
Percona-Server/storage/innobase/row/row0sel.cc (+39/-72)
Percona-Server/storage/innobase/row/row0uins.cc (+18/-15)
Percona-Server/storage/innobase/row/row0umod.cc (+201/-64)
Percona-Server/storage/innobase/row/row0undo.cc (+1/-1)
Percona-Server/storage/innobase/row/row0upd.cc (+116/-79)
Percona-Server/storage/innobase/row/row0vers.cc (+26/-44)
Percona-Server/storage/innobase/srv/srv0conc.cc (+1/-1)
Percona-Server/storage/innobase/srv/srv0mon.cc (+33/-7)
Percona-Server/storage/innobase/srv/srv0srv.cc (+45/-18)
Percona-Server/storage/innobase/sync/sync0rw.cc (+2/-2)
Percona-Server/storage/innobase/sync/sync0sync.cc (+2/-2)
Percona-Server/storage/innobase/trx/trx0purge.cc (+41/-1)
Percona-Server/storage/innobase/trx/trx0rec.cc (+62/-47)
Percona-Server/storage/innobase/trx/trx0sys.cc (+2/-0)
Percona-Server/storage/innobase/trx/trx0trx.cc (+2/-0)
Percona-Server/storage/innobase/ut/ut0ut.cc (+17/-6)
Percona-Server/storage/innobase/ut/ut0wqueue.cc (+1/-1)
Percona-Server/storage/myisam/ha_myisam.cc (+4/-4)
Percona-Server/storage/myisam/mi_dynrec.c (+8/-0)
Percona-Server/storage/myisam/mi_open.c (+8/-1)
Percona-Server/storage/myisam/mi_search.c (+9/-6)
Percona-Server/storage/myisam/myisamchk.c (+8/-1)
Percona-Server/storage/myisam/myisampack.c (+1/-1)
Percona-Server/storage/perfschema/ha_perfschema.cc (+14/-4)
Percona-Server/storage/perfschema/ha_perfschema.h (+0/-1)
Percona-Server/storage/perfschema/pfs.cc (+22/-7)
Percona-Server/storage/perfschema/pfs_atomic.h (+79/-0)
Percona-Server/storage/perfschema/pfs_autosize.cc (+0/-22)
Percona-Server/storage/perfschema/pfs_digest.cc (+24/-14)
Percona-Server/storage/perfschema/pfs_digest.h (+8/-5)
Percona-Server/storage/perfschema/pfs_engine_table.cc (+14/-1)
Percona-Server/storage/perfschema/pfs_events.h (+1/-1)
Percona-Server/storage/perfschema/pfs_instr.cc (+6/-6)
Percona-Server/storage/perfschema/pfs_instr.h (+4/-4)
Percona-Server/storage/perfschema/pfs_visitor.cc (+1/-1)
Percona-Server/storage/perfschema/table_esgs_by_thread_by_event_name.cc (+2/-2)
Percona-Server/storage/perfschema/table_esgs_by_thread_by_event_name.h (+1/-1)
Percona-Server/storage/perfschema/table_esms_by_digest.cc (+15/-9)
Percona-Server/storage/perfschema/table_esms_by_thread_by_event_name.cc (+2/-2)
Percona-Server/storage/perfschema/table_esms_by_thread_by_event_name.h (+1/-1)
Percona-Server/storage/perfschema/table_events_stages.cc (+2/-2)
Percona-Server/storage/perfschema/table_events_stages.h (+1/-1)
Percona-Server/storage/perfschema/table_events_statements.cc (+3/-3)
Percona-Server/storage/perfschema/table_events_statements.h (+1/-1)
Percona-Server/storage/perfschema/table_events_waits.cc (+2/-2)
Percona-Server/storage/perfschema/table_events_waits.h (+1/-1)
Percona-Server/storage/perfschema/table_ews_by_thread_by_event_name.cc (+2/-2)
Percona-Server/storage/perfschema/table_ews_by_thread_by_event_name.h (+1/-1)
Percona-Server/storage/perfschema/table_helper.cc (+18/-7)
Percona-Server/storage/perfschema/table_helper.h (+4/-0)
Percona-Server/storage/perfschema/table_host_cache.cc (+0/-3)
Percona-Server/storage/perfschema/table_session_connect.cc (+2/-2)
Percona-Server/storage/perfschema/table_setup_actors.cc (+11/-34)
Percona-Server/storage/perfschema/table_setup_objects.cc (+8/-35)
Percona-Server/storage/perfschema/table_socket_instances.cc (+2/-2)
Percona-Server/storage/perfschema/table_socket_instances.h (+1/-1)
Percona-Server/storage/perfschema/table_sync_instances.cc (+4/-4)
Percona-Server/storage/perfschema/table_sync_instances.h (+2/-2)
Percona-Server/storage/perfschema/table_threads.cc (+13/-13)
Percona-Server/storage/perfschema/table_threads.h (+3/-3)
Percona-Server/storage/perfschema/unittest/CMakeLists.txt (+16/-5)
Percona-Server/strings/ctype-bin.c (+21/-7)
Percona-Server/strings/ctype-mb.c (+41/-11)
Percona-Server/strings/ctype-simple.c (+20/-7)
Percona-Server/strings/ctype-uca.c (+19/-7)
Percona-Server/strings/ctype-utf8.c (+26/-9)
Percona-Server/strings/ctype.c (+2/-0)
Percona-Server/strings/decimal.c (+28/-18)
Percona-Server/strings/xml.c (+11/-3)
Percona-Server/support-files/mysql.spec.sh (+19/-4)
Percona-Server/tests/mysql_client_test.c (+108/-6)
Percona-Server/unittest/gunit/CMakeLists.txt (+179/-171)
Percona-Server/unittest/gunit/FindGTest.cmake (+0/-219)
Percona-Server/unittest/gunit/alignment-t.cc (+2/-2)
Percona-Server/unittest/gunit/bounded_queue-t.cc (+2/-2)
Percona-Server/unittest/gunit/bounds_checked_array-t.cc (+8/-6)
Percona-Server/unittest/gunit/byteorder-t.cc (+1/-1)
Percona-Server/unittest/gunit/copy_info-t.cc (+36/-103)
Percona-Server/unittest/gunit/cost_estimate-t.cc (+1/-1)
Percona-Server/unittest/gunit/create_field-t.cc (+1/-1)
Percona-Server/unittest/gunit/dbug-t.cc (+1/-1)
Percona-Server/unittest/gunit/decimal-t.cc (+2/-2)
Percona-Server/unittest/gunit/dynarray-t.cc (+1/-9)
Percona-Server/unittest/gunit/field-t.cc (+8/-6)
Percona-Server/unittest/gunit/field_date-t.cc (+1/-1)
Percona-Server/unittest/gunit/field_datetime-t.cc (+1/-1)
Percona-Server/unittest/gunit/field_long-t.cc (+1/-2)
Percona-Server/unittest/gunit/field_newdecimal-t.cc (+2/-7)
Percona-Server/unittest/gunit/field_timestamp-t.cc (+1/-1)
Percona-Server/unittest/gunit/filesort_buffer-t.cc (+1/-1)
Percona-Server/unittest/gunit/filesort_compare-t.cc (+8/-8)
Percona-Server/unittest/gunit/get_diagnostics-t.cc (+1/-1)
Percona-Server/unittest/gunit/gunit_test_main.cc (+13/-0)
Percona-Server/unittest/gunit/gunit_test_main_server.cc (+2/-0)
Percona-Server/unittest/gunit/handler-t.cc (+5/-4)
Percona-Server/unittest/gunit/handler-t.h (+30/-57)
Percona-Server/unittest/gunit/item-t.cc (+15/-30)
Percona-Server/unittest/gunit/item_func_now_local-t.cc (+1/-1)
Percona-Server/unittest/gunit/join_tab_sort-t.cc (+1/-1)
Percona-Server/unittest/gunit/like_range-t.cc (+35/-30)
Percona-Server/unittest/gunit/make_sortkey-t.cc (+1/-1)
Percona-Server/unittest/gunit/mdl-t.cc (+81/-16)
Percona-Server/unittest/gunit/mdl_mytap-t.cc (+0/-762)
Percona-Server/unittest/gunit/my_bitmap-t.cc (+14/-2)
Percona-Server/unittest/gunit/my_decimal-t.cc (+26/-4)
Percona-Server/unittest/gunit/my_error-t.cc (+1/-1)
Percona-Server/unittest/gunit/my_regex-t.cc (+1/-1)
Percona-Server/unittest/gunit/mysys_base64-t.cc (+26/-20)
Percona-Server/unittest/gunit/mysys_lf-t.cc (+43/-17)
Percona-Server/unittest/gunit/mysys_my_atomic-t.cc (+34/-8)
Percona-Server/unittest/gunit/mysys_my_malloc-t.cc (+16/-15)
Percona-Server/unittest/gunit/mysys_my_rdtsc-t.cc (+74/-62)
Percona-Server/unittest/gunit/mysys_my_vsnprintf-t.cc (+12/-9)
Percona-Server/unittest/gunit/opt_range-t.cc (+1/-1)
Percona-Server/unittest/gunit/opt_trace-t.cc (+1/-1)
Percona-Server/unittest/gunit/segfault-t.cc (+33/-4)
Percona-Server/unittest/gunit/sql_list-t.cc (+3/-17)
Percona-Server/unittest/gunit/sql_plist-t.cc (+3/-9)
Percona-Server/unittest/gunit/sql_table-t.cc (+49/-1)
Percona-Server/unittest/gunit/stdcxx-t.cc (+2/-2)
Percona-Server/unittest/gunit/string-tests.cc (+19/-0)
Percona-Server/unittest/gunit/table_cache-t.cc (+1/-1)
Percona-Server/unittest/gunit/tap_event_listener.cc (+2/-2)
Percona-Server/unittest/gunit/test_utils.cc (+7/-0)
Percona-Server/unittest/gunit/test_utils.h (+14/-0)
Percona-Server/unittest/gunit/thr_template.cc (+9/-51)
Percona-Server/unittest/gunit/thread_utils-t.cc (+0/-8)
Percona-Server/unittest/gunit/yassl/CMakeLists.txt (+33/-0)
Percona-Server/unittest/gunit/yassl/yassl-t.cc (+112/-0)
Percona-Server/unittest/mysys/CMakeLists.txt (+0/-32)
Percona-Server/unittest/mysys/waiting_threads-t.c (+0/-340)
Percona-Server/vio/vio.c (+7/-1)
Percona-Server/vio/viosocket.c (+9/-2)
Percona-Server/zlib/inflate.c (+13/-1)
To merge this branch: bzr merge lp:~stewart/percona-server/5.6.10
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve
Review via email: mp+148094@code.launchpad.net

Description of the change

Merge MySQL 5.6.10

http://jenkins.percona.com/view/PS%205.6/job/percona-server-5.6-param/38/

Mostly an automerge with two post merge fixups.

To post a comment you must log in.
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Percona-Server/.bzrignore'
2--- Percona-Server/.bzrignore 2012-06-06 10:10:17 +0000
3+++ Percona-Server/.bzrignore 2013-02-13 06:17:00 +0000
4@@ -1316,6 +1316,7 @@
5 mysql-test/*.vcproj
6 mysql-test/.DS_Store
7 mysql-test/collections/default.release
8+mysql-test/collections/default.release.done
9 mysql-test/funcs_1.log
10 mysql-test/funcs_1.tar
11 mysql-test/gmon.out
12@@ -2979,6 +2980,8 @@
13 unittest/examples/.deps/skip-t.Po
14 unittest/examples/.deps/skip_all-t.Po
15 unittest/examples/.deps/todo-t.Po
16+unittest/gunit/merge_large_tests.cc
17+unittest/gunit/merge_small_tests.cc
18 unittest/mysys/*.t
19 unittest/mysys/.deps/base64-t.Po
20 unittest/mysys/.deps/my_atomic-t.Po
21@@ -3130,6 +3133,7 @@
22 Docs/INFO_BIN
23 Docs/INFO_SRC
24 Testing
25+FilesCopied
26 source_downloads
27 client/mysql_plugin
28 support-files/plugins.files
29
30=== modified file 'Percona-Server/BUILD/compile-dist'
31--- Percona-Server/BUILD/compile-dist 2012-08-22 01:40:20 +0000
32+++ Percona-Server/BUILD/compile-dist 2013-02-13 06:17:00 +0000
33@@ -27,8 +27,5 @@
34
35 # By default we get the "community" feature set from
36 # cmake/build_configurations/feature_set.cmake
37-# We include ndbcluster in the configuration, so that it is picked up
38-# by 'make dist' in case someone wants a pushbuild tree for cluster.
39 #
40-./configure \
41- --with-ndbcluster
42+./configure
43
44=== modified file 'Percona-Server/CMakeLists.txt'
45--- Percona-Server/CMakeLists.txt 2012-12-04 08:24:59 +0000
46+++ Percona-Server/CMakeLists.txt 2013-02-13 06:17:00 +0000
47@@ -374,7 +374,6 @@
48 ADD_SUBDIRECTORY(unittest/examples)
49 ADD_SUBDIRECTORY(unittest/mytap)
50 ADD_SUBDIRECTORY(unittest/mytap/t)
51- ADD_SUBDIRECTORY(unittest/mysys)
52 ADD_SUBDIRECTORY(unittest/gunit)
53 ENDIF()
54
55@@ -402,7 +401,7 @@
56 IF(EXISTS ${CMAKE_SOURCE_DIR}/internal/CMakeLists.txt)
57 ADD_SUBDIRECTORY(internal)
58 ENDIF()
59- ADD_SUBDIRECTORY(SPECIFIC-ULN)
60+ ADD_SUBDIRECTORY(packaging/rpm-uln)
61 ENDIF()
62
63 INCLUDE(cmake/abi_check.cmake)
64@@ -440,6 +439,7 @@
65 SET(CPACK_GENERATOR "TGZ")
66 ENDIF()
67 ADD_SUBDIRECTORY(packaging/WiX)
68+ADD_SUBDIRECTORY(packaging/solaris)
69
70 # Create a single package with "make package"
71 # (see http://public.kitware.com/Bug/view.php?id=11452)
72
73=== modified file 'Percona-Server/VERSION'
74--- Percona-Server/VERSION 2012-12-04 08:24:59 +0000
75+++ Percona-Server/VERSION 2013-02-13 06:17:00 +0000
76@@ -1,4 +1,4 @@
77 MYSQL_VERSION_MAJOR=5
78 MYSQL_VERSION_MINOR=6
79-MYSQL_VERSION_PATCH=8
80-MYSQL_VERSION_EXTRA=-rc
81+MYSQL_VERSION_PATCH=10
82+MYSQL_VERSION_EXTRA=
83
84=== modified file 'Percona-Server/client/client_priv.h'
85--- Percona-Server/client/client_priv.h 2013-02-05 03:24:51 +0000
86+++ Percona-Server/client/client_priv.h 2013-02-13 06:17:00 +0000
87@@ -49,7 +49,7 @@
88 OPT_PROMPT, OPT_IGN_LINES,OPT_TRANSACTION,OPT_MYSQL_PROTOCOL,
89 OPT_SHARED_MEMORY_BASE_NAME, OPT_FRM, OPT_SKIP_OPTIMIZATION,
90 OPT_COMPATIBLE, OPT_RECONNECT, OPT_DELIMITER, OPT_SECURE_AUTH,
91- OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET, OPT_SERVER_ARG,
92+ OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET, OPT_SET_GTID_PURGED, OPT_SERVER_ARG,
93 OPT_STOP_POSITION, OPT_START_DATETIME, OPT_STOP_DATETIME,
94 OPT_SIGINT_IGNORE, OPT_HEXBLOB, OPT_ORDER_BY_PRIMARY, OPT_COUNT,
95 OPT_TRIGGERS,
96
97=== modified file 'Percona-Server/client/mysql.cc'
98--- Percona-Server/client/mysql.cc 2012-12-04 08:24:59 +0000
99+++ Percona-Server/client/mysql.cc 2013-02-13 06:17:00 +0000
100@@ -62,6 +62,9 @@
101 /* Array of options to pass to libemysqld */
102 #define MAX_SERVER_ARGS 64
103
104+/* Maximum memory limit that can be claimed by alloca(). */
105+#define MAX_ALLOCA_SIZE 512
106+
107 #include "sql_string.h"
108
109 extern "C" {
110@@ -2554,14 +2557,17 @@
111 {
112 uint length=(uint) (out-line);
113
114- if (!truncated && !is_delimiter_command(line, length))
115+ if (!truncated && (!is_delimiter_command(line, length) ||
116+ (*in_string || *ml_comment)))
117 {
118 /*
119 Don't add a new line in case there's a DELIMITER command to be
120 added to the glob buffer (e.g. on processing a line like
121 "<command>;DELIMITER <non-eof>") : similar to how a new line is
122 not added in the case when the DELIMITER is the first command
123- entered with an empty glob buffer.
124+ entered with an empty glob buffer. However, if the delimiter is
125+ part of a string or a comment, the new line should be added. (e.g.
126+ SELECT '\ndelimiter\n';\n)
127 */
128 *out++='\n';
129 length++;
130@@ -3655,8 +3661,10 @@
131 MYSQL_ROW cur;
132 MYSQL_FIELD *field;
133 bool *num_flag;
134+ size_t sz;
135
136- num_flag=(bool*) my_alloca(sizeof(bool)*mysql_num_fields(result));
137+ sz= sizeof(bool) * mysql_num_fields(result);
138+ num_flag= (bool *) my_safe_alloca(sz, MAX_ALLOCA_SIZE);
139 if (column_types_flag)
140 {
141 print_field_types(result);
142@@ -3757,7 +3765,7 @@
143 (void) tee_fputs("\n", PAGER);
144 }
145 tee_puts((char*) separator.ptr(), PAGER);
146- my_afree((uchar*) num_flag);
147+ my_safe_afree((bool *) num_flag, sz, MAX_ALLOCA_SIZE);
148 }
149
150 /**
151@@ -4677,6 +4685,8 @@
152 sql_real_connect(char *host,char *database,char *user,char *password,
153 uint silent)
154 {
155+ my_bool interactive= status.batch ? FALSE : TRUE;
156+
157 if (connected)
158 {
159 connected= 0;
160@@ -4767,6 +4777,7 @@
161 mysql_options(&mysql, MYSQL_OPT_CONNECT_ATTR_RESET, 0);
162 mysql_options4(&mysql, MYSQL_OPT_CONNECT_ATTR_ADD,
163 "program_name", "mysql");
164+ mysql_options(&mysql, MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS, &interactive);
165
166 if (!mysql_real_connect(&mysql, host, user, password,
167 database, opt_mysql_port, opt_mysql_unix_port,
168
169=== modified file 'Percona-Server/client/mysql_config_editor.cc'
170--- Percona-Server/client/mysql_config_editor.cc 2012-08-30 18:29:28 +0000
171+++ Percona-Server/client/mysql_config_editor.cc 2013-02-13 06:17:00 +0000
172@@ -35,6 +35,7 @@
173
174 #define MYSQL_CONFIG_EDITOR_VERSION "1.0"
175 #define MY_LINE_MAX 4096
176+#define MAX_COMMAND_LIMIT 100
177 /*
178 Header length for the login file.
179 4-byte (unused) + LOGIN_KEY_LEN
180@@ -55,37 +56,41 @@
181 static char my_key[LOGIN_KEY_LEN];
182
183 static my_bool opt_verbose, opt_all, tty_password= 0, opt_warn,
184- login_path_specified= TRUE;
185+ opt_remove_host, opt_remove_pass, opt_remove_user,
186+ login_path_specified= FALSE;
187
188-int execute_commands(int argc, char **argv);
189+static int execute_commands(int command);
190+static int set_command(void);
191+static int remove_command(void);
192+static int print_command(void);
193 static void print_login_path(DYNAMIC_STRING *file_buf, const char *path_name);
194 static void remove_login_path(DYNAMIC_STRING *file_buf, const char *path_name);
195 static char* locate_login_path(DYNAMIC_STRING *file_buf, const char *path_name);
196 static my_bool check_and_create_login_file(void);
197 static void mask_password_and_print(char *buf);
198-static void reset_login_file(bool gen_key);
199+static int reset_login_file(bool gen_key);
200
201 static int encrypt_buffer(const char *plain, int plain_len, char cipher[]);
202 static int decrypt_buffer(const char *cipher, int cipher_len, char plain[]);
203 static int encrypt_and_write_file(DYNAMIC_STRING *file_buf);
204 static int read_and_decrypt_file(DYNAMIC_STRING *file_buf);
205+static int do_handle_options(int argc, char *argv[]);
206+static void remove_options(DYNAMIC_STRING *file_buf, const char *path_name);
207+static void remove_option(DYNAMIC_STRING *file_buf, const char *path_name,
208+ const char* option_name);
209 void generate_login_key(void);
210-int read_login_key(void);
211-int add_header(void);
212+static int read_login_key(void);
213+static int add_header(void);
214+static void my_perror(const char *msg);
215
216 static void verbose_msg(const char *fmt, ...);
217 static void print_version(void);
218-static void usage(void);
219+static void usage_program(void);
220+static void usage_command(int command);
221 extern "C" my_bool get_one_option(int optid, const struct my_option *opt,
222 char *argument);
223
224-
225-/*
226- The order of commands must be the same as command_names,
227- except MY_CONFIG_ERROR.
228-*/
229 enum commands {
230- MY_CONFIG_ERROR,
231 MY_CONFIG_SET,
232 MY_CONFIG_REMOVE,
233 MY_CONFIG_PRINT,
234@@ -93,249 +98,563 @@
235 MY_CONFIG_HELP
236 };
237
238-static const char *command_names[]= {
239- "set",
240- "remove",
241- "print",
242- "reset",
243- "help",
244- NullS
245+struct my_command_data {
246+ const int id;
247+ const char *name;
248+ const char *description;
249+ my_option *options;
250+ my_bool (*get_one_option_func)(int optid,
251+ const struct my_option *opt,
252+ char *argument);
253 };
254
255-static TYPELIB command_typelib=
256-{ array_elements(command_names)-1, "commands", command_names, NULL};
257
258-static struct my_option my_long_options[] =
259+/* mysql_config_editor utility options. */
260+static struct my_option my_program_long_options[]=
261 {
262- {"all", OPT_CONFIG_ALL, "Used with print command to print all login paths.",
263- &opt_all, &opt_all, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
264 #ifndef DBUG_OFF
265 {"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
266 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
267 #endif
268 {"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG,
269 NO_ARG, 0, 0, 0, 0, 0, 0},
270+ {"verbose", 'v', "Write more information.", &opt_verbose,
271+ &opt_verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
272+ {"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG,
273+ NO_ARG, 0, 0, 0, 0, 0, 0},
274+ {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
275+};
276+
277+/* Command-specific options. */
278+
279+/* SET command options. */
280+static struct my_option my_set_command_options[]=
281+{
282+ {"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG,
283+ NO_ARG, 0, 0, 0, 0, 0, 0},
284 {"host", 'h', "Host name to be entered into the login file.", &opt_host,
285- &opt_host, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
286- {"login-path", 'G', "Name of the login path to use in the login file.",
287- &opt_login_path, &opt_login_path, 0, GET_STR, REQUIRED_ARG, 0, 0, 0,
288- 0, 0, 0},
289+ &opt_host, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
290+ {"login-path", 'G', "Name of the login path to use in the login file. "
291+ "(Default : client)", &opt_login_path, &opt_login_path, 0, GET_STR,
292+ REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
293 {"password", 'p', "Prompt for password to be entered into the login file.",
294 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
295 {"user", 'u', "User name to be entered into the login file.", &opt_user,
296- &opt_user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
297- {"verbose", 'v', "Write more information.", &opt_verbose,
298- &opt_verbose, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
299- {"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG,
300- NO_ARG, 0, 0, 0, 0, 0, 0},
301+ &opt_user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
302 {"warn", 'w', "Warn and ask for confirmation if set command attempts to "
303 "overwrite an existing login path (enabled by default).",
304 &opt_warn, &opt_warn, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
305- { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
306-};
307-
308+ {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
309+};
310+
311+/* REMOVE command options. */
312+static struct my_option my_remove_command_options[]=
313+{
314+ {"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG,
315+ NO_ARG, 0, 0, 0, 0, 0, 0},
316+ {"host", 'h', "Remove host name from the login path.",
317+ &opt_remove_host, &opt_remove_host, 0, GET_BOOL, NO_ARG, 0, 0, 0,
318+ 0, 0, 0},
319+ {"login-path", 'G', "Name of the login path from which options to "
320+ "be removed (entire path would be removed if none of user, password, "
321+ "or host options are specified). (Default : client)", &opt_login_path,
322+ &opt_login_path, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
323+ {"password", 'p', "Remove password from the login path.",
324+ &opt_remove_pass, &opt_remove_pass, 0, GET_BOOL, NO_ARG, 0, 0, 0,
325+ 0, 0, 0},
326+ {"user", 'u', "Remove user name from the login path.", &opt_remove_user,
327+ &opt_remove_user, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
328+ {"warn", 'w', "Warn and ask for confirmation if remove command attempts "
329+ "to remove the default login path (client) if no login path is specified "
330+ "(enabled by default).", &opt_warn, &opt_warn, 0, GET_BOOL, NO_ARG, 1,
331+ 0, 0, 0, 0, 0},
332+ {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
333+};
334+
335+/* PRINT command options. */
336+static struct my_option my_print_command_options[]=
337+{
338+ {"all", OPT_CONFIG_ALL, "Used with print command to print all login paths.",
339+ &opt_all, &opt_all, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
340+ {"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG,
341+ NO_ARG, 0, 0, 0, 0, 0, 0},
342+ {"login-path", 'G', "Name of the login path to use in the login file. "
343+ "(Default : client)", &opt_login_path, &opt_login_path, 0, GET_STR,
344+ REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
345+ {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
346+};
347+
348+/* RESET command options. */
349+static struct my_option my_reset_command_options[]=
350+{
351+ {"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG,
352+ NO_ARG, 0, 0, 0, 0, 0, 0},
353+ {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
354+};
355+
356+/* HELP command options. */
357+static struct my_option my_help_command_options[]=
358+{
359+ {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
360+};
361
362 my_bool
363-get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
364- char *argument)
365+my_program_get_one_option(int optid,
366+ const struct my_option *opt __attribute__((unused)),
367+ char *argument)
368 {
369 switch(optid) {
370 case '#':
371 DBUG_PUSH(argument ? argument : "d:t:o,/tmp/mysql_config_editor.trace");
372 break;
373+ case 'V':
374+ print_version();
375+ exit(0);
376+ break;
377+ case '?':
378+ usage_program();
379+ exit(0);
380+ break;
381+ }
382+ return 0;
383+}
384+
385+my_bool
386+my_set_command_get_one_option(int optid,
387+ const struct my_option *opt __attribute__((unused)),
388+ char *argument)
389+{
390+ switch(optid) {
391 case 'p':
392 tty_password= 1;
393 break;
394- case 'V':
395- print_version();
396- exit(0);
397- break;
398- case '?':
399- usage();
400- exit(0);
401- break;
402- }
403- return 0;
404-}
405+ case 'G':
406+ login_path_specified= TRUE;
407+ break;
408+ case '?':
409+ usage_command(MY_CONFIG_SET);
410+ exit(0);
411+ break;
412+ }
413+ return 0;
414+}
415+
416+my_bool
417+my_remove_command_get_one_option(int optid,
418+ const struct my_option *opt __attribute__((unused)),
419+ char *argument)
420+{
421+ switch(optid) {
422+ case 'G':
423+ login_path_specified= TRUE;
424+ break;
425+ case '?':
426+ usage_command(MY_CONFIG_REMOVE);
427+ exit(0);
428+ break;
429+ }
430+ return 0;
431+}
432+
433+my_bool
434+my_print_command_get_one_option(int optid,
435+ const struct my_option *opt __attribute__((unused)),
436+ char *argument)
437+{
438+ switch(optid) {
439+ case 'G':
440+ login_path_specified= TRUE;
441+ break;
442+ case '?':
443+ usage_command(MY_CONFIG_PRINT);
444+ exit(0);
445+ break;
446+ }
447+ return 0;
448+}
449+
450+my_bool
451+my_reset_command_get_one_option(int optid,
452+ const struct my_option *opt __attribute__((unused)),
453+ char *argument)
454+{
455+ switch(optid) {
456+ case '?':
457+ usage_command(MY_CONFIG_RESET);
458+ exit(0);
459+ break;
460+ }
461+ return 0;
462+}
463+
464+static struct my_command_data command_data[]=
465+{
466+ {
467+ MY_CONFIG_SET,
468+ "set",
469+ "Write a login path to the login file.",
470+ my_set_command_options,
471+ my_set_command_get_one_option
472+ },
473+ {
474+ MY_CONFIG_REMOVE,
475+ "remove",
476+ "Remove a login path from the login file.",
477+ my_remove_command_options,
478+ my_remove_command_get_one_option
479+ },
480+ {
481+ MY_CONFIG_PRINT,
482+ "print",
483+ "Print the contents of login file in unencrypted form.",
484+ my_print_command_options,
485+ my_print_command_get_one_option
486+ },
487+ {
488+ MY_CONFIG_RESET,
489+ "reset",
490+ "Empty the contents of the login file. The file is created\n"
491+ "if it does not exist.",
492+ my_reset_command_options,
493+ my_reset_command_get_one_option
494+ },
495+ {
496+ MY_CONFIG_HELP,
497+ "help",
498+ "Display a help message and exit.",
499+ my_help_command_options,
500+ NULL
501+ },
502+ {
503+ 0, NULL, NULL, NULL, NULL
504+ }
505+};
506
507
508 int main(int argc, char *argv[])
509 {
510+ MY_INIT(argv[0]);
511 DBUG_ENTER("main");
512- int error;
513-
514- MY_INIT(argv[0]);
515-
516- if ((error= handle_options(&argc, &argv, my_long_options, get_one_option)))
517+ int command, rc= 0;
518+
519+ command= do_handle_options(argc, argv);
520+
521+ if (command > -1)
522+ rc= execute_commands(command);
523+
524+ if (rc == -1)
525 {
526- exit(error);
527+ my_perror("operation failed.");
528+ DBUG_RETURN(1);
529 }
530-
531- if (argc == 0)
532+ DBUG_RETURN(0);
533+}
534+
535+
536+/**
537+ Handle all the command line arguments.
538+
539+ program_name [program options] [command [command options]]
540+
541+*/
542+static int do_handle_options(int argc, char *argv[])
543+{
544+ DBUG_ENTER("do_handle_options");
545+
546+ const char *command_list[MAX_COMMAND_LIMIT + 1];
547+ char **saved_argv= argv;
548+ char **argv_cmd;
549+ char *ptr; /* for free. */
550+ int argc_cmd;
551+ int rc, i, command= -1;
552+
553+ if (argc < 2)
554 {
555- usage();
556+ usage_program();
557 exit(1);
558 }
559
560- if (tty_password)
561- opt_password= get_tty_password(NullS);
562-
563- /* if not, set it to 'client' (default) */
564+ if (!(ptr= (char *) my_malloc((argc + 2) * sizeof(char *),
565+ MYF(MY_WME))))
566+ goto error;
567+
568+ /* Handle program options. */
569+
570+ /* Prepare a list of supported commands to be used by my_handle_options(). */
571+ for (i= 0; (command_data[i].name != NULL) && (i < MAX_COMMAND_LIMIT); i++)
572+ command_list[i]= (char *) command_data[i].name;
573+ command_list[i]= NULL;
574+
575+ if ((rc= my_handle_options(&argc, &argv, my_program_long_options,
576+ my_program_get_one_option, command_list)))
577+ exit(rc);
578+
579+ if (argc == 0) /* No command specified. */
580+ goto done;
581+
582+ for (i= 0; command_data[i].name != NULL; i++)
583+ {
584+ if (!strcmp(command_data[i].name, argv[0]))
585+ {
586+ command= i;
587+ break;
588+ }
589+ }
590+
591+ if (command == -1)
592+ goto error;
593+
594+ /* Handle command options. */
595+
596+ argv_cmd= (char **)ptr;
597+ argc_cmd= argc + 1;
598+
599+ /* Prepare a command line (argv) using the rest of the options. */
600+ argv_cmd[0]= saved_argv[0];
601+ memcpy((uchar *) (argv_cmd + 1), (uchar *) (argv),
602+ (argc * sizeof(char *)));
603+ argv_cmd[argc_cmd]= 0;
604+
605+ if ((rc= handle_options(&argc_cmd, &argv_cmd,
606+ command_data[command].options,
607+ command_data[command].get_one_option_func)))
608+ exit(rc);
609+
610+ /* Do not allow multiple commands. */
611+ if ( argc_cmd > 1)
612+ goto error;
613+
614+ /* If NULL, set it to 'client' (default) */
615 if (!opt_login_path)
616- {
617- login_path_specified= FALSE;
618 opt_login_path= my_strdup("client", MYF(MY_WME));
619- }
620-
621- error= execute_commands(argc, argv);
622- exit(error ? 1 : 0);
623- DBUG_RETURN(0);
624+
625+done:
626+ my_free(ptr);
627+ DBUG_RETURN(command);
628+
629+error:
630+ my_free(ptr);
631+ usage_program();
632+ exit(1);
633 }
634
635
636-int execute_commands(int argc, char **argv)
637+static int execute_commands(int command)
638 {
639 DBUG_ENTER("execute_commands");
640- DYNAMIC_STRING file_buf, path_buf;
641- int error= 0;
642-
643- init_dynamic_string(&path_buf, "", MY_LINE_MAX, MY_LINE_MAX);
644- init_dynamic_string(&file_buf, "", file_size, 3 * MY_LINE_MAX);
645-
646- for (; argc > 0; argv++, argc--)
647- {
648- if ((error= check_and_create_login_file()))
649- goto done;
650-
651- switch(find_type(argv[0], &command_typelib, FIND_TYPE_BASIC)) {
652- case MY_CONFIG_SET :
653- verbose_msg("Executing set command.\n");
654- if (file_size)
655- {
656- if (read_and_decrypt_file(&file_buf) == -1)
657- goto done;
658- }
659-
660- dynstr_append(&path_buf, "["); /* --login=path */
661- if (opt_login_path)
662- dynstr_append(&path_buf, opt_login_path);
663- else
664- dynstr_append(&path_buf, "client");
665- dynstr_append(&path_buf, "]");
666-
667- if (opt_user) /* --user */
668- {
669- dynstr_append(&path_buf, "\nuser = ");
670- dynstr_append(&path_buf, opt_user);
671- }
672-
673- if (opt_password) /* --password */
674- {
675- dynstr_append(&path_buf, "\npassword = ");
676- dynstr_append(&path_buf, opt_password);
677- }
678-
679- if (opt_host) /* --host */
680- {
681- dynstr_append(&path_buf, "\nhost = ");
682- dynstr_append(&path_buf, opt_host);
683- }
684-
685- dynstr_append(&path_buf, "\n");
686-
687- /* Warn if login path already exists */
688- if (opt_warn && ((locate_login_path (&file_buf, opt_login_path))
689- != NULL))
690- {
691- int choice;
692- printf ("WARNING : \'%s\' path already exists and will be "
693- "overwritten. \n Continue? (Press y|Y for Yes, any "
694- "other key for No) : ",
695- opt_login_path);
696- choice= getchar();
697-
698- if (choice != (int) 'y' && choice != (int) 'Y')
699- break; /* skip */
700- }
701-
702- /* Remove the login path. */
703- remove_login_path(&file_buf, opt_login_path);
704-
705- /* Append the new login path to the file buffer. */
706- dynstr_append(&file_buf, path_buf.str);
707-
708- encrypt_and_write_file(&file_buf);
709- break;
710-
711- case MY_CONFIG_REMOVE :
712- verbose_msg("Executing remove command.\n");
713- if (file_size)
714- {
715- if (read_and_decrypt_file(&file_buf) == -1)
716- goto done;
717- }
718- else
719- break; /* Nothing to remove, skip.. */
720-
721- /* Warn if no login path is specified. */
722- if (opt_warn &&
723- ((locate_login_path (&file_buf, opt_login_path)) != NULL) &&
724- (login_path_specified == FALSE)
725- )
726- {
727- int choice;
728- printf ("WARNING : No login path specified, so default login path "
729- "will be removed. \n Continue? (Press y|Y for Yes, any "
730- "other key for No) : ");
731- choice= getchar();
732-
733- if (choice != (int) 'y' && choice != (int) 'Y')
734- break; /* skip */
735- }
736-
737- remove_login_path(&file_buf, opt_login_path);
738-
739- encrypt_and_write_file(&file_buf);
740- break;
741-
742- case MY_CONFIG_PRINT :
743- verbose_msg("Executing print command.\n");
744- if (file_size)
745- {
746- if (read_and_decrypt_file(&file_buf) == -1)
747- goto done;
748- }
749- else
750- break; /* Nothing to print, skip..*/
751-
752- print_login_path(&file_buf, opt_login_path);
753- break;
754-
755- case MY_CONFIG_RESET :
756- verbose_msg("Resetting login file.\n");
757- reset_login_file(1);
758- break;
759-
760- case MY_CONFIG_HELP :
761- verbose_msg("Printing usage info.\n");
762- usage();
763- break;
764-
765- default :
766- printf("Error! Unknown command.\n");
767- exit(1);
768- }
769- dynstr_trunc(&file_buf, 0);
770- dynstr_trunc(&path_buf, 0);
771-
772- my_close(g_fd, MYF(MY_WME));
773- }
774-
775-done:
776- dynstr_free(&file_buf);
777- dynstr_free(&path_buf);
778-
779- DBUG_RETURN(error);
780+ int rc= 0;
781+
782+ if ((rc= check_and_create_login_file()))
783+ goto done;
784+
785+ switch(command_data[command].id) {
786+ case MY_CONFIG_SET :
787+ verbose_msg("Executing set command.\n");
788+ rc= set_command();
789+ break;
790+
791+ case MY_CONFIG_REMOVE :
792+ verbose_msg("Executing remove command.\n");
793+ rc= remove_command();
794+ break;
795+
796+ case MY_CONFIG_PRINT :
797+ verbose_msg("Executing print command.\n");
798+ rc= print_command();
799+ break;
800+
801+ case MY_CONFIG_RESET :
802+ verbose_msg("Resetting login file.\n");
803+ rc= reset_login_file(1);
804+ break;
805+
806+ case MY_CONFIG_HELP :
807+ verbose_msg("Printing usage info.\n");
808+ usage_program();
809+ break;
810+
811+ default :
812+ my_perror("unknown command.");
813+ exit(1);
814+ }
815+
816+ my_close(g_fd, MYF(MY_WME));
817+
818+done:
819+ DBUG_RETURN(rc);
820+}
821+
822+
823+/**
824+ Execute 'set' command.
825+
826+ @param void
827+
828+ @return -1 Error
829+ 0 Success
830+*/
831+
832+static int set_command(void)
833+{
834+ DBUG_ENTER("set_command");
835+
836+ DYNAMIC_STRING file_buf, path_buf;
837+
838+ init_dynamic_string(&path_buf, "", MY_LINE_MAX, MY_LINE_MAX);
839+ init_dynamic_string(&file_buf, "", file_size, 3 * MY_LINE_MAX);
840+
841+ if (tty_password)
842+ opt_password= get_tty_password(NullS);
843+
844+ if (file_size)
845+ {
846+ if (read_and_decrypt_file(&file_buf) == -1)
847+ goto error;
848+ }
849+
850+ dynstr_append(&path_buf, "["); /* --login=path */
851+ if (opt_login_path)
852+ dynstr_append(&path_buf, opt_login_path);
853+ else
854+ dynstr_append(&path_buf, "client");
855+ dynstr_append(&path_buf, "]");
856+
857+ if (opt_user) /* --user */
858+ {
859+ dynstr_append(&path_buf, "\nuser = ");
860+ dynstr_append(&path_buf, opt_user);
861+ }
862+
863+ if (opt_password) /* --password */
864+ {
865+ dynstr_append(&path_buf, "\npassword = ");
866+ dynstr_append(&path_buf, opt_password);
867+ }
868+
869+ if (opt_host) /* --host */
870+ {
871+ dynstr_append(&path_buf, "\nhost = ");
872+ dynstr_append(&path_buf, opt_host);
873+ }
874+
875+ dynstr_append(&path_buf, "\n");
876+
877+ /* Warn if login path already exists */
878+ if (opt_warn && ((locate_login_path (&file_buf, opt_login_path))
879+ != NULL))
880+ {
881+ int choice;
882+ printf ("WARNING : \'%s\' path already exists and will be "
883+ "overwritten. \n Continue? (Press y|Y for Yes, any "
884+ "other key for No) : ",
885+ opt_login_path);
886+ choice= getchar();
887+
888+ if (choice != (int) 'y' && choice != (int) 'Y')
889+ goto done; /* skip */
890+ }
891+
892+ /* Remove the login path. */
893+ remove_login_path(&file_buf, opt_login_path);
894+
895+ /* Append the new login path to the file buffer. */
896+ dynstr_append(&file_buf, path_buf.str);
897+
898+ if (encrypt_and_write_file(&file_buf) == -1)
899+ goto error;
900+
901+done:
902+ dynstr_free(&file_buf);
903+ dynstr_free(&path_buf);
904+ DBUG_RETURN(0);
905+
906+error:
907+ dynstr_free(&file_buf);
908+ dynstr_free(&path_buf);
909+ DBUG_RETURN(-1);
910+}
911+
912+static int remove_command(void) {
913+ DBUG_ENTER("remove_command");
914+
915+ DYNAMIC_STRING file_buf, path_buf;
916+
917+ init_dynamic_string(&path_buf, "", MY_LINE_MAX, MY_LINE_MAX);
918+ init_dynamic_string(&file_buf, "", file_size, 3 * MY_LINE_MAX);
919+
920+ if (file_size)
921+ {
922+ if (read_and_decrypt_file(&file_buf) == -1)
923+ goto error;
924+ }
925+ else
926+ goto done; /* Nothing to remove, skip.. */
927+
928+ /* Warn if no login path is specified. */
929+ if (opt_warn &&
930+ ((locate_login_path (&file_buf, opt_login_path)) != NULL) &&
931+ (login_path_specified == FALSE)
932+ )
933+ {
934+ int choice;
935+ printf ("WARNING : No login path specified, so options from the default "
936+ "login path will be removed.\nContinue? (Press y|Y for Yes, "
937+ "any other key for No) : ");
938+ choice= getchar();
939+
940+ if (choice != (int) 'y' && choice != (int) 'Y')
941+ goto done; /* skip */
942+ }
943+
944+ remove_options(&file_buf, opt_login_path);
945+
946+ if (encrypt_and_write_file(&file_buf) == -1)
947+ goto error;
948+
949+done:
950+ dynstr_free(&file_buf);
951+ dynstr_free(&path_buf);
952+ DBUG_RETURN(0);
953+
954+error:
955+ dynstr_free(&file_buf);
956+ dynstr_free(&path_buf);
957+ DBUG_RETURN(-1);
958+}
959+
960+/**
961+ Execute 'print' command.
962+
963+ @param void
964+
965+ @return -1 Error
966+ 0 Success
967+*/
968+
969+static int print_command(void)
970+{
971+ DBUG_ENTER("print_command");
972+ DYNAMIC_STRING file_buf;
973+
974+ init_dynamic_string(&file_buf, "", file_size, 3 * MY_LINE_MAX);
975+
976+ if (file_size)
977+ {
978+ if (read_and_decrypt_file(&file_buf) == -1)
979+ goto error;
980+ }
981+ else
982+ goto done; /* Nothing to print, skip..*/
983+
984+ print_login_path(&file_buf, opt_login_path);
985+
986+done:
987+ dynstr_free(&file_buf);
988+ DBUG_RETURN(0);
989+
990+error:
991+ dynstr_free(&file_buf);
992+ DBUG_RETURN(-1);
993 }
994
995
996@@ -345,8 +664,8 @@
997
998 @param void
999
1000- @return 1 error
1001- 0 success
1002+ @return -1 Error
1003+ 0 Success
1004 */
1005
1006 static my_bool check_and_create_login_file(void)
1007@@ -370,7 +689,7 @@
1008 /* Get the login file name. */
1009 if (! my_default_get_login_file(my_login_file, sizeof(my_login_file)))
1010 {
1011- verbose_msg("Error! Failed to set login file name.\n");
1012+ my_perror("failed to set login file name");
1013 goto error;
1014 }
1015
1016@@ -402,7 +721,10 @@
1017 /* Create the login directory. */
1018 verbose_msg("%s directory doesn't exist, creating it.\n", login_dir);
1019 if (my_mkdir(login_dir, 0, MYF(0)))
1020+ {
1021+ my_perror("failed to create the directory");
1022 goto error;
1023+ }
1024 }
1025 }
1026 #endif
1027@@ -423,17 +745,16 @@
1028 verbose_msg("File has the required permission.\nOpening the file.\n");
1029 if ((g_fd= my_open(my_login_file, access_flag, MYF(MY_WME))) == -1)
1030 {
1031- verbose_msg("Error! Couldn't open the file.\n");
1032+ my_perror("couldn't open the file");
1033 goto error;
1034 }
1035 }
1036 else
1037 {
1038 verbose_msg("File does not have the required permission.\n");
1039- if (opt_warn)
1040- printf ("WARNING : Login file does not have the required"
1041- " file permissions.\nPlease set the mode to 600 &"
1042- " run the command again.\n");
1043+ printf ("WARNING : Login file does not have the required"
1044+ " file permissions.\nPlease set the mode to 600 &"
1045+ " run the command again.\n");
1046 goto error;
1047 }
1048 }
1049@@ -443,7 +764,7 @@
1050 if ((g_fd= my_create(my_login_file, create_mode, access_flag,
1051 MYF(MY_WME)) == -1))
1052 {
1053- verbose_msg("Error! Couldn't create the login file.\n");
1054+ my_perror("couldn't create the login file");
1055 goto error;
1056 }
1057 else
1058@@ -453,7 +774,7 @@
1059
1060 if((g_fd= my_open(my_login_file, access_flag, MYF(MY_WME))) == -1)
1061 {
1062- verbose_msg("Error! couldn't open the file.\n");
1063+ my_perror("couldn't open the file");
1064 goto error;
1065 }
1066 file_size= 0;
1067@@ -475,7 +796,7 @@
1068 DBUG_RETURN(0);
1069
1070 error:
1071- DBUG_RETURN(1);
1072+ DBUG_RETURN(-1);
1073 }
1074
1075
1076@@ -575,6 +896,92 @@
1077
1078
1079 /**
1080+ Remove multiple options from a login path.
1081+*/
1082+static void remove_options(DYNAMIC_STRING *file_buf, const char *path_name)
1083+{
1084+ /* If nope of the options are specified remove the entire path. */
1085+ if (!opt_remove_host && !opt_remove_pass && !opt_remove_user)
1086+ {
1087+ remove_login_path(file_buf, path_name);
1088+ return;
1089+ }
1090+
1091+ if (opt_remove_user)
1092+ remove_option(file_buf, path_name, "user");
1093+
1094+ if (opt_remove_pass)
1095+ remove_option(file_buf, path_name, "password");
1096+
1097+ if (opt_remove_host)
1098+ remove_option(file_buf, path_name, "host");
1099+}
1100+
1101+
1102+/**
1103+ Remove an option from a login path.
1104+*/
1105+static void remove_option(DYNAMIC_STRING *file_buf, const char *path_name,
1106+ const char* option_name)
1107+{
1108+ DBUG_ENTER("remove_option");
1109+
1110+ char *start= NULL, *end= NULL;
1111+ char *search_str;
1112+ int search_len, shift_len;
1113+ bool option_found= FALSE;
1114+
1115+ search_str= (char *) my_malloc((uint) strlen(option_name) + 2, MYF(MY_WME));
1116+ sprintf(search_str, "\n%s", option_name);
1117+
1118+ if ((start= locate_login_path(file_buf, path_name)) == NULL)
1119+ /* login path was not found, skip.. */
1120+ goto done;
1121+
1122+ end= strstr(start, "\n["); /* Next path. */
1123+
1124+ if (end)
1125+ search_len= end - start;
1126+ else
1127+ search_len= file_buf->length - (start - file_buf->str);
1128+
1129+ while(search_len > 1)
1130+ {
1131+ if (!strncmp(start, search_str, strlen(search_str)))
1132+ {
1133+ /* Option found. */
1134+ end= start;
1135+ while(*(++ end) != '\n')
1136+ {}
1137+ option_found= TRUE;
1138+ break;
1139+ }
1140+ else
1141+ {
1142+ /* Move to next line. */
1143+ while( (-- search_len > 1) && (*(++ start) != '\n'))
1144+ {}
1145+ }
1146+ }
1147+
1148+ if (option_found)
1149+ {
1150+ shift_len= file_buf->length - (end - file_buf->str);
1151+
1152+ file_buf->length -= (end - start);
1153+
1154+ while(shift_len --)
1155+ *(start ++)= *(end ++);
1156+ *start= '\0';
1157+ }
1158+
1159+done:
1160+ my_free(search_str);
1161+ DBUG_VOID_RETURN;
1162+}
1163+
1164+
1165+/**
1166 Remove the specified login path from the login file.
1167
1168 @param file_buf [in] Buffer storing the unscrambled login
1169@@ -627,27 +1034,34 @@
1170 @param gen_key [in] Flag to control the generation of
1171 a new key.
1172
1173- @return void
1174+ @return -1 Error
1175+ 0 Success
1176 */
1177
1178-static void reset_login_file(bool gen_key)
1179+static int reset_login_file(bool gen_key)
1180 {
1181 DBUG_ENTER("reset_login_file");
1182
1183 if (my_chsize(g_fd, 0, 0, MYF(MY_WME)))
1184+ {
1185 verbose_msg("Error while truncating the file.\n");
1186+ goto error;
1187+ }
1188
1189 /* Seek to the beginning of the file. */
1190- my_seek(g_fd, 0L, SEEK_SET, MYF(MY_WME));
1191+ if (my_seek(g_fd, 0L, SEEK_SET, MYF(MY_WME) == MY_FILEPOS_ERROR))
1192+ goto error; /* Error. */
1193
1194 if (gen_key)
1195 generate_login_key(); /* Generate a new key. */
1196
1197- add_header();
1198-
1199- file_size= 0;
1200-
1201- DBUG_VOID_RETURN;
1202+ if (add_header() == -1)
1203+ goto error;
1204+
1205+ DBUG_RETURN(0);
1206+
1207+error:
1208+ DBUG_RETURN(0);
1209 }
1210
1211
1212@@ -698,8 +1112,8 @@
1213 @param file_buf [in] Buffer storing the unscrambled login
1214 file contents.
1215
1216- @return -1, if error encountered;
1217- bytes written to the file, otherwise.
1218+ @return -1 Error
1219+ 0 Success
1220
1221 @note The contents of the file buffer are encrypted
1222 on a line-by-line basis with each line having
1223@@ -717,12 +1131,13 @@
1224 uint bytes_read=0, len= 0;
1225 int enc_len= 0; // Can be negative.
1226
1227- reset_login_file(0);
1228+ if (reset_login_file(0) == -1)
1229+ goto error;
1230
1231 /* Move past key first. */
1232 if (my_seek(g_fd, MY_LOGIN_HEADER_LEN, SEEK_SET, MYF(MY_WME))
1233 != (MY_LOGIN_HEADER_LEN))
1234- DBUG_RETURN(-1); /* Error while seeking. */
1235+ goto error; /* Error while seeking. */
1236
1237
1238 tmp= &file_buf->str[bytes_read];
1239@@ -745,10 +1160,7 @@
1240
1241 if ((enc_len= encrypt_buffer(&file_buf->str[bytes_read],
1242 ++ len, cipher + MAX_CIPHER_STORE_LEN)) < 0)
1243- {
1244- verbose_msg("Error! failed to encrypt the login file buffer.\n");
1245 goto error;
1246- }
1247
1248 bytes_read += len;
1249
1250@@ -760,10 +1172,7 @@
1251
1252 if ((my_write(g_fd, (const uchar *)cipher, enc_len + MAX_CIPHER_STORE_LEN,
1253 MYF(MY_WME))) != (enc_len + MAX_CIPHER_STORE_LEN))
1254- {
1255- verbose_msg("Error! couldn't write to the file.\n");
1256 goto error;
1257- }
1258 }
1259
1260 verbose_msg("Successfully written encrypted data to the login file.\n");
1261@@ -771,9 +1180,10 @@
1262 /* Update file_size */
1263 file_size= bytes_read;
1264
1265- DBUG_RETURN(file_size);
1266+ DBUG_RETURN(0);
1267
1268 error:
1269+ my_perror("couldn't encrypt the file");
1270 DBUG_RETURN(-1);
1271 }
1272
1273@@ -785,10 +1195,8 @@
1274 @param file_buf [in] Buffer for storing the unscrambled login
1275 file contents.
1276
1277- @return -1, if error encountered;
1278- total length of plain content added to
1279- the file buffer, otherwise.
1280-
1281+ @return -1 Error
1282+ 0 Success
1283 */
1284
1285 static int read_and_decrypt_file(DYNAMIC_STRING *file_buf)
1286@@ -797,12 +1205,12 @@
1287
1288 char cipher[MY_LINE_MAX], plain[MY_LINE_MAX];
1289 uchar len_buf[MAX_CIPHER_STORE_LEN];
1290- int cipher_len= 0, dec_len= 0, total_len= 0;
1291+ int cipher_len= 0, dec_len= 0;
1292
1293 /* Move past key first. */
1294 if (my_seek(g_fd, MY_LOGIN_HEADER_LEN, SEEK_SET, MYF(MY_WME))
1295 != (MY_LOGIN_HEADER_LEN))
1296- DBUG_RETURN(-1); /* Error while seeking. */
1297+ goto error; /* Error while seeking. */
1298
1299 /* First read the length of the cipher. */
1300 while (my_read(g_fd, len_buf, MAX_CIPHER_STORE_LEN,
1301@@ -811,25 +1219,25 @@
1302 cipher_len= sint4korr(len_buf);
1303
1304 if (cipher_len > MY_LINE_MAX)
1305- DBUG_RETURN(-1);
1306+ goto error;
1307
1308 /* Now read 'cipher_len' bytes from the file. */
1309 if ((int) my_read(g_fd, (uchar *) cipher, cipher_len, MYF(MY_WME)) == cipher_len)
1310 {
1311 if ((dec_len= decrypt_buffer(cipher, cipher_len, plain)) < 0)
1312- {
1313- verbose_msg("Error! failed to decrypt the file.\n");
1314- DBUG_RETURN(-1);
1315- }
1316+ goto error;
1317
1318- total_len += dec_len;
1319 plain[dec_len]= 0;
1320 dynstr_append(file_buf, plain);
1321 }
1322 }
1323
1324 verbose_msg("Successfully decrypted the login file.\n");
1325- DBUG_RETURN(total_len);
1326+ DBUG_RETURN(0);
1327+
1328+error:
1329+ my_perror("couldn't decrypt the file");
1330+ DBUG_RETURN(-1);
1331 }
1332
1333
1334@@ -852,13 +1260,9 @@
1335 aes_len= my_aes_get_size(plain_len);
1336
1337 if (my_aes_encrypt(plain, plain_len, cipher, my_key, LOGIN_KEY_LEN) == aes_len)
1338- {
1339 DBUG_RETURN(aes_len);
1340- }
1341- else
1342- {
1343- fprintf(stderr, "Error! failed to encrypt.\n");
1344- }
1345+
1346+ verbose_msg("Error! Couldn't encrypt the buffer.\n");
1347 DBUG_RETURN(-1); /* Error */
1348 }
1349
1350@@ -881,14 +1285,9 @@
1351
1352 if ((aes_length= my_aes_decrypt(cipher, cipher_len, (char *) plain,
1353 my_key, LOGIN_KEY_LEN)) > 0)
1354- {
1355 DBUG_RETURN(aes_length);
1356- }
1357- else
1358- {
1359- fprintf(stderr, "Error! failed to decrypt.\n");
1360- }
1361
1362+ verbose_msg("Error! Couldn't decrypt the buffer.\n");
1363 DBUG_RETURN(-1); /* Error */
1364 }
1365
1366@@ -901,7 +1300,7 @@
1367 length written, otherwise.
1368 */
1369
1370-int add_header(void)
1371+static int add_header(void)
1372 {
1373 DBUG_ENTER("add_header");
1374
1375@@ -910,23 +1309,18 @@
1376
1377 /* Write 'unused' bytes first. */
1378 if ((my_write(g_fd, (const uchar *) unused, 4, MYF(MY_WME))) != 4)
1379- {
1380- verbose_msg("Error! couldn't write to the file.\n");
1381 goto error;
1382- }
1383
1384 /* Write the login key. */
1385 if ((my_write(g_fd, (const uchar *)my_key, LOGIN_KEY_LEN, MYF(MY_WME)))
1386 != LOGIN_KEY_LEN)
1387- {
1388- verbose_msg("Error! couldn't write to the file.\n");
1389 goto error;
1390- }
1391
1392 verbose_msg("Key successfully written to the file.\n");
1393 DBUG_RETURN(MY_LOGIN_HEADER_LEN);
1394
1395 error:
1396+ my_perror("file write operation failed");
1397 DBUG_RETURN(-1);
1398 }
1399
1400@@ -955,24 +1349,25 @@
1401 0 Success
1402 */
1403
1404-int read_login_key(void)
1405+static int read_login_key(void)
1406 {
1407 DBUG_ENTER("read_login_key");
1408
1409 verbose_msg("Reading the login key.\n");
1410 /* Move past the unused buffer. */
1411 if (my_seek(g_fd, 4, SEEK_SET, MYF(MY_WME)) != 4)
1412- DBUG_RETURN(-1); /* Error while seeking. */
1413+ goto error; /* Error while seeking. */
1414
1415 if (my_read(g_fd, (uchar *)my_key, LOGIN_KEY_LEN, MYF(MY_WME))
1416 != LOGIN_KEY_LEN)
1417- {
1418- verbose_msg("Failed to read login key.\n");
1419- DBUG_RETURN(-1);
1420- }
1421+ goto error; /* Error while reading. */
1422
1423 verbose_msg("Login key read successfully.\n");
1424 DBUG_RETURN(0);
1425+
1426+error:
1427+ my_perror("file read operation failed");
1428+ DBUG_RETURN(-1);
1429 }
1430
1431
1432@@ -992,22 +1387,48 @@
1433 DBUG_VOID_RETURN;
1434 }
1435
1436-
1437-static void usage(void)
1438-{
1439- print_version();
1440- puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2012"));
1441- puts("MySQL Configuration Utility.");
1442- printf("Usage: %s command [options] \n", my_progname);
1443- my_print_help(my_long_options);
1444- my_print_variables(my_long_options);
1445+static void my_perror(const char *msg)
1446+{
1447+ char errbuf[MYSYS_STRERROR_SIZE];
1448+
1449+ if (errno == 0)
1450+ fprintf(stderr, "%s\n", (msg) ? msg : "");
1451+ else
1452+ fprintf(stderr, "%s : %s\n", (msg) ? msg : "",
1453+ my_strerror(errbuf, sizeof(errbuf), errno));
1454+ // reset errno
1455+ errno= 0;
1456+}
1457+
1458+static void usage_command(int command)
1459+{
1460+ print_version();
1461+ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2012"));
1462+ puts("MySQL Configuration Utility.");
1463+ printf("\nDescription: %s\n", command_data[command].description);
1464+ printf("Usage: %s [program options] [%s [command options]]\n",
1465+ my_progname, command_data[command].name);
1466+ my_print_help(command_data[command].options);
1467+ my_print_variables(command_data[command].options);
1468+}
1469+
1470+
1471+static void usage_program(void)
1472+{
1473+ print_version();
1474+ puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2012"));
1475+ puts("MySQL Configuration Utility.");
1476+ printf("Usage: %s [program options] [command [command options]]\n",
1477+ my_progname);
1478+ my_print_help(my_program_long_options);
1479+ my_print_variables(my_program_long_options);
1480 puts("\nWhere command can be any one of the following :\n\
1481- set [options] Sets user name/password/host name for a\n\
1482+ set [command options] Sets user name/password/host name for a\n\
1483 given login path (section).\n\
1484- remove [options] Remove a login path from the login file.\n\
1485- print [options] Print all the options for a specified\n\
1486+ remove [command options] Remove a login path from the login file.\n\
1487+ print [command options] Print all the options for a specified\n\
1488 login path.\n\
1489- reset Deletes the contents of the login file.\n\
1490+ reset [command options] Deletes the contents of the login file.\n\
1491 help Display this usage/help information.\n");
1492 }
1493
1494
1495=== modified file 'Percona-Server/client/mysql_plugin.c'
1496--- Percona-Server/client/mysql_plugin.c 2012-10-03 06:13:53 +0000
1497+++ Percona-Server/client/mysql_plugin.c 2013-02-13 06:17:00 +0000
1498@@ -558,13 +558,18 @@
1499 const char *last_fn_libchar;
1500 #endif
1501
1502+ if ((strlen(base_path) + strlen(subdir) + 1) > FN_REFLEN)
1503+ {
1504+ fprintf(stderr, "WARNING: Search path is too long\n");
1505+ return 1;
1506+ }
1507 strcpy(source_path, base_path);
1508 strcat(source_path, subdir);
1509 fn_format(new_path, tool_name, source_path, "", MY_UNPACK_FILENAME);
1510 if (file_exists(new_path))
1511 {
1512 strcpy(tool_path, new_path);
1513- return 1;
1514+ return 0;
1515 }
1516
1517 #if __WIN__
1518@@ -588,11 +593,11 @@
1519 if (file_exists(win_abs_path))
1520 {
1521 strcpy(tool_path, win_abs_path);
1522- return 1;
1523+ return 0;
1524 }
1525 }
1526 #endif
1527- return 0;
1528+ return 1;
1529 }
1530
1531
1532@@ -617,12 +622,12 @@
1533 };
1534 for (i = 0 ; i < (int)array_elements(paths); i++)
1535 {
1536- if (search_dir(base_path, tool_name, paths[i], tool_path))
1537+ if (!search_dir(base_path, tool_name, paths[i], tool_path))
1538 {
1539- return 1;
1540+ return 0;
1541 }
1542 }
1543- return 0;
1544+ return 1;
1545 }
1546
1547
1548@@ -1006,7 +1011,7 @@
1549 };
1550 for (i= 0; i < (int)array_elements(paths); i++)
1551 {
1552- if (paths[i] && (search_paths(paths[i], tool_name, tool_path)))
1553+ if (paths[i] && !(search_paths(paths[i], tool_name, tool_path)))
1554 goto found;
1555 }
1556 fprintf(stderr, "WARNING: Cannot find %s.\n", tool_name);
1557
1558=== modified file 'Percona-Server/client/mysql_upgrade.c'
1559--- Percona-Server/client/mysql_upgrade.c 2012-10-16 06:21:51 +0000
1560+++ Percona-Server/client/mysql_upgrade.c 2013-02-13 06:17:00 +0000
1561@@ -178,6 +178,7 @@
1562 }
1563 va_end(args);
1564
1565+ DBUG_LEAVE;
1566 free_used_memory();
1567 my_end(my_end_arg);
1568 exit(1);
1569@@ -837,7 +838,7 @@
1570
1571 dynstr_free(&ds_result);
1572 dynstr_free(&ds_script);
1573- return found_real_errors;
1574+ DBUG_RETURN(found_real_errors);
1575 }
1576
1577
1578
1579=== modified file 'Percona-Server/client/mysqladmin.cc'
1580--- Percona-Server/client/mysqladmin.cc 2012-12-04 08:24:59 +0000
1581+++ Percona-Server/client/mysqladmin.cc 2013-02-13 06:17:00 +0000
1582@@ -312,6 +312,8 @@
1583 int main(int argc,char *argv[])
1584 {
1585 int error= 0, ho_error;
1586+ int first_command;
1587+ my_bool can_handle_passwords;
1588 MYSQL mysql;
1589 char **commands, **save_argv;
1590
1591@@ -387,6 +389,13 @@
1592 mysql_options(&mysql, MYSQL_ENABLE_CLEARTEXT_PLUGIN,
1593 (char*) &opt_enable_cleartext_plugin);
1594
1595+ first_command= find_type(argv[0], &command_typelib, FIND_TYPE_BASIC);
1596+ can_handle_passwords=
1597+ (first_command == ADMIN_PASSWORD || first_command == ADMIN_OLD_PASSWORD) ?
1598+ TRUE : FALSE;
1599+ mysql_options(&mysql, MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS,
1600+ &can_handle_passwords);
1601+
1602 if (sql_connect(&mysql, option_wait))
1603 {
1604 /*
1605
1606=== modified file 'Percona-Server/client/mysqlbinlog.cc'
1607--- Percona-Server/client/mysqlbinlog.cc 2012-10-16 06:21:51 +0000
1608+++ Percona-Server/client/mysqlbinlog.cc 2013-02-13 06:17:00 +0000
1609@@ -858,7 +858,20 @@
1610 reset_dynamic(&buff_ev);
1611
1612 if (parent_query_skips)
1613+ {
1614+ /*
1615+ Even though there would be no need to set the flag here,
1616+ since parent_query_skips is never true when handling "COMMIT"
1617+ statements in the Query_log_event, we still need to handle DDL,
1618+ which causes a commit itself.
1619+ */
1620+ print_event_info->skipped_event_in_transaction= true;
1621 goto end;
1622+ }
1623+
1624+ if (((Query_log_event*) ev)->ends_group())
1625+ print_event_info->skipped_event_in_transaction= false;
1626+
1627 ev->print(result_file, print_event_info);
1628 if (head->error == -1)
1629 goto err;
1630@@ -905,7 +918,10 @@
1631 Note that Load event from 3.23 is not tested.
1632 */
1633 if (shall_skip_database(ce->db))
1634+ {
1635+ print_event_info->skipped_event_in_transaction= true;
1636 goto end; // Next event
1637+ }
1638 /*
1639 We print the event, but with a leading '#': this is just to inform
1640 the user of the original command; the command we want to execute
1641@@ -1024,7 +1040,9 @@
1642 Execute_load_query_log_event *exlq= (Execute_load_query_log_event*)ev;
1643 char *fname= load_processor.grab_fname(exlq->file_id);
1644
1645- if (!shall_skip_database(exlq->db))
1646+ if (shall_skip_database(exlq->db))
1647+ print_event_info->skipped_event_in_transaction= true;
1648+ else
1649 {
1650 if (fname)
1651 {
1652@@ -1051,6 +1069,7 @@
1653 Table_map_log_event *map= ((Table_map_log_event *)ev);
1654 if (shall_skip_database(map->get_db_name()))
1655 {
1656+ print_event_info->skipped_event_in_transaction= true;
1657 print_event_info->m_table_map_ignored.set_table(map->get_table_id(), map);
1658 destroy_evt= FALSE;
1659 goto end;
1660@@ -1122,7 +1141,10 @@
1661
1662 /* skip the event check */
1663 if (skip_event)
1664+ {
1665+ print_event_info->skipped_event_in_transaction= true;
1666 goto end;
1667+ }
1668
1669 /*
1670 These events must be printed in base64 format, if printed.
1671@@ -1162,6 +1184,33 @@
1672 }
1673 break;
1674 }
1675+ case GTID_LOG_EVENT:
1676+ {
1677+ if (print_event_info->skipped_event_in_transaction == true)
1678+ fprintf(result_file, "COMMIT /* added by mysqlbinlog */%s\n", print_event_info->delimiter);
1679+ print_event_info->skipped_event_in_transaction= false;
1680+
1681+ ev->print(result_file, print_event_info);
1682+ if (head->error == -1)
1683+ goto err;
1684+ break;
1685+ }
1686+ case XID_EVENT:
1687+ {
1688+ print_event_info->skipped_event_in_transaction= false;
1689+ ev->print(result_file, print_event_info);
1690+ if (head->error == -1)
1691+ goto err;
1692+ break;
1693+ }
1694+ case PREVIOUS_GTIDS_LOG_EVENT:
1695+ if (one_database && !opt_skip_gtids)
1696+ warning("The option --database has been used. It may filter "
1697+ "parts of transactions, but will include the GTIDs in "
1698+ "any case. If you want to exclude or include transactions, "
1699+ "you should use the options --exclude-gtids or "
1700+ "--include-gtids, respectively, instead.");
1701+ /* fall through */
1702 default:
1703 ev->print(result_file, print_event_info);
1704 if (head->error == -1)
1705@@ -1745,6 +1794,9 @@
1706 /* Set delimiter back to semicolon */
1707 if (!raw_mode)
1708 {
1709+ if (print_event_info.skipped_event_in_transaction)
1710+ fprintf(result_file, "COMMIT /* added by mysqlbinlog */%s\n", print_event_info.delimiter);
1711+
1712 fprintf(result_file, "DELIMITER ;\n");
1713 strmov(print_event_info.delimiter, ";");
1714 }
1715@@ -1929,14 +1981,10 @@
1716 {
1717 command= COM_BINLOG_DUMP_GTID;
1718
1719- Gtid_set gtid_set(global_sid_map);
1720 global_sid_lock->rdlock();
1721
1722- gtid_set.add_gtid_set(gtid_set_excluded);
1723-
1724 // allocate buffer
1725- size_t unused_size= 0;
1726- size_t encoded_data_size= gtid_set.get_encoded_length();
1727+ size_t encoded_data_size= gtid_set_excluded->get_encoded_length();
1728 size_t allocation_size=
1729 ::BINLOG_FLAGS_INFO_SIZE + ::BINLOG_SERVER_ID_INFO_SIZE +
1730 ::BINLOG_NAME_SIZE_INFO_SIZE + BINLOG_NAME_INFO_SIZE +
1731@@ -1950,13 +1998,6 @@
1732 }
1733 uchar* ptr_buffer= command_buffer;
1734
1735- /*
1736- The current implementation decides whether the Gtid must be
1737- used based on option --exclude-gtids.
1738- */
1739- add_master_slave_proto(&binlog_flags,
1740- opt_exclude_gtids_str != NULL ?
1741- BINLOG_THROUGH_GTID : BINLOG_THROUGH_POSITION);
1742 int2store(ptr_buffer, binlog_flags);
1743 ptr_buffer+= ::BINLOG_FLAGS_INFO_SIZE;
1744 int4store(ptr_buffer, server_id);
1745@@ -1967,23 +2008,15 @@
1746 ptr_buffer+= BINLOG_NAME_INFO_SIZE;
1747 int8store(ptr_buffer, start_position);
1748 ptr_buffer+= ::BINLOG_POS_INFO_SIZE;
1749-
1750- if (is_master_slave_proto(binlog_flags, BINLOG_THROUGH_GTID))
1751- {
1752- int4store(ptr_buffer, encoded_data_size);
1753- ptr_buffer+= ::BINLOG_DATA_SIZE_INFO_SIZE;
1754- gtid_set.encode(ptr_buffer);
1755- ptr_buffer+= encoded_data_size;
1756- }
1757- else
1758- {
1759- unused_size= ::BINLOG_DATA_SIZE_INFO_SIZE + encoded_data_size;
1760- }
1761+ int4store(ptr_buffer, encoded_data_size);
1762+ ptr_buffer+= ::BINLOG_DATA_SIZE_INFO_SIZE;
1763+ gtid_set_excluded->encode(ptr_buffer);
1764+ ptr_buffer+= encoded_data_size;
1765
1766 global_sid_lock->unlock();
1767
1768 command_size= ptr_buffer - command_buffer;
1769- DBUG_ASSERT(command_size == (allocation_size - unused_size - 1));
1770+ DBUG_ASSERT(command_size == (allocation_size - 1));
1771 }
1772
1773 if (simple_command(mysql, command, command_buffer, command_size, 1))
1774@@ -2701,6 +2734,8 @@
1775
1776 if (!raw_mode)
1777 {
1778+ fprintf(result_file, "/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;\n");
1779+
1780 fprintf(result_file,
1781 "/*!40019 SET @@session.max_insert_delayed_threads=0*/;\n");
1782
1783@@ -2753,6 +2788,8 @@
1784 "/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n"
1785 "/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n"
1786 "/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;\n");
1787+
1788+ fprintf(result_file, "/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;\n");
1789 }
1790
1791 if (tmpdir.list)
1792@@ -2789,4 +2826,3 @@
1793 #include "uuid.cc"
1794 #include "rpl_gtid_set.cc"
1795 #include "rpl_gtid_specification.cc"
1796-#include "rpl_constants.cc"
1797
1798=== modified file 'Percona-Server/client/mysqlcheck.c'
1799--- Percona-Server/client/mysqlcheck.c 2012-10-16 06:21:51 +0000
1800+++ Percona-Server/client/mysqlcheck.c 2013-02-13 06:17:00 +0000
1801@@ -870,10 +870,10 @@
1802 NULL, opt_mysql_port, opt_mysql_unix_port, 0)))
1803 {
1804 DBerror(&mysql_connection, "when trying to connect");
1805- return 1;
1806+ DBUG_RETURN(1);
1807 }
1808 mysql_connection.reconnect= 1;
1809- return 0;
1810+ DBUG_RETURN(0);
1811 } /* dbConnect */
1812
1813
1814
1815=== modified file 'Percona-Server/client/mysqldump.c'
1816--- Percona-Server/client/mysqldump.c 2013-01-25 11:46:09 +0000
1817+++ Percona-Server/client/mysqldump.c 2013-02-13 06:17:00 +0000
1818@@ -157,6 +157,17 @@
1819 FILE *md_result_file= 0;
1820 FILE *stderror_file=0;
1821
1822+const char *set_gtid_purged_mode_names[]=
1823+{"OFF", "AUTO", "ON", NullS};
1824+static TYPELIB set_gtid_purged_mode_typelib=
1825+ {array_elements(set_gtid_purged_mode_names) -1, "",
1826+ set_gtid_purged_mode_names, NULL};
1827+static enum enum_set_gtid_purged_mode {
1828+ SET_GTID_PURGED_OFF= 0,
1829+ SET_GTID_PURGED_AUTO =1,
1830+ SET_GTID_PURGED_ON=2
1831+} opt_set_gtid_purged_mode= SET_GTID_PURGED_AUTO;
1832+
1833 #ifdef HAVE_SMEM
1834 static char *shared_memory_base_name=0;
1835 #endif
1836@@ -484,6 +495,15 @@
1837 "Add 'SET NAMES default_character_set' to the output.",
1838 &opt_set_charset, &opt_set_charset, 0, GET_BOOL, NO_ARG, 1,
1839 0, 0, 0, 0, 0},
1840+ {"set-gtid-purged", OPT_SET_GTID_PURGED,
1841+ "Add 'SET @@GLOBAL.GTID_PURGED' to the output. Possible values for "
1842+ "this option are ON, OFF and AUTO. If ON is used and GTIDs "
1843+ "are not enabled on the server, an error is generated. If OFF is "
1844+ "used, this option does nothing. If AUTO is used and GTIDs are enabled "
1845+ "on the server, 'SET @@GLOBAL.GTID_PURGED' is added to the output. "
1846+ "If GTIDs are disabled, AUTO does nothing. Default is AUTO.",
1847+ 0, 0, 0, GET_STR, OPT_ARG,
1848+ 0, 0, 0, 0, 0, 0},
1849 #ifdef HAVE_SMEM
1850 {"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
1851 "Base name of shared memory.", &shared_memory_base_name, &shared_memory_base_name,
1852@@ -923,6 +943,13 @@
1853 opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
1854 opt->name);
1855 break;
1856+ case (int) OPT_SET_GTID_PURGED:
1857+ {
1858+ opt_set_gtid_purged_mode= find_type_or_exit(argument,
1859+ &set_gtid_purged_mode_typelib,
1860+ opt->name)-1;
1861+ break;
1862+ }
1863 }
1864 return 0;
1865 }
1866@@ -2280,7 +2307,6 @@
1867 const char *routine_type[]= {"FUNCTION", "PROCEDURE"};
1868 char db_name_buff[NAME_LEN*2+3], name_buff[NAME_LEN*2+3];
1869 char *routine_name;
1870- char *query_str;
1871 int i;
1872 FILE *sql_file= md_result_file;
1873 MYSQL_RES *routine_res, *routine_list_res;
1874@@ -2374,17 +2400,6 @@
1875 fprintf(sql_file, "/*!50003 DROP %s IF EXISTS %s */;\n",
1876 routine_type[i], routine_name);
1877
1878- query_str= cover_definer_clause(row[2], strlen(row[2]),
1879- C_STRING_WITH_LEN("50020"),
1880- C_STRING_WITH_LEN("50003"),
1881- C_STRING_WITH_LEN(" FUNCTION"));
1882-
1883- if (!query_str)
1884- query_str= cover_definer_clause(row[2], strlen(row[2]),
1885- C_STRING_WITH_LEN("50020"),
1886- C_STRING_WITH_LEN("50003"),
1887- C_STRING_WITH_LEN(" PROCEDURE"));
1888-
1889 if (mysql_num_fields(routine_res) >= 6)
1890 {
1891 if (switch_db_collation(sql_file, db_name_buff, ";",
1892@@ -2422,9 +2437,9 @@
1893
1894 fprintf(sql_file,
1895 "DELIMITER ;;\n"
1896- "/*!50003 %s */;;\n"
1897+ "%s ;;\n"
1898 "DELIMITER ;\n",
1899- (const char *) (query_str != NULL ? query_str : row[2]));
1900+ (const char *) row[2]);
1901
1902 restore_sql_mode(sql_file, ";");
1903
1904@@ -2439,7 +2454,6 @@
1905 }
1906 }
1907
1908- my_free(query_str);
1909 }
1910 } /* end of routine printing */
1911 mysql_free_result(routine_res);
1912@@ -3743,17 +3757,8 @@
1913 DBUG_VOID_RETURN;
1914 }
1915
1916- /*
1917- Check --skip-events flag: it is not enough to skip creation of events
1918- discarding SHOW CREATE EVENT statements generation. The myslq.event
1919- table data should be skipped too.
1920- */
1921- if (!opt_events && !my_strcasecmp(&my_charset_latin1, db, "mysql") &&
1922- !my_strcasecmp(&my_charset_latin1, table, "event"))
1923- {
1924- verbose_msg("-- Skipping data table mysql.event, --skip-events was used\n");
1925- DBUG_VOID_RETURN;
1926- }
1927+ result_table= quote_name(table,table_buff, 1);
1928+ opt_quoted_table= quote_name(table, table_buff2, 0);
1929
1930 verbose_msg("-- Sending SELECT query...\n");
1931
1932@@ -5578,6 +5583,153 @@
1933 }
1934
1935
1936+/**
1937+ This function sets the session binlog in the dump file.
1938+ When --set-gtid-purged is used, this function is called to
1939+ disable the session binlog and at the end of the dump, to restore
1940+ the session binlog.
1941+
1942+ @note: md_result_file should have been opened, before
1943+ this function is called.
1944+
1945+ @param[in] flag If FALSE, disable binlog.
1946+ If TRUE and binlog disabled previously,
1947+ restore the session binlog.
1948+*/
1949+
1950+static void set_session_binlog(my_bool flag)
1951+{
1952+ static my_bool is_binlog_disabled= FALSE;
1953+
1954+ if (!flag && !is_binlog_disabled)
1955+ {
1956+ fprintf(md_result_file,
1957+ "SET @MYSQLDUMP_TEMP_LOG_BIN = @@SESSION.SQL_LOG_BIN;\n");
1958+ fprintf(md_result_file, "SET @@SESSION.SQL_LOG_BIN= 0;\n");
1959+ is_binlog_disabled= 1;
1960+ }
1961+ else if (flag && is_binlog_disabled)
1962+ {
1963+ fprintf(md_result_file,
1964+ "SET @@SESSION.SQL_LOG_BIN = @MYSQLDUMP_TEMP_LOG_BIN;\n");
1965+ is_binlog_disabled= 0;
1966+ }
1967+}
1968+
1969+
1970+/**
1971+ This function gets the GTID_EXECUTED sets from the
1972+ server and assigns those sets to GTID_PURGED in the
1973+ dump file.
1974+
1975+ @param[in] mysql_con connection to the server
1976+
1977+ @retval FALSE succesfully printed GTID_PURGED sets
1978+ in the dump file.
1979+ @retval TRUE failed.
1980+
1981+*/
1982+
1983+static my_bool add_set_gtid_purged(MYSQL *mysql_con)
1984+{
1985+ MYSQL_RES *gtid_purged_res;
1986+ MYSQL_ROW gtid_set;
1987+ ulong num_sets, idx;
1988+
1989+ /* query to get the GTID_EXECUTED */
1990+ if (mysql_query_with_error_report(mysql_con, &gtid_purged_res,
1991+ "SELECT @@GLOBAL.GTID_EXECUTED"))
1992+ return TRUE;
1993+
1994+ /* Proceed only if gtid_purged_res is non empty */
1995+ if ((num_sets= mysql_num_rows(gtid_purged_res)) > 0)
1996+ {
1997+ if (opt_comments)
1998+ fprintf(md_result_file,
1999+ "\n--\n-- GTID state at the beginning of the backup \n--\n\n");
2000+
2001+ fprintf(md_result_file,"SET @@GLOBAL.GTID_PURGED='");
2002+
2003+ /* formatting is not required, even for multiple gtid sets */
2004+ for (idx= 0; idx< num_sets-1; idx++)
2005+ {
2006+ gtid_set= mysql_fetch_row(gtid_purged_res);
2007+ fprintf(md_result_file,"%s,", (char*)gtid_set[0]);
2008+ }
2009+ /* for the last set */
2010+ gtid_set= mysql_fetch_row(gtid_purged_res);
2011+ /* close the SET expression */
2012+ fprintf(md_result_file,"%s';\n", (char*)gtid_set[0]);
2013+ }
2014+
2015+ return FALSE; /*success */
2016+}
2017+
2018+
2019+/**
2020+ This function processes the opt_set_gtid_purged option.
2021+ This function also calls set_session_binlog() function before
2022+ setting the SET @@GLOBAL.GTID_PURGED in the output.
2023+
2024+ @param[in] mysql_con the connection to the server
2025+
2026+ @retval FALSE successful according to the value
2027+ of opt_set_gtid_purged.
2028+ @retval TRUE fail.
2029+*/
2030+
2031+static my_bool process_set_gtid_purged(MYSQL* mysql_con)
2032+{
2033+ MYSQL_RES *gtid_mode_res;
2034+ MYSQL_ROW gtid_mode_row;
2035+ char *gtid_mode_val= 0;
2036+
2037+ if (opt_set_gtid_purged_mode == SET_GTID_PURGED_OFF)
2038+ return FALSE; /* nothing to be done */
2039+
2040+
2041+ /* check if gtid_mode is ON or OFF */
2042+ if (mysql_query_with_error_report(mysql_con, &gtid_mode_res,
2043+ "SELECT @@GTID_MODE"))
2044+ return TRUE;
2045+
2046+ gtid_mode_row = mysql_fetch_row(gtid_mode_res);
2047+ gtid_mode_val = (char*)gtid_mode_row[0];
2048+
2049+ if (gtid_mode_val && strcmp(gtid_mode_val, "OFF"))
2050+ {
2051+ /*
2052+ For any gtid_mode !=OFF and irrespective of --set-gtid-purged
2053+ being AUTO or ON, add GTID_PURGED in the output.
2054+ */
2055+ if (opt_databases || !opt_alldbs || !opt_dump_triggers
2056+ || !opt_routines || !opt_events)
2057+ {
2058+ fprintf(stderr,"Warning: A partial dump from a server that has GTIDs will "
2059+ "by default include the GTIDs of all transactions, even "
2060+ "those that changed suppressed parts of the database. If "
2061+ "you don't want to restore GTIDs, pass "
2062+ "--set-gtid-purged=OFF. To make a complete dump, pass "
2063+ "--all-databases --triggers --routines --events. \n");
2064+ }
2065+
2066+ set_session_binlog(FALSE);
2067+ if (add_set_gtid_purged(mysql_con))
2068+ return TRUE;
2069+ }
2070+ else /* gtid_mode is off */
2071+ {
2072+ if (opt_set_gtid_purged_mode == SET_GTID_PURGED_ON)
2073+ {
2074+ fprintf(stderr, "Error: Server has GTIDs disabled.\n");
2075+ return TRUE;
2076+ }
2077+ }
2078+
2079+ return FALSE;
2080+}
2081+
2082+
2083 /*
2084 Getting VIEW structure
2085
2086@@ -5907,6 +6059,13 @@
2087 /* Add 'STOP SLAVE to beginning of dump */
2088 if (opt_slave_apply && add_stop_slave())
2089 goto err;
2090+
2091+
2092+ /* Process opt_set_gtid_purged and add SET @@GLOBAL.GTID_PURGED if required. */
2093+ if (process_set_gtid_purged(mysql))
2094+ goto err;
2095+
2096+
2097 if (opt_master_data && do_show_master_status(mysql))
2098 goto err;
2099 if (opt_slave_data && do_show_slave_status(mysql))
2100@@ -5942,6 +6101,12 @@
2101 if (opt_slave_data && do_start_slave_sql(mysql))
2102 goto err;
2103
2104+ /*
2105+ if --set-gtid-purged, restore binlog at the end of the session
2106+ if required.
2107+ */
2108+ set_session_binlog(TRUE);
2109+
2110 /* add 'START SLAVE' to end of dump */
2111 if (opt_slave_apply && add_slave_statements())
2112 goto err;
2113
2114=== modified file 'Percona-Server/client/mysqltest.cc'
2115--- Percona-Server/client/mysqltest.cc 2012-12-04 08:24:59 +0000
2116+++ Percona-Server/client/mysqltest.cc 2013-02-13 06:17:00 +0000
2117@@ -130,6 +130,7 @@
2118 #if !defined(HAVE_YASSL)
2119 static const char *opt_server_public_key= 0;
2120 #endif
2121+static my_bool can_handle_expired_passwords= TRUE;
2122
2123 /* Info on properties that can be set with --enable_X and --disable_X */
2124
2125@@ -1426,7 +1427,6 @@
2126 {
2127 static int dying= 0;
2128 va_list args;
2129- DBUG_ENTER("die");
2130 DBUG_PRINT("enter", ("start_lineno: %d", start_lineno));
2131
2132 /*
2133@@ -2571,6 +2571,7 @@
2134 dynstr_append_mem(&ds_res, ds_version.str, ds_version.length);
2135 dynstr_append(&ds_res, "\n");
2136 dynstr_free(&ds_version);
2137+ DBUG_VOID_RETURN;
2138 }
2139
2140 /* List of error names to error codes */
2141@@ -5314,6 +5315,8 @@
2142 mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_RESET, 0);
2143 mysql_options4(mysql, MYSQL_OPT_CONNECT_ATTR_ADD,
2144 "program_name", "mysqltest");
2145+ mysql_options(mysql, MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS,
2146+ &can_handle_expired_passwords);
2147 while(!mysql_real_connect(mysql, host,user, pass, db, port, sock,
2148 CLIENT_MULTI_STATEMENTS | CLIENT_REMEMBER_OPTIONS))
2149 {
2150@@ -5417,6 +5420,8 @@
2151
2152 mysql_options(con, MYSQL_OPT_CONNECT_ATTR_RESET, 0);
2153 mysql_options4(con, MYSQL_OPT_CONNECT_ATTR_ADD, "program_name", "mysqltest");
2154+ mysql_options(con, MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS,
2155+ &can_handle_expired_passwords);
2156 while (!mysql_real_connect(con, host, user, pass, db, port, sock ? sock: 0,
2157 CLIENT_MULTI_STATEMENTS))
2158 {
2159
2160=== modified file 'Percona-Server/client/sql_string.h'
2161--- Percona-Server/client/sql_string.h 2012-10-16 06:21:51 +0000
2162+++ Percona-Server/client/sql_string.h 2013-02-13 06:17:00 +0000
2163@@ -94,6 +94,9 @@
2164 inline const char *ptr() const { return Ptr; }
2165 inline char *c_ptr()
2166 {
2167+ DBUG_ASSERT(!alloced || !Ptr || !Alloced_length ||
2168+ (Alloced_length >= (str_length + 1)));
2169+
2170 if (!Ptr || Ptr[str_length]) /* Should be safe */
2171 (void) realloc(str_length);
2172 return Ptr;
2173
2174=== modified file 'Percona-Server/cmake/install_layout.cmake'
2175--- Percona-Server/cmake/install_layout.cmake 2012-09-21 17:15:31 +0000
2176+++ Percona-Server/cmake/install_layout.cmake 2013-02-13 06:17:00 +0000
2177@@ -104,7 +104,10 @@
2178 # just use if(INSTALL_PLUGINTESTDIR).
2179 # The plugin must set its own install path for tests
2180 #
2181-FILE(GLOB plugin_tests ${CMAKE_SOURCE_DIR}/plugin/*/tests)
2182+FILE(GLOB plugin_tests
2183+ ${CMAKE_SOURCE_DIR}/plugin/*/tests
2184+ ${CMAKE_SOURCE_DIR}/internal/plugin/*/tests
2185+)
2186
2187 #
2188 # STANDALONE layout
2189@@ -135,7 +138,7 @@
2190 #
2191 # RPM layout
2192 #
2193-# See "SPECIFIC-ULN/mysql-5.5-libdir.patch" for the differences
2194+# See "packaging/rpm-uln/mysql-5.5-libdir.patch" for the differences
2195 # which apply to RPMs in ULN (Oracle Linux), that patch file will
2196 # be applied at build time via "rpmbuild".
2197 #
2198
2199=== modified file 'Percona-Server/cmake/mysql_version.cmake'
2200--- Percona-Server/cmake/mysql_version.cmake 2012-08-22 01:40:20 +0000
2201+++ Percona-Server/cmake/mysql_version.cmake 2013-02-13 06:17:00 +0000
2202@@ -54,7 +54,7 @@
2203 ENDIF()
2204
2205 SET(VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}${EXTRA_VERSION}")
2206- MESSAGE("-- MySQL ${VERSION}")
2207+ MESSAGE(STATUS "MySQL ${VERSION}")
2208 SET(MYSQL_BASE_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}" CACHE INTERNAL "MySQL Base version")
2209 SET(MYSQL_NO_DASH_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}")
2210 # Use NDBVERSION irregardless of whether this is Cluster or not, if not
2211
2212=== modified file 'Percona-Server/cmake/package_name.cmake'
2213--- Percona-Server/cmake/package_name.cmake 2012-08-22 01:40:20 +0000
2214+++ Percona-Server/cmake/package_name.cmake 2013-02-13 06:17:00 +0000
2215@@ -122,7 +122,7 @@
2216 SET(package_name "mysql${PRODUCT_TAG}-${VERSION}-${SYSTEM_NAME_AND_PROCESSOR}")
2217 ENDIF()
2218
2219- MESSAGE("-- Packaging as: ${package_name}")
2220+ MESSAGE(STATUS "Packaging as: ${package_name}")
2221
2222 # Sometimes package suffix is added (something like "-icc-glibc23")
2223 IF(PACKAGE_SUFFIX)
2224
2225=== modified file 'Percona-Server/cmake/plugin.cmake'
2226--- Percona-Server/cmake/plugin.cmake 2011-09-21 11:01:41 +0000
2227+++ Percona-Server/cmake/plugin.cmake 2013-02-13 06:17:00 +0000
2228@@ -39,6 +39,7 @@
2229 GET_FILENAME_COMPONENT(fname ${cfile} NAME)
2230 FILE(APPEND ${CMAKE_SOURCE_DIR}/mysql-test/collections/${fname} "${contents}")
2231 FILE(APPEND ${fcopied} "${fname}\n")
2232+ MESSAGE(STATUS "Appended ${cfile}")
2233 ENDFOREACH()
2234 ENDIF()
2235 ENDMACRO()
2236
2237=== modified file 'Percona-Server/cmd-line-utils/libedit/vi.c'
2238--- Percona-Server/cmd-line-utils/libedit/vi.c 2011-10-13 19:47:46 +0000
2239+++ Percona-Server/cmd-line-utils/libedit/vi.c 2013-02-13 06:17:00 +0000
2240@@ -1028,7 +1028,8 @@
2241 close(fd);
2242 return CC_ERROR;
2243 }
2244- line = el_malloc(len * sizeof(*line));
2245+ /* XXXMYSQL: Make static analyzer happy */
2246+ line = el_malloc((len+1) * sizeof(*line));
2247 if (line == NULL) {
2248 el_free(cp);
2249 return CC_ERROR;
2250
2251=== modified file 'Percona-Server/configure.cmake'
2252--- Percona-Server/configure.cmake 2012-08-22 01:40:20 +0000
2253+++ Percona-Server/configure.cmake 2013-02-13 06:17:00 +0000
2254@@ -323,15 +323,14 @@
2255 ENDIF()
2256
2257 # Figure out threading library
2258-#
2259+# Defines CMAKE_USE_PTHREADS_INIT and CMAKE_THREAD_LIBS_INIT.
2260 FIND_PACKAGE (Threads)
2261
2262 FUNCTION(MY_CHECK_PTHREAD_ONCE_INIT)
2263 CHECK_C_COMPILER_FLAG("-Werror" HAVE_WERROR_FLAG)
2264- IF(NOT HAVE_WERROR_FLAG)
2265- RETURN()
2266+ IF(HAVE_WERROR_FLAG)
2267+ SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror")
2268 ENDIF()
2269- SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror")
2270 CHECK_C_SOURCE_COMPILES("
2271 #include <pthread.h>
2272 void foo(void) {}
2273
2274=== modified file 'Percona-Server/dbug/dbug.c'
2275--- Percona-Server/dbug/dbug.c 2012-12-04 08:24:59 +0000
2276+++ Percona-Server/dbug/dbug.c 2013-02-13 06:17:00 +0000
2277@@ -667,10 +667,11 @@
2278 /* fall through */
2279 case 'a':
2280 case 'o':
2281+ /* In case we already have an open file. */
2282+ if (!is_shared(stack, out_file))
2283+ DBUGCloseFile(cs, stack->out_file);
2284 if (sign < 0)
2285 {
2286- if (!is_shared(stack, out_file))
2287- DBUGCloseFile(cs, stack->out_file);
2288 stack->flags &= ~FLUSH_ON_WRITE;
2289 stack->out_file= stderr;
2290 break;
2291
2292=== modified file 'Percona-Server/extra/yassl/include/yassl_int.hpp'
2293--- Percona-Server/extra/yassl/include/yassl_int.hpp 2012-10-16 06:21:51 +0000
2294+++ Percona-Server/extra/yassl/include/yassl_int.hpp 2013-02-13 06:17:00 +0000
2295@@ -278,6 +278,7 @@
2296
2297 ~Sessions();
2298
2299+ friend void Session_initialize();
2300 friend Sessions& GetSessions(); // singleton creator
2301 private:
2302 Sessions(const Sessions&); // hide copy
2303
2304=== modified file 'Percona-Server/extra/yassl/src/buffer.cpp'
2305--- Percona-Server/extra/yassl/src/buffer.cpp 2012-10-16 06:21:51 +0000
2306+++ Percona-Server/extra/yassl/src/buffer.cpp 2013-02-13 06:17:00 +0000
2307@@ -23,6 +23,8 @@
2308 */
2309
2310
2311+// First include (the generated) my_config.h, to get correct platform defines.
2312+#include "my_config.h"
2313 #include <string.h> // memcpy
2314 #include "runtime.hpp"
2315 #include "buffer.hpp"
2316
2317=== modified file 'Percona-Server/extra/yassl/src/handshake.cpp'
2318--- Percona-Server/extra/yassl/src/handshake.cpp 2012-10-16 06:21:51 +0000
2319+++ Percona-Server/extra/yassl/src/handshake.cpp 2013-02-13 06:17:00 +0000
2320@@ -762,8 +762,14 @@
2321
2322 while (buffer.get_current() < hdr.length_ + RECORD_HEADER + offset) {
2323 // each message in record, can be more than 1 if not encrypted
2324- if (ssl.getSecurity().get_parms().pending_ == false) // cipher on
2325+ if (ssl.getSecurity().get_parms().pending_ == false) { // cipher on
2326+ // sanity check for malicious/corrupted/illegal input
2327+ if (buffer.get_remaining() < hdr.length_) {
2328+ ssl.SetError(bad_input);
2329+ return 0;
2330+ }
2331 decrypt_message(ssl, buffer, hdr.length_);
2332+ }
2333
2334 mySTL::auto_ptr<Message> msg(mf.CreateObject(hdr.type_));
2335 if (!msg.get()) {
2336
2337=== modified file 'Percona-Server/extra/yassl/src/yassl_int.cpp'
2338--- Percona-Server/extra/yassl/src/yassl_int.cpp 2012-10-16 06:21:51 +0000
2339+++ Percona-Server/extra/yassl/src/yassl_int.cpp 2013-02-13 06:17:00 +0000
2340@@ -17,16 +17,19 @@
2341 * draft along with type conversion functions.
2342 */
2343
2344+// First include (the generated) my_config.h, to get correct platform defines.
2345+#include "my_config.h"
2346+#ifdef __WIN__
2347+#include<Windows.h>
2348+#else
2349+#include <pthread.h>
2350+#endif
2351+
2352 #include "runtime.hpp"
2353 #include "yassl_int.hpp"
2354 #include "handshake.hpp"
2355 #include "timer.hpp"
2356
2357-#ifdef _POSIX_THREADS
2358- #include "pthread.h"
2359-#endif
2360-
2361-
2362 #ifdef HAVE_LIBZ
2363 #include "zlib.h"
2364 #endif
2365@@ -719,6 +722,58 @@
2366 }
2367 }
2368
2369+#ifdef __WIN__
2370+typedef volatile LONG yassl_pthread_once_t;
2371+#define YASSL_PTHREAD_ONCE_INIT 0
2372+#define YASSL_PTHREAD_ONCE_INPROGRESS 1
2373+#define YASSL_PTHREAD_ONCE_DONE 2
2374+
2375+int yassl_pthread_once(yassl_pthread_once_t *once_control,
2376+ void (*init_routine)(void))
2377+{
2378+ LONG state;
2379+
2380+ /*
2381+ Do "dirty" read to find out if initialization is already done, to
2382+ save an interlocked operation in common case. Memory barriers are ensured by
2383+ Visual C++ volatile implementation.
2384+ */
2385+ if (*once_control == YASSL_PTHREAD_ONCE_DONE)
2386+ return 0;
2387+
2388+ state= InterlockedCompareExchange(once_control, YASSL_PTHREAD_ONCE_INPROGRESS,
2389+ YASSL_PTHREAD_ONCE_INIT);
2390+
2391+ switch(state)
2392+ {
2393+ case YASSL_PTHREAD_ONCE_INIT:
2394+ /* This is initializer thread */
2395+ (*init_routine)();
2396+ *once_control= YASSL_PTHREAD_ONCE_DONE;
2397+ break;
2398+
2399+ case YASSL_PTHREAD_ONCE_INPROGRESS:
2400+ /* init_routine in progress. Wait for its completion */
2401+ while(*once_control == YASSL_PTHREAD_ONCE_INPROGRESS)
2402+ {
2403+ Sleep(1);
2404+ }
2405+ break;
2406+ case YASSL_PTHREAD_ONCE_DONE:
2407+ /* Nothing to do */
2408+ break;
2409+ }
2410+ return 0;
2411+}
2412+#else
2413+#define yassl_pthread_once_t pthread_once_t
2414+#if defined(PTHREAD_ONCE_INITIALIZER)
2415+#define YASSL_PTHREAD_ONCE_INIT PTHREAD_ONCE_INITIALIZER
2416+#else
2417+#define YASSL_PTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
2418+#endif
2419+#define yassl_pthread_once(C,F) pthread_once(C,F)
2420+#endif // __WIN__
2421
2422 // store peer's random
2423 void SSL::set_random(const opaque* random, ConnectionEnd sender)
2424@@ -1566,11 +1621,22 @@
2425
2426
2427 static Sessions* sessionsInstance = 0;
2428+static yassl_pthread_once_t session_created= YASSL_PTHREAD_ONCE_INIT;
2429+
2430+void Session_initialize()
2431+{
2432+ sessionsInstance = NEW_YS Sessions;
2433+}
2434+
2435+extern "C"
2436+{
2437+ static void c_session_initialize() { Session_initialize(); }
2438+}
2439+
2440
2441 Sessions& GetSessions()
2442 {
2443- if (!sessionsInstance)
2444- sessionsInstance = NEW_YS Sessions;
2445+ yassl_pthread_once(&session_created, c_session_initialize);
2446 return *sessionsInstance;
2447 }
2448
2449@@ -1826,6 +1892,8 @@
2450 }
2451
2452
2453+extern "C"
2454+{
2455 static int
2456 default_password_callback(char * buffer, int size_arg, int rwflag,
2457 void * /* unused: callback_data */)
2458@@ -1854,7 +1922,7 @@
2459 free(passwd);
2460 return passwd_len;
2461 }
2462-
2463+}
2464
2465 SSL_CTX::SSL_CTX(SSL_METHOD* meth)
2466 : method_(meth), certificate_(0), privateKey_(0),
2467
2468=== modified file 'Percona-Server/include/errmsg.h'
2469--- Percona-Server/include/errmsg.h 2012-08-22 01:40:20 +0000
2470+++ Percona-Server/include/errmsg.h 2013-02-13 06:17:00 +0000
2471@@ -103,7 +103,8 @@
2472 #define CR_ALREADY_CONNECTED 2058
2473 #define CR_AUTH_PLUGIN_CANNOT_LOAD 2059
2474 #define CR_DUPLICATE_CONNECTION_ATTR 2060
2475-#define CR_ERROR_LAST /*Copy last error nr:*/ 2060
2476+#define CR_AUTH_PLUGIN_ERR 2061
2477+#define CR_ERROR_LAST /*Copy last error nr:*/ 2061
2478 /* Add error numbers before CR_ERROR_LAST and change it accordingly. */
2479
2480 #endif /* ERRMSG_INCLUDED */
2481
2482=== modified file 'Percona-Server/include/m_ctype.h'
2483--- Percona-Server/include/m_ctype.h 2012-08-22 01:40:20 +0000
2484+++ Percona-Server/include/m_ctype.h 2013-02-13 06:17:00 +0000
2485@@ -263,6 +263,8 @@
2486 } MY_CHARSET_LOADER;
2487
2488
2489+extern int (*my_string_stack_guard)(int);
2490+
2491 /* See strings/CHARSET_INFO.txt for information about this structure */
2492 typedef struct my_collation_handler_st
2493 {
2494
2495=== modified file 'Percona-Server/include/my_atomic.h'
2496--- Percona-Server/include/my_atomic.h 2011-06-30 15:46:53 +0000
2497+++ Percona-Server/include/my_atomic.h 2013-02-13 06:17:00 +0000
2498@@ -280,7 +280,9 @@
2499
2500 #define MY_ATOMIC_OK 0
2501 #define MY_ATOMIC_NOT_1CPU 1
2502+C_MODE_START
2503 extern int my_atomic_initialize();
2504+C_MODE_END
2505
2506 #endif
2507
2508
2509=== modified file 'Percona-Server/include/my_base.h'
2510--- Percona-Server/include/my_base.h 2012-10-16 06:21:51 +0000
2511+++ Percona-Server/include/my_base.h 2013-02-13 06:17:00 +0000
2512@@ -477,7 +477,8 @@
2513 #define HA_FTS_INVALID_DOCID 182 /* Invalid InnoDB Doc ID */
2514 #define HA_ERR_TABLE_IN_FK_CHECK 183 /* Table being used in foreign key check */
2515 #define HA_ERR_TABLESPACE_EXISTS 184 /* The tablespace existed in storage engine */
2516-#define HA_ERR_LAST 184 /* Copy of last error nr */
2517+#define HA_ERR_TOO_MANY_FIELDS 185 /* Table has too many columns */
2518+#define HA_ERR_LAST 185 /* Copy of last error nr */
2519
2520 /* Number of different errors */
2521 #define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)
2522
2523=== modified file 'Percona-Server/include/my_getopt.h'
2524--- Percona-Server/include/my_getopt.h 2012-08-31 20:51:54 +0000
2525+++ Percona-Server/include/my_getopt.h 2013-02-13 06:17:00 +0000
2526@@ -109,6 +109,11 @@
2527
2528 extern int handle_options (int *argc, char ***argv,
2529 const struct my_option *longopts, my_get_one_option);
2530+extern int my_handle_options (int *argc, char ***argv,
2531+ const struct my_option *longopts,
2532+ my_get_one_option,
2533+ const char **command_list);
2534+extern void my_cleanup_options(const struct my_option *options);
2535 extern void my_cleanup_options(const struct my_option *options);
2536 extern void my_print_help(const struct my_option *options);
2537 extern void my_print_variables(const struct my_option *options);
2538
2539=== modified file 'Percona-Server/include/my_pthread.h'
2540--- Percona-Server/include/my_pthread.h 2012-08-22 01:40:20 +0000
2541+++ Percona-Server/include/my_pthread.h 2013-02-13 06:17:00 +0000
2542@@ -462,14 +462,12 @@
2543 #ifdef HAVE_TIMESPEC_TS_SEC
2544 #ifndef diff_timespec
2545 #define diff_timespec(TS1, TS2) \
2546- (((TS1.ts_sec * 1000000000) + TS1.ts_nsec) - \
2547- ((TS2.ts_sec * 1000000000) + TS2.ts_nsec))
2548+ ((TS1.ts_sec - TS2.ts_sec) * 1000000000ULL + TS1.ts_nsec - TS2.ts_nsec)
2549 #endif /* !diff_timespec */
2550 #else
2551 #ifndef diff_timespec
2552 #define diff_timespec(TS1, TS2) \
2553- (((TS1.tv_sec * 1000000000) + TS1.tv_nsec) - \
2554- ((TS2.tv_sec * 1000000000) + TS2.tv_nsec))
2555+ ((TS1.tv_sec - TS2.tv_sec) * 1000000000ULL + TS1.tv_nsec - TS2.tv_nsec)
2556 #endif /* !diff_timespec */
2557 #endif /* HAVE_TIMESPEC_TS_SEC */
2558
2559
2560=== modified file 'Percona-Server/include/my_sys.h'
2561--- Percona-Server/include/my_sys.h 2013-01-21 13:20:09 +0000
2562+++ Percona-Server/include/my_sys.h 2013-02-13 06:17:00 +0000
2563@@ -159,6 +159,22 @@
2564 extern char *my_strdup(const char *from,myf MyFlags);
2565 extern char *my_strndup(const char *from, size_t length,
2566 myf MyFlags);
2567+
2568+/*
2569+ Switch to my_malloc() if the memory block to be allocated is bigger than
2570+ max_alloca_sz.
2571+*/
2572+#ifndef HAVE_ALLOCA
2573+#define my_safe_alloca(size, max_alloca_sz) my_alloca(size)
2574+#define my_safe_afree(ptr, size, max_alloca_sz) my_afree(ptr)
2575+#else
2576+#define my_safe_alloca(size, max_alloca_sz) ((size <= max_alloca_sz) ? \
2577+ my_alloca(size) : \
2578+ my_malloc(size, MYF(0)))
2579+#define my_safe_afree(ptr, size, max_alloca_sz) if (size > max_alloca_sz) \
2580+ my_free(ptr)
2581+#endif /* #ifndef HAVE_ALLOCA */
2582+
2583 #if !defined(DBUG_OFF) || defined(HAVE_VALGRIND)
2584 /**
2585 Put bad content in memory to be sure it will segfault if dereferenced.
2586@@ -616,6 +632,13 @@
2587 extern int check_if_legal_filename(const char *path);
2588 extern int check_if_legal_tablename(const char *path);
2589
2590+#ifdef __WIN__
2591+extern my_bool is_filename_allowed(const char *name, size_t length,
2592+ my_bool allow_current_dir);
2593+#else /* __WIN__ */
2594+# define is_filename_allowed(name, length, allow_cwd) (TRUE)
2595+#endif /* __WIN__ */
2596+
2597 #ifdef _WIN32
2598 extern int nt_share_delete(const char *name,myf MyFlags);
2599 #define my_delete_allow_opened(fname,flags) nt_share_delete((fname),(flags))
2600@@ -687,7 +710,7 @@
2601 extern size_t strlength(const char *str);
2602 extern void pack_dirname(char * to,const char *from);
2603 extern size_t normalize_dirname(char * to, const char *from);
2604-extern size_t unpack_dirname(char * to,const char *from);
2605+extern size_t unpack_dirname(char * to,const char *from, my_bool *is_symdir);
2606 extern size_t cleanup_dirname(char * to,const char *from);
2607 extern size_t system_filename(char * to,const char *from);
2608 extern size_t unpack_filename(char * to,const char *from);
2609@@ -758,7 +781,8 @@
2610 extern void my_b_seek(IO_CACHE *info,my_off_t pos);
2611 extern size_t my_b_gets(IO_CACHE *info, char *to, size_t max_length);
2612 extern my_off_t my_b_filelength(IO_CACHE *info);
2613-extern size_t my_b_printf(IO_CACHE *info, const char* fmt, ...);
2614+extern size_t my_b_printf(IO_CACHE *info, const char* fmt, ...)
2615+ ATTRIBUTE_FORMAT(printf, 2, 3);
2616 extern size_t my_b_vprintf(IO_CACHE *info, const char* fmt, va_list ap);
2617 extern my_bool open_cached_file(IO_CACHE *cache,const char *dir,
2618 const char *prefix, size_t cache_size,
2619
2620=== modified file 'Percona-Server/include/mysql.h'
2621--- Percona-Server/include/mysql.h 2012-10-16 06:21:51 +0000
2622+++ Percona-Server/include/mysql.h 2013-02-13 06:17:00 +0000
2623@@ -174,7 +174,8 @@
2624 MYSQL_OPT_CONNECT_ATTR_RESET, MYSQL_OPT_CONNECT_ATTR_ADD,
2625 MYSQL_OPT_CONNECT_ATTR_DELETE,
2626 MYSQL_SERVER_PUBLIC_KEY,
2627- MYSQL_ENABLE_CLEARTEXT_PLUGIN
2628+ MYSQL_ENABLE_CLEARTEXT_PLUGIN,
2629+ MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS
2630 };
2631
2632 /**
2633
2634=== modified file 'Percona-Server/include/mysql.h.pp'
2635--- Percona-Server/include/mysql.h.pp 2012-10-16 06:21:51 +0000
2636+++ Percona-Server/include/mysql.h.pp 2013-02-13 06:17:00 +0000
2637@@ -271,7 +271,8 @@
2638 MYSQL_OPT_CONNECT_ATTR_RESET, MYSQL_OPT_CONNECT_ATTR_ADD,
2639 MYSQL_OPT_CONNECT_ATTR_DELETE,
2640 MYSQL_SERVER_PUBLIC_KEY,
2641- MYSQL_ENABLE_CLEARTEXT_PLUGIN
2642+ MYSQL_ENABLE_CLEARTEXT_PLUGIN,
2643+ MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS
2644 };
2645 struct st_mysql_options_extention;
2646 struct st_mysql_options {
2647
2648=== modified file 'Percona-Server/include/mysql/plugin.h'
2649--- Percona-Server/include/mysql/plugin.h 2012-08-22 01:40:20 +0000
2650+++ Percona-Server/include/mysql/plugin.h 2013-02-13 06:17:00 +0000
2651@@ -497,7 +497,7 @@
2652 /*
2653 API for Replication plugin. (MYSQL_REPLICATION_PLUGIN)
2654 */
2655- #define MYSQL_REPLICATION_INTERFACE_VERSION 0x0100
2656+ #define MYSQL_REPLICATION_INTERFACE_VERSION 0x0200
2657
2658 /**
2659 Replication plugin descriptor
2660
2661=== modified file 'Percona-Server/include/mysql/psi/psi.h'
2662--- Percona-Server/include/mysql/psi/psi.h 2012-10-16 06:21:51 +0000
2663+++ Percona-Server/include/mysql/psi/psi.h 2013-02-13 06:17:00 +0000
2664@@ -975,6 +975,9 @@
2665 };
2666 typedef struct PSI_digest_locker_state PSI_digest_locker_state;
2667
2668+/* Duplicate of NAME_LEN, to avoid dependency on mysql_com.h */
2669+#define PSI_SCHEMA_NAME_LEN (64 * 3)
2670+
2671 /**
2672 State data storage for @c get_thread_statement_locker_v1_t,
2673 @c get_thread_statement_locker_v1_t.
2674@@ -1035,6 +1038,10 @@
2675 ulong m_sort_scan;
2676 /** Statement digest. */
2677 PSI_digest_locker_state m_digest_state;
2678+ /** Current schema name. */
2679+ char m_schema_name[PSI_SCHEMA_NAME_LEN];
2680+ /** Length in bytes of @c m_schema_name. */
2681+ uint m_schema_name_length;
2682 };
2683
2684 /**
2685@@ -1299,7 +1306,7 @@
2686 @return an instrumented thread
2687 */
2688 typedef struct PSI_thread* (*new_thread_v1_t)
2689- (PSI_thread_key key, const void *identity, ulong thread_id);
2690+ (PSI_thread_key key, const void *identity, ulonglong thread_id);
2691
2692 /**
2693 Assign an id to an instrumented thread.
2694@@ -1307,7 +1314,7 @@
2695 @param id the id to assign
2696 */
2697 typedef void (*set_thread_id_v1_t)(struct PSI_thread *thread,
2698- unsigned long id);
2699+ ulonglong id);
2700
2701 /**
2702 Get the instrumentation for the running thread.
2703
2704=== modified file 'Percona-Server/include/mysql/psi/psi_abi_v1.h.pp'
2705--- Percona-Server/include/mysql/psi/psi_abi_v1.h.pp 2012-10-16 06:21:51 +0000
2706+++ Percona-Server/include/mysql/psi/psi_abi_v1.h.pp 2013-02-13 06:17:00 +0000
2707@@ -281,6 +281,8 @@
2708 ulong m_sort_rows;
2709 ulong m_sort_scan;
2710 PSI_digest_locker_state m_digest_state;
2711+ char m_schema_name[(64 * 3)];
2712+ uint m_schema_name_length;
2713 };
2714 struct PSI_socket_locker_state_v1
2715 {
2716@@ -344,9 +346,9 @@
2717 const pthread_attr_t *attr,
2718 void *(*start_routine)(void*), void *arg);
2719 typedef struct PSI_thread* (*new_thread_v1_t)
2720- (PSI_thread_key key, const void *identity, ulong thread_id);
2721+ (PSI_thread_key key, const void *identity, ulonglong thread_id);
2722 typedef void (*set_thread_id_v1_t)(struct PSI_thread *thread,
2723- unsigned long id);
2724+ ulonglong id);
2725 typedef struct PSI_thread* (*get_thread_v1_t)(void);
2726 typedef void (*set_thread_user_v1_t)(const char *user, int user_len);
2727 typedef void (*set_thread_user_host_v1_t)(const char *user, int user_len,
2728
2729=== modified file 'Percona-Server/include/mysql/thread_pool_priv.h'
2730--- Percona-Server/include/mysql/thread_pool_priv.h 2012-10-16 06:21:51 +0000
2731+++ Percona-Server/include/mysql/thread_pool_priv.h 2013-02-13 06:17:00 +0000
2732@@ -62,6 +62,7 @@
2733 void thd_set_mysys_var(THD *thd, st_my_thread_var *mysys_var);
2734 ulong thd_get_net_wait_timeout(THD *thd);
2735 my_socket thd_get_fd(THD *thd);
2736+int thd_store_globals(THD* thd);
2737
2738 /* Interface to global thread list iterator functions */
2739 Thread_iterator thd_get_global_thread_list_begin();
2740
2741=== modified file 'Percona-Server/include/mysql_com.h'
2742--- Percona-Server/include/mysql_com.h 2012-10-16 06:21:51 +0000
2743+++ Percona-Server/include/mysql_com.h 2013-02-13 06:17:00 +0000
2744@@ -180,6 +180,9 @@
2745 /* Enable authentication response packet to be larger than 255 bytes. */
2746 #define CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA (1UL << 21)
2747
2748+/* Don't close the connection for a connection with expired password. */
2749+#define CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS (1UL << 22)
2750+
2751 #define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30)
2752 #define CLIENT_REMEMBER_OPTIONS (1UL << 31)
2753
2754@@ -190,30 +193,32 @@
2755 #endif
2756
2757 /* Gather all possible capabilites (flags) supported by the server */
2758-#define CLIENT_ALL_FLAGS (CLIENT_LONG_PASSWORD | \
2759- CLIENT_FOUND_ROWS | \
2760- CLIENT_LONG_FLAG | \
2761- CLIENT_CONNECT_WITH_DB | \
2762- CLIENT_NO_SCHEMA | \
2763- CLIENT_COMPRESS | \
2764- CLIENT_ODBC | \
2765- CLIENT_LOCAL_FILES | \
2766- CLIENT_IGNORE_SPACE | \
2767- CLIENT_PROTOCOL_41 | \
2768- CLIENT_INTERACTIVE | \
2769- CLIENT_SSL | \
2770- CLIENT_IGNORE_SIGPIPE | \
2771- CLIENT_TRANSACTIONS | \
2772- CLIENT_RESERVED | \
2773- CLIENT_SECURE_CONNECTION | \
2774- CLIENT_MULTI_STATEMENTS | \
2775- CLIENT_MULTI_RESULTS | \
2776- CLIENT_PS_MULTI_RESULTS | \
2777- CLIENT_SSL_VERIFY_SERVER_CERT | \
2778- CLIENT_REMEMBER_OPTIONS | \
2779- CLIENT_PLUGIN_AUTH | \
2780- CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA | \
2781- CLIENT_CONNECT_ATTRS)
2782+#define CLIENT_ALL_FLAGS (CLIENT_LONG_PASSWORD \
2783+ | CLIENT_FOUND_ROWS \
2784+ | CLIENT_LONG_FLAG \
2785+ | CLIENT_CONNECT_WITH_DB \
2786+ | CLIENT_NO_SCHEMA \
2787+ | CLIENT_COMPRESS \
2788+ | CLIENT_ODBC \
2789+ | CLIENT_LOCAL_FILES \
2790+ | CLIENT_IGNORE_SPACE \
2791+ | CLIENT_PROTOCOL_41 \
2792+ | CLIENT_INTERACTIVE \
2793+ | CLIENT_SSL \
2794+ | CLIENT_IGNORE_SIGPIPE \
2795+ | CLIENT_TRANSACTIONS \
2796+ | CLIENT_RESERVED \
2797+ | CLIENT_SECURE_CONNECTION \
2798+ | CLIENT_MULTI_STATEMENTS \
2799+ | CLIENT_MULTI_RESULTS \
2800+ | CLIENT_PS_MULTI_RESULTS \
2801+ | CLIENT_SSL_VERIFY_SERVER_CERT \
2802+ | CLIENT_REMEMBER_OPTIONS \
2803+ | CLIENT_PLUGIN_AUTH \
2804+ | CLIENT_CONNECT_ATTRS \
2805+ | CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA \
2806+ | CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS \
2807+)
2808
2809 /*
2810 Switch off the flags that are optional and depending on build flags
2811
2812=== modified file 'Percona-Server/include/welcome_copyright_notice.h'
2813--- Percona-Server/include/welcome_copyright_notice.h 2012-08-07 13:56:51 +0000
2814+++ Percona-Server/include/welcome_copyright_notice.h 2013-02-13 06:17:00 +0000
2815@@ -16,7 +16,7 @@
2816 #ifndef _welcome_copyright_notice_h_
2817 #define _welcome_copyright_notice_h_
2818
2819-#define COPYRIGHT_NOTICE_CURRENT_YEAR "2012"
2820+#define COPYRIGHT_NOTICE_CURRENT_YEAR "2013"
2821
2822 /*
2823 This define specifies copyright notice which is displayed by every MySQL
2824
2825=== modified file 'Percona-Server/libmysql/errmsg.c'
2826--- Percona-Server/libmysql/errmsg.c 2011-09-07 10:08:09 +0000
2827+++ Percona-Server/libmysql/errmsg.c 2013-02-13 06:17:00 +0000
2828@@ -85,6 +85,8 @@
2829 "The number of columns in the result set differs from the number of bound buffers. You must reset the statement, rebind the result set columns, and execute the statement again",
2830 "This handle is already connected. Use a separate handle for each connection.",
2831 "Authentication plugin '%s' cannot be loaded: %s",
2832+ "There is an attribute with the same name already",
2833+ "Authentication plugin '%s' reported error: %s",
2834 ""
2835 };
2836
2837
2838=== modified file 'Percona-Server/libmysql/libmysql.c'
2839--- Percona-Server/libmysql/libmysql.c 2012-06-29 14:03:28 +0000
2840+++ Percona-Server/libmysql/libmysql.c 2013-02-13 06:17:00 +0000
2841@@ -912,6 +912,16 @@
2842 {
2843 uchar buff[4];
2844 DBUG_ENTER("mysql_kill");
2845+ /*
2846+ Sanity check: if ulong is 64-bits, user can submit a PID here that
2847+ overflows our 32-bit parameter to the somewhat obsolete COM_PROCESS_KILL.
2848+ If this is the case, we'll flag an error here.
2849+ The SQL statement KILL CONNECTION is the safer option here.
2850+ There is an analog of this failsafe in the server as we might see old
2851+ libmysql connection to a new server as well as the other way around.
2852+ */
2853+ if (pid & (~0xfffffffful))
2854+ DBUG_RETURN(CR_INVALID_CONN_HANDLE);
2855 int4store(buff,pid);
2856 DBUG_RETURN(simple_command(mysql,COM_PROCESS_KILL,buff,sizeof(buff),0));
2857 }
2858@@ -1059,6 +1069,12 @@
2859
2860 ulong STDCALL mysql_thread_id(MYSQL *mysql)
2861 {
2862+ /*
2863+ ulong may be 64-bit, but we currently only transmit 32-bit.
2864+ mysql_thread_id() is usually used in conjunction with mysql_kill()
2865+ which is similarly limited (and obsolete).
2866+ SELECTION CONNECTION_ID() / KILL CONNECTION avoid this issue.
2867+ */
2868 return (mysql)->thread_id;
2869 }
2870
2871@@ -4050,6 +4066,7 @@
2872 stmt->bind was initialized in mysql_stmt_prepare
2873 stmt->bind overlaps with bind if mysql_stmt_bind_param
2874 is called from mysql_stmt_store_result.
2875+ BEWARE of buffer overwrite ...
2876 */
2877
2878 if (stmt->bind != my_bind)
2879@@ -4222,7 +4239,7 @@
2880 if ((int) stmt->state < (int) MYSQL_STMT_FETCH_DONE)
2881 {
2882 set_stmt_error(stmt, CR_NO_DATA, unknown_sqlstate, NULL);
2883- return 1;
2884+ DBUG_RETURN(1);
2885 }
2886 if (column >= stmt->field_count)
2887 {
2888
2889=== modified file 'Percona-Server/libmysqld/lib_sql.cc'
2890--- Percona-Server/libmysqld/lib_sql.cc 2012-10-16 06:21:51 +0000
2891+++ Percona-Server/libmysqld/lib_sql.cc 2013-02-13 06:17:00 +0000
2892@@ -626,6 +626,9 @@
2893 init_max_user_conn();
2894 init_update_queries();
2895
2896+ if (!opt_bootstrap)
2897+ servers_init(0);
2898+
2899 #ifdef HAVE_DLOPEN
2900 #ifndef NO_EMBEDDED_ACCESS_CHECKS
2901 if (!opt_noacl)
2902
2903=== modified file 'Percona-Server/mysql-test/CMakeLists.txt'
2904--- Percona-Server/mysql-test/CMakeLists.txt 2012-02-16 09:51:14 +0000
2905+++ Percona-Server/mysql-test/CMakeLists.txt 2013-02-13 06:17:00 +0000
2906@@ -1,4 +1,4 @@
2907-# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
2908+# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
2909 #
2910 # This program is free software; you can redistribute it and/or modify
2911 # it under the terms of the GNU General Public License as published by
2912@@ -113,8 +113,10 @@
2913 FILE(GLOB infiles "collections/*.in")
2914 FOREACH(collin ${infiles})
2915 STRING(REPLACE ".in" "" collection ${collin})
2916+ STRING(REPLACE ".in" ".done" colldone ${collin})
2917 # Only generate file once
2918- IF(NOT EXISTS ${collection})
2919+ IF(NOT EXISTS ${colldone})
2920 PROCESS_COLLECTION_INCLUDE(${collin} ${collection})
2921+ FILE(APPEND ${colldone} "${collin}\n")
2922 ENDIF()
2923 ENDFOREACH()
2924
2925=== modified file 'Percona-Server/mysql-test/collections/default.daily'
2926--- Percona-Server/mysql-test/collections/default.daily 2012-12-04 08:24:59 +0000
2927+++ Percona-Server/mysql-test/collections/default.daily 2013-02-13 06:17:00 +0000
2928@@ -1,6 +1,6 @@
2929 # Default suites in modes normal(which includes binlog format stmt/mixed/row, parts), embedded and ps-protocol
2930 # Adding "--big-test" option to the default suite, normal(which includes binlog format stmt/mixed/row, parts), embedded and ps-protocol
2931-perl mysql-test-run.pl --force --timer --big-test --testcase-timeout=90 --debug-server --parallel=auto --experimental=collections/default.experimental --comment=normal-debug-big --vardir=var-normal-debug-big --report-features --skip-test-list=collections/disabled-daily.list --unit-tests
2932+perl mysql-test-run.pl --force --timer --big-test --testcase-timeout=90 --debug-server --parallel=auto --experimental=collections/default.experimental --comment=normal-debug-big --vardir=var-normal-debug-big --report-features --skip-test-list=collections/disabled-daily.list
2933 perl mysql-test-run.pl --force --timer --big-test --testcase-timeout=60 --debug-server --parallel=auto --experimental=collections/default.experimental --comment=embedded-debug-big --vardir=var-embedded-debug-big --embedded
2934 perl mysql-test-run.pl --force --timer --big-test --testcase-timeout=60 --debug-server --parallel=auto --experimental=collections/default.experimental --comment=ps-debug-big --vardir=var-ps-debug-big --ps-protocol --skip-test-list=collections/disabled-daily.list
2935 # Run the suites that are not part of the default - funcs_2, stress, jp, nist
2936@@ -16,11 +16,11 @@
2937 perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=rpl_crash_safe_master-debug --vardir=var-rpl_crash_safe_master-debug --suite=rpl --mysqld=--master-info-repository=TABLE --skip-test-list=collections/disabled-daily.list
2938
2939 # Additional modes for rpl. Multi-Threaded Slave
2940-perl mysql-test-run.pl --timer --debug-server --force --parallel=auto --comment=rpl_MTS-debug --vardir=var-mts-rpl-debug --experimental=collections/default.experimental --skip-ndb --unit-tests --mysqld=--slave-parallel-workers=4 --mysqld=--slave-transaction-retries=0 --suite=rpl
2941+perl mysql-test-run.pl --timer --debug-server --force --parallel=auto --comment=rpl_MTS-debug --vardir=var-mts-rpl-debug --experimental=collections/default.experimental --mysqld=--slave-parallel-workers=4 --mysqld=--slave-transaction-retries=0 --suite=rpl
2942
2943 # Additional runs for innodb-page-size=4k and 8k
2944-perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=n_mix_4k_size --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list --mysqld=--innodb-page-size=4k --skip-test=innodb_ignore_builtin
2945-perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=n_mix_8k_size --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list --mysqld=--innodb-page-size=8k --skip-test=innodb_ignore_builtin
2946+perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=n_mix_4k_size --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-test-list=collections/disabled-per-push.list --mysqld=--innodb-page-size=4k --skip-test=innodb_ignore_builtin
2947+perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=n_mix_8k_size --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-test-list=collections/disabled-per-push.list --mysqld=--innodb-page-size=8k --skip-test=innodb_ignore_builtin
2948
2949 #Engine independent tests
2950 perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-row-tests-myisam-engine-debug --experimental=collections/default.experimental --vardir=var-binlog-row-eits-tests-myisam-engine-debug --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=myisam --do-test=rpl --mysqld=--binlog-format=row --skip-test-list=collections/disabled-daily.list
2951@@ -31,5 +31,5 @@
2952 perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-tests-innodb-engine-debug --experimental=collections/default.experimental --vardir=var-stmt-eits-tests-innodb-engine-debug --suite=engines/iuds,engines/funcs --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --skip-test-list=collections/disabled-daily.list
2953
2954 #Memcached tests
2955-perl mysql-test-run.pl --timer --force --debug-server --comment=memcached-debug --vardir=var-debug-memcached --experimental=collections/default.experimental --skip-ndb --parallel=1 --retry=0 --suite=memcached --mysqld=--innodb-page-size=4k --skip-test-list=collections/disabled-daily.list
2956+perl mysql-test-run.pl --timer --force --debug-server --comment=memcached-debug --vardir=var-debug-memcached --experimental=collections/default.experimental --parallel=1 --retry=0 --suite=memcached --mysqld=--innodb-page-size=4k --skip-test-list=collections/disabled-daily.list
2957
2958
2959=== modified file 'Percona-Server/mysql-test/collections/default.experimental'
2960--- Percona-Server/mysql-test/collections/default.experimental 2012-12-04 08:24:59 +0000
2961+++ Percona-Server/mysql-test/collections/default.experimental 2013-02-13 06:17:00 +0000
2962@@ -18,13 +18,7 @@
2963 rpl.rpl_innodb_bug28430 # Bug#11754425
2964 rpl.rpl_show_slave_running # BUG#12346048 2011-04-11 sven fails sporadically on pb2
2965 rpl.rpl_parallel_switch_sequential # BUG#13626976 2012-02-07 dlenev Fails sporadically on pb2
2966-rpl.rpl_report_port # BUG#13812374 2012-05-10 Hemant Fails after the post fix for bug#13812374
2967
2968-# BUG #59055 : All ndb tests should be removed from the repository
2969-# Leaving the sys_vars tests for now. sys_vars.all_vars.test fails on removing ndb tests
2970-sys_vars.ndb_log_update_as_write_basic
2971-sys_vars.have_ndbcluster_basic
2972-sys_vars.ndb_log_updated_only_basic
2973 sys_vars.rpl_init_slave_func # Bug#12535301 2011-05-09 andrei sys_vars.rpl_init_slave_func mismatches in daily-5.5
2974
2975 rpl.rpl_mixed_mts_rec_crash_safe @solaris # Bug#12902514 2011-08-19 andrei mts recovery tests are slow
2976
2977=== modified file 'Percona-Server/mysql-test/collections/default.push'
2978--- Percona-Server/mysql-test/collections/default.push 2012-10-16 06:21:51 +0000
2979+++ Percona-Server/mysql-test/collections/default.push 2013-02-13 06:17:00 +0000
2980@@ -1,5 +1,5 @@
2981-perl mysql-test-run.pl --timer --debug-server --force --parallel=auto --comment=n_mix-debug --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list --unit-tests
2982-perl mysql-test-run.pl --timer --debug-server --force --parallel=auto --comment=main_ps_row-debug --vardir=var-main-ps_row --suite=main --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
2983-perl mysql-test-run.pl --timer --debug-server --force --parallel=auto --comment=main_embedded-debug --vardir=var-main_emebbed --suite=main --embedded --experimental=collections/default.experimental --skip-ndb
2984-perl mysql-test-run.pl --timer --debug-server --force --parallel=auto --comment=innodb_4k_size-debug --vardir=var-innodb-4k --experimental=collections/default.experimental --skip-ndb --suite=innodb --mysqld=--innodb-page-size=4k
2985-perl mysql-test-run.pl --timer --debug-server --force --parallel=auto --comment=rpl_binlog_n_mix_MTS-debug --vardir=var-mts-rpl-binlog-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-ndb --unit-tests --mysqld=--slave-parallel-workers=4 --mysqld=--slave-transaction-retries=0 --suite=rpl
2986+perl mysql-test-run.pl --timer --debug-server --force --parallel=auto --comment=n_mix-debug --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-test-list=collections/disabled-per-push.list
2987+perl mysql-test-run.pl --timer --debug-server --force --parallel=auto --comment=main_ps_row-debug --vardir=var-main-ps_row --suite=main --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-test-list=collections/disabled-per-push.list
2988+perl mysql-test-run.pl --timer --debug-server --force --parallel=auto --comment=main_embedded-debug --vardir=var-main_emebbed --suite=main --embedded --experimental=collections/default.experimental
2989+perl mysql-test-run.pl --timer --debug-server --force --parallel=auto --comment=innodb_4k_size-debug --vardir=var-innodb-4k --experimental=collections/default.experimental --suite=innodb --mysqld=--innodb-page-size=4k
2990+perl mysql-test-run.pl --timer --debug-server --force --parallel=auto --comment=rpl_binlog_n_mix_MTS-debug --vardir=var-mts-rpl-binlog-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --mysqld=--slave-parallel-workers=4 --mysqld=--slave-transaction-retries=0 --suite=rpl
2991
2992=== modified file 'Percona-Server/mysql-test/collections/default.release.in'
2993--- Percona-Server/mysql-test/collections/default.release.in 2012-08-22 01:40:20 +0000
2994+++ Percona-Server/mysql-test/collections/default.release.in 2013-02-13 06:17:00 +0000
2995@@ -4,15 +4,15 @@
2996 # include default.daily
2997 # include default.weekly
2998
2999-perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=debug --vardir=var-debug --skip-ndbcluster --skip-rpl --report-features --debug-server
3000-perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=normal --vardir=var-normal --skip-ndbcluster --report-features
3001-perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=ps --vardir=var-ps --skip-ndbcluster --ps-protocol
3002+perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=debug --vardir=var-debug --skip-rpl --report-features --debug-server
3003+perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=normal --vardir=var-normal --report-features
3004+perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=ps --vardir=var-ps --ps-protocol
3005 perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=funcs1+ps --vardir=var-funcs_1_ps --suite=funcs_1 --ps-protocol
3006 perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=funcs2 --vardir=var-funcs2 --suite=funcs_2
3007 perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=partitions --vardir=var-parts --suite=parts
3008 perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=stress --vardir=var-stress --suite=stress
3009 perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=jp --vardir=var-jp --suite=jp
3010-perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=embedded --vardir=var-embedded --embedded-server --skip-rpl --skip-ndbcluster
3011+perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=embedded --vardir=var-embedded --embedded-server --skip-rpl
3012 perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=nist --vardir=var-nist --suite=nist
3013 perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=nist+ps --vardir=var-nist_ps --suite=nist --ps-protocol
3014-perl mysql-test-run.pl --timer --force --comment=memcached --vardir=var-memcached --experimental=collections/default.experimental --skip-ndb --parallel=auto --retry=0 --suite=memcached --mysqld=--innodb-page-size=4k
3015+perl mysql-test-run.pl --timer --force --comment=memcached --vardir=var-memcached --experimental=collections/default.experimental --parallel=auto --retry=0 --suite=memcached --mysqld=--innodb-page-size=4k
3016
3017=== modified file 'Percona-Server/mysql-test/collections/default.weekly'
3018--- Percona-Server/mysql-test/collections/default.weekly 2012-12-04 08:24:59 +0000
3019+++ Percona-Server/mysql-test/collections/default.weekly 2013-02-13 06:17:00 +0000
3020@@ -11,7 +11,7 @@
3021 # Repeat daily run
3022 # big-test option for normal runs
3023 # Default suites (in modes binlog format stmt/mixed/row, parts), embedded and ps-protocol
3024-perl mysql-test-run.pl --force --timer --big-test --testcase-timeout=90 --debug-server --parallel=auto --experimental=collections/default.experimental --comment=normal-debug-big --vardir=var-normal-debug-big --report-features --skip-test-list=collections/disabled-daily.list --unit-tests --mysqld=--innodb_autoextend_increment=64
3025+perl mysql-test-run.pl --force --timer --big-test --testcase-timeout=90 --debug-server --parallel=auto --experimental=collections/default.experimental --comment=normal-debug-big --vardir=var-normal-debug-big --report-features --skip-test-list=collections/disabled-daily.list --mysqld=--innodb_autoextend_increment=64
3026 perl mysql-test-run.pl --force --timer --big-test --testcase-timeout=60 --debug-server --parallel=auto --experimental=collections/default.experimental --comment=embedded-debug-big --vardir=var-embedded-debug-big --embedded
3027 perl mysql-test-run.pl --force --timer --big-test --testcase-timeout=90 --debug-server --parallel=auto --experimental=collections/default.experimental --comment=ps-debug-big --vardir=var-ps-debug-big --ps-protocol --skip-test-list=collections/disabled-daily.list
3028
3029@@ -39,28 +39,28 @@
3030 perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-mixed-tests-innodb-engine-debug --experimental=collections/default.experimental --vardir=var-binlog-mixed-eits-tests-innodb-engine-debug --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=mixed --skip-test-list=collections/disabled-weekly.list
3031
3032 #Memcached tests
3033-perl mysql-test-run.pl --timer --force --debug-server --comment=memcached-debug --vardir=var-debug-memcached --experimental=collections/default.experimental --skip-ndb --parallel=1 --retry=0 --suite=memcached --skip-test-list=collections/disabled-weekly.list
3034+perl mysql-test-run.pl --timer --force --debug-server --comment=memcached-debug --vardir=var-debug-memcached --experimental=collections/default.experimental --parallel=1 --retry=0 --suite=memcached --skip-test-list=collections/disabled-weekly.list
3035
3036 # Non debug runs of default suites in normal and embedded modes
3037-perl mysql-test-run.pl --force --debug-server --timer --parallel=auto --experimental=collections/default.experimental --comment=normal-non-debug --vardir=var-normal-non-debug --report-features --skip-test-list=collections/disabled-daily.list --unit-tests
3038+perl mysql-test-run.pl --force --debug-server --timer --parallel=auto --experimental=collections/default.experimental --comment=normal-non-debug --vardir=var-normal-non-debug --report-features --skip-test-list=collections/disabled-daily.list
3039 perl mysql-test-run.pl --force --debug-server --timer --parallel=auto --experimental=collections/default.experimental --comment=embedded-non-debug --vardir=var-embedded-non-debug --embedded
3040
3041
3042
3043 # Multi-Thread Slave
3044-perl mysql-test-run.pl --timer --force --big-test --testcase-timeout=60 --debug-server --parallel=auto --comment=MTS-debug-big --vardir=var-MTS-debug-big --suite=rpl --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list --unit-tests --mysqld=--slave-parallel-workers=4 --mysqld=--slave-transaction-retries=0
3045+perl mysql-test-run.pl --timer --force --big-test --testcase-timeout=60 --debug-server --parallel=auto --comment=MTS-debug-big --vardir=var-MTS-debug-big --suite=rpl --experimental=collections/default.experimental --skip-test-list=collections/disabled-per-push.list --mysqld=--slave-parallel-workers=4 --mysqld=--slave-transaction-retries=0
3046
3047 # Run with 4K page size
3048-perl mysql-test-run.pl --debug-server --timer --force --parallel=auto --comment=n_mix_4k_size --vardir=var-n_mix_4k_size --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list --unit-tests --mysqld=--innodb-page-size=4k --skip-test=innodb_ignore_builtin
3049-perl mysql-test-run.pl --debug-server --timer --force --parallel=auto --comment=main_ps_row_4k_size --vardir=var-main-ps_row --suite=main --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list --mysqld=--innodb-page-size=4k --skip-test=innodb_ignore_builtin
3050-perl mysql-test-run.pl --debug-server --timer --force --parallel=auto --comment=main_embedded_4k_size --vardir=var-main_emebbed --suite=main --embedded --experimental=collections/default.experimental --skip-ndb --mysqld=--innodb-page-size=4k --skip-test=innodb_ignore_builtin
3051+perl mysql-test-run.pl --debug-server --timer --force --parallel=auto --comment=n_mix_4k_size --vardir=var-n_mix_4k_size --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-test-list=collections/disabled-per-push.list --mysqld=--innodb-page-size=4k --skip-test=innodb_ignore_builtin
3052+perl mysql-test-run.pl --debug-server --timer --force --parallel=auto --comment=main_ps_row_4k_size --vardir=var-main-ps_row --suite=main --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-test-list=collections/disabled-per-push.list --mysqld=--innodb-page-size=4k --skip-test=innodb_ignore_builtin
3053+perl mysql-test-run.pl --debug-server --timer --force --parallel=auto --comment=main_embedded_4k_size --vardir=var-main_emebbed --suite=main --embedded --experimental=collections/default.experimental --mysqld=--innodb-page-size=4k --skip-test=innodb_ignore_builtin
3054
3055 # Run with 8K page size
3056-perl mysql-test-run.pl --debug-server --timer --force --parallel=auto --comment=n_mix_8k_size --vardir=var-n_mix_8k_size --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list --unit-tests --mysqld=--innodb-page-size=8k --skip-test=innodb_ignore_builtin
3057-perl mysql-test-run.pl --debug-server --timer --force --parallel=auto --comment=main_ps_row_8k_size --vardir=var-main-ps_row --suite=main --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list --mysqld=--innodb-page-size=8k --skip-test=innodb_ignore_builtin
3058-perl mysql-test-run.pl --debug-server --timer --force --parallel=auto --comment=main_embedded_8k_size --vardir=var-main_emebbed --suite=main --embedded --experimental=collections/default.experimental --skip-ndb --mysqld=--innodb-page-size=8k --skip-test=innodb_ignore_builtin
3059+perl mysql-test-run.pl --debug-server --timer --force --parallel=auto --comment=n_mix_8k_size --vardir=var-n_mix_8k_size --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-test-list=collections/disabled-per-push.list --mysqld=--innodb-page-size=8k --skip-test=innodb_ignore_builtin
3060+perl mysql-test-run.pl --debug-server --timer --force --parallel=auto --comment=main_ps_row_8k_size --vardir=var-main-ps_row --suite=main --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-test-list=collections/disabled-per-push.list --mysqld=--innodb-page-size=8k --skip-test=innodb_ignore_builtin
3061+perl mysql-test-run.pl --debug-server --timer --force --parallel=auto --comment=main_embedded_8k_size --vardir=var-main_emebbed --suite=main --embedded --experimental=collections/default.experimental --mysqld=--innodb-page-size=8k --skip-test=innodb_ignore_builtin
3062
3063
3064 # Additional run to test rpl HASH_SCAN & INDEX_SCAN
3065 perl mysql-test-run.pl --force --debug-server --timer --parallel=auto --experimental=collections/default.experimental --comment=binlog_rpl_row_hash_scan --vardir=var-binlog_rpl_row_hash_scan --mysqld=--binlog-format=row --suite=binlog,rpl --mysqld=--slave-rows-search-algorithms=HASH_SCAN,INDEX_SCAN --big-test --testcase-timeout=60
3066-perl mysql-test-run.pl --debug-server --timer --force --parallel=auto --comment=rpl_binlog_row_hash_MTS --vardir=var-mts-rpl-binlog-hash-n_mix --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb --unit-tests --mysqld=--slave-parallel-workers=4 --mysqld=--slave-transaction-retries=0 --suite=rpl,binlog -mysqld=--slave-rows-search-algorithms=HASH_SCAN,INDEX_SCAN
3067+perl mysql-test-run.pl --debug-server --timer --force --parallel=auto --comment=rpl_binlog_row_hash_MTS --vardir=var-mts-rpl-binlog-hash-n_mix --mysqld=--binlog-format=row --experimental=collections/default.experimental --mysqld=--slave-parallel-workers=4 --mysqld=--slave-transaction-retries=0 --suite=rpl,binlog -mysqld=--slave-rows-search-algorithms=HASH_SCAN,INDEX_SCAN
3068
3069=== modified file 'Percona-Server/mysql-test/collections/disabled-gtid-on.list'
3070--- Percona-Server/mysql-test/collections/disabled-gtid-on.list 2012-02-16 10:44:49 +0000
3071+++ Percona-Server/mysql-test/collections/disabled-gtid-on.list 2013-02-13 06:17:00 +0000
3072@@ -40,7 +40,7 @@
3073
3074 rpl_gtid_mode : Skipped due to problems in the test.
3075 binlog_gtid_errors : Skipped due to problems in the test.
3076-binlog_disable_gtid_unsafe_statements : Skipped due to problems in the test.
3077+binlog_enforce_gtid_consistency : Skipped due to problems in the test.
3078 rpl_gtid_execution : Skipped due to problems in the test.
3079
3080
3081
3082=== renamed file 'Percona-Server/mysql-test/include/mysqlbinlog_row_engine.inc' => 'Percona-Server/mysql-test/extra/binlog_tests/mysqlbinlog_row_engine.inc'
3083=== modified file 'Percona-Server/mysql-test/extra/rpl_tests/rpl_extra_col_master.test'
3084--- Percona-Server/mysql-test/extra/rpl_tests/rpl_extra_col_master.test 2012-08-22 01:40:20 +0000
3085+++ Percona-Server/mysql-test/extra/rpl_tests/rpl_extra_col_master.test 2013-02-13 06:17:00 +0000
3086@@ -1053,9 +1053,9 @@
3087 INSERT INTO t1 VALUES (1, @text);
3088 -- enable_warnings
3089
3090-SELECT * FROM t1;
3091+SELECT * FROM t1 ORDER BY c1;
3092 -- sync_slave_with_master
3093-SELECT * FROM t1;
3094+SELECT * FROM t1 ORDER BY c1;
3095
3096 # clean up
3097 -- connection master
3098
3099=== modified file 'Percona-Server/mysql-test/extra/rpl_tests/rpl_mts_crash_safe.inc'
3100--- Percona-Server/mysql-test/extra/rpl_tests/rpl_mts_crash_safe.inc 2012-08-22 01:40:20 +0000
3101+++ Percona-Server/mysql-test/extra/rpl_tests/rpl_mts_crash_safe.inc 2013-02-13 06:17:00 +0000
3102@@ -94,7 +94,7 @@
3103 SET GLOBAL debug="d,rotate_slave_debug_group";
3104 --source include/start_slave_io.inc
3105 let $wait_condition=SELECT Master_log_pos = $m_before_master_pos AND Master_log_name = "$m_before_master_file" FROM mysql.slave_master_info;
3106- let $slave_failure_printout= 1;
3107+ let $show_rpl_debug_info= 1;
3108 --source include/wait_condition.inc
3109
3110 #### Crashing server after assigning and processing jobs ######
3111
3112=== modified file 'Percona-Server/mysql-test/extra/rpl_tests/rpl_mts_crash_safe.test'
3113--- Percona-Server/mysql-test/extra/rpl_tests/rpl_mts_crash_safe.test 2012-02-14 22:25:30 +0000
3114+++ Percona-Server/mysql-test/extra/rpl_tests/rpl_mts_crash_safe.test 2013-02-13 06:17:00 +0000
3115@@ -114,6 +114,19 @@
3116 --echo # CLEAN UP
3117 --echo ########################################################################
3118 --connection master
3119+# Resetting the slave's info repository type to its default (FILE)
3120+# should be done to any tests that starts the server with non-default (TABLE).
3121+# That prevents the following tests in a suite execution to hit
3122+# Bug #14827923 RPL TEST RPL_PARALLEL_CHANGE_MASTER FAILS WITH WARNING
3123+# Technically resetting of the repo type is implemented through
3124+# one to slave_parallel_workers. Having it zero in the info table
3125+# at the following restart makes the slave server to quietly migrate
3126+# the repository to the requested type.
3127+# Notice that Bug#15858271 of mtr does not allow effectiveness of
3128+# zeroing.
3129+# TODO: run the combination described on Bug#15858271 after it's fixed.
3130+
3131+--let $saved_workers= 0
3132 --let $commands= clean
3133 --source extra/rpl_tests/rpl_mts_crash_safe.inc
3134
3135
3136=== modified file 'Percona-Server/mysql-test/include/check-testcase.test'
3137--- Percona-Server/mysql-test/include/check-testcase.test 2012-08-22 01:40:20 +0000
3138+++ Percona-Server/mysql-test/include/check-testcase.test 2013-02-13 06:17:00 +0000
3139@@ -77,6 +77,7 @@
3140 --echo Master_SSL_Crlpath
3141 --echo Retrieved_Gtid_Set #
3142 --echo Executed_Gtid_Set #
3143+ --echo Auto_Position 0
3144 }
3145 if (!$tmp) {
3146 # Note: after WL#5177, fields 13-18 shall not be filtered-out.
3147
3148=== removed file 'Percona-Server/mysql-test/include/get_binlog_dump_thread_id.inc'
3149--- Percona-Server/mysql-test/include/get_binlog_dump_thread_id.inc 2007-02-26 08:16:22 +0000
3150+++ Percona-Server/mysql-test/include/get_binlog_dump_thread_id.inc 1970-01-01 00:00:00 +0000
3151@@ -1,22 +0,0 @@
3152---exec $MYSQL test -e "show processlist" > $MYSQLTEST_VARDIR/tmp/bl_dump_thread_id
3153---disable_warnings
3154-drop table if exists t999;
3155---enable_warnings
3156-# Create a table to hold the process list
3157-create temporary table t999(
3158- id int,
3159- user char(255),
3160- host char(255),
3161- db char(255),
3162- Command char(255),
3163- time int,
3164- State char(255),
3165- info char(255)
3166-);
3167-# Load processlist into table, headers will create seom warnings
3168---disable_warnings
3169---replace_result $MYSQLTEST_VARDIR "."
3170-eval LOAD DATA INFILE "$MYSQLTEST_VARDIR/tmp/bl_dump_thread_id" into table t999;
3171---enable_warnings
3172-let $id = `select Id from t999 where Command="Binlog Dump"`;
3173-drop table t999;
3174
3175=== added file 'Percona-Server/mysql-test/include/have_null_audit_plugin.inc'
3176--- Percona-Server/mysql-test/include/have_null_audit_plugin.inc 1970-01-01 00:00:00 +0000
3177+++ Percona-Server/mysql-test/include/have_null_audit_plugin.inc 2013-02-13 06:17:00 +0000
3178@@ -0,0 +1,22 @@
3179+disable_query_log;
3180+#
3181+# Check if server has support for loading plugins
3182+#
3183+if (`SELECT @@have_dynamic_loading != 'YES'`) {
3184+ --skip Null audit plugin requires dynamic loading
3185+}
3186+
3187+#
3188+# Check if the variable AUDIT_NULL is set
3189+#
3190+if (!$AUDIT_NULL) {
3191+ --skip Audit_null plugin requires the environment variable \$AUDIT_NULL to be set (normally done by mtr)
3192+}
3193+
3194+#
3195+# Check if --plugin-dir was setup for null_audit db
3196+#
3197+if (`SELECT CONCAT('--plugin-dir=', REPLACE(@@plugin_dir, '\\\\', '/')) != '$AUDIT_NULL_OPT/'`) {
3198+ --skip null audit plugin requires that --plugin-dir is set to the null audit plugin dir (either the .opt file does not contain \$AUDIT_NULL_OPT or another plugin is in use)
3199+}
3200+enable_query_log;
3201
3202=== added file 'Percona-Server/mysql-test/include/have_sha256_rsa_auth.inc'
3203--- Percona-Server/mysql-test/include/have_sha256_rsa_auth.inc 1970-01-01 00:00:00 +0000
3204+++ Percona-Server/mysql-test/include/have_sha256_rsa_auth.inc 2013-02-13 06:17:00 +0000
3205@@ -0,0 +1,5 @@
3206+# Only run this test if SHA256/RSA authentication are supported
3207+let $shavars= query_get_value("SELECT COUNT(*) as shavars FROM information_schema.session_variables WHERE variable_name = 'sha256_password_private_key_path'", shavars, 1);
3208+if ($shavars == 0){
3209+ skip Need SHA256/RSA authentication support;
3210+}
3211
3212=== modified file 'Percona-Server/mysql-test/include/index_merge1.inc'
3213--- Percona-Server/mysql-test/include/index_merge1.inc 2012-08-22 01:40:20 +0000
3214+++ Percona-Server/mysql-test/include/index_merge1.inc 2013-02-13 06:17:00 +0000
3215@@ -29,31 +29,37 @@
3216 create table t0
3217 (
3218 key1 int not null,
3219- INDEX i1(key1)
3220+ key2 int not null,
3221+ key3 int not null,
3222+ key4 int not null,
3223+ key5 int not null,
3224+ key6 int not null,
3225+ key7 int not null,
3226+ key8 int not null,
3227+ INDEX i1(key1),
3228+ INDEX i2(key2),
3229+ INDEX i3(key3),
3230+ INDEX i4(key4),
3231+ INDEX i5(key5),
3232+ INDEX i6(key6),
3233+ INDEX i7(key7),
3234+ INDEX i8(key8)
3235 );
3236
3237 --disable_query_log
3238-insert into t0 values (1),(2),(3),(4),(5),(6),(7),(8);
3239+insert into t0 values (1,1,1,1,1,1,1,1023),(2,2,2,2,2,2,2,1022);
3240
3241-let $1=7;
3242-set @d=8;
3243+let $1=9;
3244+set @d=2;
3245 while ($1)
3246 {
3247- eval insert into t0 select key1+@d from t0;
3248+ eval insert into t0 select key1+@d, key2+@d, key3+@d, key4+@d, key5+@d,
3249+ key6+@d, key7+@d, key8-@d from t0;
3250 eval set @d=@d*2;
3251 dec $1;
3252 }
3253 --enable_query_log
3254
3255-alter table t0 add key2 int not null, add index i2(key2);
3256-alter table t0 add key3 int not null, add index i3(key3);
3257-alter table t0 add key4 int not null, add index i4(key4);
3258-alter table t0 add key5 int not null, add index i5(key5);
3259-alter table t0 add key6 int not null, add index i6(key6);
3260-alter table t0 add key7 int not null, add index i7(key7);
3261-alter table t0 add key8 int not null, add index i8(key8);
3262-
3263-update t0 set key2=key1,key3=key1,key4=key1,key5=key1,key6=key1,key7=key1,key8=1024-key1;
3264 analyze table t0;
3265
3266 # 1. One index
3267
3268=== added file 'Percona-Server/mysql-test/include/innodb_pk_extension.inc'
3269--- Percona-Server/mysql-test/include/innodb_pk_extension.inc 1970-01-01 00:00:00 +0000
3270+++ Percona-Server/mysql-test/include/innodb_pk_extension.inc 2013-02-13 06:17:00 +0000
3271@@ -0,0 +1,253 @@
3272+--source include/have_innodb.inc
3273+
3274+CREATE TABLE t1
3275+(
3276+ pk_1 INT,
3277+ pk_2 INT,
3278+ f1 DATETIME,
3279+ f2 INT,
3280+ PRIMARY KEY(pk_1, pk_2),
3281+ KEY k1(f1),
3282+ KEY k2(f2)
3283+) ENGINE = InnoDB;
3284+
3285+INSERT INTO t1 VALUES
3286+(1, 1, '2000-01-01', 1), (1, 2, '2000-01-02', 2), (1, 3, '2000-01-03', 3), (1, 4, '2000-01-04', 4), (1, 5, '2000-01-05', 5),
3287+(2, 1, '2000-01-01', 6), (2, 2, '2000-01-02', 7), (2, 3, '2000-01-03', 8), (2, 4, '2000-01-04', 9), (2, 5, '2000-01-05', 10),
3288+(3, 1, '2000-01-01', 11), (3, 2, '2000-01-02', 12), (3, 3, '2000-01-03', 13), (3, 4, '2000-01-04', 14), (3, 5, '2000-01-05', 15),
3289+(4, 1, '2000-01-01', 16), (4, 2, '2000-01-02', 17), (4, 3, '2000-01-03', 18), (4, 4, '2000-01-04', 19), (4, 5, '2000-01-05', 20),
3290+(5, 1, '2000-01-01', 21), (5, 2, '2000-01-02', 22), (5, 3, '2000-01-03', 23), (5, 4, '2000-01-04', 24), (5, 5, '2000-01-05', 25),
3291+(6, 1, '2000-01-06', 26), (6, 2, '2000-01-06', 27), (6, 3, '2000-01-03', 28), (6, 4, '2000-01-06', 29), (6, 5, '2000-01-06', 30),
3292+(7, 1, '2000-01-06', 31), (7, 2, '2000-01-06', 32), (7, 3, '2000-01-03', 33), (7, 4, '2000-01-06', 34), (7, 5, '2000-01-06', 35),
3293+(8, 1, '2000-01-06', 36), (8, 2, '2000-01-06', 37), (8, 3, '2000-01-03', 38), (8, 4, '2000-01-06', 39), (8, 5, '2000-01-06', 40),
3294+(9, 1, '2000-01-06', 41), (9, 2, '2000-01-06', 42), (9, 3, '2000-01-03', 43), (9, 4, '2000-01-06', 44), (9, 5, '2000-01-06', 45);
3295+
3296+INSERT INTO t1 VALUES
3297+(11, 1, '2000-01-01', 1), (11, 2, '2000-01-02', 2), (11, 3, '2000-01-03', 3), (11, 4, '2000-01-04', 4), (11, 5, '2000-01-05', 5),
3298+(12, 1, '2000-01-01', 6), (12, 2, '2000-01-02', 7), (12, 3, '2000-01-03', 8), (12, 4, '2000-01-04', 9), (12, 5, '2000-01-05', 10),
3299+(13, 1, '2000-01-01', 11), (13, 2, '2000-01-02', 12), (13, 3, '2000-01-03', 13), (13, 4, '2000-01-04', 14), (13, 5, '2000-01-05', 15),
3300+(14, 1, '2000-01-01', 16), (14, 2, '2000-01-02', 17), (14, 3, '2000-01-03', 18), (14, 4, '2000-01-04', 19), (14, 5, '2000-01-05', 20),
3301+(15, 1, '2000-01-01', 1), (15, 2, '2000-01-02', 2), (15, 3, '2000-01-03', 3), (15, 4, '2000-01-04', 4), (15, 5, '2000-01-05', 5),
3302+(16, 1, '2000-01-06', 6), (16, 2, '2000-01-06', 7), (16, 3, '2000-01-03', 8), (16, 4, '2000-01-06', 9), (16, 5, '2000-01-06', 10),
3303+(17, 1, '2000-01-06', 31), (17, 2, '2000-01-06', 32), (17, 3, '2000-01-03', 33), (17, 4, '2000-01-06', 34), (17, 5, '2000-01-06', 35),
3304+(18, 1, '2000-01-06', 36), (18, 2, '2000-01-06', 37), (18, 3, '2000-01-03', 38), (18, 4, '2000-01-06', 39), (18, 5, '2000-01-06', 40),
3305+(19, 1, '2000-01-06', 1), (19, 2, '2000-01-06', 2), (19, 3, '2000-01-03', 3), (19, 4, '2000-01-06', 4), (19, 5, '2000-01-06', 5);
3306+
3307+
3308+INSERT INTO t1 VALUES
3309+(21, 1, '2000-01-01', 1), (21, 2, '2000-01-02', 2), (31, 3, '2000-01-03', 3), (41, 4, '2000-01-04', 4), (51, 5, '2000-01-05', 5),
3310+(22, 1, '2000-01-01', 6), (22, 2, '2000-01-02', 7), (32, 3, '2000-01-03', 8), (42, 4, '2000-01-04', 9), (52, 5, '2000-01-05', 10),
3311+(23, 1, '2000-01-01', 11), (23, 2, '2000-01-02', 12), (33, 3, '2000-01-03', 13), (43, 4, '2000-01-04', 14), (53, 5, '2000-01-05', 15),
3312+(24, 1, '2000-01-01', 16), (24, 2, '2000-01-02', 17), (34, 3, '2000-01-03', 18), (44, 4, '2000-01-04', 19), (54, 5, '2000-01-05', 20),
3313+(25, 1, '2000-01-01', 1), (25, 2, '2000-01-02', 2), (35, 3, '2000-01-03', 3), (45, 4, '2000-01-04', 4), (55, 5, '2000-01-05', 5),
3314+(26, 1, '2000-01-06', 6), (26, 2, '2000-01-06', 7), (36, 3, '2000-01-03', 8), (46, 4, '2000-01-06', 9), (56, 5, '2000-01-06', 10),
3315+(27, 1, '2000-01-06', 31), (27, 2, '2000-01-06', 32), (37, 3, '2000-01-03', 33), (47, 4, '2000-01-06', 34), (57, 5, '2000-01-06', 35),
3316+(28, 1, '2000-01-06', 36), (28, 2, '2000-01-06', 37), (38, 3, '2000-01-03', 38), (48, 4, '2000-01-06', 39), (58, 5, '2000-01-06', 40),
3317+(29, 1, '2000-01-06', 1), (29, 2, '2000-01-06', 2), (39, 3, '2000-01-03', 3), (49, 4, '2000-01-06', 4), (59, 5, '2000-01-06', 5);
3318+
3319+INSERT INTO t1 SELECT pk_1 + 60, pk_2, f1, f2 FROM t1;
3320+INSERT INTO t1 SELECT pk_1 + 120, pk_2, f1, f2 FROM t1;
3321+INSERT INTO t1 SELECT pk_1 + 240, pk_2, f1, f2 FROM t1;
3322+INSERT INTO t1 SELECT pk_1, pk_2 + 10, f1, f2 FROM t1;
3323+
3324+ANALYZE TABLE t1;
3325+
3326+--echo #
3327+--echo # REF access optimization
3328+--echo #
3329+
3330+--replace_column 9 #
3331+EXPLAIN SELECT count(*) FROM t1 WHERE pk_1 = 3 and f1 = '2000-01-03';
3332+FLUSH STATUS;
3333+SELECT count(*) FROM t1 WHERE pk_1 = 3 and f1 = '2000-01-03';
3334+SHOW STATUS LIKE 'handler_read%';
3335+
3336+--replace_column 9 #
3337+EXPLAIN SELECT pk_2 FROM t1 WHERE pk_1 = 3 and f1 = '2000-01-03';
3338+FLUSH STATUS;
3339+SELECT pk_2 FROM t1 WHERE pk_1 = 3 and f1 = '2000-01-03';
3340+SHOW STATUS LIKE 'handler_read%';
3341+
3342+--echo #
3343+--echo # RANGE access optimization
3344+--echo #
3345+
3346+--replace_column 9 #
3347+EXPLAIN SELECT count(*) FROM t1 WHERE pk_1 BETWEEN 3 AND 5 AND f1 = '2000-01-03';
3348+FLUSH STATUS;
3349+SELECT count(*) FROM t1 WHERE pk_1 BETWEEN 3 AND 5 AND f1 = '2000-01-03';
3350+SHOW STATUS LIKE 'handler_read%';
3351+
3352+--replace_column 9 #
3353+EXPLAIN SELECT pk_1, pk_2 FROM t1 WHERE pk_1 BETWEEN 3 AND 5 AND f1 = '2000-01-03';
3354+FLUSH STATUS;
3355+SELECT pk_1, pk_2 FROM t1 WHERE pk_1 BETWEEN 3 AND 5 AND f1 = '2000-01-03';
3356+SHOW STATUS LIKE 'handler_read%';
3357+
3358+--echo #
3359+--echo # MAX/MIN optimization
3360+--echo #
3361+
3362+--replace_column 9 #
3363+EXPLAIN SELECT MIN(pk_1) FROM t1 WHERE f1 = '2000-01-03';
3364+FLUSH STATUS;
3365+SELECT MIN(pk_1) FROM t1 WHERE f1 = '2000-01-03';
3366+SHOW STATUS LIKE 'handler_read%';
3367+
3368+--replace_column 9 #
3369+EXPLAIN SELECT MIN(pk_1) FROM t1 WHERE pk_1 BETWEEN 3 AND 5 AND f1 = '2000-01-03';
3370+FLUSH STATUS;
3371+SELECT MIN(pk_1) FROM t1 WHERE pk_1 BETWEEN 3 AND 5 AND f1 = '2000-01-03';
3372+SHOW STATUS LIKE 'handler_read%';
3373+
3374+--replace_column 9 #
3375+EXPLAIN SELECT MAX(pk_1) FROM t1 WHERE f1 = '2000-01-03';
3376+FLUSH STATUS;
3377+SELECT MAX(pk_1) FROM t1 WHERE f1 = '2000-01-03';
3378+SHOW STATUS LIKE 'handler_read%';
3379+
3380+--replace_column 9 #
3381+EXPLAIN SELECT MAX(pk_1) FROM t1 WHERE pk_1 BETWEEN 3 AND 5 AND f1 = '2000-01-03';
3382+FLUSH STATUS;
3383+SELECT MAX(pk_1) FROM t1 WHERE pk_1 BETWEEN 3 AND 5 AND f1 = '2000-01-03';
3384+SHOW STATUS LIKE 'handler_read%';
3385+
3386+--echo #
3387+--echo # Loose index scan
3388+--echo #
3389+
3390+--replace_column 9 #
3391+EXPLAIN SELECT MIN(pk_1) FROM t1 WHERE f2 BETWEEN 13 AND 14 GROUP BY f2;
3392+FLUSH STATUS;
3393+SELECT MIN(pk_1) FROM t1 WHERE f2 BETWEEN 13 AND 14 GROUP BY f2;
3394+SHOW STATUS LIKE 'handler_read%';
3395+
3396+--replace_column 9 #
3397+EXPLAIN SELECT MIN(pk_1) FROM t1 WHERE f2 IN (1, 2) GROUP BY f2;
3398+FLUSH STATUS;
3399+SELECT MIN(pk_1) FROM t1 WHERE f2 IN (1, 2) GROUP BY f2;
3400+SHOW STATUS LIKE 'handler_read%';
3401+
3402+--echo #
3403+--echo # JOIN optimization
3404+--echo #
3405+
3406+--replace_column 9 #
3407+EXPLAIN SELECT count(*) FROM t1 AS t1 JOIN t1 AS t2
3408+ON t2.pk_1 = t1.pk_1 WHERE t1.f1 = '2000-01-03' AND t2.f1 = '2000-01-03';
3409+FLUSH STATUS;
3410+SELECT count(*) FROM t1 AS t1 JOIN t1 AS t2
3411+ON t2.pk_1 = t1.pk_1 WHERE t1.f1 = '2000-01-03' AND t2.f1 = '2000-01-03';
3412+SHOW STATUS LIKE 'handler_read%';
3413+
3414+--echo #
3415+--echo # Optimization of sorting
3416+--echo #
3417+
3418+--replace_column 9 #
3419+EXPLAIN SELECT f1, pk_1, pk_2 FROM t1 WHERE pk_1 = 3 AND f1 = '2000-01-03'
3420+ORDER BY pk_2 DESC LIMIT 5;
3421+FLUSH STATUS;
3422+SELECT f1, pk_1, pk_2 FROM t1 WHERE pk_1 = 3 AND f1 = '2000-01-03'
3423+ORDER BY pk_2 DESC LIMIT 5;
3424+SHOW STATUS LIKE 'handler_read%';
3425+
3426+--replace_column 9 #
3427+EXPLAIN SELECT f1, pk_1, pk_2 FROM t1 WHERE pk_1 BETWEEN 3 AND 5 AND f1 = '2000-01-03'
3428+ORDER BY pk_2 DESC LIMIT 5;
3429+FLUSH STATUS;
3430+SELECT f1, pk_1, pk_2 FROM t1 WHERE pk_1 BETWEEN 3 AND 5 AND f1 = '2000-01-03'
3431+ORDER BY pk_2 DESC LIMIT 5;
3432+SHOW STATUS LIKE 'handler_read%';
3433+
3434+DROP TABLE t1;
3435+
3436+--echo #
3437+--echo # Max key part limitation
3438+--echo #
3439+
3440+CREATE TABLE t1
3441+(
3442+ f1 INT, f2 INT, f3 INT, f4 INT, f5 INT, f6 INT, f7 INT, f8 INT, f9 INT, f10 INT,
3443+ f11 INT, f12 INT, f13 INT, f14 INT, f15 INT, f16 INT, f17 INT, f18 INT,
3444+ PRIMARY KEY (f1, f2, f3, f4, f5, f6, f7, f8, f9, f10),
3445+ KEY k1 (f11, f12, f13, f14, f15, f16, f17)
3446+) ENGINE = InnoDB;
3447+
3448+--replace_column 9 #
3449+EXPLAIN SELECT f17 FROM t1 FORCE INDEX (k1) WHERE
3450+f1 = 0 AND f2 = 0 AND f3 = 0 AND f4 = 0 AND f5 = 0 AND
3451+f6 = 0 AND f7 = 0 AND f8 = 0 AND f9 = 0 AND f10 = 0 AND
3452+f11 = 0 AND f12 = 0 AND f13 = 0 AND f14 = 0 AND
3453+f15 = 0 AND f16 = 0 AND f17 = 0;
3454+
3455+--replace_column 9 #
3456+EXPLAIN SELECT f17 FROM t1 FORCE INDEX (k1) WHERE
3457+f1 = 0 AND f2 = 0 AND f3 = 0 AND f4 = 0 AND f5 = 0 AND
3458+f6 = 0 AND f7 = 0 AND f8 = 0 AND f9 = 0 AND
3459+f11 = 0 AND f12 = 0 AND f13 = 0 AND f14 = 0 AND
3460+f15 = 0 AND f16 = 0 AND f17 = 0;
3461+
3462+DROP TABLE t1;
3463+
3464+--echo #
3465+--echo # Max key length limitation
3466+--echo #
3467+
3468+CREATE TABLE t1
3469+(
3470+ f1 VARCHAR(500), f2 VARCHAR(500), f3 VARCHAR(500),
3471+ f4 VARCHAR(500), f5 VARCHAR(500), f6 VARCHAR(500),
3472+ f7 VARCHAR(500),
3473+ PRIMARY KEY (f1, f2, f3, f4),
3474+ KEY k1 (f5, f6, f7)
3475+) ENGINE = InnoDB;
3476+
3477+--replace_column 9 #
3478+EXPLAIN SELECT f5 FROM t1 FORCE INDEX (k1) WHERE
3479+f1 = 'a' AND f2 = 'a' AND f3 = 'a' AND f4 = 'a' AND
3480+f5 = 'a' AND f6 = 'a' AND f7 = 'a';
3481+
3482+--replace_column 9 #
3483+EXPLAIN SELECT f5 FROM t1 FORCE INDEX (k1) WHERE
3484+f1 = 'a' AND f2 = 'a' AND f3 = 'a' AND
3485+f5 = 'a' AND f6 = 'a' AND f7 = 'a';
3486+
3487+--replace_column 9 #
3488+EXPLAIN SELECT f5 FROM t1 FORCE INDEX (k1) WHERE
3489+f1 = 'a' AND f2 = 'a' AND f4 = 'a' AND
3490+f5 = 'a' AND f6 = 'a' AND f7 = 'a';
3491+
3492+DROP TABLE t1;
3493+
3494+--echo #
3495+--echo # Unique extended key
3496+--echo #
3497+
3498+CREATE TABLE t1
3499+(
3500+ pk INT NOT NULL auto_increment,
3501+ f1 INT NOT NULL,
3502+ KEY (f1),
3503+ PRIMARY KEY (pk)
3504+) ENGINE = INNODB;
3505+
3506+CREATE TABLE t2
3507+(
3508+ f1 INT,
3509+ f2 INT
3510+) ENGINE = INNODB;
3511+
3512+INSERT INTO t1(f1) VALUES (1),(2);
3513+INSERT INTO t1(f1) SELECT f1 + 2 FROM t1;
3514+INSERT INTO t1(f1) SELECT f1 + 4 FROM t1;
3515+ANALYZE TABLE t1;
3516+
3517+INSERT INTO t2 VALUES (1,1), (2,2);
3518+
3519+EXPLAIN SELECT t2.f1 FROM t2 JOIN t1 IGNORE INDEX(primary) ON t2.f1 = t1.pk and t2.f2 = t1.f1;
3520+FLUSH STATUS;
3521+SELECT t2.f1 FROM t2 JOIN t1 IGNORE INDEX(primary) ON t2.f1 = t1.pk and t2.f2 = t1.f1;
3522+SHOW STATUS LIKE 'Handler_read%';
3523+
3524+DROP TABLE t1, t2;
3525
3526=== modified file 'Percona-Server/mysql-test/include/master-slave.inc'
3527--- Percona-Server/mysql-test/include/master-slave.inc 2012-03-06 14:29:42 +0000
3528+++ Percona-Server/mysql-test/include/master-slave.inc 2013-02-13 06:17:00 +0000
3529@@ -11,12 +11,13 @@
3530 # [--let $rpl_skip_start_slave= 1]
3531 # [--let $rpl_debug= 1]
3532 # [--let $slave_timeout= NUMBER]
3533+# [--let $use_gtids= 1]
3534 # --source include/master-slave.inc
3535 #
3536 # Parameters:
3537 # $rpl_check_server_ids, $rpl_skip_reset_master_and_slave,
3538 # $rpl_skip_change_master, $rpl_skip_start_slave, $rpl_debug,
3539-# $slave_timeout
3540+# $slave_timeout, $use_gtids
3541 # See include/rpl_init.inc
3542 #
3543 # $rpl_server_count
3544
3545=== modified file 'Percona-Server/mysql-test/include/mtr_check.sql'
3546--- Percona-Server/mysql-test/include/mtr_check.sql 2012-03-06 14:29:42 +0000
3547+++ Percona-Server/mysql-test/include/mtr_check.sql 2013-02-13 06:17:00 +0000
3548@@ -63,7 +63,7 @@
3549 SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
3550 WHERE variable_name NOT IN ('timestamp', 'server_uuid',
3551 'innodb_file_format_max',
3552- 'gtid_done', 'gtid_lost')
3553+ 'gtid_executed', 'gtid_purged')
3554 ORDER BY VARIABLE_NAME;
3555
3556 -- Dump all databases, there should be none
3557
3558=== modified file 'Percona-Server/mysql-test/include/mtr_warnings.sql'
3559--- Percona-Server/mysql-test/include/mtr_warnings.sql 2012-12-04 08:24:59 +0000
3560+++ Percona-Server/mysql-test/include/mtr_warnings.sql 2013-02-13 06:17:00 +0000
3561@@ -88,7 +88,7 @@
3562 INSERT INTO global_suppressions VALUES
3563 (".SELECT UNIX_TIMESTAMP... failed on master"),
3564 ("Aborted connection"),
3565- ("Client requested master to start replication from impossible position"),
3566+ ("Client requested master to start replication from position"),
3567 ("Could not find first log file name in binary log"),
3568 ("Enabling keys got errno"),
3569 ("Error reading master configuration"),
3570@@ -178,7 +178,8 @@
3571
3572 /* Added 2009-08-XX after fixing Bug #42408 */
3573
3574- ("Although a path was specified for the .* option, log tables are used"),
3575+ ("Although a path was specified for the --general-log-file option, log tables are used"),
3576+ ("Although a path was specified for the --slow-query-log-file option, log tables are used"),
3577 ("Backup: Operation aborted"),
3578 ("Restore: Operation aborted"),
3579 ("Restore: The grant .* was skipped because the user does not exist"),
3580
3581=== modified file 'Percona-Server/mysql-test/include/mysqld--help.inc'
3582--- Percona-Server/mysql-test/include/mysqld--help.inc 2013-01-21 13:20:09 +0000
3583+++ Percona-Server/mysql-test/include/mysqld--help.inc 2013-02-13 06:17:00 +0000
3584@@ -16,8 +16,8 @@
3585 perl;
3586 # Variables which we don't want to display in the result file since
3587 # their paths may vary:
3588- @skipvars=qw/basedir open-files-limit general-log-file log plugin-dir
3589- log-slow-queries pid-file slow-query-log-file
3590+ @skipvars=qw/basedir open-files-limit general-log-file plugin-dir
3591+ pid-file slow-query-log-file
3592 datadir slave-load-tmpdir tmpdir socket table-definition-cache table-open-cache/;
3593
3594 # Plugins which may or may not be there:
3595
3596=== modified file 'Percona-Server/mysql-test/include/not_ndb_default.inc'
3597--- Percona-Server/mysql-test/include/not_ndb_default.inc 2011-04-15 08:55:50 +0000
3598+++ Percona-Server/mysql-test/include/not_ndb_default.inc 2013-02-13 06:17:00 +0000
3599@@ -1,4 +1,6 @@
3600---require r/not_ndb_default.require
3601-disable_query_log;
3602-select convert(@@storage_engine using latin1) NOT IN ("ndbcluster","NDBCLUSTER") as "TRUE";
3603-enable_query_log;
3604+# Skip the test in case the default storage engine is NDB.
3605+
3606+if (`SELECT CONVERT(@@default_storage_engine USING latin1) IN ('ndbcluster','NDBCLUSTER')`)
3607+{
3608+ --skip Test requires default storage engine (@@default_storage_engine) != NDB
3609+}
3610
3611=== added file 'Percona-Server/mysql-test/include/not_sha256_rsa_auth.inc'
3612--- Percona-Server/mysql-test/include/not_sha256_rsa_auth.inc 1970-01-01 00:00:00 +0000
3613+++ Percona-Server/mysql-test/include/not_sha256_rsa_auth.inc 2013-02-13 06:17:00 +0000
3614@@ -0,0 +1,5 @@
3615+# Only run this test if YaSSL is supported
3616+let $shavars= query_get_value("SELECT COUNT(*) as shavars FROM information_schema.session_variables WHERE variable_name = 'sha256_password_private_key_path'", shavars, 1);
3617+if ($shavars != 0){
3618+ skip Need YaSSL support;
3619+}
3620
3621=== modified file 'Percona-Server/mysql-test/include/read_many_rows.inc'
3622--- Percona-Server/mysql-test/include/read_many_rows.inc 2010-10-25 09:20:53 +0000
3623+++ Percona-Server/mysql-test/include/read_many_rows.inc 2013-02-13 06:17:00 +0000
3624@@ -112,7 +112,7 @@
3625 insert into t1 values(1);
3626
3627 connection con2;
3628---error 1213
3629+--error 1213,1205
3630 reap;
3631 select @a;
3632 # check that the whole transaction was rolled back
3633
3634=== modified file 'Percona-Server/mysql-test/include/rpl_init.inc'
3635--- Percona-Server/mysql-test/include/rpl_init.inc 2012-01-30 19:56:21 +0000
3636+++ Percona-Server/mysql-test/include/rpl_init.inc 2013-02-13 06:17:00 +0000
3637@@ -51,6 +51,7 @@
3638 # [--let $rpl_skip_reset_master_and_slave= 1]
3639 # [--let $rpl_debug= 1]
3640 # [--let $slave_timeout= NUMBER]
3641+# [--let $use_gtids= 1]
3642 # --source include/rpl_init.inc
3643 #
3644 # Parameters:
3645@@ -104,6 +105,9 @@
3646 # Timeout used when waiting for the slave threads to start.
3647 # See include/wait_for_slave_param.inc
3648 #
3649+# $use_gtids
3650+# Use option MASTER_AUTO_POSITION = 1 to CHANGE MASTER.
3651+#
3652 #
3653 # ==== Side effects ====
3654 #
3655
3656=== modified file 'Percona-Server/mysql-test/include/rpl_start_server.inc'
3657--- Percona-Server/mysql-test/include/rpl_start_server.inc 2012-12-04 08:24:59 +0000
3658+++ Percona-Server/mysql-test/include/rpl_start_server.inc 2013-02-13 06:17:00 +0000
3659@@ -23,7 +23,7 @@
3660 #
3661 # $rpl_start_with_gtids
3662 # If set, the server will start with GTIDs on, i.e.:
3663-# --gtid-mode=on --disable-gtid-unsafe-statements
3664+# --gtid-mode=on --enforce-gtid-consistency
3665 # --log-bin --log-slave-updates
3666 # --default-storage-engine=InnoDB --default-tmp-storage-engine=InnoDB
3667 #
3668@@ -61,7 +61,7 @@
3669 if ($rpl_start_with_gtids)
3670 {
3671 --let $_rpl_start_server_info= $_rpl_start_server_info gtids=on
3672- --let _RPL_START_SERVER_PARAMETERS= $_RPL_START_SERVER_PARAMETERS --log-bin --log-slave-updates --disable-gtid-unsafe-statements --gtid-mode=on --default-storage-engine=InnoDB --default-tmp-storage-engine=InnoDB
3673+ --let _RPL_START_SERVER_PARAMETERS= $_RPL_START_SERVER_PARAMETERS --log-bin --log-slave-updates --enforce-gtid-consistency --gtid-mode=on --default-storage-engine=InnoDB --default-tmp-storage-engine=InnoDB
3674 }
3675 if ($rpl_server_parameters != '')
3676 {
3677
3678=== modified file 'Percona-Server/mysql-test/include/save_master_pos.inc'
3679--- Percona-Server/mysql-test/include/save_master_pos.inc 2012-02-17 19:46:49 +0000
3680+++ Percona-Server/mysql-test/include/save_master_pos.inc 2013-02-13 06:17:00 +0000
3681@@ -29,7 +29,7 @@
3682
3683 if ($use_gtids)
3684 {
3685- --let $_saved_gtids= `SELECT @@global.gtid_done`
3686+ --let $_saved_gtids= `SELECT @@global.gtid_executed`
3687 if ($rpl_debug)
3688 {
3689 --echo save_master_pos saved gtid='$_saved_gtids'
3690
3691=== modified file 'Percona-Server/mysql-test/include/show_events.inc'
3692--- Percona-Server/mysql-test/include/show_events.inc 2012-08-22 01:40:20 +0000
3693+++ Percona-Server/mysql-test/include/show_events.inc 2013-02-13 06:17:00 +0000
3694@@ -79,7 +79,7 @@
3695 if ($keep_gtid_events)
3696 {
3697 let $pre_script= $pre_script
3698- my DOLLARuuid_regex = '[0-9A-F]{8}-(?:[0-9A-F]{4}-){3}[0-9A-F]{12}';
3699+ my DOLLARuuid_regex = '[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}';
3700 my DOLLARuuid_sidno_regex = DOLLARuuid_regex.'(?::[0-9]+(?:-[0-9]+)?)+';
3701 ||
3702 --let $script= $script s{DOLLARuuid_sidno_regex(?:,DOLLARuuid_sidno_regex)*}{Gtid_set};
3703
3704=== modified file 'Percona-Server/mysql-test/include/show_rpl_debug_info.inc'
3705--- Percona-Server/mysql-test/include/show_rpl_debug_info.inc 2012-02-17 19:46:49 +0000
3706+++ Percona-Server/mysql-test/include/show_rpl_debug_info.inc 2013-02-13 06:17:00 +0000
3707@@ -42,6 +42,7 @@
3708 --enable_query_log
3709 --enable_result_log
3710 --enable_warnings
3711+--enable_connect_log
3712 --disable_abort_on_error
3713 --horizontal_results
3714
3715@@ -71,7 +72,7 @@
3716 --echo
3717 --echo **** GTID_* on $CURRENT_CONNECTION ****
3718 query_vertical
3719- SELECT @@GLOBAL.GTID_DONE, @@GLOBAL.GTID_LOST, @@GLOBAL.GTID_OWNED, @@SESSION.GTID_DONE, @@SESSION.GTID_OWNED;
3720+ SELECT @@GLOBAL.GTID_EXECUTED, @@GLOBAL.GTID_PURGED, @@GLOBAL.GTID_OWNED, @@SESSION.GTID_EXECUTED, @@SESSION.GTID_OWNED;
3721 --echo
3722 --echo **** SHOW SLAVE STATUS on $CURRENT_CONNECTION ****
3723 query_vertical SHOW SLAVE STATUS;
3724@@ -97,7 +98,12 @@
3725 let $relaylog_name= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1);
3726 --echo relaylog_name = '$relaylog_name'
3727 eval SHOW RELAYLOG EVENTS IN '$relaylog_name';
3728-
3729+ --echo
3730+ --echo **** slave_relay_info on $CURRENT_CONNECTION ****
3731+ SELECT * FROM mysql.slave_relay_log_info;
3732+ --echo
3733+ --echo **** slave_master_info on $CURRENT_CONNECTION ****
3734+ SELECT * FROM mysql.slave_master_info;
3735
3736 --let $_rpl_is_first_server= 0
3737 --dec $_rpl_server
3738
3739=== added file 'Percona-Server/mysql-test/include/stop_dump_threads.inc'
3740--- Percona-Server/mysql-test/include/stop_dump_threads.inc 1970-01-01 00:00:00 +0000
3741+++ Percona-Server/mysql-test/include/stop_dump_threads.inc 2013-02-13 06:17:00 +0000
3742@@ -0,0 +1,33 @@
3743+# ==== Purpose ====
3744+#
3745+# Stop all dump threads on the server of the current connection.
3746+#
3747+# ==== Usage ====
3748+#
3749+# --source include/stop_dump_threads.inc
3750+
3751+--let $include_filename= stop_dump_threads.inc
3752+--source include/begin_include_file.inc
3753+
3754+
3755+--let $_sdt_show_rpl_debug_info_old= $show_rpl_debug_info
3756+--let $show_rpl_debug_info= 1
3757+--disable_query_log
3758+--disable_result_log
3759+
3760+--let $_sdt_dump_thread_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND = 'Binlog dump'`
3761+
3762+while ($_sdt_dump_thread_id != '')
3763+{
3764+ eval KILL $_sdt_dump_thread_id;
3765+ --let $wait_condition= SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE ID = $_sdt_dump_thread_id
3766+ --source include/wait_condition.inc
3767+
3768+ --let $_sdt_dump_thread_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND = 'Binlog dump'`
3769+}
3770+
3771+
3772+--let $show_rpl_debug_info= $_sdt_show_rpl_debug_info_old
3773+
3774+--let $include_filename= stop_dump_threads.inc
3775+--source include/end_include_file.inc
3776
3777=== modified file 'Percona-Server/mysql-test/include/subquery_sj.inc'
3778--- Percona-Server/mysql-test/include/subquery_sj.inc 2012-12-04 08:24:59 +0000
3779+++ Percona-Server/mysql-test/include/subquery_sj.inc 2013-02-13 06:17:00 +0000
3780@@ -2545,7 +2545,7 @@
3781 varchar_nokey varchar(1) NOT NULL
3782 );
3783 INSERT INTO BB VALUES ('i'),('t');
3784--- error ER_OPERAND_COLUMNS
3785+-- error ER_BAD_FIELD_ERROR
3786 SELECT varchar_nokey FROM C
3787 WHERE (varchar_nokey, OUTR) IN (SELECT varchar_nokey
3788 FROM BB);
3789
3790=== modified file 'Percona-Server/mysql-test/include/sync_slave_sql.inc'
3791--- Percona-Server/mysql-test/include/sync_slave_sql.inc 2012-02-17 19:46:49 +0000
3792+++ Percona-Server/mysql-test/include/sync_slave_sql.inc 2013-02-13 06:17:00 +0000
3793@@ -3,7 +3,7 @@
3794 # This file does the same as the built-in command sync_with_master,
3795 # but more flexible. In particular:
3796 # - Can use a custom timeout.
3797-# - Can use SQL_THREAD_WAIT_AFTER_GTIDS instead of MASTER_POS_WAIT.
3798+# - Can use WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS instead of MASTER_POS_WAIT.
3799 # - The position can be set by the user, it is not restricted to
3800 # save_master_pos
3801 #
3802@@ -41,9 +41,9 @@
3803 {
3804 if ($rpl_debug)
3805 {
3806- --echo debug: SQL_THREAD_WAIT_AFTER_GTIDS('$_saved_gtids', $_sss_slave_timeout)
3807+ --echo debug: WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS('$_saved_gtids', $_sss_slave_timeout)
3808 }
3809- --let $_sss_result= `SELECT SQL_THREAD_WAIT_AFTER_GTIDS('$_saved_gtids', $_sss_slave_timeout)`
3810+ --let $_sss_result= `SELECT WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS('$_saved_gtids', $_sss_slave_timeout)`
3811 }
3812 if (!$use_gtids)
3813 {
3814
3815=== modified file 'Percona-Server/mysql-test/include/wait_condition.inc'
3816--- Percona-Server/mysql-test/include/wait_condition.inc 2012-08-22 01:40:20 +0000
3817+++ Percona-Server/mysql-test/include/wait_condition.inc 2013-02-13 06:17:00 +0000
3818@@ -13,7 +13,7 @@
3819 #
3820 # OR
3821 #
3822-# let $slave_failure_printout= 1; # to force post-failure printout
3823+# let $show_rpl_debug_info= 1; # to force post-failure printout
3824 # let $wait_timeout= 60; # Override default 30 seconds with 60.
3825 # let $wait_condition=
3826 # SELECT c = 3 FROM t;
3827@@ -53,16 +53,9 @@
3828 }
3829 if (!$success)
3830 {
3831- if ($slave_failure_printout)
3832+ if ($show_rpl_debug_info)
3833 {
3834- --connection slave
3835- --echo
3836- --echo *** Slave server status: ***
3837- --echo
3838- --query_vertical show slave status
3839- --query_vertical show processlist
3840- --query_vertical select * from mysql.slave_relay_log_info
3841- --query_vertical select * from mysql.slave_master_info
3842+ --source include/show_rpl_debug_info.inc
3843 }
3844 die Timeout in wait_condition.inc for $wait_condition;
3845 }
3846
3847=== added file 'Percona-Server/mysql-test/include/wait_time_until_connected_again.inc'
3848--- Percona-Server/mysql-test/include/wait_time_until_connected_again.inc 1970-01-01 00:00:00 +0000
3849+++ Percona-Server/mysql-test/include/wait_time_until_connected_again.inc 2013-02-13 06:17:00 +0000
3850@@ -0,0 +1,27 @@
3851+#
3852+# Include this script to wait until the connection to the
3853+# server has been restored or timeout occurs
3854+# Unlike wait_until_connected_again the variable counter must be set outside as var.
3855+# set WAIT_COUNT before executinmg this include file.
3856+--disable_result_log
3857+--disable_query_log
3858+let $counter= $WAIT_COUNT;
3859+let $mysql_errno= 9999;
3860+while ($mysql_errno)
3861+{
3862+ # Strangely enough, the server might return "Too many connections"
3863+ # while being shutdown, thus 1040 is an "allowed" error
3864+ # See BUG#36228
3865+ --error 0,1040,1053,2002,2003,2006,2013
3866+ show status;
3867+
3868+ dec $counter;
3869+ if (!$counter)
3870+ {
3871+ --echo Waited $WAIT_COUNT * 0.5 sec.
3872+ --die Server failed to restart
3873+ }
3874+ --sleep 0.5
3875+}
3876+--enable_query_log
3877+--enable_result_log
3878
3879=== modified file 'Percona-Server/mysql-test/include/write_result_to_file.inc'
3880--- Percona-Server/mysql-test/include/write_result_to_file.inc 2012-02-08 13:28:38 +0000
3881+++ Percona-Server/mysql-test/include/write_result_to_file.inc 2013-02-13 06:17:00 +0000
3882@@ -4,11 +4,13 @@
3883 # if the output needs more advanced parsing than can be done by
3884 # mysqltest commands.
3885 #
3886+# The statement is sent to mysqld on current connection using
3887+# the mysql command line client.
3888+#
3889 # ==== Usage ====
3890 #
3891 # --let $statement= <STATEMENT>
3892 # --let $output_file= {<FILE>|GENERATE}
3893-# [--let $server_number= <NUMBER>]
3894 # [--let $dont_print_statement= 1]
3895 # --source include/write_result_to_file.inc
3896 #
3897@@ -16,10 +18,6 @@
3898 # $statement
3899 # The statement to execute.
3900 #
3901-# $server_number
3902-# 1 for the master, 2 for the slave, 3 for next server, etc.
3903-# If omitted, uses current connection.
3904-#
3905 # $output_file
3906 # Name of file to write. If omitted, generates a new filename and
3907 # stores the name both in the mysqltest variable $output_file and
3908@@ -30,16 +28,14 @@
3909 # statement contains non-deterministic output, set this variable
3910 # to suppress it.
3911
3912---let _WRTF_SERVER_NUMBER= $server_number
3913-if (!$server_number)
3914-{
3915- --let _WRTF_SERVER_NUMBER= `SELECT 1 + @@PORT - $MASTER_MYPORT`
3916-}
3917+# Get the port and socket used by mysqld on current connection
3918+--let _WRTF_SERVER_PORT= `SELECT @@PORT`
3919+--let _WRTF_SERVER_SOCKET= `SELECT @@SOCKET`
3920
3921---let $_write_result_msg= [server=$_WRTF_SERVER_NUMBER]
3922+--let $_write_result_msg= [connection=$CURRENT_CONNECTION]
3923 if (!$dont_print_statement)
3924 {
3925- --let $_write_result_msg= [server=$_WRTF_SERVER_NUMBER statement=$statement]
3926+ --let $_write_result_msg= [connection=$CURRENT_CONNECTION statement=$statement]
3927 }
3928
3929 --let $include_filename= write_result_to_file.inc $_write_result_msg
3930@@ -63,12 +59,16 @@
3931 --let _WRTF_OUTPUT_FILE= $output_file
3932
3933 perl;
3934+ use strict;
3935 my $stmt= $ENV{'_WRTF_STATEMENT'};
3936- my $server_number= $ENV{'_WRTF_SERVER_NUMBER'};
3937+ # Connecting mysql to same mysqld as current connectiona
3938+ # by overriding port and socket
3939 my $mysql = $ENV{'MYSQL'};
3940- $mysql =~ s/( --|$)/ --defaults-group-suffix=.$server_number$1/;
3941+ my $server_port= $ENV{'_WRTF_SERVER_PORT'};
3942+ my $server_socket= $ENV{'_WRTF_SERVER_SOCKET'};
3943+ $mysql .= " --port=$server_port --socket=$server_socket";
3944 my $outfile = $ENV{'_WRTF_OUTPUT_FILE'};
3945- open MYSQL, "| $mysql > $outfile" or die "Failed to open pipe to client on server '$server_number': $!";
3946+ open MYSQL, "| $mysql > $outfile" or die "Failed to open MYSQL pipe: '$mysql > $outfile'";
3947 print MYSQL $stmt, ';' or die "Error printing statement to MYSQL pipe: $!";
3948 close MYSQL or die "Error closing MYSQL pipe: $!";
3949 EOF
3950
3951=== modified file 'Percona-Server/mysql-test/lib/My/SafeProcess/CMakeLists.txt'
3952--- Percona-Server/mysql-test/lib/My/SafeProcess/CMakeLists.txt 2011-05-20 11:50:50 +0000
3953+++ Percona-Server/mysql-test/lib/My/SafeProcess/CMakeLists.txt 2013-02-13 06:17:00 +0000
3954@@ -29,4 +29,4 @@
3955 IF(WIN32)
3956 INSTALL(TARGETS my_safe_kill DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test)
3957 ENDIF()
3958-INSTALL(FILES safe_process.pl Base.pm DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test)
3959+INSTALL(FILES Base.pm DESTINATION "${INSTALL_MYSQLTESTDIR}/lib/My/SafeProcess" COMPONENT Test)
3960
3961=== modified file 'Percona-Server/mysql-test/lib/My/SafeProcess/safe_process.cc'
3962--- Percona-Server/mysql-test/lib/My/SafeProcess/safe_process.cc 2011-09-07 10:08:09 +0000
3963+++ Percona-Server/mysql-test/lib/My/SafeProcess/safe_process.cc 2013-02-13 06:17:00 +0000
3964@@ -152,12 +152,19 @@
3965 pid_t own_pid= getpid();
3966 pid_t parent_pid= getppid();
3967 bool nocore = false;
3968-
3969+ struct sigaction sa,sa_abort;
3970+
3971+ sa.sa_handler= handle_signal;
3972+ sa.sa_flags= SA_NOCLDSTOP;
3973+ sigemptyset(&sa.sa_mask);
3974+
3975+ sa_abort.sa_handler= handle_abort;
3976+ sigemptyset(&sa_abort.sa_mask);
3977 /* Install signal handlers */
3978- signal(SIGTERM, handle_signal);
3979- signal(SIGINT, handle_signal);
3980- signal(SIGCHLD, handle_signal);
3981- signal(SIGABRT, handle_abort);
3982+ sigaction(SIGTERM, &sa,NULL);
3983+ sigaction(SIGINT, &sa,NULL);
3984+ sigaction(SIGCHLD, &sa,NULL);
3985+ sigaction(SIGABRT, &sa_abort,NULL);
3986
3987 sprintf(safe_process_name, "safe_process[%ld]", (long) own_pid);
3988
3989
3990=== removed file 'Percona-Server/mysql-test/lib/My/SafeProcess/safe_process.pl'
3991--- Percona-Server/mysql-test/lib/My/SafeProcess/safe_process.pl 2011-09-07 10:08:09 +0000
3992+++ Percona-Server/mysql-test/lib/My/SafeProcess/safe_process.pl 1970-01-01 00:00:00 +0000
3993@@ -1,166 +0,0 @@
3994-#!/usr/bin/perl
3995-# -*- cperl -*-
3996-
3997-# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
3998-#
3999-# This program is free software; you can redistribute it and/or modify
4000-# it under the terms of the GNU General Public License as published by
4001-# the Free Software Foundation; version 2 of the License.
4002-#
4003-# This program is distributed in the hope that it will be useful,
4004-# but WITHOUT ANY WARRANTY; without even the implied warranty of
4005-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4006-# GNU General Public License for more details.
4007-#
4008-# You should have received a copy of the GNU General Public License
4009-# along with this program; if not, write to the Free Software
4010-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
4011-
4012-use strict;
4013-use warnings;
4014-
4015-use lib 'lib';
4016-use My::SafeProcess::Base;
4017-use POSIX qw(WNOHANG);
4018-
4019-###########################################################################
4020-# Util functions
4021-###########################################################################
4022-
4023-#
4024-#Print message to stderr
4025-#
4026-my $verbose= 0;
4027-sub message {
4028- if ($verbose > 0){
4029- use Time::localtime;
4030- my $tm= localtime();
4031- my $timestamp= sprintf("%02d%02d%02d %2d:%02d:%02d",
4032- $tm->year % 100, $tm->mon+1, $tm->mday,
4033- $tm->hour, $tm->min, $tm->sec);
4034- print STDERR $timestamp, " monitor[$$]: ", @_, "\n";
4035- }
4036-}
4037-
4038-
4039-###########################################################################
4040-# Main program
4041-###########################################################################
4042-
4043-my $terminated= 0;
4044-
4045-# Protect against being killed in the middle
4046-# of child creation, just set the terminated flag
4047-# to make sure the child will be killed off
4048-# when program is ready to do that
4049-$SIG{TERM}= sub { message("!Got signal @_"); $terminated= 1; };
4050-$SIG{INT}= sub { message("!Got signal @_"); $terminated= 1; };
4051-
4052-my $parent_pid= getppid();
4053-
4054-my $found_double_dash= 0;
4055-while (my $arg= shift(@ARGV)){
4056-
4057- if ($arg =~ /^--$/){
4058- $found_double_dash= 1;
4059- last;
4060- }
4061- elsif ($arg =~ /^--verbose$/){
4062- $verbose= 1;
4063- }
4064- else {
4065- die "Unknown option: $arg";
4066- }
4067-}
4068-
4069-my $path= shift(@ARGV); # Executable
4070-
4071-die "usage:\n" .
4072- " safe_process.pl [opts] -- <path> [<args> [...<args_n>]]"
4073- unless defined $path || $found_double_dash;
4074-
4075-
4076-message("started");
4077-#message("path: '$path'");
4078-message("parent: $parent_pid");
4079-
4080-# Start process to monitor
4081-my $child_pid=
4082- create_process(
4083- path => $path,
4084- args => \@ARGV,
4085- setpgrp => 1,
4086- );
4087-message("Started child $child_pid");
4088-
4089-eval {
4090- sub handle_signal {
4091- $terminated= 1;
4092- message("Got signal @_");
4093-
4094- # Ignore all signals
4095- foreach my $name (keys %SIG){
4096- $SIG{$name}= 'IGNORE';
4097- }
4098-
4099- die "signaled\n";
4100- };
4101- local $SIG{TERM}= \&handle_signal;
4102- local $SIG{INT}= \&handle_signal;
4103- local $SIG{CHLD}= sub {
4104- message("Got signal @_");
4105- kill('KILL', -$child_pid);
4106- my $ret= waitpid($child_pid, 0);
4107- if ($? & 127){
4108- exit(65); # Killed by signal
4109- }
4110- exit($? >> 8);
4111- };
4112-
4113- # Monitoring loop
4114- while(!$terminated) {
4115-
4116- # Check if parent is still alive
4117- if (kill(0, $parent_pid) < 1){
4118- message("Parent is not alive anymore");
4119- last;
4120- }
4121-
4122- # Wait for child to terminate but wakeup every
4123- # second to also check that parent is still alive
4124- my $ret_pid;
4125- $ret_pid= waitpid($child_pid, &WNOHANG);
4126- if ($ret_pid == $child_pid) {
4127- # Process has exited, collect return status
4128- my $ret_code= $? >> 8;
4129- message("Child exit: $ret_code");
4130- # Exit with exit status of the child
4131- exit ($ret_code);
4132- }
4133- sleep(1);
4134- }
4135-};
4136-if ( $@ ) {
4137- # The monitoring loop should have been
4138- # broken by handle_signal
4139- warn "Unexpected: $@" unless ( $@ =~ /signaled/ );
4140-}
4141-
4142-# Use negative pid in order to kill the whole
4143-# process group
4144-#
4145-my $ret= kill('KILL', -$child_pid);
4146-message("Killed child: $child_pid, ret: $ret");
4147-if ($ret > 0) {
4148- message("Killed child: $child_pid");
4149- # Wait blocking for the child to return
4150- my $ret_pid= waitpid($child_pid, 0);
4151- if ($ret_pid != $child_pid){
4152- message("unexpected pid $ret_pid returned from waitpid($child_pid)");
4153- }
4154-}
4155-
4156-message("DONE!");
4157-exit (1);
4158-
4159-
4160
4161=== modified file 'Percona-Server/mysql-test/lib/mtr_cases.pm'
4162--- Percona-Server/mysql-test/lib/mtr_cases.pm 2012-10-16 06:21:51 +0000
4163+++ Percona-Server/mysql-test/lib/mtr_cases.pm 2013-02-13 06:17:00 +0000
4164@@ -295,6 +295,7 @@
4165 "storage/*/mtr",
4166 # Look in plugin specific suite dir
4167 "plugin/$suite/tests",
4168+ "internal/plugin/$suite/tests",
4169 ],
4170 [$suite, "mtr"], ($suite =~ /^i_/));
4171 return unless $suitedir;
4172@@ -986,18 +987,11 @@
4173 if ( $tinfo->{'ndb_test'} )
4174 {
4175 # This is a NDB test
4176- if ( $::opt_skip_ndbcluster == 2 )
4177- {
4178- # Ndb is not supported, skip it
4179- $tinfo->{'skip'}= 1;
4180- $tinfo->{'comment'}= "No ndbcluster support or ndb tests not enabled";
4181- return $tinfo;
4182- }
4183- elsif ( $::opt_skip_ndbcluster )
4184- {
4185- # All ndb test's should be skipped
4186- $tinfo->{'skip'}= 1;
4187- $tinfo->{'comment'}= "No ndbcluster tests(--skip-ndbcluster)";
4188+ if ( $::ndbcluster_enabled == 0)
4189+ {
4190+ # ndbcluster is disabled
4191+ $tinfo->{'skip'}= 1;
4192+ $tinfo->{'comment'}= "ndbcluster disabled";
4193 return $tinfo;
4194 }
4195 }
4196
4197=== modified file 'Percona-Server/mysql-test/lib/mtr_report.pm'
4198--- Percona-Server/mysql-test/lib/mtr_report.pm 2012-08-22 04:47:43 +0000
4199+++ Percona-Server/mysql-test/lib/mtr_report.pm 2013-02-13 06:17:00 +0000
4200@@ -28,7 +28,7 @@
4201 mtr_verbose_restart mtr_report_test_passed
4202 mtr_report_test_skipped mtr_print
4203 mtr_report_test_subunit
4204- mtr_report_test);
4205+ mtr_report_test isotime);
4206
4207 use mtr_match;
4208 use Subunit;
4209@@ -111,6 +111,8 @@
4210 $tinfo->{'result'}= 'MTR_RES_PASSED';
4211
4212 mtr_report_test($tinfo);
4213+
4214+ resfile_global("endtime ", isotime (time));
4215 }
4216
4217
4218@@ -598,4 +600,12 @@
4219 }
4220
4221
4222+# Used by --result-file for for formatting times
4223+
4224+sub isotime($) {
4225+ my ($sec,$min,$hr,$day,$mon,$yr)= gmtime($_[0]);
4226+ return sprintf "%d-%02d-%02dT%02d:%02d:%02dZ",
4227+ $yr+1900, $mon+1, $day, $hr, $min, $sec;
4228+}
4229+
4230 1;
4231
4232=== modified file 'Percona-Server/mysql-test/mysql-test-run.pl'
4233--- Percona-Server/mysql-test/mysql-test-run.pl 2012-12-04 08:24:59 +0000
4234+++ Percona-Server/mysql-test/mysql-test-run.pl 2013-02-13 06:17:00 +0000
4235@@ -164,7 +164,7 @@
4236
4237 # If you add a new suite, please check TEST_DIRS in Makefile.am.
4238 #
4239-my $DEFAULT_SUITES= "main,sys_vars,binlog,federated,rpl,innodb,innodb_fts,perfschema,funcs_1,opt_trace";
4240+my $DEFAULT_SUITES= "main,sys_vars,binlog,federated,rpl,innodb,innodb_fts,perfschema,funcs_1,opt_trace,parts";
4241 my $opt_suites;
4242
4243 our $opt_verbose= 0; # Verbose output, enable with --verbose
4244@@ -315,8 +315,9 @@
4245
4246 our $opt_warnings= 1;
4247
4248-our $opt_include_ndbcluster= 0;
4249-our $opt_skip_ndbcluster= 1;
4250+our $ndbcluster_enabled= 0;
4251+my $opt_include_ndbcluster= 0;
4252+my $opt_skip_ndbcluster= 0;
4253
4254 my $exe_ndbd;
4255 my $exe_ndbmtd;
4256@@ -339,14 +340,6 @@
4257 select(STDOUT);
4258 $| = 1; # Automatically flush STDOUT
4259
4260-# Used by --result-file for for formatting times
4261-
4262-sub isotime($) {
4263- my ($sec,$min,$hr,$day,$mon,$yr)= gmtime($_[0]);
4264- return sprintf "%d-%02d-%02dT%02d:%02d:%02dZ",
4265- $yr+1900, $mon+1, $day, $hr, $min, $sec;
4266-}
4267-
4268 main();
4269
4270
4271@@ -370,26 +363,6 @@
4272
4273 if (!$opt_suites) {
4274 $opt_suites= $DEFAULT_SUITES;
4275-
4276- # Check for any extra suites to enable based on the path name
4277- my %extra_suites=
4278- (
4279- "mysql-5.1-new-ndb" => "ndb_team",
4280- "mysql-5.1-new-ndb-merge" => "ndb_team",
4281- "mysql-5.1-telco-6.2" => "ndb_team",
4282- "mysql-5.1-telco-6.2-merge" => "ndb_team",
4283- "mysql-5.1-telco-6.3" => "ndb_team",
4284- "mysql-6.0-ndb" => "ndb_team",
4285- );
4286-
4287- foreach my $dir ( reverse splitdir($basedir) ) {
4288- my $extra_suite= $extra_suites{$dir};
4289- if (defined $extra_suite) {
4290- mtr_report("Found extra suite: $extra_suite");
4291- $opt_suites= "$extra_suite,$opt_suites";
4292- last;
4293- }
4294- }
4295 }
4296 mtr_report("Using suites: $opt_suites") unless @opt_cases;
4297
4298@@ -463,6 +436,7 @@
4299
4300 # Also read from any plugin local or suite specific plugin.defs
4301 for (glob "$basedir/plugin/*/tests/mtr/plugin.defs".
4302+ " $basedir/internal/plugin/*/tests/mtr/plugin.defs".
4303 " suite/*/plugin.defs") {
4304 read_plugin_defs($_);
4305 }
4306@@ -730,6 +704,10 @@
4307 else {
4308 mtr_report("\nRetrying test $tname, ".
4309 "attempt($retries/$opt_retry)...\n");
4310+ #saving the log file as filename.failed in case of retry
4311+ my $worker_logdir= $result->{savedir};
4312+ my $log_file_name=dirname($worker_logdir)."/".$result->{shortname}.".log";
4313+ rename $log_file_name,$log_file_name.".failed";
4314 delete($result->{result});
4315 $result->{retries}= $retries+1;
4316 $result->write_test($sock, 'TESTCASE');
4317@@ -1079,7 +1057,7 @@
4318 # Control what test suites or cases to run
4319 'force' => \$opt_force,
4320 'with-ndbcluster-only' => \&collect_option,
4321- 'include-ndbcluster' => \$opt_include_ndbcluster,
4322+ 'ndb|include-ndbcluster' => \$opt_include_ndbcluster,
4323 'skip-ndbcluster|skip-ndb' => \$opt_skip_ndbcluster,
4324 'suite|suites=s' => \$opt_suites,
4325 'skip-rpl' => \&collect_option,
4326@@ -1535,7 +1513,6 @@
4327 }
4328 $ENV{'PATH'}= "$ENV{'PATH'}".$separator.$lib_mysqld;
4329 }
4330- $opt_skip_ndbcluster= 1; # Turn off use of NDB cluster
4331 $opt_skip_ssl= 1; # Turn off use of SSL
4332
4333 # Turn off use of bin log
4334@@ -2036,7 +2013,7 @@
4335 "$bindir/libmysqld/examples/mysql_embedded",
4336 "$bindir/bin/mysql_embedded");
4337
4338- if ( ! $opt_skip_ndbcluster )
4339+ if ( $ndbcluster_enabled )
4340 {
4341 # Look for single threaded NDB
4342 $exe_ndbd=
4343@@ -2312,7 +2289,7 @@
4344 # --------------------------------------------------------------------------
4345 # Add the path where libndbclient can be found
4346 # --------------------------------------------------------------------------
4347- if ( !$opt_skip_ndbcluster )
4348+ if ( $ndbcluster_enabled )
4349 {
4350 push(@ld_library_paths,
4351 "$basedir/storage/ndb/src/.libs",
4352@@ -2406,7 +2383,7 @@
4353 # ----------------------------------------------------
4354 # Setup env for NDB
4355 # ----------------------------------------------------
4356- if ( ! $opt_skip_ndbcluster )
4357+ if ( $ndbcluster_enabled )
4358 {
4359 $ENV{'NDB_MGM'}=
4360 my_find_bin($bindir,
4361@@ -2838,37 +2815,87 @@
4362 sub check_ndbcluster_support ($) {
4363 my $mysqld_variables= shift;
4364
4365+ my $ndbcluster_supported = 0;
4366+ if ($mysqld_variables{'ndb-connectstring'})
4367+ {
4368+ $ndbcluster_supported = 1;
4369+ }
4370+
4371+ if ($opt_skip_ndbcluster && $opt_include_ndbcluster)
4372+ {
4373+ # User is ambivalent. Theoretically the arg which was
4374+ # given last on command line should win, but that order is
4375+ # unknown at this time.
4376+ mtr_error("Ambigous command, both --include-ndbcluster " .
4377+ " and --skip-ndbcluster was specified");
4378+ }
4379+
4380 # Check if this is MySQL Cluster, ie. mysql version string ends
4381 # with -ndb-Y.Y.Y[-status]
4382 if ( defined $mysql_version_extra &&
4383- $mysql_version_extra =~ /^-ndb-/ )
4384- {
4385- mtr_report(" - MySQL Cluster");
4386- # Enable ndb engine and add more test suites
4387- $opt_include_ndbcluster = 1;
4388- $DEFAULT_SUITES.=",ndb,ndb_binlog,rpl_ndb,ndb_rpl,ndb_memcache";
4389- }
4390-
4391- if ($opt_include_ndbcluster)
4392- {
4393- $opt_skip_ndbcluster= 0;
4394- }
4395-
4396- if ($opt_skip_ndbcluster)
4397- {
4398- mtr_report(" - skipping ndbcluster");
4399- return;
4400- }
4401-
4402- if ( ! $mysqld_variables{'ndb-connectstring'} )
4403- {
4404- mtr_report(" - skipping ndbcluster, mysqld not compiled with ndbcluster");
4405- $opt_skip_ndbcluster= 2;
4406- return;
4407- }
4408-
4409- mtr_report(" - using ndbcluster when necessary, mysqld supports it");
4410-
4411+ $mysql_version_extra =~ /-ndb-([0-9]*)\.([0-9]*)\.([0-9]*)/ )
4412+ {
4413+ # MySQL Cluster tree
4414+ mtr_report(" - MySQL Cluster detected");
4415+
4416+ if ($opt_skip_ndbcluster)
4417+ {
4418+ mtr_report(" - skipping ndbcluster(--skip-ndbcluster)");
4419+ return;
4420+ }
4421+
4422+ if (!$ndbcluster_supported)
4423+ {
4424+ # MySQL Cluster tree, but mysqld was not compiled with
4425+ # ndbcluster -> fail unless --skip-ndbcluster was used
4426+ mtr_error("This is MySQL Cluster but mysqld does not " .
4427+ "support ndbcluster. Use --skip-ndbcluster to " .
4428+ "force mtr to run without it.");
4429+ }
4430+
4431+ # mysqld was compiled with ndbcluster -> auto enable
4432+ }
4433+ else
4434+ {
4435+ # Not a MySQL Cluster tree
4436+ if (!$ndbcluster_supported)
4437+ {
4438+ if ($opt_include_ndbcluster)
4439+ {
4440+ mtr_error("Could not detect ndbcluster support ".
4441+ "requested with --include-ndbcluster");
4442+ }
4443+
4444+ # Silently skip, mysqld was compiled without ndbcluster
4445+ # which is the default case
4446+ return;
4447+ }
4448+
4449+ if ($opt_skip_ndbcluster)
4450+ {
4451+ # Compiled with ndbcluster but ndbcluster skipped
4452+ mtr_report(" - skipping ndbcluster(--skip-ndbcluster)");
4453+ return;
4454+ }
4455+
4456+
4457+ # Not a MySQL Cluster tree, enable ndbcluster
4458+ # if --include-ndbcluster was used
4459+ if ($opt_include_ndbcluster)
4460+ {
4461+ # enable ndbcluster
4462+ }
4463+ else
4464+ {
4465+ mtr_report(" - skipping ndbcluster(disabled by default)");
4466+ return;
4467+ }
4468+ }
4469+
4470+ mtr_report(" - enabling ndbcluster");
4471+ $ndbcluster_enabled= 1;
4472+ # Add MySQL Cluster test suites
4473+ $DEFAULT_SUITES.=",ndb,ndb_binlog,rpl_ndb,ndb_rpl,ndb_memcache";
4474 return;
4475 }
4476
4477@@ -6257,6 +6284,7 @@
4478 $err_in_report= 1 if $line =~ /ERROR SUMMARY: [1-9]/;
4479 $err_in_report= 1 if $line =~ /definitely lost: [1-9]/;
4480 $err_in_report= 1 if $line =~ /possibly lost: [1-9]/;
4481+ $err_in_report= 1 if $line =~ /still reachable: [1-9]/;
4482 }
4483 }
4484
4485@@ -6282,6 +6310,7 @@
4486
4487 # Just ignore if not configured/built to run ctest
4488 if (! -f "CTestTestfile.cmake") {
4489+ mtr_report("No unit tests found.");
4490 chdir($olddir);
4491 return;
4492 }
4493@@ -6292,6 +6321,7 @@
4494 # Also silently ignore if we don't have ctest and didn't insist
4495 # Special override: also ignore in Pushbuild, some platforms may not have it
4496 # Now, run ctest and collect output
4497+ $ENV{CTEST_OUTPUT_ON_FAILURE} = 1;
4498 my $ctest_out= `ctest $ctest_vs 2>&1`;
4499 if ($? == $no_ctest && $opt_ctest == -1 && ! defined $ENV{PB2WORKDIR}) {
4500 chdir($olddir);
4501
4502=== modified file 'Percona-Server/mysql-test/r/alter_table.result'
4503--- Percona-Server/mysql-test/r/alter_table.result 2012-12-04 08:24:59 +0000
4504+++ Percona-Server/mysql-test/r/alter_table.result 2013-02-13 06:17:00 +0000
4505@@ -1581,9 +1581,9 @@
4506 ERROR HY000: Unknown LOCK type 'INVALID'
4507 ALTER TABLE m1 ENABLE KEYS, LOCK= DEFAULT;
4508 ALTER TABLE m1 ENABLE KEYS, LOCK= NONE;
4509-ERROR 42000: This version of MySQL doesn't yet support 'ALTER TABLE m1 ENABLE KEYS, LOCK= NONE'
4510+ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE.
4511 ALTER TABLE m1 ENABLE KEYS, LOCK= SHARED;
4512-ERROR 42000: This version of MySQL doesn't yet support 'ALTER TABLE m1 ENABLE KEYS, LOCK= SHARED'
4513+ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE.
4514 ALTER TABLE m1 ENABLE KEYS, LOCK= EXCLUSIVE;
4515 ALTER TABLE t1 DROP INDEX i1, DROP INDEX i2, DROP INDEX i3, DROP INDEX i4;
4516 #
4517@@ -1603,7 +1603,7 @@
4518 Warnings:
4519 Note 1831 Duplicate index 'i3' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release.
4520 ALTER TABLE t1 ADD INDEX i4(b), ALGORITHM= COPY, LOCK= NONE;
4521-ERROR 42000: This version of MySQL doesn't yet support 'ALTER TABLE t1 ADD INDEX i4(b), ALGORITHM= COPY, LOCK= NONE'
4522+ERROR 0A000: LOCK=NONE is not supported. Reason: COPY algorithm requires a lock. Try LOCK=SHARED.
4523 ALTER TABLE t1 ADD INDEX i5(b), ALGORITHM= COPY, LOCK= SHARED;
4524 affected rows: 2
4525 info: Records: 2 Duplicates: 0 Warnings: 1
4526@@ -1615,13 +1615,13 @@
4527 Warnings:
4528 Note 1831 Duplicate index 'i6' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release.
4529 ALTER TABLE m1 ENABLE KEYS, ALGORITHM= INPLACE, LOCK= NONE;
4530-ERROR 42000: This version of MySQL doesn't yet support 'ALTER TABLE m1 ENABLE KEYS, ALGORITHM= INPLACE, LOCK= NONE'
4531+ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE.
4532 ALTER TABLE m1 ENABLE KEYS, ALGORITHM= INPLACE, LOCK= SHARED;
4533-ERROR 42000: This version of MySQL doesn't yet support 'ALTER TABLE m1 ENABLE KEYS, ALGORITHM= INPLACE, LOCK= SHARED'
4534+ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE.
4535 ALTER TABLE m1 ENABLE KEYS, ALGORITHM= INPLACE, LOCK= EXCLUSIVE;
4536 affected rows: 0
4537 ALTER TABLE m1 ENABLE KEYS, ALGORITHM= COPY, LOCK= NONE;
4538-ERROR 42000: This version of MySQL doesn't yet support 'ALTER TABLE m1 ENABLE KEYS, ALGORITHM= COPY, LOCK= NONE'
4539+ERROR 0A000: LOCK=NONE is not supported. Reason: COPY algorithm requires a lock. Try LOCK=SHARED.
4540 ALTER TABLE m1 ENABLE KEYS, ALGORITHM= COPY, LOCK= SHARED;
4541 affected rows: 2
4542 info: Records: 2 Duplicates: 0 Warnings: 0
4543@@ -1721,7 +1721,7 @@
4544 affected rows: 2
4545 info: Records: 2 Duplicates: 0 Warnings: 0
4546 ALTER TABLE ti1 ADD PRIMARY KEY(a), ALGORITHM=INPLACE;
4547-ERROR 42000: This version of MySQL doesn't yet support 'ALTER TABLE ti1 ADD PRIMARY KEY(a), ALGORITHM=INPLACE'
4548+ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try ALGORITHM=COPY.
4549 ALTER TABLE ti1 ADD PRIMARY KEY(a);
4550 affected rows: 2
4551 info: Records: 2 Duplicates: 0 Warnings: 0
4552@@ -1794,9 +1794,12 @@
4553 ALTER TABLE tm1 MODIFY COLUMN e INT FIRST;
4554 affected rows: 2
4555 info: Records: 2 Duplicates: 0 Warnings: 0
4556+SET @orig_sql_mode = @@sql_mode;
4557+SET @@sql_mode = 'STRICT_TRANS_TABLES';
4558 ALTER TABLE ti1 MODIFY COLUMN c INT NOT NULL;
4559 affected rows: 0
4560 info: Records: 0 Duplicates: 0 Warnings: 0
4561+SET @@sql_mode = @orig_sql_mode;
4562 ALTER TABLE tm1 MODIFY COLUMN c INT NOT NULL;
4563 affected rows: 2
4564 info: Records: 2 Duplicates: 0 Warnings: 0
4565
4566=== modified file 'Percona-Server/mysql-test/r/connect.result'
4567--- Percona-Server/mysql-test/r/connect.result 2012-10-16 06:21:51 +0000
4568+++ Percona-Server/mysql-test/r/connect.result 2013-02-13 06:17:00 +0000
4569@@ -340,15 +340,16 @@
4570 ERROR HY000: You must SET PASSWORD before executing this statement
4571 CALL test_t1(last_t1() + 1);
4572 ERROR HY000: You must SET PASSWORD before executing this statement
4573-# setting a password with a user name is no good
4574+# setting a password with a user name is ok if it exactly matches the
4575+# authenticated user.
4576 SET PASSWORD FOR must_change@localhost = PASSWORD('aha3');
4577-ERROR HY000: You must SET PASSWORD before executing this statement
4578 SELECT USER();
4579-ERROR HY000: You must SET PASSWORD before executing this statement
4580+USER()
4581+must_change@localhost
4582 SELECT last_t1();
4583-ERROR HY000: You must SET PASSWORD before executing this statement
4584+last_t1()
4585+4
4586 CALL test_t1(last_t1() + 1);
4587-ERROR HY000: You must SET PASSWORD before executing this statement
4588 # setting a password for the current user works
4589 SET PASSWORD FOR CURRENT_USER() = PASSWORD('aha3');
4590 SELECT USER();
4591@@ -356,7 +357,7 @@
4592 must_change@localhost
4593 SELECT last_t1();
4594 last_t1()
4595-4
4596+5
4597 CALL test_t1(last_t1() + 1);
4598 # testing the ALTER USER command
4599 # try a single user
4600@@ -392,6 +393,21 @@
4601 DROP FUNCTION last_t1;
4602 DROP TABLE t1;
4603 DROP USER must_change@localhost;
4604+#
4605+# WL#6587: Protocol support for password expiration
4606+#
4607+CREATE USER wl6587@localhost IDENTIFIED BY 'wl6587';
4608+ALTER USER wl6587@localhost PASSWORD EXPIRE;
4609+# non-interactive mysql should fail
4610+Warning: Using a password on the command line interface can be insecure.
4611+ERROR 1820 (HY000): You must SET PASSWORD before executing this statement
4612+# mysqladmin non-password should fail
4613+Warning: Using a password on the command line interface can be insecure.
4614+mysqladmin: connect to server at 'localhost' failed
4615+error: 'You must SET PASSWORD before executing this statement'
4616+# mysqladmin password should work
4617+Warning: Using a password on the command line interface can be insecure.
4618+DROP USER wl6587@localhost;
4619 # ------------------------------------------------------------------
4620 # -- End of 5.6 tests
4621 # ------------------------------------------------------------------
4622
4623=== modified file 'Percona-Server/mysql-test/r/create.result'
4624--- Percona-Server/mysql-test/r/create.result 2012-10-16 06:21:51 +0000
4625+++ Percona-Server/mysql-test/r/create.result 2013-02-13 06:17:00 +0000
4626@@ -1889,7 +1889,7 @@
4627 show create table t1;
4628 Table Create Table
4629 t1 CREATE TABLE `t1` (
4630- `ID` bigint(4) NOT NULL DEFAULT '0',
4631+ `ID` bigint(21) unsigned NOT NULL DEFAULT '0',
4632 `USER` varchar(16) NOT NULL DEFAULT '',
4633 `HOST` varchar(64) NOT NULL DEFAULT '',
4634 `DB` varchar(64) DEFAULT NULL,
4635@@ -1904,7 +1904,7 @@
4636 show create table t1;
4637 Table Create Table
4638 t1 CREATE TEMPORARY TABLE `t1` (
4639- `ID` bigint(4) NOT NULL DEFAULT '0',
4640+ `ID` bigint(21) unsigned NOT NULL DEFAULT '0',
4641 `USER` varchar(16) NOT NULL DEFAULT '',
4642 `HOST` varchar(64) NOT NULL DEFAULT '',
4643 `DB` varchar(64) DEFAULT NULL,
4644
4645=== modified file 'Percona-Server/mysql-test/r/ctype_binary.result'
4646--- Percona-Server/mysql-test/r/ctype_binary.result 2012-10-16 06:21:51 +0000
4647+++ Percona-Server/mysql-test/r/ctype_binary.result 2013-02-13 06:17:00 +0000
4648@@ -746,7 +746,7 @@
4649 show create table t1;
4650 Table Create Table
4651 t1 CREATE TABLE `t1` (
4652- `c1` varbinary(10) NOT NULL DEFAULT ''
4653+ `c1` varbinary(21) NOT NULL DEFAULT ''
4654 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
4655 drop table t1;
4656 select hex(concat(inet_aton('127.1.1.1')));
4657
4658=== modified file 'Percona-Server/mysql-test/r/ctype_cp1251.result'
4659--- Percona-Server/mysql-test/r/ctype_cp1251.result 2012-10-16 06:21:51 +0000
4660+++ Percona-Server/mysql-test/r/ctype_cp1251.result 2013-02-13 06:17:00 +0000
4661@@ -1138,7 +1138,7 @@
4662 show create table t1;
4663 Table Create Table
4664 t1 CREATE TABLE `t1` (
4665- `c1` varchar(10) CHARACTER SET cp1251 NOT NULL DEFAULT ''
4666+ `c1` varchar(21) CHARACTER SET cp1251 NOT NULL DEFAULT ''
4667 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
4668 drop table t1;
4669 select hex(concat(inet_aton('127.1.1.1')));
4670
4671=== modified file 'Percona-Server/mysql-test/r/ctype_latin1.result'
4672--- Percona-Server/mysql-test/r/ctype_latin1.result 2012-10-16 06:21:51 +0000
4673+++ Percona-Server/mysql-test/r/ctype_latin1.result 2013-02-13 06:17:00 +0000
4674@@ -1165,7 +1165,7 @@
4675 show create table t1;
4676 Table Create Table
4677 t1 CREATE TABLE `t1` (
4678- `c1` varchar(10) NOT NULL DEFAULT ''
4679+ `c1` varchar(21) NOT NULL DEFAULT ''
4680 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
4681 drop table t1;
4682 select hex(concat(inet_aton('127.1.1.1')));
4683
4684=== modified file 'Percona-Server/mysql-test/r/ctype_ucs.result'
4685--- Percona-Server/mysql-test/r/ctype_ucs.result 2012-12-04 08:24:59 +0000
4686+++ Percona-Server/mysql-test/r/ctype_ucs.result 2013-02-13 06:17:00 +0000
4687@@ -2083,7 +2083,7 @@
4688 show create table t1;
4689 Table Create Table
4690 t1 CREATE TABLE `t1` (
4691- `c1` varchar(10) CHARACTER SET ucs2 NOT NULL DEFAULT ''
4692+ `c1` varchar(21) CHARACTER SET ucs2 NOT NULL DEFAULT ''
4693 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
4694 drop table t1;
4695 select hex(concat(inet_aton('127.1.1.1')));
4696
4697=== modified file 'Percona-Server/mysql-test/r/ctype_utf8.result'
4698--- Percona-Server/mysql-test/r/ctype_utf8.result 2012-10-16 06:21:51 +0000
4699+++ Percona-Server/mysql-test/r/ctype_utf8.result 2013-02-13 06:17:00 +0000
4700@@ -2992,7 +2992,7 @@
4701 show create table t1;
4702 Table Create Table
4703 t1 CREATE TABLE `t1` (
4704- `c1` varchar(10) CHARACTER SET utf8 NOT NULL DEFAULT ''
4705+ `c1` varchar(21) CHARACTER SET utf8 NOT NULL DEFAULT ''
4706 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
4707 drop table t1;
4708 select hex(concat(inet_aton('127.1.1.1')));
4709
4710=== modified file 'Percona-Server/mysql-test/r/ddl_i18n_koi8r.result'
4711--- Percona-Server/mysql-test/r/ddl_i18n_koi8r.result 2011-10-25 10:23:23 +0000
4712+++ Percona-Server/mysql-test/r/ddl_i18n_koi8r.result 2013-02-13 06:17:00 +0000
4713@@ -734,7 +734,7 @@
4714 /*!50003 SET @saved_sql_mode = @@sql_mode */ ;
4715 /*!50003 SET sql_mode = '' */ ;
4716 DELIMITER ;;
4717-/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `p1`(
4718+CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`(
4719 INOUT ÐÁÒÁÍ1 CHAR(10),
4720 OUT ÐÁÒÁÍ2 CHAR(10))
4721 BEGIN
4722@@ -751,7 +751,7 @@
4723 @@character_set_client AS c8;
4724 SET ÐÁÒÁÍ1 = 'a';
4725 SET ÐÁÒÁÍ2 = 'b';
4726-END */;;
4727+END ;;
4728 DELIMITER ;
4729 /*!50003 SET sql_mode = @saved_sql_mode */ ;
4730 /*!50003 SET character_set_client = @saved_cs_client */ ;
4731@@ -768,7 +768,7 @@
4732 /*!50003 SET @saved_sql_mode = @@sql_mode */ ;
4733 /*!50003 SET sql_mode = '' */ ;
4734 DELIMITER ;;
4735-/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `p2`(
4736+CREATE DEFINER=`root`@`localhost` PROCEDURE `p2`(
4737 INOUT ÐÁÒÁÍ1 CHAR(10) CHARACTER SET utf8,
4738 OUT ÐÁÒÁÍ2 CHAR(10) CHARACTER SET utf8)
4739 BEGIN
4740@@ -785,7 +785,7 @@
4741 @@character_set_client AS c8;
4742 SET ÐÁÒÁÍ1 = 'a';
4743 SET ÐÁÒÁÍ2 = 'b';
4744-END */;;
4745+END ;;
4746 DELIMITER ;
4747 /*!50003 SET sql_mode = @saved_sql_mode */ ;
4748 /*!50003 SET character_set_client = @saved_cs_client */ ;
4749@@ -810,7 +810,7 @@
4750 /*!50003 SET @saved_sql_mode = @@sql_mode */ ;
4751 /*!50003 SET sql_mode = '' */ ;
4752 DELIMITER ;;
4753-/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `p3`(
4754+CREATE DEFINER=`root`@`localhost` PROCEDURE `p3`(
4755 INOUT ÐÁÒÁÍ1 CHAR(10),
4756 OUT ÐÁÒÁÍ2 CHAR(10))
4757 BEGIN
4758@@ -827,7 +827,7 @@
4759 @@character_set_client AS c8;
4760 SET ÐÁÒÁÍ1 = 'a';
4761 SET ÐÁÒÁÍ2 = 'b';
4762-END */;;
4763+END ;;
4764 DELIMITER ;
4765 /*!50003 SET sql_mode = @saved_sql_mode */ ;
4766 /*!50003 SET character_set_client = @saved_cs_client */ ;
4767@@ -844,7 +844,7 @@
4768 /*!50003 SET @saved_sql_mode = @@sql_mode */ ;
4769 /*!50003 SET sql_mode = '' */ ;
4770 DELIMITER ;;
4771-/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `p4`(
4772+CREATE DEFINER=`root`@`localhost` PROCEDURE `p4`(
4773 INOUT ÐÁÒÁÍ1 CHAR(10) CHARACTER SET utf8,
4774 OUT ÐÁÒÁÍ2 CHAR(10) CHARACTER SET utf8)
4775 BEGIN
4776@@ -861,7 +861,7 @@
4777 @@character_set_client AS c8;
4778 SET ÐÁÒÁÍ1 = 'a';
4779 SET ÐÁÒÁÍ2 = 'b';
4780-END */;;
4781+END ;;
4782 DELIMITER ;
4783 /*!50003 SET sql_mode = @saved_sql_mode */ ;
4784 /*!50003 SET character_set_client = @saved_cs_client */ ;
4785
4786=== modified file 'Percona-Server/mysql-test/r/ddl_i18n_utf8.result'
4787--- Percona-Server/mysql-test/r/ddl_i18n_utf8.result 2011-10-25 10:23:23 +0000
4788+++ Percona-Server/mysql-test/r/ddl_i18n_utf8.result 2013-02-13 06:17:00 +0000
4789@@ -734,7 +734,7 @@
4790 /*!50003 SET @saved_sql_mode = @@sql_mode */ ;
4791 /*!50003 SET sql_mode = '' */ ;
4792 DELIMITER ;;
4793-/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `p1`(
4794+CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`(
4795 INOUT парам1 CHAR(10),
4796 OUT парам2 CHAR(10))
4797 BEGIN
4798@@ -751,7 +751,7 @@
4799 @@character_set_client AS c8;
4800 SET парам1 = 'a';
4801 SET парам2 = 'b';
4802-END */;;
4803+END ;;
4804 DELIMITER ;
4805 /*!50003 SET sql_mode = @saved_sql_mode */ ;
4806 /*!50003 SET character_set_client = @saved_cs_client */ ;
4807@@ -768,7 +768,7 @@
4808 /*!50003 SET @saved_sql_mode = @@sql_mode */ ;
4809 /*!50003 SET sql_mode = '' */ ;
4810 DELIMITER ;;
4811-/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `p2`(
4812+CREATE DEFINER=`root`@`localhost` PROCEDURE `p2`(
4813 INOUT парам1 CHAR(10) CHARACTER SET utf8,
4814 OUT парам2 CHAR(10) CHARACTER SET utf8)
4815 BEGIN
4816@@ -785,7 +785,7 @@
4817 @@character_set_client AS c8;
4818 SET парам1 = 'a';
4819 SET парам2 = 'b';
4820-END */;;
4821+END ;;
4822 DELIMITER ;
4823 /*!50003 SET sql_mode = @saved_sql_mode */ ;
4824 /*!50003 SET character_set_client = @saved_cs_client */ ;
4825@@ -810,7 +810,7 @@
4826 /*!50003 SET @saved_sql_mode = @@sql_mode */ ;
4827 /*!50003 SET sql_mode = '' */ ;
4828 DELIMITER ;;
4829-/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `p3`(
4830+CREATE DEFINER=`root`@`localhost` PROCEDURE `p3`(
4831 INOUT парам1 CHAR(10),
4832 OUT парам2 CHAR(10))
4833 BEGIN
4834@@ -827,7 +827,7 @@
4835 @@character_set_client AS c8;
4836 SET парам1 = 'a';
4837 SET парам2 = 'b';
4838-END */;;
4839+END ;;
4840 DELIMITER ;
4841 /*!50003 SET sql_mode = @saved_sql_mode */ ;
4842 /*!50003 SET character_set_client = @saved_cs_client */ ;
4843@@ -844,7 +844,7 @@
4844 /*!50003 SET @saved_sql_mode = @@sql_mode */ ;
4845 /*!50003 SET sql_mode = '' */ ;
4846 DELIMITER ;;
4847-/*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `p4`(
4848+CREATE DEFINER=`root`@`localhost` PROCEDURE `p4`(
4849 INOUT парам1 CHAR(10) CHARACTER SET utf8,
4850 OUT парам2 CHAR(10) CHARACTER SET utf8)
4851 BEGIN
4852@@ -861,7 +861,7 @@
4853 @@character_set_client AS c8;
4854 SET парам1 = 'a';
4855 SET парам2 = 'b';
4856-END */;;
4857+END ;;
4858 DELIMITER ;
4859 /*!50003 SET sql_mode = @saved_sql_mode */ ;
4860 /*!50003 SET character_set_client = @saved_cs_client */ ;
4861
4862=== modified file 'Percona-Server/mysql-test/r/derived.result'
4863--- Percona-Server/mysql-test/r/derived.result 2012-10-16 06:21:51 +0000
4864+++ Percona-Server/mysql-test/r/derived.result 2013-02-13 06:17:00 +0000
4865@@ -171,6 +171,10 @@
4866 create table t2 (mat_id MEDIUMINT UNSIGNED NOT NULL, pla_id MEDIUMINT UNSIGNED NOT NULL);
4867 insert into t1 values (NULL, 'a', 1), (NULL, 'b', 2), (NULL, 'c', 3), (NULL, 'd', 4), (NULL, 'e', 5), (NULL, 'f', 6), (NULL, 'g', 7), (NULL, 'h', 8), (NULL, 'i', 9);
4868 insert into t2 values (1, 100), (1, 101), (1, 102), (2, 100), (2, 103), (2, 104), (3, 101), (3, 102), (3, 105);
4869+analyze table t1, t2;
4870+Table Op Msg_type Msg_text
4871+test.t1 analyze status OK
4872+test.t2 analyze status OK
4873 SELECT STRAIGHT_JOIN d.pla_id, m2.mat_id FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum;
4874 pla_id mat_id
4875 100 1
4876@@ -190,13 +194,13 @@
4877 explain SELECT STRAIGHT_JOIN d.pla_id, m2.mat_id FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum;
4878 id select_type table type possible_keys key key_len ref rows Extra
4879 1 PRIMARY m2 ALL NULL NULL NULL NULL 9 NULL
4880-1 PRIMARY <derived2> ALL NULL NULL NULL NULL 9 Using where; Using join buffer (Block Nested Loop)
4881+1 PRIMARY <derived2> ref <auto_key0> <auto_key0> 7 test.m2.matintnum 2 NULL
4882 2 DERIVED mp ALL NULL NULL NULL NULL 9 Using temporary; Using filesort
4883 2 DERIVED m1 eq_ref PRIMARY PRIMARY 3 test.mp.mat_id 1 NULL
4884 explain SELECT STRAIGHT_JOIN d.pla_id, m2.test FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum;
4885 id select_type table type possible_keys key key_len ref rows Extra
4886 1 PRIMARY m2 ALL NULL NULL NULL NULL 9 NULL
4887-1 PRIMARY <derived2> ALL NULL NULL NULL NULL 9 Using where; Using join buffer (Block Nested Loop)
4888+1 PRIMARY <derived2> ref <auto_key0> <auto_key0> 7 test.m2.matintnum 2 NULL
4889 2 DERIVED mp ALL NULL NULL NULL NULL 9 Using temporary; Using filesort
4890 2 DERIVED m1 eq_ref PRIMARY PRIMARY 3 test.mp.mat_id 1 NULL
4891 drop table t1,t2;
4892
4893=== modified file 'Percona-Server/mysql-test/r/disabled_replication.result'
4894--- Percona-Server/mysql-test/r/disabled_replication.result 2012-03-14 12:38:08 +0000
4895+++ Percona-Server/mysql-test/r/disabled_replication.result 2013-02-13 06:17:00 +0000
4896@@ -1,5 +1,5 @@
4897 SHOW SLAVE STATUS;
4898-Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_UUID Master_Info_File SQL_Delay SQL_Remaining_Delay Slave_SQL_Running_State Master_Retry_Count Master_Bind Last_IO_Error_Timestamp Last_SQL_Error_Timestamp Master_SSL_Crl Master_SSL_Crlpath Retrieved_Gtid_Set Executed_Gtid_Set
4899+Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error Replicate_Ignore_Server_Ids Master_Server_Id Master_UUID Master_Info_File SQL_Delay SQL_Remaining_Delay Slave_SQL_Running_State Master_Retry_Count Master_Bind Last_IO_Error_Timestamp Last_SQL_Error_Timestamp Master_SSL_Crl Master_SSL_Crlpath Retrieved_Gtid_Set Executed_Gtid_Set Auto_Position
4900 RESET SLAVE;
4901 ERROR HY000: Slave is not configured or failed to initialize properly. You must at least set --server-id to enable either a master or a slave. Additional error messages can be found in the MySQL error log.
4902 SHOW RELAYLOG EVENTS;
4903
4904=== added file 'Percona-Server/mysql-test/r/disconnect_on_expired_password_default.result'
4905--- Percona-Server/mysql-test/r/disconnect_on_expired_password_default.result 1970-01-01 00:00:00 +0000
4906+++ Percona-Server/mysql-test/r/disconnect_on_expired_password_default.result 2013-02-13 06:17:00 +0000
4907@@ -0,0 +1,34 @@
4908+SHOW VARIABLES LIKE 'disconnect_on_expired_password';
4909+Variable_name Value
4910+disconnect_on_expired_password ON
4911+## Test mysql client in non-interactrive mode
4912+CREATE USER 'bernt';
4913+SET PASSWORD FOR 'bernt' = PASSWORD('secret');
4914+ALTER USER 'bernt' PASSWORD EXPIRE;
4915+# Attempt to login should fail
4916+Warning: Using a password on the command line interface can be insecure.
4917+ERROR 1820 (HY000): You must SET PASSWORD before executing this statement
4918+DROP USER 'bernt';
4919+## Test mysqltest
4920+CREATE USER 'bernt';
4921+SET PASSWORD FOR 'bernt' = PASSWORD('secret');
4922+ALTER USER 'bernt' PASSWORD EXPIRE;
4923+# Login with mysqltest should work
4924+# But doing something should fail
4925+SELECT 1;
4926+ERROR HY000: You must SET PASSWORD before executing this statement
4927+# Setting password should work
4928+SET PASSWORD = PASSWORD('newsecret');
4929+DROP USER 'bernt';
4930+## Test mysqladmin
4931+CREATE USER 'bernt';
4932+SET PASSWORD FOR 'bernt' = PASSWORD('secret');
4933+GRANT ALL ON *.* TO 'bernt' WITH GRANT OPTION;
4934+ALTER USER 'bernt' PASSWORD EXPIRE;
4935+# Doing something should not connect
4936+Warning: Using a password on the command line interface can be insecure.
4937+MYSQLADMIN: connect to server at 'localhost' failed
4938+error: 'You must SET PASSWORD before executing this statement'
4939+# Setting password should succeed
4940+Warning: Using a password on the command line interface can be insecure.
4941+DROP USER 'bernt';
4942
4943=== added file 'Percona-Server/mysql-test/r/disconnect_on_expired_password_off.result'
4944--- Percona-Server/mysql-test/r/disconnect_on_expired_password_off.result 1970-01-01 00:00:00 +0000
4945+++ Percona-Server/mysql-test/r/disconnect_on_expired_password_off.result 2013-02-13 06:17:00 +0000
4946@@ -0,0 +1,33 @@
4947+SHOW VARIABLES LIKE 'disconnect_on_expired_password';
4948+Variable_name Value
4949+disconnect_on_expired_password OFF
4950+## Test mysql client in non-interactive mode
4951+CREATE USER 'bernt';
4952+SET PASSWORD FOR 'bernt' = PASSWORD('secret');
4953+ALTER USER 'bernt' PASSWORD EXPIRE;
4954+# Should connect, but doing something should fail
4955+Warning: Using a password on the command line interface can be insecure.
4956+ERROR 1820 (HY000) at line 1: You must SET PASSWORD before executing this statement
4957+# Login and set password should succeed
4958+Warning: Using a password on the command line interface can be insecure.
4959+DROP USER 'bernt';
4960+## Test mysqltest login
4961+CREATE USER 'bernt';
4962+SET PASSWORD FOR 'bernt' = PASSWORD('secret');
4963+ALTER USER 'bernt' PASSWORD EXPIRE;
4964+# Login with mysqltest should work
4965+# But doing something should fail
4966+SELECT 1;
4967+ERROR HY000: You must SET PASSWORD before executing this statement
4968+DROP USER 'bernt';
4969+## Test mysqladmin
4970+CREATE USER 'bernt';
4971+SET PASSWORD FOR 'bernt' = PASSWORD('secret');
4972+GRANT ALL ON *.* TO 'bernt' WITH GRANT OPTION;
4973+ALTER USER 'bernt' PASSWORD EXPIRE;
4974+# Doing something should connect but fail
4975+Warning: Using a password on the command line interface can be insecure.
4976+MYSQLADMIN: reload failed; error: 'You must SET PASSWORD before executing this statement'
4977+# Setting password should succeed
4978+Warning: Using a password on the command line interface can be insecure.
4979+DROP USER 'bernt';
4980
4981=== modified file 'Percona-Server/mysql-test/r/distinct.result'
4982--- Percona-Server/mysql-test/r/distinct.result 2012-10-16 06:21:51 +0000
4983+++ Percona-Server/mysql-test/r/distinct.result 2013-02-13 06:17:00 +0000
4984@@ -232,7 +232,7 @@
4985 1 SIMPLE t1 index NULL PRIMARY 4 NULL 1 Using index
4986 explain SELECT distinct a from t3 order by a desc limit 2;
4987 id select_type table type possible_keys key key_len ref rows Extra
4988-1 SIMPLE t3 index NULL a 5 NULL 40 Using index
4989+1 SIMPLE t3 range NULL a 5 NULL 10 Using index for group-by; Using temporary; Using filesort
4990 explain SELECT distinct a,b from t3 order by a+1;
4991 id select_type table type possible_keys key key_len ref rows Extra
4992 1 SIMPLE t3 ALL NULL NULL NULL NULL 204 Using temporary; Using filesort
4993@@ -242,6 +242,43 @@
4994 explain SELECT a,b from t3 group by a,b order by a+1;
4995 id select_type table type possible_keys key key_len ref rows Extra
4996 1 SIMPLE t3 ALL NULL NULL NULL NULL 204 Using temporary; Using filesort
4997+ SELECT distinct t1.a from t1;
4998+a
4999+1
5000+2
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches