mariadb/mysql-test/suite/rpl/r/last_insert_id.result
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

18 lines
332 B
Text

include/rpl_init.inc [topology=1->2->3]
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;
id i
1 -1
2 1
select * from t1;
id i
1 -1
2 1
select * from t1;
id i
1 -1
2 1
drop table t1;
include/rpl_end.inc