mirror of
https://github.com/MariaDB/server.git
synced 2025-01-23 07:14:17 +01:00
2f83aed670
git-svn-id: file:///svn/mysql/tests/mysql-test@55030 c7de825b-a66e-492c-adef-691d508d4ae1
53 lines
1 KiB
Text
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;
|
|
|