diff options
author | Mats Kindahl <mats@sun.com> | 2008-10-06 10:27:36 +0200 |
---|---|---|
committer | Mats Kindahl <mats@sun.com> | 2008-10-06 10:27:36 +0200 |
commit | bcaf5e0cf55fe87bf77fde836a8913ec170d7085 (patch) | |
tree | 7bac6ffa1fec91510d6ec0791124a707d0f29e3a /mysql-test/t/create.test | |
parent | 08399602a61dc9561773e178b8eabfb99b1ce945 (diff) | |
parent | 9daa56fd5ce3ccd33c32b5a505ac1d2b2c437460 (diff) | |
download | mariadb-git-bcaf5e0cf55fe87bf77fde836a8913ec170d7085.tar.gz |
Merging 5.1 main into 5.1-rpl.
Diffstat (limited to 'mysql-test/t/create.test')
-rw-r--r-- | mysql-test/t/create.test | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 2a1a780ab24..33a75147093 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 # |