mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
merge
This commit is contained in:
commit
33723996a8
19 changed files with 580 additions and 538 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -83,4 +83,4 @@ sync_slave_with_master;
|
|||
# will be created. You will need to go to the mysql-test dir and diff
|
||||
# the files your self to see what is not matching
|
||||
|
||||
--exec diff $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql
|
||||
--diff_files $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
rm -f $MYSQLTEST_VARDIR/slave-data/master.info
|
|
@ -244,7 +244,7 @@ connection master;
|
|||
|
||||
# We should be gold by the time, so I will get rid of our file.
|
||||
|
||||
--exec rm $MYSQLTEST_VARDIR/tmp/remote.sql
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/remote.sql
|
||||
################### End Bug 17654 ######################
|
||||
|
||||
# What is the point of this test? It seems entirely pointless. It
|
||||
|
@ -349,9 +349,9 @@ FLUSH LOGS;
|
|||
|
||||
--diff_files $MYSQLTEST_VARDIR/tmp/local.sql $MYSQLTEST_VARDIR/tmp/remote.sql
|
||||
|
||||
--exec rm $MYSQLTEST_VARDIR/tmp/remote.sql
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/remote.sql
|
||||
|
||||
--exec rm $MYSQLTEST_VARDIR/tmp/local.sql
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/local.sql
|
||||
|
||||
DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5;
|
||||
sync_slave_with_master;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -37,32 +37,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;
|
||||
|
|
|
@ -8,17 +8,17 @@
|
|||
delimiter |;
|
||||
|
||||
#
|
||||
# Bug #13270 INSERT,UPDATE,etc that calls func with side-effect does not binlog
|
||||
# Bug #23333 stored function + non-transac table + transac table =
|
||||
# breaks stmt-based binlog
|
||||
# Bug #27395 OPTION_STATUS_NO_TRANS_UPDATE is not preserved at the end of SF()
|
||||
# Bug#13270 INSERT,UPDATE,etc that calls func with side-effect does not binlog
|
||||
# Bug#23333 stored function + non-transac table + transac table =
|
||||
# breaks stmt-based binlog
|
||||
# Bug#27395 OPTION_STATUS_NO_TRANS_UPDATE is not preserved at the end of SF()
|
||||
#
|
||||
--disable_warnings
|
||||
drop function if exists bug23333|
|
||||
drop table if exists t1,t2|
|
||||
--enable_warnings
|
||||
CREATE TABLE t1 (a int NOT NULL auto_increment primary key) ENGINE=MyISAM|
|
||||
CREATE TABLE t2 (a int NOT NULL auto_increment, b int, PRIMARY KEY (a)) ENGINE=InnoDB|
|
||||
CREATE TABLE t1 (a int NOT NULL auto_increment primary key) ENGINE=MyISAM|
|
||||
CREATE TABLE t2 (a int NOT NULL auto_increment, b int, PRIMARY KEY (a)) ENGINE=InnoDB|
|
||||
|
||||
insert into t2 values (1,1)|
|
||||
|
||||
|
|
|
@ -78,10 +78,17 @@ String *Item_func_geometry_from_wkb::val_str(String *str)
|
|||
{
|
||||
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();
|
||||
|
||||
|
@ -91,8 +98,8 @@ String *Item_func_geometry_from_wkb::val_str(String *str)
|
|||
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;
|
||||
}
|
||||
|
@ -345,14 +352,16 @@ String *Item_func_point::val_str(String *str)
|
|||
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);
|
||||
|
@ -376,12 +385,14 @@ String *Item_func_spatial_collection::val_str(String *str)
|
|||
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);
|
||||
|
@ -399,13 +410,13 @@ String *Item_func_spatial_collection::val_str(String *str)
|
|||
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
|
||||
|
@ -414,7 +425,7 @@ String *Item_func_spatial_collection::val_str(String *str)
|
|||
|
||||
wkb_type= (Geometry::wkbType) uint4korr(data);
|
||||
data+= 4;
|
||||
len-= 5;
|
||||
len-= 5 + 4/*SRID*/;
|
||||
if (wkb_type != item_type)
|
||||
goto err;
|
||||
|
||||
|
|
|
@ -340,8 +340,7 @@ Rpl_filter::add_wild_table_rule(DYNAMIC_ARRAY* a, const char* table_spec)
|
|||
e->tbl_name= e->db + (dot - table_spec) + 1;
|
||||
e->key_len= len;
|
||||
memcpy(e->db, table_spec, len);
|
||||
insert_dynamic(a, (uchar*)&e);
|
||||
return 0;
|
||||
return insert_dynamic(a, (uchar*)&e);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2132,17 +2132,16 @@ sp_head::restore_lex(THD *thd)
|
|||
/**
|
||||
Put the instruction on the backpatch list, associated with the label.
|
||||
*/
|
||||
void
|
||||
int
|
||||
sp_head::push_backpatch(sp_instr *i, sp_label_t *lab)
|
||||
{
|
||||
bp_t *bp= (bp_t *)sql_alloc(sizeof(bp_t));
|
||||
|
||||
if (bp)
|
||||
{
|
||||
bp->lab= lab;
|
||||
bp->instr= i;
|
||||
(void)m_backpatch.push_front(bp);
|
||||
}
|
||||
if (!bp)
|
||||
return 1;
|
||||
bp->lab= lab;
|
||||
bp->instr= i;
|
||||
return m_backpatch.push_front(bp);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2217,7 +2216,7 @@ sp_head::fill_field_definition(THD *thd, LEX *lex,
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
int
|
||||
sp_head::new_cont_backpatch(sp_instr_opt_meta *i)
|
||||
{
|
||||
m_cont_level+= 1;
|
||||
|
@ -2225,15 +2224,17 @@ sp_head::new_cont_backpatch(sp_instr_opt_meta *i)
|
|||
{
|
||||
/* Use the cont. destination slot to store the level */
|
||||
i->m_cont_dest= m_cont_level;
|
||||
(void)m_cont_backpatch.push_front(i);
|
||||
if (m_cont_backpatch.push_front(i))
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
int
|
||||
sp_head::add_cont_backpatch(sp_instr_opt_meta *i)
|
||||
{
|
||||
i->m_cont_dest= m_cont_level;
|
||||
(void)m_cont_backpatch.push_front(i);
|
||||
return m_cont_backpatch.push_front(i);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -2469,7 +2470,7 @@ sp_head::show_create_routine(THD *thd, int type)
|
|||
@param instr Instruction
|
||||
*/
|
||||
|
||||
void sp_head::add_instr(sp_instr *instr)
|
||||
int sp_head::add_instr(sp_instr *instr)
|
||||
{
|
||||
instr->free_list= m_thd->free_list;
|
||||
m_thd->free_list= 0;
|
||||
|
@ -2480,7 +2481,7 @@ void sp_head::add_instr(sp_instr *instr)
|
|||
entire stored procedure, as their life span is equal.
|
||||
*/
|
||||
instr->mem_root= &main_mem_root;
|
||||
insert_dynamic(&m_instr, (uchar*)&instr);
|
||||
return insert_dynamic(&m_instr, (uchar*)&instr);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -308,7 +308,7 @@ public:
|
|||
bool
|
||||
show_create_routine(THD *thd, int type);
|
||||
|
||||
void
|
||||
int
|
||||
add_instr(sp_instr *instr);
|
||||
|
||||
inline uint
|
||||
|
@ -344,7 +344,7 @@ public:
|
|||
restore_lex(THD *thd);
|
||||
|
||||
/// Put the instruction on the backpatch list, associated with the label.
|
||||
void
|
||||
int
|
||||
push_backpatch(sp_instr *, struct sp_label *);
|
||||
|
||||
/// Update all instruction with this label in the backpatch list to
|
||||
|
@ -353,11 +353,11 @@ public:
|
|||
backpatch(struct sp_label *);
|
||||
|
||||
/// Start a new cont. backpatch level. If 'i' is NULL, the level is just incr.
|
||||
void
|
||||
int
|
||||
new_cont_backpatch(sp_instr_opt_meta *i);
|
||||
|
||||
/// Add an instruction to the current level
|
||||
void
|
||||
int
|
||||
add_cont_backpatch(sp_instr_opt_meta *i);
|
||||
|
||||
/// Backpatch (and pop) the current level to the current position.
|
||||
|
|
|
@ -265,8 +265,8 @@ sp_pcontext::push_variable(LEX_STRING *name, enum enum_field_types type,
|
|||
p->mode= mode;
|
||||
p->offset= current_var_count();
|
||||
p->dflt= NULL;
|
||||
insert_dynamic(&m_vars, (uchar*)&p);
|
||||
|
||||
if (insert_dynamic(&m_vars, (uchar*)&p))
|
||||
return NULL;
|
||||
return p;
|
||||
}
|
||||
|
||||
|
@ -310,18 +310,17 @@ sp_pcontext::find_label(char *name)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
int
|
||||
sp_pcontext::push_cond(LEX_STRING *name, sp_cond_type_t *val)
|
||||
{
|
||||
sp_cond_t *p= (sp_cond_t *)sql_alloc(sizeof(sp_cond_t));
|
||||
|
||||
if (p)
|
||||
{
|
||||
p->name.str= name->str;
|
||||
p->name.length= name->length;
|
||||
p->val= val;
|
||||
insert_dynamic(&m_conds, (uchar*)&p);
|
||||
}
|
||||
if (p == NULL)
|
||||
return 1;
|
||||
p->name.str= name->str;
|
||||
p->name.length= name->length;
|
||||
p->val= val;
|
||||
return insert_dynamic(&m_conds, (uchar *)&p);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -384,7 +383,7 @@ sp_pcontext::find_handler(sp_cond_type_t *cond)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
int
|
||||
sp_pcontext::push_cursor(LEX_STRING *name)
|
||||
{
|
||||
LEX_STRING n;
|
||||
|
@ -393,7 +392,7 @@ sp_pcontext::push_cursor(LEX_STRING *name)
|
|||
m_max_cursor_index+= 1;
|
||||
n.str= name->str;
|
||||
n.length= name->length;
|
||||
insert_dynamic(&m_cursors, (uchar*)&n);
|
||||
return insert_dynamic(&m_cursors, (uchar *)&n);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -323,7 +323,7 @@ public:
|
|||
// Conditions
|
||||
//
|
||||
|
||||
void
|
||||
int
|
||||
push_cond(LEX_STRING *name, sp_cond_type_t *val);
|
||||
|
||||
inline void
|
||||
|
@ -365,7 +365,7 @@ public:
|
|||
// Cursors
|
||||
//
|
||||
|
||||
void
|
||||
int
|
||||
push_cursor(LEX_STRING *name);
|
||||
|
||||
my_bool
|
||||
|
|
|
@ -3476,14 +3476,6 @@ add_key_fields(JOIN *join, KEY_FIELD **key_fields, uint *and_level,
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Add all keys with uses 'field' for some keypart.
|
||||
|
||||
If field->and_level != and_level then only mark key_part as const_part.
|
||||
|
||||
@todo
|
||||
ft-keys in non-ft queries. SerG
|
||||
*/
|
||||
|
||||
static uint
|
||||
max_part_bit(key_part_map bits)
|
||||
|
@ -3493,7 +3485,16 @@ max_part_bit(key_part_map bits)
|
|||
return found;
|
||||
}
|
||||
|
||||
static void
|
||||
/*
|
||||
Add all keys with uses 'field' for some keypart
|
||||
If field->and_level != and_level then only mark key_part as const_part
|
||||
|
||||
RETURN
|
||||
0 - OK
|
||||
1 - Out of memory.
|
||||
*/
|
||||
|
||||
static bool
|
||||
add_key_part(DYNAMIC_ARRAY *keyuse_array,KEY_FIELD *key_field)
|
||||
{
|
||||
Field *field=key_field->field;
|
||||
|
@ -3523,24 +3524,26 @@ add_key_part(DYNAMIC_ARRAY *keyuse_array,KEY_FIELD *key_field)
|
|||
keyuse.optimize= key_field->optimize & KEY_OPTIMIZE_REF_OR_NULL;
|
||||
keyuse.null_rejecting= key_field->null_rejecting;
|
||||
keyuse.cond_guard= key_field->cond_guard;
|
||||
VOID(insert_dynamic(keyuse_array,(uchar*) &keyuse));
|
||||
if (insert_dynamic(keyuse_array,(uchar*) &keyuse))
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
#define FT_KEYPART (MAX_REF_PARTS+10)
|
||||
|
||||
static void
|
||||
static bool
|
||||
add_ft_keys(DYNAMIC_ARRAY *keyuse_array,
|
||||
JOIN_TAB *stat,COND *cond,table_map usable_tables)
|
||||
{
|
||||
Item_func_match *cond_func=NULL;
|
||||
|
||||
if (!cond)
|
||||
return;
|
||||
return FALSE;
|
||||
|
||||
if (cond->type() == Item::FUNC_ITEM)
|
||||
{
|
||||
|
@ -3574,13 +3577,16 @@ add_ft_keys(DYNAMIC_ARRAY *keyuse_array,
|
|||
{
|
||||
Item *item;
|
||||
while ((item=li++))
|
||||
add_ft_keys(keyuse_array,stat,item,usable_tables);
|
||||
{
|
||||
if (add_ft_keys(keyuse_array,stat,item,usable_tables))
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!cond_func || cond_func->key == NO_SUCH_KEY ||
|
||||
!(usable_tables & cond_func->table->map))
|
||||
return;
|
||||
return FALSE;
|
||||
|
||||
KEYUSE keyuse;
|
||||
keyuse.table= cond_func->table;
|
||||
|
@ -3590,7 +3596,7 @@ add_ft_keys(DYNAMIC_ARRAY *keyuse_array,
|
|||
keyuse.used_tables=cond_func->key_item()->used_tables();
|
||||
keyuse.optimize= 0;
|
||||
keyuse.keypart_map= 0;
|
||||
VOID(insert_dynamic(keyuse_array,(uchar*) &keyuse));
|
||||
return insert_dynamic(keyuse_array,(uchar*) &keyuse);
|
||||
}
|
||||
|
||||
|
||||
|
@ -3744,7 +3750,8 @@ update_ref_and_keys(THD *thd, DYNAMIC_ARRAY *keyuse,JOIN_TAB *join_tab,
|
|||
sargables);
|
||||
for (; field != end ; field++)
|
||||
{
|
||||
add_key_part(keyuse,field);
|
||||
if (add_key_part(keyuse,field))
|
||||
return TRUE;
|
||||
/* Mark that we can optimize LEFT JOIN */
|
||||
if (field->val->type() == Item::NULL_ITEM &&
|
||||
!field->field->real_maybe_null())
|
||||
|
@ -3782,11 +3789,15 @@ update_ref_and_keys(THD *thd, DYNAMIC_ARRAY *keyuse,JOIN_TAB *join_tab,
|
|||
|
||||
/* fill keyuse with found key parts */
|
||||
for ( ; field != end ; field++)
|
||||
add_key_part(keyuse,field);
|
||||
{
|
||||
if (add_key_part(keyuse,field))
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (select_lex->ftfunc_list->elements)
|
||||
{
|
||||
add_ft_keys(keyuse,join_tab,cond,normal_tables);
|
||||
if (add_ft_keys(keyuse,join_tab,cond,normal_tables))
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -3807,7 +3818,8 @@ update_ref_and_keys(THD *thd, DYNAMIC_ARRAY *keyuse,JOIN_TAB *join_tab,
|
|||
(qsort_cmp) sort_keyuse);
|
||||
|
||||
bzero((char*) &key_end,sizeof(key_end)); /* Add for easy testing */
|
||||
VOID(insert_dynamic(keyuse,(uchar*) &key_end));
|
||||
if (insert_dynamic(keyuse,(uchar*) &key_end))
|
||||
return TRUE;
|
||||
|
||||
use=save_pos=dynamic_element(keyuse,0,KEYUSE*);
|
||||
prev= &key_end;
|
||||
|
|
169
sql/sql_yacc.yy
169
sql/sql_yacc.yy
|
@ -280,9 +280,7 @@ int case_stmt_action_expr(LEX *lex, Item* expr)
|
|||
parsing_ctx, case_expr_id, expr, lex);
|
||||
|
||||
sp->add_cont_backpatch(i);
|
||||
sp->add_instr(i);
|
||||
|
||||
return 0;
|
||||
return sp->add_instr(i);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -293,7 +291,7 @@ int case_stmt_action_expr(LEX *lex, Item* expr)
|
|||
@param simple true for simple cases, false for searched cases
|
||||
*/
|
||||
|
||||
void case_stmt_action_when(LEX *lex, Item *when, bool simple)
|
||||
int case_stmt_action_when(LEX *lex, Item *when, bool simple)
|
||||
{
|
||||
sp_head *sp= lex->sphead;
|
||||
sp_pcontext *ctx= lex->spcont;
|
||||
|
@ -325,9 +323,10 @@ void case_stmt_action_when(LEX *lex, Item *when, bool simple)
|
|||
(jump_if_not from instruction 2 to 5, 5 to 8 ... in the example)
|
||||
*/
|
||||
|
||||
sp->push_backpatch(i, ctx->push_label((char *)"", 0));
|
||||
sp->add_cont_backpatch(i);
|
||||
sp->add_instr(i);
|
||||
return !test(i) ||
|
||||
sp->push_backpatch(i, ctx->push_label((char *)"", 0)) ||
|
||||
sp->add_cont_backpatch(i) ||
|
||||
sp->add_instr(i);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -336,13 +335,14 @@ void case_stmt_action_when(LEX *lex, Item *when, bool simple)
|
|||
@param lex the parser lex context
|
||||
*/
|
||||
|
||||
void case_stmt_action_then(LEX *lex)
|
||||
int case_stmt_action_then(LEX *lex)
|
||||
{
|
||||
sp_head *sp= lex->sphead;
|
||||
sp_pcontext *ctx= lex->spcont;
|
||||
uint ip= sp->instructions();
|
||||
sp_instr_jump *i = new sp_instr_jump(ip, ctx);
|
||||
sp->add_instr(i);
|
||||
if (!test(i) || sp->add_instr(i))
|
||||
return 1;
|
||||
|
||||
/*
|
||||
BACKPATCH: Resolving forward jump from
|
||||
|
@ -358,7 +358,7 @@ void case_stmt_action_then(LEX *lex)
|
|||
(jump from instruction 4 to 12, 7 to 12 ... in the example)
|
||||
*/
|
||||
|
||||
sp->push_backpatch(i, ctx->last_label());
|
||||
return sp->push_backpatch(i, ctx->last_label());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2322,10 +2322,9 @@ sp_decl:
|
|||
var_type,
|
||||
lex,
|
||||
(i == num_vars - 1));
|
||||
if (is == NULL)
|
||||
if (is == NULL ||
|
||||
lex->sphead->add_instr(is))
|
||||
MYSQL_YYABORT;
|
||||
|
||||
lex->sphead->add_instr(is);
|
||||
}
|
||||
|
||||
pctx->declare_var_boundary(0);
|
||||
|
@ -2339,12 +2338,13 @@ sp_decl:
|
|||
LEX *lex= Lex;
|
||||
sp_pcontext *spc= lex->spcont;
|
||||
|
||||
if (spc->find_cond(&$2, TRUE))
|
||||
{
|
||||
my_error(ER_SP_DUP_COND, MYF(0), $2.str);
|
||||
if (spc->find_cond(&$2, TRUE))
|
||||
{
|
||||
my_error(ER_SP_DUP_COND, MYF(0), $2.str);
|
||||
MYSQL_YYABORT;
|
||||
}
|
||||
if(YYTHD->lex->spcont->push_cond(&$2, $5))
|
||||
MYSQL_YYABORT;
|
||||
}
|
||||
YYTHD->lex->spcont->push_cond(&$2, $5);
|
||||
$$.vars= $$.hndlrs= $$.curs= 0;
|
||||
$$.conds= 1;
|
||||
}
|
||||
|
@ -2358,11 +2358,11 @@ sp_decl:
|
|||
sp_pcontext *ctx= lex->spcont;
|
||||
sp_instr_hpush_jump *i=
|
||||
new sp_instr_hpush_jump(sp->instructions(), ctx, $2,
|
||||
ctx->current_var_count());
|
||||
if (i == NULL)
|
||||
ctx->current_var_count());
|
||||
if (i == NULL ||
|
||||
sp->add_instr(i) ||
|
||||
sp->push_backpatch(i, ctx->push_label((char *)"", 0)))
|
||||
MYSQL_YYABORT;
|
||||
sp->add_instr(i);
|
||||
sp->push_backpatch(i, ctx->push_label((char *)"", 0));
|
||||
}
|
||||
sp_hcond_list sp_proc_stmt
|
||||
{
|
||||
|
@ -2376,17 +2376,17 @@ sp_decl:
|
|||
{
|
||||
i= new sp_instr_hreturn(sp->instructions(), ctx,
|
||||
ctx->current_var_count());
|
||||
if (i == NULL)
|
||||
if (i == NULL ||
|
||||
sp->add_instr(i))
|
||||
MYSQL_YYABORT;
|
||||
sp->add_instr(i);
|
||||
}
|
||||
else
|
||||
{ /* EXIT or UNDO handler, just jump to the end of the block */
|
||||
i= new sp_instr_hreturn(sp->instructions(), ctx, 0);
|
||||
if (i == NULL)
|
||||
if (i == NULL ||
|
||||
sp->add_instr(i) ||
|
||||
sp->push_backpatch(i, lex->spcont->last_label())) /* Block end */
|
||||
MYSQL_YYABORT;
|
||||
sp->add_instr(i);
|
||||
sp->push_backpatch(i, lex->spcont->last_label()); /* Block end */
|
||||
}
|
||||
lex->sphead->backpatch(hlab);
|
||||
|
||||
|
@ -2412,10 +2412,10 @@ sp_decl:
|
|||
}
|
||||
i= new sp_instr_cpush(sp->instructions(), ctx, $5,
|
||||
ctx->current_cursor_count());
|
||||
if (i == NULL)
|
||||
if (i == NULL ||
|
||||
sp->add_instr(i) ||
|
||||
ctx->push_cursor(&$2))
|
||||
MYSQL_YYABORT;
|
||||
sp->add_instr(i);
|
||||
ctx->push_cursor(&$2);
|
||||
$$.vars= $$.conds= $$.hndlrs= 0;
|
||||
$$.curs= 1;
|
||||
}
|
||||
|
@ -2652,10 +2652,11 @@ sp_proc_stmt_statement:
|
|||
i->m_query.length= lip->get_ptr() - sp->m_tmp_query;
|
||||
else
|
||||
i->m_query.length= lip->get_tok_end() - sp->m_tmp_query;
|
||||
i->m_query.str= strmake_root(thd->mem_root,
|
||||
sp->m_tmp_query,
|
||||
i->m_query.length);
|
||||
sp->add_instr(i);
|
||||
if (!(i->m_query.str= strmake_root(thd->mem_root,
|
||||
sp->m_tmp_query,
|
||||
i->m_query.length)) ||
|
||||
sp->add_instr(i))
|
||||
MYSQL_YYABORT;
|
||||
}
|
||||
sp->restore_lex(thd);
|
||||
}
|
||||
|
@ -2680,9 +2681,9 @@ sp_proc_stmt_return:
|
|||
|
||||
i= new sp_instr_freturn(sp->instructions(), lex->spcont, $3,
|
||||
sp->m_return_field_def.sql_type, lex);
|
||||
if (i == NULL)
|
||||
if (i == NULL ||
|
||||
sp->add_instr(i))
|
||||
MYSQL_YYABORT;
|
||||
sp->add_instr(i);
|
||||
sp->m_flags|= sp_head::HAS_RETURN;
|
||||
}
|
||||
sp->restore_lex(YYTHD);
|
||||
|
@ -2779,22 +2780,22 @@ sp_proc_stmt_iterate:
|
|||
if (n)
|
||||
{
|
||||
sp_instr_hpop *hpop= new sp_instr_hpop(ip++, ctx, n);
|
||||
if (hpop == NULL)
|
||||
if (hpop == NULL ||
|
||||
sp->add_instr(hpop))
|
||||
MYSQL_YYABORT;
|
||||
sp->add_instr(hpop);
|
||||
}
|
||||
n= ctx->diff_cursors(lab->ctx, FALSE); /* Inclusive the dest. */
|
||||
if (n)
|
||||
{
|
||||
sp_instr_cpop *cpop= new sp_instr_cpop(ip++, ctx, n);
|
||||
if (cpop == NULL)
|
||||
if (cpop == NULL ||
|
||||
sp->add_instr(cpop))
|
||||
MYSQL_YYABORT;
|
||||
sp->add_instr(cpop);
|
||||
}
|
||||
i= new sp_instr_jump(ip, ctx, lab->ip); /* Jump back */
|
||||
if (i == NULL)
|
||||
if (i == NULL ||
|
||||
sp->add_instr(i))
|
||||
MYSQL_YYABORT;
|
||||
sp->add_instr(i);
|
||||
}
|
||||
}
|
||||
;
|
||||
|
@ -2813,9 +2814,9 @@ sp_proc_stmt_open:
|
|||
MYSQL_YYABORT;
|
||||
}
|
||||
i= new sp_instr_copen(sp->instructions(), lex->spcont, offset);
|
||||
if (i == NULL)
|
||||
if (i == NULL ||
|
||||
sp->add_instr(i))
|
||||
MYSQL_YYABORT;
|
||||
sp->add_instr(i);
|
||||
}
|
||||
;
|
||||
|
||||
|
@ -2833,9 +2834,9 @@ sp_proc_stmt_fetch:
|
|||
MYSQL_YYABORT;
|
||||
}
|
||||
i= new sp_instr_cfetch(sp->instructions(), lex->spcont, offset);
|
||||
if (i == NULL)
|
||||
if (i == NULL ||
|
||||
sp->add_instr(i))
|
||||
MYSQL_YYABORT;
|
||||
sp->add_instr(i);
|
||||
}
|
||||
sp_fetch_list
|
||||
{}
|
||||
|
@ -2855,9 +2856,9 @@ sp_proc_stmt_close:
|
|||
MYSQL_YYABORT;
|
||||
}
|
||||
i= new sp_instr_cclose(sp->instructions(), lex->spcont, offset);
|
||||
if (i == NULL)
|
||||
if (i == NULL ||
|
||||
sp->add_instr(i))
|
||||
MYSQL_YYABORT;
|
||||
sp->add_instr(i);
|
||||
}
|
||||
;
|
||||
|
||||
|
@ -2920,12 +2921,11 @@ sp_if:
|
|||
uint ip= sp->instructions();
|
||||
sp_instr_jump_if_not *i = new sp_instr_jump_if_not(ip, ctx,
|
||||
$2, lex);
|
||||
if (i == NULL)
|
||||
if (i == NULL ||
|
||||
sp->push_backpatch(i, ctx->push_label((char *)"", 0)) ||
|
||||
sp->add_cont_backpatch(i) ||
|
||||
sp->add_instr(i))
|
||||
MYSQL_YYABORT;
|
||||
|
||||
sp->push_backpatch(i, ctx->push_label((char *)"", 0));
|
||||
sp->add_cont_backpatch(i);
|
||||
sp->add_instr(i);
|
||||
sp->restore_lex(YYTHD);
|
||||
}
|
||||
sp_proc_stmts1
|
||||
|
@ -2934,10 +2934,9 @@ sp_if:
|
|||
sp_pcontext *ctx= Lex->spcont;
|
||||
uint ip= sp->instructions();
|
||||
sp_instr_jump *i = new sp_instr_jump(ip, ctx);
|
||||
if (i == NULL)
|
||||
if (i == NULL ||
|
||||
sp->add_instr(i))
|
||||
MYSQL_YYABORT;
|
||||
|
||||
sp->add_instr(i);
|
||||
sp->backpatch(ctx->pop_label());
|
||||
sp->push_backpatch(i, ctx->push_label((char *)"", 0));
|
||||
}
|
||||
|
@ -3021,14 +3020,16 @@ simple_when_clause:
|
|||
/* Simple case: <caseval> = <whenval> */
|
||||
|
||||
LEX *lex= Lex;
|
||||
case_stmt_action_when(lex, $3, true);
|
||||
if (case_stmt_action_when(lex, $3, true))
|
||||
MYSQL_YYABORT;
|
||||
lex->sphead->restore_lex(YYTHD); /* For expr $3 */
|
||||
}
|
||||
THEN_SYM
|
||||
sp_proc_stmts1
|
||||
{
|
||||
LEX *lex= Lex;
|
||||
case_stmt_action_then(lex);
|
||||
if (case_stmt_action_then(lex))
|
||||
MYSQL_YYABORT;
|
||||
}
|
||||
;
|
||||
|
||||
|
@ -3040,14 +3041,16 @@ searched_when_clause:
|
|||
expr
|
||||
{
|
||||
LEX *lex= Lex;
|
||||
case_stmt_action_when(lex, $3, false);
|
||||
if (case_stmt_action_when(lex, $3, false))
|
||||
MYSQL_YYABORT;
|
||||
lex->sphead->restore_lex(YYTHD); /* For expr $3 */
|
||||
}
|
||||
THEN_SYM
|
||||
sp_proc_stmts1
|
||||
{
|
||||
LEX *lex= Lex;
|
||||
case_stmt_action_then(lex);
|
||||
if (case_stmt_action_then(lex))
|
||||
MYSQL_YYABORT;
|
||||
}
|
||||
;
|
||||
|
||||
|
@ -3059,9 +3062,9 @@ else_clause_opt:
|
|||
uint ip= sp->instructions();
|
||||
sp_instr_error *i= new sp_instr_error(ip, lex->spcont,
|
||||
ER_SP_CASE_NOT_FOUND);
|
||||
if (i == NULL)
|
||||
if (i == NULL ||
|
||||
sp->add_instr(i))
|
||||
MYSQL_YYABORT;
|
||||
sp->add_instr(i);
|
||||
}
|
||||
| ELSE sp_proc_stmts1
|
||||
;
|
||||
|
@ -3175,16 +3178,16 @@ sp_block_content:
|
|||
if ($3.hndlrs)
|
||||
{
|
||||
i= new sp_instr_hpop(sp->instructions(), ctx, $3.hndlrs);
|
||||
if (i == NULL)
|
||||
if (i == NULL ||
|
||||
sp->add_instr(i))
|
||||
MYSQL_YYABORT;
|
||||
sp->add_instr(i);
|
||||
}
|
||||
if ($3.curs)
|
||||
{
|
||||
i= new sp_instr_cpop(sp->instructions(), ctx, $3.curs);
|
||||
if (i == NULL)
|
||||
if (i == NULL ||
|
||||
sp->add_instr(i))
|
||||
MYSQL_YYABORT;
|
||||
sp->add_instr(i);
|
||||
}
|
||||
lex->spcont= ctx->pop_context();
|
||||
}
|
||||
|
@ -3198,10 +3201,10 @@ sp_unlabeled_control:
|
|||
uint ip= lex->sphead->instructions();
|
||||
sp_label_t *lab= lex->spcont->last_label(); /* Jumping back */
|
||||
sp_instr_jump *i = new sp_instr_jump(ip, lex->spcont, lab->ip);
|
||||
if (i == NULL)
|
||||
if (i == NULL ||
|
||||
lex->sphead->add_instr(i))
|
||||
MYSQL_YYABORT;
|
||||
lex->sphead->add_instr(i);
|
||||
}
|
||||
}
|
||||
| WHILE_SYM
|
||||
{ Lex->sphead->reset_lex(YYTHD); }
|
||||
expr DO_SYM
|
||||
|
@ -3211,12 +3214,12 @@ sp_unlabeled_control:
|
|||
uint ip= sp->instructions();
|
||||
sp_instr_jump_if_not *i = new sp_instr_jump_if_not(ip, lex->spcont,
|
||||
$3, lex);
|
||||
if (i == NULL)
|
||||
if (i == NULL ||
|
||||
/* Jumping forward */
|
||||
sp->push_backpatch(i, lex->spcont->last_label()) ||
|
||||
sp->new_cont_backpatch(i) ||
|
||||
sp->add_instr(i))
|
||||
MYSQL_YYABORT;
|
||||
/* Jumping forward */
|
||||
sp->push_backpatch(i, lex->spcont->last_label());
|
||||
sp->new_cont_backpatch(i);
|
||||
sp->add_instr(i);
|
||||
sp->restore_lex(YYTHD);
|
||||
}
|
||||
sp_proc_stmts1 END WHILE_SYM
|
||||
|
@ -3225,9 +3228,9 @@ sp_unlabeled_control:
|
|||
uint ip= lex->sphead->instructions();
|
||||
sp_label_t *lab= lex->spcont->last_label(); /* Jumping back */
|
||||
sp_instr_jump *i = new sp_instr_jump(ip, lex->spcont, lab->ip);
|
||||
if (i == NULL)
|
||||
if (i == NULL ||
|
||||
lex->sphead->add_instr(i))
|
||||
MYSQL_YYABORT;
|
||||
lex->sphead->add_instr(i);
|
||||
lex->sphead->do_cont_backpatch();
|
||||
}
|
||||
| REPEAT_SYM sp_proc_stmts1 UNTIL_SYM
|
||||
|
@ -3240,9 +3243,9 @@ sp_unlabeled_control:
|
|||
sp_instr_jump_if_not *i = new sp_instr_jump_if_not(ip, lex->spcont,
|
||||
$5, lab->ip,
|
||||
lex);
|
||||
if (i == NULL)
|
||||
if (i == NULL ||
|
||||
lex->sphead->add_instr(i))
|
||||
MYSQL_YYABORT;
|
||||
lex->sphead->add_instr(i);
|
||||
lex->sphead->restore_lex(YYTHD);
|
||||
/* We can shortcut the cont_backpatch here */
|
||||
i->m_cont_dest= ip+1;
|
||||
|
@ -11751,7 +11754,8 @@ option_type_value:
|
|||
qbuff.length);
|
||||
qbuff.length+= 4;
|
||||
i->m_query= qbuff;
|
||||
sp->add_instr(i);
|
||||
if (sp->add_instr(i))
|
||||
MYSQL_YYABORT;
|
||||
}
|
||||
lex->sphead->restore_lex(thd);
|
||||
}
|
||||
|
@ -11843,7 +11847,8 @@ sys_option_value:
|
|||
(uchar **) &trg_fld->
|
||||
next_trg_field);
|
||||
|
||||
lex->sphead->add_instr(sp_fld);
|
||||
if (lex->sphead->add_instr(sp_fld))
|
||||
MYSQL_YYABORT;
|
||||
}
|
||||
else if ($2.var)
|
||||
{ /* System variable */
|
||||
|
@ -11882,9 +11887,9 @@ sys_option_value:
|
|||
}
|
||||
sp_set= new sp_instr_set(lex->sphead->instructions(), ctx,
|
||||
spv->offset, it, spv->type, lex, TRUE);
|
||||
if (sp_set == NULL)
|
||||
if (sp_set == NULL ||
|
||||
lex->sphead->add_instr(sp_set))
|
||||
MYSQL_YYABORT;
|
||||
lex->sphead->add_instr(sp_set);
|
||||
}
|
||||
}
|
||||
| option_type TRANSACTION_SYM ISOLATION LEVEL_SYM isolation_types
|
||||
|
|
|
@ -898,6 +898,8 @@ int ha_ibmdb2i::index_init(uint idx, bool sorted)
|
|||
releaseIndexFile(idx);
|
||||
}
|
||||
|
||||
rrnAssocHandle= 0;
|
||||
|
||||
DBUG_RETURN(rc);
|
||||
}
|
||||
|
||||
|
@ -1154,6 +1156,8 @@ int ha_ibmdb2i::rnd_init(bool scan)
|
|||
releaseDataFile();
|
||||
}
|
||||
|
||||
rrnAssocHandle= 0;
|
||||
|
||||
DBUG_RETURN(0); // MySQL sometimes does not check the return code, causing
|
||||
// an assert in ha_rnd_end later on if we return a non-zero
|
||||
// value here.
|
||||
|
@ -1251,7 +1255,8 @@ int ha_ibmdb2i::rnd_pos(uchar * buf, uchar *pos)
|
|||
|
||||
int rc = 0;
|
||||
|
||||
if (activeHandle != rrnAssocHandle)
|
||||
if (rrnAssocHandle &&
|
||||
(activeHandle != rrnAssocHandle))
|
||||
{
|
||||
if (activeHandle) releaseActiveHandle();
|
||||
rc = useFileByHandle(QMY_UPDATABLE, rrnAssocHandle);
|
||||
|
|
|
@ -250,7 +250,11 @@ static int d_search(register MI_INFO *info, register MI_KEYDEF *keyinfo,
|
|||
if (info->ft1_to_ft2)
|
||||
{
|
||||
/* we're in ft1->ft2 conversion mode. Saving key data */
|
||||
insert_dynamic(info->ft1_to_ft2, (lastkey+off));
|
||||
if (insert_dynamic(info->ft1_to_ft2, (lastkey+off)))
|
||||
{
|
||||
DBUG_PRINT("error",("Out of memory"));
|
||||
DBUG_RETURN(-1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -562,7 +562,14 @@ int _mi_insert(register MI_INFO *info, register MI_KEYDEF *keyinfo,
|
|||
we cannot easily dispatch an empty page here */
|
||||
b+=blen+ft2len+2;
|
||||
for (a=anc_buff+a_length ; b < a ; b+=ft2len+2)
|
||||
insert_dynamic(info->ft1_to_ft2, b);
|
||||
{
|
||||
if (insert_dynamic(info->ft1_to_ft2, b))
|
||||
{
|
||||
mi_print_error(info->s, HA_ERR_OUT_OF_MEM);
|
||||
my_errno= HA_ERR_OUT_OF_MEM;
|
||||
DBUG_RETURN(-1);
|
||||
}
|
||||
}
|
||||
|
||||
/* fixing the page's length - it contains only one key now */
|
||||
mi_putint(anc_buff,2+blen+ft2len+2,0);
|
||||
|
|
Loading…
Add table
Reference in a new issue