~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/tests/t/innodb-autoinc-44030.test

  • Committer: Jay Pipes
  • Date: 2009-09-15 21:01:42 UTC
  • mto: (1126.2.5 merge)
  • mto: This revision was merged to the branch mainline in revision 1128.
  • Revision ID: jpipes@serialcoder-20090915210142-x8mwiqn1q0vzjspp
Moves Alter_info out into its own header and source file, cleans up some related include mess in sql_lex.h, and renames Alter_info to AlterInfo.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# embedded server ignores 'delayed', so skip this
2
 
 
3
 
let $innodb_file_format_max_orig=`select @@innodb_file_format_max`;
4
 
 
5
 
--disable_warnings
6
 
drop table if exists t1;
7
 
--enable_warnings
8
 
 
9
 
#
10
 
# 44030: Error: (1500) Couldn't read the MAX(ID) autoinc value from
11
 
# the index (PRIMARY)
12
 
# This test requires a restart of the server
13
 
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
14
 
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
15
 
INSERT INTO t1 VALUES (null);
16
 
INSERT INTO t1 VALUES (null);
17
 
ALTER TABLE t1 CHANGE c1 d1 INT NOT NULL AUTO_INCREMENT;
18
 
SELECT * FROM t1;
19
 
# Restart the server
20
 
#-- source include/restart_mysqld.inc
21
 
# The MySQL and InnoDB data dictionaries should now be out of sync.
22
 
# The select should print message to the error log
23
 
SELECT * FROM t1;
24
 
# MySQL have made a change (http://lists.mysql.com/commits/75268) that no
25
 
# longer results in the two data dictionaries being out of sync. If they
26
 
# revert their changes then this check for ER_AUTOINC_READ_FAILED will need
27
 
# to be enabled. Also, see http://bugs.mysql.com/bug.php?id=47621.
28
 
#-- error ER_AUTOINC_READ_FAILED,1467
29
 
INSERT INTO t1 VALUES(null);
30
 
ALTER TABLE t1 AUTO_INCREMENT = 3;
31
 
SHOW CREATE TABLE t1;
32
 
INSERT INTO t1 VALUES(null);
33
 
SELECT * FROM t1;
34
 
DROP TABLE t1;
35
 
 
36
 
#
37
 
# restore environment to the state it was before this test execution
38
 
#
39
 
 
40
 
eval SET GLOBAL innodb_file_format_max=$innodb_file_format_max_orig;