File: rpl_stm_insert_delayed.result

package info (click to toggle)
mysql-5.5 5.5.60-0%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 201,012 kB
  • sloc: cpp: 648,063; ansic: 552,041; perl: 48,017; pascal: 25,099; sh: 15,065; yacc: 13,088; cs: 4,647; xml: 4,178; sql: 3,380; makefile: 1,368; lex: 639; awk: 54
file content (71 lines) | stat: -rw-r--r-- 1,723 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
include/master-slave.inc
[connection master]
CREATE SCHEMA IF NOT EXISTS mysqlslap;
USE mysqlslap;
select @@global.binlog_format;
@@global.binlog_format
STATEMENT
CREATE TABLE t1 (id INT primary key auto_increment, name VARCHAR(64));
FLUSH TABLE t1;
SELECT COUNT(*) FROM t1;
COUNT(*)
5000
use mysqlslap;
SELECT COUNT(*) FROM t1;
COUNT(*)
5000
truncate table t1;
insert delayed into t1 values(10, "my name");
flush table t1;
insert delayed into t1 values(10, "is Bond"), (20, "James Bond");
ERROR 23000: Duplicate entry '10' for key 'PRIMARY'
flush table t1;
select * from t1;
id	name
10	my name
select * from t1;
id	name
10	my name
delete from t1 where id!=10;
insert delayed into t1 values(20, "is Bond"), (10, "James Bond");
ERROR 23000: Duplicate entry '10' for key 'PRIMARY'
flush table t1;
select * from t1;
id	name
10	my name
20	is Bond
select * from t1;
id	name
10	my name
20	is Bond
USE test;
DROP SCHEMA mysqlslap;
use test;
FLUSH LOGS;
FLUSH LOGS;
CREATE TABLE t1(a int, UNIQUE(a));
INSERT DELAYED IGNORE INTO t1 VALUES(1);
INSERT DELAYED IGNORE INTO t1 VALUES(1);
flush table t1;
use `test`; INSERT  IGNORE INTO t1 VALUES(1)
use `test`; INSERT  IGNORE INTO t1 VALUES(1)
select * from t1;
a
1
On slave
show binlog events in 'slave-bin.000002' from <binlog_start> limit 1,6;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
slave-bin.000002	#	Query	#	#	BEGIN
slave-bin.000002	#	Query	#	#	use `test`; INSERT  IGNORE INTO t1 VALUES(1)
slave-bin.000002	#	Query	#	#	COMMIT
slave-bin.000002	#	Query	#	#	BEGIN
slave-bin.000002	#	Query	#	#	use `test`; INSERT  IGNORE INTO t1 VALUES(1)
slave-bin.000002	#	Query	#	#	COMMIT
select * from t1;
a
1
drop table t1;
FLUSH LOGS;
FLUSH LOGS;
End of 5.0 tests
include/rpl_end.inc