diff options
author | He Zhenxing <zhenxing.he@sun.com> | 2009-01-14 16:27:32 +0800 |
---|---|---|
committer | He Zhenxing <zhenxing.he@sun.com> | 2009-01-14 16:27:32 +0800 |
commit | f2c122bf9080d9f0e2e61890edea697e76be5bf6 (patch) | |
tree | 4a695b547a5033b6c5fe7913b8905ddfd8099fc8 /mysql-test/suite/rpl/r/rpl_auto_increment.result | |
parent | a58bc1bef3c76ebe716f652759771d9ddce2d484 (diff) | |
download | mariadb-git-f2c122bf9080d9f0e2e61890edea697e76be5bf6.tar.gz |
BUG#41986 Replication slave does not pick up proper AUTO_INCREMENT value for Innodb tables
The next number (AUTO_INCREMENT) field of the table for write
rows events are not initialized, and cause some engines (innodb)
not correctly update the tables's auto_increment value.
This patch fixed this problem by honor next number fields if present.
mysql-test/extra/rpl_tests/rpl_auto_increment.test:
Add test code for BUG#41986
mysql-test/suite/rpl/r/rpl_auto_increment.result:
update test result file for BUG#41986
sql/log_event.cc:
set next_number_field before writing rows, and reset next_number_field after finished writing rows
Diffstat (limited to 'mysql-test/suite/rpl/r/rpl_auto_increment.result')
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_auto_increment.result | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_auto_increment.result b/mysql-test/suite/rpl/r/rpl_auto_increment.result index 083f3a4e901..2a4c3a09361 100644 --- a/mysql-test/suite/rpl/r/rpl_auto_increment.result +++ b/mysql-test/suite/rpl/r/rpl_auto_increment.result @@ -227,3 +227,20 @@ select * from t3 order by a; a 127 drop table t1,t2,t3; +set auto_increment_increment=1; +set auto_increment_offset=1; +CREATE TABLE t1 (id MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=innodb; +INSERT INTO t1 VALUES (NULL), (NULL), (NULL); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` mediumint(9) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 +drop table t1; |