1
-- source include/have_innodb.inc
2
# embedded server ignores 'delayed', so skip this
4
let $innodb_file_format_max_orig=`select @@innodb_file_format_max`;
7
drop table if exists t1;
11
# 44030: Error: (1500) Couldn't read the MAX(ID) autoinc value from
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;
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
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;
33
INSERT INTO t1 VALUES(null);
38
# restore environment to the state it was before this test execution
42
eval SET GLOBAL innodb_file_format_max=$innodb_file_format_max_orig;