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

Assertion `!wsrep_has_changes(thd) || (thd->lex->sql_command == SQLCOM_CREATE_TABLE && !thd->is_current_stmt_binlog_format_row())' failed in void wsrep_commit_empty(THD*, bool)

    XMLWordPrintable

Details

    Description

      The assertion is similar to MDEV-22421, but the crash is in different place.

      SET autocommit=0;
      SET completion_type = 1;
      CREATE TABLE t2(b TEXT CHARSET LATIN1) ENGINE=InnoDB;
      INSERT INTO t2 VALUES (48717);
      ROLLBACK RELEASE;
      

      Leads to:

      10.6.1 370b310b1d67ad42df96b75c3876fdcf67a8694f (Debug)

      mysqld: /test/10.6_dbg/sql/wsrep_mysqld.cc:3552: 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())' failed.
      

      10.6.1 370b310b1d67ad42df96b75c3876fdcf67a8694f (Debug)

      Core was generated by `/test/GAL_MD120521-mariadb-10.6.1-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 0x14ad9d2ff700 (LWP 765795))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x00005570999901f1 in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
      #2  0x0000557099128d3e 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  0x000014adb058b859 in __GI_abort () at abort.c:79
      #6  0x000014adb058b729 in __assert_fail_base (fmt=0x14adb0721588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x557099d3cff0 "!wsrep_has_changes(thd) || (thd->lex->sql_command == SQLCOM_CREATE_TABLE && !thd->is_current_stmt_binlog_format_row())", file=0x557099d3bfe8 "/test/10.6_dbg/sql/wsrep_mysqld.cc", line=3552, function=<optimized out>) at assert.c:92
      #7  0x000014adb059cf36 in __GI___assert_fail (assertion=assertion@entry=0x557099d3cff0 "!wsrep_has_changes(thd) || (thd->lex->sql_command == SQLCOM_CREATE_TABLE && !thd->is_current_stmt_binlog_format_row())", file=file@entry=0x557099d3bfe8 "/test/10.6_dbg/sql/wsrep_mysqld.cc", line=line@entry=3552, function=function@entry=0x557099d3d068 "void wsrep_commit_empty(THD*, bool)") at assert.c:101
      #8  0x00005570994e5394 in wsrep_commit_empty (thd=thd@entry=0x14ad3c000db8, all=all@entry=true) at /test/10.6_dbg/sql/sql_class.h:2888
      #9  0x0000557099141c25 in ha_commit_trans (thd=thd@entry=0x14ad3c000db8, all=all@entry=true) at /test/10.6_dbg/sql/handler.cc:1611
      #10 0x0000557098fcec87 in trans_begin (thd=thd@entry=0x14ad3c000db8, flags=flags@entry=0) at /test/10.6_dbg/sql/transaction.cc:127
      #11 0x0000557098e64669 in mysql_execute_command (thd=thd@entry=0x14ad3c000db8) at /test/10.6_dbg/sql/sql_parse.cc:5663
      #12 0x0000557098e4ba81 in mysql_parse (thd=thd@entry=0x14ad3c000db8, rawbuf=rawbuf@entry=0x14ad3c013fe0 "ROLLBACK RELEASE", length=length@entry=16, parser_state=parser_state@entry=0x14ad9d2fe410) at /test/10.6_dbg/sql/sql_parse.cc:8018
      #13 0x0000557098e4b41a in wsrep_mysql_parse (thd=thd@entry=0x14ad3c000db8, rawbuf=0x14ad3c013fe0 "ROLLBACK RELEASE", length=16, parser_state=parser_state@entry=0x14ad9d2fe410) at /test/10.6_dbg/sql/sql_parse.cc:7832
      #14 0x0000557098e5a994 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14ad3c000db8, packet=packet@entry=0x14ad3c00b799 "ROLLBACK RELEASE", packet_length=packet_length@entry=16, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1333
      #15 0x0000557098e5dd79 in do_command (thd=0x14ad3c000db8, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1406
      #16 0x0000557098fb9de7 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55709cf9bcd8, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
      #17 0x0000557098fba3ef in handle_one_connection (arg=arg@entry=0x55709cf9bcd8) at /test/10.6_dbg/sql/sql_connect.cc:1312
      #18 0x000055709946fbc1 in pfs_spawn_thread (arg=0x55709d018178) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #19 0x000014adb0a99609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #20 0x000014adb0688293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.5.11 4d53a7585c532c2cfcea184259e3153f95b35683 (Debug)

      mysqld: /test/10.5_dbg/sql/wsrep_mysqld.cc:3216: 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())' failed.
      

      10.5.11 4d53a7585c532c2cfcea184259e3153f95b35683 (Debug)

      Core was generated by `/test/GAL_MD120521-mariadb-10.5.11-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 0x155244506700 (LWP 1058878))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x00005606e31a133c in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:424
      #2  0x00005606e28e7830 in handle_fatal_signal (sig=6) at /test/10.5_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  0x0000155278a7d859 in __GI_abort () at abort.c:79
      #6  0x0000155278a7d729 in __assert_fail_base (fmt=0x155278c13588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5606e3545328 "!wsrep_has_changes(thd) || (thd->lex->sql_command == SQLCOM_CREATE_TABLE && !thd->is_current_stmt_binlog_format_row())", file=0x5606e35446d8 "/test/10.5_dbg/sql/wsrep_mysqld.cc", line=3216, function=<optimized out>) at assert.c:92
      #7  0x0000155278a8ef36 in __GI___assert_fail (assertion=assertion@entry=0x5606e3545328 "!wsrep_has_changes(thd) || (thd->lex->sql_command == SQLCOM_CREATE_TABLE && !thd->is_current_stmt_binlog_format_row())", file=file@entry=0x5606e35446d8 "/test/10.5_dbg/sql/wsrep_mysqld.cc", line=line@entry=3216, function=function@entry=0x5606e35453a0 "void wsrep_commit_empty(THD*, bool)") at assert.c:101
      #8  0x00005606e2cad23a in wsrep_commit_empty (thd=thd@entry=0x1551d4000db8, all=all@entry=true) at /test/10.5_dbg/sql/sql_class.h:2664
      #9  0x00005606e2901031 in ha_commit_trans (thd=thd@entry=0x1551d4000db8, all=all@entry=true) at /test/10.5_dbg/sql/handler.cc:1609
      #10 0x00005606e27905fb in trans_begin (thd=thd@entry=0x1551d4000db8, flags=flags@entry=0) at /test/10.5_dbg/sql/transaction.cc:127
      #11 0x00005606e262412e in mysql_execute_command (thd=thd@entry=0x1551d4000db8) at /test/10.5_dbg/sql/sql_parse.cc:5732
      #12 0x00005606e260ac3e in mysql_parse (thd=thd@entry=0x1551d4000db8, rawbuf=rawbuf@entry=0x1551d4013cf0 "ROLLBACK RELEASE", length=length@entry=16, parser_state=parser_state@entry=0x1552445053d0, 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:8099
      #13 0x00005606e260a569 in wsrep_mysql_parse (thd=thd@entry=0x1551d4000db8, rawbuf=0x1551d4013cf0 "ROLLBACK RELEASE", length=16, parser_state=parser_state@entry=0x1552445053d0, 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:7902
      #14 0x00005606e2619f48 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1551d4000db8, packet=packet@entry=0x1551d400b4a9 "ROLLBACK RELEASE", packet_length=packet_length@entry=16, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_class.h:1271
      #15 0x00005606e261d7b6 in do_command (thd=0x1551d4000db8) at /test/10.5_dbg/sql/sql_parse.cc:1370
      #16 0x00005606e277b0e2 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5606e58f7588, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1410
      #17 0x00005606e277b7e9 in handle_one_connection (arg=arg@entry=0x5606e58f7588) at /test/10.5_dbg/sql/sql_connect.cc:1312
      #18 0x00005606e2c378b5 in pfs_spawn_thread (arg=0x5606e5949298) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
      #19 0x0000155278f8b609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #20 0x0000155278b7a293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.4.20 b2bb747f8cf56cf01dc571ffd8be195b95f0c0e8 (Debug)

      mysqld: /test/10.4_dbg/sql/wsrep_trans_observer.h:532: 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())' failed.
      

      10.4.20 b2bb747f8cf56cf01dc571ffd8be195b95f0c0e8 (Debug)

      Core was generated by `/test/GAL_MD120521-mariadb-10.4.20-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 0x14966009e700 (LWP 807993))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055b787bb44bd in my_write_core (sig=sig@entry=6) at /test/10.4_dbg/mysys/stacktrace.c:386
      #2  0x000055b7872bc360 in handle_fatal_signal (sig=6) at /test/10.4_dbg/sql/signal_handler.cc:356
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x0000149671eb1859 in __GI_abort () at abort.c:79
      #6  0x0000149671eb1729 in __assert_fail_base (fmt=0x149672047588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55b787c91360 "!wsrep_has_changes(thd) || (thd->lex->sql_command == SQLCOM_CREATE_TABLE && !thd->is_current_stmt_binlog_format_row())", file=0x55b787c75210 "/test/10.4_dbg/sql/wsrep_trans_observer.h", line=532, function=<optimized out>) at assert.c:92
      #7  0x0000149671ec2f36 in __GI___assert_fail (assertion=assertion@entry=0x55b787c91360 "!wsrep_has_changes(thd) || (thd->lex->sql_command == SQLCOM_CREATE_TABLE && !thd->is_current_stmt_binlog_format_row())", file=file@entry=0x55b787c75210 "/test/10.4_dbg/sql/wsrep_trans_observer.h", line=line@entry=532, function=function@entry=0x55b787c913d8 "void wsrep_commit_empty(THD*, bool)") at assert.c:101
      #8  0x000055b7872bf53e in wsrep_commit_empty (thd=thd@entry=0x1495e8000d90, all=all@entry=true) at /usr/include/c++/9/bits/stl_tree.h:1038
      #9  0x000055b7872d3de2 in ha_commit_trans (thd=thd@entry=0x1495e8000d90, all=all@entry=true) at /test/10.4_dbg/sql/handler.cc:1476
      #10 0x000055b787143594 in trans_begin (thd=thd@entry=0x1495e8000d90, flags=flags@entry=0) at /test/10.4_dbg/sql/transaction.cc:114
      #11 0x000055b786feaaad in mysql_execute_command (thd=thd@entry=0x1495e8000d90) at /test/10.4_dbg/sql/sql_parse.cc:5758
      #12 0x000055b786feeb9c in mysql_parse (thd=thd@entry=0x1495e8000d90, rawbuf=rawbuf@entry=0x1495e8013238 "ROLLBACK RELEASE", length=length@entry=16, parser_state=parser_state@entry=0x14966009d490, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_parse.cc:7995
      #13 0x000055b786fefc51 in wsrep_mysql_parse (thd=thd@entry=0x1495e8000d90, rawbuf=0x1495e8013238 "ROLLBACK RELEASE", length=16, parser_state=parser_state@entry=0x14966009d490, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_parse.cc:7799
      #14 0x000055b786ff15ba in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1495e8000d90, packet=packet@entry=0x1495e801b671 "ROLLBACK RELEASE", packet_length=packet_length@entry=16, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_class.h:1184
      #15 0x000055b786ff4e46 in do_command (thd=0x1495e8000d90) at /test/10.4_dbg/sql/sql_parse.cc:1373
      #16 0x000055b7871300bd in do_handle_one_connection (connect=connect@entry=0x55b78ad040e0) at /test/10.4_dbg/sql/sql_connect.cc:1412
      #17 0x000055b7871301dc in handle_one_connection (arg=0x55b78ad040e0) at /test/10.4_dbg/sql/sql_connect.cc:1316
      #18 0x00001496723bf609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #19 0x0000149671fae293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.4.20 (dbg), 10.5.11 (dbg), 10.6.1 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.39 (dbg), 10.3.30 (dbg)

      Attachments

        Activity

          People

            jplindst Jan Lindström (Inactive)
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.