[MDEV-29775] Assertion `0' failed in void Protocol::end_statement() when adding data to the MyISAM table after setting wsrep_mode=replicate_myisam Created: 2022-10-12  Updated: 2023-11-28

Status: Stalled
Project: MariaDB Server
Component/s: Galera
Affects Version/s: 10.6, 10.7, 10.8, 10.9, 10.10, 10.11
Fix Version/s: 10.4, 10.5, 10.6

Type: Bug Priority: Critical
Reporter: Ramesh Sivaraman Assignee: Julius Goryavsky
Resolution: Unresolved Votes: 0
Labels: debug, not-10.3


 Description   

SET GLOBAL wsrep_mode=replicate_myisam;
SET GLOBAL wsrep_forced_binlog_format=STATEMENT;
CREATE TABLE t (f0 CHAR(0)) ENGINE=MyISAM;
INSERT INTO t VALUES();

Leads to:

10.11.0 6ebdd3013a18b01dbecec76b870810329eb76586

mysqld: /test/10.11/sql/protocol.cc:617: void Protocol::end_statement(): Assertion `0' failed.

10.11.0 6ebdd3013a18b01dbecec76b870810329eb76586

Core was generated by `/test/mariadb-10.11.0-linux-x86_64/bin/mysqld --defaults-file=/test/mariadb-10.'.
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 0x14baa0102700 (LWP 62586))]
(gdb) bt
#0  __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
#1  0x0000562c87cec983 in my_write_core (sig=6) at /test/10.11/mysys/stacktrace.c:424
#2  0x0000562c8743eb3b in handle_fatal_signal (sig=6) at /test/10.11/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  0x000014bab1161859 in __GI_abort () at abort.c:79
#6  0x000014bab1161729 in __assert_fail_base (fmt=0x14bab12f7588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x562c87dfa2a0 "0", file=0x562c87df9e68 "/test/10.11/sql/protocol.cc", line=617, function=<optimized out>) at assert.c:92
#7  0x000014bab1172fd6 in __GI___assert_fail (assertion=0x562c87dfa2a0 "0", file=0x562c87df9e68 "/test/10.11/sql/protocol.cc", line=617, function=0x562c87dfa218 "void Protocol::end_statement()") at assert.c:101
#8  0x0000562c86f2843a in Protocol::end_statement (this=0x14ba240013c0) at /test/10.11/sql/protocol.cc:617
#9  0x0000562c8706a3d0 in dispatch_command (command=COM_QUERY, thd=0x14ba24000db8, packet=0x14ba2400b9f9 "INSERT INTO t VALUES()", packet_length=22, blocking=true) at /test/10.11/sql/sql_parse.cc:2401
#10 0x0000562c870672ca in do_command (thd=0x14ba24000db8, blocking=true) at /test/10.11/sql/sql_parse.cc:1407
#11 0x0000562c87248299 in do_handle_one_connection (connect=0x562c8b238c98, put_in_cache=true) at /test/10.11/sql/sql_connect.cc:1416
#12 0x0000562c87247ff5 in handle_one_connection (arg=0x562c8b4d40a8) at /test/10.11/sql/sql_connect.cc:1318
#13 0x0000562c8776039f in pfs_spawn_thread (arg=0x562c8b4d4188) at /test/10.11/storage/perfschema/pfs.cc:2201
#14 0x000014bab168d609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#15 0x000014bab125e133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Bug confirmed present in:
MariaDB: 10.6.11 (dbg), 10.7.7 (dbg), 10.8.6 (dbg), 10.9.4 (dbg), 10.10.2 (dbg), 10.11.0 (dbg)

Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.3.37 (dbg), 10.3.37 (opt), 10.4.27 (dbg), 10.4.27 (opt), 10.5.18 (dbg), 10.5.18 (opt), 10.6.11 (opt), 10.7.7 (opt), 10.8.6 (opt), 10.9.4 (opt), 10.10.2 (opt), 10.11.0 (opt)



 Comments   
Comment by Jan Lindström [ 2023-04-13 ]

10.4 is also effected with slightly different test case:

SET GLOBAL wsrep_replicate_myisam=ON;
SET GLOBAL wsrep_forced_binlog_format=STATEMENT;
CREATE TABLE t (f0 CHAR(0)) ENGINE=MyISAM;
INSERT INTO t VALUES();

Comment by Jan Lindström [ 2023-04-14 ]
Generated at Thu Feb 08 10:11:12 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.