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

XA: Assertion `!log->same_pk' failed in row_log_table_apply_delete

    XMLWordPrintable

Details

    Description

      Apparently belongs to the MDEV-14693 family.

      The test is non-deterministic, run with --repeat=N. N=10 is usually enough for me, but it can vary on different machines.

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (a INT) ENGINE=InnoDB;
      INSERT INTO t1 VALUES (1),(2);
       
      --connect (con1,localhost,root,,test)
      XA START 'xid';
      UPDATE t1 SET a = 5;
       
      --connection default
      SET innodb_lock_wait_timeout= 2, lock_wait_timeout= 2;
      --error ER_NO_SUCH_TABLE
      ALTER TABLE non_existing_table1;
      --send
        ALTER TABLE t1 FORCE;
       
      --connection con1
      --error ER_XAER_RMFAIL
      ALTER TABLE non_existing_table2;
      DELETE FROM t1 LIMIT 1;
       
      --connection default
      --error ER_LOCK_WAIT_TIMEOUT
      --reap
       
      # Cleanup
      --connection con1
      XA END 'xid';
      XA ROLLBACK 'xid';
      DROP TABLE t1;
      --disconnect con1
      

      10.2 a050189773c9

      mysqld: /data/src/10.2/storage/innobase/row/row0log.cc:1884: dberr_t row_log_table_apply_delete(que_thr_t*, ulint, const mrec_t*, const ulint*, mem_heap_t*, mem_heap_t*, const row_log_t*, const row_ext_t*, ulint): Assertion `!log->same_pk' failed.
       
      #7  0x00007fdcdc075ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000055fe179772fd in row_log_table_apply_delete (thr=0x7fdc7c0362c0, trx_id_col=1, mrec=0x7fdcd404f007 "", moffsets=0x7fdc7c068600, offsets_heap=0x7fdc7c05e0c0, heap=0x7fdc7c05a030, log=0x7fdc7c039f10, save_ext=0x0, ext_size=0) at /data/src/10.2/storage/innobase/row/row0log.cc:1884
      #9  0x000055fe17978a00 in row_log_table_apply_op (thr=0x7fdc7c0362c0, trx_id_col=1, new_trx_id_col=1, dup=0x7fdcd44de2e0, error=0x7fdcd44de084, offsets_heap=0x7fdc7c05e0c0, heap=0x7fdc7c05a030, mrec=0x7fdcd404f007 "", mrec_end=0x7fdcd404f01a "", offsets=0x7fdc7c068600) at /data/src/10.2/storage/innobase/row/row0log.cc:2398
      #10 0x000055fe1797a4bf in row_log_table_apply_ops (thr=0x7fdc7c0362c0, dup=0x7fdcd44de2e0, stage=0x7fdc7c113ce0) at /data/src/10.2/storage/innobase/row/row0log.cc:2909
      #11 0x000055fe1797a9ca in row_log_table_apply (thr=0x7fdc7c0362c0, old_table=0x7fdc7c067ff8, table=0x7fdc7c11a880, stage=0x7fdc7c113ce0) at /data/src/10.2/storage/innobase/row/row0log.cc:3008
      #12 0x000055fe178618ae in ha_innobase::inplace_alter_table (this=0x7fdc7c130d08, altered_table=0x7fdc7c11a880, ha_alter_info=0x7fdcd44de610) at /data/src/10.2/storage/innobase/handler/handler0alter.cc:6488
      #13 0x000055fe173778f7 in handler::ha_inplace_alter_table (this=0x7fdc7c130d08, altered_table=0x7fdc7c11a880, ha_alter_info=0x7fdcd44de610) at /data/src/10.2/sql/handler.h:3775
      #14 0x000055fe1736e7b1 in mysql_inplace_alter_table (thd=0x7fdc7c000b00, table_list=0x7fdc7c0125d0, table=0x7fdc7c130100, altered_table=0x7fdc7c11a880, ha_alter_info=0x7fdcd44de610, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, target_mdl_request=0x7fdcd44de680, alter_ctx=0x7fdcd44df240) at /data/src/10.2/sql/sql_table.cc:7332
      #15 0x000055fe17373de4 in mysql_alter_table (thd=0x7fdc7c000b00, new_db=0x7fdc7c012be0 "test", new_name=0x0, create_info=0x7fdcd44dfe50, table_list=0x7fdc7c0125d0, alter_info=0x7fdcd44dfda0, order_num=0, order=0x0, ignore=false) at /data/src/10.2/sql/sql_table.cc:9353
      #16 0x000055fe173ed954 in Sql_cmd_alter_table::execute (this=0x7fdc7c012be8, thd=0x7fdc7c000b00) at /data/src/10.2/sql/sql_alter.cc:324
      #17 0x000055fe172a8c57 in mysql_execute_command (thd=0x7fdc7c000b00) at /data/src/10.2/sql/sql_parse.cc:6208
      #18 0x000055fe172ad5d1 in mysql_parse (thd=0x7fdc7c000b00, rawbuf=0x7fdc7c0124f8 "ALTER TABLE t1 FORCE", length=20, parser_state=0x7fdcd44e1200, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7902
      #19 0x000055fe1729b4f1 in dispatch_command (command=COM_QUERY, thd=0x7fdc7c000b00, packet=0x7fdc7c008951 "ALTER TABLE t1 FORCE", packet_length=20, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1806
      #20 0x000055fe17299e54 in do_command (thd=0x7fdc7c000b00) at /data/src/10.2/sql/sql_parse.cc:1360
      #21 0x000055fe173e8646 in do_handle_one_connection (connect=0x55fe19bc8250) at /data/src/10.2/sql/sql_connect.cc:1335
      #22 0x000055fe173e83d3 in handle_one_connection (arg=0x55fe19bc8250) at /data/src/10.2/sql/sql_connect.cc:1241
      #23 0x000055fe178081f8 in pfs_spawn_thread (arg=0x55fe19bd27c0) at /data/src/10.2/storage/perfschema/pfs.cc:1862
      #24 0x00007fdcddd4c494 in start_thread (arg=0x7fdcd44e2700) at pthread_create.c:333
      #25 0x00007fdcdc13293f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Also reproducible on 10.0, 10.1. Could not reproduce on 5.5, 10.3, MySQL 5.6.

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              9 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.