Uploaded image for project: 'Percona Server'
  1. Percona Server
  2. PS-5087

CREATE TEMPORARY TABLE ... LIKE ... could fail if the referenced table is a MyRocks/TokuDB temp table

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: On Hold
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: 5.7.23-23
    • Fix Version/s: None
    • Component/s: MyRocks, TokuDB
    • Labels:
      None

      Description

      sql:

      CREATE DATABASE test;
      USE test;
      SET default_tmp_storage_engine=RocksDB;
      CREATE TEMPORARY TABLE t1(a CHAR (1),b TEXT,FULLTEXT(a,b)) TABLESPACE=RocksDB_temporary ROW_FORMAT=compact;
      CREATE TEMPORARY TABLE tmp_t1 LIKE t1;
      

      gdb:

      (gdb) bt
      +bt
      #0  0x00007f1625909a01 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
      #1  0x000000000189ded9 in my_write_core (sig=6) at /home/hrvoje/worktable/PS-5.7.24-26_dbg/mysys/stacktrace.c:249
      #2  0x0000000001617f8b in handle_fatal_signal (sig=6) at /home/hrvoje/worktable/PS-5.7.24-26_dbg/sql/signal_handler.cc:223
      #3  <signal handler called>
      #4  0x00007f1623a0d277 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
      #5  0x00007f1623a0e968 in __GI_abort () at abort.c:90
      #6  0x00007f1623a06096 in __assert_fail_base (fmt=0x7f1623b61580 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x1f965d8 "thd->mdl_context.owns_equal_or_stronger_lock(MDL_key::TABLE, src_table->db, src_table->table_name, MDL_SHARED)", file=file@entry=0x1f95268 "/home/hrvoje/worktable/PS-5.7.24-26_dbg/sql/sql_table.cc", line=line@entry=6067, function=function@entry=0x1f97be0 <mysql_create_like_table(THD*, TABLE_LIST*, TABLE_LIST*, st_ha_create_information*)::__PRETTY_FUNCTION__> "bool mysql_create_like_table(THD*, TABLE_LIST*, TABLE_LIST*, HA_CREATE_INFO*)") at assert.c:92
      #7  0x00007f1623a06142 in __GI___assert_fail (assertion=0x1f965d8 "thd->mdl_context.owns_equal_or_stronger_lock(MDL_key::TABLE, src_table->db, src_table->table_name, MDL_SHARED)", file=0x1f95268 "/home/hrvoje/worktable/PS-5.7.24-26_dbg/sql/sql_table.cc", line=6067, function=0x1f97be0 <mysql_create_like_table(THD*, TABLE_LIST*, TABLE_LIST*, st_ha_create_information*)::__PRETTY_FUNCTION__> "bool mysql_create_like_table(THD*, TABLE_LIST*, TABLE_LIST*, HA_CREATE_INFO*)") at assert.c:101
      #8  0x000000000155a7a5 in mysql_create_like_table (thd=0x7f15dbc19000, table=0x7f15dbc279e8, src_table=0x7f15dbc27fb0, create_info=0x7f1625ef8850) at /home/hrvoje/worktable/PS-5.7.24-26_dbg/sql/sql_table.cc:6066
      #9  0x00000000014c74f7 in mysql_execute_command (thd=0x7f15dbc19000, first_level=true) at /home/hrvoje/worktable/PS-5.7.24-26_dbg/sql/sql_parse.cc:3480
      #10 0x00000000014cdf54 in mysql_parse (thd=0x7f15dbc19000, parser_state=0x7f1625ef9460, update_userstat=false) at /home/hrvoje/worktable/PS-5.7.24-26_dbg/sql/sql_parse.cc:5896
      #11 0x00000000014c2cfb in dispatch_command (thd=0x7f15dbc19000, com_data=0x7f1625ef9c50, command=COM_QUERY) at /home/hrvoje/worktable/PS-5.7.24-26_dbg/sql/sql_parse.cc:1528
      #12 0x00000000014c1b30 in do_command (thd=0x7f15dbc19000) at /home/hrvoje/worktable/PS-5.7.24-26_dbg/sql/sql_parse.cc:1053
      #13 0x00000000015f4e18 in handle_connection (arg=0x7f160b947ca0) at /home/hrvoje/worktable/PS-5.7.24-26_dbg/sql/conn_handler/connection_handler_per_thread.cc:312
      #14 0x00000000018c197a in pfs_spawn_thread (arg=0x7f1621818d20) at /home/hrvoje/worktable/PS-5.7.24-26_dbg/storage/perfschema/pfs.cc:2190
      #15 0x00007f1625904e25 in start_thread (arg=0x7f1625efa700) at pthread_create.c:308
      #16 0x00007f1623ad5bad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113
      

      Originally reproduced on debug build for 5.7.24-26. I was able to reproduce it on 5.7.23-23 debug as well.

      Can't reproduce it on a release build (tested on 5.7.23-25).

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                hrvoje.matijakovic Hrvoje Matijakovic
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 45 minutes
                  45m