List:Commits« Previous MessageNext Message »
From:Marc Alff Date:January 5 2011 7:02am
Subject:bzr commit into mysql-5.5 branch (marc.alff:3214)
View as plain text  
#At file:///Users/malff/BZR_TREE/mysql-5.5-bug59091/ based on revid:marc.alff@stripped

 3214 Marc Alff	2011-01-05 [merge]
      Local merge

    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 (marc.alff:3214) Marc Alff5 Jan