~ubuntu-branches/ubuntu/precise/mysql-5.5/precise-201203300109

« back to all changes in this revision

Viewing changes to mysql-test/suite/innodb/t/innodb-autoinc-18274.test

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2011-11-08 11:31:13 UTC
  • Revision ID: package-import@ubuntu.com-20111108113113-3ulw01fvi4vn8m25
Tags: upstream-5.5.17
ImportĀ upstreamĀ versionĀ 5.5.17

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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