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

InnoDB: Failing assertion: thr->magic_n == QUE_THR_MAGIC_N upon dropping a versioned table

    XMLWordPrintable

Details

    Description

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (
        f1 BOOLEAN,
        f2 DOUBLE,
        f3 VARCHAR(128),
        f4 BIGINT,
        s DATETIME,
        e DATETIME,
        PERIOD FOR app(s,e),
        row_start BIGINT UNSIGNED AS ROW START,
        row_end BIGINT UNSIGNED AS ROW END,
        PERIOD FOR SYSTEM_TIME(row_start,row_end)
      ) WITH SYSTEM VERSIONING ENGINE=InnoDB;
      INSERT INTO t1 (s,e) VALUES
        ('2022-12-11 14:22:34', '2025-12-17 07:42:44'),
        ('2014-05-22 00:00:00', '2015-12-28 20:53:28'),
        ('2020-12-13 00:00:00', '2024-11-12 00:00:00');
      DELETE FROM t1 FOR PORTION OF app FROM '2021-08-23 09:25:15' TO '2022-10-15 13:27:04';
      DELETE FROM t1 FOR PORTION OF app FROM '2023-01-08 14:22:34' TO '2025-12-16 13:32:12';
      DELETE FROM t1;
      INSERT INTO t1 SELECT * FROM t1 FOR SYSTEM_TIME ALL;
      DELETE FROM t1 FOR PORTION OF app FROM '2022-11-12 14:22:34' TO '2030-05-11 09:42:44' LIMIT 3;
      DELETE HISTORY FROM t1;
      DROP TABLE t1;
      

      10.4 a65d3b2c

      2019-04-21 20:03:15 0x7f7c618d6700  InnoDB: Assertion failure in file /data/src/10.4/storage/innobase/que/que0que.cc line 435
      InnoDB: Failing assertion: thr->magic_n == QUE_THR_MAGIC_N
       
      #5  0x00007f7c67d653fa in abort () from /lib/x86_64-linux-gnu/libc.so.6
      #6  0x000055caa2968a7c in ut_dbg_assertion_failed (expr=0x55caa2ff5190 "thr->magic_n == QUE_THR_MAGIC_N", file=0x55caa2ff5050 "/data/src/10.4/storage/innobase/que/que0que.cc", line=435) at /data/src/10.4/storage/innobase/ut/ut0dbg.cc:60
      #7  0x000055caa284fef9 in que_graph_free_recursive (node=0x7f7c10152c48) at /data/src/10.4/storage/innobase/que/que0que.cc:435
      #8  0x000055caa28a8c7e in row_prebuilt_free (prebuilt=0x7f7c10151ba8, dict_locked=0) at /data/src/10.4/storage/innobase/row/row0mysql.cc:1006
      #9  0x000055caa273d54e in ha_innobase::close (this=0x7f7c101a13d8) at /data/src/10.4/storage/innobase/handler/ha_innodb.cc:6542
      #10 0x000055caa24c727a in handler::ha_close (this=0x7f7c101a13d8) at /data/src/10.4/sql/handler.cc:2968
      #11 0x000055caa22ac858 in closefrm (table=0x7f7c1000d320) at /data/src/10.4/sql/table.cc:4000
      #12 0x000055caa23f639d in intern_close_table (table=0x7f7c1000d320) at /data/src/10.4/sql/table_cache.cc:222
      #13 0x000055caa23f927f in tdc_remove_table (thd=0x7f7c10000b00, remove_type=TDC_RT_REMOVE_ALL, db=0x7f7c10015d48 "test", table_name=0x7f7c10015668 "t1", kill_delayed_threads=false) at /data/src/10.4/sql/table_cache.cc:1151
      #14 0x000055caa225f3be in mysql_rm_table_no_locks (thd=0x7f7c10000b00, tables=0x7f7c100156a0, if_exists=false, drop_temporary=false, drop_view=false, drop_sequence=false, dont_log_query=false, dont_free_locks=false) at /data/src/10.4/sql/sql_table.cc:2488
      #15 0x000055caa225e4c3 in mysql_rm_table (thd=0x7f7c10000b00, tables=0x7f7c100156a0, if_exists=false, drop_temporary=false, drop_sequence=false) at /data/src/10.4/sql/sql_table.cc:2114
      #16 0x000055caa218f671 in mysql_execute_command (thd=0x7f7c10000b00) at /data/src/10.4/sql/sql_parse.cc:5111
      #17 0x000055caa2199a13 in mysql_parse (thd=0x7f7c10000b00, rawbuf=0x7f7c100155e8 "DROP TABLE t1", length=13, parser_state=0x7f7c618d5180, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8154
      #18 0x000055caa218546a in dispatch_command (command=COM_QUERY, thd=0x7f7c10000b00, packet=0x7f7c1013a2c1 "DROP TABLE t1", packet_length=13, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1832
      #19 0x000055caa2183c50 in do_command (thd=0x7f7c10000b00) at /data/src/10.4/sql/sql_parse.cc:1365
      #20 0x000055caa22fc033 in do_handle_one_connection (connect=0x55caa5b30360) at /data/src/10.4/sql/sql_connect.cc:1398
      #21 0x000055caa22fbda4 in handle_one_connection (arg=0x55caa5b30360) at /data/src/10.4/sql/sql_connect.cc:1301
      #22 0x000055caa27202f5 in pfs_spawn_thread (arg=0x55caa5bb8020) at /data/src/10.4/storage/perfschema/pfs.cc:1862
      #23 0x00007f7c69e51494 in start_thread (arg=0x7f7c618d6700) at pthread_create.c:333
      #24 0x00007f7c67e1993f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      All of debug, ASAN and non-debug builds fail in the same way.

      Attachments

        Activity

          People

            midenok Aleksey Midenkov
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.