Debian Codegraph @

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

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