From 2f9198a0f246b601179fe4304855cad25cc4e98d Mon Sep 17 00:00:00 2001 From: Sven Sandberg Date: Wed, 16 Feb 2011 17:27:35 +0100 Subject: WL#5670: Proposal: Remove SHOW NEW MASTER statement Removes SHOW NEW MASTER statement and all related code. Also removes the unused function update_slave_list from repl_failsafe.cc. mysql-test/r/signal_code.result: Updated result file. The output of SHOW PROCEDURE CODE has changed, because the numerical values of some SQLCOM_ commands have changes. This is not a problem, because SHOW PROCEDURE CODE only exists in debug builds and the numerical values of SQLCOM_ constants are not exposed elsewhere. mysql-test/r/sp-code.result: Updated result file. The output of SHOW PROCEDURE CODE has changed, because the numerical values of some SQLCOM_ commands have changes. This is not a problem, because SHOW PROCEDURE CODE only exists in debug builds and the numerical values of SQLCOM_ constants are not exposed elsewhere. sql/mysqld.cc: Remove SQLCOM_SHOW_NEW_MASTER. sql/repl_failsafe.cc: Remove show_new_master, which was only used by the removed SHOW NEW MASTER statement. Remove translate_master, which was only used by show_new_master. Remove find_slave_event, which was only used by translate_master. Remove find_target_pos, which was only used by translate_master. Remove cmp_master_pos, which was only used by translate_master. Remove update_slave_list, which was not used at all. sql/repl_failsafe.h: Remove declarations of functions removed by this patch: update_slave_list, show_new_master, translate_master, update_slave_list Remove declarations of functions that did not exist before this patch: handle_failsafe_rpl, load_master_data Remove declaration of function that is static in slave.cc: connect_to_master sql/sp_head.cc: Removed SQLCOM_SHOW_NEW_MASTER sql/sql_lex.h: Removed SQLCOM_SHOW_NEW_MASTER sql/sql_parse.cc: Removed SQLCOM_SHOW_NEW_MASTER sql/sql_repl.cc: Removed cmp_master_pos(char*,ulonglong,char*,ulonglong), which was only used by cmp_master_pos*Slave_log_event* sev, LEX_MASTER_INFO* mi) in repl_failsafe.cc, which has been removed. sql/sql_repl.h: removed cmp_master_pos sql/sql_yacc.yy: removed syntax SHOW NEW MASTER. --- sql/sql_parse.cc | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'sql/sql_parse.cc') diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 2086100db98..d9e1245bf66 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -316,7 +316,6 @@ void init_update_queries(void) sql_command_flags[SQLCOM_SHOW_VARIABLES]= CF_STATUS_COMMAND | CF_REEXECUTION_FRAGILE; sql_command_flags[SQLCOM_SHOW_CHARSETS]= CF_STATUS_COMMAND | CF_REEXECUTION_FRAGILE; sql_command_flags[SQLCOM_SHOW_COLLATIONS]= CF_STATUS_COMMAND | CF_REEXECUTION_FRAGILE; - sql_command_flags[SQLCOM_SHOW_NEW_MASTER]= CF_STATUS_COMMAND; sql_command_flags[SQLCOM_SHOW_BINLOGS]= CF_STATUS_COMMAND; sql_command_flags[SQLCOM_SHOW_SLAVE_HOSTS]= CF_STATUS_COMMAND; sql_command_flags[SQLCOM_SHOW_BINLOG_EVENTS]= CF_STATUS_COMMAND; @@ -2145,19 +2144,6 @@ case SQLCOM_PREPARE: #endif break; } - case SQLCOM_SHOW_NEW_MASTER: - { - if (check_global_access(thd, REPL_SLAVE_ACL)) - goto error; - /* This query don't work now. See comment in repl_failsafe.cc */ -#ifndef WORKING_NEW_MASTER - my_error(ER_NOT_SUPPORTED_YET, MYF(0), "SHOW NEW MASTER"); - goto error; -#else - res = show_new_master(thd); - break; -#endif - } #ifdef HAVE_REPLICATION case SQLCOM_SHOW_SLAVE_HOSTS: -- cgit v1.2.1