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

Server crashes when rename table and alter storage engine

    XMLWordPrintable

Details

    Description

      CREATE TABLE t1 (x int);
      ALTER TABLE t1 ENGINE=InnoDB, RENAME TO t2 ;
      

      Leads to

      10.7.1 685c25ba68dd7426536408f9e3da72ab3f30b5c3 (Debug)

      mysqld: /test/mtest/10.7_dbg/sql/sql_lex.cc:11263: bool LEX::stmt_alter_table(Table_ident*): Assertion `!m_sql_cmd' failed.
      

      10.7.1 685c25ba68dd7426536408f9e3da72ab3f30b5c3 (Debug)

      Core was generated by `/test/mtest/MD041021-mariadb-10.7.1-linux-x86_64-dbg/bin/mysqld --no-defaults -'.
      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 0x14aa10564700 (LWP 354303))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000014aa13132859 in __GI_abort () at abort.c:79
      #2  0x000014aa13132729 in __assert_fail_base (fmt=0x14aa132c8588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55daef8e73c4 "!m_sql_cmd", file=0x55daef8e8350 "/test/mtest/10.7_dbg/sql/sql_lex.cc", line=11263, function=<optimized out>) at assert.c:92
      #3  0x000014aa13143f36 in __GI___assert_fail (assertion=assertion@entry=0x55daef8e73c4 "!m_sql_cmd", file=file@entry=0x55daef8e8350 "/test/mtest/10.7_dbg/sql/sql_lex.cc", line=line@entry=11263, function=function@entry=0x55daef8ea840 "bool LEX::stmt_alter_table(Table_ident*)") at assert.c:101
      #4  0x000055daeec21caa in LEX::stmt_alter_table (this=0x14a9c4005048, table=0x14a9c4014480) at /test/mtest/10.7_dbg/sql/sql_lex.cc:11263
      #5  0x000055daeeeaf3d2 in MYSQLparse (thd=thd@entry=0x14a9c4000db8) at /test/mtest/10.7_dbg/sql/sql_yacc.yy:7573
      #6  0x000055daeec356a7 in parse_sql (thd=thd@entry=0x14a9c4000db8, parser_state=parser_state@entry=0x14aa10563400, creation_ctx=creation_ctx@entry=0x0, do_pfs_digest=do_pfs_digest@entry=true) at /test/mtest/10.7_dbg/sql/sql_parse.cc:10406
      #7  0x000055daeec2fc45 in mysql_parse (thd=thd@entry=0x14a9c4000db8, rawbuf=<optimized out>, length=42, parser_state=parser_state@entry=0x14aa10563400) at /test/mtest/10.7_dbg/sql/sql_parse.cc:7980
      #8  0x000055daeec3e9ce in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14a9c4000db8, packet=packet@entry=0x14a9c400b729 "ALTER TABLE t1 ENGINE=InnoDB, RENAME TO t2", packet_length=packet_length@entry=42, blocking=blocking@entry=true) at /test/mtest/10.7_dbg/sql/sql_class.h:1358
      #9  0x000055daeec41dd9 in do_command (thd=0x14a9c4000db8, blocking=blocking@entry=true) at /test/mtest/10.7_dbg/sql/sql_parse.cc:1402
      #10 0x000055daeedba146 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55daf297b428, put_in_cache=put_in_cache@entry=true) at /test/mtest/10.7_dbg/sql/sql_connect.cc:1418
      #11 0x000055daeedba74b in handle_one_connection (arg=arg@entry=0x55daf297b428) at /test/mtest/10.7_dbg/sql/sql_connect.cc:1312
      #12 0x000055daef224c38 in pfs_spawn_thread (arg=0x55daf288cb68) at /test/mtest/10.7_dbg/storage/perfschema/pfs.cc:2201
      #13 0x000014aa13640609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #14 0x000014aa1322f293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.7.1 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.7.1 (opt)

      Attachments

        Issue Links

          Activity

            People

              midenok Aleksey Midenkov
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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