mariadb/mysql-test/suite/rpl/t/last_insert_id.test
Michael Widenius 112411b056 Fixed MySQL bug #69861 LAST_INSERT_ID is replicated incorrectly if replication filters are used
mysql-test/suite/rpl/r/last_insert_id.result:
  Test case for last_insert_id
mysql-test/suite/rpl/t/last_insert_id.cnf:
  Test case for last_insert_id
mysql-test/suite/rpl/t/last_insert_id.test:
  Test case for last_insert_id
sql/log_event.cc:
  Added DBUG_PRINT
  Set thd->first_successful_insert_id_in_prev_stmt_for_binlog when setting thd->first_successful_insert_id_in_prev_stmt.
  This is required to get last_insert_id() replicated.
  This is analog to how read_first_successful_insert_id_in_prev_stmt() works.
sql/rpl_utility.cc:
  Added DBUG_PRINT
2013-08-27 19:18:04 +03:00

30 lines
573 B
Text

--source include/have_innodb.inc
--source include/have_binlog_format_mixed_or_statement.inc
--let $rpl_topology=1->2->3
--source include/rpl_init.inc
connection server_1;
create table t1 (id int not null auto_increment primary key, i int) engine=InnoDB;
insert into t1 (i) values (-1);
insert into t1 (i) values (LAST_INSERT_ID());
select * from t1;
save_master_pos;
connection server_2;
sync_with_master;
select * from t1;
save_master_pos;
connection server_3;
sync_with_master;
select * from t1;
connection server_1;
drop table t1;
--source include/rpl_end.inc