[Pkg-mysql-commits] r1729 - mysql-dfsg-5.0/branches/lenny-proposed/debian/patches

Sean Finney seanius at alioth.debian.org
Sat Sep 5 11:38:29 UTC 2009


Author: seanius
Date: 2009-09-05 11:38:29 +0000 (Sat, 05 Sep 2009)
New Revision: 1729

Modified:
   mysql-dfsg-5.0/branches/lenny-proposed/debian/patches/65_fix_gis_functions_crash.dpatch
Log:
update the GIS functions patch to actually work and apply

the upstream change linked in their BTS does not seem to apply,
either because of partial changes that had already taken place
or because it was incomplete/incorrect.  therefore i've taken
a diff of the 3 affected files:

	sql/item_geofunc.cc
	sql/item_geofunc.h
	libmysqld/item_geofunc.cc

and refreshed the patch.


Modified: mysql-dfsg-5.0/branches/lenny-proposed/debian/patches/65_fix_gis_functions_crash.dpatch
===================================================================
--- mysql-dfsg-5.0/branches/lenny-proposed/debian/patches/65_fix_gis_functions_crash.dpatch	2009-09-05 10:15:51 UTC (rev 1728)
+++ mysql-dfsg-5.0/branches/lenny-proposed/debian/patches/65_fix_gis_functions_crash.dpatch	2009-09-05 11:38:29 UTC (rev 1729)
@@ -1,1094 +1,39 @@
 #! /bin/sh /usr/share/dpatch/dpatch-run
-## 65_fix_gis_functions_crash.dpatch by Norbert Tretkowski <nobse at debian.org>
+## 65_fix_gis_functions_crash.dpatch by Sean Finney <seanius at debian.org>
 ##
 ## All lines beginning with `## DP:' are a description of the patch.
+## DP: backported GIS fixes from upstream's 5.0 tree
 ## DP: http://bugs.mysql.com/bug.php?id=38990
-
- at DPATCH@
---- a/mysql-test/r/gis-rtree.result	2007-10-10 13:26:02 +0000
-+++ b/mysql-test/r/gis-rtree.result	2009-04-28 09:47:26 +0000
-@@ -186,106 +186,106 @@ CREATE TABLE t2 (
- fid INT NOT NULL AUTO_INCREMENT PRIMARY KEY, 
- g GEOMETRY NOT NULL
- ) ENGINE=MyISAM;
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(10 * 10 - 9, 10 * 10 - 9), Point(10 * 10, 10 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(10 * 10 - 9, 9 * 10 - 9), Point(10 * 10, 9 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(10 * 10 - 9, 8 * 10 - 9), Point(10 * 10, 8 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(10 * 10 - 9, 7 * 10 - 9), Point(10 * 10, 7 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(10 * 10 - 9, 6 * 10 - 9), Point(10 * 10, 6 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(10 * 10 - 9, 5 * 10 - 9), Point(10 * 10, 5 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(10 * 10 - 9, 4 * 10 - 9), Point(10 * 10, 4 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(10 * 10 - 9, 3 * 10 - 9), Point(10 * 10, 3 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(10 * 10 - 9, 2 * 10 - 9), Point(10 * 10, 2 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(10 * 10 - 9, 1 * 10 - 9), Point(10 * 10, 1 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(9 * 10 - 9, 10 * 10 - 9), Point(9 * 10, 10 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(9 * 10 - 9, 9 * 10 - 9), Point(9 * 10, 9 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(9 * 10 - 9, 8 * 10 - 9), Point(9 * 10, 8 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(9 * 10 - 9, 7 * 10 - 9), Point(9 * 10, 7 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(9 * 10 - 9, 6 * 10 - 9), Point(9 * 10, 6 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(9 * 10 - 9, 5 * 10 - 9), Point(9 * 10, 5 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(9 * 10 - 9, 4 * 10 - 9), Point(9 * 10, 4 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(9 * 10 - 9, 3 * 10 - 9), Point(9 * 10, 3 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(9 * 10 - 9, 2 * 10 - 9), Point(9 * 10, 2 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(9 * 10 - 9, 1 * 10 - 9), Point(9 * 10, 1 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(8 * 10 - 9, 10 * 10 - 9), Point(8 * 10, 10 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(8 * 10 - 9, 9 * 10 - 9), Point(8 * 10, 9 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(8 * 10 - 9, 8 * 10 - 9), Point(8 * 10, 8 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(8 * 10 - 9, 7 * 10 - 9), Point(8 * 10, 7 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(8 * 10 - 9, 6 * 10 - 9), Point(8 * 10, 6 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(8 * 10 - 9, 5 * 10 - 9), Point(8 * 10, 5 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(8 * 10 - 9, 4 * 10 - 9), Point(8 * 10, 4 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(8 * 10 - 9, 3 * 10 - 9), Point(8 * 10, 3 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(8 * 10 - 9, 2 * 10 - 9), Point(8 * 10, 2 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(8 * 10 - 9, 1 * 10 - 9), Point(8 * 10, 1 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(7 * 10 - 9, 10 * 10 - 9), Point(7 * 10, 10 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(7 * 10 - 9, 9 * 10 - 9), Point(7 * 10, 9 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(7 * 10 - 9, 8 * 10 - 9), Point(7 * 10, 8 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(7 * 10 - 9, 7 * 10 - 9), Point(7 * 10, 7 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(7 * 10 - 9, 6 * 10 - 9), Point(7 * 10, 6 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(7 * 10 - 9, 5 * 10 - 9), Point(7 * 10, 5 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(7 * 10 - 9, 4 * 10 - 9), Point(7 * 10, 4 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(7 * 10 - 9, 3 * 10 - 9), Point(7 * 10, 3 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(7 * 10 - 9, 2 * 10 - 9), Point(7 * 10, 2 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(7 * 10 - 9, 1 * 10 - 9), Point(7 * 10, 1 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(6 * 10 - 9, 10 * 10 - 9), Point(6 * 10, 10 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(6 * 10 - 9, 9 * 10 - 9), Point(6 * 10, 9 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(6 * 10 - 9, 8 * 10 - 9), Point(6 * 10, 8 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(6 * 10 - 9, 7 * 10 - 9), Point(6 * 10, 7 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(6 * 10 - 9, 6 * 10 - 9), Point(6 * 10, 6 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(6 * 10 - 9, 5 * 10 - 9), Point(6 * 10, 5 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(6 * 10 - 9, 4 * 10 - 9), Point(6 * 10, 4 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(6 * 10 - 9, 3 * 10 - 9), Point(6 * 10, 3 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(6 * 10 - 9, 2 * 10 - 9), Point(6 * 10, 2 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(6 * 10 - 9, 1 * 10 - 9), Point(6 * 10, 1 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(5 * 10 - 9, 10 * 10 - 9), Point(5 * 10, 10 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(5 * 10 - 9, 9 * 10 - 9), Point(5 * 10, 9 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(5 * 10 - 9, 8 * 10 - 9), Point(5 * 10, 8 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(5 * 10 - 9, 7 * 10 - 9), Point(5 * 10, 7 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(5 * 10 - 9, 6 * 10 - 9), Point(5 * 10, 6 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(5 * 10 - 9, 5 * 10 - 9), Point(5 * 10, 5 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(5 * 10 - 9, 4 * 10 - 9), Point(5 * 10, 4 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(5 * 10 - 9, 3 * 10 - 9), Point(5 * 10, 3 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(5 * 10 - 9, 2 * 10 - 9), Point(5 * 10, 2 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(5 * 10 - 9, 1 * 10 - 9), Point(5 * 10, 1 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(4 * 10 - 9, 10 * 10 - 9), Point(4 * 10, 10 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(4 * 10 - 9, 9 * 10 - 9), Point(4 * 10, 9 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(4 * 10 - 9, 8 * 10 - 9), Point(4 * 10, 8 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(4 * 10 - 9, 7 * 10 - 9), Point(4 * 10, 7 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(4 * 10 - 9, 6 * 10 - 9), Point(4 * 10, 6 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(4 * 10 - 9, 5 * 10 - 9), Point(4 * 10, 5 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(4 * 10 - 9, 4 * 10 - 9), Point(4 * 10, 4 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(4 * 10 - 9, 3 * 10 - 9), Point(4 * 10, 3 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(4 * 10 - 9, 2 * 10 - 9), Point(4 * 10, 2 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(4 * 10 - 9, 1 * 10 - 9), Point(4 * 10, 1 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(3 * 10 - 9, 10 * 10 - 9), Point(3 * 10, 10 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(3 * 10 - 9, 9 * 10 - 9), Point(3 * 10, 9 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(3 * 10 - 9, 8 * 10 - 9), Point(3 * 10, 8 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(3 * 10 - 9, 7 * 10 - 9), Point(3 * 10, 7 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(3 * 10 - 9, 6 * 10 - 9), Point(3 * 10, 6 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(3 * 10 - 9, 5 * 10 - 9), Point(3 * 10, 5 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(3 * 10 - 9, 4 * 10 - 9), Point(3 * 10, 4 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(3 * 10 - 9, 3 * 10 - 9), Point(3 * 10, 3 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(3 * 10 - 9, 2 * 10 - 9), Point(3 * 10, 2 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(3 * 10 - 9, 1 * 10 - 9), Point(3 * 10, 1 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(2 * 10 - 9, 10 * 10 - 9), Point(2 * 10, 10 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(2 * 10 - 9, 9 * 10 - 9), Point(2 * 10, 9 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(2 * 10 - 9, 8 * 10 - 9), Point(2 * 10, 8 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(2 * 10 - 9, 7 * 10 - 9), Point(2 * 10, 7 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(2 * 10 - 9, 6 * 10 - 9), Point(2 * 10, 6 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(2 * 10 - 9, 5 * 10 - 9), Point(2 * 10, 5 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(2 * 10 - 9, 4 * 10 - 9), Point(2 * 10, 4 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(2 * 10 - 9, 3 * 10 - 9), Point(2 * 10, 3 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(2 * 10 - 9, 2 * 10 - 9), Point(2 * 10, 2 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(2 * 10 - 9, 1 * 10 - 9), Point(2 * 10, 1 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(1 * 10 - 9, 10 * 10 - 9), Point(1 * 10, 10 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(1 * 10 - 9, 9 * 10 - 9), Point(1 * 10, 9 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(1 * 10 - 9, 8 * 10 - 9), Point(1 * 10, 8 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(1 * 10 - 9, 7 * 10 - 9), Point(1 * 10, 7 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(1 * 10 - 9, 6 * 10 - 9), Point(1 * 10, 6 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(1 * 10 - 9, 5 * 10 - 9), Point(1 * 10, 5 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(1 * 10 - 9, 4 * 10 - 9), Point(1 * 10, 4 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(1 * 10 - 9, 3 * 10 - 9), Point(1 * 10, 3 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(1 * 10 - 9, 2 * 10 - 9), Point(1 * 10, 2 * 10))));
--INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point(1 * 10 - 9, 1 * 10 - 9), Point(1 * 10, 1 * 10))));
-+INSERT INTO t2 (g) VALUES (LineString(Point(10 * 10 - 9, 10 * 10 - 9), Point(10 * 10, 10 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(10 * 10 - 9, 9 * 10 - 9), Point(10 * 10, 9 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(10 * 10 - 9, 8 * 10 - 9), Point(10 * 10, 8 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(10 * 10 - 9, 7 * 10 - 9), Point(10 * 10, 7 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(10 * 10 - 9, 6 * 10 - 9), Point(10 * 10, 6 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(10 * 10 - 9, 5 * 10 - 9), Point(10 * 10, 5 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(10 * 10 - 9, 4 * 10 - 9), Point(10 * 10, 4 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(10 * 10 - 9, 3 * 10 - 9), Point(10 * 10, 3 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(10 * 10 - 9, 2 * 10 - 9), Point(10 * 10, 2 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(10 * 10 - 9, 1 * 10 - 9), Point(10 * 10, 1 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(9 * 10 - 9, 10 * 10 - 9), Point(9 * 10, 10 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(9 * 10 - 9, 9 * 10 - 9), Point(9 * 10, 9 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(9 * 10 - 9, 8 * 10 - 9), Point(9 * 10, 8 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(9 * 10 - 9, 7 * 10 - 9), Point(9 * 10, 7 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(9 * 10 - 9, 6 * 10 - 9), Point(9 * 10, 6 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(9 * 10 - 9, 5 * 10 - 9), Point(9 * 10, 5 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(9 * 10 - 9, 4 * 10 - 9), Point(9 * 10, 4 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(9 * 10 - 9, 3 * 10 - 9), Point(9 * 10, 3 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(9 * 10 - 9, 2 * 10 - 9), Point(9 * 10, 2 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(9 * 10 - 9, 1 * 10 - 9), Point(9 * 10, 1 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(8 * 10 - 9, 10 * 10 - 9), Point(8 * 10, 10 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(8 * 10 - 9, 9 * 10 - 9), Point(8 * 10, 9 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(8 * 10 - 9, 8 * 10 - 9), Point(8 * 10, 8 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(8 * 10 - 9, 7 * 10 - 9), Point(8 * 10, 7 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(8 * 10 - 9, 6 * 10 - 9), Point(8 * 10, 6 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(8 * 10 - 9, 5 * 10 - 9), Point(8 * 10, 5 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(8 * 10 - 9, 4 * 10 - 9), Point(8 * 10, 4 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(8 * 10 - 9, 3 * 10 - 9), Point(8 * 10, 3 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(8 * 10 - 9, 2 * 10 - 9), Point(8 * 10, 2 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(8 * 10 - 9, 1 * 10 - 9), Point(8 * 10, 1 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(7 * 10 - 9, 10 * 10 - 9), Point(7 * 10, 10 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(7 * 10 - 9, 9 * 10 - 9), Point(7 * 10, 9 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(7 * 10 - 9, 8 * 10 - 9), Point(7 * 10, 8 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(7 * 10 - 9, 7 * 10 - 9), Point(7 * 10, 7 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(7 * 10 - 9, 6 * 10 - 9), Point(7 * 10, 6 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(7 * 10 - 9, 5 * 10 - 9), Point(7 * 10, 5 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(7 * 10 - 9, 4 * 10 - 9), Point(7 * 10, 4 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(7 * 10 - 9, 3 * 10 - 9), Point(7 * 10, 3 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(7 * 10 - 9, 2 * 10 - 9), Point(7 * 10, 2 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(7 * 10 - 9, 1 * 10 - 9), Point(7 * 10, 1 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(6 * 10 - 9, 10 * 10 - 9), Point(6 * 10, 10 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(6 * 10 - 9, 9 * 10 - 9), Point(6 * 10, 9 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(6 * 10 - 9, 8 * 10 - 9), Point(6 * 10, 8 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(6 * 10 - 9, 7 * 10 - 9), Point(6 * 10, 7 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(6 * 10 - 9, 6 * 10 - 9), Point(6 * 10, 6 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(6 * 10 - 9, 5 * 10 - 9), Point(6 * 10, 5 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(6 * 10 - 9, 4 * 10 - 9), Point(6 * 10, 4 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(6 * 10 - 9, 3 * 10 - 9), Point(6 * 10, 3 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(6 * 10 - 9, 2 * 10 - 9), Point(6 * 10, 2 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(6 * 10 - 9, 1 * 10 - 9), Point(6 * 10, 1 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(5 * 10 - 9, 10 * 10 - 9), Point(5 * 10, 10 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(5 * 10 - 9, 9 * 10 - 9), Point(5 * 10, 9 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(5 * 10 - 9, 8 * 10 - 9), Point(5 * 10, 8 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(5 * 10 - 9, 7 * 10 - 9), Point(5 * 10, 7 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(5 * 10 - 9, 6 * 10 - 9), Point(5 * 10, 6 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(5 * 10 - 9, 5 * 10 - 9), Point(5 * 10, 5 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(5 * 10 - 9, 4 * 10 - 9), Point(5 * 10, 4 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(5 * 10 - 9, 3 * 10 - 9), Point(5 * 10, 3 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(5 * 10 - 9, 2 * 10 - 9), Point(5 * 10, 2 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(5 * 10 - 9, 1 * 10 - 9), Point(5 * 10, 1 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(4 * 10 - 9, 10 * 10 - 9), Point(4 * 10, 10 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(4 * 10 - 9, 9 * 10 - 9), Point(4 * 10, 9 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(4 * 10 - 9, 8 * 10 - 9), Point(4 * 10, 8 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(4 * 10 - 9, 7 * 10 - 9), Point(4 * 10, 7 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(4 * 10 - 9, 6 * 10 - 9), Point(4 * 10, 6 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(4 * 10 - 9, 5 * 10 - 9), Point(4 * 10, 5 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(4 * 10 - 9, 4 * 10 - 9), Point(4 * 10, 4 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(4 * 10 - 9, 3 * 10 - 9), Point(4 * 10, 3 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(4 * 10 - 9, 2 * 10 - 9), Point(4 * 10, 2 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(4 * 10 - 9, 1 * 10 - 9), Point(4 * 10, 1 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(3 * 10 - 9, 10 * 10 - 9), Point(3 * 10, 10 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(3 * 10 - 9, 9 * 10 - 9), Point(3 * 10, 9 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(3 * 10 - 9, 8 * 10 - 9), Point(3 * 10, 8 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(3 * 10 - 9, 7 * 10 - 9), Point(3 * 10, 7 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(3 * 10 - 9, 6 * 10 - 9), Point(3 * 10, 6 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(3 * 10 - 9, 5 * 10 - 9), Point(3 * 10, 5 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(3 * 10 - 9, 4 * 10 - 9), Point(3 * 10, 4 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(3 * 10 - 9, 3 * 10 - 9), Point(3 * 10, 3 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(3 * 10 - 9, 2 * 10 - 9), Point(3 * 10, 2 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(3 * 10 - 9, 1 * 10 - 9), Point(3 * 10, 1 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(2 * 10 - 9, 10 * 10 - 9), Point(2 * 10, 10 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(2 * 10 - 9, 9 * 10 - 9), Point(2 * 10, 9 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(2 * 10 - 9, 8 * 10 - 9), Point(2 * 10, 8 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(2 * 10 - 9, 7 * 10 - 9), Point(2 * 10, 7 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(2 * 10 - 9, 6 * 10 - 9), Point(2 * 10, 6 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(2 * 10 - 9, 5 * 10 - 9), Point(2 * 10, 5 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(2 * 10 - 9, 4 * 10 - 9), Point(2 * 10, 4 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(2 * 10 - 9, 3 * 10 - 9), Point(2 * 10, 3 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(2 * 10 - 9, 2 * 10 - 9), Point(2 * 10, 2 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(2 * 10 - 9, 1 * 10 - 9), Point(2 * 10, 1 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(1 * 10 - 9, 10 * 10 - 9), Point(1 * 10, 10 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(1 * 10 - 9, 9 * 10 - 9), Point(1 * 10, 9 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(1 * 10 - 9, 8 * 10 - 9), Point(1 * 10, 8 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(1 * 10 - 9, 7 * 10 - 9), Point(1 * 10, 7 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(1 * 10 - 9, 6 * 10 - 9), Point(1 * 10, 6 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(1 * 10 - 9, 5 * 10 - 9), Point(1 * 10, 5 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(1 * 10 - 9, 4 * 10 - 9), Point(1 * 10, 4 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(1 * 10 - 9, 3 * 10 - 9), Point(1 * 10, 3 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(1 * 10 - 9, 2 * 10 - 9), Point(1 * 10, 2 * 10)));
-+INSERT INTO t2 (g) VALUES (LineString(Point(1 * 10 - 9, 1 * 10 - 9), Point(1 * 10, 1 * 10)));
- ALTER TABLE t2 ADD SPATIAL KEY(g);
- SHOW CREATE TABLE t2;
- Table	Create Table
-@@ -309,406 +309,406 @@ fid	AsText(g)
- 56	LINESTRING(41 41,50 50)
- 45	LINESTRING(51 51,60 60)
- 55	LINESTRING(41 51,50 60)
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(10 * 10 - 9, 10 * 10 - 9), Point(10 * 10, 10 * 10)))));
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(10 * 10 - 9, 10 * 10 - 9), Point(10 * 10, 10 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--99
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(10 * 10 - 9, 9 * 10 - 9), Point(10 * 10, 9 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(10 * 10 - 9, 9 * 10 - 9), Point(10 * 10, 9 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--98
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(10 * 10 - 9, 8 * 10 - 9), Point(10 * 10, 8 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(10 * 10 - 9, 8 * 10 - 9), Point(10 * 10, 8 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--97
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(10 * 10 - 9, 7 * 10 - 9), Point(10 * 10, 7 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(10 * 10 - 9, 7 * 10 - 9), Point(10 * 10, 7 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--96
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(10 * 10 - 9, 6 * 10 - 9), Point(10 * 10, 6 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(10 * 10 - 9, 6 * 10 - 9), Point(10 * 10, 6 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--95
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(10 * 10 - 9, 5 * 10 - 9), Point(10 * 10, 5 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(10 * 10 - 9, 5 * 10 - 9), Point(10 * 10, 5 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--94
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(10 * 10 - 9, 4 * 10 - 9), Point(10 * 10, 4 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(10 * 10 - 9, 4 * 10 - 9), Point(10 * 10, 4 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--93
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(10 * 10 - 9, 3 * 10 - 9), Point(10 * 10, 3 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(10 * 10 - 9, 3 * 10 - 9), Point(10 * 10, 3 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--92
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(10 * 10 - 9, 2 * 10 - 9), Point(10 * 10, 2 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(10 * 10 - 9, 2 * 10 - 9), Point(10 * 10, 2 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--91
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(10 * 10 - 9, 1 * 10 - 9), Point(10 * 10, 1 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(10 * 10 - 9, 1 * 10 - 9), Point(10 * 10, 1 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--90
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(9 * 10 - 9, 10 * 10 - 9), Point(9 * 10, 10 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 10 * 10 - 9), Point(9 * 10, 10 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--89
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(9 * 10 - 9, 9 * 10 - 9), Point(9 * 10, 9 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 9 * 10 - 9), Point(9 * 10, 9 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--88
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(9 * 10 - 9, 8 * 10 - 9), Point(9 * 10, 8 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 8 * 10 - 9), Point(9 * 10, 8 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--87
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(9 * 10 - 9, 7 * 10 - 9), Point(9 * 10, 7 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 7 * 10 - 9), Point(9 * 10, 7 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--86
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(9 * 10 - 9, 6 * 10 - 9), Point(9 * 10, 6 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 6 * 10 - 9), Point(9 * 10, 6 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--85
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(9 * 10 - 9, 5 * 10 - 9), Point(9 * 10, 5 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 5 * 10 - 9), Point(9 * 10, 5 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--84
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(9 * 10 - 9, 4 * 10 - 9), Point(9 * 10, 4 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 4 * 10 - 9), Point(9 * 10, 4 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--83
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(9 * 10 - 9, 3 * 10 - 9), Point(9 * 10, 3 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 3 * 10 - 9), Point(9 * 10, 3 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--82
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(9 * 10 - 9, 2 * 10 - 9), Point(9 * 10, 2 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 2 * 10 - 9), Point(9 * 10, 2 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--81
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(9 * 10 - 9, 1 * 10 - 9), Point(9 * 10, 1 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 1 * 10 - 9), Point(9 * 10, 1 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--80
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(8 * 10 - 9, 10 * 10 - 9), Point(8 * 10, 10 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 10 * 10 - 9), Point(8 * 10, 10 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--79
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(8 * 10 - 9, 9 * 10 - 9), Point(8 * 10, 9 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 9 * 10 - 9), Point(8 * 10, 9 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--78
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(8 * 10 - 9, 8 * 10 - 9), Point(8 * 10, 8 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 8 * 10 - 9), Point(8 * 10, 8 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--77
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(8 * 10 - 9, 7 * 10 - 9), Point(8 * 10, 7 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 7 * 10 - 9), Point(8 * 10, 7 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--76
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(8 * 10 - 9, 6 * 10 - 9), Point(8 * 10, 6 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 6 * 10 - 9), Point(8 * 10, 6 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--75
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(8 * 10 - 9, 5 * 10 - 9), Point(8 * 10, 5 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 5 * 10 - 9), Point(8 * 10, 5 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--74
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(8 * 10 - 9, 4 * 10 - 9), Point(8 * 10, 4 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 4 * 10 - 9), Point(8 * 10, 4 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--73
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(8 * 10 - 9, 3 * 10 - 9), Point(8 * 10, 3 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 3 * 10 - 9), Point(8 * 10, 3 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--72
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(8 * 10 - 9, 2 * 10 - 9), Point(8 * 10, 2 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 2 * 10 - 9), Point(8 * 10, 2 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--71
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(8 * 10 - 9, 1 * 10 - 9), Point(8 * 10, 1 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 1 * 10 - 9), Point(8 * 10, 1 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--70
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(7 * 10 - 9, 10 * 10 - 9), Point(7 * 10, 10 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 10 * 10 - 9), Point(7 * 10, 10 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--69
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(7 * 10 - 9, 9 * 10 - 9), Point(7 * 10, 9 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 9 * 10 - 9), Point(7 * 10, 9 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--68
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(7 * 10 - 9, 8 * 10 - 9), Point(7 * 10, 8 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 8 * 10 - 9), Point(7 * 10, 8 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--67
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(7 * 10 - 9, 7 * 10 - 9), Point(7 * 10, 7 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 7 * 10 - 9), Point(7 * 10, 7 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--66
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(7 * 10 - 9, 6 * 10 - 9), Point(7 * 10, 6 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 6 * 10 - 9), Point(7 * 10, 6 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--65
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(7 * 10 - 9, 5 * 10 - 9), Point(7 * 10, 5 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 5 * 10 - 9), Point(7 * 10, 5 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--64
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(7 * 10 - 9, 4 * 10 - 9), Point(7 * 10, 4 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 4 * 10 - 9), Point(7 * 10, 4 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--63
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(7 * 10 - 9, 3 * 10 - 9), Point(7 * 10, 3 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 3 * 10 - 9), Point(7 * 10, 3 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--62
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(7 * 10 - 9, 2 * 10 - 9), Point(7 * 10, 2 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 2 * 10 - 9), Point(7 * 10, 2 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--61
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(7 * 10 - 9, 1 * 10 - 9), Point(7 * 10, 1 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 1 * 10 - 9), Point(7 * 10, 1 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--60
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(6 * 10 - 9, 10 * 10 - 9), Point(6 * 10, 10 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 10 * 10 - 9), Point(6 * 10, 10 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--59
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(6 * 10 - 9, 9 * 10 - 9), Point(6 * 10, 9 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 9 * 10 - 9), Point(6 * 10, 9 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--58
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(6 * 10 - 9, 8 * 10 - 9), Point(6 * 10, 8 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 8 * 10 - 9), Point(6 * 10, 8 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--57
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(6 * 10 - 9, 7 * 10 - 9), Point(6 * 10, 7 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 7 * 10 - 9), Point(6 * 10, 7 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--56
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(6 * 10 - 9, 6 * 10 - 9), Point(6 * 10, 6 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 6 * 10 - 9), Point(6 * 10, 6 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--55
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(6 * 10 - 9, 5 * 10 - 9), Point(6 * 10, 5 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 5 * 10 - 9), Point(6 * 10, 5 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--54
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(6 * 10 - 9, 4 * 10 - 9), Point(6 * 10, 4 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 4 * 10 - 9), Point(6 * 10, 4 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--53
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(6 * 10 - 9, 3 * 10 - 9), Point(6 * 10, 3 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 3 * 10 - 9), Point(6 * 10, 3 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--52
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(6 * 10 - 9, 2 * 10 - 9), Point(6 * 10, 2 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 2 * 10 - 9), Point(6 * 10, 2 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--51
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(6 * 10 - 9, 1 * 10 - 9), Point(6 * 10, 1 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 1 * 10 - 9), Point(6 * 10, 1 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--50
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(5 * 10 - 9, 10 * 10 - 9), Point(5 * 10, 10 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 10 * 10 - 9), Point(5 * 10, 10 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--49
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(5 * 10 - 9, 9 * 10 - 9), Point(5 * 10, 9 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 9 * 10 - 9), Point(5 * 10, 9 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--48
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(5 * 10 - 9, 8 * 10 - 9), Point(5 * 10, 8 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 8 * 10 - 9), Point(5 * 10, 8 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--47
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(5 * 10 - 9, 7 * 10 - 9), Point(5 * 10, 7 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 7 * 10 - 9), Point(5 * 10, 7 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--46
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(5 * 10 - 9, 6 * 10 - 9), Point(5 * 10, 6 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 6 * 10 - 9), Point(5 * 10, 6 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--45
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(5 * 10 - 9, 5 * 10 - 9), Point(5 * 10, 5 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 5 * 10 - 9), Point(5 * 10, 5 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--44
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(5 * 10 - 9, 4 * 10 - 9), Point(5 * 10, 4 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 4 * 10 - 9), Point(5 * 10, 4 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--43
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(5 * 10 - 9, 3 * 10 - 9), Point(5 * 10, 3 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 3 * 10 - 9), Point(5 * 10, 3 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--42
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(5 * 10 - 9, 2 * 10 - 9), Point(5 * 10, 2 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 2 * 10 - 9), Point(5 * 10, 2 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--41
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(5 * 10 - 9, 1 * 10 - 9), Point(5 * 10, 1 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 1 * 10 - 9), Point(5 * 10, 1 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--40
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(4 * 10 - 9, 10 * 10 - 9), Point(4 * 10, 10 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 10 * 10 - 9), Point(4 * 10, 10 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--39
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(4 * 10 - 9, 9 * 10 - 9), Point(4 * 10, 9 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 9 * 10 - 9), Point(4 * 10, 9 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--38
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(4 * 10 - 9, 8 * 10 - 9), Point(4 * 10, 8 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 8 * 10 - 9), Point(4 * 10, 8 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--37
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(4 * 10 - 9, 7 * 10 - 9), Point(4 * 10, 7 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 7 * 10 - 9), Point(4 * 10, 7 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--36
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(4 * 10 - 9, 6 * 10 - 9), Point(4 * 10, 6 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 6 * 10 - 9), Point(4 * 10, 6 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--35
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(4 * 10 - 9, 5 * 10 - 9), Point(4 * 10, 5 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 5 * 10 - 9), Point(4 * 10, 5 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--34
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(4 * 10 - 9, 4 * 10 - 9), Point(4 * 10, 4 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 4 * 10 - 9), Point(4 * 10, 4 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--33
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(4 * 10 - 9, 3 * 10 - 9), Point(4 * 10, 3 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 3 * 10 - 9), Point(4 * 10, 3 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--32
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(4 * 10 - 9, 2 * 10 - 9), Point(4 * 10, 2 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 2 * 10 - 9), Point(4 * 10, 2 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--31
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(4 * 10 - 9, 1 * 10 - 9), Point(4 * 10, 1 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 1 * 10 - 9), Point(4 * 10, 1 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--30
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(3 * 10 - 9, 10 * 10 - 9), Point(3 * 10, 10 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 10 * 10 - 9), Point(3 * 10, 10 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--29
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(3 * 10 - 9, 9 * 10 - 9), Point(3 * 10, 9 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 9 * 10 - 9), Point(3 * 10, 9 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--28
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(3 * 10 - 9, 8 * 10 - 9), Point(3 * 10, 8 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 8 * 10 - 9), Point(3 * 10, 8 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--27
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(3 * 10 - 9, 7 * 10 - 9), Point(3 * 10, 7 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 7 * 10 - 9), Point(3 * 10, 7 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--26
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(3 * 10 - 9, 6 * 10 - 9), Point(3 * 10, 6 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 6 * 10 - 9), Point(3 * 10, 6 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--25
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(3 * 10 - 9, 5 * 10 - 9), Point(3 * 10, 5 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 5 * 10 - 9), Point(3 * 10, 5 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--24
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(3 * 10 - 9, 4 * 10 - 9), Point(3 * 10, 4 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 4 * 10 - 9), Point(3 * 10, 4 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--23
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(3 * 10 - 9, 3 * 10 - 9), Point(3 * 10, 3 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 3 * 10 - 9), Point(3 * 10, 3 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--22
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(3 * 10 - 9, 2 * 10 - 9), Point(3 * 10, 2 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 2 * 10 - 9), Point(3 * 10, 2 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--21
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(3 * 10 - 9, 1 * 10 - 9), Point(3 * 10, 1 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 1 * 10 - 9), Point(3 * 10, 1 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--20
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(2 * 10 - 9, 10 * 10 - 9), Point(2 * 10, 10 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 10 * 10 - 9), Point(2 * 10, 10 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--19
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(2 * 10 - 9, 9 * 10 - 9), Point(2 * 10, 9 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 9 * 10 - 9), Point(2 * 10, 9 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--18
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(2 * 10 - 9, 8 * 10 - 9), Point(2 * 10, 8 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 8 * 10 - 9), Point(2 * 10, 8 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--17
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(2 * 10 - 9, 7 * 10 - 9), Point(2 * 10, 7 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 7 * 10 - 9), Point(2 * 10, 7 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--16
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(2 * 10 - 9, 6 * 10 - 9), Point(2 * 10, 6 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 6 * 10 - 9), Point(2 * 10, 6 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--15
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(2 * 10 - 9, 5 * 10 - 9), Point(2 * 10, 5 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 5 * 10 - 9), Point(2 * 10, 5 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--14
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(2 * 10 - 9, 4 * 10 - 9), Point(2 * 10, 4 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 4 * 10 - 9), Point(2 * 10, 4 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--13
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(2 * 10 - 9, 3 * 10 - 9), Point(2 * 10, 3 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 3 * 10 - 9), Point(2 * 10, 3 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--12
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(2 * 10 - 9, 2 * 10 - 9), Point(2 * 10, 2 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 2 * 10 - 9), Point(2 * 10, 2 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--11
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(2 * 10 - 9, 1 * 10 - 9), Point(2 * 10, 1 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 1 * 10 - 9), Point(2 * 10, 1 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--10
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(1 * 10 - 9, 10 * 10 - 9), Point(1 * 10, 10 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 10 * 10 - 9), Point(1 * 10, 10 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--9
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(1 * 10 - 9, 9 * 10 - 9), Point(1 * 10, 9 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 9 * 10 - 9), Point(1 * 10, 9 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--8
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(1 * 10 - 9, 8 * 10 - 9), Point(1 * 10, 8 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 8 * 10 - 9), Point(1 * 10, 8 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--7
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(1 * 10 - 9, 7 * 10 - 9), Point(1 * 10, 7 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 7 * 10 - 9), Point(1 * 10, 7 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--6
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(1 * 10 - 9, 6 * 10 - 9), Point(1 * 10, 6 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 6 * 10 - 9), Point(1 * 10, 6 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--5
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(1 * 10 - 9, 5 * 10 - 9), Point(1 * 10, 5 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 5 * 10 - 9), Point(1 * 10, 5 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--4
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(1 * 10 - 9, 4 * 10 - 9), Point(1 * 10, 4 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 4 * 10 - 9), Point(1 * 10, 4 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--3
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(1 * 10 - 9, 3 * 10 - 9), Point(1 * 10, 3 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 3 * 10 - 9), Point(1 * 10, 3 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--2
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(1 * 10 - 9, 2 * 10 - 9), Point(1 * 10, 2 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 2 * 10 - 9), Point(1 * 10, 2 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--1
--DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point(1 * 10 - 9, 1 * 10 - 9), Point(1 * 10, 1 * 10)))));
-+100
-+DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 1 * 10 - 9), Point(1 * 10, 1 * 10))));
- SELECT count(*) FROM t2;
- count(*)
--0
-+100
- DROP TABLE t2;
- drop table if exists t1;
- Warnings:
-@@ -863,11 +863,11 @@ 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));
-+INSERT INTO t1 (foo) VALUES (POINT(1,1));
-+INSERT INTO t1 (foo) VALUES (POINT(1,0));
-+INSERT INTO t1 (foo) VALUES (POINT(0,1));
-+INSERT INTO t1 (foo) VALUES (POINT(0,0));
-+SELECT 1 FROM t1 WHERE foo != POINT(0,0);
- 1
- 1
- 1
-@@ -1426,35 +1426,35 @@ Table	Op	Msg_type	Msg_text
- test.t1	check	status	OK
- DROP TABLE t1;
- create table t1 (a geometry not null, spatial index(a));
--insert into t1 values (PointFromWKB(POINT(1.1517219314031e+164, 131072)));
--insert into t1 values (PointFromWKB(POINT(9.1248812352444e+192, 2.9740338169556e+284)));
--insert into t1 values (PointFromWKB(POINT(4.7783097267365e-299, -0)));
--insert into t1 values (PointFromWKB(POINT(1.49166814624e-154, 2.0880974297595e-53)));
--insert into t1 values (PointFromWKB(POINT(4.0917382598702e+149, 1.2024538023802e+111)));
--insert into t1 values (PointFromWKB(POINT(2.0349165139404e+236, 2.9993936277913e-241)));
--insert into t1 values (PointFromWKB(POINT(2.5243548967072e-29, 1.2024538023802e+111)));
--insert into t1 values (PointFromWKB(POINT(0, 6.9835074892995e-251)));
--insert into t1 values (PointFromWKB(POINT(2.0880974297595e-53, 3.1050361846014e+231)));
--insert into t1 values (PointFromWKB(POINT(2.8728483499323e-188, 2.4600631144627e+260)));
--insert into t1 values (PointFromWKB(POINT(3.0517578125e-05, 2.0349165139404e+236)));
--insert into t1 values (PointFromWKB(POINT(1.1517219314031e+164, 1.1818212630766e-125)));
--insert into t1 values (PointFromWKB(POINT(2.481040258324e-265, 5.7766220027675e-275)));
--insert into t1 values (PointFromWKB(POINT(2.0880974297595e-53, 2.5243548967072e-29)));
--insert into t1 values (PointFromWKB(POINT(5.7766220027675e-275, 9.9464647281957e+86)));
--insert into t1 values (PointFromWKB(POINT(2.2181357552967e+130, 3.7857669957337e-270)));
--insert into t1 values (PointFromWKB(POINT(4.5767114681874e-246, 3.6893488147419e+19)));
--insert into t1 values (PointFromWKB(POINT(4.5767114681874e-246, 3.7537584144024e+255)));
--insert into t1 values (PointFromWKB(POINT(3.7857669957337e-270, 1.8033161362863e-130)));
--insert into t1 values (PointFromWKB(POINT(0, 5.8774717541114e-39)));
--insert into t1 values (PointFromWKB(POINT(1.1517219314031e+164, 2.2761049594727e-159)));
--insert into t1 values (PointFromWKB(POINT(6.243497100632e+144, 3.7857669957337e-270)));
--insert into t1 values (PointFromWKB(POINT(3.7857669957337e-270, 2.6355494858076e-82)));
--insert into t1 values (PointFromWKB(POINT(2.0349165139404e+236, 3.8518598887745e-34)));
--insert into t1 values (PointFromWKB(POINT(4.6566128730774e-10, 2.0880974297595e-53)));
--insert into t1 values (PointFromWKB(POINT(2.0880974297595e-53, 1.8827498946116e-183)));
--insert into t1 values (PointFromWKB(POINT(1.8033161362863e-130, 9.1248812352444e+192)));
--insert into t1 values (PointFromWKB(POINT(4.7783097267365e-299, 2.2761049594727e-159)));
--insert into t1 values (PointFromWKB(POINT(1.94906280228e+289, 1.2338789709327e-178)));
-+insert into t1 values (POINT(1.1517219314031e+164, 131072));
-+insert into t1 values (POINT(9.1248812352444e+192, 2.9740338169556e+284));
-+insert into t1 values (POINT(4.7783097267365e-299, -0));
-+insert into t1 values (POINT(1.49166814624e-154, 2.0880974297595e-53));
-+insert into t1 values (POINT(4.0917382598702e+149, 1.2024538023802e+111));
-+insert into t1 values (POINT(2.0349165139404e+236, 2.9993936277913e-241));
-+insert into t1 values (POINT(2.5243548967072e-29, 1.2024538023802e+111));
-+insert into t1 values (POINT(0, 6.9835074892995e-251));
-+insert into t1 values (POINT(2.0880974297595e-53, 3.1050361846014e+231));
-+insert into t1 values (POINT(2.8728483499323e-188, 2.4600631144627e+260));
-+insert into t1 values (POINT(3.0517578125e-05, 2.0349165139404e+236));
-+insert into t1 values (POINT(1.1517219314031e+164, 1.1818212630766e-125));
-+insert into t1 values (POINT(2.481040258324e-265, 5.7766220027675e-275));
-+insert into t1 values (POINT(2.0880974297595e-53, 2.5243548967072e-29));
-+insert into t1 values (POINT(5.7766220027675e-275, 9.9464647281957e+86));
-+insert into t1 values (POINT(2.2181357552967e+130, 3.7857669957337e-270));
-+insert into t1 values (POINT(4.5767114681874e-246, 3.6893488147419e+19));
-+insert into t1 values (POINT(4.5767114681874e-246, 3.7537584144024e+255));
-+insert into t1 values (POINT(3.7857669957337e-270, 1.8033161362863e-130));
-+insert into t1 values (POINT(0, 5.8774717541114e-39));
-+insert into t1 values (POINT(1.1517219314031e+164, 2.2761049594727e-159));
-+insert into t1 values (POINT(6.243497100632e+144, 3.7857669957337e-270));
-+insert into t1 values (POINT(3.7857669957337e-270, 2.6355494858076e-82));
-+insert into t1 values (POINT(2.0349165139404e+236, 3.8518598887745e-34));
-+insert into t1 values (POINT(4.6566128730774e-10, 2.0880974297595e-53));
-+insert into t1 values (POINT(2.0880974297595e-53, 1.8827498946116e-183));
-+insert into t1 values (POINT(1.8033161362863e-130, 9.1248812352444e+192));
-+insert into t1 values (POINT(4.7783097267365e-299, 2.2761049594727e-159));
-+insert into t1 values (POINT(1.94906280228e+289, 1.2338789709327e-178));
- drop table t1;
- CREATE TABLE t1(foo GEOMETRY NOT NULL, SPATIAL INDEX(foo) );
- INSERT INTO t1(foo) VALUES (NULL);
-
---- a/mysql-test/r/gis.result	2009-01-28 17:59:08 +0000
-+++ b/mysql-test/r/gis.result	2009-04-28 09:47:26 +0000
-@@ -47,26 +47,26 @@ INSERT INTO gis_point VALUES 
- INSERT INTO gis_line VALUES
- (105, LineFromText('LINESTRING(0 0,0 10,10 0)')),
- (106, LineStringFromText('LINESTRING(10 10,20 10,20 20,10 20,10 10)')),
--(107, LineStringFromWKB(LineString(Point(10, 10), Point(40, 10))));
-+(107, LineStringFromWKB(AsWKB(LineString(Point(10, 10), Point(40, 10)))));
- INSERT INTO gis_polygon VALUES
- (108, PolygonFromText('POLYGON((10 10,20 10,20 20,10 20,10 10))')),
- (109, PolyFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))')),
--(110, PolyFromWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(0, 0)))));
-+(110, PolyFromWKB(AsWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(0, 0))))));
- INSERT INTO gis_multi_point VALUES
- (111, MultiPointFromText('MULTIPOINT(0 0,10 10,10 20,20 20)')),
- (112, MPointFromText('MULTIPOINT(1 1,11 11,11 21,21 21)')),
--(113, MPointFromWKB(MultiPoint(Point(3, 6), Point(4, 10))));
-+(113, MPointFromWKB(AsWKB(MultiPoint(Point(3, 6), Point(4, 10)))));
- INSERT INTO gis_multi_line VALUES
- (114, MultiLineStringFromText('MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48))')),
- (115, MLineFromText('MULTILINESTRING((10 48,10 21,10 0))')),
--(116, MLineFromWKB(MultiLineString(LineString(Point(1, 2), Point(3, 5)), LineString(Point(2, 5), Point(5, 8), Point(21, 7)))));
-+(116, MLineFromWKB(AsWKB(MultiLineString(LineString(Point(1, 2), Point(3, 5)), LineString(Point(2, 5), Point(5, 8), Point(21, 7))))));
- INSERT INTO gis_multi_polygon VALUES
- (117, MultiPolygonFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')),
- (118, MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')),
--(119, MPolyFromWKB(MultiPolygon(Polygon(LineString(Point(0, 3), Point(3, 3), Point(3, 0), Point(0, 3))))));
-+(119, MPolyFromWKB(AsWKB(MultiPolygon(Polygon(LineString(Point(0, 3), Point(3, 3), Point(3, 0), Point(0, 3)))))));
- INSERT INTO gis_geometrycollection VALUES
- (120, GeomCollFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))')),
--(121, GeometryFromWKB(GeometryCollection(Point(44, 6), LineString(Point(3, 6), Point(7, 9)))));
-+(121, GeometryFromWKB(AsWKB(GeometryCollection(Point(44, 6), LineString(Point(3, 6), Point(7, 9))))));
- INSERT into gis_geometry SELECT * FROM gis_point;
- INSERT into gis_geometry SELECT * FROM gis_line;
- INSERT into gis_geometry SELECT * FROM gis_polygon;
-
---- a/mysql-test/t/gis-rtree.test	2007-10-05 10:41:56 +0000
-+++ b/mysql-test/t/gis-rtree.test	2009-04-28 09:47:26 +0000
-@@ -41,7 +41,7 @@ while ($1)
-   let $2=10;
-   while ($2)
-   {
--    eval INSERT INTO t2 (g) VALUES (GeometryFromWKB(LineString(Point($1 * 10 - 9, $2 * 10 - 9), Point($1 * 10, $2 * 10))));
-+    eval INSERT INTO t2 (g) VALUES (LineString(Point($1 * 10 - 9, $2 * 10 - 9), Point($1 * 10, $2 * 10)));
-     dec $2;
-   }
-   dec $1;
-@@ -61,7 +61,7 @@ while ($1)
-   let $2=10;
-   while ($2)
-   {
--    eval DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(LineString(Point($1 * 10 - 9, $2 * 10 - 9), Point($1 * 10, $2 * 10)))));
-+    eval DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point($1 * 10 - 9, $2 * 10 - 9), Point($1 * 10, $2 * 10))));
-     SELECT count(*) FROM t2;
-     dec $2;
-   }
-@@ -235,11 +235,11 @@ 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));
-+INSERT INTO t1 (foo) VALUES (POINT(1,1));
-+INSERT INTO t1 (foo) VALUES (POINT(1,0));
-+INSERT INTO t1 (foo) VALUES (POINT(0,1));
-+INSERT INTO t1 (foo) VALUES (POINT(0,0));
-+SELECT 1 FROM t1 WHERE foo != POINT(0,0);
- DROP TABLE t1;
+## DP: Note: the commit in the upstream bug log appears incorrect, this was
+## DP: Note: taken via a diff of the actual release tarballs.
+--- mysql-dfsg-5.0-5.0.51a/libmysqld/item_geofunc.cc	2008-01-11 15:43:19.000000000 +0100
++++ mysql-5.0.85/libmysqld/item_geofunc.cc	2009-08-11 12:51:53.000000000 +0200
+@@ -27,21 +27,17 @@
+ Field *Item_geometry_func::tmp_table_field(TABLE *t_arg)
+ {
+   return new Field_geom(max_length, maybe_null, name, t_arg,
+-                        (Field::geometry_type) get_geometry_type());
++                        get_geometry_type());
+ }
  
- #
-@@ -802,35 +802,35 @@ DROP TABLE t1;
- #
+ void Item_geometry_func::fix_length_and_dec()
+ {
+   collation.set(&my_charset_bin);
+   decimals=0;
+-  max_length=MAX_BLOB_WIDTH;
++  max_length= max_field_size;
+   maybe_null= 1;
+ }
  
- create table t1 (a geometry not null, spatial index(a));
--insert into t1 values (PointFromWKB(POINT(1.1517219314031e+164, 131072)));
--insert into t1 values (PointFromWKB(POINT(9.1248812352444e+192, 2.9740338169556e+284)));
--insert into t1 values (PointFromWKB(POINT(4.7783097267365e-299, -0)));
--insert into t1 values (PointFromWKB(POINT(1.49166814624e-154, 2.0880974297595e-53)));
--insert into t1 values (PointFromWKB(POINT(4.0917382598702e+149, 1.2024538023802e+111)));
--insert into t1 values (PointFromWKB(POINT(2.0349165139404e+236, 2.9993936277913e-241)));
--insert into t1 values (PointFromWKB(POINT(2.5243548967072e-29, 1.2024538023802e+111)));
--insert into t1 values (PointFromWKB(POINT(0, 6.9835074892995e-251)));
--insert into t1 values (PointFromWKB(POINT(2.0880974297595e-53, 3.1050361846014e+231)));
--insert into t1 values (PointFromWKB(POINT(2.8728483499323e-188, 2.4600631144627e+260)));
--insert into t1 values (PointFromWKB(POINT(3.0517578125e-05, 2.0349165139404e+236)));
--insert into t1 values (PointFromWKB(POINT(1.1517219314031e+164, 1.1818212630766e-125)));
--insert into t1 values (PointFromWKB(POINT(2.481040258324e-265, 5.7766220027675e-275)));
--insert into t1 values (PointFromWKB(POINT(2.0880974297595e-53, 2.5243548967072e-29)));
--insert into t1 values (PointFromWKB(POINT(5.7766220027675e-275, 9.9464647281957e+86)));
--insert into t1 values (PointFromWKB(POINT(2.2181357552967e+130, 3.7857669957337e-270)));
--insert into t1 values (PointFromWKB(POINT(4.5767114681874e-246, 3.6893488147419e+19)));
--insert into t1 values (PointFromWKB(POINT(4.5767114681874e-246, 3.7537584144024e+255)));
--insert into t1 values (PointFromWKB(POINT(3.7857669957337e-270, 1.8033161362863e-130)));
--insert into t1 values (PointFromWKB(POINT(0, 5.8774717541114e-39)));
--insert into t1 values (PointFromWKB(POINT(1.1517219314031e+164, 2.2761049594727e-159)));
--insert into t1 values (PointFromWKB(POINT(6.243497100632e+144, 3.7857669957337e-270)));
--insert into t1 values (PointFromWKB(POINT(3.7857669957337e-270, 2.6355494858076e-82)));
--insert into t1 values (PointFromWKB(POINT(2.0349165139404e+236, 3.8518598887745e-34)));
--insert into t1 values (PointFromWKB(POINT(4.6566128730774e-10, 2.0880974297595e-53)));
--insert into t1 values (PointFromWKB(POINT(2.0880974297595e-53, 1.8827498946116e-183)));
--insert into t1 values (PointFromWKB(POINT(1.8033161362863e-130, 9.1248812352444e+192)));
--insert into t1 values (PointFromWKB(POINT(4.7783097267365e-299, 2.2761049594727e-159)));
--insert into t1 values (PointFromWKB(POINT(1.94906280228e+289, 1.2338789709327e-178)));
-+insert into t1 values (POINT(1.1517219314031e+164, 131072));
-+insert into t1 values (POINT(9.1248812352444e+192, 2.9740338169556e+284));
-+insert into t1 values (POINT(4.7783097267365e-299, -0));
-+insert into t1 values (POINT(1.49166814624e-154, 2.0880974297595e-53));
-+insert into t1 values (POINT(4.0917382598702e+149, 1.2024538023802e+111));
-+insert into t1 values (POINT(2.0349165139404e+236, 2.9993936277913e-241));
-+insert into t1 values (POINT(2.5243548967072e-29, 1.2024538023802e+111));
-+insert into t1 values (POINT(0, 6.9835074892995e-251));
-+insert into t1 values (POINT(2.0880974297595e-53, 3.1050361846014e+231));
-+insert into t1 values (POINT(2.8728483499323e-188, 2.4600631144627e+260));
-+insert into t1 values (POINT(3.0517578125e-05, 2.0349165139404e+236));
-+insert into t1 values (POINT(1.1517219314031e+164, 1.1818212630766e-125));
-+insert into t1 values (POINT(2.481040258324e-265, 5.7766220027675e-275));
-+insert into t1 values (POINT(2.0880974297595e-53, 2.5243548967072e-29));
-+insert into t1 values (POINT(5.7766220027675e-275, 9.9464647281957e+86));
-+insert into t1 values (POINT(2.2181357552967e+130, 3.7857669957337e-270));
-+insert into t1 values (POINT(4.5767114681874e-246, 3.6893488147419e+19));
-+insert into t1 values (POINT(4.5767114681874e-246, 3.7537584144024e+255));
-+insert into t1 values (POINT(3.7857669957337e-270, 1.8033161362863e-130));
-+insert into t1 values (POINT(0, 5.8774717541114e-39));
-+insert into t1 values (POINT(1.1517219314031e+164, 2.2761049594727e-159));
-+insert into t1 values (POINT(6.243497100632e+144, 3.7857669957337e-270));
-+insert into t1 values (POINT(3.7857669957337e-270, 2.6355494858076e-82));
-+insert into t1 values (POINT(2.0349165139404e+236, 3.8518598887745e-34));
-+insert into t1 values (POINT(4.6566128730774e-10, 2.0880974297595e-53));
-+insert into t1 values (POINT(2.0880974297595e-53, 1.8827498946116e-183));
-+insert into t1 values (POINT(1.8033161362863e-130, 9.1248812352444e+192));
-+insert into t1 values (POINT(4.7783097267365e-299, 2.2761049594727e-159));
-+insert into t1 values (POINT(1.94906280228e+289, 1.2338789709327e-178));
- drop table t1;
+-int Item_geometry_func::get_geometry_type() const
+-{
+-  return (int)Field::GEOM_GEOMETRY;
+-}
  
- # End of 4.1 tests
-
---- a/mysql-test/t/gis.test	2009-02-15 09:26:08 +0000
-+++ b/mysql-test/t/gis.test	2009-04-28 09:47:26 +0000
-@@ -36,32 +36,32 @@ INSERT INTO gis_point VALUES 
- INSERT INTO gis_line VALUES
- (105, LineFromText('LINESTRING(0 0,0 10,10 0)')),
- (106, LineStringFromText('LINESTRING(10 10,20 10,20 20,10 20,10 10)')),
--(107, LineStringFromWKB(LineString(Point(10, 10), Point(40, 10))));
-+(107, LineStringFromWKB(AsWKB(LineString(Point(10, 10), Point(40, 10)))));
- 
- INSERT INTO gis_polygon VALUES
- (108, PolygonFromText('POLYGON((10 10,20 10,20 20,10 20,10 10))')),
- (109, PolyFromText('POLYGON((0 0,50 0,50 50,0 50,0 0), (10 10,20 10,20 20,10 20,10 10))')),
--(110, PolyFromWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(0, 0)))));
-+(110, PolyFromWKB(AsWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(0, 0))))));
- 
- INSERT INTO gis_multi_point VALUES
- (111, MultiPointFromText('MULTIPOINT(0 0,10 10,10 20,20 20)')),
- (112, MPointFromText('MULTIPOINT(1 1,11 11,11 21,21 21)')),
--(113, MPointFromWKB(MultiPoint(Point(3, 6), Point(4, 10))));
-+(113, MPointFromWKB(AsWKB(MultiPoint(Point(3, 6), Point(4, 10)))));
- 
- INSERT INTO gis_multi_line VALUES
- (114, MultiLineStringFromText('MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48))')),
- (115, MLineFromText('MULTILINESTRING((10 48,10 21,10 0))')),
--(116, MLineFromWKB(MultiLineString(LineString(Point(1, 2), Point(3, 5)), LineString(Point(2, 5), Point(5, 8), Point(21, 7)))));
-+(116, MLineFromWKB(AsWKB(MultiLineString(LineString(Point(1, 2), Point(3, 5)), LineString(Point(2, 5), Point(5, 8), Point(21, 7))))));
- 
- 
- INSERT INTO gis_multi_polygon VALUES
- (117, MultiPolygonFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')),
- (118, MPolyFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))')),
--(119, MPolyFromWKB(MultiPolygon(Polygon(LineString(Point(0, 3), Point(3, 3), Point(3, 0), Point(0, 3))))));
-+(119, MPolyFromWKB(AsWKB(MultiPolygon(Polygon(LineString(Point(0, 3), Point(3, 3), Point(3, 0), Point(0, 3)))))));
- 
- INSERT INTO gis_geometrycollection VALUES
- (120, GeomCollFromText('GEOMETRYCOLLECTION(POINT(0 0), LINESTRING(0 0,10 10))')),
--(121, GeometryFromWKB(GeometryCollection(Point(44, 6), LineString(Point(3, 6), Point(7, 9)))));
-+(121, GeometryFromWKB(AsWKB(GeometryCollection(Point(44, 6), LineString(Point(3, 6), Point(7, 9))))));
- 
- INSERT into gis_geometry SELECT * FROM gis_point;
- INSERT into gis_geometry SELECT * FROM gis_line;
-
---- a/sql/item_geofunc.cc	2007-11-17 12:48:57 +0000
-+++ b/sql/item_geofunc.cc	2009-04-28 09:47:26 +0000
-@@ -70,10 +70,17 @@ String *Item_func_geometry_from_wkb::val
+ String *Item_func_geometry_from_text::val_str(String *str)
  {
+@@ -74,10 +70,17 @@
+ {
    DBUG_ASSERT(fixed == 1);
    String arg_val;
 -  String *wkb= args[0]->val_str(&arg_val);
@@ -1106,7 +51,7 @@
    if ((arg_count == 2) && !args[1]->null_value)
      srid= (uint32)args[1]->val_int();
  
-@@ -83,8 +90,8 @@ String *Item_func_geometry_from_wkb::val
+@@ -87,8 +90,8 @@
    str->length(0);
    str->q_append(srid);
    if ((null_value= 
@@ -1117,7 +62,43 @@
      return 0;
    return str;
  }
-@@ -337,14 +344,16 @@ String *Item_func_point::val_str(String 
+@@ -160,9 +163,9 @@
+ }
+ 
+ 
+-int Item_func_envelope::get_geometry_type() const
++Field::geometry_type Item_func_envelope::get_geometry_type() const
+ {
+-  return (int) Field::GEOM_POLYGON;
++  return Field::GEOM_POLYGON;
+ }
+ 
+ 
+@@ -190,9 +193,9 @@
+ }
+ 
+ 
+-int Item_func_centroid::get_geometry_type() const
++Field::geometry_type Item_func_centroid::get_geometry_type() const
+ {
+-  return (int) Field::GEOM_POINT;
++  return Field::GEOM_POINT;
+ }
+ 
+ 
+@@ -330,9 +333,9 @@
+ */
+ 
+ 
+-int Item_func_point::get_geometry_type() const
++Field::geometry_type Item_func_point::get_geometry_type() const
+ {
+-  return (int) Field::GEOM_POINT;
++  return Field::GEOM_POINT;
+ }
+ 
+ 
+@@ -341,14 +344,16 @@
    DBUG_ASSERT(fixed == 1);
    double x= args[0]->val_real();
    double y= args[1]->val_real();
@@ -1135,7 +116,7 @@
    str->q_append((char)Geometry::wkb_ndr);
    str->q_append((uint32)Geometry::wkb_point);
    str->q_append(x);
-@@ -368,12 +377,14 @@ String *Item_func_spatial_collection::va
+@@ -372,12 +377,14 @@
    DBUG_ASSERT(fixed == 1);
    String arg_value;
    uint i;
@@ -1151,7 +132,7 @@
    str->q_append((char) Geometry::wkb_ndr);
    str->q_append((uint32) coll_type);
    str->q_append((uint32) arg_count);
-@@ -391,13 +402,13 @@ String *Item_func_spatial_collection::va
+@@ -395,13 +402,13 @@
  	In the case of GeometryCollection we don't need any checkings
  	for item types, so just copy them into target collection
        */
@@ -1167,7 +148,7 @@
  
        /*
  	In the case of named collection we must check that items
-@@ -406,7 +417,7 @@ String *Item_func_spatial_collection::va
+@@ -410,7 +417,7 @@
  
        wkb_type= (Geometry::wkbType) uint4korr(data);
        data+= 4;
@@ -1176,101 +157,102 @@
        if (wkb_type != item_type)
          goto err;
  
-
-
---Boundary_(ID_CxPl8cT7nUoENgIkwsMMOg)
-MIME-version: 1.0
-Content-type: text/bzr-bundle;
- name="bzr/holyfoot at stripped";
- charset=us-ascii
-Content-transfer-encoding: 7BIT
-Content-disposition: inline;
- filename="bzr/holyfoot at stripped"
-
-# Bazaar merge directive format 2 (Bazaar 0.90)
-# revision_id: holyfoot at stripped
-# target_branch: file:///home/hf/work/mysql_common/50mrg/
-# testament_sha1: c41ef5b25311545386e29a708f8fb2c792f43020
-# timestamp: 2009-04-28 14:48:13 +0500
-# base_revision_id: gshchepa at stripped
-# 
-# Begin bundle
-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
-dUt7H3GnOTr1fF7pi/xP+LuSKcKEgGXFXwg=
-
-
---Boundary_(ID_CxPl8cT7nUoENgIkwsMMOg)--
+--- mysql-dfsg-5.0-5.0.51a/sql/item_geofunc.cc	2009-09-05 12:29:48.000000000 +0200
++++ mysql-5.0.85/sql/item_geofunc.cc	2009-08-11 12:51:53.000000000 +0200
+@@ -27,21 +27,17 @@
+ Field *Item_geometry_func::tmp_table_field(TABLE *t_arg)
+ {
+   return new Field_geom(max_length, maybe_null, name, t_arg,
+-                        (Field::geometry_type) get_geometry_type());
++                        get_geometry_type());
+ }
+ 
+ void Item_geometry_func::fix_length_and_dec()
+ {
+   collation.set(&my_charset_bin);
+   decimals=0;
+-  max_length=MAX_BLOB_WIDTH;
++  max_length= max_field_size;
+   maybe_null= 1;
+ }
+ 
+-int Item_geometry_func::get_geometry_type() const
+-{
+-  return (int)Field::GEOM_GEOMETRY;
+-}
+ 
+ String *Item_func_geometry_from_text::val_str(String *str)
+ {
+@@ -167,9 +163,9 @@
+ }
+ 
+ 
+-int Item_func_envelope::get_geometry_type() const
++Field::geometry_type Item_func_envelope::get_geometry_type() const
+ {
+-  return (int) Field::GEOM_POLYGON;
++  return Field::GEOM_POLYGON;
+ }
+ 
+ 
+@@ -197,9 +193,9 @@
+ }
+ 
+ 
+-int Item_func_centroid::get_geometry_type() const
++Field::geometry_type Item_func_centroid::get_geometry_type() const
+ {
+-  return (int) Field::GEOM_POINT;
++  return Field::GEOM_POINT;
+ }
+ 
+ 
+@@ -337,9 +333,9 @@
+ */
+ 
+ 
+-int Item_func_point::get_geometry_type() const
++Field::geometry_type Item_func_point::get_geometry_type() const
+ {
+-  return (int) Field::GEOM_POINT;
++  return Field::GEOM_POINT;
+ }
+ 
+ 
+--- mysql-dfsg-5.0-5.0.51a/sql/item_geofunc.h	2008-01-11 15:43:40.000000000 +0100
++++ mysql-5.0.85/sql/item_geofunc.h	2009-08-11 12:51:53.000000000 +0200
+@@ -33,7 +33,6 @@
+   void fix_length_and_dec();
+   enum_field_types field_type() const  { return MYSQL_TYPE_GEOMETRY; }
+   Field *tmp_table_field(TABLE *t_arg);
+-  virtual int get_geometry_type() const;
+   bool is_null() { (void) val_int(); return null_value; }
+ };
+ 
+@@ -92,7 +91,7 @@
+   Item_func_centroid(Item *a): Item_geometry_func(a) {}
+   const char *func_name() const { return "centroid"; }
+   String *val_str(String *);
+-  int get_geometry_type() const;
++  Field::geometry_type get_geometry_type() const;
+ };
+ 
+ class Item_func_envelope: public Item_geometry_func
+@@ -101,7 +100,7 @@
+   Item_func_envelope(Item *a): Item_geometry_func(a) {}
+   const char *func_name() const { return "envelope"; }
+   String *val_str(String *);
+-  int get_geometry_type() const;
++  Field::geometry_type get_geometry_type() const;
+ };
+ 
+ class Item_func_point: public Item_geometry_func
+@@ -111,7 +110,7 @@
+   Item_func_point(Item *a, Item *b, Item *srid): Item_geometry_func(a, b, srid) {}
+   const char *func_name() const { return "point"; }
+   String *val_str(String *);
+-  int get_geometry_type() const;
++  Field::geometry_type get_geometry_type() const;
+ };
+ 
+ class Item_func_spatial_decomp: public Item_geometry_func




More information about the Pkg-mysql-commits mailing list