From 8190b7231b14a4d8773730405edeb7fb07784650 Mon Sep 17 00:00:00 2001 From: "holyfoot/hf@mysql.com/deer.(none)" <> Date: Fri, 29 Sep 2006 17:56:02 +0500 Subject: bug #21888 (Query on GEOMETRY field crashes the server) RTree keys are really different from BTree and need specific paramters to be set by optimizer to work. Sometimes optimizer doesn't set those properly. Here we decided just to add code to check that the parameters are correct. Hope to fix optimizer sometimes. --- mysql-test/t/gis-rtree.test | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mysql-test/t/gis-rtree.test') diff --git a/mysql-test/t/gis-rtree.test b/mysql-test/t/gis-rtree.test index eba53a8a9c5..cdd8d1f3f0f 100644 --- a/mysql-test/t/gis-rtree.test +++ b/mysql-test/t/gis-rtree.test @@ -232,4 +232,14 @@ INSERT INTO t1 (c1) VALUES ( CHECK TABLE t1 EXTENDED; DROP TABLE t1; +# +# Bug #21888: Query on GEOMETRY field using PointFromWKB() results in lost connection +# +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))); +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 -- cgit v1.2.1