From 07f36668aecfd3d811c4ed5eb23b1bfdb8c86fdd Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 12 Feb 2007 15:41:36 +0400 Subject: bug #20691 (INSERT (DEFAULT) may insert garbage with NO DEFAULT NOT NULL field) Some fields (GEOMETRY first of all) can't be handled properly in this case at all. So we return an error in this case mysql-test/r/default.result: result fixed mysql-test/r/gis.result: result fixed mysql-test/t/default.test: VIEW test added mysql-test/t/gis.test: testcase added sql/item.cc: set_defaults() changed with the 'reset()' --- mysql-test/t/gis.test | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mysql-test/t/gis.test') diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index 95fdf642b94..ff9fcad1fcf 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -428,3 +428,12 @@ drop table t1; create table t1 select GeomFromText('point(1 1)'); desc t1; drop table t1; + +# +# Bug #20691 (DEFAULT over NOT NULL field) +# +create table t1 (g geometry not null); +--error ER_CANT_CREATE_GEOMETRY_OBJECT +insert into t1 values(default); +drop table t1; + -- cgit v1.2.1