Commit b476c944 authored by Julius Goryavsky's avatar Julius Goryavsky

MDEV-30456: post-review changes

parent 1fd16b89
......@@ -12,11 +12,11 @@ connection node_1;
ALTER TABLE t1 ADD COLUMN f2 INTEGER, ALGORITHM=INSTANT;
show binlog events limit 1 offset 4;
Log_name Pos Event_type Server_id End_log_pos Info
binlog.000001 367 Query 1 489 use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER, ALGORITHM=INSTANT
LOG_NAME POS Query SERVER_ID END_LOG_POS use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER, ALGORITHM=INSTANT
connection node_2;
show binlog events limit 1 offset 4;
Log_name Pos Event_type Server_id End_log_pos Info
binlog.000001 367 Query 1 489 use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER, ALGORITHM=INSTANT
LOG_NAME POS Query SERVER_ID END_LOG_POS use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER, ALGORITHM=INSTANT
connection node_1;
set global wsrep_on=OFF;
reset master;
......@@ -30,11 +30,11 @@ SET SESSION alter_algorithm='INSTANT';
ALTER TABLE t1 ADD COLUMN f3 INTEGER;
show binlog events limit 1 offset 4;
Log_name Pos Event_type Server_id End_log_pos Info
binlog.000001 367 Query 1 470 use `test`; ALTER TABLE t1 ADD COLUMN f3 INTEGER
LOG_NAME POS Query SERVER_ID END_LOG_POS use `test`; ALTER TABLE t1 ADD COLUMN f3 INTEGER
connection node_2;
show binlog events limit 1 offset 4;
Log_name Pos Event_type Server_id End_log_pos Info
binlog.000001 367 Query 1 489 use `test`; ALTER TABLE t1 ADD COLUMN f3 INTEGER ,ALGORITHM=INSTANT
LOG_NAME POS Query SERVER_ID END_LOG_POS use `test`; ALTER TABLE t1 ADD COLUMN f3 INTEGER ,ALGORITHM=INSTANT
connection node_1;
set global wsrep_on=OFF;
reset master;
......@@ -48,11 +48,11 @@ SET SESSION alter_algorithm='INSTANT';
ALTER TABLE t1 ADD COLUMN f4 INTEGER, ALGORITHM=COPY;
show binlog events limit 1 offset 4;
Log_name Pos Event_type Server_id End_log_pos Info
binlog.000001 367 Query 1 486 use `test`; ALTER TABLE t1 ADD COLUMN f4 INTEGER, ALGORITHM=COPY
LOG_NAME POS Query SERVER_ID END_LOG_POS use `test`; ALTER TABLE t1 ADD COLUMN f4 INTEGER, ALGORITHM=COPY
connection node_2;
show binlog events limit 1 offset 4;
Log_name Pos Event_type Server_id End_log_pos Info
binlog.000001 367 Query 1 486 use `test`; ALTER TABLE t1 ADD COLUMN f4 INTEGER, ALGORITHM=COPY
LOG_NAME POS Query SERVER_ID END_LOG_POS use `test`; ALTER TABLE t1 ADD COLUMN f4 INTEGER, ALGORITHM=COPY
connection node_1;
DROP TABLE t1;
set global wsrep_on=OFF;
......
......@@ -7,4 +7,3 @@ log_bin=binlog
[mysqld.2]
log_slave_updates=ON
log_bin=binlog
......@@ -2,10 +2,10 @@
--source include/have_innodb.inc
#
# Test
# Test
#
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
set global wsrep_on=OFF;
reset master;
......@@ -18,9 +18,11 @@ set global wsrep_on=ON;
--connection node_1
ALTER TABLE t1 ADD COLUMN f2 INTEGER, ALGORITHM=INSTANT;
--replace_column 1 LOG_NAME 2 POS 4 SERVER_ID 5 END_LOG_POS
show binlog events limit 1 offset 4;
--connection node_2
--replace_column 1 LOG_NAME 2 POS 4 SERVER_ID 5 END_LOG_POS
show binlog events limit 1 offset 4;
......@@ -39,9 +41,11 @@ set global wsrep_on=ON;
--connection node_1
SET SESSION alter_algorithm='INSTANT';
ALTER TABLE t1 ADD COLUMN f3 INTEGER;
--replace_column 1 LOG_NAME 2 POS 4 SERVER_ID 5 END_LOG_POS
show binlog events limit 1 offset 4;
--connection node_2
--replace_column 1 LOG_NAME 2 POS 4 SERVER_ID 5 END_LOG_POS
show binlog events limit 1 offset 4;
......@@ -60,9 +64,11 @@ set global wsrep_on=ON;
--connection node_1
SET SESSION alter_algorithm='INSTANT';
ALTER TABLE t1 ADD COLUMN f4 INTEGER, ALGORITHM=COPY;
--replace_column 1 LOG_NAME 2 POS 4 SERVER_ID 5 END_LOG_POS
show binlog events limit 1 offset 4;
--connection node_2
--replace_column 1 LOG_NAME 2 POS 4 SERVER_ID 5 END_LOG_POS
show binlog events limit 1 offset 4;
......@@ -78,5 +84,3 @@ set global wsrep_on=ON;
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
......@@ -106,9 +106,10 @@ class Alter_info
List<const char> partition_names;
// Number of partitions.
uint num_parts;
#ifndef WITH_WSREP
private:
#ifdef WITH_WSREP
/* wsrep patch needs to peak the algorithm clause used in ALTER statement
#else
/* wsrep patch needs to pick the algorithm clause used in ALTER statement
in order to see if ALTER statement needs to be rewritten for replication
*/
public:
......
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