diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2020-02-14 08:20:52 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2020-02-21 08:27:31 +0200 |
commit | 17e1848b663589dd00ef971826d9150b8673b4d7 (patch) | |
tree | 2474b96ffed460994e215ff8d4b89b9c02f9246f /mysql-test/suite | |
parent | d872cd6e4acd4d79a6270f05ce2bb57db7a57c72 (diff) | |
download | mariadb-git-17e1848b663589dd00ef971826d9150b8673b4d7.tar.gz |
Fix Galera test galera_as_slave_ctas.
Diffstat (limited to 'mysql-test/suite')
-rw-r--r-- | mysql-test/suite/galera/r/galera_as_slave_ctas.result | 26 | ||||
-rw-r--r-- | mysql-test/suite/galera/t/galera_as_slave_ctas.test | 36 |
2 files changed, 32 insertions, 30 deletions
diff --git a/mysql-test/suite/galera/r/galera_as_slave_ctas.result b/mysql-test/suite/galera/r/galera_as_slave_ctas.result index 16df71b744f..a3d28ce42aa 100644 --- a/mysql-test/suite/galera/r/galera_as_slave_ctas.result +++ b/mysql-test/suite/galera/r/galera_as_slave_ctas.result @@ -1,29 +1,31 @@ -connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; +connection node_2; +connection node_1; connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; -connection node_2a; +SELECT @@wsrep_on; +@@wsrep_on +0 +connection node_1; START SLAVE; -connection default; +connection node_3; SHOW VARIABLES LIKE 'binlog_format'; Variable_name Value binlog_format ROW -connection default; CREATE TABLE source (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; CREATE TABLE target AS SELECT * FROM source; -connection node_2a; +connection node_1; +connection node_2; connection node_3; -connection default; DROP TABLE target; INSERT INTO source VALUES(1); CREATE TABLE target AS SELECT * FROM source; -connection node_2a; +connection node_1; +connection node_2; connection node_3; -connection default; DROP TABLE source; DROP TABLE target; -connection node_3; -connection node_2a; +connection node_2; +connection node_1; STOP SLAVE; RESET SLAVE ALL; -connection default; +connection node_3; RESET MASTER; -disconnect node_2a; diff --git a/mysql-test/suite/galera/t/galera_as_slave_ctas.test b/mysql-test/suite/galera/t/galera_as_slave_ctas.test index b146b1ce3dc..eced636c600 100644 --- a/mysql-test/suite/galera/t/galera_as_slave_ctas.test +++ b/mysql-test/suite/galera/t/galera_as_slave_ctas.test @@ -6,69 +6,69 @@ # --source include/have_innodb.inc +--source include/have_log_bin.inc +--source include/galera_cluster.inc -# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc ---connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2 +# As node #3 is not a Galera node, and galera_cluster.inc does not open connetion to it +# we open the node_3 connection here --connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 +SELECT @@wsrep_on; ---connection node_2a +--connection node_1 --disable_query_log ---eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1; +--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3; --enable_query_log START SLAVE; - # make sure master server has binlog_format=ROW ---connection default +--connection node_3 SHOW VARIABLES LIKE 'binlog_format'; # # test phase one, issue CTAS with empty source table # ---connection default + CREATE TABLE source (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; CREATE TABLE target AS SELECT * FROM source; ---connection node_2a +--connection node_1 --let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'target'; --source include/wait_condition.inc ---connection node_3 +--connection node_2 --let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'target'; --source include/wait_condition.inc # # test phase two, issue CTAS with populated source table # ---connection default +--connection node_3 DROP TABLE target; INSERT INTO source VALUES(1); CREATE TABLE target AS SELECT * FROM source; ---connection node_2a +--connection node_1 --let $wait_condition = SELECT COUNT(*) = 1 FROM target; --source include/wait_condition.inc ---connection node_3 +--connection node_2 --let $wait_condition = SELECT COUNT(*) = 1 FROM target; --source include/wait_condition.inc ---connection default +--connection node_3 DROP TABLE source; DROP TABLE target; ---connection node_3 +--connection node_2 --let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'target'; --source include/wait_condition.inc - ---connection node_2a +--connection node_1 STOP SLAVE; RESET SLAVE ALL; ---connection default +--connection node_3 RESET MASTER; ---disconnect node_2a |