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

Assertion `thd->transaction.stmt.is_empty() || thd->in_sub_stmt || (thd->state_flags & Open_tables_state::BACKUPS_AVAIL)' fails in close_thread_tables upon killing connection running SHOW on sequence

    XMLWordPrintable

    Details

      Description

      Note: The test case is non-deterministic, run with --repeat=N. It usually fails for me withing 2 attempts, but it can vary on different machines and builds.

      --source include/have_innodb.inc
       
      CREATE SEQUENCE s ENGINE=InnoDB;
      RENAME TABLE s TO s1;
       
      --connect (con1,localhost,root,,test)
      --let $conid= `SELECT CONNECTION_ID()`
      --send
        SHOW CREATE SEQUENCE s1;
       
      --connection default
      --eval KILL $conid
       
      # Cleanup
      --connection default
      DROP SEQUENCE s1;
      

      10.3 f1309fac

      mysqld: /data/src/10.3/sql/sql_base.cc:744: void close_thread_tables(THD*): Assertion `thd->transaction.stmt.is_empty() || thd->in_sub_stmt || (thd->state_flags & Open_tables_state::BACKUPS_AVAIL)' failed.
      190912 17:08:34 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f6391d3cf12 in __GI___assert_fail (assertion=0x5572e52cda48 "thd->transaction.stmt.is_empty() || thd->in_sub_stmt || (thd->state_flags & Open_tables_state::BACKUPS_AVAIL)", file=0x5572e52cd7c0 "/data/src/10.3/sql/sql_base.cc", line=744, function=0x5572e52cf510 <close_thread_tables(THD*)::__PRETTY_FUNCTION__> "void close_thread_tables(THD*)") at assert.c:101
      #8  0x00005572e45b480d in close_thread_tables (thd=0x7f6334000b00) at /data/src/10.3/sql/sql_base.cc:743
      #9  0x00005572e46ec9c5 in mysqld_show_create (thd=0x7f6334000b00, table_list=0x7f6334011530) at /data/src/10.3/sql/sql_show.cc:1449
      #10 0x00005572e4650392 in mysql_execute_command (thd=0x7f6334000b00) at /data/src/10.3/sql/sql_parse.cc:4250
      #11 0x00005572e465c9fd in mysql_parse (thd=0x7f6334000b00, rawbuf=0x7f6334011458 "SHOW CREATE SEQUENCE s1", length=23, parser_state=0x7f638c0f05e0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7830
      #12 0x00005572e46492fb in dispatch_command (command=COM_QUERY, thd=0x7f6334000b00, packet=0x7f6334008c71 "SHOW CREATE SEQUENCE s1", packet_length=23, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1856
      #13 0x00005572e4647c22 in do_command (thd=0x7f6334000b00) at /data/src/10.3/sql/sql_parse.cc:1401
      #14 0x00005572e47c0d40 in do_handle_one_connection (connect=0x5572e89ad0b0) at /data/src/10.3/sql/sql_connect.cc:1403
      #15 0x00005572e47c0aa2 in handle_one_connection (arg=0x5572e89ad0b0) at /data/src/10.3/sql/sql_connect.cc:1308
      #16 0x00005572e51a30a0 in pfs_spawn_thread (arg=0x5572e88f0aa0) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #17 0x00007f63938b14a4 in start_thread (arg=0x7f638c0f1700) at pthread_create.c:456
      #18 0x00007f6391df9d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Reproducible on 10.3-10.5.
      Couldn't reproduce with MyISAM.
      No obvious problem on a non-debug build.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              svoj Sergey Vojtovich
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: