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

Server crashes when using bad stat tables

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.4(EOL)
    • 10.4(EOL)
    • None

    Description

      --source include/have_innodb.inc
       
      CREATE OR REPLACE TABLE mysql.table_stats (a INT)  ENGINE=InnoDB;
      CREATE TABLE t (id int) ENGINE=InnoDB;
      LOCK TABLES t WRITE;
      DROP TABLE IF EXISTS t;
      

      Leads to:

      10.4.32 e52777f1a4df20ffd3ae743b7b64f5e645090cd8 (Debug)

      mariadbd: /test/10.4_dbg/sql/sql_base.cc:2490: void Locked_tables_list::unlock_locked_tables(THD*): Assertion `thd->transaction.stmt.is_empty()' failed.
      

      10.4.32 e52777f1a4df20ffd3ae743b7b64f5e645090cd8 (Debug)

      Core was generated by `/test/MD311023-mariadb-10.4.32-linux-x86_64-dbg/bin/mariadbd --no-defaults --co'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      [Current thread is 1 (Thread 0x1524300b1700 (LWP 3768381))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x0000152445d4e859 in __GI_abort () at abort.c:79
      #2  0x0000152445d4e729 in __assert_fail_base (fmt=0x152445ee4588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55d2c6a70350 "thd->transaction.stmt.is_empty()", file=0x55d2c6a6f858 "/test/10.4_dbg/sql/sql_base.cc", line=2490, function=<optimized out>) at assert.c:92
      #3  0x0000152445d5ffd6 in __GI___assert_fail (assertion=assertion@entry=0x55d2c6a70350 "thd->transaction.stmt.is_empty()", file=file@entry=0x55d2c6a6f858 "/test/10.4_dbg/sql/sql_base.cc", line=line@entry=2490, function=function@entry=0x55d2c6a70318 "void Locked_tables_list::unlock_locked_tables(THD*)") at assert.c:101
      #4  0x000055d2c5d6ff00 in Locked_tables_list::unlock_locked_tables (this=this@entry=0x1523dc004aa8, thd=thd@entry=0x1523dc000d28) at /test/10.4_dbg/sql/handler.h:1712
      #5  0x000055d2c5ea2916 in mysql_rm_table_no_locks (thd=thd@entry=0x1523dc000d28, tables=tables@entry=0x1523dc012730, if_exists=if_exists@entry=true, 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.4_dbg/sql/sql_table.cc:2727
      #6  0x000055d2c5ea2d81 in mysql_rm_table (thd=thd@entry=0x1523dc000d28, tables=tables@entry=0x1523dc012730, if_exists=<optimized out>, drop_temporary=<optimized out>, drop_sequence=<optimized out>) at /test/10.4_dbg/sql/sql_table.cc:2152
      #7  0x000055d2c5dee740 in mysql_execute_command (thd=thd@entry=0x1523dc000d28) at /test/10.4_dbg/sql/structs.h:558
      #8  0x000055d2c5df4e3a in mysql_parse (thd=thd@entry=0x1523dc000d28, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1524300b0360, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_parse.cc:8013
      #9  0x000055d2c5df7e00 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1523dc000d28, packet=packet@entry=0x1523dc0196b9 "DROP TABLE IF EXISTS t", packet_length=packet_length@entry=22, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_class.h:1241
      #10 0x000055d2c5dfaa5f in do_command (thd=0x1523dc000d28) at /test/10.4_dbg/sql/sql_parse.cc:1378
      #11 0x000055d2c5f25244 in do_handle_one_connection (connect=connect@entry=0x55d2c9c6e8b8) at /test/10.4_dbg/sql/sql_connect.cc:1420
      #12 0x000055d2c5f25363 in handle_one_connection (arg=0x55d2c9c6e8b8) at /test/10.4_dbg/sql/sql_connect.cc:1324
      #13 0x000015244625f609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #14 0x0000152445e4b133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.4.32 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.4.32 (opt), 10.5.23 (dbg), 10.5.23 (opt), 10.6.16 (dbg), 10.6.16 (opt), 10.9.8 (dbg), 10.9.8 (opt), 10.10.7 (dbg), 10.10.7 (opt), 10.11.6 (dbg), 10.11.6 (opt), 11.0.4 (dbg), 11.0.4 (opt), 11.1.3 (dbg), 11.1.3 (opt), 11.2.2 (dbg), 11.2.2 (opt), 11.3.0 (dbg), 11.3.0 (opt)

      Attachments

        Activity

          People

            holyfoot Alexey Botchkov
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.