Debian Codegraph @

mysql-test/suite/innodb/t/innodb-autoinc-18274.test

raw
1 --disable_warnings
2 drop table if exists t1;
3 --enable_warnings
4
5 #
6 # Bug #18274 InnoDB auto_increment field reset on OPTIMIZE TABLE
7 SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
8 CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
9 INSERT INTO t1 VALUES (null);
10 SHOW CREATE TABLE t1;
11 DELETE FROM t1;
12 OPTIMIZE TABLE t1;
13 SHOW CREATE TABLE t1;
14 INSERT INTO t1 VALUES(null);
15 SELECT * FROM t1;
16 DROP TABLE t1;
17
18 #
19 # restore environment to the state it was before this test execution
20 #
21
22 -- disable_query_log