From 78c24b2bbc5c5ceee870ee31d4a63643617d385d Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 24 Jun 2003 10:53:21 +0500 Subject: Another bugfix for #615 Looks a bit nicer than previous one mysql-test/r/insert.result: Test results added mysql-test/t/insert.test: testcase for the bug added sql/field.h: Field::set_default fixed sql/field_conv.cc: Now we can just replace field->reset() with field->set_default() here --- mysql-test/t/insert.test | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'mysql-test/t/insert.test') 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 @@ -50,6 +50,17 @@ insert into t1 values ('rts',NULL),('rts',NULL),('test',NULL); 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; + -- cgit v1.2.1