[MDEV-31335] Create temporary sequence can cause inconsistency Created: 2023-05-24  Updated: 2023-06-26  Resolved: 2023-06-06

Status: Closed
Project: MariaDB Server
Component/s: Galera
Affects Version/s: 10.6
Fix Version/s: 10.4.31, 10.5.22, 10.6.15, 10.9.8, 10.10.6, 10.11.5, 11.0.3, 11.1.2

Type: Bug Priority: Major
Reporter: Seppo Jaakola Assignee: Julius Goryavsky
Resolution: Fixed Votes: 0
Labels: None


 Description   

In 10.6 cluster following transaction causes inconsistency:

create table t (i int primary key, j int);
set autocommit=0;
insert into t values (3,0);
create temporary sequence seq NOCACHE engine=innodb;
commit;

After this, the first node has the inserted row in table t, but other nodes do not have it.
Problem seems to be due to how implicit commit triggered by the create sequence, is handled in galera replication.
However, if the normal (i.e. not temporary) sequence is created, replication happens correctly.



 Comments   
Comment by Jan Lindström [ 2023-05-25 ]

This test case crashes on 10.4

mysqld: /home/jan/work/mariadb/10.4/sql/wsrep_trans_observer.h:583: void wsrep_commit_empty(THD*, bool): Assertion `!wsrep_has_changes(thd) || (thd->lex->sql_command == SQLCOM_CREATE_TABLE && !thd->is_current_stmt_binlog_format_row()) || thd->wsrep_cs().transaction().state() == wsrep::transaction::s_aborted' failed.

Comment by Jan Lindström [ 2023-05-29 ]

https://github.com/MariaDB/server/pull/2647

Generated at Thu Feb 08 10:23:04 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.