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

Assertion `!lock_trx_has_sys_table_locks(trx)' failed in dberr_t row_discard_tablespace_for_mysql(dict_table_t*, trx_t*)

    XMLWordPrintable

    Details

      Description

      CREATE TABLE t1 (c INT KEY) ENGINE=INNODB;
      CREATE TABLE t2 (c INT KEY,FOREIGN KEY(c) REFERENCES t1 (c)) ENGINE=INNODB;
      ALTER TABLE t1 DISCARD TABLESPACE;
      

      Leads to:

      10.7.1 8bd21167d28748bea8717183534db1103a696755 (Debug)

      mysqld: /test/10.7_dbg/storage/innobase/row/row0mysql.cc:2512: dberr_t row_discard_tablespace_for_mysql(dict_table_t*, trx_t*): Assertion `!lock_trx_has_sys_table_locks(trx)' failed.
      

      10.7.1 8bd21167d28748bea8717183534db1103a696755 (Debug)

      Core was generated by `/test/MD091121-mariadb-10.7.1-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      [Current thread is 1 (Thread 0x152d8ccb9700 (LWP 2284691))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x0000152da1b50859 in __GI_abort () at abort.c:79
      #2  0x0000152da1b50729 in __assert_fail_base (fmt=0x152da1ce6588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5581a6006df0 "!lock_trx_has_sys_table_locks(trx)", file=0x5581a6042758 "/test/10.7_dbg/storage/innobase/row/row0mysql.cc", line=2512, function=<optimized out>) at assert.c:92
      #3  0x0000152da1b61f36 in __GI___assert_fail (assertion=assertion@entry=0x5581a6006df0 "!lock_trx_has_sys_table_locks(trx)", file=file@entry=0x5581a6042758 "/test/10.7_dbg/storage/innobase/row/row0mysql.cc", line=line@entry=2512, function=function@entry=0x5581a6043778 "dberr_t row_discard_tablespace_for_mysql(dict_table_t*, trx_t*)") at assert.c:101
      #4  0x00005581a5919eac in row_discard_tablespace_for_mysql (table=0x152d5401f538, trx=0x152d8cf731e0) at /test/10.7_dbg/storage/innobase/row/row0mysql.cc:2512
      #5  0x00005581a5783911 in ha_innobase::discard_or_import_tablespace (this=0x152d540299f0, discard=<optimized out>) at /test/10.7_dbg/storage/innobase/handler/ha_innodb.cc:13289
      #6  0x00005581a53d1c35 in handler::ha_discard_or_import_tablespace (this=0x152d540299f0, discard=discard@entry=1 '\001') at /test/10.7_dbg/sql/handler.cc:5160
      #7  0x00005581a51a66d9 in mysql_discard_or_import_tablespace (thd=thd@entry=0x152d54000db8, table_list=table_list@entry=0x152d54013eb8, discard=<optimized out>) at /test/10.7_dbg/sql/sql_table.cc:5560
      #8  0x00005581a5248be0 in Sql_cmd_discard_import_tablespace::execute (this=0x152d540145a0, thd=0x152d54000db8) at /test/10.7_dbg/sql/sql_alter.cc:594
      #9  0x00005581a50cf070 in mysql_execute_command (thd=thd@entry=0x152d54000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.7_dbg/sql/sql_parse.cc:5989
      #10 0x00005581a50b5b6c in mysql_parse (thd=thd@entry=0x152d54000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x152d8ccb8400) at /test/10.7_dbg/sql/sql_parse.cc:8028
      #11 0x00005581a50c47f1 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x152d54000db8, packet=packet@entry=0x152d5400b879 "ALTER TABLE t1 DISCARD TABLESPACE", packet_length=packet_length@entry=33, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_class.h:1360
      #12 0x00005581a50c7c2e in do_command (thd=0x152d54000db8, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_parse.cc:1402
      #13 0x00005581a52415b0 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5581a916d5a8, put_in_cache=put_in_cache@entry=true) at /test/10.7_dbg/sql/sql_connect.cc:1418
      #14 0x00005581a5241bb5 in handle_one_connection (arg=arg@entry=0x5581a916d5a8) at /test/10.7_dbg/sql/sql_connect.cc:1312
      #15 0x00005581a56c2cd0 in pfs_spawn_thread (arg=0x5581a9080cd8) at /test/10.7_dbg/storage/perfschema/pfs.cc:2201
      #16 0x0000152da205e609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #17 0x0000152da1c4d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.6.5 (dbg), 10.7.1 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.41 (dbg), 10.2.41 (opt), 10.3.32 (dbg), 10.3.32 (opt), 10.4.22 (dbg), 10.4.22 (opt), 10.5.13 (dbg), 10.5.13 (opt), 10.6.5 (opt), 10.7.1 (opt)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              thiru Thirunarayanan Balathandayuthapani
              Reporter:
              ramesh Ramesh Sivaraman
              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.