Loading mysql-test/r/gis.result +5 −0 Original line number Diff line number Diff line Loading @@ -665,3 +665,8 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field insert into t1 values (pointfromtext('point(1,1)')); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field drop table t1; create table t1 (s1 geometry not null,s2 char(100)); create trigger t1_bu before update on t1 for each row set new.s1 = null; insert into t1 values (null,null); ERROR 23000: Column 's1' cannot be null drop table t1; mysql-test/t/gis.test +10 −0 Original line number Diff line number Diff line Loading @@ -373,3 +373,13 @@ insert into t1 values (pointfromtext('point(1,1)')); drop table t1; # End of 4.1 tests # # Bug #12281 (Geometry: crash in trigger) # create table t1 (s1 geometry not null,s2 char(100)); create trigger t1_bu before update on t1 for each row set new.s1 = null; --error 1048 insert into t1 values (null,null); drop table t1; sql/field.h +1 −0 Original line number Diff line number Diff line Loading @@ -1204,6 +1204,7 @@ class Field_geom :public Field_blob { int store(longlong nr); int store_decimal(const my_decimal *); void get_key_image(char *buff,uint length,imagetype type); uint size_of() const { return sizeof(*this); } }; #endif /*HAVE_SPATIAL*/ Loading Loading
mysql-test/r/gis.result +5 −0 Original line number Diff line number Diff line Loading @@ -665,3 +665,8 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field insert into t1 values (pointfromtext('point(1,1)')); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field drop table t1; create table t1 (s1 geometry not null,s2 char(100)); create trigger t1_bu before update on t1 for each row set new.s1 = null; insert into t1 values (null,null); ERROR 23000: Column 's1' cannot be null drop table t1;
mysql-test/t/gis.test +10 −0 Original line number Diff line number Diff line Loading @@ -373,3 +373,13 @@ insert into t1 values (pointfromtext('point(1,1)')); drop table t1; # End of 4.1 tests # # Bug #12281 (Geometry: crash in trigger) # create table t1 (s1 geometry not null,s2 char(100)); create trigger t1_bu before update on t1 for each row set new.s1 = null; --error 1048 insert into t1 values (null,null); drop table t1;
sql/field.h +1 −0 Original line number Diff line number Diff line Loading @@ -1204,6 +1204,7 @@ class Field_geom :public Field_blob { int store(longlong nr); int store_decimal(const my_decimal *); void get_key_image(char *buff,uint length,imagetype type); uint size_of() const { return sizeof(*this); } }; #endif /*HAVE_SPATIAL*/ Loading