mirror of
https://github.com/MariaDB/server.git
synced 2026-04-17 05:45:33 +02:00
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.
48 lines
1.7 KiB
C
48 lines
1.7 KiB
C
#ifndef REPL_FAILSAFE_INCLUDED
|
|
#define REPL_FAILSAFE_INCLUDED
|
|
|
|
/* Copyright (C) 2001-2005 MySQL AB & Sasha, 2008-2009 Sun Microsystems, Inc
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; version 2 of the License.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
|
|
|
#ifdef HAVE_REPLICATION
|
|
|
|
#include "mysql.h"
|
|
#include "my_sys.h"
|
|
#include "slave.h"
|
|
|
|
typedef enum {RPL_AUTH_MASTER=0,RPL_IDLE_SLAVE,RPL_ACTIVE_SLAVE,
|
|
RPL_LOST_SOLDIER,RPL_TROOP_SOLDIER,
|
|
RPL_RECOVERY_CAPTAIN,RPL_NULL /* inactive */,
|
|
RPL_ANY /* wild card used by change_rpl_status */ } RPL_STATUS;
|
|
extern ulong rpl_status;
|
|
|
|
extern mysql_mutex_t LOCK_rpl_status;
|
|
extern mysql_cond_t COND_rpl_status;
|
|
extern TYPELIB rpl_role_typelib;
|
|
extern const char* rpl_role_type[], *rpl_status_type[];
|
|
|
|
void change_rpl_status(ulong from_status, ulong to_status);
|
|
int find_recovery_captain(THD* thd, MYSQL* mysql);
|
|
|
|
extern HASH slave_list;
|
|
|
|
bool show_slave_hosts(THD* thd);
|
|
void init_slave_list();
|
|
void end_slave_list();
|
|
int register_slave(THD* thd, uchar* packet, uint packet_length);
|
|
void unregister_slave(THD* thd, bool only_mine, bool need_mutex);
|
|
|
|
#endif /* HAVE_REPLICATION */
|
|
#endif /* REPL_FAILSAFE_INCLUDED */
|