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

Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed in Diagnostics_area::set_ok_status on FUNCTION replace

    XMLWordPrintable

Details

    Description

      # mysqld options required for replay: --log-bin
      USE test;
      CREATE FUNCTION f(c INT) RETURNS NUMERIC NO SQL RETURN 0;
      CREATE OR REPLACE FUNCTION f(c INT) RETURNS INT RETURN 0;
      

      Leads to:

      10.5.3 cfe5ee90c8e4b9dfa98a41fcd299197a59261be7

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

      10.5.3 cfe5ee90c8e4b9dfa98a41fcd299197a59261be7

      Core was generated by `/test/MD110520-mariadb-10.5.3-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:57
      [Current thread is 1 (Thread 0x154e4914f700 (LWP 2644009))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x0000556148137c11 in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
      #2  0x00005561478dcf8d in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:329
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x0000154e478de801 in __GI_abort () at abort.c:79
      #6  0x0000154e478ce39a in __assert_fail_base (fmt=0x154e47a557d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5561482a6118 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=file@entry=0x5561482a60c0 "/test/10.5_dbg/sql/sql_error.cc", line=line@entry=335, function=function@entry=0x5561482a6c40 <Diagnostics_area::set_ok_status(unsigned long long, unsigned long long, char const*)::__PRETTY_FUNCTION__> "void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*)") at assert.c:92
      #7  0x0000154e478ce412 in __GI___assert_fail (assertion=assertion@entry=0x5561482a6118 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=file@entry=0x5561482a60c0 "/test/10.5_dbg/sql/sql_error.cc", line=line@entry=335, function=function@entry=0x5561482a6c40 <Diagnostics_area::set_ok_status(unsigned long long, unsigned long long, char const*)::__PRETTY_FUNCTION__> "void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*)") at assert.c:101
      #8  0x00005561475e9b19 in Diagnostics_area::set_ok_status (this=0x154e2681ab88, affected_rows=affected_rows@entry=0, last_insert_id=last_insert_id@entry=0, message=message@entry=0x0) at /test/10.5_dbg/sql/sql_error.cc:335
      #9  0x0000556147638349 in my_ok (message=0x0, id=0, affected_rows_arg=0, thd=0x154e26815088) at /test/10.5_dbg/sql/sql_class.h:5156
      #10 mysql_execute_command (thd=thd@entry=0x154e26815088) at /test/10.5_dbg/sql/sql_parse.cc:5631
      #11 0x0000556147640804 in mysql_parse (thd=thd@entry=0x154e26815088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x154e4914e3e0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:7957
      #12 0x000055614762cffd in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x154e26815088, packet=packet@entry=0x154e26867089 "CREATE OR REPLACE FUNCTION f(c INT) RETURNS INT RETURN 0", packet_length=packet_length@entry=56, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:1839
      #13 0x000055614762b8cc in do_command (thd=0x154e26815088) at /test/10.5_dbg/sql/sql_parse.cc:1358
      #14 0x000055614778599d in do_handle_one_connection (connect=<optimized out>, connect@entry=0x154e28049aa8, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1411
      #15 0x00005561477860b9 in handle_one_connection (arg=arg@entry=0x154e28049aa8) at /test/10.5_dbg/sql/sql_connect.cc:1313
      #16 0x0000556147be410a in pfs_spawn_thread (arg=0x154e46c45b08) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
      #17 0x0000154e485c16db in start_thread (arg=0x154e4914f700) at pthread_create.c:463
      #18 0x0000154e479bf88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.1.45 (dbg), 10.2.32 (dbg), 10.3.23 (dbg), 10.4.13 (dbg), 10.5.2 (dbg), 10.5.3 (dbg)

      Bug confirmed not present in:
      MariaDB: 10.1.45 (opt), 10.2.32 (opt), 10.3.23 (opt), 10.4.13 (opt), 10.5.2 (opt), 10.5.3 (opt), 10.5.4 (dbg), 10.5.4 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.