Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-31335

Create temporary sequence can cause inconsistency

Details

    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.

      Attachments

        Activity

          seppo Seppo Jaakola created issue -
          janlindstrom Jan Lindström made changes -
          Field Original Value New Value
          Fix Version/s 10.4 [ 22408 ]
          janlindstrom Jan Lindström made changes -
          Status Open [ 1 ] In Progress [ 3 ]

          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.
          

          janlindstrom Jan Lindström added a comment - 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.
          janlindstrom Jan Lindström added a comment - https://github.com/MariaDB/server/pull/2647
          janlindstrom Jan Lindström made changes -
          Assignee Jan Lindström [ JIRAUSER53125 ] Julius Goryavsky [ sysprg ]
          Status In Progress [ 3 ] In Review [ 10002 ]
          sysprg Julius Goryavsky made changes -
          Status In Review [ 10002 ] Stalled [ 10000 ]
          sysprg Julius Goryavsky made changes -
          Status Stalled [ 10000 ] In Progress [ 3 ]
          sysprg Julius Goryavsky made changes -
          issue.field.resolutiondate 2023-06-06 12:22:55.0 2023-06-06 12:22:55.003
          sysprg Julius Goryavsky made changes -
          Fix Version/s 11.0.2 [ 28706 ]
          Fix Version/s 10.4.30 [ 28912 ]
          Fix Version/s 10.5.21 [ 28913 ]
          Fix Version/s 10.6.14 [ 28914 ]
          Fix Version/s 10.9.7 [ 28916 ]
          Fix Version/s 10.10.5 [ 28917 ]
          Fix Version/s 10.11.4 [ 28918 ]
          Fix Version/s 10.4 [ 22408 ]
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]
          dbart Daniel Bartholomew made changes -
          Fix Version/s 10.4.31 [ 29010 ]
          Fix Version/s 10.5.22 [ 29011 ]
          Fix Version/s 10.6.15 [ 29013 ]
          Fix Version/s 10.9.8 [ 29015 ]
          Fix Version/s 10.10.6 [ 29017 ]
          Fix Version/s 10.11.5 [ 29019 ]
          Fix Version/s 11.0.3 [ 28920 ]
          Fix Version/s 11.1.2 [ 28921 ]
          Fix Version/s 11.0.2 [ 28706 ]
          Fix Version/s 10.4.30 [ 28912 ]
          Fix Version/s 10.5.21 [ 28913 ]
          Fix Version/s 10.6.14 [ 28914 ]
          Fix Version/s 10.9.7 [ 28916 ]
          Fix Version/s 10.10.5 [ 28917 ]
          Fix Version/s 10.11.4 [ 28918 ]
          ralf.gebhardt Ralf Gebhardt made changes -
          Summary Create sequence can cause inconsistency Create temporary sequence can cause inconsistency

          People

            sysprg Julius Goryavsky
            seppo Seppo Jaakola
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.