summaryrefslogtreecommitdiff
path: root/mysql-test/t/innodb.test
diff options
context:
space:
mode:
authorunknown <tsmith@ramayana.hindu.god>2007-11-06 16:40:50 -0700
committerunknown <tsmith@ramayana.hindu.god>2007-11-06 16:40:50 -0700
commitbdffce056b2306c4614b994e2b79d05caa38b765 (patch)
tree2d2c2355a5a6055846aa2c29306c73c98787b441 /mysql-test/t/innodb.test
parente2513bf07fc830ed38404428957989ebb868f7a6 (diff)
downloadmariadb-git-bdffce056b2306c4614b994e2b79d05caa38b765.tar.gz
Apply snapshot innodb-5.1-ss2034
The following bugs are fixed: Bug #31860: Server crashes after inserting into InnoDB table with auto_increment column In the Bug 16979 fix there was an erroneous assertion that autoincrement columns can't contain negative values. With the fix, the autoincrement table counter is set to 0 if the maximum value read from the autoinc column index is negative. mysql-test/r/innodb.result: Apply snapshot innodb-5.1-ss2034 Revision r2034: Fix for Bug# 31860, in the Bug 16979 fix there was an erroneous assertion that autoincrement columns can't contain negative values. With the fix, the autoincrement table counter is set to 0 if the maximum value read from the autoinc column index is negative. Add test for the bug fix but the test is not really useful as the server needs to be restarted half way through the test. It has been added for reference only. mysql-test/t/innodb.test: Apply snapshot innodb-5.1-ss2034 Revision r2034: Fix for Bug# 31860, in the Bug 16979 fix there was an erroneous assertion that autoincrement columns can't contain negative values. With the fix, the autoincrement table counter is set to 0 if the maximum value read from the autoinc column index is negative. Add test for the bug fix but the test is not really useful as the server needs to be restarted half way through the test. It has been added for reference only. storage/innobase/handler/ha_innodb.cc: Apply snapshot innodb-5.1-ss2034 Revision r2017: Use "InnoDB:" prefix in error messages. Revision r2018: Remove ut_print_timestamp(), this should have been removed when the following changes were made by MySQL. ChangeSet@1.1810.467.1 2005-08-11 19:19:20+03:00 jani@omakaista.fi Fix error message so that it conforms to " InnoDB: Error: ...". storage/innobase/include/univ.i: Apply snapshot innodb-5.1-ss2034 Revision r2015: UNIV_MEM_ASSERT_RW(), UNIV_MEM_ASSERT_W(): Remove warnings on 64-bit systems. storage/innobase/row/row0sel.c: Apply snapshot innodb-5.1-ss2034 Revision r2034: Fix for Bug# 31860, in the Bug 16979 fix there was an erroneous assertion that autoincrement columns can't contain negative values. With the fix, the autoincrement table counter is set to 0 if the maximum value read from the autoinc column index is negative. Add test for the bug fix but the test is not really useful as the server needs to be restarted half way through the test. It has been added for reference only. storage/innobase/sync/sync0sync.c: Apply snapshot innodb-5.1-ss2034 Revision r2017: Use "InnoDB:" prefix in error messages.
Diffstat (limited to 'mysql-test/t/innodb.test')
-rw-r--r--mysql-test/t/innodb.test19
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test
index 77c450035c7..f68bb87655e 100644
--- a/mysql-test/t/innodb.test
+++ b/mysql-test/t/innodb.test
@@ -2290,6 +2290,25 @@ CREATE TABLE t1 (
c29 CHAR(255), c30 CHAR(255), c31 CHAR(255), c32 CHAR(255)
) ENGINE = InnoDB;
+#
+# Bug #31860 InnoDB assumes AUTOINC values can only be positive.
+#
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(
+ id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY
+ ) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(-10);
+SELECT * FROM t1;
+#
+# NOTE: The server really needs to be restarted at this point
+# for the test to be useful.
+#
+# Without the fix InnoDB would trip over an assertion here.
+INSERT INTO t1 VALUES(NULL);
+# The next value should be 1 and not -9 or a -ve number
+SELECT * FROM t1;
+DROP TABLE t1;
+
#
# Bug #21409 Incorrect result returned when in READ-COMMITTED with
# query_cache ON