summaryrefslogtreecommitdiff
path: root/mysql-test/suite/galera/r/galera_sequences.result
diff options
context:
space:
mode:
authormkaruza <mario.karuza@galeracluster.com>2022-05-10 11:15:32 +0200
committerJan Lindström <jan.lindstrom@mariadb.com>2022-05-30 12:43:52 +0300
commitebbd5ef6e2902a51a46e47dbb8a8667593cb25e7 (patch)
tree1b6a2a61387e9cf76b12154cda681cf044d29d44 /mysql-test/suite/galera/r/galera_sequences.result
parentc8fabbed425140332038537c8baeaa33c96a9db5 (diff)
downloadmariadb-git-ebbd5ef6e2902a51a46e47dbb8a8667593cb25e7.tar.gz
MDEV-27862 Galera should replicate nextval()-related changes in sequences with INCREMENT <> 0, at least NOCACHE ones with engine=InnoDB
Sequence storage engine is not transactionl so cache will be written in stmt_cache that is not replicated in cluster. To fix this replicate what is available in both trans_cache and stmt_cache. Sequences will only work when NOCACHE keyword is used when sequnce is created. If WSREP is enabled and we don't have this keyword report error indicting that sequence will not work correctly in cluster. When binlog is enabled statement cache will be cleared in transaction before COMMIT so cache generated from sequence will not be replicated. We need to keep cache until replication. Tests are re-recorded because of replication changes that were introducted with this PR. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
Diffstat (limited to 'mysql-test/suite/galera/r/galera_sequences.result')
-rw-r--r--mysql-test/suite/galera/r/galera_sequences.result5
1 files changed, 4 insertions, 1 deletions
diff --git a/mysql-test/suite/galera/r/galera_sequences.result b/mysql-test/suite/galera/r/galera_sequences.result
index 48593d2a258..7276cb8dbde 100644
--- a/mysql-test/suite/galera/r/galera_sequences.result
+++ b/mysql-test/suite/galera/r/galera_sequences.result
@@ -44,6 +44,9 @@ Table Create Table
Seq1_1 CREATE SEQUENCE `Seq1_1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB
select NEXT VALUE FOR Seq1_1;
NEXT VALUE FOR Seq1_1
-1
+3001
connection node_1;
DROP SEQUENCE Seq1_1;
+CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
+connection node_2;
+CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");