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

Assertion `thd->transaction.xid_state.xid.is_null()' failed in trans_xa_start

    XMLWordPrintable

    Details

    • Sprint:
      10.2.14

      Description

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=InnoDB;
      CREATE TABLE t2 (pk INT PRIMARY KEY) ENGINE=InnoDB;
      INSERT INTO t2 VALUES (1),(2);
      CREATE TABLE t3 (i INT) ENGINE=InnoDB;
       
      XA BEGIN 'xid1';
      REPLACE INTO t1 SELECT * FROM t2;
       
      --connect (con1,localhost,root,,test)
      XA BEGIN 'xid2';
      --send
      INSERT INTO t1 SELECT * FROM t2;
       
      --connection default
      REPLACE INTO t2 SELECT * FROM t2;
       
      --connection con1
      --error ER_LOCK_DEADLOCK
      --reap
      --disconnect con1
       
      --connect (con2,localhost,root,,test)
      INSERT INTO t3 VALUES (1);
      XA BEGIN 'xid3';
       
      # Cleanup
      --disconnect con2
      --connection default
      XA END 'xid1';
      XA ROLLBACK 'xid1';
      DROP TABLE t1, t2, t3;
      

      The test is non-deterministic, run with --repeat=N and don't use in the regression suite.
      It usually fails for me within 1-2 first repetitions, but it can probably vary.

      10.2 5a7b6db67

      mysqld: /data/src/10.2/sql/transaction.cc:805: bool trans_xa_start(THD*): Assertion `thd->transaction.xid_state.xid.is_null()' failed.
      180209 19:30:13 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f441e5deee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000055814345eded in trans_xa_start (thd=0x7f43b8000b00) at /data/src/10.2/sql/transaction.cc:805
      #9  0x00005581433083f2 in mysql_execute_command (thd=0x7f43b8000b00) at /data/src/10.2/sql/sql_parse.cc:6058
      #10 0x000055814330d64b in mysql_parse (thd=0x7f43b8000b00, rawbuf=0x7f43b8011138 "XA BEGIN 'xid1'", length=15, parser_state=0x7f441826a200, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7902
      #11 0x00005581432fb56b in dispatch_command (command=COM_QUERY, thd=0x7f43b8000b00, packet=0x7f43b8008951 "XA BEGIN 'xid1'", packet_length=15, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1806
      #12 0x00005581432f9ece in do_command (thd=0x7f43b8000b00) at /data/src/10.2/sql/sql_parse.cc:1360
      #13 0x0000558143448348 in do_handle_one_connection (connect=0x558146c1ce00) at /data/src/10.2/sql/sql_connect.cc:1335
      #14 0x00005581434480d5 in handle_one_connection (arg=0x558146c1ce00) at /data/src/10.2/sql/sql_connect.cc:1241
      #15 0x0000558143867484 in pfs_spawn_thread (arg=0x558146c3fbb0) at /data/src/10.2/storage/perfschema/pfs.cc:1862
      #16 0x00007f44202b5494 in start_thread (arg=0x7f441826b700) at pthread_create.c:333
      #17 0x00007f441e69b93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Also reproducible on 10.3. Couldn't reproduce on 10.1.

        Attachments

          Activity

            People

            • Assignee:
              holyfoot Alexey Botchkov
              Reporter:
              elenst Elena Stepanova
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: