diff options
author | unknown <holyfoot/hf@mysql.com/deer.(none)> | 2006-09-29 17:56:02 +0500 |
---|---|---|
committer | unknown <holyfoot/hf@mysql.com/deer.(none)> | 2006-09-29 17:56:02 +0500 |
commit | 01fe277cc6e0863ca03ab11d1f12bd9b52dc180e (patch) | |
tree | f104f120b2f3b4dd33ea37caaf23eaf6eed00e30 /mysql-test | |
parent | 9bf2ed95539220b6da3452eecbab56ae33af2126 (diff) | |
download | mariadb-git-01fe277cc6e0863ca03ab11d1f12bd9b52dc180e.tar.gz |
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.
myisam/mi_range.c:
return the error if min_key is NULL
mysql-test/r/gis-rtree.result:
test result
mysql-test/t/gis-rtree.test:
test case
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/gis-rtree.result | 11 | ||||
-rw-r--r-- | mysql-test/t/gis-rtree.test | 10 |
2 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/r/gis-rtree.result b/mysql-test/r/gis-rtree.result index 3fcae8843c0..bdb3de4de75 100644 --- a/mysql-test/r/gis-rtree.result +++ b/mysql-test/r/gis-rtree.result @@ -857,3 +857,14 @@ CHECK TABLE t1 EXTENDED; 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 (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)); +1 +1 +1 +1 +DROP TABLE t1; 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 |