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

Assertion `!wsrep_has_changes(thd) || (thd->lex->sql_command == SQLCOM_CREATE_TABLE && !thd->is_current_stmt_binlog_format_row())' failed.

    XMLWordPrintable

    Details

      Description

      CREATE TABLE t3 (c1 INTEGER NOT NULL PRIMARY KEY, c2 FLOAT(3,2));
      SET GLOBAL wsrep_provider_options = 'repl.max_ws_size=512';
      SET @@autocommit=0;
      INSERT INTO t3 VALUES (1000,0.00),(1001,0.25),(1002,0.50),(1003,0.75),(1008,1.00),(1009,1.25),(1010,1.50),(1011,1.75);
      CREATE TABLE t1 ( pk int primary key) ENGINE=INNODB; 
      

      Leads to:

      10.7.0 76149650764ea9660ae05d4987ea6c91534851ab (Optimized)

      mysqld: /test/10.7_dbg/sql/wsrep_mysqld.cc:3614: 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.7.0 76149650764ea9660ae05d4987ea6c91534851ab (Optimized)

      Core was generated by `/test/GAL_MD100921-mariadb-10.7.0-linux-x86_64-opt/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 0x150dc4085700 (LWP 1359078))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x0000557d742e75f6 in my_write_core (sig=sig@entry=6) at /test/10.7_dbg/mysys/stacktrace.c:424
      #2  0x0000557d73adf2d9 in handle_fatal_signal (sig=6) at /test/10.7_dbg/sql/signal_handler.cc:345
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x0000150dd4670859 in __GI_abort () at abort.c:79
      #6  0x0000150dd4670729 in __assert_fail_base (fmt=0x150dd4806588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x557d746b6880 "!wsrep_has_changes(thd) || (thd->lex->sql_command == SQLCOM_CREATE_TABLE && !thd->is_current_stmt_binlog_format_row())", file=0x557d746b57e8 "/test/10.7_dbg/sql/wsrep_mysqld.cc", line=3614, function=<optimized out>) at assert.c:92
      #7  0x0000150dd4681f36 in __GI___assert_fail (assertion=assertion@entry=0x557d746b6880 "!wsrep_has_changes(thd) || (thd->lex->sql_command == SQLCOM_CREATE_TABLE && !thd->is_current_stmt_binlog_format_row())", file=file@entry=0x557d746b57e8 "/test/10.7_dbg/sql/wsrep_mysqld.cc", line=line@entry=3614, function=function@entry=0x557d746b68f8 "void wsrep_commit_empty(THD*, bool)") at assert.c:101
      #8  0x0000557d73e3ec47 in wsrep_commit_empty (thd=thd@entry=0x150d5c000db8, all=all@entry=true) at /test/10.7_dbg/sql/sql_class.h:2922
      #9  0x0000557d73af8f04 in ha_commit_trans (thd=thd@entry=0x150d5c000db8, all=all@entry=true) at /test/10.7_dbg/sql/handler.cc:1682
      #10 0x0000557d73972ff4 in trans_commit_implicit (thd=thd@entry=0x150d5c000db8) at /test/10.7_dbg/sql/transaction.cc:329
      #11 0x0000557d737ecde6 in mysql_execute_command (thd=thd@entry=0x150d5c000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.7_dbg/sql/sql_parse.cc:6097
      #12 0x0000557d737d2c5f in mysql_parse (thd=thd@entry=0x150d5c000db8, rawbuf=rawbuf@entry=0x150d5c013c80 "CREATE TABLE t1 ( pk int primary key) ENGINE=INNODB", length=length@entry=51, parser_state=parser_state@entry=0x150dc4084400) at /test/10.7_dbg/sql/sql_parse.cc:8036
      #13 0x0000557d737d25e5 in wsrep_mysql_parse (thd=thd@entry=0x150d5c000db8, rawbuf=0x150d5c013c80 "CREATE TABLE t1 ( pk int primary key) ENGINE=INNODB", length=51, parser_state=parser_state@entry=0x150dc4084400) at /test/10.7_dbg/sql/sql_parse.cc:7849
      #14 0x0000557d737e1943 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x150d5c000db8, packet=packet@entry=0x150d5c00b739 "CREATE TABLE t1 ( pk int primary key) ENGINE=INNODB", packet_length=packet_length@entry=51, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_class.h:1358
      #15 0x0000557d737e4d3a in do_command (thd=0x150d5c000db8, blocking=blocking@entry=true) at /test/10.7_dbg/sql/sql_parse.cc:1404
      #16 0x0000557d7395c8a7 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x557d7606a6d8, put_in_cache=put_in_cache@entry=true) at /test/10.7_dbg/sql/sql_connect.cc:1418
      #17 0x0000557d7395ceaf in handle_one_connection (arg=arg@entry=0x557d7606a6d8) at /test/10.7_dbg/sql/sql_connect.cc:1312
      #18 0x0000557d73dc8d13 in pfs_spawn_thread (arg=0x557d760c2118) at /test/10.7_dbg/storage/perfschema/pfs.cc:2201
      #19 0x0000150dd4b7e609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #20 0x0000150dd476d293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.6.5 d089b51d66c5d213c5522972a5ba2f540b344f73 (Debug)

      mysqld: /test/10.6_dbg/sql/wsrep_mysqld.cc:3596: 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.5 d089b51d66c5d213c5522972a5ba2f540b344f73 (Debug)

      Core was generated by `/test/GAL_MD100921-mariadb-10.6.5-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 0x1516e808f700 (LWP 919704))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055d8aa9d7625 in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
      #2  0x000055d8aa1838d1 in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:345
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x00001516ebb55859 in __GI_abort () at abort.c:79
      #6  0x00001516ebb55729 in __assert_fail_base (fmt=0x1516ebceb588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55d8aada56b8 "!wsrep_has_changes(thd) || (thd->lex->sql_command == SQLCOM_CREATE_TABLE && !thd->is_current_stmt_binlog_format_row())", file=0x55d8aada46e8 "/test/10.6_dbg/sql/wsrep_mysqld.cc", line=3596, function=<optimized out>) at assert.c:92
      #7  0x00001516ebb66f36 in __GI___assert_fail (assertion=assertion@entry=0x55d8aada56b8 "!wsrep_has_changes(thd) || (thd->lex->sql_command == SQLCOM_CREATE_TABLE && !thd->is_current_stmt_binlog_format_row())", file=file@entry=0x55d8aada46e8 "/test/10.6_dbg/sql/wsrep_mysqld.cc", line=line@entry=3596, function=function@entry=0x55d8aada5730 "void wsrep_commit_empty(THD*, bool)") at assert.c:101
      #8  0x000055d8aa52a6df in wsrep_commit_empty (thd=thd@entry=0x15167c000db8, all=all@entry=true) at /test/10.6_dbg/sql/sql_class.h:2922
      #9  0x000055d8aa19d44a in ha_commit_trans (thd=thd@entry=0x15167c000db8, all=all@entry=true) at /test/10.6_dbg/sql/handler.cc:1682
      #10 0x000055d8aa0189cc in trans_commit_implicit (thd=thd@entry=0x15167c000db8) at /test/10.6_dbg/sql/transaction.cc:329
      #11 0x000055d8a9ea4568 in mysql_execute_command (thd=thd@entry=0x15167c000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.6_dbg/sql/sql_parse.cc:6097
      #12 0x000055d8a9e8a3c3 in mysql_parse (thd=thd@entry=0x15167c000db8, rawbuf=rawbuf@entry=0x15167c013fa0 "CREATE TABLE t1 ( pk int primary key) ENGINE=INNODB", length=length@entry=51, parser_state=parser_state@entry=0x1516e808e400) at /test/10.6_dbg/sql/sql_parse.cc:8030
      #13 0x000055d8a9e89d49 in wsrep_mysql_parse (thd=thd@entry=0x15167c000db8, rawbuf=0x15167c013fa0 "CREATE TABLE t1 ( pk int primary key) ENGINE=INNODB", length=51, parser_state=parser_state@entry=0x1516e808e400) at /test/10.6_dbg/sql/sql_parse.cc:7844
      #14 0x000055d8a9e990c5 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x15167c000db8, packet=packet@entry=0x15167c00b759 "CREATE TABLE t1 ( pk int primary key) ENGINE=INNODB", packet_length=packet_length@entry=51, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1358
      #15 0x000055d8a9e9c4bc in do_command (thd=0x15167c000db8, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1404
      #16 0x000055d8aa0024a1 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55d8ac6ec428, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1418
      #17 0x000055d8aa002aa9 in handle_one_connection (arg=arg@entry=0x55d8ac6ec428) at /test/10.6_dbg/sql/sql_connect.cc:1312
      #18 0x000055d8aa4b4ce5 in pfs_spawn_thread (arg=0x55d8ac75dab8) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #19 0x00001516ec063609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #20 0x00001516ebc52293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.4.22 (dbg), 10.5.13 (dbg), 10.6.5 (dbg), 10.7.0 (opt), 10.7.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.41 (dbg), 10.2.41 (opt), 10.3.32 (dbg), 10.3.32 (opt), 10.4.22 (opt), 10.5.13 (opt), 10.6.5 (opt)

        Attachments

          Activity

            People

            Assignee:
            jplindst Jan Lindström
            Reporter:
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration