List:Commits« Previous MessageNext Message »
From:holyfoot Date:September 15 2006 3:28pm
Subject:bk commit into 4.1 tree (holyfoot:1.2528) BUG#21888
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of hf. When hf does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-09-15 20:28:21+05:00, holyfoot@stripped +3 -0
  bug #21888 (Query on GEOMETRY crashes server)

  myisam/mi_range.c@stripped, 2006-09-15 20:28:18+05:00, holyfoot@stripped +5 -0
    don't handle that kind of requests for RTree key

  mysql-test/r/gis-rtree.result@stripped, 2006-09-15 20:28:18+05:00, holyfoot@stripped +11 -0
    test result

  mysql-test/t/gis-rtree.test@stripped, 2006-09-15 20:28:18+05:00, holyfoot@stripped +10 -0
    testcase added

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	holyfoot
# Host:	deer.(none)
# Root:	/home/hf/work/mysql-4.1.21888

--- 1.12/myisam/mi_range.c	2006-09-15 20:28:25 +05:00
+++ 1.13/myisam/mi_range.c	2006-09-15 20:28:25 +05:00
@@ -71,6 +71,11 @@
     uchar * key_buff;
     uint start_key_len;
 
+    if (!min_key)
+    {
+      res= HA_POS_ERROR;
+      break;
+    }
     key_buff= info->lastkey+info->s->base.max_key_length;
     start_key_len= _mi_pack_key(info,inx, key_buff,
                                 (uchar*) min_key->key, min_key->length,

--- 1.13/mysql-test/r/gis-rtree.result	2006-09-15 20:28:25 +05:00
+++ 1.14/mysql-test/r/gis-rtree.result	2006-09-15 20:28:25 +05:00
@@ -857,3 +857,14 @@
 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;

--- 1.13/mysql-test/t/gis-rtree.test	2006-09-15 20:28:25 +05:00
+++ 1.14/mysql-test/t/gis-rtree.test	2006-09-15 20:28:25 +05:00
@@ -232,4 +232,14 @@
 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
Thread
bk commit into 4.1 tree (holyfoot:1.2528) BUG#21888holyfoot15 Sep