diff options
-rw-r--r-- | mysql-test/r/innodb-autoinc.result | 12 | ||||
-rw-r--r-- | mysql-test/t/innodb-autoinc.test | 35 |
2 files changed, 36 insertions, 11 deletions
diff --git a/mysql-test/r/innodb-autoinc.result b/mysql-test/r/innodb-autoinc.result index 589bf2f30b0..1e4b088c6cd 100644 --- a/mysql-test/r/innodb-autoinc.result +++ b/mysql-test/r/innodb-autoinc.result @@ -471,10 +471,9 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 2 auto_increment_offset 10 -INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL); +INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL); SELECT * FROM t1; c1 -0 1 18446744073709551603 18446744073709551604 @@ -505,12 +504,13 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 5 auto_increment_offset 7 -INSERT INTO t1 VALUES (NULL),(NULL), (NULL); -Got one of the listed errors +INSERT INTO t1 VALUES (NULL),(NULL); SELECT * FROM t1; c1 1 18446744073709551603 +18446744073709551607 +18446744073709551612 DROP TABLE t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; SET @@INSERT_ID=1; @@ -572,12 +572,10 @@ SHOW VARIABLES LIKE "%auto_inc%"; Variable_name Value auto_increment_increment 65535 auto_increment_offset 65535 -INSERT INTO t1 VALUES (NULL),(NULL), (NULL); +INSERT INTO t1 VALUES (NULL); SELECT * FROM t1; c1 1 -65534 -65535 18446744073709551610 18446744073709551615 DROP TABLE t1; diff --git a/mysql-test/t/innodb-autoinc.test b/mysql-test/t/innodb-autoinc.test index 172913349db..021e67e699f 100644 --- a/mysql-test/t/innodb-autoinc.test +++ b/mysql-test/t/innodb-autoinc.test @@ -302,7 +302,18 @@ SHOW VARIABLES LIKE "%auto_inc%"; # This should fail because of overflow but it doesn't, it seems to be # a MySQL server bug. It wraps around to 0 for the last value. # See MySQL Bug# 39828 -INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL); +# +# Instead of wrapping around, it asserts when MySQL is compiled --with-debug +# (see sql/handler.cc:handler::update_auto_increment()). Don't test for +# overflow until Bug #39828 is fixed. +# +# Since this asserts when compiled --with-debug, we can't properly test this +# until Bug #39828 is fixed. For now, this test is meaningless. +#if Bug #39828 is fixed +#INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL); +#else +INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL); +#endif SELECT * FROM t1; DROP TABLE t1; @@ -324,8 +335,16 @@ SHOW VARIABLES LIKE "%auto_inc%"; # a duplicate entry message because of a MySQL server bug, it wraps # around. See MySQL Bug# 39828, once MySQL fix the bug we can replace # the ER_DUP_ENTRY, 1062 below with the appropriate error message --- error ER_DUP_ENTRY,1062 -INSERT INTO t1 VALUES (NULL),(NULL), (NULL); +# +# Since this asserts when compiled --with-debug, we can't properly test this +# until Bug #39828 is fixed. For now, this test is meaningless. +#if Bug #39828 is fixed +# Still need to fix this error code, error should mention overflow +#-- error ER_DUP_ENTRY,1062 +#INSERT INTO t1 VALUES (NULL),(NULL), (NULL); +#else +INSERT INTO t1 VALUES (NULL),(NULL); +#endif SELECT * FROM t1; DROP TABLE t1; @@ -368,6 +387,14 @@ SHOW VARIABLES LIKE "%auto_inc%"; # See MySQL Bug# 39828, once MySQL fix the bug we can enable the error # code expected test. # -- error ER_AUTOINC_READ_FAILED,1467 -INSERT INTO t1 VALUES (NULL),(NULL), (NULL); +# +# Since this asserts when compiled --with-debug, we can't properly test this +# until Bug #39828 is fixed. For now, this test is meaningless. +#if Bug #39828 is fixed +#-- error ER_AUTOINC_READ_FAILED,1467 +#INSERT INTO t1 VALUES (NULL),(NULL); +#else +INSERT INTO t1 VALUES (NULL); +#endif SELECT * FROM t1; DROP TABLE t1; |