Below is the list of changes that have just been committed into a local
5.0 repository of tsmith. When tsmith does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-03-28 17:40:42-06:00, tsmith@stripped +5 -0
Update test for bug #24563 (MBROverlaps does not seem to function propertly.):
- Add primary key to test table, so NDB with binlog doesn't complain
- Add extra results for bdb_gis.result
mysql-test/include/gis_generic.inc@stripped, 2007-03-28 17:40:37-06:00, tsmith@stripped
+17 -16
Update test for bug #24563 (MBROverlaps does not seem to function propertly.):
- Add primary key to test table, so NDB with binlog doesn't complain
mysql-test/r/archive_gis.result@stripped, 2007-03-28 17:40:37-06:00, tsmith@stripped
+16 -16
update test results
mysql-test/r/bdb_gis.result@stripped, 2007-03-28 17:40:37-06:00, tsmith@stripped +41
-16
update test results
mysql-test/r/innodb_gis.result@stripped, 2007-03-28 17:40:37-06:00, tsmith@stripped +16
-16
update test results
mysql-test/r/ndb_gis.result@stripped, 2007-03-28 17:40:37-06:00, tsmith@stripped +32
-32
update test results
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: tsmith
# Host: siva.hindu.god
# Root: /home/tsmith/m/bk/maint/50
--- 1.5/mysql-test/include/gis_generic.inc 2007-03-23 16:28:02 -06:00
+++ 1.6/mysql-test/include/gis_generic.inc 2007-03-28 17:40:37 -06:00
@@ -188,28 +188,29 @@ drop table t1;
# Test all MBR* functions and their non-MBR-prefixed aliases,
# using shifted squares to verify the spatial relations.
-create table t1 (name VARCHAR(100), square GEOMETRY);
+# Primary key is needed for NDB with binlog
+CREATE TABLE t1 (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100),
square GEOMETRY);
-INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))'));
+INSERT INTO t1 (name, square) VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2
0, 0 0))'));
-INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))'));
-INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))'));
+INSERT INTO t1 (name, square) VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1
0, 0 0))'));
+INSERT INTO t1 (name, square) VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3
0, 0 0))'));
-INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))'));
-INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))'));
-INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))'));
+INSERT INTO t1 (name, square) VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2
1, 0 1))'));
+INSERT INTO t1 (name, square) VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2
2, 0 2))'));
+INSERT INTO t1 (name, square) VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2
3, 0 3))'));
-INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0
-1))'));
-INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0
-2))'));
-INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0
-3))'));
+INSERT INTO t1 (name, square) VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1,
2 -1, 0 -1))'));
+INSERT INTO t1 (name, square) VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0,
2 -2, 0 -2))'));
+INSERT INTO t1 (name, square) VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1,
2 -3, 0 -3))'));
-INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))'));
-INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))'));
-INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))'));
+INSERT INTO t1 (name, square) VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3
0, 1 0))'));
+INSERT INTO t1 (name, square) VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4
0, 2 0))'));
+INSERT INTO t1 (name, square) VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5
0, 3 0))'));
-INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1
0))'));
-INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2
0))'));
-INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3
0))'));
+INSERT INTO t1 (name, square) VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2,
1 0, -1 0))'));
+INSERT INTO t1 (name, square) VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2,
0 0, -2 0))'));
+INSERT INTO t1 (name, square) VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2,
-1 0, -3 0))'));
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON
MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON
MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
--- 1.5/mysql-test/r/archive_gis.result 2007-03-23 16:28:02 -06:00
+++ 1.6/mysql-test/r/archive_gis.result 2007-03-28 17:40:37 -06:00
@@ -457,22 +457,22 @@ insert into t1 values (pointfromtext('po
ERROR 23000: Column 'fl' cannot be null
drop table t1;
End of 4.1 tests
-create table t1 (name VARCHAR(100), square GEOMETRY);
-INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))'));
-INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))'));
-INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))'));
-INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))'));
-INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))'));
-INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))'));
-INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0
-1))'));
-INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0
-2))'));
-INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0
-3))'));
-INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))'));
-INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))'));
-INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))'));
-INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1
0))'));
-INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2
0))'));
-INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3
0))'));
+CREATE TABLE t1 (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100),
square GEOMETRY);
+INSERT INTO t1 (name, square) VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2
0, 0 0))'));
+INSERT INTO t1 (name, square) VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1
0, 0 0))'));
+INSERT INTO t1 (name, square) VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3
0, 0 0))'));
+INSERT INTO t1 (name, square) VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2
1, 0 1))'));
+INSERT INTO t1 (name, square) VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2
2, 0 2))'));
+INSERT INTO t1 (name, square) VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2
3, 0 3))'));
+INSERT INTO t1 (name, square) VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1,
2 -1, 0 -1))'));
+INSERT INTO t1 (name, square) VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0,
2 -2, 0 -2))'));
+INSERT INTO t1 (name, square) VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1,
2 -3, 0 -3))'));
+INSERT INTO t1 (name, square) VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3
0, 1 0))'));
+INSERT INTO t1 (name, square) VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4
0, 2 0))'));
+INSERT INTO t1 (name, square) VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5
0, 3 0))'));
+INSERT INTO t1 (name, square) VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2,
1 0, -1 0))'));
+INSERT INTO t1 (name, square) VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2,
0 0, -2 0))'));
+INSERT INTO t1 (name, square) VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2,
-1 0, -3 0))'));
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON
MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
mbrcontains
center,small
--- 1.5/mysql-test/r/bdb_gis.result 2007-03-23 16:28:02 -06:00
+++ 1.6/mysql-test/r/bdb_gis.result 2007-03-28 17:40:37 -06:00
@@ -457,22 +457,22 @@ insert into t1 values (pointfromtext('po
ERROR 23000: Column 'fl' cannot be null
drop table t1;
End of 4.1 tests
-create table t1 (name VARCHAR(100), square GEOMETRY);
-INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))'));
-INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))'));
-INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))'));
-INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))'));
-INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))'));
-INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))'));
-INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0
-1))'));
-INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0
-2))'));
-INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0
-3))'));
-INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))'));
-INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))'));
-INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))'));
-INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1
0))'));
-INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2
0))'));
-INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3
0))'));
+CREATE TABLE t1 (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100),
square GEOMETRY);
+INSERT INTO t1 (name, square) VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2
0, 0 0))'));
+INSERT INTO t1 (name, square) VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1
0, 0 0))'));
+INSERT INTO t1 (name, square) VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3
0, 0 0))'));
+INSERT INTO t1 (name, square) VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2
1, 0 1))'));
+INSERT INTO t1 (name, square) VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2
2, 0 2))'));
+INSERT INTO t1 (name, square) VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2
3, 0 3))'));
+INSERT INTO t1 (name, square) VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1,
2 -1, 0 -1))'));
+INSERT INTO t1 (name, square) VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0,
2 -2, 0 -2))'));
+INSERT INTO t1 (name, square) VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1,
2 -3, 0 -3))'));
+INSERT INTO t1 (name, square) VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3
0, 1 0))'));
+INSERT INTO t1 (name, square) VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4
0, 2 0))'));
+INSERT INTO t1 (name, square) VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5
0, 3 0))'));
+INSERT INTO t1 (name, square) VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2,
1 0, -1 0))'));
+INSERT INTO t1 (name, square) VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2,
0 0, -2 0))'));
+INSERT INTO t1 (name, square) VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2,
-1 0, -3 0))'));
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON
MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
mbrcontains
center,small
@@ -515,5 +515,30 @@ down2,left2,right2,up2
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON
Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
within
big,center
+SET @vert1 = GeomFromText('POLYGON ((0 -2, 0 2, 0 -2))');
+SET @horiz1 = GeomFromText('POLYGON ((-2 0, 2 0, -2 0))');
+SET @horiz2 = GeomFromText('POLYGON ((-1 0, 3 0, -1 0))');
+SET @horiz3 = GeomFromText('POLYGON ((2 0, 3 0, 2 0))');
+SET @point1 = GeomFromText('POLYGON ((0 0))');
+SET @point2 = GeomFromText('POLYGON ((-2 0))');
+SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE
Overlaps(a1.square, @vert1) GROUP BY a1.name;
+overlaps
+SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE
Overlaps(a1.square, @horiz1) GROUP BY a1.name;
+overlaps
+SELECT Overlaps(@horiz1, @vert1) FROM DUAL;
+Overlaps(@horiz1, @vert1)
+0
+SELECT Overlaps(@horiz1, @horiz2) FROM DUAL;
+Overlaps(@horiz1, @horiz2)
+1
+SELECT Overlaps(@horiz1, @horiz3) FROM DUAL;
+Overlaps(@horiz1, @horiz3)
+0
+SELECT Overlaps(@horiz1, @point1) FROM DUAL;
+Overlaps(@horiz1, @point1)
+0
+SELECT Overlaps(@horiz1, @point2) FROM DUAL;
+Overlaps(@horiz1, @point2)
+0
DROP TABLE t1;
End of 5.0 tests
--- 1.5/mysql-test/r/innodb_gis.result 2007-03-23 16:28:02 -06:00
+++ 1.6/mysql-test/r/innodb_gis.result 2007-03-28 17:40:37 -06:00
@@ -457,22 +457,22 @@ insert into t1 values (pointfromtext('po
ERROR 23000: Column 'fl' cannot be null
drop table t1;
End of 4.1 tests
-create table t1 (name VARCHAR(100), square GEOMETRY);
-INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))'));
-INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))'));
-INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))'));
-INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))'));
-INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))'));
-INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))'));
-INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0
-1))'));
-INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0
-2))'));
-INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0
-3))'));
-INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))'));
-INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))'));
-INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))'));
-INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1
0))'));
-INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2
0))'));
-INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3
0))'));
+CREATE TABLE t1 (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100),
square GEOMETRY);
+INSERT INTO t1 (name, square) VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2
0, 0 0))'));
+INSERT INTO t1 (name, square) VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1
0, 0 0))'));
+INSERT INTO t1 (name, square) VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3
0, 0 0))'));
+INSERT INTO t1 (name, square) VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2
1, 0 1))'));
+INSERT INTO t1 (name, square) VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2
2, 0 2))'));
+INSERT INTO t1 (name, square) VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2
3, 0 3))'));
+INSERT INTO t1 (name, square) VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1,
2 -1, 0 -1))'));
+INSERT INTO t1 (name, square) VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0,
2 -2, 0 -2))'));
+INSERT INTO t1 (name, square) VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1,
2 -3, 0 -3))'));
+INSERT INTO t1 (name, square) VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3
0, 1 0))'));
+INSERT INTO t1 (name, square) VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4
0, 2 0))'));
+INSERT INTO t1 (name, square) VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5
0, 3 0))'));
+INSERT INTO t1 (name, square) VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2,
1 0, -1 0))'));
+INSERT INTO t1 (name, square) VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2,
0 0, -2 0))'));
+INSERT INTO t1 (name, square) VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2,
-1 0, -3 0))'));
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON
MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
mbrcontains
center,small
--- 1.6/mysql-test/r/ndb_gis.result 2007-03-23 16:28:02 -06:00
+++ 1.7/mysql-test/r/ndb_gis.result 2007-03-28 17:40:37 -06:00
@@ -457,22 +457,22 @@ insert into t1 values (pointfromtext('po
ERROR 23000: Column 'fl' cannot be null
drop table t1;
End of 4.1 tests
-create table t1 (name VARCHAR(100), square GEOMETRY);
-INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))'));
-INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))'));
-INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))'));
-INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))'));
-INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))'));
-INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))'));
-INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0
-1))'));
-INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0
-2))'));
-INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0
-3))'));
-INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))'));
-INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))'));
-INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))'));
-INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1
0))'));
-INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2
0))'));
-INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3
0))'));
+CREATE TABLE t1 (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100),
square GEOMETRY);
+INSERT INTO t1 (name, square) VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2
0, 0 0))'));
+INSERT INTO t1 (name, square) VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1
0, 0 0))'));
+INSERT INTO t1 (name, square) VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3
0, 0 0))'));
+INSERT INTO t1 (name, square) VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2
1, 0 1))'));
+INSERT INTO t1 (name, square) VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2
2, 0 2))'));
+INSERT INTO t1 (name, square) VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2
3, 0 3))'));
+INSERT INTO t1 (name, square) VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1,
2 -1, 0 -1))'));
+INSERT INTO t1 (name, square) VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0,
2 -2, 0 -2))'));
+INSERT INTO t1 (name, square) VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1,
2 -3, 0 -3))'));
+INSERT INTO t1 (name, square) VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3
0, 1 0))'));
+INSERT INTO t1 (name, square) VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4
0, 2 0))'));
+INSERT INTO t1 (name, square) VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5
0, 3 0))'));
+INSERT INTO t1 (name, square) VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2,
1 0, -1 0))'));
+INSERT INTO t1 (name, square) VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2,
0 0, -2 0))'));
+INSERT INTO t1 (name, square) VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2,
-1 0, -3 0))'));
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON
MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
mbrcontains
center,small
@@ -1001,22 +1001,22 @@ insert into t1 values (pointfromtext('po
ERROR 23000: Column 'fl' cannot be null
drop table t1;
End of 4.1 tests
-create table t1 (name VARCHAR(100), square GEOMETRY);
-INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))'));
-INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))'));
-INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))'));
-INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))'));
-INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))'));
-INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))'));
-INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0
-1))'));
-INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0
-2))'));
-INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0
-3))'));
-INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))'));
-INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))'));
-INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))'));
-INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1
0))'));
-INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2
0))'));
-INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3
0))'));
+CREATE TABLE t1 (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100),
square GEOMETRY);
+INSERT INTO t1 (name, square) VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2
0, 0 0))'));
+INSERT INTO t1 (name, square) VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1
0, 0 0))'));
+INSERT INTO t1 (name, square) VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3
0, 0 0))'));
+INSERT INTO t1 (name, square) VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2
1, 0 1))'));
+INSERT INTO t1 (name, square) VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2
2, 0 2))'));
+INSERT INTO t1 (name, square) VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2
3, 0 3))'));
+INSERT INTO t1 (name, square) VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1,
2 -1, 0 -1))'));
+INSERT INTO t1 (name, square) VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0,
2 -2, 0 -2))'));
+INSERT INTO t1 (name, square) VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1,
2 -3, 0 -3))'));
+INSERT INTO t1 (name, square) VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3
0, 1 0))'));
+INSERT INTO t1 (name, square) VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4
0, 2 0))'));
+INSERT INTO t1 (name, square) VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5
0, 3 0))'));
+INSERT INTO t1 (name, square) VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2,
1 0, -1 0))'));
+INSERT INTO t1 (name, square) VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2,
0 0, -2 0))'));
+INSERT INTO t1 (name, square) VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2,
-1 0, -3 0))'));
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON
MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
mbrcontains
center,small
| Thread |
|---|
| • bk commit into 5.0 tree (tsmith:1.2427) BUG#24563 | tim | 29 Mar |