34 lines
830 B
Plaintext
34 lines
830 B
Plaintext
# Test of auto-increment.
|
|
#
|
|
# BUG#11754117-45670
|
|
# Multipart primary key with the autoincrement part not first in it
|
|
# is replication unsafe.
|
|
#
|
|
|
|
source include/master-slave.inc;
|
|
source include/have_binlog_format_mixed.inc;
|
|
|
|
|
|
call mtr.add_suppression('Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.');
|
|
|
|
--connection master
|
|
--error ER_WRONG_AUTO_KEY
|
|
create table ti (b int auto_increment, a int, primary key (a,b)) engine= innodb;
|
|
create table ti (b int auto_increment, a int, primary key (b,a)) engine= innodb;
|
|
|
|
set @@binlog_format=statement;
|
|
--echo *** no warning when autoincrement is the first in PK
|
|
insert into ti set b=null, a=1;
|
|
show warnings;
|
|
|
|
|
|
# cleanup
|
|
|
|
--connection master
|
|
|
|
drop table ti;
|
|
|
|
--source include/sync_slave_sql_with_master.inc
|
|
|
|
--source include/rpl_end.inc
|