| 1 |
Check that server2 is not writing binlog |
| 2 |
CREATE TABLE t1 ( |
| 3 |
a bigint unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY, |
| 4 |
b int unsigned not null, |
| 5 |
c int unsigned |
| 6 |
) engine=ndbcluster; |
| 7 |
insert records into table on server1 |
| 8 |
insert records into table on server2 to get cached auto_increment values |
| 9 |
Check that auto_increment values are correctly generated |
| 10 |
select count(*) from t1; |
| 11 |
count(*) |
| 12 |
5000 |
| 13 |
select * from t1 order by a limit 2; |
| 14 |
a b c |
| 15 |
1 509 2500 |
| 16 |
2 510 7 |
| 17 |
truncate table t1; |
| 18 |
Check that server2 has properly reset the cached auto_increment values |
| 19 |
select count(*) from t1; |
| 20 |
count(*) |
| 21 |
0 |
| 22 |
insert into t1 values(NULL,1,1),(NULL,2,2); |
| 23 |
select * from t1 order by a; |
| 24 |
a b c |
| 25 |
1 1 1 |
| 26 |
2 2 2 |
| 27 |
drop table t1; |