Loading mysql-test/r/gis-rtree.result +7 −0 Original line number Diff line number Diff line Loading @@ -863,6 +863,13 @@ Table Op Msg_type Msg_text test.t1 check status OK DROP TABLE t1; CREATE TABLE t1(foo GEOMETRY NOT NULL, SPATIAL INDEX(foo) ); INSERT INTO t1(foo) VALUES (NULL); ERROR 23000: Column 'foo' cannot be null INSERT INTO t1() VALUES (); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field INSERT INTO t1(foo) VALUES (''); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field CREATE TABLE t1 (foo GEOMETRY NOT NULL, SPATIAL INDEX(foo) ); INSERT INTO t1 (foo) VALUES (PointFromWKB(POINT(1,1))); INSERT INTO t1 (foo) VALUES (PointFromWKB(POINT(1,0))); INSERT INTO t1 (foo) VALUES (PointFromWKB(POINT(0,1))); Loading mysql-test/t/gis-rtree.test +12 −0 Original line number Diff line number Diff line Loading @@ -242,3 +242,15 @@ INSERT INTO t1 (foo) VALUES (PointFromWKB(POINT(0,0))); SELECT 1 FROM t1 WHERE foo != PointFromWKB(POINT(0,0)); DROP TABLE t1; # End of 4.1 tests # # bug #21790 (UNKNOWN ERROR on NULLs in RTree) # CREATE TABLE t1(foo GEOMETRY NOT NULL, SPATIAL INDEX(foo) ); --error 1048 INSERT INTO t1(foo) VALUES (NULL); --error 1416 INSERT INTO t1() VALUES (); --error 1416 INSERT INTO t1(foo) VALUES (''); DROP TABLE t1; sql/handler.cc +2 −2 Original line number Diff line number Diff line Loading @@ -1788,8 +1788,8 @@ void handler::print_error(int error, myf errflag) break; } case HA_ERR_NULL_IN_SPATIAL: textno= ER_UNKNOWN_ERROR; break; my_error(ER_CANT_CREATE_GEOMETRY_OBJECT, MYF(0)); DBUG_VOID_RETURN; case HA_ERR_FOUND_DUPP_UNIQUE: textno=ER_DUP_UNIQUE; break; Loading Loading
mysql-test/r/gis-rtree.result +7 −0 Original line number Diff line number Diff line Loading @@ -863,6 +863,13 @@ Table Op Msg_type Msg_text test.t1 check status OK DROP TABLE t1; CREATE TABLE t1(foo GEOMETRY NOT NULL, SPATIAL INDEX(foo) ); INSERT INTO t1(foo) VALUES (NULL); ERROR 23000: Column 'foo' cannot be null INSERT INTO t1() VALUES (); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field INSERT INTO t1(foo) VALUES (''); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field CREATE TABLE t1 (foo GEOMETRY NOT NULL, SPATIAL INDEX(foo) ); INSERT INTO t1 (foo) VALUES (PointFromWKB(POINT(1,1))); INSERT INTO t1 (foo) VALUES (PointFromWKB(POINT(1,0))); INSERT INTO t1 (foo) VALUES (PointFromWKB(POINT(0,1))); Loading
mysql-test/t/gis-rtree.test +12 −0 Original line number Diff line number Diff line Loading @@ -242,3 +242,15 @@ INSERT INTO t1 (foo) VALUES (PointFromWKB(POINT(0,0))); SELECT 1 FROM t1 WHERE foo != PointFromWKB(POINT(0,0)); DROP TABLE t1; # End of 4.1 tests # # bug #21790 (UNKNOWN ERROR on NULLs in RTree) # CREATE TABLE t1(foo GEOMETRY NOT NULL, SPATIAL INDEX(foo) ); --error 1048 INSERT INTO t1(foo) VALUES (NULL); --error 1416 INSERT INTO t1() VALUES (); --error 1416 INSERT INTO t1(foo) VALUES (''); DROP TABLE t1;
sql/handler.cc +2 −2 Original line number Diff line number Diff line Loading @@ -1788,8 +1788,8 @@ void handler::print_error(int error, myf errflag) break; } case HA_ERR_NULL_IN_SPATIAL: textno= ER_UNKNOWN_ERROR; break; my_error(ER_CANT_CREATE_GEOMETRY_OBJECT, MYF(0)); DBUG_VOID_RETURN; case HA_ERR_FOUND_DUPP_UNIQUE: textno=ER_DUP_UNIQUE; break; Loading