[MDEV-5327] Row-based triggers: Assertion `thd->lex->query_tables != table_list' fails on replicating a multi-statement transaction Created: 2013-11-22  Updated: 2013-11-25  Resolved: 2013-11-25

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: 10.0.7

Type: Bug Priority: Critical
Reporter: Elena Stepanova Assignee: Oleksandr Byelkin
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-5095 Executing triggers on slave in row-ba... Closed

 Description   

/sql/log_event.cc:9539: virtual int Table_map_log_event::do_apply_event(const Relay_log_info*): Assertion `thd->lex->query_tables != table_list' failed.

#6  0x00007ff4f28bb621 in *__GI___assert_fail (assertion=0xe36458 "thd->lex->query_tables != table_list", file=<optimized out>, line=9539, function=0xe379a0 "virtual int Table_map_log_event::do_apply_event(const Relay_log_info*)") at assert.c:81
#7  0x00000000008cccfa in Table_map_log_event::do_apply_event (this=0x7ff4e540ef60, rli=0x7ff4edb7e7f0) at 5.5-sanja-MDEV-5095/sql/log_event.cc:9539
#8  0x00000000005ad382 in Log_event::apply_event (this=0x7ff4e540ef60, rli=0x7ff4edb7e7f0) at 5.5-sanja-MDEV-5095/sql/log_event.h:1256
#9  0x00000000005a5103 in apply_event_and_update_pos (ev=0x7ff4e540ef60, thd=0x7ff4e5416060, rli=0x7ff4edb7e7f0) at 5.5-sanja-MDEV-5095/sql/slave.cc:2631
#10 0x00000000005a5698 in exec_relay_log_event (thd=0x7ff4e5416060, rli=0x7ff4edb7e7f0) at 5.5-sanja-MDEV-5095/sql/slave.cc:2791
#11 0x00000000005a7ae6 in handle_slave_sql (arg=0x7ff4edb7d000) at 5.5-sanja-MDEV-5095/sql/slave.cc:3648
#12 0x0000000000973c35 in pfs_spawn_thread (arg=0x7ff4e495aac0) at 5.5-sanja-MDEV-5095/storage/perfschema/pfs.cc:1015
#13 0x00007ff4f3e1bb50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#14 0x00007ff4f296aa7d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

revision-id: sanja@askmonty.org-20131122113905-6k8j5ba9e3drn52t
revno: 3944
branch-nick: 5.5-sanja-MDEV-5095

Test case:

--source include/master-slave.inc
--source include/have_binlog_format_row.inc
--source include/have_innodb.inc
 
CREATE TABLE t1 (i INT) ENGINE=InnoDB;
CREATE TABLE t2 (i INT) ENGINE=InnoDB;
 
--sync_slave_with_master
 
SET GLOBAL slave_run_triggers_for_rbr=YES;
 
CREATE TRIGGER tr AFTER INSERT ON t1 FOR EACH ROW
  INSERT INTO t2 VALUES (new.i);
 
--connection master
 
BEGIN;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
COMMIT;
 
--sync_slave_with_master


Generated at Thu Feb 08 07:03:26 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.