Debian Codegraph @

mysql-test/suite/galera_sr/t/galera_sr_blob.test

raw
1 #
2 # Test that a single-blob will be replicated using SR if it is sufficiently
3 # large.
4 #
5
6 --source include/galera_cluster.inc
7 --source include/have_innodb.inc
8
9 --connection node_1
10 CREATE TABLE t1 (f1 TEXT) ENGINE=InnoDB;
11
12 SET SESSION wsrep_trx_fragment_size = 1;
13 SET AUTOCOMMIT=OFF;
14 START TRANSACTION;
15
16 --connection node_2
17 --let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
18
19 --connection node_1
20 INSERT INTO t1 VALUES (REPEAT('x', 65535));
21
22 --connection node_2
23 --let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
24
25 # Confirm that exactly one fragment was replicated
26
27 --disable_query_log
28 --eval SELECT ($wsrep_last_committed_after - $wsrep_last_committed_before) = 1 AS wsrep_last_committed_delta;
29 --enable_query_log
30
31 --connection node_1
32 COMMIT;
33
34 --connection node_2
35 SELECT COUNT(*) = 1 FROM t1;
36 SELECT LENGTH(f1) = 65535 FROM t1;
37
38 DROP TABLE t1;