Commit 9a7f3451 authored by tsmith@quadxeon.mysql.com's avatar tsmith@quadxeon.mysql.com

Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.1-maint

into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/51
parents dc01a80c da8875a2
...@@ -189,30 +189,28 @@ drop table t1; ...@@ -189,30 +189,28 @@ drop table t1;
# Test all MBR* functions and their non-MBR-prefixed aliases, # Test all MBR* functions and their non-MBR-prefixed aliases,
# using shifted squares to verify the spatial relations. # using shifted squares to verify the spatial relations.
# Primary key is needed for NDB with binlog; bug ARCHIVE doesn't CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY);
# support AUTO_INCREMENT, so specify id values explicitly
CREATE TABLE t1 (id INT UNSIGNED NOT NULL PRIMARY KEY, name VARCHAR(100), square GEOMETRY);
INSERT INTO t1 VALUES( 1, "center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))'));
INSERT INTO t1 VALUES( 2, "small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))'));
INSERT INTO t1 VALUES( 3, "big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))'));
INSERT INTO t1 VALUES( 4, "up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))'));
INSERT INTO t1 VALUES( 5, "up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))'));
INSERT INTO t1 VALUES( 6, "up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))'));
INSERT INTO t1 VALUES( 7, "down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))'));
INSERT INTO t1 VALUES( 8, "down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))'));
INSERT INTO t1 VALUES( 9, "down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))'));
INSERT INTO t1 VALUES(10, "right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))'));
INSERT INTO t1 VALUES(11, "right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))'));
INSERT INTO t1 VALUES(12, "right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))'));
INSERT INTO t1 VALUES(13, "left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))'));
INSERT INTO t1 VALUES(14, "left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))'));
INSERT INTO t1 VALUES(15, "left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))'));
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
......
...@@ -461,22 +461,22 @@ insert into t1 (fl) values (pointfromtext('point(1,1)')); ...@@ -461,22 +461,22 @@ insert into t1 (fl) values (pointfromtext('point(1,1)'));
ERROR 23000: Column 'fl' cannot be null ERROR 23000: Column 'fl' cannot be null
drop table t1; drop table t1;
End of 4.1 tests End of 4.1 tests
CREATE TABLE t1 (id INT UNSIGNED NOT NULL PRIMARY KEY, name VARCHAR(100), square GEOMETRY); CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY);
INSERT INTO t1 VALUES( 1, "center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))'));
INSERT INTO t1 VALUES( 2, "small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))'));
INSERT INTO t1 VALUES( 3, "big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))'));
INSERT INTO t1 VALUES( 4, "up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))'));
INSERT INTO t1 VALUES( 5, "up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))'));
INSERT INTO t1 VALUES( 6, "up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))'));
INSERT INTO t1 VALUES( 7, "down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))'));
INSERT INTO t1 VALUES( 8, "down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))'));
INSERT INTO t1 VALUES( 9, "down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))'));
INSERT INTO t1 VALUES(10, "right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))'));
INSERT INTO t1 VALUES(11, "right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))'));
INSERT INTO t1 VALUES(12, "right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))'));
INSERT INTO t1 VALUES(13, "left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))'));
INSERT INTO t1 VALUES(14, "left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))'));
INSERT INTO t1 VALUES(15, "left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))'));
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
mbrcontains mbrcontains
center,small center,small
......
...@@ -461,22 +461,22 @@ insert into t1 (fl) values (pointfromtext('point(1,1)')); ...@@ -461,22 +461,22 @@ insert into t1 (fl) values (pointfromtext('point(1,1)'));
ERROR 23000: Column 'fl' cannot be null ERROR 23000: Column 'fl' cannot be null
drop table t1; drop table t1;
End of 4.1 tests End of 4.1 tests
CREATE TABLE t1 (id INT UNSIGNED NOT NULL PRIMARY KEY, name VARCHAR(100), square GEOMETRY); CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY);
INSERT INTO t1 VALUES( 1, "center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))'));
INSERT INTO t1 VALUES( 2, "small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))'));
INSERT INTO t1 VALUES( 3, "big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))'));
INSERT INTO t1 VALUES( 4, "up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))'));
INSERT INTO t1 VALUES( 5, "up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))'));
INSERT INTO t1 VALUES( 6, "up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))'));
INSERT INTO t1 VALUES( 7, "down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))'));
INSERT INTO t1 VALUES( 8, "down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))'));
INSERT INTO t1 VALUES( 9, "down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))'));
INSERT INTO t1 VALUES(10, "right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))'));
INSERT INTO t1 VALUES(11, "right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))'));
INSERT INTO t1 VALUES(12, "right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))'));
INSERT INTO t1 VALUES(13, "left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))'));
INSERT INTO t1 VALUES(14, "left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))'));
INSERT INTO t1 VALUES(15, "left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))'));
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
mbrcontains mbrcontains
center,small center,small
......
...@@ -461,22 +461,24 @@ insert into t1 (fl) values (pointfromtext('point(1,1)')); ...@@ -461,22 +461,24 @@ insert into t1 (fl) values (pointfromtext('point(1,1)'));
ERROR 23000: Column 'fl' cannot be null ERROR 23000: Column 'fl' cannot be null
drop table t1; drop table t1;
End of 4.1 tests End of 4.1 tests
CREATE TABLE t1 (id INT UNSIGNED NOT NULL PRIMARY KEY, name VARCHAR(100), square GEOMETRY); CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY);
INSERT INTO t1 VALUES( 1, "center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); Warnings:
INSERT INTO t1 VALUES( 2, "small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
INSERT INTO t1 VALUES( 3, "big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))'));
INSERT INTO t1 VALUES( 4, "up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))'));
INSERT INTO t1 VALUES( 5, "up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))'));
INSERT INTO t1 VALUES( 6, "up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))'));
INSERT INTO t1 VALUES( 7, "down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))'));
INSERT INTO t1 VALUES( 8, "down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))'));
INSERT INTO t1 VALUES( 9, "down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))'));
INSERT INTO t1 VALUES(10, "right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))'));
INSERT INTO t1 VALUES(11, "right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))'));
INSERT INTO t1 VALUES(12, "right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))'));
INSERT INTO t1 VALUES(13, "left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))'));
INSERT INTO t1 VALUES(14, "left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))'));
INSERT INTO t1 VALUES(15, "left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))'));
INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))'));
INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))'));
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
mbrcontains mbrcontains
center,small center,small
...@@ -1009,22 +1011,24 @@ insert into t1 (fl) values (pointfromtext('point(1,1)')); ...@@ -1009,22 +1011,24 @@ insert into t1 (fl) values (pointfromtext('point(1,1)'));
ERROR 23000: Column 'fl' cannot be null ERROR 23000: Column 'fl' cannot be null
drop table t1; drop table t1;
End of 4.1 tests End of 4.1 tests
CREATE TABLE t1 (id INT UNSIGNED NOT NULL PRIMARY KEY, name VARCHAR(100), square GEOMETRY); CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY);
INSERT INTO t1 VALUES( 1, "center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); Warnings:
INSERT INTO t1 VALUES( 2, "small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK'
INSERT INTO t1 VALUES( 3, "big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))'));
INSERT INTO t1 VALUES( 4, "up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))'));
INSERT INTO t1 VALUES( 5, "up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))'));
INSERT INTO t1 VALUES( 6, "up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))'));
INSERT INTO t1 VALUES( 7, "down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))'));
INSERT INTO t1 VALUES( 8, "down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))'));
INSERT INTO t1 VALUES( 9, "down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))'));
INSERT INTO t1 VALUES(10, "right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))'));
INSERT INTO t1 VALUES(11, "right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))'));
INSERT INTO t1 VALUES(12, "right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))'));
INSERT INTO t1 VALUES(13, "left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))'));
INSERT INTO t1 VALUES(14, "left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))'));
INSERT INTO t1 VALUES(15, "left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))'));
INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))'));
INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))'));
SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name;
mbrcontains mbrcontains
center,small center,small
......
...@@ -1810,7 +1810,6 @@ select a,hex(s1) from t1; ...@@ -1810,7 +1810,6 @@ select a,hex(s1) from t1;
select hex(s1) from t2; select hex(s1) from t2;
drop table t2,t1; drop table t2,t1;
# Ensure that <tablename>_ibfk_0 is not mistreated as a # Ensure that <tablename>_ibfk_0 is not mistreated as a
# generated foreign key identifier. (Bug #16387) # generated foreign key identifier. (Bug #16387)
......
...@@ -89,6 +89,8 @@ EXTRA_DIST = include/btr0btr.h include/btr0btr.ic include/btr0cur.h include/btr ...@@ -89,6 +89,8 @@ EXTRA_DIST = include/btr0btr.h include/btr0btr.ic include/btr0cur.h include/btr
include/ut0sort.h include/ut0ut.h include/ut0ut.ic include/ut0vec.h include/ut0vec.ic include/ha_prototypes.h \ include/ut0sort.h include/ut0ut.h include/ut0ut.ic include/ut0vec.h include/ut0vec.ic include/ha_prototypes.h \
include/ut0list.h include/ut0list.ic \ include/ut0list.h include/ut0list.ic \
include/ut0wqueue.h \ include/ut0wqueue.h \
pars/make_bison.sh pars/make_flex.sh \
pars/pars0grm.y pars/pars0lex.l
CMakeLists.txt plug.in CMakeLists.txt plug.in
noinst_LIBRARIES = libinnobase.a noinst_LIBRARIES = libinnobase.a
......
...@@ -689,7 +689,8 @@ dict_table_get_on_id( ...@@ -689,7 +689,8 @@ dict_table_get_on_id(
if we are doing a rollback to handle an error in TABLE if we are doing a rollback to handle an error in TABLE
CREATE, for example, we already have the mutex! */ CREATE, for example, we already have the mutex! */
ut_ad(mutex_own(&(dict_sys->mutex))); ut_ad(mutex_own(&(dict_sys->mutex))
|| trx->dict_operation_lock_mode == RW_X_LATCH);
return(dict_table_get_on_id_low(table_id)); return(dict_table_get_on_id_low(table_id));
} }
......
This diff is collapsed.
...@@ -35,10 +35,6 @@ typedef struct st_innobase_share { ...@@ -35,10 +35,6 @@ typedef struct st_innobase_share {
struct row_prebuilt_struct; struct row_prebuilt_struct;
typedef struct row_prebuilt_struct row_prebuilt_t; typedef struct row_prebuilt_struct row_prebuilt_t;
my_bool innobase_query_caching_of_table_permitted(THD* thd, char* full_name,
uint full_name_len,
ulonglong *unused);
/* The class defining a handle to an Innodb table */ /* The class defining a handle to an Innodb table */
class ha_innobase: public handler class ha_innobase: public handler
{ {
...@@ -48,8 +44,6 @@ class ha_innobase: public handler ...@@ -48,8 +44,6 @@ class ha_innobase: public handler
THD* user_thd; /* the thread handle of the user THD* user_thd; /* the thread handle of the user
currently using the handle; this is currently using the handle; this is
set in external_lock function */ set in external_lock function */
query_id_t last_query_id; /* the latest query id where the
handle was used */
THR_LOCK_DATA lock; THR_LOCK_DATA lock;
INNOBASE_SHARE *share; INNOBASE_SHARE *share;
...@@ -186,14 +180,7 @@ class ha_innobase: public handler ...@@ -186,14 +180,7 @@ class ha_innobase: public handler
my_bool register_query_cache_table(THD *thd, char *table_key, my_bool register_query_cache_table(THD *thd, char *table_key,
uint key_length, uint key_length,
qc_engine_callback *call_back, qc_engine_callback *call_back,
ulonglong *engine_data) ulonglong *engine_data);
{
*call_back= innobase_query_caching_of_table_permitted;
*engine_data= 0;
return innobase_query_caching_of_table_permitted(thd, table_key,
key_length,
engine_data);
}
static char *get_mysql_bin_log_name(); static char *get_mysql_bin_log_name();
static ulonglong get_mysql_bin_log_pos(); static ulonglong get_mysql_bin_log_pos();
bool primary_key_is_clustered() { return true; } bool primary_key_is_clustered() { return true; }
...@@ -202,7 +189,6 @@ class ha_innobase: public handler ...@@ -202,7 +189,6 @@ class ha_innobase: public handler
uint table_changes); uint table_changes);
}; };
extern SHOW_VAR innodb_status_variables[];
extern ulong innobase_fast_shutdown; extern ulong innobase_fast_shutdown;
extern ulong innobase_large_page_size; extern ulong innobase_large_page_size;
extern long innobase_mirrored_log_groups, innobase_log_files_in_group; extern long innobase_mirrored_log_groups, innobase_log_files_in_group;
......
...@@ -375,8 +375,6 @@ trx_is_interrupted( ...@@ -375,8 +375,6 @@ trx_is_interrupted(
/* Signal to a transaction */ /* Signal to a transaction */
struct trx_sig_struct{ struct trx_sig_struct{
ulint type; /* signal type */ ulint type; /* signal type */
ulint state; /* TRX_SIG_WAITING or
TRX_SIG_BEING_HANDLED */
ulint sender; /* TRX_SIG_SELF or ulint sender; /* TRX_SIG_SELF or
TRX_SIG_OTHER_SESS */ TRX_SIG_OTHER_SESS */
que_thr_t* receiver; /* non-NULL if the sender of the signal que_thr_t* receiver; /* non-NULL if the sender of the signal
...@@ -404,7 +402,7 @@ struct trx_struct{ ...@@ -404,7 +402,7 @@ struct trx_struct{
const char* op_info; /* English text describing the const char* op_info; /* English text describing the
current operation, or an empty current operation, or an empty
string */ string */
ulint type; /* TRX_USER, TRX_PURGE */ unsigned is_purge:1; /* 0=user transaction, 1=purge */
ulint conc_state; /* state of the trx from the point ulint conc_state; /* state of the trx from the point
of view of concurrency control: of view of concurrency control:
TRX_ACTIVE, TRX_COMMITTED_IN_MEMORY, TRX_ACTIVE, TRX_COMMITTED_IN_MEMORY,
...@@ -675,12 +673,6 @@ struct trx_struct{ ...@@ -675,12 +673,6 @@ struct trx_struct{
single operation of a single operation of a
transaction, e.g., a parallel transaction, e.g., a parallel
query */ query */
/* Transaction types */
#define TRX_USER 1 /* normal user transaction */
#define TRX_PURGE 2 /* purge transaction: this is not
inserted to the trx list of trx_sys
and no rollback segment is assigned to
this */
/* Transaction concurrency states */ /* Transaction concurrency states */
#define TRX_NOT_STARTED 1 #define TRX_NOT_STARTED 1
#define TRX_ACTIVE 2 #define TRX_ACTIVE 2
...@@ -742,9 +734,6 @@ struct trx_struct{ ...@@ -742,9 +734,6 @@ struct trx_struct{
session */ session */
#define TRX_SIG_OTHER_SESS 2 /* sent by another session (which #define TRX_SIG_OTHER_SESS 2 /* sent by another session (which
must hold rights to this) */ must hold rights to this) */
/* Signal states */
#define TRX_SIG_WAITING 1
#define TRX_SIG_BEING_HANDLED 2
/* Commit command node in a query graph */ /* Commit command node in a query graph */
struct commit_node_struct{ struct commit_node_struct{
......
...@@ -930,7 +930,7 @@ try_again: ...@@ -930,7 +930,7 @@ try_again:
file = CreateFile((LPCTSTR) name, file = CreateFile((LPCTSTR) name,
access, access,
FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE,
/* file can be read ansd written also /* file can be read and written also
by other processes */ by other processes */
NULL, /* default security attributes */ NULL, /* default security attributes */
create_flag, create_flag,
...@@ -1509,7 +1509,7 @@ os_file_rename( ...@@ -1509,7 +1509,7 @@ os_file_rename(
return(TRUE); return(TRUE);
} }
os_file_handle_error(oldpath, "rename"); os_file_handle_error_no_exit(oldpath, "rename");
return(FALSE); return(FALSE);
#else #else
...@@ -1518,7 +1518,7 @@ os_file_rename( ...@@ -1518,7 +1518,7 @@ os_file_rename(
ret = rename((const char*)oldpath, (const char*)newpath); ret = rename((const char*)oldpath, (const char*)newpath);
if (ret != 0) { if (ret != 0) {
os_file_handle_error(oldpath, "rename"); os_file_handle_error_no_exit(oldpath, "rename");
return(FALSE); return(FALSE);
} }
......
...@@ -213,7 +213,7 @@ row_undo( ...@@ -213,7 +213,7 @@ row_undo(
ulint err; ulint err;
trx_t* trx; trx_t* trx;
dulint roll_ptr; dulint roll_ptr;
ibool froze_data_dict = FALSE; ibool locked_data_dict;
ut_ad(node && thr); ut_ad(node && thr);
...@@ -266,13 +266,13 @@ row_undo( ...@@ -266,13 +266,13 @@ row_undo(
/* Prevent DROP TABLE etc. while we are rolling back this row. /* Prevent DROP TABLE etc. while we are rolling back this row.
If we are doing a TABLE CREATE or some other dictionary operation, If we are doing a TABLE CREATE or some other dictionary operation,
then we already have dict_operation_lock locked in x-mode. Do not then we already have dict_operation_lock locked in x-mode. Do not
try to lock again in s-mode, because that would cause a hang. */ try to lock again, because that would cause a hang. */
if (trx->dict_operation_lock_mode == 0) { locked_data_dict = (trx->dict_operation_lock_mode == 0);
row_mysql_freeze_data_dictionary(trx); if (locked_data_dict) {
froze_data_dict = TRUE; row_mysql_lock_data_dictionary(trx);
} }
if (node->state == UNDO_NODE_INSERT) { if (node->state == UNDO_NODE_INSERT) {
...@@ -285,9 +285,9 @@ row_undo( ...@@ -285,9 +285,9 @@ row_undo(
err = row_undo_mod(node, thr); err = row_undo_mod(node, thr);
} }
if (froze_data_dict) { if (locked_data_dict) {
row_mysql_unfreeze_data_dictionary(trx); row_mysql_unlock_data_dictionary(trx);
} }
/* Do some cleanup */ /* Do some cleanup */
......
...@@ -221,7 +221,7 @@ trx_purge_sys_create(void) ...@@ -221,7 +221,7 @@ trx_purge_sys_create(void)
purge_sys->trx = purge_sys->sess->trx; purge_sys->trx = purge_sys->sess->trx;
purge_sys->trx->type = TRX_PURGE; purge_sys->trx->is_purge = 1;
ut_a(trx_start_low(purge_sys->trx, ULINT_UNDEFINED)); ut_a(trx_start_low(purge_sys->trx, ULINT_UNDEFINED));
......
...@@ -109,7 +109,7 @@ trx_create( ...@@ -109,7 +109,7 @@ trx_create(
trx->op_info = ""; trx->op_info = "";
trx->type = TRX_USER; trx->is_purge = 0;
trx->conc_state = TRX_NOT_STARTED; trx->conc_state = TRX_NOT_STARTED;
trx->start_time = time(NULL); trx->start_time = time(NULL);
...@@ -667,7 +667,7 @@ trx_start_low( ...@@ -667,7 +667,7 @@ trx_start_low(
ut_ad(mutex_own(&kernel_mutex)); ut_ad(mutex_own(&kernel_mutex));
ut_ad(trx->rseg == NULL); ut_ad(trx->rseg == NULL);
if (trx->type == TRX_PURGE) { if (trx->is_purge) {
trx->id = ut_dulint_zero; trx->id = ut_dulint_zero;
trx->conc_state = TRX_ACTIVE; trx->conc_state = TRX_ACTIVE;
trx->start_time = time(NULL); trx->start_time = time(NULL);
...@@ -1262,7 +1262,6 @@ trx_sig_send( ...@@ -1262,7 +1262,6 @@ trx_sig_send(
UT_LIST_ADD_LAST(signals, trx->signals, sig); UT_LIST_ADD_LAST(signals, trx->signals, sig);
sig->type = type; sig->type = type;
sig->state = TRX_SIG_WAITING;
sig->sender = sender; sig->sender = sender;
sig->receiver = receiver_thr; sig->receiver = receiver_thr;
...@@ -1709,7 +1708,7 @@ trx_print( ...@@ -1709,7 +1708,7 @@ trx_print(
fputs(trx->op_info, f); fputs(trx->op_info, f);
} }
if (trx->type != TRX_USER) { if (trx->is_purge) {
fputs(" purge trx", f); fputs(" purge trx", f);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment