Details
Description
CREATE SEQUENCE SEQ NOCACHE ENGINE=InnoDB; |
SET SESSION wsrep_trx_fragment_size=1; |
SET collation_connection=utf16_thai_520_w2; |
SET autocommit=0; |
CREATE TABLE t1 (a BLOB UNIQUE); |
INSERT INTO t1 VALUES ('AAF'); |
SELECT SETVAL (SEQ, 100); |
ALTER TABLE t1 ADD CONSTRAINT constraint_1 UNIQUE (a); |
INSERT INTO t1 VALUES(); |
ALTER TABLE t1 ADD KEY(b (50)); |
Leads to:
10.4.26 96f4b4a55b449a29af7e4b70bebf0ff238ae7f80 (Optimized) |
mysqld: /test/10.4_opt/sql/wsrep_binlog.cc:160: int wsrep_write_cache_inc(THD*, IO_CACHE*, size_t*): Assertion `total_length + thd->wsrep_sr().log_position() == saved_pos' failed.
|
10.4.26 96f4b4a55b449a29af7e4b70bebf0ff238ae7f80 (Optimized) |
Core was generated by `/test/GAL_MD070622-mariadb-10.4.26-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 0x147f15af1700 (LWP 649112))]
|
(gdb) bt
|
#0 __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
|
#1 0x000055deb176ae3f in my_write_core (sig=sig@entry=6) at /test/10.4_opt/mysys/stacktrace.c:386
|
#2 0x000055deb12679b8 in handle_fatal_signal (sig=6) at /test/10.4_opt/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 0x0000147f4db48859 in __GI_abort () at abort.c:79
|
#6 0x0000147f4db48729 in __assert_fail_base (fmt=0x147f4dcde588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55deb1a50ba8 "total_length + thd->wsrep_sr().log_position() == saved_pos", file=0x55deb1a50b80 "/test/10.4_opt/sql/wsrep_binlog.cc", line=160, function=<optimized out>) at assert.c:92
|
#7 0x0000147f4db59f36 in __GI___assert_fail (assertion=assertion@entry=0x55deb1a50ba8 "total_length + thd->wsrep_sr().log_position() == saved_pos", file=file@entry=0x55deb1a50b80 "/test/10.4_opt/sql/wsrep_binlog.cc", line=line@entry=160, function=function@entry=0x55deb1a50b48 "int wsrep_write_cache_inc(THD*, IO_CACHE*, size_t*)") at assert.c:101
|
#8 0x000055deb14cc907 in wsrep_write_cache_inc (len=<optimized out>, cache=0x147ed006de38, thd=0x147ed0000c48) at /test/10.4_opt/sql/wsrep_binlog.cc:138
|
#9 wsrep_write_cache (thd=0x147ed0000c48, cache=cache@entry=0x147ed006de38, len=len@entry=0x147f15aedff8) at /test/10.4_opt/sql/wsrep_binlog.cc:183
|
#10 0x000055deb14b58fc in Wsrep_client_service::prepare_data_for_replication (this=0x147ed0006a38) at /test/10.4_opt/sql/sql_error.h:1046
|
#11 0x000055deb18cf604 in wsrep::transaction::certify_commit (this=0x147ed0006ab8, lock=@0x147f15aee270: {_M_device = 0x147ed0006a18, _M_owns = false}) at /test/10.4_opt/wsrep-lib/src/transaction.cpp:1755
|
#12 0x000055deb18d1a66 in wsrep::transaction::before_prepare (this=0x147ed0006ab8, lock=@0x147f15aee270: {_M_device = 0x147ed0006a18, _M_owns = false}) at /test/10.4_opt/wsrep-lib/src/transaction.cpp:342
|
#13 0x000055deb18d1def in wsrep::transaction::before_commit (this=this@entry=0x147ed0006ab8) at /test/10.4_opt/wsrep-lib/src/transaction.cpp:458
|
#14 0x000055deb126bd16 in wsrep::client_state::before_commit (this=0x147ed0006a50) at /test/10.4_opt/wsrep-lib/include/wsrep/client_state.hpp:503
|
#15 wsrep_before_commit (all=true, thd=0x147ed0000c48) at /test/10.4_opt/sql/wsrep_trans_observer.h:277
|
#16 ha_commit_trans (thd=thd@entry=0x147ed0000c48, all=all@entry=true) at /test/10.4_opt/sql/handler.cc:1609
|
#17 0x000055deb11790cd in trans_commit_implicit (thd=thd@entry=0x147ed0000c48) at /test/10.4_opt/sql/transaction.cc:302
|
#18 0x000055deb1074718 in mysql_execute_command (thd=0x147ed0000c48) at /test/10.4_opt/sql/sql_parse.cc:3771
|
#19 0x000055deb107ba92 in mysql_parse (thd=thd@entry=0x147ed0000c48, rawbuf=rawbuf@entry=0x147ed000fe60 "ALTER TABLE t1 ADD KEY(b(50))", length=length@entry=29, parser_state=parser_state@entry=0x147f15af0530, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_opt/sql/sql_parse.cc:7995
|
#20 0x000055deb107c299 in wsrep_mysql_parse (thd=0x147ed0000c48, rawbuf=0x147ed000fe60 "ALTER TABLE t1 ADD KEY(b(50))", length=29, parser_state=0x147f15af0530, is_com_multi=false, is_next_command=false) at /test/10.4_opt/sql/sql_parse.cc:7799
|
#21 0x000055deb107eee5 in dispatch_command (command=COM_QUERY, thd=0x147ed0000c48, packet=<optimized out>, packet_length=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /test/10.4_opt/sql/sql_parse.cc:1943
|
#22 0x000055deb108002f in do_command (thd=0x147ed0000c48) at /test/10.4_opt/sql/sql_parse.cc:1378
|
#23 0x000055deb116b9de in do_handle_one_connection (connect=0x55deb474bf88) at /test/10.4_opt/sql/sql_connect.cc:1420
|
#24 0x000055deb116ba6d in handle_one_connection (arg=<optimized out>) at /test/10.4_opt/sql/sql_connect.cc:1316
|
#25 0x0000147f4e057609 in start_thread (arg=<optimized out>) at pthread_create.c:477
|
#26 0x0000147f4dc45293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
|
Attachments
Issue Links
- relates to
-
MDEV-34124 Sequence Fails with Galera Version 26.4.16 and later (MariaDB Server 10.6.17) in the Presence of Enabled Streaming Replication
-
- Closed
-
I see different assertion using Debug builds:
jan@jan-HP-ZBook-15u-G5:~/mysql/10.4/mysql-test$ ./mtr galera.jan --mysqld=--wsrep-debug=1
Logging: ./mtr galera.jan --mysqld=--wsrep-debug=1
VS config:
vardir: /home/jan/mysql/10.4/mysql-test/var
Checking leftover processes...
Removing old var directory...
Creating var directory '/home/jan/mysql/10.4/mysql-test/var'...
Checking supported features...
MariaDB Version 10.4.26-MariaDB-debug
- SSL connections supported
- binaries are debug compiled
- binaries built with wsrep patch
Collecting tests...
Installing system database...
==============================================================================
TEST RESULT TIME (ms) or COMMENT
--------------------------------------------------------------------------
worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
connection node_2;
connection node_1;
CREATE SEQUENCE SEQ NOCACHE ENGINE=InnoDB;
SET SESSION wsrep_trx_fragment_size=1;
SET collation_connection=utf16_thai_520_w2;
SET autocommit=0;
CREATE TABLE t1 (a BLOB UNIQUE);
INSERT INTO t1 VALUES ('AAF');
SELECT SETVAL (SEQ, 100);
SETVAL (SEQ, 100)
100
ALTER TABLE t1 ADD CONSTRAINT constraint_1 UNIQUE (a);
Warnings:
Note 1831 Duplicate index `constraint_1`. This is deprecated and will be disallowed in a future release
INSERT INTO t1 VALUES();
ALTER TABLE t1 ADD KEY(b (50));
ERROR 42000: Key column 'b' doesn't exist in table
galera.jan 'innodb' [ fail ] Found warnings/errors in server log file!
Test ended at 2022-08-05 14:08:41
line
2022-08-05 14:08:39 17 [ERROR] Error in Log_event::read_log_event(): 'Sanity check failed', data_len: 1, event_type: -1
2022-08-05 14:08:39 17 [ERROR] WSREP: applier could not read binlog event, seqno: 6, len: 41
2022-08-05 14:08:39 2 [ERROR] WSREP: Failed to apply write set: gtid: f1d53a46-14ae-11ed-b74f-93fe6583ab39:6 server_id: f1d46cb6-14ae-11ed-82fe-b2bd1b74d82d client_id: 17 trx_id: 51 flags: 18 (commit | pa_unsafe)
mysqld: /home/jan/mysql/10.4/wsrep-lib/src/transaction.cpp:212: int wsrep::transaction::prepare_for_ordering(const wsrep::ws_handle&, const wsrep::ws_meta&, bool): Assertion `active()' failed.
Attempting backtrace. You can use the following information to find out
^ Found warnings in /home/jan/mysql/10.4/mysql-test/var/log/mysqld.2.err
ok