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

Assertion `!wsrep_has_changes(thd) || (thd->lex->sql_command == SQLCOM_CREATE_TABLE && !thd->is_current_stmt_binlog_format_row()) || thd->wsrep_cs().transaction().state() == wsrep::transaction::s_aborted' failed

    XMLWordPrintable

Details

    Description

      CREATE TABLE t (f INT);
      LOCK TABLE t WRITE;
      CREATE OR REPLACE SEQUENCE t MAXVALUE=13 INCREMENT BY 1;
      INSERT INTO t VALUES (0,0,1,1,1,0,0,0);
      

      Leads to

      11.0.0 1cb0835be98985f20cccd1724ac78de3649eb2e6

      mysqld: /test/mtest/11.0/sql/wsrep_mysqld.cc:3800: void wsrep_commit_empty(THD*, bool): Assertion `!wsrep_has_changes(thd) || (thd->lex->sql_command == SQLCOM_CREATE_TABLE && !thd->is_current_stmt_binlog_format_row()) || thd->wsrep_cs().transaction().state() == wsrep::transaction::s_aborted' failed.
      

      11.0.0 1cb0835be98985f20cccd1724ac78de3649eb2e6

      Core was generated by `/test/mtest/11.0/mariadb-11.0.0-linux-x86_64/bin/mysqld --defaults-file=/test/m'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x14b820059700 (LWP 2747994))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055ddce041377 in my_write_core (sig=6) at /test/mtest/11.0/mysys/stacktrace.c:424
      #2  0x000055ddcd7adabb in handle_fatal_signal (sig=6) at /test/mtest/11.0/sql/signal_handler.cc:355
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x000014b83296e859 in __GI_abort () at abort.c:79
      #6  0x000014b83296e729 in __assert_fail_base (fmt=0x14b832b04588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55ddce47ee68 "!wsrep_has_changes(thd) || (thd->lex->sql_command == SQLCOM_CREATE_TABLE && !thd->is_current_stmt_binlog_format_row()) || thd->wsrep_cs().transaction().state() == wsrep::transaction::s_aborted", file=0x55ddce47c748 "/test/mtest/11.0/sql/wsrep_mysqld.cc", line=3800, function=<optimized out>) at assert.c:92
      #7  0x000014b83297ffd6 in __GI___assert_fail (assertion=0x55ddce47ee68 "!wsrep_has_changes(thd) || (thd->lex->sql_command == SQLCOM_CREATE_TABLE && !thd->is_current_stmt_binlog_format_row()) || thd->wsrep_cs().transaction().state() == wsrep::transaction::s_aborted", file=0x55ddce47c748 "/test/mtest/11.0/sql/wsrep_mysqld.cc", line=3800, function=0x55ddce47ef30 "void wsrep_commit_empty(THD*, bool)") at assert.c:101
      #8  0x000055ddcdb62061 in wsrep_commit_empty (thd=0x14b7b8000db8, all=true) at /test/mtest/11.0/sql/wsrep_mysqld.cc:3800
      #9  0x000055ddcd3dfe20 in mysql_execute_command (thd=0x14b7b8000db8, is_called_from_prepared_stmt=false) at /test/mtest/11.0/sql/sql_parse.cc:6161
      #10 0x000055ddcd3e52ee in mysql_parse (thd=0x14b7b8000db8, rawbuf=0x14b7b8013e90 "INSERT INTO t VALUES (0,0,1,1,1,0,0,0)", length=38, parser_state=0x14b820058310) at /test/mtest/11.0/sql/sql_parse.cc:8000
      #11 0x000055ddcd3e49eb in wsrep_mysql_parse (thd=0x14b7b8000db8, rawbuf=0x14b7b8013e90 "INSERT INTO t VALUES (0,0,1,1,1,0,0,0)", length=38, parser_state=0x14b820058310) at /test/mtest/11.0/sql/sql_parse.cc:7811
      #12 0x000055ddcd3d1696 in dispatch_command (command=COM_QUERY, thd=0x14b7b8000db8, packet=0x14b7b800b939 "INSERT INTO t VALUES (0,0,1,1,1,0,0,0)", packet_length=38, blocking=true) at /test/mtest/11.0/sql/sql_parse.cc:1881
      #13 0x000055ddcd3d0144 in do_command (thd=0x14b7b8000db8, blocking=true) at /test/mtest/11.0/sql/sql_parse.cc:1407
      #14 0x000055ddcd5b566c in do_handle_one_connection (connect=0x55ddd1087e78, put_in_cache=true) at /test/mtest/11.0/sql/sql_connect.cc:1416
      #15 0x000055ddcd5b53c8 in handle_one_connection (arg=0x55ddd1297d78) at /test/mtest/11.0/sql/sql_connect.cc:1318
      #16 0x000055ddcdac45c5 in pfs_spawn_thread (arg=0x55ddd13208e8) at /test/mtest/11.0/storage/perfschema/pfs.cc:2201
      #17 0x000014b832e9a609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #18 0x000014b832a6b133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.11.2 922f7ba75c864a9ae4d0e55fa66860dae306136f (Debug)

      mysqld: /test/10.11_dbg/sql/wsrep_mysqld.cc:3782: void wsrep_commit_empty(THD*, bool): Assertion `!wsrep_has_changes(thd) || (thd->lex->sql_command == SQLCOM_CREATE_TABLE && !thd->is_current_stmt_binlog_format_row()) || thd->wsrep_cs().transaction().state() == wsrep::transaction::s_aborted' failed.
      

      10.11.2 922f7ba75c864a9ae4d0e55fa66860dae306136f (Debug)

      Core was generated by `/test/GAL_MD071222-mariadb-10.11.2-linux-x86_64-dbg/bin/mysqld --defaults-file='.
      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 0x14fee389a700 (LWP 3492475))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055682a105a93 in my_write_core (sig=sig@entry=6) at /test/10.11_dbg/mysys/stacktrace.c:424
      #2  0x00005568299e2274 in handle_fatal_signal (sig=6) at /test/10.11_dbg/sql/signal_handler.cc:355
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x000014ff310f4859 in __GI_abort () at abort.c:79
      #6  0x000014ff310f4729 in __assert_fail_base (fmt=0x14ff3128a588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55682a4c1b20 "!wsrep_has_changes(thd) || (thd->lex->sql_command == SQLCOM_CREATE_TABLE && !thd->is_current_stmt_binlog_format_row()) || thd->wsrep_cs().transaction().state() == wsrep::transaction::s_aborted", file=0x55682a4c0c98 "/test/10.11_dbg/sql/wsrep_mysqld.cc", line=3782, function=<optimized out>) at assert.c:92
      #7  0x000014ff31105fd6 in __GI___assert_fail (assertion=assertion@entry=0x55682a4c1b20 "!wsrep_has_changes(thd) || (thd->lex->sql_command == SQLCOM_CREATE_TABLE && !thd->is_current_stmt_binlog_format_row()) || thd->wsrep_cs().transaction().state() == wsrep::transaction::s_aborted", file=file@entry=0x55682a4c0c98 "/test/10.11_dbg/sql/wsrep_mysqld.cc", line=line@entry=3782, function=function@entry=0x55682a4c1be8 "void wsrep_commit_empty(THD*, bool)") at assert.c:101
      #8  0x0000556829ca0d2a in wsrep_commit_empty (thd=thd@entry=0x14fec4000d48, all=all@entry=true) at /test/10.11_dbg/wsrep-lib/include/wsrep/transaction.hpp:65
      #9  0x000055682970fc25 in mysql_execute_command (thd=thd@entry=0x14fec4000d48, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.11_dbg/sql/sql_parse.cc:6159
      #10 0x00005568296f73cf in mysql_parse (thd=thd@entry=0x14fec4000d48, rawbuf=rawbuf@entry=0x14fec4013120 "INSERT INTO t VALUES (0,0,1,1,1,0,0,0)", length=length@entry=38, parser_state=parser_state@entry=0x14fee3899300) at /test/10.11_dbg/sql/sql_parse.cc:7998
      #11 0x00005568296f6dcf in wsrep_mysql_parse (thd=thd@entry=0x14fec4000d48, rawbuf=0x14fec4013120 "INSERT INTO t VALUES (0,0,1,1,1,0,0,0)", length=38, parser_state=parser_state@entry=0x14fee3899300) at /test/10.11_dbg/sql/sql_parse.cc:7809
      #12 0x0000556829704a12 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14fec4000d48, packet=packet@entry=0x14fec400adf9 "INSERT INTO t VALUES (0,0,1,1,1,0,0,0)", packet_length=packet_length@entry=38, blocking=blocking@entry=true) at /test/10.11_dbg/sql/sql_class.h:1346
      #13 0x0000556829706e3e in do_command (thd=0x14fec4000d48, blocking=blocking@entry=true) at /test/10.11_dbg/sql/sql_parse.cc:1407
      #14 0x0000556829863104 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55682d3d92d8, put_in_cache=put_in_cache@entry=true) at /test/10.11_dbg/sql/sql_connect.cc:1415
      #15 0x00005568298635d6 in handle_one_connection (arg=0x55682d3d92d8) at /test/10.11_dbg/sql/sql_connect.cc:1317
      #16 0x000014ff31605609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #17 0x000014ff311f1133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.4.28 (dbg), 10.5.19 (dbg), 10.6.12 (dbg), 10.7.8 (dbg), 10.8.7 (dbg), 10.9.5 (dbg), 10.10.3 (dbg), 10.11.2 (dbg), c

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.3.38 (dbg), 10.3.38 (opt), 10.4.28 (opt), 10.5.19 (opt), 10.6.12 (opt), 10.7.8 (opt), 10.8.7 (opt), 10.9.5 (opt), 10.10.3 (opt), 10.11.2 (opt), 11.0.0 (opt)

      Attachments

        Issue Links

          Activity

            People

              sysprg Julius Goryavsky
              ramesh Ramesh Sivaraman
              Votes:
              1 Vote for this issue
              Watchers:
              4 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.