diff options
Diffstat (limited to 'mysql-test/t/create.test')
-rw-r--r-- | mysql-test/t/create.test | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 0b86b67fdbf..d57fd3bb193 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -111,6 +111,19 @@ create table t2 (b int) select a as b, a+1 as b from t1; drop table if exists t1,t2; # +# Test CREATE ... SELECT when insert fails +# + +CREATE TABLE t1 (a int not null); +INSERT INTO t1 values (1),(2),(1); +--error 1062 +CREATE TABLE t2 (primary key(a)) SELECT * FROM t1; +--error 1146 +SELECT * from t2; +DROP TABLE t1; +DROP TABLE IF EXISTS t2; + +# # Test of primary key with 32 index # |