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

Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed in Diagnostics_area::set_ok_status in my_ok from mysql_sql_stmt_prepare

    XMLWordPrintable

Details

    Description

      Ref MDEV-22058

      CREATE TEMPORARY TABLE a (c INT) ENGINE=InnoDB;
      CREATE TABLE b (c INT) ENGINE=InnoDB;
      PREPARE s FROM 'SET STATEMENT binlog_format=ROW FOR SELECT * FROM b';
      

      Leads to:

      10.6.0 609e8e38bb0e5c80a80c77c451b6e519f9aeb386 (Debug)

      mysqld: /test/10.6_dbg/sql/sql_error.cc:334: void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*): Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed.
      

      10.6.0 609e8e38bb0e5c80a80c77c451b6e519f9aeb386 (Debug)

      Core was generated by `/test/MD060421-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x148558098700 (LWP 422807))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x0000557334aa8eed in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
      #2  0x0000557334247a65 in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:343
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x00001485588ff859 in __GI_abort () at abort.c:79
      #6  0x00001485588ff729 in __assert_fail_base (fmt=0x148558a95588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x557334c0f370 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=0x557334c0f250 "/test/10.6_dbg/sql/sql_error.cc", line=334, function=<optimized out>) at assert.c:92
      #7  0x0000148558910f36 in __GI___assert_fail (assertion=assertion@entry=0x557334c0f370 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=file@entry=0x557334c0f250 "/test/10.6_dbg/sql/sql_error.cc", line=line@entry=334, function=function@entry=0x557334c0f3a8 "void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*)") at assert.c:101
      #8  0x0000557333f2d4cb in Diagnostics_area::set_ok_status (this=0x1484f0006ab0, affected_rows=affected_rows@entry=0, last_insert_id=last_insert_id@entry=0, message=message@entry=0x557334c1db18 "Statement prepared") at /test/10.6_dbg/sql/sql_error.h:1017
      #9  0x0000557333fa35c5 in my_ok (message=0x557334c1db18 "Statement prepared", id=0, affected_rows_arg=0, thd=0x1484f0000db8) at /test/10.6_dbg/sql/sql_class.h:5486
      #10 mysql_sql_stmt_prepare (thd=thd@entry=0x1484f0000db8) at /test/10.6_dbg/sql/sql_prepare.cc:2938
      #11 0x0000557333f87440 in mysql_execute_command (thd=thd@entry=0x1484f0000db8) at /test/10.6_dbg/sql/sql_parse.cc:3938
      #12 0x0000557333f738d0 in mysql_parse (thd=thd@entry=0x1484f0000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x148558097410) at /test/10.6_dbg/sql/sql_parse.cc:8004
      #13 0x0000557333f824d6 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1484f0000db8, packet=packet@entry=0x1484f000b359 "pREPARE s FROM 'SET STATEMENT binlog_format=ROW FOR SELECT * FROM b'", packet_length=packet_length@entry=68, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1331
      #14 0x0000557333f858b1 in do_command (thd=0x1484f0000db8, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1399
      #15 0x00005573340deb42 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5573364606b8, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
      #16 0x00005573340df147 in handle_one_connection (arg=arg@entry=0x5573364606b8) at /test/10.6_dbg/sql/sql_connect.cc:1312
      #17 0x000055733458bbef in pfs_spawn_thread (arg=0x557336384cd8) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #18 0x0000148558e0d609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #19 0x00001485589fc293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.2.38 (dbg), 10.3.29 (dbg), 10.4.19 (dbg), 10.5.10 (dbg), 10.6.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.38 (opt), 10.3.29 (opt), 10.4.19 (opt), 10.5.10 (opt), 10.6.0 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.33 (dbg), 5.7.33 (opt), 8.0.23 (dbg), 8.0.23 (opt)

      Issue also confirmed present in a3e3225cd3b816d47621e749e21a71b6a864a96a (10.6, debug, build 15 April 2021)

      Attachments

        Issue Links

          Activity

            People

              rucha174 Rucha Deodhar
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              6 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.