summaryrefslogtreecommitdiff
path: root/sql/sql_repl.cc
diff options
context:
space:
mode:
authorSven Sandberg <sven.sandberg@oracle.com>2011-02-16 17:27:35 +0100
committerSven Sandberg <sven.sandberg@oracle.com>2011-02-16 17:27:35 +0100
commit2f9198a0f246b601179fe4304855cad25cc4e98d (patch)
treed8cc39cc890b2d2af8859e9cbef52e17542bdaad /sql/sql_repl.cc
parentf65f016aeeba1e7cee6cd3f4f07599cfb92d3001 (diff)
downloadmariadb-git-2f9198a0f246b601179fe4304855cad25cc4e98d.tar.gz
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.
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r--sql/sql_repl.cc17
1 files changed, 0 insertions, 17 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index bc0cca4d887..9783917aaf0 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -1694,23 +1694,6 @@ int reset_master(THD* thd)
return 0;
}
-int cmp_master_pos(const char* log_file_name1, ulonglong log_pos1,
- const char* log_file_name2, ulonglong log_pos2)
-{
- int res;
- size_t log_file_name1_len= strlen(log_file_name1);
- size_t log_file_name2_len= strlen(log_file_name2);
-
- // We assume that both log names match up to '.'
- if (log_file_name1_len == log_file_name2_len)
- {
- if ((res= strcmp(log_file_name1, log_file_name2)))
- return res;
- return (log_pos1 < log_pos2) ? -1 : (log_pos1 == log_pos2) ? 0 : 1;
- }
- return ((log_file_name1_len < log_file_name2_len) ? -1 : 1);
-}
-
/**
Execute a SHOW BINLOG EVENTS statement.