summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-12-05 11:29:00 +0100
committerSergei Golubchik <serg@mariadb.org>2015-12-07 15:20:23 +0100
commitef47b62551b0f37770e5d174ea028150c5b71fd8 (patch)
tree234bc3f7cc47902c791a576a0b040b141ec01ad5 /mysql-test/suite
parentc8652eefe50fd1894f2e2360e8bd631a7b9c67f5 (diff)
downloadmariadb-git-ef47b62551b0f37770e5d174ea028150c5b71fd8.tar.gz
MDEV-8827 Duplicate key with auto increment
fix innodb auto-increment handling three bugs: 1. innobase_next_autoinc treated the case of current<offset incorrectly 2. ha_innobase::get_auto_increment didn't recalculate current when increment changed 3. ha_innobase::get_auto_increment didn't pass offset down to innobase_next_autoinc
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/innodb/r/innodb-autoinc.result4
-rw-r--r--mysql-test/suite/innodb/t/innodb-autoinc.test2
2 files changed, 3 insertions, 3 deletions
diff --git a/mysql-test/suite/innodb/r/innodb-autoinc.result b/mysql-test/suite/innodb/r/innodb-autoinc.result
index d6f7a930340..2ea6869291e 100644
--- a/mysql-test/suite/innodb/r/innodb-autoinc.result
+++ b/mysql-test/suite/innodb/r/innodb-autoinc.result
@@ -567,7 +567,7 @@ Variable_name Value
auto_increment_increment 65535
auto_increment_offset 65535
INSERT INTO t1 VALUES (NULL),(NULL);
-ERROR 22003: Out of range value for column 'c1' at row 1
+ERROR HY000: Failed to read auto-increment value from storage engine
SELECT * FROM t1;
c1
1
@@ -660,7 +660,7 @@ t2 CREATE TABLE `t2` (
`n` int(10) unsigned NOT NULL,
`o` enum('FALSE','TRUE') DEFAULT NULL,
PRIMARY KEY (`m`)
-) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1
+) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=latin1
INSERT INTO t1 (b,c) SELECT n,o FROM t2 ;
SHOW CREATE TABLE t1;
Table Create Table
diff --git a/mysql-test/suite/innodb/t/innodb-autoinc.test b/mysql-test/suite/innodb/t/innodb-autoinc.test
index 5e5a2b49a7d..362be2e055b 100644
--- a/mysql-test/suite/innodb/t/innodb-autoinc.test
+++ b/mysql-test/suite/innodb/t/innodb-autoinc.test
@@ -349,7 +349,7 @@ INSERT INTO t1 VALUES (18446744073709551610); #-- 2^64 - 2
SELECT * FROM t1;
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1152921504606846976, @@SESSION.AUTO_INCREMENT_OFFSET=1152921504606846976;
SHOW VARIABLES LIKE "%auto_inc%";
---error 167
+--error 1467
INSERT INTO t1 VALUES (NULL),(NULL);
SELECT * FROM t1;
DROP TABLE t1;