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

Server crashes in in row_mysql_convert_row_to_innobase on CREATE .. SELECT

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.0.8
    • 10.0.10
    • None
    • None

    Description

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (a VARCHAR(3)) ENGINE=InnoDB;
      INSERT INTO t1 VALUES ('foo'),('bar');
       
      FLUSH TABLES;
       
      CREATE TEMPORARY TABLE tmp ENGINE=InnoDB AS SELECT VALUES(a) FROM t1;

      With XtraDB, it crashes (sometimes takes more than one attempt):

      #3  <signal handler called>
      #4  0x00007f1e6ec353d2 in row_mysql_convert_row_to_innobase (row=0x7f1e834a67d8, prebuilt=0x7f1e834a6278, mysql_rec=0x7f1e5ba79f88 "\375\245\245\245\245\245\245\245\377\245\245\245\245\245\245\245\250\237\247[\036\177") at 10.0/storage/xtradb/row/row0mysql.cc:543
      #5  0x00007f1e6ec367e0 in row_insert_for_mysql (mysql_rec=0x7f1e5ba79f88 "\375\245\245\245\245\245\245\245\377\245\245\245\245\245\245\245\250\237\247[\036\177", prebuilt=0x7f1e834a6278) at 10.0/storage/xtradb/row/row0mysql.cc:1292
      #6  0x00007f1e6eb3c108 in ha_innodb::write_row (this=0x7f1e5d068088, record=0x7f1e5ba79f88 "\375\245\245\245\245\245\245\245\377\245\245\245\245\245\245\245\250\237\247[\036\177") at 10.0/storage/xtradb/handler/ha_innodb.cc:7396
      #7  0x00000000008663e1 in handler::ha_write_row (this=0x7f1e5d068088, buf=0x7f1e5ba79f88 "\375\245\245\245\245\245\245\245\377\245\245\245\245\245\245\245\250\237\247[\036\177") at 10.0/sql/handler.cc:5913
      #8  0x0000000000656ef2 in write_record (thd=0x7f1e6fbf6070, table=0x7f1e5bb22070, info=0x7f1e5d02c038) at 10.0/sql/sql_insert.cc:1876
      #9  0x000000000065b8e2 in select_insert::send_data (this=0x7f1e5d02c000, values=...) at 10.0/sql/sql_insert.cc:3630
      #10 0x00000000006d379e in end_send (join=0x7f1e5d02c0e0, join_tab=0x7f1e6fbfc7d8, end_of_records=false) at 10.0/sql/sql_select.cc:18530
      #11 0x00000000006d1589 in evaluate_join_record (join=0x7f1e5d02c0e0, join_tab=0x7f1e6fbfc4b0, error=0) at 10.0/sql/sql_select.cc:17638
      #12 0x00000000006d0e82 in sub_select (join=0x7f1e5d02c0e0, join_tab=0x7f1e6fbfc4b0, end_of_records=false) at 10.0/sql/sql_select.cc:17416
      #13 0x00000000006d06e7 in do_select (join=0x7f1e5d02c0e0, fields=0x7f1e6fbfa540, table=0x0, procedure=0x0) at 10.0/sql/sql_select.cc:17078
      #14 0x00000000006ae2be in JOIN::exec_inner (this=0x7f1e5d02c0e0) at 10.0/sql/sql_select.cc:3065
      #15 0x00000000006ab7d0 in JOIN::exec (this=0x7f1e5d02c0e0) at 10.0/sql/sql_select.cc:2355
      #16 0x00000000006aeb4f in mysql_select (thd=0x7f1e6fbf6070, rref_pointer_array=0x7f1e6fbfa6a0, tables=0x7f1e5d02ba08, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2416184064, result=0x7f1e5d02c000, unit=0x7f1e6fbf9d48, select_lex=0x7f1e6fbfa428) at 10.0/sql/sql_select.cc:3292
      #17 0x00000000006a527f in handle_select (thd=0x7f1e6fbf6070, lex=0x7f1e6fbf9c88, result=0x7f1e5d02c000, setup_tables_done_option=0) at 10.0/sql/sql_select.cc:372
      #18 0x000000000067360c in mysql_execute_command (thd=0x7f1e6fbf6070) at 10.0/sql/sql_parse.cc:3032
      #19 0x000000000067c9db in mysql_parse (thd=0x7f1e6fbf6070, rawbuf=0x7f1e5d02b088 "CREATE TEMPORARY TABLE tmp ENGINE=InnoDB AS SELECT VALUES(a) FROM t1", length=68, parser_state=0x7f1e85e76630) at 10.0/sql/sql_parse.cc:6447
      #20 0x000000000066f7a9 in dispatch_command (command=COM_QUERY, thd=0x7f1e6fbf6070, packet=0x7f1e6572e071 "CREATE TEMPORARY TABLE tmp ENGINE=InnoDB AS SELECT VALUES(a) FROM t1", packet_length=68) at 10.0/sql/sql_parse.cc:1308
      #21 0x000000000066eb4b in do_command (thd=0x7f1e6fbf6070) at 10.0/sql/sql_parse.cc:1005
      #22 0x00000000007880ed in do_handle_one_connection (thd_arg=0x7f1e6fbf6070) at 10.0/sql/sql_connect.cc:1379
      #23 0x0000000000787e40 in handle_one_connection (arg=0x7f1e6fbf6070) at 10.0/sql/sql_connect.cc:1293
      #24 0x0000000000a2cac5 in pfs_spawn_thread (arg=0x7f1e5bb0f350) at 10.0/storage/perfschema/pfs.cc:1853
      #25 0x00007f1e85b54b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
      #26 0x00007f1e8405fa7d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

      Stack trace from:

      revision-id: sergii@pisem.net-20140228200458-2nzjwfzn554m5aja
      revno: 4017
      branch-nick: 10.0

      With InnoDB, it fails with an error:

      MariaDB [test]> CREATE TEMPORARY TABLE tmp ENGINE=InnoDB AS SELECT VALUES(a) FROM t1;
      ERROR 1005 (HY000): Can't create table `test`.`tmp` (errno: -1 "Internal error < 0 (Not system error)")

      Neither happens with MariaDB 5.5, MySQL 5.6, Percona 5.6.

      "TEMPORARY" is not important.

      Attachments

        Activity

          People

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