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

Assertion `thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)' failed in mysql_rm_table_no_locks on DROP TABLE, including via scripts/mariadb-install-db

Details

    Description

      SET innodb_compression_default=1;
      CREATE TEMPORARY TABLE t (c INT);
      SET GLOBAL innodb_compression_level=0;
      TRUNCATE t;
      DROP TABLE t;
      

      Leads to:

      10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)

      10.5.27-dbg>TRUNCATE t;
      ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine InnoDB
       
      10.5.27-dbg>DROP TABLE t;
      ERROR 2013 (HY000): Lost connection to MySQL server during query
      

      On optimized we see:

      10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Optimized)

      10.5.27-opt>TRUNCATE t;
      ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine InnoDB
       
      10.5.27-opt>DROP TABLE t;
      ERROR 1051 (42S02): Unknown table 'test.t'
      

      Interestingly, on optimized, SHOW CREATE TABLE sees the table, DROP TABLE does not (though the DROP still happens):

      10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Optimized)

      10.5.27-opt>TRUNCATE t;
      ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine InnoDB
       
      10.5.27-opt>SHOW CREATE TABLE t;
      +-------+-------------------------------------------------------------------------------------------------------------------------------------------------+
      | Table | Create Table                                                                                                                                    |
      +-------+-------------------------------------------------------------------------------------------------------------------------------------------------+
      | t     | CREATE TEMPORARY TABLE `t` (
        `c` int(11) DEFAULT NULL
      ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci `PAGE_COMPRESSED`='ON' |
      +-------+-------------------------------------------------------------------------------------------------------------------------------------------------+
      1 row in set (0.000 sec)
       
      10.5.27-opt>DROP TABLE t;
      ERROR 1051 (42S02): Unknown table 'test.t'
      

      Debug assertion:

      10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)

      mariadbd: /test/10.5_dbg/sql/sql_table.cc:2445: int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool): Assertion `thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)' failed.
      

      10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)

      Core was generated by `/test/MD130824-mariadb-10.5.27-linux-x86_64-dbg/bin/mariadbd --no-defaults --ma'.
      Program terminated with signal SIGABRT, Aborted.
      Download failed: Invalid argument.  Continuing without source file ./nptl/./nptl/pthread_kill.c.
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
       
      warning: 44	./nptl/pthread_kill.c: No such file or directory
      [Current thread is 1 (LWP 567478)]
      (gdb) bt
      #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
      #1  __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
      #2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
      #3  0x0000143067e4526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
      #4  0x0000143067e288ff in __GI_abort () at ./stdlib/abort.c:79
      #5  0x0000143067e2881b in __assert_fail_base (fmt=0x143067fd01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=file@entry=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=line@entry=2445, function=function@entry=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:94
      #6  0x0000143067e3b507 in __assert_fail (assertion=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=2445, function=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:103
      #7  0x00005eba12a58a95 in mysql_rm_table_no_locks (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=if_exists@entry=false, drop_temporary=drop_temporary@entry=false, drop_view=drop_view@entry=false, drop_sequence=drop_sequence@entry=false, dont_log_query=false, dont_free_locks=false)at /test/10.5_dbg/sql/sql_table.cc:2445
      #8  0x00005eba12a5a8fa in mysql_rm_table (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=<optimized out>, drop_temporary=<optimized out>, drop_sequence=<optimized out>, dont_log_query=dont_log_query@entry=false)at /test/10.5_dbg/sql/sql_table.cc:2164
      #9  0x00005eba129a58b8 in mysql_execute_command (thd=thd@entry=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:5079
      #10 0x00005eba129aa479 in mysql_parse (thd=thd@entry=0x143000000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x143065b012a0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_parse.cc:8229
      #11 0x00005eba129ac9f9 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x143000000d58, packet=packet@entry=0x14300000aaf9 "DROP TABLE t", packet_length=packet_length@entry=12, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_class.h:238
      #12 0x00005eba129af1cd in do_command (thd=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:1376
      #13 0x00005eba12ae26ac in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5eba15ebeef8, put_in_cache=put_in_cache@entry=true)at /test/10.5_dbg/sql/sql_connect.cc:1417
      #14 0x00005eba12ae29d2 in handle_one_connection (arg=arg@entry=0x5eba15ebeef8)at /test/10.5_dbg/sql/sql_connect.cc:1319
      #15 0x00005eba12f32f78 in pfs_spawn_thread (arg=0x5eba15eb3268)at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
      #16 0x0000143067e9ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
      #17 0x0000143067f29c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
      

      Bug confirmed present in:
      MariaDB: 10.5.27 (dbg), 10.5.27 (opt)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.6.20 (dbg), 10.6.20 (opt), 10.11.10 (dbg), 10.11.10 (opt), 11.1.7 (dbg), 11.1.7 (opt), 11.2.6 (dbg), 11.2.6 (opt), 11.4.4 (dbg), 11.4.4 (opt), 11.5.2 (dbg), 11.5.2 (opt), 11.6.1 (dbg), 11.6.1 (opt)

      Attachments

        Issue Links

          Activity

            Roel Roel Van de Paar created issue -
            Roel Roel Van de Paar made changes -
            Field Original Value New Value
            Description {code:sql}
            SET innodb_compression_default=1;
            CREATE TEMPORARY TABLE t (c INT);
            SET GLOBAL innodb_compression_level=0;
            TRUNCATE t;
            DROP TABLE t;
            {code}

            Leads to:

            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            mariadbd: /test/10.5_dbg/sql/sql_table.cc:2445: int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool): Assertion `thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)' failed.
            {noformat}

            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            Core was generated by `/test/MD130824-mariadb-10.5.27-linux-x86_64-dbg/bin/mariadbd --no-defaults --ma'.
            Program terminated with signal SIGABRT, Aborted.
            Download failed: Invalid argument. Continuing without source file ./nptl/./nptl/pthread_kill.c.
            #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44

            warning: 44 ./nptl/pthread_kill.c: No such file or directory
            [Current thread is 1 (LWP 567478)]
            (gdb) bt
            #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
            #1 __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
            #2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
            #3 0x0000143067e4526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
            #4 0x0000143067e288ff in __GI_abort () at ./stdlib/abort.c:79
            #5 0x0000143067e2881b in __assert_fail_base (fmt=0x143067fd01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=file@entry=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=line@entry=2445, function=function@entry=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:94
            #6 0x0000143067e3b507 in __assert_fail (assertion=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=2445, function=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:103
            #7 0x00005eba12a58a95 in mysql_rm_table_no_locks (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=if_exists@entry=false, drop_temporary=drop_temporary@entry=false, drop_view=drop_view@entry=false, drop_sequence=drop_sequence@entry=false, dont_log_query=false, dont_free_locks=false)at /test/10.5_dbg/sql/sql_table.cc:2445
            #8 0x00005eba12a5a8fa in mysql_rm_table (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=<optimized out>, drop_temporary=<optimized out>, drop_sequence=<optimized out>, dont_log_query=dont_log_query@entry=false)at /test/10.5_dbg/sql/sql_table.cc:2164
            #9 0x00005eba129a58b8 in mysql_execute_command (thd=thd@entry=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:5079
            #10 0x00005eba129aa479 in mysql_parse (thd=thd@entry=0x143000000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x143065b012a0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_parse.cc:8229
            #11 0x00005eba129ac9f9 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x143000000d58, packet=packet@entry=0x14300000aaf9 "DROP TABLE t", packet_length=packet_length@entry=12, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_class.h:238
            #12 0x00005eba129af1cd in do_command (thd=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:1376
            #13 0x00005eba12ae26ac in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5eba15ebeef8, put_in_cache=put_in_cache@entry=true)at /test/10.5_dbg/sql/sql_connect.cc:1417
            #14 0x00005eba12ae29d2 in handle_one_connection (arg=arg@entry=0x5eba15ebeef8)at /test/10.5_dbg/sql/sql_connect.cc:1319
            #15 0x00005eba12f32f78 in pfs_spawn_thread (arg=0x5eba15eb3268)at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
            #16 0x0000143067e9ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
            #17 0x0000143067f29c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
            {noformat}

            Bug confirmed present in:
            MariaDB: 10.5.27 (dbg)

            Bug (or feature/syntax) confirmed not present in:
            MariaDB: 10.5.27 (opt), 10.6.20 (dbg), 10.6.20 (opt), 10.11.10 (dbg), 10.11.10 (opt), 11.1.7 (dbg), 11.1.7 (opt), 11.2.6 (dbg), 11.2.6 (opt), 11.4.4 (dbg), 11.4.4 (opt), 11.5.2 (dbg), 11.5.2 (opt), 11.6.1 (dbg), 11.6.1 (opt)
            {code:sql}
            SET innodb_compression_default=1;
            CREATE TEMPORARY TABLE t (c INT);
            SET GLOBAL innodb_compression_level=0;
            TRUNCATE t;
            DROP TABLE t;
            {code}

            Leads to:

            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            mariadbd: /test/10.5_dbg/sql/sql_table.cc:2445: int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool): Assertion `thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)' failed.
            {noformat}

            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            Core was generated by `/test/MD130824-mariadb-10.5.27-linux-x86_64-dbg/bin/mariadbd --no-defaults --ma'.
            Program terminated with signal SIGABRT, Aborted.
            Download failed: Invalid argument. Continuing without source file ./nptl/./nptl/pthread_kill.c.
            #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44

            warning: 44 ./nptl/pthread_kill.c: No such file or directory
            [Current thread is 1 (LWP 567478)]
            (gdb) bt
            #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
            #1 __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
            #2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
            #3 0x0000143067e4526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
            #4 0x0000143067e288ff in __GI_abort () at ./stdlib/abort.c:79
            #5 0x0000143067e2881b in __assert_fail_base (fmt=0x143067fd01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=file@entry=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=line@entry=2445, function=function@entry=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:94
            #6 0x0000143067e3b507 in __assert_fail (assertion=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=2445, function=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:103
            #7 0x00005eba12a58a95 in mysql_rm_table_no_locks (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=if_exists@entry=false, drop_temporary=drop_temporary@entry=false, drop_view=drop_view@entry=false, drop_sequence=drop_sequence@entry=false, dont_log_query=false, dont_free_locks=false)at /test/10.5_dbg/sql/sql_table.cc:2445
            #8 0x00005eba12a5a8fa in mysql_rm_table (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=<optimized out>, drop_temporary=<optimized out>, drop_sequence=<optimized out>, dont_log_query=dont_log_query@entry=false)at /test/10.5_dbg/sql/sql_table.cc:2164
            #9 0x00005eba129a58b8 in mysql_execute_command (thd=thd@entry=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:5079
            #10 0x00005eba129aa479 in mysql_parse (thd=thd@entry=0x143000000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x143065b012a0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_parse.cc:8229
            #11 0x00005eba129ac9f9 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x143000000d58, packet=packet@entry=0x14300000aaf9 "DROP TABLE t", packet_length=packet_length@entry=12, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_class.h:238
            #12 0x00005eba129af1cd in do_command (thd=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:1376
            #13 0x00005eba12ae26ac in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5eba15ebeef8, put_in_cache=put_in_cache@entry=true)at /test/10.5_dbg/sql/sql_connect.cc:1417
            #14 0x00005eba12ae29d2 in handle_one_connection (arg=arg@entry=0x5eba15ebeef8)at /test/10.5_dbg/sql/sql_connect.cc:1319
            #15 0x00005eba12f32f78 in pfs_spawn_thread (arg=0x5eba15eb3268)at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
            #16 0x0000143067e9ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
            #17 0x0000143067f29c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
            {noformat}

            Bug confirmed present in:
            MariaDB: 10.5.27 (dbg), 10.5.27 (opt)

            Bug (or feature/syntax) confirmed not present in:
            MariaDB: 10.6.20 (dbg), 10.6.20 (opt), 10.11.10 (dbg), 10.11.10 (opt), 11.1.7 (dbg), 11.1.7 (opt), 11.2.6 (dbg), 11.2.6 (opt), 11.4.4 (dbg), 11.4.4 (opt), 11.5.2 (dbg), 11.5.2 (opt), 11.6.1 (dbg), 11.6.1 (opt)
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            Roel Roel Van de Paar made changes -
            Roel Roel Van de Paar made changes -
            Roel Roel Van de Paar made changes -
            Roel Roel Van de Paar made changes -
            Roel Roel Van de Paar made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]
            Roel Roel Van de Paar made changes -
            Description {code:sql}
            SET innodb_compression_default=1;
            CREATE TEMPORARY TABLE t (c INT);
            SET GLOBAL innodb_compression_level=0;
            TRUNCATE t;
            DROP TABLE t;
            {code}

            Leads to:

            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            mariadbd: /test/10.5_dbg/sql/sql_table.cc:2445: int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool): Assertion `thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)' failed.
            {noformat}

            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            Core was generated by `/test/MD130824-mariadb-10.5.27-linux-x86_64-dbg/bin/mariadbd --no-defaults --ma'.
            Program terminated with signal SIGABRT, Aborted.
            Download failed: Invalid argument. Continuing without source file ./nptl/./nptl/pthread_kill.c.
            #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44

            warning: 44 ./nptl/pthread_kill.c: No such file or directory
            [Current thread is 1 (LWP 567478)]
            (gdb) bt
            #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
            #1 __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
            #2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
            #3 0x0000143067e4526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
            #4 0x0000143067e288ff in __GI_abort () at ./stdlib/abort.c:79
            #5 0x0000143067e2881b in __assert_fail_base (fmt=0x143067fd01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=file@entry=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=line@entry=2445, function=function@entry=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:94
            #6 0x0000143067e3b507 in __assert_fail (assertion=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=2445, function=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:103
            #7 0x00005eba12a58a95 in mysql_rm_table_no_locks (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=if_exists@entry=false, drop_temporary=drop_temporary@entry=false, drop_view=drop_view@entry=false, drop_sequence=drop_sequence@entry=false, dont_log_query=false, dont_free_locks=false)at /test/10.5_dbg/sql/sql_table.cc:2445
            #8 0x00005eba12a5a8fa in mysql_rm_table (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=<optimized out>, drop_temporary=<optimized out>, drop_sequence=<optimized out>, dont_log_query=dont_log_query@entry=false)at /test/10.5_dbg/sql/sql_table.cc:2164
            #9 0x00005eba129a58b8 in mysql_execute_command (thd=thd@entry=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:5079
            #10 0x00005eba129aa479 in mysql_parse (thd=thd@entry=0x143000000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x143065b012a0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_parse.cc:8229
            #11 0x00005eba129ac9f9 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x143000000d58, packet=packet@entry=0x14300000aaf9 "DROP TABLE t", packet_length=packet_length@entry=12, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_class.h:238
            #12 0x00005eba129af1cd in do_command (thd=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:1376
            #13 0x00005eba12ae26ac in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5eba15ebeef8, put_in_cache=put_in_cache@entry=true)at /test/10.5_dbg/sql/sql_connect.cc:1417
            #14 0x00005eba12ae29d2 in handle_one_connection (arg=arg@entry=0x5eba15ebeef8)at /test/10.5_dbg/sql/sql_connect.cc:1319
            #15 0x00005eba12f32f78 in pfs_spawn_thread (arg=0x5eba15eb3268)at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
            #16 0x0000143067e9ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
            #17 0x0000143067f29c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
            {noformat}

            Bug confirmed present in:
            MariaDB: 10.5.27 (dbg), 10.5.27 (opt)

            Bug (or feature/syntax) confirmed not present in:
            MariaDB: 10.6.20 (dbg), 10.6.20 (opt), 10.11.10 (dbg), 10.11.10 (opt), 11.1.7 (dbg), 11.1.7 (opt), 11.2.6 (dbg), 11.2.6 (opt), 11.4.4 (dbg), 11.4.4 (opt), 11.5.2 (dbg), 11.5.2 (opt), 11.6.1 (dbg), 11.6.1 (opt)
            {code:sql}
            SET innodb_compression_default=1;
            CREATE TEMPORARY TABLE t (c INT);
            SET GLOBAL innodb_compression_level=0;
            TRUNCATE t;
            DROP TABLE t;
            {code}

            Leads to:
            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            10.5.27-dbg>TRUNCATE t;
            ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine InnoDB
            10.5.27-dbg>DROP TABLE t;
            ERROR 2013 (HY000): Lost connection to MySQL server during query
            {noformat}
            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            mariadbd: /test/10.5_dbg/sql/sql_table.cc:2445: int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool): Assertion `thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)' failed.
            {noformat}

            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            Core was generated by `/test/MD130824-mariadb-10.5.27-linux-x86_64-dbg/bin/mariadbd --no-defaults --ma'.
            Program terminated with signal SIGABRT, Aborted.
            Download failed: Invalid argument. Continuing without source file ./nptl/./nptl/pthread_kill.c.
            #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44

            warning: 44 ./nptl/pthread_kill.c: No such file or directory
            [Current thread is 1 (LWP 567478)]
            (gdb) bt
            #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
            #1 __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
            #2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
            #3 0x0000143067e4526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
            #4 0x0000143067e288ff in __GI_abort () at ./stdlib/abort.c:79
            #5 0x0000143067e2881b in __assert_fail_base (fmt=0x143067fd01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=file@entry=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=line@entry=2445, function=function@entry=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:94
            #6 0x0000143067e3b507 in __assert_fail (assertion=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=2445, function=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:103
            #7 0x00005eba12a58a95 in mysql_rm_table_no_locks (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=if_exists@entry=false, drop_temporary=drop_temporary@entry=false, drop_view=drop_view@entry=false, drop_sequence=drop_sequence@entry=false, dont_log_query=false, dont_free_locks=false)at /test/10.5_dbg/sql/sql_table.cc:2445
            #8 0x00005eba12a5a8fa in mysql_rm_table (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=<optimized out>, drop_temporary=<optimized out>, drop_sequence=<optimized out>, dont_log_query=dont_log_query@entry=false)at /test/10.5_dbg/sql/sql_table.cc:2164
            #9 0x00005eba129a58b8 in mysql_execute_command (thd=thd@entry=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:5079
            #10 0x00005eba129aa479 in mysql_parse (thd=thd@entry=0x143000000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x143065b012a0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_parse.cc:8229
            #11 0x00005eba129ac9f9 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x143000000d58, packet=packet@entry=0x14300000aaf9 "DROP TABLE t", packet_length=packet_length@entry=12, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_class.h:238
            #12 0x00005eba129af1cd in do_command (thd=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:1376
            #13 0x00005eba12ae26ac in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5eba15ebeef8, put_in_cache=put_in_cache@entry=true)at /test/10.5_dbg/sql/sql_connect.cc:1417
            #14 0x00005eba12ae29d2 in handle_one_connection (arg=arg@entry=0x5eba15ebeef8)at /test/10.5_dbg/sql/sql_connect.cc:1319
            #15 0x00005eba12f32f78 in pfs_spawn_thread (arg=0x5eba15eb3268)at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
            #16 0x0000143067e9ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
            #17 0x0000143067f29c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
            {noformat}

            Bug confirmed present in:
            MariaDB: 10.5.27 (dbg), 10.5.27 (opt)

            Bug (or feature/syntax) confirmed not present in:
            MariaDB: 10.6.20 (dbg), 10.6.20 (opt), 10.11.10 (dbg), 10.11.10 (opt), 11.1.7 (dbg), 11.1.7 (opt), 11.2.6 (dbg), 11.2.6 (opt), 11.4.4 (dbg), 11.4.4 (opt), 11.5.2 (dbg), 11.5.2 (opt), 11.6.1 (dbg), 11.6.1 (opt)
            Roel Roel Van de Paar made changes -
            Description {code:sql}
            SET innodb_compression_default=1;
            CREATE TEMPORARY TABLE t (c INT);
            SET GLOBAL innodb_compression_level=0;
            TRUNCATE t;
            DROP TABLE t;
            {code}

            Leads to:
            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            10.5.27-dbg>TRUNCATE t;
            ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine InnoDB
            10.5.27-dbg>DROP TABLE t;
            ERROR 2013 (HY000): Lost connection to MySQL server during query
            {noformat}
            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            mariadbd: /test/10.5_dbg/sql/sql_table.cc:2445: int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool): Assertion `thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)' failed.
            {noformat}

            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            Core was generated by `/test/MD130824-mariadb-10.5.27-linux-x86_64-dbg/bin/mariadbd --no-defaults --ma'.
            Program terminated with signal SIGABRT, Aborted.
            Download failed: Invalid argument. Continuing without source file ./nptl/./nptl/pthread_kill.c.
            #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44

            warning: 44 ./nptl/pthread_kill.c: No such file or directory
            [Current thread is 1 (LWP 567478)]
            (gdb) bt
            #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
            #1 __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
            #2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
            #3 0x0000143067e4526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
            #4 0x0000143067e288ff in __GI_abort () at ./stdlib/abort.c:79
            #5 0x0000143067e2881b in __assert_fail_base (fmt=0x143067fd01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=file@entry=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=line@entry=2445, function=function@entry=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:94
            #6 0x0000143067e3b507 in __assert_fail (assertion=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=2445, function=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:103
            #7 0x00005eba12a58a95 in mysql_rm_table_no_locks (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=if_exists@entry=false, drop_temporary=drop_temporary@entry=false, drop_view=drop_view@entry=false, drop_sequence=drop_sequence@entry=false, dont_log_query=false, dont_free_locks=false)at /test/10.5_dbg/sql/sql_table.cc:2445
            #8 0x00005eba12a5a8fa in mysql_rm_table (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=<optimized out>, drop_temporary=<optimized out>, drop_sequence=<optimized out>, dont_log_query=dont_log_query@entry=false)at /test/10.5_dbg/sql/sql_table.cc:2164
            #9 0x00005eba129a58b8 in mysql_execute_command (thd=thd@entry=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:5079
            #10 0x00005eba129aa479 in mysql_parse (thd=thd@entry=0x143000000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x143065b012a0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_parse.cc:8229
            #11 0x00005eba129ac9f9 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x143000000d58, packet=packet@entry=0x14300000aaf9 "DROP TABLE t", packet_length=packet_length@entry=12, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_class.h:238
            #12 0x00005eba129af1cd in do_command (thd=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:1376
            #13 0x00005eba12ae26ac in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5eba15ebeef8, put_in_cache=put_in_cache@entry=true)at /test/10.5_dbg/sql/sql_connect.cc:1417
            #14 0x00005eba12ae29d2 in handle_one_connection (arg=arg@entry=0x5eba15ebeef8)at /test/10.5_dbg/sql/sql_connect.cc:1319
            #15 0x00005eba12f32f78 in pfs_spawn_thread (arg=0x5eba15eb3268)at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
            #16 0x0000143067e9ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
            #17 0x0000143067f29c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
            {noformat}

            Bug confirmed present in:
            MariaDB: 10.5.27 (dbg), 10.5.27 (opt)

            Bug (or feature/syntax) confirmed not present in:
            MariaDB: 10.6.20 (dbg), 10.6.20 (opt), 10.11.10 (dbg), 10.11.10 (opt), 11.1.7 (dbg), 11.1.7 (opt), 11.2.6 (dbg), 11.2.6 (opt), 11.4.4 (dbg), 11.4.4 (opt), 11.5.2 (dbg), 11.5.2 (opt), 11.6.1 (dbg), 11.6.1 (opt)
            {code:sql}
            SET innodb_compression_default=1;
            CREATE TEMPORARY TABLE t (c INT);
            SET GLOBAL innodb_compression_level=0;
            TRUNCATE t;
            DROP TABLE t;
            {code}

            Leads to:
            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            10.5.27-dbg>TRUNCATE t;
            ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine InnoDB

            10.5.27-dbg>DROP TABLE t;
            ERROR 2013 (HY000): Lost connection to MySQL server during query
            {noformat}

            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            mariadbd: /test/10.5_dbg/sql/sql_table.cc:2445: int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool): Assertion `thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)' failed.
            {noformat}

            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            Core was generated by `/test/MD130824-mariadb-10.5.27-linux-x86_64-dbg/bin/mariadbd --no-defaults --ma'.
            Program terminated with signal SIGABRT, Aborted.
            Download failed: Invalid argument. Continuing without source file ./nptl/./nptl/pthread_kill.c.
            #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44

            warning: 44 ./nptl/pthread_kill.c: No such file or directory
            [Current thread is 1 (LWP 567478)]
            (gdb) bt
            #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
            #1 __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
            #2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
            #3 0x0000143067e4526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
            #4 0x0000143067e288ff in __GI_abort () at ./stdlib/abort.c:79
            #5 0x0000143067e2881b in __assert_fail_base (fmt=0x143067fd01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=file@entry=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=line@entry=2445, function=function@entry=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:94
            #6 0x0000143067e3b507 in __assert_fail (assertion=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=2445, function=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:103
            #7 0x00005eba12a58a95 in mysql_rm_table_no_locks (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=if_exists@entry=false, drop_temporary=drop_temporary@entry=false, drop_view=drop_view@entry=false, drop_sequence=drop_sequence@entry=false, dont_log_query=false, dont_free_locks=false)at /test/10.5_dbg/sql/sql_table.cc:2445
            #8 0x00005eba12a5a8fa in mysql_rm_table (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=<optimized out>, drop_temporary=<optimized out>, drop_sequence=<optimized out>, dont_log_query=dont_log_query@entry=false)at /test/10.5_dbg/sql/sql_table.cc:2164
            #9 0x00005eba129a58b8 in mysql_execute_command (thd=thd@entry=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:5079
            #10 0x00005eba129aa479 in mysql_parse (thd=thd@entry=0x143000000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x143065b012a0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_parse.cc:8229
            #11 0x00005eba129ac9f9 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x143000000d58, packet=packet@entry=0x14300000aaf9 "DROP TABLE t", packet_length=packet_length@entry=12, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_class.h:238
            #12 0x00005eba129af1cd in do_command (thd=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:1376
            #13 0x00005eba12ae26ac in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5eba15ebeef8, put_in_cache=put_in_cache@entry=true)at /test/10.5_dbg/sql/sql_connect.cc:1417
            #14 0x00005eba12ae29d2 in handle_one_connection (arg=arg@entry=0x5eba15ebeef8)at /test/10.5_dbg/sql/sql_connect.cc:1319
            #15 0x00005eba12f32f78 in pfs_spawn_thread (arg=0x5eba15eb3268)at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
            #16 0x0000143067e9ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
            #17 0x0000143067f29c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
            {noformat}

            Bug confirmed present in:
            MariaDB: 10.5.27 (dbg), 10.5.27 (opt)

            Bug (or feature/syntax) confirmed not present in:
            MariaDB: 10.6.20 (dbg), 10.6.20 (opt), 10.11.10 (dbg), 10.11.10 (opt), 11.1.7 (dbg), 11.1.7 (opt), 11.2.6 (dbg), 11.2.6 (opt), 11.4.4 (dbg), 11.4.4 (opt), 11.5.2 (dbg), 11.5.2 (opt), 11.6.1 (dbg), 11.6.1 (opt)
            Roel Roel Van de Paar made changes -
            Description {code:sql}
            SET innodb_compression_default=1;
            CREATE TEMPORARY TABLE t (c INT);
            SET GLOBAL innodb_compression_level=0;
            TRUNCATE t;
            DROP TABLE t;
            {code}

            Leads to:
            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            10.5.27-dbg>TRUNCATE t;
            ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine InnoDB

            10.5.27-dbg>DROP TABLE t;
            ERROR 2013 (HY000): Lost connection to MySQL server during query
            {noformat}

            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            mariadbd: /test/10.5_dbg/sql/sql_table.cc:2445: int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool): Assertion `thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)' failed.
            {noformat}

            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            Core was generated by `/test/MD130824-mariadb-10.5.27-linux-x86_64-dbg/bin/mariadbd --no-defaults --ma'.
            Program terminated with signal SIGABRT, Aborted.
            Download failed: Invalid argument. Continuing without source file ./nptl/./nptl/pthread_kill.c.
            #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44

            warning: 44 ./nptl/pthread_kill.c: No such file or directory
            [Current thread is 1 (LWP 567478)]
            (gdb) bt
            #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
            #1 __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
            #2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
            #3 0x0000143067e4526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
            #4 0x0000143067e288ff in __GI_abort () at ./stdlib/abort.c:79
            #5 0x0000143067e2881b in __assert_fail_base (fmt=0x143067fd01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=file@entry=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=line@entry=2445, function=function@entry=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:94
            #6 0x0000143067e3b507 in __assert_fail (assertion=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=2445, function=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:103
            #7 0x00005eba12a58a95 in mysql_rm_table_no_locks (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=if_exists@entry=false, drop_temporary=drop_temporary@entry=false, drop_view=drop_view@entry=false, drop_sequence=drop_sequence@entry=false, dont_log_query=false, dont_free_locks=false)at /test/10.5_dbg/sql/sql_table.cc:2445
            #8 0x00005eba12a5a8fa in mysql_rm_table (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=<optimized out>, drop_temporary=<optimized out>, drop_sequence=<optimized out>, dont_log_query=dont_log_query@entry=false)at /test/10.5_dbg/sql/sql_table.cc:2164
            #9 0x00005eba129a58b8 in mysql_execute_command (thd=thd@entry=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:5079
            #10 0x00005eba129aa479 in mysql_parse (thd=thd@entry=0x143000000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x143065b012a0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_parse.cc:8229
            #11 0x00005eba129ac9f9 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x143000000d58, packet=packet@entry=0x14300000aaf9 "DROP TABLE t", packet_length=packet_length@entry=12, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_class.h:238
            #12 0x00005eba129af1cd in do_command (thd=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:1376
            #13 0x00005eba12ae26ac in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5eba15ebeef8, put_in_cache=put_in_cache@entry=true)at /test/10.5_dbg/sql/sql_connect.cc:1417
            #14 0x00005eba12ae29d2 in handle_one_connection (arg=arg@entry=0x5eba15ebeef8)at /test/10.5_dbg/sql/sql_connect.cc:1319
            #15 0x00005eba12f32f78 in pfs_spawn_thread (arg=0x5eba15eb3268)at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
            #16 0x0000143067e9ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
            #17 0x0000143067f29c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
            {noformat}

            Bug confirmed present in:
            MariaDB: 10.5.27 (dbg), 10.5.27 (opt)

            Bug (or feature/syntax) confirmed not present in:
            MariaDB: 10.6.20 (dbg), 10.6.20 (opt), 10.11.10 (dbg), 10.11.10 (opt), 11.1.7 (dbg), 11.1.7 (opt), 11.2.6 (dbg), 11.2.6 (opt), 11.4.4 (dbg), 11.4.4 (opt), 11.5.2 (dbg), 11.5.2 (opt), 11.6.1 (dbg), 11.6.1 (opt)
            {code:sql}
            SET innodb_compression_default=1;
            CREATE TEMPORARY TABLE t (c INT);
            SET GLOBAL innodb_compression_level=0;
            TRUNCATE t;
            DROP TABLE t;
            {code}

            Leads to:
            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            10.5.27-dbg>TRUNCATE t;
            ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine InnoDB

            10.5.27-dbg>DROP TABLE t;
            ERROR 2013 (HY000): Lost connection to MySQL server during query
            {noformat}
            On optimized we see:
            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Optimized)}
            10.5.27-opt>TRUNCATE t;
            ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine InnoDB

            10.5.27-opt>DROP TABLE t;
            ERROR 1051 (42S02): Unknown table 'test.t'
            {noformat}

            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            mariadbd: /test/10.5_dbg/sql/sql_table.cc:2445: int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool): Assertion `thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)' failed.
            {noformat}

            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            Core was generated by `/test/MD130824-mariadb-10.5.27-linux-x86_64-dbg/bin/mariadbd --no-defaults --ma'.
            Program terminated with signal SIGABRT, Aborted.
            Download failed: Invalid argument. Continuing without source file ./nptl/./nptl/pthread_kill.c.
            #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44

            warning: 44 ./nptl/pthread_kill.c: No such file or directory
            [Current thread is 1 (LWP 567478)]
            (gdb) bt
            #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
            #1 __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
            #2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
            #3 0x0000143067e4526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
            #4 0x0000143067e288ff in __GI_abort () at ./stdlib/abort.c:79
            #5 0x0000143067e2881b in __assert_fail_base (fmt=0x143067fd01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=file@entry=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=line@entry=2445, function=function@entry=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:94
            #6 0x0000143067e3b507 in __assert_fail (assertion=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=2445, function=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:103
            #7 0x00005eba12a58a95 in mysql_rm_table_no_locks (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=if_exists@entry=false, drop_temporary=drop_temporary@entry=false, drop_view=drop_view@entry=false, drop_sequence=drop_sequence@entry=false, dont_log_query=false, dont_free_locks=false)at /test/10.5_dbg/sql/sql_table.cc:2445
            #8 0x00005eba12a5a8fa in mysql_rm_table (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=<optimized out>, drop_temporary=<optimized out>, drop_sequence=<optimized out>, dont_log_query=dont_log_query@entry=false)at /test/10.5_dbg/sql/sql_table.cc:2164
            #9 0x00005eba129a58b8 in mysql_execute_command (thd=thd@entry=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:5079
            #10 0x00005eba129aa479 in mysql_parse (thd=thd@entry=0x143000000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x143065b012a0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_parse.cc:8229
            #11 0x00005eba129ac9f9 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x143000000d58, packet=packet@entry=0x14300000aaf9 "DROP TABLE t", packet_length=packet_length@entry=12, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_class.h:238
            #12 0x00005eba129af1cd in do_command (thd=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:1376
            #13 0x00005eba12ae26ac in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5eba15ebeef8, put_in_cache=put_in_cache@entry=true)at /test/10.5_dbg/sql/sql_connect.cc:1417
            #14 0x00005eba12ae29d2 in handle_one_connection (arg=arg@entry=0x5eba15ebeef8)at /test/10.5_dbg/sql/sql_connect.cc:1319
            #15 0x00005eba12f32f78 in pfs_spawn_thread (arg=0x5eba15eb3268)at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
            #16 0x0000143067e9ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
            #17 0x0000143067f29c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
            {noformat}

            Bug confirmed present in:
            MariaDB: 10.5.27 (dbg), 10.5.27 (opt)

            Bug (or feature/syntax) confirmed not present in:
            MariaDB: 10.6.20 (dbg), 10.6.20 (opt), 10.11.10 (dbg), 10.11.10 (opt), 11.1.7 (dbg), 11.1.7 (opt), 11.2.6 (dbg), 11.2.6 (opt), 11.4.4 (dbg), 11.4.4 (opt), 11.5.2 (dbg), 11.5.2 (opt), 11.6.1 (dbg), 11.6.1 (opt)
            Roel Roel Van de Paar made changes -
            Description {code:sql}
            SET innodb_compression_default=1;
            CREATE TEMPORARY TABLE t (c INT);
            SET GLOBAL innodb_compression_level=0;
            TRUNCATE t;
            DROP TABLE t;
            {code}

            Leads to:
            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            10.5.27-dbg>TRUNCATE t;
            ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine InnoDB

            10.5.27-dbg>DROP TABLE t;
            ERROR 2013 (HY000): Lost connection to MySQL server during query
            {noformat}
            On optimized we see:
            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Optimized)}
            10.5.27-opt>TRUNCATE t;
            ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine InnoDB

            10.5.27-opt>DROP TABLE t;
            ERROR 1051 (42S02): Unknown table 'test.t'
            {noformat}

            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            mariadbd: /test/10.5_dbg/sql/sql_table.cc:2445: int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool): Assertion `thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)' failed.
            {noformat}

            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            Core was generated by `/test/MD130824-mariadb-10.5.27-linux-x86_64-dbg/bin/mariadbd --no-defaults --ma'.
            Program terminated with signal SIGABRT, Aborted.
            Download failed: Invalid argument. Continuing without source file ./nptl/./nptl/pthread_kill.c.
            #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44

            warning: 44 ./nptl/pthread_kill.c: No such file or directory
            [Current thread is 1 (LWP 567478)]
            (gdb) bt
            #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
            #1 __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
            #2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
            #3 0x0000143067e4526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
            #4 0x0000143067e288ff in __GI_abort () at ./stdlib/abort.c:79
            #5 0x0000143067e2881b in __assert_fail_base (fmt=0x143067fd01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=file@entry=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=line@entry=2445, function=function@entry=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:94
            #6 0x0000143067e3b507 in __assert_fail (assertion=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=2445, function=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:103
            #7 0x00005eba12a58a95 in mysql_rm_table_no_locks (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=if_exists@entry=false, drop_temporary=drop_temporary@entry=false, drop_view=drop_view@entry=false, drop_sequence=drop_sequence@entry=false, dont_log_query=false, dont_free_locks=false)at /test/10.5_dbg/sql/sql_table.cc:2445
            #8 0x00005eba12a5a8fa in mysql_rm_table (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=<optimized out>, drop_temporary=<optimized out>, drop_sequence=<optimized out>, dont_log_query=dont_log_query@entry=false)at /test/10.5_dbg/sql/sql_table.cc:2164
            #9 0x00005eba129a58b8 in mysql_execute_command (thd=thd@entry=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:5079
            #10 0x00005eba129aa479 in mysql_parse (thd=thd@entry=0x143000000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x143065b012a0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_parse.cc:8229
            #11 0x00005eba129ac9f9 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x143000000d58, packet=packet@entry=0x14300000aaf9 "DROP TABLE t", packet_length=packet_length@entry=12, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_class.h:238
            #12 0x00005eba129af1cd in do_command (thd=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:1376
            #13 0x00005eba12ae26ac in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5eba15ebeef8, put_in_cache=put_in_cache@entry=true)at /test/10.5_dbg/sql/sql_connect.cc:1417
            #14 0x00005eba12ae29d2 in handle_one_connection (arg=arg@entry=0x5eba15ebeef8)at /test/10.5_dbg/sql/sql_connect.cc:1319
            #15 0x00005eba12f32f78 in pfs_spawn_thread (arg=0x5eba15eb3268)at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
            #16 0x0000143067e9ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
            #17 0x0000143067f29c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
            {noformat}

            Bug confirmed present in:
            MariaDB: 10.5.27 (dbg), 10.5.27 (opt)

            Bug (or feature/syntax) confirmed not present in:
            MariaDB: 10.6.20 (dbg), 10.6.20 (opt), 10.11.10 (dbg), 10.11.10 (opt), 11.1.7 (dbg), 11.1.7 (opt), 11.2.6 (dbg), 11.2.6 (opt), 11.4.4 (dbg), 11.4.4 (opt), 11.5.2 (dbg), 11.5.2 (opt), 11.6.1 (dbg), 11.6.1 (opt)
            {code:sql}
            SET innodb_compression_default=1;
            CREATE TEMPORARY TABLE t (c INT);
            SET GLOBAL innodb_compression_level=0;
            TRUNCATE t;
            DROP TABLE t;
            {code}

            Leads to:
            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            10.5.27-dbg>TRUNCATE t;
            ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine InnoDB

            10.5.27-dbg>DROP TABLE t;
            ERROR 2013 (HY000): Lost connection to MySQL server during query
            {noformat}
            On optimized we see:
            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Optimized)}
            10.5.27-opt>TRUNCATE t;
            ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine InnoDB

            10.5.27-opt>DROP TABLE t;
            ERROR 1051 (42S02): Unknown table 'test.t'
            {noformat}
            Debug assertion:
            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            mariadbd: /test/10.5_dbg/sql/sql_table.cc:2445: int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool): Assertion `thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)' failed.
            {noformat}

            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            Core was generated by `/test/MD130824-mariadb-10.5.27-linux-x86_64-dbg/bin/mariadbd --no-defaults --ma'.
            Program terminated with signal SIGABRT, Aborted.
            Download failed: Invalid argument. Continuing without source file ./nptl/./nptl/pthread_kill.c.
            #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44

            warning: 44 ./nptl/pthread_kill.c: No such file or directory
            [Current thread is 1 (LWP 567478)]
            (gdb) bt
            #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
            #1 __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
            #2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
            #3 0x0000143067e4526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
            #4 0x0000143067e288ff in __GI_abort () at ./stdlib/abort.c:79
            #5 0x0000143067e2881b in __assert_fail_base (fmt=0x143067fd01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=file@entry=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=line@entry=2445, function=function@entry=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:94
            #6 0x0000143067e3b507 in __assert_fail (assertion=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=2445, function=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:103
            #7 0x00005eba12a58a95 in mysql_rm_table_no_locks (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=if_exists@entry=false, drop_temporary=drop_temporary@entry=false, drop_view=drop_view@entry=false, drop_sequence=drop_sequence@entry=false, dont_log_query=false, dont_free_locks=false)at /test/10.5_dbg/sql/sql_table.cc:2445
            #8 0x00005eba12a5a8fa in mysql_rm_table (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=<optimized out>, drop_temporary=<optimized out>, drop_sequence=<optimized out>, dont_log_query=dont_log_query@entry=false)at /test/10.5_dbg/sql/sql_table.cc:2164
            #9 0x00005eba129a58b8 in mysql_execute_command (thd=thd@entry=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:5079
            #10 0x00005eba129aa479 in mysql_parse (thd=thd@entry=0x143000000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x143065b012a0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_parse.cc:8229
            #11 0x00005eba129ac9f9 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x143000000d58, packet=packet@entry=0x14300000aaf9 "DROP TABLE t", packet_length=packet_length@entry=12, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_class.h:238
            #12 0x00005eba129af1cd in do_command (thd=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:1376
            #13 0x00005eba12ae26ac in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5eba15ebeef8, put_in_cache=put_in_cache@entry=true)at /test/10.5_dbg/sql/sql_connect.cc:1417
            #14 0x00005eba12ae29d2 in handle_one_connection (arg=arg@entry=0x5eba15ebeef8)at /test/10.5_dbg/sql/sql_connect.cc:1319
            #15 0x00005eba12f32f78 in pfs_spawn_thread (arg=0x5eba15eb3268)at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
            #16 0x0000143067e9ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
            #17 0x0000143067f29c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
            {noformat}

            Bug confirmed present in:
            MariaDB: 10.5.27 (dbg), 10.5.27 (opt)

            Bug (or feature/syntax) confirmed not present in:
            MariaDB: 10.6.20 (dbg), 10.6.20 (opt), 10.11.10 (dbg), 10.11.10 (opt), 11.1.7 (dbg), 11.1.7 (opt), 11.2.6 (dbg), 11.2.6 (opt), 11.4.4 (dbg), 11.4.4 (opt), 11.5.2 (dbg), 11.5.2 (opt), 11.6.1 (dbg), 11.6.1 (opt)
            Roel Roel Van de Paar made changes -
            Description {code:sql}
            SET innodb_compression_default=1;
            CREATE TEMPORARY TABLE t (c INT);
            SET GLOBAL innodb_compression_level=0;
            TRUNCATE t;
            DROP TABLE t;
            {code}

            Leads to:
            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            10.5.27-dbg>TRUNCATE t;
            ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine InnoDB

            10.5.27-dbg>DROP TABLE t;
            ERROR 2013 (HY000): Lost connection to MySQL server during query
            {noformat}
            On optimized we see:
            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Optimized)}
            10.5.27-opt>TRUNCATE t;
            ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine InnoDB

            10.5.27-opt>DROP TABLE t;
            ERROR 1051 (42S02): Unknown table 'test.t'
            {noformat}
            Debug assertion:
            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            mariadbd: /test/10.5_dbg/sql/sql_table.cc:2445: int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool): Assertion `thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)' failed.
            {noformat}

            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            Core was generated by `/test/MD130824-mariadb-10.5.27-linux-x86_64-dbg/bin/mariadbd --no-defaults --ma'.
            Program terminated with signal SIGABRT, Aborted.
            Download failed: Invalid argument. Continuing without source file ./nptl/./nptl/pthread_kill.c.
            #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44

            warning: 44 ./nptl/pthread_kill.c: No such file or directory
            [Current thread is 1 (LWP 567478)]
            (gdb) bt
            #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
            #1 __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
            #2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
            #3 0x0000143067e4526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
            #4 0x0000143067e288ff in __GI_abort () at ./stdlib/abort.c:79
            #5 0x0000143067e2881b in __assert_fail_base (fmt=0x143067fd01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=file@entry=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=line@entry=2445, function=function@entry=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:94
            #6 0x0000143067e3b507 in __assert_fail (assertion=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=2445, function=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:103
            #7 0x00005eba12a58a95 in mysql_rm_table_no_locks (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=if_exists@entry=false, drop_temporary=drop_temporary@entry=false, drop_view=drop_view@entry=false, drop_sequence=drop_sequence@entry=false, dont_log_query=false, dont_free_locks=false)at /test/10.5_dbg/sql/sql_table.cc:2445
            #8 0x00005eba12a5a8fa in mysql_rm_table (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=<optimized out>, drop_temporary=<optimized out>, drop_sequence=<optimized out>, dont_log_query=dont_log_query@entry=false)at /test/10.5_dbg/sql/sql_table.cc:2164
            #9 0x00005eba129a58b8 in mysql_execute_command (thd=thd@entry=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:5079
            #10 0x00005eba129aa479 in mysql_parse (thd=thd@entry=0x143000000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x143065b012a0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_parse.cc:8229
            #11 0x00005eba129ac9f9 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x143000000d58, packet=packet@entry=0x14300000aaf9 "DROP TABLE t", packet_length=packet_length@entry=12, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_class.h:238
            #12 0x00005eba129af1cd in do_command (thd=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:1376
            #13 0x00005eba12ae26ac in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5eba15ebeef8, put_in_cache=put_in_cache@entry=true)at /test/10.5_dbg/sql/sql_connect.cc:1417
            #14 0x00005eba12ae29d2 in handle_one_connection (arg=arg@entry=0x5eba15ebeef8)at /test/10.5_dbg/sql/sql_connect.cc:1319
            #15 0x00005eba12f32f78 in pfs_spawn_thread (arg=0x5eba15eb3268)at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
            #16 0x0000143067e9ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
            #17 0x0000143067f29c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
            {noformat}

            Bug confirmed present in:
            MariaDB: 10.5.27 (dbg), 10.5.27 (opt)

            Bug (or feature/syntax) confirmed not present in:
            MariaDB: 10.6.20 (dbg), 10.6.20 (opt), 10.11.10 (dbg), 10.11.10 (opt), 11.1.7 (dbg), 11.1.7 (opt), 11.2.6 (dbg), 11.2.6 (opt), 11.4.4 (dbg), 11.4.4 (opt), 11.5.2 (dbg), 11.5.2 (opt), 11.6.1 (dbg), 11.6.1 (opt)
            {code:sql}
            SET innodb_compression_default=1;
            CREATE TEMPORARY TABLE t (c INT);
            SET GLOBAL innodb_compression_level=0;
            TRUNCATE t;
            DROP TABLE t;
            {code}

            Leads to:
            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            10.5.27-dbg>TRUNCATE t;
            ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine InnoDB

            10.5.27-dbg>DROP TABLE t;
            ERROR 2013 (HY000): Lost connection to MySQL server during query
            {noformat}
            On optimized we see:
            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Optimized)}
            10.5.27-opt>TRUNCATE t;
            ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine InnoDB

            10.5.27-opt>DROP TABLE t;
            ERROR 1051 (42S02): Unknown table 'test.t'
            {noformat}
            Interestingly, on optimized, SHOW CREATE TABLE sees the table, DROP TABLE does not:
            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Optimized)}
            10.5.27-opt>TRUNCATE t;
            ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine InnoDB

            10.5.27-opt>SHOW CREATE TABLE t;
            +-------+-------------------------------------------------------------------------------------------------------------------------------------------------+
            | Table | Create Table |
            +-------+-------------------------------------------------------------------------------------------------------------------------------------------------+
            | t | CREATE TEMPORARY TABLE `t` (
              `c` int(11) DEFAULT NULL
            ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci `PAGE_COMPRESSED`='ON' |
            +-------+-------------------------------------------------------------------------------------------------------------------------------------------------+
            1 row in set (0.000 sec)

            10.5.27-opt>DROP TABLE t;
            ERROR 1051 (42S02): Unknown table 'test.t'
            {noformat}
            Debug assertion:
            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            mariadbd: /test/10.5_dbg/sql/sql_table.cc:2445: int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool): Assertion `thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)' failed.
            {noformat}

            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            Core was generated by `/test/MD130824-mariadb-10.5.27-linux-x86_64-dbg/bin/mariadbd --no-defaults --ma'.
            Program terminated with signal SIGABRT, Aborted.
            Download failed: Invalid argument. Continuing without source file ./nptl/./nptl/pthread_kill.c.
            #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44

            warning: 44 ./nptl/pthread_kill.c: No such file or directory
            [Current thread is 1 (LWP 567478)]
            (gdb) bt
            #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
            #1 __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
            #2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
            #3 0x0000143067e4526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
            #4 0x0000143067e288ff in __GI_abort () at ./stdlib/abort.c:79
            #5 0x0000143067e2881b in __assert_fail_base (fmt=0x143067fd01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=file@entry=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=line@entry=2445, function=function@entry=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:94
            #6 0x0000143067e3b507 in __assert_fail (assertion=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=2445, function=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:103
            #7 0x00005eba12a58a95 in mysql_rm_table_no_locks (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=if_exists@entry=false, drop_temporary=drop_temporary@entry=false, drop_view=drop_view@entry=false, drop_sequence=drop_sequence@entry=false, dont_log_query=false, dont_free_locks=false)at /test/10.5_dbg/sql/sql_table.cc:2445
            #8 0x00005eba12a5a8fa in mysql_rm_table (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=<optimized out>, drop_temporary=<optimized out>, drop_sequence=<optimized out>, dont_log_query=dont_log_query@entry=false)at /test/10.5_dbg/sql/sql_table.cc:2164
            #9 0x00005eba129a58b8 in mysql_execute_command (thd=thd@entry=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:5079
            #10 0x00005eba129aa479 in mysql_parse (thd=thd@entry=0x143000000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x143065b012a0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_parse.cc:8229
            #11 0x00005eba129ac9f9 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x143000000d58, packet=packet@entry=0x14300000aaf9 "DROP TABLE t", packet_length=packet_length@entry=12, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_class.h:238
            #12 0x00005eba129af1cd in do_command (thd=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:1376
            #13 0x00005eba12ae26ac in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5eba15ebeef8, put_in_cache=put_in_cache@entry=true)at /test/10.5_dbg/sql/sql_connect.cc:1417
            #14 0x00005eba12ae29d2 in handle_one_connection (arg=arg@entry=0x5eba15ebeef8)at /test/10.5_dbg/sql/sql_connect.cc:1319
            #15 0x00005eba12f32f78 in pfs_spawn_thread (arg=0x5eba15eb3268)at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
            #16 0x0000143067e9ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
            #17 0x0000143067f29c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
            {noformat}

            Bug confirmed present in:
            MariaDB: 10.5.27 (dbg), 10.5.27 (opt)

            Bug (or feature/syntax) confirmed not present in:
            MariaDB: 10.6.20 (dbg), 10.6.20 (opt), 10.11.10 (dbg), 10.11.10 (opt), 11.1.7 (dbg), 11.1.7 (opt), 11.2.6 (dbg), 11.2.6 (opt), 11.4.4 (dbg), 11.4.4 (opt), 11.5.2 (dbg), 11.5.2 (opt), 11.6.1 (dbg), 11.6.1 (opt)
            Roel Roel Van de Paar made changes -
            Description {code:sql}
            SET innodb_compression_default=1;
            CREATE TEMPORARY TABLE t (c INT);
            SET GLOBAL innodb_compression_level=0;
            TRUNCATE t;
            DROP TABLE t;
            {code}

            Leads to:
            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            10.5.27-dbg>TRUNCATE t;
            ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine InnoDB

            10.5.27-dbg>DROP TABLE t;
            ERROR 2013 (HY000): Lost connection to MySQL server during query
            {noformat}
            On optimized we see:
            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Optimized)}
            10.5.27-opt>TRUNCATE t;
            ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine InnoDB

            10.5.27-opt>DROP TABLE t;
            ERROR 1051 (42S02): Unknown table 'test.t'
            {noformat}
            Interestingly, on optimized, SHOW CREATE TABLE sees the table, DROP TABLE does not:
            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Optimized)}
            10.5.27-opt>TRUNCATE t;
            ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine InnoDB

            10.5.27-opt>SHOW CREATE TABLE t;
            +-------+-------------------------------------------------------------------------------------------------------------------------------------------------+
            | Table | Create Table |
            +-------+-------------------------------------------------------------------------------------------------------------------------------------------------+
            | t | CREATE TEMPORARY TABLE `t` (
              `c` int(11) DEFAULT NULL
            ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci `PAGE_COMPRESSED`='ON' |
            +-------+-------------------------------------------------------------------------------------------------------------------------------------------------+
            1 row in set (0.000 sec)

            10.5.27-opt>DROP TABLE t;
            ERROR 1051 (42S02): Unknown table 'test.t'
            {noformat}
            Debug assertion:
            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            mariadbd: /test/10.5_dbg/sql/sql_table.cc:2445: int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool): Assertion `thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)' failed.
            {noformat}

            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            Core was generated by `/test/MD130824-mariadb-10.5.27-linux-x86_64-dbg/bin/mariadbd --no-defaults --ma'.
            Program terminated with signal SIGABRT, Aborted.
            Download failed: Invalid argument. Continuing without source file ./nptl/./nptl/pthread_kill.c.
            #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44

            warning: 44 ./nptl/pthread_kill.c: No such file or directory
            [Current thread is 1 (LWP 567478)]
            (gdb) bt
            #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
            #1 __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
            #2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
            #3 0x0000143067e4526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
            #4 0x0000143067e288ff in __GI_abort () at ./stdlib/abort.c:79
            #5 0x0000143067e2881b in __assert_fail_base (fmt=0x143067fd01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=file@entry=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=line@entry=2445, function=function@entry=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:94
            #6 0x0000143067e3b507 in __assert_fail (assertion=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=2445, function=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:103
            #7 0x00005eba12a58a95 in mysql_rm_table_no_locks (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=if_exists@entry=false, drop_temporary=drop_temporary@entry=false, drop_view=drop_view@entry=false, drop_sequence=drop_sequence@entry=false, dont_log_query=false, dont_free_locks=false)at /test/10.5_dbg/sql/sql_table.cc:2445
            #8 0x00005eba12a5a8fa in mysql_rm_table (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=<optimized out>, drop_temporary=<optimized out>, drop_sequence=<optimized out>, dont_log_query=dont_log_query@entry=false)at /test/10.5_dbg/sql/sql_table.cc:2164
            #9 0x00005eba129a58b8 in mysql_execute_command (thd=thd@entry=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:5079
            #10 0x00005eba129aa479 in mysql_parse (thd=thd@entry=0x143000000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x143065b012a0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_parse.cc:8229
            #11 0x00005eba129ac9f9 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x143000000d58, packet=packet@entry=0x14300000aaf9 "DROP TABLE t", packet_length=packet_length@entry=12, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_class.h:238
            #12 0x00005eba129af1cd in do_command (thd=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:1376
            #13 0x00005eba12ae26ac in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5eba15ebeef8, put_in_cache=put_in_cache@entry=true)at /test/10.5_dbg/sql/sql_connect.cc:1417
            #14 0x00005eba12ae29d2 in handle_one_connection (arg=arg@entry=0x5eba15ebeef8)at /test/10.5_dbg/sql/sql_connect.cc:1319
            #15 0x00005eba12f32f78 in pfs_spawn_thread (arg=0x5eba15eb3268)at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
            #16 0x0000143067e9ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
            #17 0x0000143067f29c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
            {noformat}

            Bug confirmed present in:
            MariaDB: 10.5.27 (dbg), 10.5.27 (opt)

            Bug (or feature/syntax) confirmed not present in:
            MariaDB: 10.6.20 (dbg), 10.6.20 (opt), 10.11.10 (dbg), 10.11.10 (opt), 11.1.7 (dbg), 11.1.7 (opt), 11.2.6 (dbg), 11.2.6 (opt), 11.4.4 (dbg), 11.4.4 (opt), 11.5.2 (dbg), 11.5.2 (opt), 11.6.1 (dbg), 11.6.1 (opt)
            {code:sql}
            SET innodb_compression_default=1;
            CREATE TEMPORARY TABLE t (c INT);
            SET GLOBAL innodb_compression_level=0;
            TRUNCATE t;
            DROP TABLE t;
            {code}

            Leads to:
            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            10.5.27-dbg>TRUNCATE t;
            ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine InnoDB

            10.5.27-dbg>DROP TABLE t;
            ERROR 2013 (HY000): Lost connection to MySQL server during query
            {noformat}
            On optimized we see:
            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Optimized)}
            10.5.27-opt>TRUNCATE t;
            ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine InnoDB

            10.5.27-opt>DROP TABLE t;
            ERROR 1051 (42S02): Unknown table 'test.t'
            {noformat}
            Interestingly, on optimized, SHOW CREATE TABLE sees the table, DROP TABLE does not (though the DROP still happens):
            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Optimized)}
            10.5.27-opt>TRUNCATE t;
            ERROR 1030 (HY000): Got error 140 "Wrong create options" from storage engine InnoDB

            10.5.27-opt>SHOW CREATE TABLE t;
            +-------+-------------------------------------------------------------------------------------------------------------------------------------------------+
            | Table | Create Table |
            +-------+-------------------------------------------------------------------------------------------------------------------------------------------------+
            | t | CREATE TEMPORARY TABLE `t` (
              `c` int(11) DEFAULT NULL
            ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci `PAGE_COMPRESSED`='ON' |
            +-------+-------------------------------------------------------------------------------------------------------------------------------------------------+
            1 row in set (0.000 sec)

            10.5.27-opt>DROP TABLE t;
            ERROR 1051 (42S02): Unknown table 'test.t'
            {noformat}
            Debug assertion:
            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            mariadbd: /test/10.5_dbg/sql/sql_table.cc:2445: int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool): Assertion `thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)' failed.
            {noformat}

            {noformat:title=10.5.27 0e27351028a4888b0da271e2089bf1f847620396 (Debug)}
            Core was generated by `/test/MD130824-mariadb-10.5.27-linux-x86_64-dbg/bin/mariadbd --no-defaults --ma'.
            Program terminated with signal SIGABRT, Aborted.
            Download failed: Invalid argument. Continuing without source file ./nptl/./nptl/pthread_kill.c.
            #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44

            warning: 44 ./nptl/pthread_kill.c: No such file or directory
            [Current thread is 1 (LWP 567478)]
            (gdb) bt
            #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
            #1 __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
            #2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
            #3 0x0000143067e4526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
            #4 0x0000143067e288ff in __GI_abort () at ./stdlib/abort.c:79
            #5 0x0000143067e2881b in __assert_fail_base (fmt=0x143067fd01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=file@entry=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=line@entry=2445, function=function@entry=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:94
            #6 0x0000143067e3b507 in __assert_fail (assertion=0x5eba1369c418 "thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)", file=0x5eba1369bb58 "/test/10.5_dbg/sql/sql_table.cc", line=2445, function=0x5eba1369c330 "int mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool, bool, bool)") at ./assert/assert.c:103
            #7 0x00005eba12a58a95 in mysql_rm_table_no_locks (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=if_exists@entry=false, drop_temporary=drop_temporary@entry=false, drop_view=drop_view@entry=false, drop_sequence=drop_sequence@entry=false, dont_log_query=false, dont_free_locks=false)at /test/10.5_dbg/sql/sql_table.cc:2445
            #8 0x00005eba12a5a8fa in mysql_rm_table (thd=thd@entry=0x143000000d58, tables=tables@entry=0x143000012f50, if_exists=<optimized out>, drop_temporary=<optimized out>, drop_sequence=<optimized out>, dont_log_query=dont_log_query@entry=false)at /test/10.5_dbg/sql/sql_table.cc:2164
            #9 0x00005eba129a58b8 in mysql_execute_command (thd=thd@entry=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:5079
            #10 0x00005eba129aa479 in mysql_parse (thd=thd@entry=0x143000000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x143065b012a0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_parse.cc:8229
            #11 0x00005eba129ac9f9 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x143000000d58, packet=packet@entry=0x14300000aaf9 "DROP TABLE t", packet_length=packet_length@entry=12, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false)at /test/10.5_dbg/sql/sql_class.h:238
            #12 0x00005eba129af1cd in do_command (thd=0x143000000d58)at /test/10.5_dbg/sql/sql_parse.cc:1376
            #13 0x00005eba12ae26ac in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5eba15ebeef8, put_in_cache=put_in_cache@entry=true)at /test/10.5_dbg/sql/sql_connect.cc:1417
            #14 0x00005eba12ae29d2 in handle_one_connection (arg=arg@entry=0x5eba15ebeef8)at /test/10.5_dbg/sql/sql_connect.cc:1319
            #15 0x00005eba12f32f78 in pfs_spawn_thread (arg=0x5eba15eb3268)at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
            #16 0x0000143067e9ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
            #17 0x0000143067f29c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
            {noformat}

            Bug confirmed present in:
            MariaDB: 10.5.27 (dbg), 10.5.27 (opt)

            Bug (or feature/syntax) confirmed not present in:
            MariaDB: 10.6.20 (dbg), 10.6.20 (opt), 10.11.10 (dbg), 10.11.10 (opt), 11.1.7 (dbg), 11.1.7 (opt), 11.2.6 (dbg), 11.2.6 (opt), 11.4.4 (dbg), 11.4.4 (opt), 11.5.2 (dbg), 11.5.2 (opt), 11.6.1 (dbg), 11.6.1 (opt)
            Roel Roel Van de Paar made changes -
            Labels 10.5 not-10.6+ 10.5 affects-tests
            Roel Roel Van de Paar made changes -
            Affects Version/s 11.4 [ 29301 ]
            Roel Roel Van de Paar made changes -
            Fix Version/s 11.4 [ 29301 ]
            sitano Ivan Prisiazhnyi made changes -
            Attachment mariadb.95.0.trace [ 73992 ]
            Roel Roel Van de Paar made changes -
            Assignee Marko Mäkelä [ marko ] Roel Van de Paar [ roel ]
            Roel Roel Van de Paar made changes -
            Component/s Server [ 13907 ]
            sitano Ivan Prisiazhnyi made changes -
            Attachment tests.log [ 74019 ]
            sitano Ivan Prisiazhnyi made changes -
            Attachment tests.log [ 74019 ]
            sitano Ivan Prisiazhnyi made changes -
            Attachment 4.log [ 74020 ]
            Roel Roel Van de Paar made changes -
            Summary Assertion `thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)' failed in mysql_rm_table_no_locks on DROP TABLE Assertion `thd->mdl_context.is_lock_owner(MDL_key::TABLE, db.str, table_name.str, MDL_SHARED)' failed in mysql_rm_table_no_locks on DROP TABLE, including via scripts/mariadb-install-db
            Roel Roel Van de Paar made changes -
            Assignee Roel Van de Paar [ roel ]
            Roel Roel Van de Paar made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            Roel Roel Van de Paar made changes -
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.11 [ 27614 ]
            Fix Version/s 11.1 [ 28549 ]
            Fix Version/s 11.2 [ 28603 ]
            Fix Version/s 11.6 [ 29515 ]
            Affects Version/s 10.6 [ 24028 ]
            Affects Version/s 10.11 [ 27614 ]
            Affects Version/s 11.1 [ 28549 ]
            Affects Version/s 11.2 [ 28603 ]
            Affects Version/s 11.6 [ 29515 ]
            Affects Version/s 11.7 [ 29815 ]
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 11.1 [ 28549 ]
            serg Sergei Golubchik made changes -
            Assignee Marko Mäkelä [ marko ]
            serg Sergei Golubchik made changes -
            Priority Critical [ 2 ] Major [ 3 ]
            Roel Roel Van de Paar made changes -
            Comment [ [~marko] The issue is deemed to be in the starting of multiple instances of mariadb-install-db at the same time. Can you try the script as posted [here|https://jira.mariadb.org/browse/MDEV-34789?focusedCommentId=291018&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-291018]? Thank you ]
            marko Marko Mäkelä made changes -
            Component/s Data Definition - Temporary [ 10123 ]
            Component/s Locking [ 10900 ]
            Component/s Storage Engine - InnoDB [ 10129 ]
            Assignee Marko Mäkelä [ marko ] Oleksandr Byelkin [ sanja ]
            Roel Roel Van de Paar made changes -
            Affects Version/s 10.6 [ 24028 ]
            Affects Version/s 10.11 [ 27614 ]
            Affects Version/s 11.1(EOL) [ 28549 ]
            Affects Version/s 11.2 [ 28603 ]
            Affects Version/s 11.4 [ 29301 ]
            Affects Version/s 11.6 [ 29515 ]
            Affects Version/s 11.7 [ 29815 ]
            Roel Roel Van de Paar made changes -
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.11 [ 27614 ]
            Fix Version/s 11.2 [ 28603 ]
            Fix Version/s 11.4 [ 29301 ]
            Fix Version/s 11.6 [ 29515 ]
            Roel Roel Van de Paar made changes -
            Assignee Oleksandr Byelkin [ sanja ] Roel Van de Paar [ roel ]
            Roel Roel Van de Paar made changes -
            Fix Version/s N/A [ 14700 ]
            Fix Version/s 10.5 [ 23123 ]
            Resolution Won't Fix [ 2 ]
            Status Confirmed [ 10101 ] Closed [ 6 ]
            Roel Roel Van de Paar made changes -
            Assignee Roel Van de Paar [ roel ]

            People

              Unassigned Unassigned
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.