~stewart/drizzle/embedded-innodb-create-select-transaction-arrgh

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
stop slave;
 
2
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 
3
reset master;
 
4
reset slave;
 
5
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 
6
start slave;
 
7
set @old_global_binlog_format = @@global.binlog_format;
 
8
set @@global.binlog_format = statement;
 
9
CREATE SCHEMA IF NOT EXISTS mysqlslap;
 
10
USE mysqlslap;
 
11
select @@global.binlog_format;
 
12
@@global.binlog_format
 
13
STATEMENT
 
14
CREATE TABLE t1 (id INT primary key auto_increment, name VARCHAR(64));
 
15
FLUSH TABLE t1;
 
16
SELECT COUNT(*) FROM t1;
 
17
COUNT(*)
 
18
5000
 
19
use mysqlslap;
 
20
SELECT COUNT(*) FROM t1;
 
21
COUNT(*)
 
22
5000
 
23
truncate table t1;
 
24
insert delayed into t1 values(10, "my name");
 
25
insert delayed into t1 values(10, "is Bond"), (20, "James Bond");
 
26
ERROR 23000: Duplicate entry '10' for key 'PRIMARY'
 
27
flush table t1;
 
28
select * from t1;
 
29
id      name
 
30
10      my name
 
31
select * from t1;
 
32
id      name
 
33
10      my name
 
34
delete from t1 where id!=10;
 
35
insert delayed into t1 values(20, "is Bond"), (10, "James Bond");
 
36
ERROR 23000: Duplicate entry '10' for key 'PRIMARY'
 
37
flush table t1;
 
38
select * from t1;
 
39
id      name
 
40
10      my name
 
41
20      is Bond
 
42
select * from t1;
 
43
id      name
 
44
10      my name
 
45
20      is Bond
 
46
USE test;
 
47
DROP SCHEMA mysqlslap;
 
48
use test;
 
49
FLUSH LOGS;
 
50
FLUSH LOGS;
 
51
CREATE TABLE t1(a int, UNIQUE(a));
 
52
INSERT DELAYED IGNORE INTO t1 VALUES(1);
 
53
INSERT DELAYED IGNORE INTO t1 VALUES(1);
 
54
flush table t1;
 
55
show binlog events in 'master-bin.000002' LIMIT 2,2;
 
56
Log_name        Pos     Event_type      Server_id       End_log_pos     Info
 
57
x       x       x       x       x       use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
 
58
x       x       x       x       x       use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
 
59
select * from t1;
 
60
a
 
61
1
 
62
On slave
 
63
show binlog events in 'slave-bin.000002' LIMIT 2,2;
 
64
Log_name        Pos     Event_type      Server_id       End_log_pos     Info
 
65
x       x       x       x       x       use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
 
66
x       x       x       x       x       use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
 
67
select * from t1;
 
68
a
 
69
1
 
70
drop table t1;
 
71
FLUSH LOGS;
 
72
FLUSH LOGS;
 
73
End of 5.0 tests
 
74
set @@global.binlog_format = mixed;
 
75
CREATE SCHEMA IF NOT EXISTS mysqlslap;
 
76
USE mysqlslap;
 
77
select @@global.binlog_format;
 
78
@@global.binlog_format
 
79
MIXED
 
80
CREATE TABLE t1 (id INT primary key auto_increment, name VARCHAR(64));
 
81
FLUSH TABLE t1;
 
82
SELECT COUNT(*) FROM t1;
 
83
COUNT(*)
 
84
5000
 
85
use mysqlslap;
 
86
SELECT COUNT(*) FROM t1;
 
87
COUNT(*)
 
88
5000
 
89
truncate table t1;
 
90
insert delayed into t1 values(10, "my name");
 
91
insert delayed into t1 values(10, "is Bond"), (20, "James Bond");
 
92
flush table t1;
 
93
select * from t1;
 
94
id      name
 
95
10      my name
 
96
20      James Bond
 
97
select * from t1;
 
98
id      name
 
99
10      my name
 
100
20      James Bond
 
101
delete from t1 where id!=10;
 
102
insert delayed into t1 values(20, "is Bond"), (10, "James Bond");
 
103
flush table t1;
 
104
select * from t1;
 
105
id      name
 
106
10      my name
 
107
20      is Bond
 
108
select * from t1;
 
109
id      name
 
110
10      my name
 
111
20      is Bond
 
112
USE test;
 
113
DROP SCHEMA mysqlslap;
 
114
use test;
 
115
FLUSH LOGS;
 
116
FLUSH LOGS;
 
117
CREATE TABLE t1(a int, UNIQUE(a));
 
118
INSERT DELAYED IGNORE INTO t1 VALUES(1);
 
119
INSERT DELAYED IGNORE INTO t1 VALUES(1);
 
120
flush table t1;
 
121
show binlog events in 'master-bin.000002' LIMIT 2,2;
 
122
Log_name        Pos     Event_type      Server_id       End_log_pos     Info
 
123
x       x       x       x       x       use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
 
124
x       x       x       x       x       use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
 
125
select * from t1;
 
126
a
 
127
1
 
128
On slave
 
129
show binlog events in 'slave-bin.000002' LIMIT 2,2;
 
130
Log_name        Pos     Event_type      Server_id       End_log_pos     Info
 
131
x       x       x       x       x       use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
 
132
x       x       x       x       x       use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
 
133
select * from t1;
 
134
a
 
135
1
 
136
drop table t1;
 
137
FLUSH LOGS;
 
138
FLUSH LOGS;
 
139
End of 5.0 tests
 
140
set @@global.binlog_format = @old_global_binlog_format;