mirror of
https://github.com/MariaDB/server.git
synced 2025-11-27 05:41:41 +03:00
50 lines
1.1 KiB
Plaintext
50 lines
1.1 KiB
Plaintext
#
|
|
# This test dumps the contents of the SR table under various circumstances
|
|
#
|
|
|
|
--source include/galera_cluster.inc
|
|
|
|
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
|
INSERT INTO t1 VALUES (1),(2),(3);
|
|
|
|
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
|
INSERT INTO t2 VALUES (1),(2),(3);
|
|
|
|
SET SESSION wsrep_trx_fragment_size = 1;
|
|
SET AUTOCOMMIT=OFF;
|
|
START TRANSACTION;
|
|
|
|
--echo
|
|
--echo Start of Simple Insert
|
|
INSERT INTO t1 VALUES (4);
|
|
--source suite/galera/include/galera_dump_sr_table.inc
|
|
--echo End of Simple Insert
|
|
--echo
|
|
ROLLBACK;
|
|
|
|
--echo Start of Multi-row Update
|
|
UPDATE t1 SET f1 = f1 + 10;
|
|
--source suite/galera/include/galera_dump_sr_table.inc
|
|
--echo End of Multi-row Update
|
|
--echo
|
|
ROLLBACK;
|
|
|
|
--echo Start of Multi-table Update
|
|
UPDATE t1, t2 SET t1.f1 = t1.f1 + 100, t2.f1 = t2.f1 + 100;
|
|
--source suite/galera/include/galera_dump_sr_table.inc
|
|
--echo End of Multi-table Update
|
|
--echo
|
|
ROLLBACK;
|
|
|
|
--echo Start of Savepoint
|
|
INSERT INTO t1 VALUES (1000);
|
|
SAVEPOINT X;
|
|
INSERT INTO t1 VALUES (2000);
|
|
ROLLBACK TO SAVEPOINT X;
|
|
--source suite/galera/include/galera_dump_sr_table.inc
|
|
--echo End of Savepoint
|
|
--echo
|
|
ROLLBACK;
|
|
|
|
DROP TABLE t1, t2;
|