diff options
author | unknown <Dao-Gang.Qu@sun.com> | 2010-01-25 10:55:05 +0800 |
---|---|---|
committer | unknown <Dao-Gang.Qu@sun.com> | 2010-01-25 10:55:05 +0800 |
commit | dad4291b781495cfdc8abac9dc2902621bfb3b56 (patch) | |
tree | 79b80f370265c5019547a5ef30b218665a358d84 /mysql-test/t/innodb-autoinc-44030.test | |
parent | 3cae7d1187795a8089b6f54ac60cf2a0e579cf89 (diff) | |
parent | 2b16517522afad76bc94b07bdaa8af64091e713b (diff) | |
download | mariadb-git-dad4291b781495cfdc8abac9dc2902621bfb3b56.tar.gz |
Manual merge with Conflicts:
sql_udf.cc
Diffstat (limited to 'mysql-test/t/innodb-autoinc-44030.test')
-rw-r--r-- | mysql-test/t/innodb-autoinc-44030.test | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/mysql-test/t/innodb-autoinc-44030.test b/mysql-test/t/innodb-autoinc-44030.test new file mode 100644 index 00000000000..af2e3015280 --- /dev/null +++ b/mysql-test/t/innodb-autoinc-44030.test @@ -0,0 +1,34 @@ +-- source include/have_innodb.inc +# embedded server ignores 'delayed', so skip this +-- source include/not_embedded.inc + +--disable_warnings +drop table if exists t1; +--enable_warnings + +# +# 44030: Error: (1500) Couldn't read the MAX(ID) autoinc value from +# the index (PRIMARY) +# This test requires a restart of the server +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; +CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; +INSERT INTO t1 VALUES (null); +INSERT INTO t1 VALUES (null); +ALTER TABLE t1 CHANGE c1 d1 INT NOT NULL AUTO_INCREMENT; +SELECT * FROM t1; +# Restart the server +-- source include/restart_mysqld.inc +# The MySQL and InnoDB data dictionaries should now be out of sync. +# The select should print message to the error log +SELECT * FROM t1; +# MySQL have made a change (http://lists.mysql.com/commits/75268) that no +# longer results in the two data dictionaries being out of sync. If they +# revert their changes then this check for ER_AUTOINC_READ_FAILED will need +# to be enabled. Also, see http://bugs.mysql.com/bug.php?id=47621. +-- error ER_AUTOINC_READ_FAILED,1467 +INSERT INTO t1 VALUES(null); +ALTER TABLE t1 AUTO_INCREMENT = 3; +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES(null); +SELECT * FROM t1; +DROP TABLE t1; |