~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl/t/rpl_insert.test

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--echo #
 
2
--echo # Bug#20821: INSERT DELAYED fails to write some rows to binlog
 
3
--echo #
 
4
 
 
5
--source include/master-slave.inc
 
6
--source include/not_embedded.inc
 
7
--source include/not_windows.inc
 
8
 
 
9
--disable_warnings
 
10
CREATE SCHEMA IF NOT EXISTS mysqlslap;
 
11
USE mysqlslap;
 
12
--enable_warnings
 
13
 
 
14
CREATE TABLE t1 (id INT, name VARCHAR(64));
 
15
 
 
16
sync_slave_with_master;
 
17
connection master;
 
18
 
 
19
let $query = "INSERT DELAYED INTO t1 VALUES (1, 'Dr. No'), (2, 'From Russia With Love'), (3, 'Goldfinger'), (4, 'Thunderball'), (5, 'You Only Live Twice')";
 
20
--exec $MYSQL_SLAP --silent --concurrency=5 --iterations=200 --query=$query --delimiter=";"
 
21
 
 
22
# Wait until all the 5000 inserts has been inserted into the table
 
23
let $wait_condition= SELECT COUNT(*) = 5000 FROM mysqlslap.t1;
 
24
source include/wait_condition.inc;
 
25
SELECT COUNT(*) FROM mysqlslap.t1;
 
26
 
 
27
connection slave;
 
28
# Wait until all the 5000 inserts has been inserted into the table
 
29
let $wait_condition= SELECT COUNT(*) = 5000 FROM mysqlslap.t1;
 
30
source include/wait_condition.inc;
 
31
SELECT COUNT(*) FROM mysqlslap.t1;
 
32
 
 
33
--echo #
 
34
--echo # Cleanup
 
35
--echo #
 
36
 
 
37
connection master;
 
38
USE test;
 
39
DROP SCHEMA mysqlslap;
 
40
sync_slave_with_master;