diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:24:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:24:36 +0000 |
commit | 06eaf7232e9a920468c0f8d74dcf2fe8b555501c (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/galera_sr/t/galera-features#56.test | |
parent | Initial commit. (diff) | |
download | mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.tar.xz mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/galera_sr/t/galera-features#56.test')
-rw-r--r-- | mysql-test/suite/galera_sr/t/galera-features#56.test | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/mysql-test/suite/galera_sr/t/galera-features#56.test b/mysql-test/suite/galera_sr/t/galera-features#56.test new file mode 100644 index 00000000..ac73c2ef --- /dev/null +++ b/mysql-test/suite/galera_sr/t/galera-features#56.test @@ -0,0 +1,62 @@ +## +## This test tests parallel application of multiple auto-increment insert transactions +## + +--source include/galera_cluster.inc + +# Create a second connection to node1 so that we can run transactions concurrently +--let $galera_connection_name = node_1a +--let $galera_server_number = 1 +--source include/galera_connect.inc +SET SESSION wsrep_trx_fragment_size = 1; + +--connection node_1 +CREATE TABLE ten (f1 INTEGER NOT NULL PRIMARY KEY) Engine=InnoDB; +INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); + +CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB; +SET SESSION wsrep_trx_fragment_size = 1; + +--connection node_2 +set session wsrep_sync_wait=15; +SELECT COUNT(*) from ten; +SELECT COUNT(*) from t1; +set session wsrep_sync_wait=0; + +--let $wsrep_slave_threads_orig = `SELECT @@wsrep_slave_threads` +SET GLOBAL wsrep_slave_threads = 4; + +--let $wait_condition = SELECT COUNT(*) >= 3 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; +--source include/wait_condition.inc + +SET SESSION wsrep_trx_fragment_size = 1; + +--connection node_1 +--send INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2; + +--connection node_1a +--send INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2; + +--connection node_2 +--send INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2; + +--connection node_1 +--reap + +--connection node_1a +--reap + +--connection node_2 +--reap + +set session wsrep_sync_wait=15; +SELECT COUNT(*) FROM t1; +SELECT COUNT(DISTINCT f1) FROM t1; + +--disable_query_log +--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig; +--enable_query_log + +--connection default +DROP TABLE t1; +DROP TABLE ten; |