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

Server crashes when executing OPTIMIZE or REPAIR TABLE for InnoDB temporary tables

    XMLWordPrintable

Details

    Description

      --source include/have_innodb.inc 
       
      CREATE TEMPORARY TABLE t1 (i INT) ENGINE=INNODB;
      CREATE TABLE t2 (i INT) ENGINE=Aria ;
      OPTIMIZE TABLE t1,t2;
       
      #cleanup
      DROP TABLE t1,t2;
      

      Leads to:

      11.2.4 db06c5dd07e6ffd6a569afe6950fa77c2f02f811 (Debug)

      mariadbd: /test/11.2_dbg/sql/sql_class.cc:4762: void thd_progress_init(THD*, uint): Assertion `thd->stmt_arena != thd->progress.arena' failed.
      

      11.2.4 db06c5dd07e6ffd6a569afe6950fa77c2f02f811 (Debug)

      Core was generated by `/test/MD140524-mariadb-11.2.4-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
      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 0x14ea240bb700 (LWP 353731))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000014ea28121859 in __GI_abort () at abort.c:79
      #2  0x000014ea28121729 in __assert_fail_base (fmt=0x14ea282b7588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x561cf76d7990 "thd->stmt_arena != thd->progress.arena", file=0x561cf76d6ce0 "/test/11.2_dbg/sql/sql_class.cc", line=4762, function=<optimized out>) at assert.c:92
      #3  0x000014ea28132fd6 in __GI___assert_fail (assertion=assertion@entry=0x561cf76d7990 "thd->stmt_arena != thd->progress.arena", file=file@entry=0x561cf76d6ce0 "/test/11.2_dbg/sql/sql_class.cc", line=line@entry=4762, function=function@entry=0x561cf76d79b8 "void thd_progress_init(THD*, uint)") at assert.c:101
      #4  0x0000561cf6961022 in thd_progress_init (thd=thd@entry=0x14e9dc000d48, max_stage=max_stage@entry=1) at /test/11.2_dbg/sql/sql_class.cc:4762
      #5  0x0000561cf6f24345 in ha_maria::optimize (this=0x14e9dc020270, thd=0x14e9dc000d48, check_opt=0x14e9dc0065b8) at /test/11.2_dbg/storage/maria/ha_maria.cc:1624
      #6  0x0000561cf6cfbc44 in handler::ha_optimize (this=0x14e9dc020270, thd=0x14e9dc000d48, check_opt=0x14e9dc0065b8) at /test/11.2_dbg/sql/handler.cc:5382
      #7  0x0000561cf6b5ad1f in mysql_admin_table (thd=thd@entry=0x14e9dc000d48, tables=tables@entry=0x14e9dc013628, check_opt=check_opt@entry=0x14e9dc0065b8, operator_name=operator_name@entry=0x561cf7eef5e0 <msg_optimize>, lock_type=lock_type@entry=TL_WRITE, org_open_for_modify=org_open_for_modify@entry=true, repair_table_use_frm=false, extra_open_options=0, prepare_func=0x0, operator_func=(int (handler::*)(class handler * const, class THD *, HA_CHECK_OPT *)) 0x561cf6cfbba8 <handler::ha_optimize(THD*, st_ha_check_opt*)>, view_operator_func=0x0, is_cmd_replicated=true) at /test/11.2_dbg/sql/sql_admin.cc:915
      #8  0x0000561cf6b5d4a6 in Sql_cmd_optimize_table::execute (this=<optimized out>, thd=0x14e9dc000d48) at /test/11.2_dbg/sql/sql_admin.cc:1625
      #9  0x0000561cf69d4780 in mysql_execute_command (thd=thd@entry=0x14e9dc000d48, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/11.2_dbg/sql/sql_parse.cc:5875
      #10 0x0000561cf69bd119 in mysql_parse (thd=thd@entry=0x14e9dc000d48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14ea240ba2b0) at /test/11.2_dbg/sql/sql_parse.cc:7903
      #11 0x0000561cf69cac3b in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14e9dc000d48, packet=packet@entry=0x14e9dc00b219 "", packet_length=packet_length@entry=26, blocking=blocking@entry=true) at /test/11.2_dbg/sql/sql_class.h:1409
      #12 0x0000561cf69cd5a5 in do_command (thd=0x14e9dc000d48, blocking=blocking@entry=true) at /test/11.2_dbg/sql/sql_parse.cc:1406
      #13 0x0000561cf6b48911 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x561cf92b8648, put_in_cache=put_in_cache@entry=true) at /test/11.2_dbg/sql/sql_connect.cc:1437
      #14 0x0000561cf6b48ec6 in handle_one_connection (arg=arg@entry=0x561cf92b8648) at /test/11.2_dbg/sql/sql_connect.cc:1339
      #15 0x0000561cf6fbbc62 in pfs_spawn_thread (arg=0x561cf92f1708) at /test/11.2_dbg/storage/perfschema/pfs.cc:2201
      #16 0x000014ea28632609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #17 0x000014ea2821e133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 11.2.4 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.4.34 (dbg), 10.4.34 (opt), 10.5.25 (dbg), 10.5.25 (opt), 10.6.18 (dbg), 10.6.18 (opt), 10.11.8 (dbg), 10.11.8 (opt), 11.0.6 (dbg), 11.0.6 (opt), 11.1.5 (dbg), 11.1.5 (opt), 11.2.4 (opt), 11.3.3 (dbg), 11.3.3 (opt), 11.4.2 (dbg), 11.4.2 (opt), 11.5.0 (dbg), 11.5.0 (opt)

      Attachments

        Issue Links

          Activity

            People

              nikitamalyavin Nikita Malyavin
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              7 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.