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

Server crashes in check_duplicate_key on CREATE TABLE ... SELECT

    XMLWordPrintable

Details

    Description

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (i INT, j INT, KEY(i), KEY(j))
        AS SELECT 1 AS i, 2 AS j;
      

      10.0 9741e0ea72

      #3  <signal handler called>
      #4  0x00000000006f0f12 in check_duplicate_key (thd=0x7f16847dd070, key=0x7f16818fad50, key_info=0x7f16818fbbe0, key_list=0x7f168b3c7cd0) at /data/src/10.0/sql/sql_table.cc:3186
      #5  0x00000000006f3eab in mysql_prepare_create_table (thd=0x7f16847dd070, create_info=0x7f168b3c7d30, alter_info=0x7f168b3c7ca0, db_options=0x7f168b3c529c, file=0x7f1681b46088, key_info_buffer=0x7f168b3c6808, key_count=0x7f168b3c6804, create_table_mode=2) at /data/src/10.0/sql/sql_table.cc:4120
      #6  0x00000000006f5207 in mysql_create_frm_image (thd=0x7f16847dd070, db=0x7f16818fa7a0 "test", table_name=0x7f16818fa188 "t1", create_info=0x7f168b3c7d30, alter_info=0x7f168b3c7ca0, create_table_mode=2, key_info=0x7f168b3c6808, key_count=0x7f168b3c6804, frm=0x7f168b3c67f0) at /data/src/10.0/sql/sql_table.cc:4609
      #7  0x00000000006f5b0e in create_table_impl (thd=0x7f16847dd070, orig_db=0x7f16818fa7a0 "test", orig_table_name=0x7f16818fa188 "t1", db=0x7f16818fa7a0 "test", table_name=0x7f16818fa188 "t1", path=0x7f168b3c65e0 "./test/t1", create_info=0x7f168b3c7d30, alter_info=0x7f168b3c7ca0, create_table_mode=2, is_trans=0x0, key_info=0x7f168b3c6808, key_count=0x7f168b3c6804, frm=0x7f168b3c67f0) at /data/src/10.0/sql/sql_table.cc:4848
      #8  0x00000000006f6051 in mysql_create_table_no_lock (thd=0x7f16847dd070, db=0x7f16818fa7a0 "test", table_name=0x7f16818fa188 "t1", create_info=0x7f168b3c7d30, alter_info=0x7f168b3c7ca0, is_trans=0x0, create_table_mode=2) at /data/src/10.0/sql/sql_table.cc:4966
      #9  0x0000000000631b5e in create_table_from_items (thd=0x7f16847dd070, create_info=0x7f168b3c7d30, create_table=0x7f16818fa1c0, alter_info=0x7f168b3c7ca0, items=0x7f16847e1218, lock=0x7f168b3c7978, hooks=0x7f168b3c7950) at /data/src/10.0/sql/sql_insert.cc:3986
      #10 0x00000000006321d7 in select_create::prepare (this=0x7f16818fb140, values=..., u=0x7f16847e0a10) at /data/src/10.0/sql/sql_insert.cc:4158
      #11 0x000000000067c80e in JOIN::prepare (this=0x7f16818fb220, rref_pointer_array=0x7f16847e1378, tables_init=0x0, wild_num=0, conds_init=0x0, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x7f16847e1100, unit_arg=0x7f16847e0a10) at /data/src/10.0/sql/sql_select.cc:967
      #12 0x0000000000684772 in mysql_select (thd=0x7f16847dd070, rref_pointer_array=0x7f16847e1378, tables=0x0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2416184064, result=0x7f16818fb140, unit=0x7f16847e0a10, select_lex=0x7f16847e1100) at /data/src/10.0/sql/sql_select.cc:3286
      #13 0x000000000067abe4 in handle_select (thd=0x7f16847dd070, lex=0x7f16847e0948, result=0x7f16818fb140, setup_tables_done_option=0) at /data/src/10.0/sql/sql_select.cc:373
      #14 0x0000000000648a60 in mysql_execute_command (thd=0x7f16847dd070) at /data/src/10.0/sql/sql_parse.cc:3009
      #15 0x0000000000652122 in mysql_parse (thd=0x7f16847dd070, rawbuf=0x7f16818fa088 "CREATE TABLE t1 (i INT, j INT, KEY(i), KEY(j))\nAS SELECT 1 AS i, 2 AS j", length=71, parser_state=0x7f168b3c8650) at /data/src/10.0/sql/sql_parse.cc:6570
      #16 0x0000000000644c38 in dispatch_command (command=COM_QUERY, thd=0x7f16847dd070, packet=0x7f16847d3071 "CREATE TABLE t1 (i INT, j INT, KEY(i), KEY(j))\nAS SELECT 1 AS i, 2 AS j", packet_length=71) at /data/src/10.0/sql/sql_parse.cc:1309
      #17 0x0000000000643efb in do_command (thd=0x7f16847dd070) at /data/src/10.0/sql/sql_parse.cc:999
      #18 0x00000000007622e6 in do_handle_one_connection (thd_arg=0x7f16847dd070) at /data/src/10.0/sql/sql_connect.cc:1378
      #19 0x0000000000762058 in handle_one_connection (arg=0x7f16847dd070) at /data/src/10.0/sql/sql_connect.cc:1293
      #20 0x00000000009fb360 in pfs_spawn_thread (arg=0x7f1683191370) at /data/src/10.0/storage/perfschema/pfs.cc:1860
      #21 0x00007f168b0050a4 in start_thread (arg=0x7f168b3c9700) at pthread_create.c:309
      #22 0x00007f16891bd87d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      Attachments

        Activity

          People

            serg Sergei Golubchik
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.