summaryrefslogtreecommitdiff
path: root/mysql-test/t/create.test
diff options
context:
space:
mode:
authorRamil Kalimullin <ramil@mysql.com>2008-09-05 13:36:02 +0500
committerRamil Kalimullin <ramil@mysql.com>2008-09-05 13:36:02 +0500
commitbef0ee999dd8150e0e3a14c0bd6d47706f56ee31 (patch)
tree4696250e187d90113246c7b8a5a5db46fdf82c7d /mysql-test/t/create.test
parentdbbb48c3c7295539a3fc1a71e21f5649ee02637b (diff)
parent788be2aebdb0bce63b45b1fecf2f2d8a12a5cfc7 (diff)
downloadmariadb-git-bef0ee999dd8150e0e3a14c0bd6d47706f56ee31.tar.gz
Merge
Diffstat (limited to 'mysql-test/t/create.test')
-rw-r--r--mysql-test/t/create.test18
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test
index 847efb1315d..60d98fce490 100644
--- a/mysql-test/t/create.test
+++ b/mysql-test/t/create.test
@@ -1176,6 +1176,24 @@ SHOW INDEX FROM t1;
DROP TABLE t1;
+#
+# Bug#38821: Assert table->auto_increment_field_not_null failed in open_table()
+#
+CREATE TABLE t1 (a INTEGER AUTO_INCREMENT PRIMARY KEY, b INTEGER NOT NULL);
+INSERT IGNORE INTO t1 (b) VALUES (5);
+
+CREATE TABLE IF NOT EXISTS t2 (a INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY)
+ SELECT a FROM t1;
+--error 1062
+CREATE TABLE IF NOT EXISTS t2 (a INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY)
+ SELECT a FROM t1;
+--error 1062
+CREATE TABLE IF NOT EXISTS t2 (a INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY)
+ SELECT a FROM t1;
+
+DROP TABLE t1, t2;
+
+
--echo End of 5.0 tests
#