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
28
29
30
31
32
33
|
--source include/galera_cluster.inc
--source include/have_innodb.inc
#
# Test large INSERT ... SELECT with SR
#
--connection node_1
CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 CHAR(255)) ENGINE=InnoDB;
SET SESSION wsrep_trx_fragment_size = 1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
# Insert 10K rows.
INSERT INTO t1 (f2) SELECT REPEAT('a', 255) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
--connection node_2
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
--let $wait_condition = SELECT COUNT(*) > 99 FROM t1;
--source include/wait_condition.inc
--connection node_1
COMMIT;
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 10000 FROM t1;
--connection node_1
DROP TABLE t1;
DROP TABLE ten;
|