Skip to content

Commit 2a798ce

Browse files
author
Nirbhay Choubey
committed
MDEV-7615: Remove --galera-sst-mode option from mysqldump
Removed 'galera-sst-mode' option from mysqldump as its no longer needed.
1 parent 7b6beef commit 2a798ce

File tree

3 files changed

+0
-116
lines changed

3 files changed

+0
-116
lines changed

client/mysqldump.c

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ static my_bool verbose= 0, opt_no_create_info= 0, opt_no_data= 0,
114114
opt_slave_apply= 0,
115115
opt_include_master_host_port= 0,
116116
opt_events= 0, opt_comments_used= 0,
117-
opt_galera_sst_mode= 0,
118117
opt_alltspcs=0, opt_notspcs= 0;
119118
static my_bool insert_pat_inited= 0, debug_info_flag= 0, debug_check_flag= 0;
120119
static ulong opt_max_allowed_packet, opt_net_buffer_length;
@@ -351,14 +350,6 @@ static struct my_option my_long_options[] =
351350
{"force", 'f', "Continue even if we get an SQL error.",
352351
&ignore_errors, &ignore_errors, 0, GET_BOOL, NO_ARG,
353352
0, 0, 0, 0, 0, 0},
354-
{"galera-sst-mode", OPT_GALERA_SST_MODE,
355-
"This mode should normally be used in mysqldump snapshot state transfer "
356-
"(SST) in a Galera cluster. If enabled, mysqldump additionally dumps "
357-
"commands to turn off binary logging and SET global gtid_binlog_state "
358-
"with the current value. Note: RESET MASTER needs to be executed on the "
359-
"server receiving the resulting dump.",
360-
&opt_galera_sst_mode, &opt_galera_sst_mode, 0, GET_BOOL, NO_ARG, 0, 0, 0,
361-
0, 0, 0},
362353
{"gtid", OPT_USE_GTID, "Used together with --master-data=1 or --dump-slave=1."
363354
"When enabled, the output from those options will set the GTID position "
364355
"instead of the binlog file and offset; the file/offset will appear only as "
@@ -4903,43 +4894,6 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
49034894
} /* dump_selected_tables */
49044895

49054896

4906-
/**
4907-
Add the following statements to the generated dump:
4908-
a) SET @@session.sql_log_bin=OFF;
4909-
b) SET @@global.gtid_binlog_state='[N-N-N,...]'
4910-
*/
4911-
static int wsrep_set_sst_cmds(MYSQL *mysql) {
4912-
MYSQL_RES *res;
4913-
MYSQL_ROW row;
4914-
4915-
if (mysql_get_server_version(mysql) < 100005) {
4916-
/* @@gtid_binlog_state does not exist. */
4917-
return 0;
4918-
}
4919-
4920-
if (mysql_query_with_error_report(mysql, &res, "SELECT "
4921-
"@@global.gtid_binlog_state"))
4922-
return 1;
4923-
4924-
if (mysql_num_rows(res) != 1)
4925-
/* No entry for @@global.gtid_binlog_state, nothing needs to be done. */
4926-
return 0;
4927-
4928-
if (!(row= mysql_fetch_row(res)) || !(char *)row[0])
4929-
return 1;
4930-
4931-
/* first, add a command to turn off binary logging, */
4932-
fprintf(md_result_file, "SET @@session.sql_log_bin=OFF;\n");
4933-
4934-
/* followed by, a command to set global gtid_binlog_state. */
4935-
fprintf(md_result_file, "SET @@global.gtid_binlog_state='%s';\n",
4936-
(char*)row[0]);
4937-
4938-
mysql_free_result(res);
4939-
return 0;
4940-
}
4941-
4942-
49434897
static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos,
49444898
int have_mariadb_gtid, int use_gtid)
49454899
{
@@ -5936,9 +5890,6 @@ int main(int argc, char **argv)
59365890
if (opt_slave_apply && add_stop_slave())
59375891
goto err;
59385892

5939-
if (opt_galera_sst_mode && wsrep_set_sst_cmds(mysql))
5940-
goto err;
5941-
59425893
if (opt_master_data && do_show_master_status(mysql, consistent_binlog_pos,
59435894
have_mariadb_gtid, opt_use_gtid))
59445895
goto err;

mysql-test/r/galera_sst_mode.result

Lines changed: 0 additions & 24 deletions
This file was deleted.

mysql-test/t/galera_sst_mode.test

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)