Commit 7b3443d1 authored by vasil's avatar vasil

branches/5.1:

Merge a change from MySQL:

  ------------------------------------------------------------
  revno: 2709.20.31
  committer: Timothy Smith <timothy.smith@sun.com>
  branch nick: 51
  timestamp: Fri 2008-12-19 01:28:51 +0100
  message:
    Disable part of innodb-autoinc.test, because the MySQL server asserts when
    compiled --with-debug, due to bug 39828, "autoinc wraps around when offset and
    increment > 1".  This change should be reverted when that bug is fixed (and a
    a few other minor changes to the test as described in comments).
  modified:
    mysql-test/r/innodb-autoinc.result
    mysql-test/t/innodb-autoinc.test
parent 5f580c47
......@@ -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;
......
......@@ -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,7 +387,15 @@ 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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment