mariadb/mysql-test/suite/tokudb/t/fast_update_binlog_statement.test
Rich Prohaska 2f83aed670 refs #6440 move fast update tests
git-svn-id: file:///svn/mysql/tests/mysql-test@55030 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-03 14:23:31 +00:00

53 lines
1 KiB
Text

source include/master-slave.inc;
source include/have_binlog_format_statement.inc;
source include/have_tokudb.inc;
set default_storage_engine='tokudb';
create table tt (id int primary key, x int);
set session tokudb_disable_slow_upsert=1;
connection master;
show variables like 'binlog_format';
show variables like 'server_id';
connection slave;
show variables like 'binlog_format';
show variables like 'server_id';
connection master;
let $n=100;
# insert a bunch of new rows
let $i=0;
while ($i < $n) {
eval insert into tt values ($i,0) on duplicate key update x=x+1;
inc $i;
}
# upsert a bunch of rows
let $i=0;
while ($i < $n) {
eval insert into tt values ($i,0) on duplicate key update x=x+1;
inc $i;
}
# update a bunch of rows
let $i=0;
while ($i < $n) {
eval update noar tt set x=x+1 where id=$i;
inc $i;
}
select * from tt where x != 2;
sync_slave_with_master;
let $diff_tables= master:test.tt, slave:test.tt;
source include/diff_tables.inc;
connection master;
drop table tt;
source include/rpl_end.inc;