File: autoinc_debug.test

package info (click to toggle)
mariadb-10.0 10.0.32-0%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 476,064 kB
  • sloc: cpp: 1,400,131; ansic: 832,140; perl: 54,391; sh: 41,304; pascal: 32,365; yacc: 14,921; xml: 5,257; sql: 4,667; cs: 4,647; makefile: 4,555; ruby: 4,465; python: 2,292; lex: 1,427; java: 941; asm: 295; awk: 54; php: 22; sed: 16
file content (85 lines) | stat: -rw-r--r-- 2,082 bytes parent folder | download | duplicates (3)
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
--source include/have_innodb.inc
--source include/have_debug.inc
--source include/not_embedded.inc

# Two parallel connection with autoinc column after restart.

CREATE TABLE t1 (id INT AUTO_INCREMENT PRIMARY KEY)ENGINE=INNODB;

--echo # SETTING auto_increment_increment IN CONNECTION DEFAULT
SET AUTO_INCREMENT_INCREMENT = 1;
INSERT INTO t1 VALUES(NULL);
SELECT * FROM t1;
SHOW CREATE TABLE t1;

--source include/restart_mysqld.inc

--echo # SETTING auto_increment_increment IN CONNECTION1
SET AUTO_INCREMENT_INCREMENT = 2;

SET DEBUG_SYNC= 'ib_after_row_insert SIGNAL opened WAIT_FOR flushed1';

SEND INSERT INTO t1 VALUES(NULL);

connect(con1, localhost, root,,);
SET AUTO_INCREMENT_INCREMENT = 2;
SET DEBUG_SYNC= 'now WAIT_FOR opened';
SET DEBUG_SYNC= 'ib_after_row_insert_step SIGNAL flushed1 WAIT_FOR opened1';
send insert into t1 values(NULL);

connection default;
reap;
SELECT * FROM t1;
SHOW CREATE TABLE t1;
SET DEBUG_SYNC= 'now SIGNAL opened1';

connection con1;
reap;
SELECT * FROM t1;
SHOW CREATE TABLE t1;
connection default;
disconnect con1;

DROP TABLE t1;

# Two parallel connection with autoinc column without restart.

CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY)ENGINE=INNODB;

--echo # SETTING auto_increment_increment IN CONNECTION DEFAULT
SET AUTO_INCREMENT_INCREMENT = 1;
INSERT INTO t1 VALUES(NULL);
SELECT * FROM t1;
SHOW CREATE TABLE t1;
SET DEBUG_SYNC = 'now SIGNAL flushed';

connect(con1, localhost, root,,);

--echo # SETTING auto_increment_increment in connection1
SET AUTO_INCREMENT_INCREMENT = 2;

SET DEBUG_SYNC= 'now WAIT_FOR flushed';
SET DEBUG_SYNC= 'ib_after_row_insert SIGNAL opened WAIT_FOR flushed1';

send INSERT INTO t1 values(NULL);

connection default;

SET DEBUG_SYNC= 'now WAIT_FOR opened';
SET DEBUG_SYNC= 'ib_after_row_insert_step SIGNAL flushed1 WAIT_FOR opened1';

send INSERT INTO t1 VALUES(NULL);

connection con1;
reap;
SELECT * FROM t1;
SHOW CREATE TABLE t1;
SET DEBUG_SYNC= 'now SIGNAL opened1';
disconnect con1;

connection default;
reap;
SELECT * FROM t1;
SHOW CREATE TABLE t1;
DROP TABLE t1;
SET DEBUG_SYNC='RESET';