[Pkg-mysql-commits] r1594 - in mysql-dfsg-5.0/branches/lenny-proposed/debian: . patches

Norbert Tretkowski nobse at alioth.debian.org
Tue May 12 08:04:21 UTC 2009


tags 477072 pending
thanks

Author: nobse
Date: 2009-05-12 08:04:21 +0000 (Tue, 12 May 2009)
New Revision: 1594

Added:
   mysql-dfsg-5.0/branches/lenny-proposed/debian/patches/64_fix-dummy-thread-race-condition.dpatch
   mysql-dfsg-5.0/branches/lenny-proposed/debian/patches/65_fix_gis_functions_crash.dpatch
Removed:
   mysql-dfsg-5.0/branches/lenny-proposed/debian/patches/fix-dummy-thread-race-condition.dpatch
Modified:
   mysql-dfsg-5.0/branches/lenny-proposed/debian/changelog
   mysql-dfsg-5.0/branches/lenny-proposed/debian/patches/00list
Log:
Fix mysql bug 38990

Modified: mysql-dfsg-5.0/branches/lenny-proposed/debian/changelog
===================================================================
--- mysql-dfsg-5.0/branches/lenny-proposed/debian/changelog	2009-05-12 07:56:38 UTC (rev 1593)
+++ mysql-dfsg-5.0/branches/lenny-proposed/debian/changelog	2009-05-12 08:04:21 UTC (rev 1594)
@@ -1,12 +1,16 @@
 mysql-dfsg-5.0 (5.0.51a-25) UNRELEASED; urgency=low
 
-  * New patch fix-dummy-thread-race-condition.dpatch to back out an
+  [ Sean Finney ]
+  * New patch 64_fix-dummy-thread-race-condition.dpatch to back out an
     unneeded workaround that causes segfaults in libmysqlclient15. Thanks
-    to Martin Koegler for digging up the patch.
-    (closes: #524366, #513204).
+    to Martin Koegler for digging up the patch. (closes: #524366, #513204)
 
- -- Sean Finney <seanius at debian.org>  Sat, 18 Apr 2009 08:52:10 +0200
+  [ Norbert Tretkowski ]
+  * New patch 65_fix_gis_functions_crash.dpatch from 5.0.82 to fix a server
+    crash with arbitrary data input plus GIS functions. (closes: #477072)
 
+ -- Norbert Tretkowski <nobse at debian.org>  Tue, 12 May 2009 10:01:40 +0200
+
 mysql-dfsg-5.0 (5.0.51a-24+lenny1) stable-security; urgency=high
 
   * Non-maintainer upload by the security team.

Modified: mysql-dfsg-5.0/branches/lenny-proposed/debian/patches/00list
===================================================================
--- mysql-dfsg-5.0/branches/lenny-proposed/debian/patches/00list	2009-05-12 07:56:38 UTC (rev 1593)
+++ mysql-dfsg-5.0/branches/lenny-proposed/debian/patches/00list	2009-05-12 08:04:21 UTC (rev 1594)
@@ -23,6 +23,8 @@
 61_fix_leap_seconds.dpatch
 62_delete_with_self-join.dpatch
 63_update_ssl_certs.dpatch
+64_fix-dummy-thread-race-condition.dpatch
+65_fix_gis_functions_crash.dpatch
 86_PATH_MAX.dpatch
 89_ndb__staticlib.dpatch
 90_upstreamdebiandir.dpatch
@@ -30,4 +32,3 @@
 92_SECURITY_CVE-2008-4098.dpatch
 93_SECURITY_CVE-2008-3963.dpatch
 94_SECURITY_CVE-2008-4456.dpatch
-fix-dummy-thread-race-condition.dpatch

Copied: mysql-dfsg-5.0/branches/lenny-proposed/debian/patches/64_fix-dummy-thread-race-condition.dpatch (from rev 1592, mysql-dfsg-5.0/branches/lenny-proposed/debian/patches/fix-dummy-thread-race-condition.dpatch)
===================================================================
--- mysql-dfsg-5.0/branches/lenny-proposed/debian/patches/64_fix-dummy-thread-race-condition.dpatch	                        (rev 0)
+++ mysql-dfsg-5.0/branches/lenny-proposed/debian/patches/64_fix-dummy-thread-race-condition.dpatch	2009-05-12 08:04:21 UTC (rev 1594)
@@ -0,0 +1,67 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## fix-dummy-thread-race-condition.dpatch by  <mkoegler at auto.tuwien.ac.at>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Avoid dummy thread for pthread_exit workaround
+
+ at DPATCH@
+diff -urNad mysql-dfsg-5.0-5.0.51a~/mysys/my_thr_init.c mysql-dfsg-5.0-5.0.51a/mysys/my_thr_init.c
+--- mysql-dfsg-5.0-5.0.51a~/mysys/my_thr_init.c	2009-02-13 20:50:42.000000000 +0000
++++ mysql-dfsg-5.0-5.0.51a/mysys/my_thr_init.c	2009-02-13 20:56:05.000000000 +0000
+@@ -47,23 +47,6 @@
+ pthread_mutexattr_t my_errorcheck_mutexattr;
+ #endif
+ 
+-#ifdef TARGET_OS_LINUX
+-
+-/*
+- Dummy thread spawned in my_thread_global_init() below to avoid
+- race conditions in NPTL pthread_exit code.
+-*/
+-
+-static pthread_handler_t
+-nptl_pthread_exit_hack_handler(void *arg __attribute__((unused)))
+-{
+-  /* Do nothing! */
+-  pthread_exit(0);
+-  return 0;
+-}
+-
+-#endif /* TARGET_OS_LINUX */
+-
+ static uint get_thread_lib(void);
+ 
+ /*
+@@ -88,32 +71,6 @@
+     return 1;
+   }
+ 
+-#ifdef TARGET_OS_LINUX
+-  /*
+-    BUG#24507: Race conditions inside current NPTL pthread_exit()
+-    implementation.
+-
+-    To avoid a possible segmentation fault during concurrent
+-    executions of pthread_exit(), a dummy thread is spawned which
+-    initializes internal variables of pthread lib. See bug description
+-    for a full explanation.
+-
+-    TODO: Remove this code when fixed versions of glibc6 are in common
+-    use.
+-  */
+-  if (thd_lib_detected == THD_LIB_NPTL)
+-  {
+-    pthread_t       dummy_thread;
+-    pthread_attr_t  dummy_thread_attr;
+-
+-    pthread_attr_init(&dummy_thread_attr);
+-    pthread_attr_setdetachstate(&dummy_thread_attr, PTHREAD_CREATE_DETACHED);
+-
+-    pthread_create(&dummy_thread,&dummy_thread_attr,
+-                   nptl_pthread_exit_hack_handler, NULL);
+-  }
+-#endif /* TARGET_OS_LINUX */
+-
+ #ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
+   /*
+     Set mutex type to "fast" a.k.a "adaptive"


Property changes on: mysql-dfsg-5.0/branches/lenny-proposed/debian/patches/64_fix-dummy-thread-race-condition.dpatch
___________________________________________________________________
Added: svn:mergeinfo
   + 

Added: 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	                        (rev 0)
+++ mysql-dfsg-5.0/branches/lenny-proposed/debian/patches/65_fix_gis_functions_crash.dpatch	2009-05-12 08:04:21 UTC (rev 1594)
@@ -0,0 +1,1276 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 65_fix_gis_functions_crash.dpatch by Norbert Tretkowski <nobse at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## 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;
+ 
+ #
+@@ -802,35 +802,35 @@ 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;
+ 
+ # 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
+ {
+   DBUG_ASSERT(fixed == 1);
+   String arg_val;
+-  String *wkb= args[0]->val_str(&arg_val);
++  String *wkb;
+   Geometry_buffer buffer;
+   uint32 srid= 0;
+ 
++  if (args[0]->field_type() == MYSQL_TYPE_GEOMETRY)
++  {
++    return args[0]->val_str(str);
++  }
++
++  wkb= args[0]->val_str(&arg_val);
++
+   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
+   str->length(0);
+   str->q_append(srid);
+   if ((null_value= 
+-       (args[0]->null_value ||
+-        !Geometry::create_from_wkb(&buffer, wkb->ptr(), wkb->length(), str))))
++        (args[0]->null_value ||
++         !Geometry::create_from_wkb(&buffer, wkb->ptr(), wkb->length(), str))))
+     return 0;
+   return str;
+ }
+@@ -337,14 +344,16 @@ String *Item_func_point::val_str(String 
+   DBUG_ASSERT(fixed == 1);
+   double x= args[0]->val_real();
+   double y= args[1]->val_real();
++  uint32 srid= 0;
+ 
+   if ((null_value= (args[0]->null_value ||
+ 		    args[1]->null_value ||
+-		    str->realloc(1 + 4 + SIZEOF_STORED_DOUBLE*2))))
++                    str->realloc(4/*SRID*/ + 1 + 4 + SIZEOF_STORED_DOUBLE*2))))
+     return 0;
+ 
+   str->set_charset(&my_charset_bin);
+   str->length(0);
++  str->q_append(srid);
+   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
+   DBUG_ASSERT(fixed == 1);
+   String arg_value;
+   uint i;
++  uint32 srid= 0;
+ 
+   str->set_charset(&my_charset_bin);
+   str->length(0);
+-  if (str->reserve(1 + 4 + 4, 512))
++  if (str->reserve(4/*SRID*/ + 1 + 4 + 4, 512))
+     goto err;
+ 
++  str->q_append(srid);
+   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
+ 	In the case of GeometryCollection we don't need any checkings
+ 	for item types, so just copy them into target collection
+       */
+-      if (str->append(res->ptr(), len, (uint32) 512))
++      if (str->append(res->ptr() + 4/*SRID*/, len - 4/*SRID*/, (uint32) 512))
+         goto err;
+     }
+     else
+     {
+       enum Geometry::wkbType wkb_type;
+-      const char *data= res->ptr() + 1;
++      const char *data= res->ptr() + 4/*SRID*/ + 1;
+ 
+       /*
+ 	In the case of named collection we must check that items
+@@ -406,7 +417,7 @@ String *Item_func_spatial_collection::va
+ 
+       wkb_type= (Geometry::wkbType) uint4korr(data);
+       data+= 4;
+-      len-= 5;
++      len-= 5 + 4/*SRID*/;
+       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)--

Deleted: mysql-dfsg-5.0/branches/lenny-proposed/debian/patches/fix-dummy-thread-race-condition.dpatch
===================================================================
--- mysql-dfsg-5.0/branches/lenny-proposed/debian/patches/fix-dummy-thread-race-condition.dpatch	2009-05-12 07:56:38 UTC (rev 1593)
+++ mysql-dfsg-5.0/branches/lenny-proposed/debian/patches/fix-dummy-thread-race-condition.dpatch	2009-05-12 08:04:21 UTC (rev 1594)
@@ -1,67 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## fix-dummy-thread-race-condition.dpatch by  <mkoegler at auto.tuwien.ac.at>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Avoid dummy thread for pthread_exit workaround
-
- at DPATCH@
-diff -urNad mysql-dfsg-5.0-5.0.51a~/mysys/my_thr_init.c mysql-dfsg-5.0-5.0.51a/mysys/my_thr_init.c
---- mysql-dfsg-5.0-5.0.51a~/mysys/my_thr_init.c	2009-02-13 20:50:42.000000000 +0000
-+++ mysql-dfsg-5.0-5.0.51a/mysys/my_thr_init.c	2009-02-13 20:56:05.000000000 +0000
-@@ -47,23 +47,6 @@
- pthread_mutexattr_t my_errorcheck_mutexattr;
- #endif
- 
--#ifdef TARGET_OS_LINUX
--
--/*
-- Dummy thread spawned in my_thread_global_init() below to avoid
-- race conditions in NPTL pthread_exit code.
--*/
--
--static pthread_handler_t
--nptl_pthread_exit_hack_handler(void *arg __attribute__((unused)))
--{
--  /* Do nothing! */
--  pthread_exit(0);
--  return 0;
--}
--
--#endif /* TARGET_OS_LINUX */
--
- static uint get_thread_lib(void);
- 
- /*
-@@ -88,32 +71,6 @@
-     return 1;
-   }
- 
--#ifdef TARGET_OS_LINUX
--  /*
--    BUG#24507: Race conditions inside current NPTL pthread_exit()
--    implementation.
--
--    To avoid a possible segmentation fault during concurrent
--    executions of pthread_exit(), a dummy thread is spawned which
--    initializes internal variables of pthread lib. See bug description
--    for a full explanation.
--
--    TODO: Remove this code when fixed versions of glibc6 are in common
--    use.
--  */
--  if (thd_lib_detected == THD_LIB_NPTL)
--  {
--    pthread_t       dummy_thread;
--    pthread_attr_t  dummy_thread_attr;
--
--    pthread_attr_init(&dummy_thread_attr);
--    pthread_attr_setdetachstate(&dummy_thread_attr, PTHREAD_CREATE_DETACHED);
--
--    pthread_create(&dummy_thread,&dummy_thread_attr,
--                   nptl_pthread_exit_hack_handler, NULL);
--  }
--#endif /* TARGET_OS_LINUX */
--
- #ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
-   /*
-     Set mutex type to "fast" a.k.a "adaptive"




More information about the Pkg-mysql-commits mailing list