Commit fe2d90cc authored by Andrei's avatar Andrei

MDEV-11675. Convert the new session var to bool type and test changes

The new @@binlog_alter_two_phase is converted to `my_bool` type.
parent a64991df
......@@ -42,10 +42,9 @@ The following specify which files/extra groups are read (specified before remain
full' errors. No longer needed, as the server now handles
this automatically.
--bind-address=name IP address to bind to.
--binlog-alter-two-phase=name
--binlog-alter-two-phase
When set, split ALTER at binary logging into 2
statements: START ALTER and COMMIT/ROLLBACK ALTER. One
of: No, Yes
statements: START ALTER and COMMIT/ROLLBACK ALTER
--binlog-annotate-row-events
Tells the master to annotate RBR events with the
statement that caused these events
......@@ -1480,7 +1479,7 @@ automatic-sp-privileges TRUE
back-log 80
big-tables FALSE
bind-address (No default value)
binlog-alter-two-phase No
binlog-alter-two-phase FALSE
binlog-annotate-row-events TRUE
binlog-cache-size 32768
binlog-checksum CRC32
......
set global binlog_alter_two_phase=YES;
set binlog_alter_two_phase=YES;
set global binlog_alter_two_phase = ON;
set binlog_alter_two_phase = ON;
RESET MASTER;
create table myt (a int) engine=InnoDB;
alter table myt add column (b int);
......@@ -12,4 +12,4 @@ stmt
### alter table myt add column (b int)
drop table raw_binlog_rows;
drop table myt;
set global binlog_alter_two_phase=No;
set global binlog_alter_two_phase=0;
......@@ -6,8 +6,8 @@
# verify the correctness. Use the latest binlog and repeat the same
# process mentioned above and observe replay works fine.
#
set global binlog_alter_two_phase=YES;
set binlog_alter_two_phase=YES;
set global binlog_alter_two_phase = ON;
set binlog_alter_two_phase = ON;
create table t1 (f1 int primary key) engine=InnoDB;
create table t2 (f1 int primary key, constraint c1 foreign key (f1) references t1(f1)) engine=innodb;
alter table t2 add constraint c1 foreign key (f1) references t1(f1);
......@@ -39,4 +39,4 @@ SELECT @@gtid_binlog_state;
0-1-5
# clean up
RESET MASTER;
set global binlog_alter_two_phase=No;;
set global binlog_alter_two_phase=0;
......@@ -17,8 +17,8 @@
# Setup
#---
--let $binlog_alter_two_phase= `select @@binlog_alter_two_phase`
set global binlog_alter_two_phase=YES;
set binlog_alter_two_phase=YES;
set global binlog_alter_two_phase = ON;
set binlog_alter_two_phase = ON;
RESET MASTER;
create table myt (a int) engine=InnoDB;
......
......@@ -15,8 +15,8 @@
--source include/have_binlog_format_statement.inc
--let $binlog_alter_two_phase= `select @@binlog_alter_two_phase`
set global binlog_alter_two_phase=YES;
set binlog_alter_two_phase=YES;
set global binlog_alter_two_phase = ON;
set binlog_alter_two_phase = ON;
create table t1 (f1 int primary key) engine=InnoDB;
create table t2 (f1 int primary key, constraint c1 foreign key (f1) references t1(f1)) engine=innodb;
......@@ -58,4 +58,4 @@ remove_file $MYSQLTEST_VARDIR/tmp/slave_2.sql;
remove_file $MYSQLTEST_VARDIR/tmp/slave_3.sql;
RESET MASTER;
--eval set global binlog_alter_two_phase=$binlog_alter_two_phase;
--eval set global binlog_alter_two_phase=$binlog_alter_two_phase
......@@ -5,8 +5,8 @@
include/master-slave.inc
[connection master]
connection master;
set global binlog_alter_two_phase=YES;
set binlog_alter_two_phase=YES;
set global binlog_alter_two_phase = ON;
set binlog_alter_two_phase = ON;
create table t1 (f1 int primary key) engine=InnoDB;
create table t2 (f1 int primary key,
constraint c1 foreign key (f1) references t1(f1),
......@@ -50,5 +50,5 @@ connection master;
drop table t2, t1;
connection slave;
connection master;
set global binlog_alter_two_phase=No;;
set global binlog_alter_two_phase=0;;
include/rpl_end.inc
include/master-slave.inc
[connection master]
connection master;
set global binlog_alter_two_phase=YES;
set binlog_alter_two_phase=YES;
set global binlog_alter_two_phase = ON;
set binlog_alter_two_phase = ON;
connection slave;
set global gtid_strict_mode=1;
# Legacy Master Slave
......@@ -309,5 +309,5 @@ connection slave;
include/sync_with_master_gtid.inc
set global gtid_strict_mode = 0;;
connection master;
set global binlog_alter_two_phase=No;;
set global binlog_alter_two_phase=0;;
include/rpl_end.inc
include/master-slave.inc
[connection master]
connection master;
set global binlog_alter_two_phase=Yes;
set binlog_alter_two_phase=Yes;
set global binlog_alter_two_phase = ON;
set binlog_alter_two_phase = ON;
connection slave;
set global gtid_strict_mode=1;
connection slave;
......@@ -322,5 +322,5 @@ set global gtid_strict_mode = 0;;
set global gtid_domain_id= 0;
include/start_slave.inc
connection master;
set global binlog_alter_two_phase=No;;
set global binlog_alter_two_phase=0;;
include/rpl_end.inc
include/master-slave.inc
[connection master]
connection master;
set global binlog_alter_two_phase=Yes;
set binlog_alter_two_phase=Yes;
set global binlog_alter_two_phase = ON;
set binlog_alter_two_phase = ON;
connection slave;
set global gtid_strict_mode=1;
connection slave;
......@@ -322,5 +322,5 @@ set global gtid_strict_mode = 0;;
set global gtid_domain_id= 0;
include/start_slave.inc
connection master;
set global binlog_alter_two_phase=No;;
set global binlog_alter_two_phase=0;;
include/rpl_end.inc
include/master-slave.inc
[connection master]
connection master;
set global binlog_alter_two_phase=Yes;
set binlog_alter_two_phase=Yes;
set global binlog_alter_two_phase = ON;
set binlog_alter_two_phase = ON;
connection slave;
set global gtid_strict_mode=1;
connection slave;
......@@ -322,6 +322,6 @@ set global gtid_strict_mode = 0;;
set global gtid_domain_id= 0;
include/start_slave.inc
connection master;
set global binlog_alter_two_phase=No;;
set global binlog_alter_two_phase=0;;
set global gtid_domain_id= 0;
include/rpl_end.inc
include/master-slave.inc
[connection master]
connection master;
set global binlog_alter_two_phase=Yes;
set binlog_alter_two_phase=Yes;
set global binlog_alter_two_phase = ON;
set binlog_alter_two_phase = ON;
connection slave;
set global gtid_strict_mode=1;
connection slave;
......@@ -322,6 +322,6 @@ set global gtid_strict_mode = 0;;
set global gtid_domain_id= 0;
include/start_slave.inc
connection master;
set global binlog_alter_two_phase=No;;
set global binlog_alter_two_phase=0;;
set global gtid_domain_id= 0;
include/rpl_end.inc
include/master-slave.inc
[connection master]
connection master;
set global binlog_alter_two_phase=Yes;
set binlog_alter_two_phase=Yes;
set global binlog_alter_two_phase = ON;
set binlog_alter_two_phase = ON;
connection slave;
set global gtid_strict_mode=1;
connection slave;
......@@ -324,6 +324,6 @@ set global slave_domain_parallel_threads = 0;;
set global gtid_domain_id= 0;
include/start_slave.inc
connection master;
set global binlog_alter_two_phase=No;;
set global binlog_alter_two_phase=0;;
set global gtid_domain_id= 0;
include/rpl_end.inc
......@@ -2,8 +2,8 @@ connect server_1,127.0.0.1,root,,,$SERVER_MYPORT_1;
connect server_2,127.0.0.1,root,,,$SERVER_MYPORT_2;
connect server_3,127.0.0.1,root,,,$SERVER_MYPORT_3;
connection server_1;
set global binlog_alter_two_phase=Yes;
set binlog_alter_two_phase=Yes;
set global binlog_alter_two_phase = ON;
set binlog_alter_two_phase = ON;
connection server_2;
stop slave;
Warnings:
......@@ -356,12 +356,12 @@ reset master;
RESET SLAVE ALL;
SET GLOBAL gtid_slave_pos= '';
connection server_1;
set global binlog_alter_two_phase=No;;
set global binlog_alter_two_phase=0;;
set global gtid_domain_id= 0;
reset master;
connection server_2;
set global gtid_domain_id= 0;
set global binlog_alter_two_phase=No;;
set global binlog_alter_two_phase=0;
reset master;
disconnect server_1;
disconnect server_2;
......
......@@ -2,8 +2,8 @@ connect server_1,127.0.0.1,root,,,$SERVER_MYPORT_1;
connect server_2,127.0.0.1,root,,,$SERVER_MYPORT_2;
connect server_3,127.0.0.1,root,,,$SERVER_MYPORT_3;
connection server_1;
set global binlog_alter_two_phase=Yes;
set binlog_alter_two_phase=Yes;
set global binlog_alter_two_phase = ON;
set binlog_alter_two_phase = ON;
connection server_2;
stop slave;
Warnings:
......@@ -350,12 +350,12 @@ reset master;
RESET SLAVE ALL;
SET GLOBAL gtid_slave_pos= '';
connection server_1;
set global binlog_alter_two_phase=No;;
set global binlog_alter_two_phase=0;;
set global gtid_domain_id= 0;
reset master;
connection server_2;
set global gtid_domain_id= 0;
set global binlog_alter_two_phase=No;;
set global binlog_alter_two_phase=0;;
reset master;
disconnect server_1;
disconnect server_2;
......
......@@ -7,8 +7,8 @@ set global slave_parallel_mode=optimistic;
change master to master_use_gtid=slave_pos;
include/start_slave.inc
connection server_1;
set global binlog_alter_two_phase=YES;
set binlog_alter_two_phase=YES;
set global binlog_alter_two_phase=ON;
set binlog_alter_two_phase=ON;
connect master_node,127.0.0.1,root,,$db_name, $SERVER_MYPORT_1;
connect slave_node,127.0.0.1,root,,test, $SERVER_MYPORT_2;
# innodb
......@@ -58,7 +58,7 @@ include/sync_with_master_gtid.inc
disconnect master_node;
disconnect slave_node;
connection server_1;
set global binlog_alter_two_phase=No;;
set global binlog_alter_two_phase=0;
include/rpl_sync.inc
connection server_2;
select domain_id, seq_no from mysql.gtid_slave_pos order by seq_no desc limit 1;
......
......@@ -3,8 +3,8 @@ connect server_2,127.0.0.1,root,,,$SERVER_MYPORT_2;
connect server_3,127.0.0.1,root,,,$SERVER_MYPORT_3;
connection server_1;
SET @save_binlog_alter_two_phase= @@GLOBAL.binlog_alter_two_phase;
SET GLOBAL binlog_alter_two_phase=Yes;
SET binlog_alter_two_phase=Yes;
SET GLOBAL binlog_alter_two_phase = ON;
SET binlog_alter_two_phase = ON;
# Create table and perform CA and RA
CREATE TABLE t1( a INT, b INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1,1);
......@@ -47,7 +47,7 @@ RESET MASTER;
RESET SLAVE;
connection server_2;
SET @save_binlog_alter_two_phase= @@GLOBAL.binlog_alter_two_phase;
SET GLOBAL binlog_alter_two_phase=Yes;
SET GLOBAL binlog_alter_two_phase = ON;
connection server_3;
SET @save_gtid_strict_mode= @@GLOBAL.gtid_strict_mode;
SET @slave_parallel_threads= @@GLOBAL.slave_parallel_threads;
......
include/master-slave.inc
[connection master]
connection master;
set binlog_alter_two_phase=YES;
set binlog_alter_two_phase = ON;
connection master;
CREATE TABLE t1 (i int) engine=innodb;
CREATE TABLE t2 (i int) engine=innodb;
......
......@@ -3,9 +3,9 @@ include/master-slave.inc
connection master;
CREATE TABLE t1 (a1 int, d1 int DEFAULT 0);
INSERT INTO t1 VALUES (1,1) ;
SET binlog_alter_two_phase=YES;
SET binlog_alter_two_phase = ON;
ALTER TABLE t1 WAIT 9 RENAME COLUMN a1 TO a2;
SET binlog_alter_two_phase=NO;
SET binlog_alter_two_phase = OFF;
ALTER TABLE t1 ALTER COLUMN d1 DROP DEFAULT;
connection slave;
connection master;
......
......@@ -73,7 +73,7 @@ t3 CREATE TABLE `t3` (
connection master;
SET GLOBAL debug_dbug= @old_debug_master;
drop table t3;
set global binlog_alter_two_phase = No;;
set global binlog_alter_two_phase = 0;
connection slave;
SET GLOBAL debug_dbug= @old_debug_slave;
stop slave;
......
......@@ -106,7 +106,7 @@ slave-bin.000001 # Gtid 1 # GTID #-#-#
slave-bin.000001 # Query 1 # use `test`; create table t3( a int primary key, b int) engine=innodb
connection master;
drop table t1,t2,t3;
set global binlog_alter_two_phase = No;;
set global binlog_alter_two_phase = 0;
SET GLOBAL debug_dbug= @old_debug_master;
set DEBUG_SYNC= 'RESET';
connection slave;
......
......@@ -11,8 +11,8 @@
--connection master
--let $binlog_alter_two_phase= `select @@binlog_alter_two_phase`
set global binlog_alter_two_phase=YES;
set binlog_alter_two_phase=YES;
set global binlog_alter_two_phase = ON;
set binlog_alter_two_phase = ON;
create table t1 (f1 int primary key) engine=InnoDB;
--error ER_CANT_CREATE_TABLE
......
......@@ -7,8 +7,8 @@
--connection master
--let $binlog_alter_two_phase= `select @@binlog_alter_two_phase`
set global binlog_alter_two_phase=YES;
set binlog_alter_two_phase=YES;
set global binlog_alter_two_phase = ON;
set binlog_alter_two_phase = ON;
--connection slave
--let $gtid_strict_mode= `select @@gtid_strict_mode`
set global gtid_strict_mode=1;
......
......@@ -9,8 +9,8 @@
--source include/master-slave.inc
--connection master
--let $binlog_alter_two_phase= `select @@binlog_alter_two_phase`
set global binlog_alter_two_phase=Yes;
set binlog_alter_two_phase=Yes;
set global binlog_alter_two_phase = ON;
set binlog_alter_two_phase = ON;
--connection slave
--let $gtid_strict_mode= `select @@gtid_strict_mode`
--let $slave_parallel_threads= `select @@slave_parallel_threads`
......
......@@ -10,8 +10,8 @@
--source include/have_debug.inc
--connection master
--let $binlog_alter_two_phase= `select @@binlog_alter_two_phase`
set global binlog_alter_two_phase=Yes;
set binlog_alter_two_phase=Yes;
set global binlog_alter_two_phase = ON;
set binlog_alter_two_phase = ON;
--connection slave
--let $gtid_strict_mode= `select @@gtid_strict_mode`
--let $slave_parallel_threads= `select @@slave_parallel_threads`
......
......@@ -10,8 +10,8 @@
--source include/have_debug.inc
--connection master
--let $binlog_alter_two_phase= `select @@binlog_alter_two_phase`
set global binlog_alter_two_phase=Yes;
set binlog_alter_two_phase=Yes;
set global binlog_alter_two_phase = ON;
set binlog_alter_two_phase = ON;
--connection slave
--let $gtid_strict_mode= `select @@gtid_strict_mode`
--let $slave_parallel_threads= `select @@slave_parallel_threads`
......
......@@ -10,8 +10,8 @@
--source include/have_debug.inc
--connection master
--let $binlog_alter_two_phase= `select @@binlog_alter_two_phase`
set global binlog_alter_two_phase=Yes;
set binlog_alter_two_phase=Yes;
set global binlog_alter_two_phase = ON;
set binlog_alter_two_phase = ON;
--connection slave
--let $gtid_strict_mode= `select @@gtid_strict_mode`
--let $slave_parallel_threads= `select @@slave_parallel_threads`
......
......@@ -11,8 +11,8 @@
--source include/have_debug.inc
--connection master
--let $binlog_alter_two_phase= `select @@binlog_alter_two_phase`
set global binlog_alter_two_phase=Yes;
set binlog_alter_two_phase=Yes;
set global binlog_alter_two_phase = ON;
set binlog_alter_two_phase = ON;
--connection slave
--let $gtid_strict_mode= `select @@gtid_strict_mode`
--let $slave_parallel_threads= `select @@slave_parallel_threads`
......
......@@ -13,8 +13,8 @@
--connection server_1
--let $binlog_alter_two_phase= `select @@binlog_alter_two_phase`
set global binlog_alter_two_phase=Yes;
set binlog_alter_two_phase=Yes;
set global binlog_alter_two_phase = ON;
set binlog_alter_two_phase = ON;
--connection server_2
stop slave;
......@@ -104,7 +104,7 @@ set global gtid_domain_id= 0;
reset master;
--connection server_2
set global gtid_domain_id= 0;
--eval set global binlog_alter_two_phase=$binlog_alter_two_phase;
--eval set global binlog_alter_two_phase=$binlog_alter_two_phase
reset master;
--disconnect server_1
......
......@@ -13,8 +13,8 @@
--connection server_1
--let $binlog_alter_two_phase= `select @@binlog_alter_two_phase`
set global binlog_alter_two_phase=Yes;
set binlog_alter_two_phase=Yes;
set global binlog_alter_two_phase = ON;
set binlog_alter_two_phase = ON;
--connection server_2
stop slave;
......
#
# MENT-662 Lag Free alter for slave
# In this we will see if chain replication works as
# In this we will see if chain replication works as
# M->S(Legacy)->S(Parallel)->S(Legacy, without log-slave-upadates)
#
--source include/have_innodb.inc
......@@ -22,8 +22,8 @@ change master to master_use_gtid=slave_pos;
--connection server_1
--let $binlog_alter_two_phase= `select @@binlog_alter_two_phase`
set global binlog_alter_two_phase=YES;
set binlog_alter_two_phase=YES;
set global binlog_alter_two_phase=ON;
set binlog_alter_two_phase=ON;
--let $engine=innodb
--let $sync_slave= 1
connect(master_node,127.0.0.1,root,,$db_name, $SERVER_MYPORT_1);
......@@ -32,7 +32,7 @@ connect(slave_node,127.0.0.1,root,,test, $SERVER_MYPORT_2);
--disconnect master_node
--disconnect slave_node
--connection server_1
--eval set global binlog_alter_two_phase=$binlog_alter_two_phase;
--eval set global binlog_alter_two_phase=$binlog_alter_two_phase
--source include/rpl_sync.inc
......
......@@ -19,8 +19,8 @@
--connection server_1
SET @save_binlog_alter_two_phase= @@GLOBAL.binlog_alter_two_phase;
SET GLOBAL binlog_alter_two_phase=Yes;
SET binlog_alter_two_phase=Yes;
SET GLOBAL binlog_alter_two_phase = ON;
SET binlog_alter_two_phase = ON;
--echo # Create table and perform CA and RA
CREATE TABLE t1( a INT, b INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES(1,1);
......@@ -54,7 +54,7 @@ remove_file $MYSQLTEST_VARDIR/tmp/master_1.sql;
--connection server_2
SET @save_binlog_alter_two_phase= @@GLOBAL.binlog_alter_two_phase;
SET GLOBAL binlog_alter_two_phase=Yes;
SET GLOBAL binlog_alter_two_phase = ON;
--connection server_3
SET @save_gtid_strict_mode= @@GLOBAL.gtid_strict_mode;
......
......@@ -8,7 +8,7 @@
--source include/master-slave.inc
--connection master
set binlog_alter_two_phase=YES;
set binlog_alter_two_phase = ON;
--connection master
CREATE TABLE t1 (i int) engine=innodb;
......
......@@ -9,9 +9,9 @@
--connection master
CREATE TABLE t1 (a1 int, d1 int DEFAULT 0);
INSERT INTO t1 VALUES (1,1) ;
SET binlog_alter_two_phase=YES;
SET binlog_alter_two_phase = ON;
ALTER TABLE t1 WAIT 9 RENAME COLUMN a1 TO a2;
SET binlog_alter_two_phase=NO;
SET binlog_alter_two_phase = OFF;
ALTER TABLE t1 ALTER COLUMN d1 DROP DEFAULT;
--sync_slave_with_master
......
......@@ -60,7 +60,7 @@ show create table t3;
--connection master
SET GLOBAL debug_dbug= @old_debug_master;
drop table t3;
--eval set global binlog_alter_two_phase = $binlog_alter_two_phase;
--eval set global binlog_alter_two_phase = $binlog_alter_two_phase
--sync_slave_with_master
SET GLOBAL debug_dbug= @old_debug_slave;
......
......@@ -107,7 +107,7 @@ if (`select $master_gtid_state <> $slave_gtid_state`)
--connection master
drop table t1,t2,t3;
--eval set global binlog_alter_two_phase = $binlog_alter_two_phase;
--eval set global binlog_alter_two_phase = $binlog_alter_two_phase
SET GLOBAL debug_dbug= @old_debug_master;
set DEBUG_SYNC= 'RESET';
......
set binlog_alter_two_phase=NO;
set binlog_alter_two_phase = OFF;
select @@binlog_alter_two_phase;
@@binlog_alter_two_phase
No
set binlog_alter_two_phase=Yes;
0
set binlog_alter_two_phase = ON;
select @@binlog_alter_two_phase;
@@binlog_alter_two_phase
Yes
1
# wrong value
set binlog_alter_two_phase=BINLOG_OY;
ERROR 42000: Variable 'binlog_alter_two_phase' can't be set to the value of 'BINLOG_OY'
select @@binlog_alter_two_phase;
@@binlog_alter_two_phase
Yes
1
#true and false
set binlog_alter_two_phase=false;
select @@binlog_alter_two_phase;
@@binlog_alter_two_phase
No
0
set binlog_alter_two_phase=true;
select @@binlog_alter_two_phase;
@@binlog_alter_two_phase
Yes
1
set binlog_alter_two_phase=0;
select @@binlog_alter_two_phase;
@@binlog_alter_two_phase
No
0
set binlog_alter_two_phase=1;
select @@binlog_alter_two_phase;
@@binlog_alter_two_phase
Yes
1
##wrong value
set binlog_alter_two_phase=2;
ERROR 42000: Variable 'binlog_alter_two_phase' can't be set to the value of '2'
select @@binlog_alter_two_phase;
@@binlog_alter_two_phase
Yes
1
#Global value
set global binlog_alter_two_phase=NO;
set global binlog_alter_two_phase = OFF;
connect con1,localhost,root,,;
select @@binlog_alter_two_phase;
@@binlog_alter_two_phase
No
0
disconnect con1;
connection default;
set global binlog_alter_two_phase=Yes;
set global binlog_alter_two_phase = ON;
connect con1,localhost,root,,;
select @@binlog_alter_two_phase;
@@binlog_alter_two_phase
Yes
1
disconnect con1;
connection default;
set global binlog_alter_two_phase=No;;
set global binlog_alter_two_phase=0;
......@@ -324,14 +324,14 @@ READ_ONLY YES
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_ALTER_TWO_PHASE
VARIABLE_SCOPE SESSION
VARIABLE_TYPE ENUM
VARIABLE_TYPE BOOLEAN
VARIABLE_COMMENT When set, split ALTER at binary logging into 2 statements: START ALTER and COMMIT/ROLLBACK ALTER
NUMERIC_MIN_VALUE NULL
NUMERIC_MAX_VALUE NULL
NUMERIC_BLOCK_SIZE NULL
ENUM_VALUE_LIST No,Yes
ENUM_VALUE_LIST OFF,ON
READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
COMMAND_LINE_ARGUMENT OPTIONAL
VARIABLE_NAME BINLOG_ANNOTATE_ROW_EVENTS
VARIABLE_SCOPE SESSION
VARIABLE_TYPE BOOLEAN
......
......@@ -6,10 +6,10 @@
--source include/not_embedded.inc
--let $binlog_alter_two_phase= `select @@binlog_alter_two_phase`
set binlog_alter_two_phase=NO;
set binlog_alter_two_phase = OFF;
select @@binlog_alter_two_phase;
set binlog_alter_two_phase=Yes;
set binlog_alter_two_phase = ON;
select @@binlog_alter_two_phase;
--echo # wrong value
......@@ -37,16 +37,16 @@ select @@binlog_alter_two_phase;
--echo #Global value
set global binlog_alter_two_phase=NO;
set global binlog_alter_two_phase = OFF;
connect (con1,localhost,root,,);
select @@binlog_alter_two_phase;
disconnect con1;
connection default;
set global binlog_alter_two_phase=Yes;
set global binlog_alter_two_phase = ON;
connect (con1,localhost,root,,);
select @@binlog_alter_two_phase;
disconnect con1;
connection default;
--eval set global binlog_alter_two_phase=$binlog_alter_two_phase;
--eval set global binlog_alter_two_phase=$binlog_alter_two_phase
......@@ -854,7 +854,7 @@ typedef struct system_variables
vers_asof_timestamp_t vers_asof_timestamp;
ulong vers_alter_history;
ulong binlog_alter_two_phase;
my_bool binlog_alter_two_phase;
} SV;
/**
......
......@@ -2409,15 +2409,12 @@ static Sys_var_bit Sys_skip_parallel_replication(
SESSION_ONLY(option_bits), NO_CMD_LINE, OPTION_RPL_SKIP_PARALLEL,
DEFAULT(FALSE));
static const char *binlog_alter_two_phase_enum[]=
{"No","Yes", NullS};
static Sys_var_enum Sys_binlog_alter_two_phase(
static Sys_var_mybool Sys_binlog_alter_two_phase(
"binlog_alter_two_phase",
"When set, split ALTER at binary logging into 2 statements: "
"START ALTER and COMMIT/ROLLBACK ALTER",
SESSION_VAR(binlog_alter_two_phase), CMD_LINE(REQUIRED_ARG),
binlog_alter_two_phase_enum,
DEFAULT(0));
SESSION_VAR(binlog_alter_two_phase), CMD_LINE(OPT_ARG),
DEFAULT(FALSE));
static bool
check_gtid_ignore_duplicates(sys_var *self, THD *thd, set_var *var)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment