summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/innodb/r/innodb-autoinc-44030.result
blob: 8db5952d1d0862bbcb22fb1d4624b442062f0ec7 (plain)
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
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (null);
INSERT INTO t1 VALUES (null);
ALTER TABLE t1 CHANGE c1 d1 INT NOT NULL AUTO_INCREMENT;
affected rows: 0
info: Records: 0  Duplicates: 0  Warnings: 0
SELECT * FROM t1;
d1
1
2
# restart
SHOW CREATE TABLE t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `d1` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`d1`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
d1
1
2
3
ALTER TABLE t1 AUTO_INCREMENT = 3;
affected rows: 0
info: Records: 0  Duplicates: 0  Warnings: 0
SHOW CREATE TABLE t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `d1` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`d1`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
INSERT INTO t1 VALUES(null);
INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
d1
1
2
3
4
5
DROP TABLE t1;