summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2003-06-26 09:01:25 +0500
committerunknown <hf@deer.(none)>2003-06-26 09:01:25 +0500
commit233be9c20118be4d173d3f16de73e61178f4cd2a (patch)
tree901d67c8ccb4089c3c876abadcd67dcfd374eb32 /mysql-test
parent349946b370944bad6ee9aa24e9ad3e138d2aeffe (diff)
parent3148d6f2a55211d02f63e4dc3a45f1d19ba536cd (diff)
downloadmariadb-git-233be9c20118be4d173d3f16de73e61178f4cd2a.tar.gz
Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.0
into deer.(none):/home/hf/work/mysql-4.0.615
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/insert.result10
-rw-r--r--mysql-test/t/insert.test12
2 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result
index 69b790ff35b..d019cfcbfa9 100644
--- a/mysql-test/r/insert.result
+++ b/mysql-test/r/insert.result
@@ -58,6 +58,16 @@ skr 2
test 1
test 2
drop table t1;
+create table t1 (id int NOT NULL DEFAULT 8);
+insert into t1 values(NULL);
+Column 'id' cannot be null
+insert into t1 values (1), (NULL), (2);
+select * from t1;
+id
+1
+8
+2
+drop table t1;
drop database if exists foo;
create database foo;
use foo;
diff --git a/mysql-test/t/insert.test b/mysql-test/t/insert.test
index 9b06b522028..be585157e63 100644
--- a/mysql-test/t/insert.test
+++ b/mysql-test/t/insert.test
@@ -51,6 +51,17 @@ select * from t1;
drop table t1;
#
+#Test of behaviour with INSERT VALUES (NULL)
+#
+
+create table t1 (id int NOT NULL DEFAULT 8);
+-- error 1048
+insert into t1 values(NULL);
+insert into t1 values (1), (NULL), (2);
+select * from t1;
+drop table t1;
+
+#
# Test of mysqld crash with fully qualified column names
#
@@ -60,3 +71,4 @@ use foo;
create table t1 (c int);
insert into foo.t1 set foo.t1.c = '1';
drop database foo;
+