[MDEV-27511] Assertion `rgi->gtid_ev_flags_extra & Gtid_log_event::FL_COMMIT_ALTER_E1' failed in write_bin_log_start_alter Created: 2022-01-14  Updated: 2022-03-08  Resolved: 2022-03-08

Status: Closed
Project: MariaDB Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Alice Sherepa Assignee: Alice Sherepa
Resolution: Cannot Reproduce Votes: 0
Labels: None


 Description   

--source include/have_log_bin.inc
--source include/have_innodb.inc
--source include/master-slave.inc
 
--connection master
 
CREATE  TABLE t1 (a1 int, d1 int DEFAULT 0);
INSERT INTO t1 VALUES  (1,1) ;
set binlog_alter_two_phase=YES;
ALTER  TABLE t1  WAIT 9 RENAME COLUMN a1 TO a2;
set  binlog_alter_two_phase=NO;
ALTER  TABLE t1  ALTER COLUMN d1 DROP DEFAULT;
--sync_slave_with_master
 
# Cleanup
--connection master
drop table t1;
--sync_slave_with_master
--source include/rpl_end.inc

/10.8/sql/log.cc:688: bool write_bin_log_start_alter(THD*, bool&, uint64, bool): Assertion `rgi->gtid_ev_flags_extra & Gtid_log_event::FL_COMMIT_ALTER_E1' failed.
220114 15:08:50 [ERROR] mysqld got signal 6 ;
 
sql/log.cc:691(write_bin_log_start_alter(THD*, bool&, unsigned long long, bool))[0x55f559c4a460]
sql/sql_table.cc:7524(mysql_inplace_alter_table(THD*, TABLE_LIST*, TABLE*, TABLE*, Alter_inplace_info*, MDL_request*, st_ddl_log_state*, TRIGGER_RENAME_PARAM*, Alter_table_ctx*, bool&, unsigned long long&, bool))[0x55f559333121]
sql/sql_table.cc:10617(mysql_alter_table(THD*, st_mysql_const_lex_string const*, st_mysql_const_lex_string const*, HA_CREATE_INFO*, TABLE_LIST*, Alter_info*, unsigned int, st_order*, bool, bool))[0x55f559349f41]
sql/sql_alter.cc:543(Sql_cmd_alter_table::execute(THD*))[0x55f55950977b]
sql/sql_parse.cc:5989(mysql_execute_command(THD*, bool))[0x55f559067161]
sql/sql_parse.cc:8028(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x55f559074987]
sql/log_event_server.cc:2148(Query_log_event::do_apply_event(rpl_group_info*, char const*, unsigned int))[0x55f559cdf138]
sql/log_event_server.cc:1613(Query_log_event::do_apply_event(rpl_group_info*))[0x55f559cda9eb]
sql/log_event.h:1518(Log_event::apply_event(rpl_group_info*))[0x55f558dd85b7]
sql/slave.cc:3881(apply_event_and_update_pos_apply(Log_event*, THD*, rpl_group_info*, int))[0x55f558db9954]
sql/slave.cc:4047(apply_event_and_update_pos(Log_event*, THD*, rpl_group_info*))[0x55f558dba56c]
sql/slave.cc:4417(exec_relay_log_event(THD*, Relay_log_info*, rpl_group_info*))[0x55f558dbc276]
sql/slave.cc:5594(handle_slave_sql)[0x55f558dc3e48]
perfschema/pfs.cc:2203(pfs_spawn_thread)[0x55f55a19b701]
nptl/pthread_create.c:478(start_thread)[0x7f29e3b06609]
??:0(clone)[0x7f29e36d9293]
 
Query (0x612000083f53): ALTER  TABLE t1  ALTER COLUMN d1 DROP DEFAULT



 Comments   
Comment by Elena Stepanova [ 2022-02-25 ]

The test case doesn't look to apply directly to current 10.8, it says that binlog_alter_two_phase variable doesn't exist.

If it's still relevant, please set the versions etc.

Comment by Alice Sherepa [ 2022-03-08 ]

it was fixed in preview-10.8-MDEV-11675-rpl-lag-free-alter branch (3aeac791220) and current 10.8 contains this test - rpl_start_alter_para_to_seq.test (with adjusted binlog_alter_two_phase = ON/OFF instead of yes/no)

Generated at Thu Feb 08 09:53:28 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.