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

Assertion `thd->is_error() || thd->killed' failed in mysql_execute_command on executing an SP with repeated CREATE TABLE .. SELECT

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.0.13, 10.1.0
    • 10.0.14, 10.1.1
    • None
    • None

    Description

      CREATE TABLE t1 (i INT);
      SET @a = 2; 
       
      --delimiter |
      CREATE PROCEDURE sp()
      BEGIN
      REPEAT 
        CREATE TABLE IF NOT EXISTS t2 (i INT) ENGINE = MyISAM 
            AS SELECT * FROM t1; 
        SET @a = @a - 1; 
      UNTIL @a = 0 
      END REPEAT ;
      END |
      --delimiter ;
       
      CALL sp();

      0.0/sql/sql_parse.cc:4700: int mysql_execute_command(THD*): Assertion `thd->is_error() || thd->killed' failed.
      140819 19:37:09 [ERROR] mysqld got signal 6 ;

      #6  0x00007f0a9ab4d6f1 in *__GI___assert_fail (assertion=0xf30b10 "thd->is_error() || thd->killed", file=<optimized out>, line=4700, function=0xf32160 "int mysql_execute_command(THD*)") at assert.c:81
      #7  0x000000000067ebdf in mysql_execute_command (thd=0x7f0a9572f070) at 10.0/sql/sql_parse.cc:4700
      #8  0x0000000000682ef3 in mysql_parse (thd=0x7f0a9572f070, rawbuf=0x7f0a92c19088 "CALL sp()", length=9, parser_state=0x7f0a9cb1b610) at 10.0/sql/sql_parse.cc:6411
      #9  0x0000000000675da8 in dispatch_command (command=COM_QUERY, thd=0x7f0a9572f070, packet=0x7f0a967f6071 "CALL sp()", packet_length=9) at 10.0/sql/sql_parse.cc:1307
      #10 0x000000000067514d in do_command (thd=0x7f0a9572f070) at 10.0/sql/sql_parse.cc:1004
      #11 0x0000000000791402 in do_handle_one_connection (thd_arg=0x7f0a9572f070) at 10.0/sql/sql_connect.cc:1379
      #12 0x0000000000791155 in handle_one_connection (arg=0x7f0a9572f070) at 10.0/sql/sql_connect.cc:1293
      #13 0x0000000000cc3b5e in pfs_spawn_thread (arg=0x7f0a94b1fbf0) at 10.0/storage/perfschema/pfs.cc:1860
      #14 0x00007f0a9c706b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
      #15 0x00007f0a9abfe20d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

      Stack trace from:

      revision-id: knielsen@knielsen-hq.org-20140815093113-kbrh2wvzemm360uf
      revno: 4354
      branch-nick: 10.0

      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.