#At file:///export/home/x/mysql-5.5-test/ based on revid:mikael@dator8-20110103145904-7b8j3z5pmu6t4jj9
3213 Jon Olav Hauglid 2011-01-04 [merge]
Merge from mysql-5.1 to mysql-5.5.
No conflicts.
modified:
mysql-test/r/auto_increment.result
mysql-test/t/auto_increment.test
=== modified file 'mysql-test/r/auto_increment.result'
--- a/mysql-test/r/auto_increment.result 2010-12-13 12:11:16 +0000
+++ b/mysql-test/r/auto_increment.result 2011-01-04 14:28:03 +0000
@@ -497,3 +497,22 @@ SET @@SESSION.AUTO_INCREMENT_INCREMENT=d
SET @@SESSION.AUTO_INCREMENT_OFFSET=default;
DROP TABLE t1;
End of 5.1 tests
+#
+# Bug#50619 assert in handler::update_auto_increment
+#
+CREATE TABLE t1 (pk INT AUTO_INCREMENT, PRIMARY KEY (pk));
+INSERT INTO t1 VALUES (NULL), (-1), (NULL);
+SELECT * FROM t1;
+pk
+-1
+1
+2
+DROP TABLE t1;
+CREATE TABLE t1 (pk BIGINT UNSIGNED AUTO_INCREMENT, PRIMARY KEY (pk));
+INSERT INTO t1 VALUES (NULL), (18446744073709551615-1), (NULL);
+ERROR HY000: Failed to read auto-increment value from storage engine
+SELECT * FROM t1;
+pk
+1
+18446744073709551614
+DROP TABLE t1;
=== modified file 'mysql-test/t/auto_increment.test'
--- a/mysql-test/t/auto_increment.test 2010-12-13 12:11:16 +0000
+++ b/mysql-test/t/auto_increment.test 2011-01-04 14:28:03 +0000
@@ -363,3 +363,20 @@ SET @@SESSION.AUTO_INCREMENT_OFFSET=defa
DROP TABLE t1;
--echo End of 5.1 tests
+
+--echo #
+--echo # Bug#50619 assert in handler::update_auto_increment
+--echo #
+
+CREATE TABLE t1 (pk INT AUTO_INCREMENT, PRIMARY KEY (pk));
+# This triggered the assert
+INSERT INTO t1 VALUES (NULL), (-1), (NULL);
+SELECT * FROM t1;
+DROP TABLE t1;
+
+# Check that that true overflow still gives error
+CREATE TABLE t1 (pk BIGINT UNSIGNED AUTO_INCREMENT, PRIMARY KEY (pk));
+--error ER_AUTOINC_READ_FAILED
+INSERT INTO t1 VALUES (NULL), (18446744073709551615-1), (NULL);
+SELECT * FROM t1;
+DROP TABLE t1;
No bundle (reason: revision is a merge).
| Thread |
|---|
| • bzr commit into mysql-5.5 branch (jon.hauglid:3213) | Jon Olav Hauglid | 4 Jan |