summaryrefslogtreecommitdiff
path: root/mysql-test/suite/galera_sr/t/GCF-574.test
blob: c9d7c405d1466ec1f1049dae1e70e7b7d21c663d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--source include/galera_cluster.inc
--source include/have_innodb.inc

#
# Test CREATE TABLE ... SELECT with Streaming Replication
#

--connection node_1
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);

--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`

SET SESSION wsrep_trx_fragment_size = 1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB SELECT 1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;

--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
--disable_query_log
--eval SELECT ($wsrep_last_committed_after - $wsrep_last_committed_before) > 1 AS wsrep_last_committed_delta;
--enable_query_log

--connection node_2
SELECT COUNT(*) = 10000 FROM t1;

--connection node_1
DROP TABLE t1;
DROP TABLE ten;