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

Assertion `0' fails on creating a temporary table via trigger (MySQL:70983)

    Details

      Description

      create table t1 (i int);
      create trigger tr after insert on t1 for each row
        create temporary table tmp as select new.i;
      
      insert into t1 values (1);
      
      sql/protocol.cc:518: void Protocol::end_statement(): Assertion `0' failed.
      131122 21:21:26 [ERROR] mysqld got signal 6 ;
      
      #6  0x00007f0e94cb5621 in *__GI___assert_fail (assertion=0xd4ed6d "0", file=<optimized out>, line=518, function=0xd4ff60 "void Protocol::end_statement()") at assert.c:81
      #7  0x0000000000594054 in Protocol::end_statement (this=0x7f0e9067e628) at /home/elenst/bzr/5.5/sql/protocol.cc:518
      #8  0x000000000062d973 in dispatch_command (command=COM_QUERY, thd=0x7f0e9067e060, packet=0x7f0e907d7061 "insert into t1 values (1)", packet_length=25) at /home/elenst/bzr/5.5/sql/sql_parse.cc:1471
      #9  0x000000000062b796 in do_command (thd=0x7f0e9067e060) at /home/elenst/bzr/5.5/sql/sql_parse.cc:793
      #10 0x000000000072c9ae in do_handle_one_connection (thd_arg=0x7f0e9067e060) at /home/elenst/bzr/5.5/sql/sql_connect.cc:1266
      #11 0x000000000072c46d in handle_one_connection (arg=0x7f0e9067e060) at /home/elenst/bzr/5.5/sql/sql_connect.cc:1181
      #12 0x00000000009746d5 in pfs_spawn_thread (arg=0x7f0e90683f80) at /home/elenst/bzr/5.5/storage/perfschema/pfs.cc:1015
      #13 0x00007f0e96215b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
      #14 0x00007f0e94d64a7d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
      
      revision-id: elenst@wheezy-64.home-20131122160336-h4180sqb00z6xyvh
      revno: 3983
      branch-nick: 5.5
      BUILD/compile-pentium-debug-max-no-ndb
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              elenst Elena Stepanova added a comment -

              The upstream bug was fixed in 5.7.1.
              Independently, the problem disappeared from 10.0 tree with the following revision:

              revno: 4377
              revision-id: sergii@pisem.net-20140906074641-93m5s4lde7p45x08
              parent: sergii@pisem.net-20140906063356-8kpu546j1utk0kmf
              fixes bug: https://mariadb.atlassian.net/browse/MDEV-6610
              committer: Sergei Golubchik <sergii@pisem.net>
              branch nick: 10.0
              timestamp: Sat 2014-09-06 09:46:41 +0200
              message:
                MDEV-6610 Assertion `thd->is_error() || thd->killed' failed in mysql_execute_command on executing an SP with repeated CREATE TABLE .. SELECT
                
                the bug was introduced by CREATE OR REPLACE implementation.
                CREATE IF NOT EXISTS ... SELECT was returning an error status to the caller,
                while sending an ok packet to the user. SP code was not prepared for that
                and trusted that error status means an error.
              

              Closing as fixed in 10.0.

              Show
              elenst Elena Stepanova added a comment - The upstream bug was fixed in 5.7.1. Independently, the problem disappeared from 10.0 tree with the following revision: revno: 4377 revision-id: sergii@pisem.net-20140906074641-93m5s4lde7p45x08 parent: sergii@pisem.net-20140906063356-8kpu546j1utk0kmf fixes bug: https://mariadb.atlassian.net/browse/MDEV-6610 committer: Sergei Golubchik <sergii@pisem.net> branch nick: 10.0 timestamp: Sat 2014-09-06 09:46:41 +0200 message: MDEV-6610 Assertion `thd->is_error() || thd->killed' failed in mysql_execute_command on executing an SP with repeated CREATE TABLE .. SELECT the bug was introduced by CREATE OR REPLACE implementation. CREATE IF NOT EXISTS ... SELECT was returning an error status to the caller, while sending an ok packet to the user. SP code was not prepared for that and trusted that error status means an error. Closing as fixed in 10.0.

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  elenst Elena Stepanova
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: