~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Brian Aker
  • Date: 2011-02-22 06:12:02 UTC
  • mfrom: (2190.1.6 drizzle-build)
  • Revision ID: brian@tangent.org-20110222061202-k03czxykqy4x9hjs
List update, header fixes, multiple symbols, and David deletes some code.

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