diff options
author | Alexander Barkov <bar@mariadb.org> | 2017-05-29 10:29:46 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-05-29 10:29:46 +0400 |
commit | 8b68263a531bf6926afea71fe6eaf2ffd5a85049 (patch) | |
tree | 18f856a87aa714ddc48e292c0bded53faf95e08c /mysql-test | |
parent | 0f0bced885d6a6e6e494f227ac36419dd7bd3f80 (diff) | |
download | mariadb-git-8b68263a531bf6926afea71fe6eaf2ffd5a85049.tar.gz |
MDEV-12803 Improve function parameter data type control
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/func_gconcat.result | 2 | ||||
-rw-r--r-- | mysql-test/r/func_math.result | 4 | ||||
-rw-r--r-- | mysql-test/r/func_str.result | 2 | ||||
-rw-r--r-- | mysql-test/r/gis-precise.result | 3 | ||||
-rw-r--r-- | mysql-test/r/gis-rtree.result | 218 | ||||
-rw-r--r-- | mysql-test/r/gis.result | 317 | ||||
-rw-r--r-- | mysql-test/suite/innodb_gis/r/1.result | 9 | ||||
-rw-r--r-- | mysql-test/suite/innodb_gis/r/gis.result | 9 | ||||
-rw-r--r-- | mysql-test/suite/innodb_gis/r/precise.result | 3 | ||||
-rw-r--r-- | mysql-test/suite/innodb_gis/t/1.test | 8 | ||||
-rw-r--r-- | mysql-test/suite/innodb_gis/t/gis.test | 7 | ||||
-rw-r--r-- | mysql-test/suite/innodb_gis/t/precise.test | 2 | ||||
-rw-r--r-- | mysql-test/t/func_gconcat.test | 2 | ||||
-rw-r--r-- | mysql-test/t/func_math.test | 4 | ||||
-rw-r--r-- | mysql-test/t/func_str.test | 2 | ||||
-rw-r--r-- | mysql-test/t/gis-precise.test | 1 | ||||
-rw-r--r-- | mysql-test/t/gis-rtree.test | 8 | ||||
-rw-r--r-- | mysql-test/t/gis.test | 344 |
18 files changed, 788 insertions, 157 deletions
diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result index cbd0dfabc24..097e07ac715 100644 --- a/mysql-test/r/func_gconcat.result +++ b/mysql-test/r/func_gconcat.result @@ -1044,7 +1044,7 @@ DROP TABLE t1; CREATE TABLE t1(f1 int); INSERT INTO t1 values (0),(0); SELECT POLYGON((SELECT 1 FROM (SELECT 1 IN (GROUP_CONCAT(t1.f1)) FROM t1, t1 t GROUP BY t.f1 ) d)); -ERROR 22007: Illegal non geometric '(select 1 from (select 1 = group_concat(`test`.`t1`.`f1` separator ',') AS `1 IN (GROUP_CONCAT(t1.f1))` from `test`.`t1` join `test`.`t1` `t` group by `test`.`t`.`f1`) `d`)' value found during parsing +ERROR HY000: Illegal parameter data type int for operation 'geometrycollection' DROP TABLE t1; # # Bug#58396 group_concat and explain extended are still crashy diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result index d86db4ce89f..c99d7e62285 100644 --- a/mysql-test/r/func_math.result +++ b/mysql-test/r/func_math.result @@ -566,9 +566,9 @@ DROP TABLE t1; # Bug#11764994 57900: CREATE TABLE .. SELECT ASSERTS SCALE >= 0 && PRECISION > 0 && SCALE <= PR # CREATE TABLE t1 SELECT CEIL(LINESTRINGFROMWKB(1) DIV NULL); -DROP TABLE t1; +ERROR HY000: Illegal parameter data type int for operation 'st_geometryfromwkb' CREATE TABLE t1 SELECT FLOOR(LINESTRINGFROMWKB(1) DIV NULL); -DROP TABLE t1; +ERROR HY000: Illegal parameter data type int for operation 'st_geometryfromwkb' # # Bug#11765923 58937: MANY VALGRIND ERRORS AFTER GROUPING BY RESULT OF DECIMAL COLUMN FUNCTION # diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index 34c28e694ce..464178124ec 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -3124,7 +3124,7 @@ sha1('P'), ) ) ) AS r; -ERROR HY000: Illegal parameter data types geometry and decimal for operation 'coalesce' +ERROR HY000: Illegal parameter data type varchar for operation 'st_geometryfromwkb' connection conn1; SET @@global.max_allowed_packet:= @tmp_max; disconnect newconn; diff --git a/mysql-test/r/gis-precise.result b/mysql-test/r/gis-precise.result index 3824ba6afbb..f816278a0ba 100644 --- a/mysql-test/r/gis-precise.result +++ b/mysql-test/r/gis-precise.result @@ -223,8 +223,7 @@ st_u MULTIPOLYGON(((525400 18370,525000.9677614468 183300,525400 183300,525400 18370)),((525000 183300,525000 183700,525000.9677614468 183300,525000 183300)),((525265.58 183481.95,525263.95 183484.75,525260.7 183491.55,525276.79 183500,525278.39 183500.84,525278.63 183500.97,525280.98 183502.26,525283.17 183503.47,525289.11 183506.62,525296.42 183510.31,525296.57 183510.39,525298.67 183511.53,525302.81 183513.8,525304.5 183510.83,525307.85 183504.95,525304.45 183504.25,525301.75 183509.35,525283.55 183500,525282.2 183499.3,525282.3 183499.1,525280.35 183498.2,525275.5 183495.7,525276.5 183493.45,525278.97 183488.73,525265.58 183481.95),(525266.99 183484.33,525263.26 183491.55,525266.15 183493.04,525269.88 183485.82,525266.99 183484.33),(525272.06 183488.37,525268.94 183494.51,525271.94 183496.03,525275.06 183489.89,525272.06 183488.37))) SET @a=0x0000000001030000000200000005000000000000000000000000000000000000000000000000002440000000000000000000000000000024400000000000002440000000000000000000000000000024400000000000000000000000000000000000000000000000000000F03F000000000000F03F0000000000000040000000000000F03F00000000000000400000000000000040000000000000F03F0000000000000040000000000000F03F000000000000F03F; SELECT ASTEXT(TOUCHES(@a, GEOMFROMTEXT('point(0 0)'))) t; -t -NULL +ERROR HY000: Illegal parameter data type int for operation 'st_astext' SELECT astext(ST_UNION ( PolyFromText('POLYGON(( 2 2 ,3 2,2 7,2 2),( 0 0,8 2,1 9,0 0))'), ExteriorRing( Envelope( MultiLineStringFromText('MULTILINESTRING((3 4,5 3),(3 0,0 5))'))))); diff --git a/mysql-test/r/gis-rtree.result b/mysql-test/r/gis-rtree.result index 9373237f1d6..55f7ab8d0bc 100644 --- a/mysql-test/r/gis-rtree.result +++ b/mysql-test/r/gis-rtree.result @@ -309,403 +309,403 @@ 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(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), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(10 * 10 - 9, 9 * 10 - 9), Point(10 * 10, 9 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(10 * 10 - 9, 9 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(10 * 10 - 9, 8 * 10 - 9), Point(10 * 10, 8 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(10 * 10 - 9, 8 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(10 * 10 - 9, 7 * 10 - 9), Point(10 * 10, 7 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(10 * 10 - 9, 7 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(10 * 10 - 9, 6 * 10 - 9), Point(10 * 10, 6 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(10 * 10 - 9, 6 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(10 * 10 - 9, 5 * 10 - 9), Point(10 * 10, 5 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(10 * 10 - 9, 5 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(10 * 10 - 9, 4 * 10 - 9), Point(10 * 10, 4 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(10 * 10 - 9, 4 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(10 * 10 - 9, 3 * 10 - 9), Point(10 * 10, 3 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(10 * 10 - 9, 3 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(10 * 10 - 9, 2 * 10 - 9), Point(10 * 10, 2 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(10 * 10 - 9, 2 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(10 * 10 - 9, 1 * 10 - 9), Point(10 * 10, 1 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(10 * 10 - 9, 1 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 10 * 10 - 9), Point(9 * 10, 10 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 10 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 9 * 10 - 9), Point(9 * 10, 9 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 9 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 8 * 10 - 9), Point(9 * 10, 8 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 8 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 7 * 10 - 9), Point(9 * 10, 7 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 7 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 6 * 10 - 9), Point(9 * 10, 6 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 6 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 5 * 10 - 9), Point(9 * 10, 5 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 5 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 4 * 10 - 9), Point(9 * 10, 4 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 4 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 3 * 10 - 9), Point(9 * 10, 3 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 3 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 2 * 10 - 9), Point(9 * 10, 2 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 2 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 1 * 10 - 9), Point(9 * 10, 1 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(9 * 10 - 9, 1 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 10 * 10 - 9), Point(8 * 10, 10 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 10 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 9 * 10 - 9), Point(8 * 10, 9 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 9 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 8 * 10 - 9), Point(8 * 10, 8 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 8 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 7 * 10 - 9), Point(8 * 10, 7 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 7 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 6 * 10 - 9), Point(8 * 10, 6 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 6 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 5 * 10 - 9), Point(8 * 10, 5 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 5 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 4 * 10 - 9), Point(8 * 10, 4 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 4 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 3 * 10 - 9), Point(8 * 10, 3 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 3 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 2 * 10 - 9), Point(8 * 10, 2 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 2 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 1 * 10 - 9), Point(8 * 10, 1 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(8 * 10 - 9, 1 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 10 * 10 - 9), Point(7 * 10, 10 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 10 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 9 * 10 - 9), Point(7 * 10, 9 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 9 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 8 * 10 - 9), Point(7 * 10, 8 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 8 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 7 * 10 - 9), Point(7 * 10, 7 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 7 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 6 * 10 - 9), Point(7 * 10, 6 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 6 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 5 * 10 - 9), Point(7 * 10, 5 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 5 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 4 * 10 - 9), Point(7 * 10, 4 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 4 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 3 * 10 - 9), Point(7 * 10, 3 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 3 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 2 * 10 - 9), Point(7 * 10, 2 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 2 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 1 * 10 - 9), Point(7 * 10, 1 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(7 * 10 - 9, 1 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 10 * 10 - 9), Point(6 * 10, 10 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 10 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 9 * 10 - 9), Point(6 * 10, 9 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 9 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 8 * 10 - 9), Point(6 * 10, 8 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 8 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 7 * 10 - 9), Point(6 * 10, 7 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 7 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 6 * 10 - 9), Point(6 * 10, 6 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 6 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 5 * 10 - 9), Point(6 * 10, 5 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 5 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 4 * 10 - 9), Point(6 * 10, 4 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 4 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 3 * 10 - 9), Point(6 * 10, 3 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 3 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 2 * 10 - 9), Point(6 * 10, 2 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 2 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 1 * 10 - 9), Point(6 * 10, 1 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(6 * 10 - 9, 1 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 10 * 10 - 9), Point(5 * 10, 10 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 10 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 9 * 10 - 9), Point(5 * 10, 9 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 9 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 8 * 10 - 9), Point(5 * 10, 8 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 8 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 7 * 10 - 9), Point(5 * 10, 7 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 7 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 6 * 10 - 9), Point(5 * 10, 6 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 6 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 5 * 10 - 9), Point(5 * 10, 5 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 5 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 4 * 10 - 9), Point(5 * 10, 4 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 4 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 3 * 10 - 9), Point(5 * 10, 3 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 3 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 2 * 10 - 9), Point(5 * 10, 2 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 2 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 1 * 10 - 9), Point(5 * 10, 1 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(5 * 10 - 9, 1 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 10 * 10 - 9), Point(4 * 10, 10 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 10 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 9 * 10 - 9), Point(4 * 10, 9 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 9 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 8 * 10 - 9), Point(4 * 10, 8 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 8 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 7 * 10 - 9), Point(4 * 10, 7 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 7 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 6 * 10 - 9), Point(4 * 10, 6 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 6 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 5 * 10 - 9), Point(4 * 10, 5 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 5 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 4 * 10 - 9), Point(4 * 10, 4 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 4 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 3 * 10 - 9), Point(4 * 10, 3 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 3 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 2 * 10 - 9), Point(4 * 10, 2 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 2 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 1 * 10 - 9), Point(4 * 10, 1 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(4 * 10 - 9, 1 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 10 * 10 - 9), Point(3 * 10, 10 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 10 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 9 * 10 - 9), Point(3 * 10, 9 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 9 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 8 * 10 - 9), Point(3 * 10, 8 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 8 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 7 * 10 - 9), Point(3 * 10, 7 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 7 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 6 * 10 - 9), Point(3 * 10, 6 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 6 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 5 * 10 - 9), Point(3 * 10, 5 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 5 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 4 * 10 - 9), Point(3 * 10, 4 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 4 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 3 * 10 - 9), Point(3 * 10, 3 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 3 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 2 * 10 - 9), Point(3 * 10, 2 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 2 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 1 * 10 - 9), Point(3 * 10, 1 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(3 * 10 - 9, 1 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 10 * 10 - 9), Point(2 * 10, 10 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 10 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 9 * 10 - 9), Point(2 * 10, 9 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 9 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 8 * 10 - 9), Point(2 * 10, 8 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 8 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 7 * 10 - 9), Point(2 * 10, 7 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 7 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 6 * 10 - 9), Point(2 * 10, 6 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 6 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 5 * 10 - 9), Point(2 * 10, 5 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 5 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 4 * 10 - 9), Point(2 * 10, 4 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 4 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 3 * 10 - 9), Point(2 * 10, 3 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 3 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 2 * 10 - 9), Point(2 * 10, 2 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 2 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 1 * 10 - 9), Point(2 * 10, 1 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(2 * 10 - 9, 1 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 10 * 10 - 9), Point(1 * 10, 10 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 10 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 9 * 10 - 9), Point(1 * 10, 9 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 9 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 8 * 10 - 9), Point(1 * 10, 8 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 8 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 7 * 10 - 9), Point(1 * 10, 7 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 7 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 6 * 10 - 9), Point(1 * 10, 6 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 6 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 5 * 10 - 9), Point(1 * 10, 5 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 5 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 4 * 10 - 9), Point(1 * 10, 4 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 4 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 3 * 10 - 9), Point(1 * 10, 3 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 3 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 2 * 10 - 9), Point(1 * 10, 2 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 2 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 -DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 1 * 10 - 9), Point(1 * 10, 1 * 10)))); +DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(Point(1 * 10 - 9, 1 * 10 - 9), 0))); SELECT count(*) FROM t2; count(*) 100 @@ -1617,23 +1617,17 @@ DROP TABLE t1; CREATE TABLE t1 (a GEOMETRY NOT NULL, SPATIAL KEY(a)) ENGINE=MyISAM; INSERT INTO t1 VALUES (Point(1,1)),(Point(2,2)),(Point(3,3)); EXPLAIN SELECT * FROM t1 WHERE CONTAINS(a,1); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +ERROR HY000: Illegal parameter data type int for operation 'st_contains' EXPLAIN SELECT * FROM t1 WHERE CONTAINS(a,1.0); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +ERROR HY000: Illegal parameter data type decimal for operation 'st_contains' EXPLAIN SELECT * FROM t1 WHERE CONTAINS(a,1e0); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +ERROR HY000: Illegal parameter data type double for operation 'st_contains' EXPLAIN SELECT * FROM t1 WHERE CONTAINS(a,TIME'00:00:00'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +ERROR HY000: Illegal parameter data type time for operation 'st_contains' EXPLAIN SELECT * FROM t1 WHERE CONTAINS(a,DATE'2001-01-01'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +ERROR HY000: Illegal parameter data type date for operation 'st_contains' EXPLAIN SELECT * FROM t1 WHERE CONTAINS(a,TIMESTAMP'2001-01-01 00:00:00'); -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +ERROR HY000: Illegal parameter data type datetime for operation 'st_contains' DROP TABLE t1; # # End of 10.1 tests diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result index 3530eb14499..daa8c20ddd2 100644 --- a/mysql-test/r/gis.result +++ b/mysql-test/r/gis.result @@ -1045,9 +1045,9 @@ f5 datetime YES NULL drop view v1; drop table t1; SELECT MultiPoint(12345,''); -ERROR 22007: Illegal non geometric '12345' value found during parsing +ERROR HY000: Illegal parameter data type int for operation 'geometrycollection' SELECT 1 FROM (SELECT GREATEST(1,GEOMETRYCOLLECTION('00000','00000')) b FROM DUAL) AS d WHERE (LINESTRING(d.b)); -ERROR 22007: Illegal non geometric ''00000'' value found during parsing +ERROR HY000: Illegal parameter data type varchar for operation 'geometrycollection' # # BUG#51875: crash when loading data into geometry function polyfromwkb # @@ -1115,7 +1115,7 @@ ISCLOSED(CONVERT(CONCAT(' ', 0x2), BINARY(20))) # GEOMETRY FUNCTION ARGUMENTS # SELECT GEOMETRYCOLLECTION((SELECT @@OLD)); -ERROR 22007: Illegal non geometric '' value found during parsing +ERROR HY000: Illegal parameter data type bigint for operation 'geometrycollection' # # MDEV-4252 geometry query crashes server # @@ -1614,13 +1614,7 @@ insert into t1 values(geomfromtext("POINT(0 0)")); insert into t1 values(geomfromtext("POINT(0 9.2233720368548e18)")); insert into t1 values(geomfromtext("POINT(0 9.2233720368548e18)")); select equals(`a`,convert(`a` using utf8)) from `t1`; -equals(`a`,convert(`a` using utf8)) -1 -NULL -NULL -Warnings: -Warning 1300 Invalid utf8 character string: '\xE0C' -Warning 1300 Invalid utf8 character string: '\xE0C' +ERROR HY000: Illegal parameter data type longblob for operation 'st_equals' select equals(`a`,left(`a`,23)) from `t1`; equals(`a`,left(`a`,23)) NULL @@ -4353,5 +4347,308 @@ def ST_SRID(POINT(1,1)) 3 10 1 Y 32896 0 63 ST_ISSIMPLE(POINT(1,1)) ST_ISRING(POINT(1,1)) ST_ISCLOSED(POINT(1,1)) ST_DIMENSION(POINT(1,1)) ST_NUMGEOMETRIES(POINT(1,1)) ST_NUMINTERIORRINGS(POINT(1,1)) ST_NUMPOINTS(POINT(1,1)) ST_SRID(POINT(1,1)) 1 -1 -1 0 NULL NULL NULL 0 # +# MDEV-12803 Improve function parameter data type control +# +# +# Item_geometry_func_args_geometry +# +SELECT ST_CENTROID(1); +ERROR HY000: Illegal parameter data type int for operation 'st_centroid' +SELECT ST_ENVELOPE(1); +ERROR HY000: Illegal parameter data type int for operation 'st_envelope' +SELECT ST_BOUNDARY(1); +ERROR HY000: Illegal parameter data type int for operation 'st_boundary' +SELECT ST_STARTPOINT(1); +ERROR HY000: Illegal parameter data type int for operation 'st_startpoint' +SELECT ST_POINTONSURFACE(1); +ERROR HY000: Illegal parameter data type int for operation 'st_pointonsurface' +SELECT ST_POINTN(1,1); +ERROR HY000: Illegal parameter data type int for operation 'st_pointn' +SELECT ST_POINTN(LineString(Point(1,1)),Point(1,1)); +ERROR HY000: Illegal parameter data type geometry for operation 'st_pointn' +SELECT ST_BUFFER(1, 1); +ERROR HY000: Illegal parameter data type int for operation 'st_buffer' +SELECT ST_BUFFER(Point(1,1), Point(1,1)); +ERROR HY000: Illegal parameter data type geometry for operation 'st_buffer' +PREPARE stmt FROM 'CREATE TABLE t1 AS SELECT ST_ENVELOPE(?) AS g'; +EXECUTE stmt USING 1; +ERROR HY000: Illegal parameter data type bigint for operation 'st_envelope' +EXECUTE stmt USING POINT(1,1); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `g` polygon DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT ST_ASTEXT(g) FROM t1; +ST_ASTEXT(g) +POLYGON((1 1,1 1,1 1,1 1,1 1)) +DROP TABLE t1; +DEALLOCATE PREPARE stmt; +PREPARE stmt FROM 'CREATE TABLE t1 AS SELECT ST_BUFFER(?,?) AS g'; +EXECUTE stmt USING 1,1; +ERROR HY000: Illegal parameter data type bigint for operation 'st_buffer' +EXECUTE stmt USING POINT(1,1),POINT(1,1); +ERROR HY000: Illegal parameter data type geometry for operation 'st_buffer' +EXECUTE stmt USING POINT(1,1),0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `g` geometry DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT ST_GEOMETRYTYPE(g) FROM t1; +ST_GEOMETRYTYPE(g) +POINT +DROP TABLE t1; +DEALLOCATE PREPARE stmt; +# +# Functions created GEOMETRY from non-GEOMETRY +# +SELECT ST_GEOMETRYFROMTEXT(ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'st_geometryfromtext' +SELECT ST_GEOMETRYFROMTEXT(Point(1,1)); +ERROR HY000: Illegal parameter data type geometry for operation 'st_geometryfromtext' +SELECT ST_GEOMETRYFROMTEXT(Point(1,1), 1); +ERROR HY000: Illegal parameter data type geometry for operation 'st_geometryfromtext' +SELECT ST_GEOMETRYFROMTEXT('test', Point(1,1)); +ERROR HY000: Illegal parameter data type geometry for operation 'st_geometryfromtext' +SELECT ST_GEOMETRYFROMWKB(ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'st_geometryfromwkb' +SELECT ST_GEOMETRYFROMWKB(1); +ERROR HY000: Illegal parameter data type int for operation 'st_geometryfromwkb' +SELECT ST_GEOMETRYFROMWKB(1, 1); +ERROR HY000: Illegal parameter data type int for operation 'st_geometryfromwkb' +SELECT ST_GEOMETRYFROMWKB(Point(1,1), Point(1,1)); +ERROR HY000: Illegal parameter data type geometry for operation 'st_geometryfromwkb' +SELECT ST_GEOMFROMGEOJSON(ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'st_geomfromgeojson' +SELECT ST_GEOMFROMGEOJSON(1); +ERROR HY000: Illegal parameter data type int for operation 'st_geomfromgeojson' +SELECT ST_GEOMFROMGEOJSON(1,1); +ERROR HY000: Illegal parameter data type int for operation 'st_geomfromgeojson' +SELECT ST_GEOMFROMGEOJSON(Point(1,1), Point(1,1)); +ERROR HY000: Illegal parameter data type geometry for operation 'st_geomfromgeojson' +SELECT POINT(ROW(1,1),1); +ERROR HY000: Illegal parameter data type row for operation 'point' +SELECT POINT(POINT(1,1),1); +ERROR HY000: Illegal parameter data type geometry for operation 'point' +SELECT POINT(1,ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'point' +SELECT POINT(1,POINT(1,1)); +ERROR HY000: Illegal parameter data type geometry for operation 'point' +PREPARE stmt FROM 'CREATE TABLE t1 AS SELECT ST_GEOMFROMTEXT(?,?) AS g'; +EXECUTE stmt USING 1,1; +ERROR HY000: Illegal parameter data type bigint for operation 'st_geometryfromtext' +EXECUTE stmt USING POINT(1,1),POINT(1,1); +ERROR HY000: Illegal parameter data type geometry for operation 'st_geometryfromtext' +EXECUTE stmt USING 'POINT(1 1)',1; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `g` geometry DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT ST_ASTEXT(g), SRID(g) FROM t1; +ST_ASTEXT(g) SRID(g) +POINT(1 1) 1 +DROP TABLE t1; +DEALLOCATE PREPARE stmt; +# Item_func_spatial_collection +SELECT GEOMETRYCOLLECTION(ROW(1,1), POINT(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'geometrycollection' +SELECT GEOMETRYCOLLECTION(POINT(1,1), ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'geometrycollection' +SELECT GEOMETRYCOLLECTION(1, POINT(1,1)); +ERROR HY000: Illegal parameter data type int for operation 'geometrycollection' +SELECT GEOMETRYCOLLECTION(POINT(1,1), 1); +ERROR HY000: Illegal parameter data type int for operation 'geometrycollection' +# Item_func_spatial_operation +SELECT ST_UNION(ROW(1,1), POINT(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'st_union' +SELECT ST_UNION(POINT(1,1), ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'st_union' +SELECT ST_UNION(1, POINT(1,1)); +ERROR HY000: Illegal parameter data type int for operation 'st_union' +SELECT ST_UNION(POINT(1,1), 1); +ERROR HY000: Illegal parameter data type int for operation 'st_union' +# Item_binary_func_args_geometry +SELECT ST_ASWKB(ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'st_aswkb' +SELECT ST_ASWKB(1); +ERROR HY000: Illegal parameter data type int for operation 'st_aswkb' +SELECT ST_ASWKB('test'); +ERROR HY000: Illegal parameter data type varchar for operation 'st_aswkb' +# Item_real_func_args_geometry +SELECT ST_X(ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'st_x' +SELECT ST_X(1); +ERROR HY000: Illegal parameter data type int for operation 'st_x' +SELECT ST_X('test'); +ERROR HY000: Illegal parameter data type varchar for operation 'st_x' +SELECT ST_Y(ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'st_y' +SELECT ST_Y(1); +ERROR HY000: Illegal parameter data type int for operation 'st_y' +SELECT ST_Y('test'); +ERROR HY000: Illegal parameter data type varchar for operation 'st_y' +SELECT ST_AREA(ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'st_area' +SELECT ST_AREA(1); +ERROR HY000: Illegal parameter data type int for operation 'st_area' +SELECT ST_AREA('test'); +ERROR HY000: Illegal parameter data type varchar for operation 'st_area' +SELECT ST_LENGTH(ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'st_length' +SELECT ST_LENGTH(1); +ERROR HY000: Illegal parameter data type int for operation 'st_length' +SELECT ST_LENGTH('test'); +ERROR HY000: Illegal parameter data type varchar for operation 'st_length' +# Item_real_func_geometry_args_geometry_geometry +SELECT ST_DISTANCE(ROW(1,1), 1); +ERROR HY000: Illegal parameter data type row for operation 'st_distance' +SELECT ST_DISTANCE(1, 1); +ERROR HY000: Illegal parameter data type int for operation 'st_distance' +SELECT ST_DISTANCE('test', 1); +ERROR HY000: Illegal parameter data type varchar for operation 'st_distance' +SELECT ST_DISTANCE(POINT(1,1), ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'st_distance' +SELECT ST_DISTANCE(POINT(1,1), 1); +ERROR HY000: Illegal parameter data type int for operation 'st_distance' +SELECT ST_DISTANCE(POINT(1,1), 'test'); +ERROR HY000: Illegal parameter data type varchar for operation 'st_distance' +# Item_int_func_args_geometry +SELECT ST_ISSIMPLE(ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'st_issimple' +SELECT ST_ISSIMPLE(1); +ERROR HY000: Illegal parameter data type int for operation 'st_issimple' +SELECT ST_ISSIMPLE('test'); +ERROR HY000: Illegal parameter data type varchar for operation 'st_issimple' +SELECT ST_ISRING(ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'st_isring' +SELECT ST_ISRING(1); +ERROR HY000: Illegal parameter data type int for operation 'st_isring' +SELECT ST_ISRING('test'); +ERROR HY000: Illegal parameter data type varchar for operation 'st_isring' +SELECT ST_ISCLOSED(ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'st_isclosed' +SELECT ST_ISCLOSED(1); +ERROR HY000: Illegal parameter data type int for operation 'st_isclosed' +SELECT ST_ISCLOSED('test'); +ERROR HY000: Illegal parameter data type varchar for operation 'st_isclosed' +SELECT ST_DIMENSION(ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'st_dimension' +SELECT ST_DIMENSION(1); +ERROR HY000: Illegal parameter data type int for operation 'st_dimension' +SELECT ST_DIMENSION('test'); +ERROR HY000: Illegal parameter data type varchar for operation 'st_dimension' +SELECT ST_NUMGEOMETRIES(ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'st_numgeometries' +SELECT ST_NUMGEOMETRIES(1); +ERROR HY000: Illegal parameter data type int for operation 'st_numgeometries' +SELECT ST_NUMGEOMETRIES('test'); +ERROR HY000: Illegal parameter data type varchar for operation 'st_numgeometries' +SELECT ST_NUMINTERIORRINGS(ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'st_numinteriorrings' +SELECT ST_NUMINTERIORRINGS(1); +ERROR HY000: Illegal parameter data type int for operation 'st_numinteriorrings' +SELECT ST_NUMINTERIORRINGS('test'); +ERROR HY000: Illegal parameter data type varchar for operation 'st_numinteriorrings' +SELECT ST_NUMPOINTS(ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'st_numpoints' +SELECT ST_NUMPOINTS(1); +ERROR HY000: Illegal parameter data type int for operation 'st_numpoints' +SELECT ST_NUMPOINTS('test'); +ERROR HY000: Illegal parameter data type varchar for operation 'st_numpoints' +SELECT ST_SRID(ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'srid' +SELECT ST_SRID(1); +ERROR HY000: Illegal parameter data type int for operation 'srid' +SELECT ST_SRID('test'); +ERROR HY000: Illegal parameter data type varchar for operation 'srid' +# Item_bool_func_args_geometry +SELECT ST_ISEMPTY(ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'st_isempty' +SELECT ST_ISEMPTY(1); +ERROR HY000: Illegal parameter data type int for operation 'st_isempty' +SELECT ST_ISEMPTY('test'); +ERROR HY000: Illegal parameter data type varchar for operation 'st_isempty' +# Item_bool_func_geometry_args_geometry_geometry +SELECT ST_RELATE(ROW(1,1), POINT(1,1), 'T*F**FFF*'); +ERROR HY000: Illegal parameter data type row for operation 'st_relate' +SELECT ST_RELATE(POINT(1,1), ROW(1,1), 'T*F**FFF*'); +ERROR HY000: Illegal parameter data type row for operation 'st_relate' +SELECT ST_RELATE(1, POINT(1,1), 'T*F**FFF*'); +ERROR HY000: Illegal parameter data type int for operation 'st_relate' +SELECT ST_RELATE(POINT(1,1), 1, 'T*F**FFF*'); +ERROR HY000: Illegal parameter data type int for operation 'st_relate' +SELECT ST_RELATE(Point(1,1),Point(1,1),'T*F**FFF*') AS equals; +equals +1 +SELECT ST_RELATE(Point(1,1),Point(1,1),NULL); +ST_RELATE(Point(1,1),Point(1,1),NULL) +NULL +SELECT ST_RELATE(Point(1,1),Point(1,1),ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'st_relate' +SELECT ST_RELATE(Point(1,1),Point(1,1),1); +ERROR HY000: Illegal parameter data type int for operation 'st_relate' +SELECT ST_RELATE(Point(1,1),Point(1,1),1.0); +ERROR HY000: Illegal parameter data type decimal for operation 'st_relate' +SELECT ST_RELATE(Point(1,1),Point(1,1),1e0); +ERROR HY000: Illegal parameter data type double for operation 'st_relate' +SELECT ST_RELATE(Point(1,1),Point(1,1),TIME'10:10:10'); +ERROR HY000: Illegal parameter data type time for operation 'st_relate' +SELECT ST_RELATE(Point(1,1),Point(1,1),DATE'2010-01-01'); +ERROR HY000: Illegal parameter data type date for operation 'st_relate' +SELECT ST_RELATE(Point(1,1),Point(1,1),TIMESTAMP'2010-01-01 10:10:10'); +ERROR HY000: Illegal parameter data type datetime for operation 'st_relate' +SELECT ST_RELATE(Point(1,1),Point(1,1),Point(1,1)); +ERROR HY000: Illegal parameter data type geometry for operation 'st_relate' +# Item_str_ascii_func_args_geometry +SELECT ST_ASTEXT(ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'st_astext' +SELECT ST_ASTEXT(1); +ERROR HY000: Illegal parameter data type int for operation 'st_astext' +SELECT ST_ASTEXT('test'); +ERROR HY000: Illegal parameter data type varchar for operation 'st_astext' +SELECT ST_GEOMETRYTYPE(ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'st_geometrytype' +SELECT ST_GEOMETRYTYPE(1); +ERROR HY000: Illegal parameter data type int for operation 'st_geometrytype' +SELECT ST_GEOMETRYTYPE('test'); +ERROR HY000: Illegal parameter data type varchar for operation 'st_geometrytype' +SELECT ST_ASGEOJSON(ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'st_asgeojson' +SELECT ST_ASGEOJSON(1); +ERROR HY000: Illegal parameter data type int for operation 'st_asgeojson' +SELECT ST_ASGEOJSON('test'); +ERROR HY000: Illegal parameter data type varchar for operation 'st_asgeojson' +SELECT ST_ASGEOJSON(POINT(1,1), POINT(1,1)); +ERROR HY000: Illegal parameter data type geometry for operation 'st_asgeojson' +SELECT ST_ASGEOJSON(POINT(1,1), 1, POINT(1,1)); +ERROR HY000: Illegal parameter data type geometry for operation 'st_asgeojson' +# Item_func_spatial_rel +SELECT ST_TOUCHES(ROW(1,1), POINT(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'st_touches' +SELECT ST_TOUCHES(POINT(1,1), ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'st_touches' +SELECT ST_TOUCHES(1, POINT(1,1)); +ERROR HY000: Illegal parameter data type int for operation 'st_touches' +SELECT ST_TOUCHES(POINT(1,1), 1); +ERROR HY000: Illegal parameter data type int for operation 'st_touches' +SELECT ST_TOUCHES('test', POINT(1,1)); +ERROR HY000: Illegal parameter data type varchar for operation 'st_touches' +SELECT ST_TOUCHES(POINT(1,1), 'test'); +ERROR HY000: Illegal parameter data type varchar for operation 'st_touches' +SELECT MBRTOUCHES(ROW(1,1), POINT(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'st_touches' +SELECT MBRTOUCHES(POINT(1,1), ROW(1,1)); +ERROR HY000: Illegal parameter data type row for operation 'st_touches' +SELECT MBRTOUCHES(1, POINT(1,1)); +ERROR HY000: Illegal parameter data type int for operation 'st_touches' +SELECT MBRTOUCHES(POINT(1,1), 1); +ERROR HY000: Illegal parameter data type int for operation 'st_touches' +SELECT MBRTOUCHES('test', POINT(1,1)); +ERROR HY000: Illegal parameter data type varchar for operation 'st_touches' +SELECT MBRTOUCHES(POINT(1,1), 'test'); +ERROR HY000: Illegal parameter data type varchar for operation 'st_touches' +# # End of 10.3 tests # diff --git a/mysql-test/suite/innodb_gis/r/1.result b/mysql-test/suite/innodb_gis/r/1.result index 3ab57babc43..0c0c6834acf 100644 --- a/mysql-test/suite/innodb_gis/r/1.result +++ b/mysql-test/suite/innodb_gis/r/1.result @@ -1024,9 +1024,9 @@ f5 datetime YES NULL drop view v1; drop table t1; SELECT MultiPoint(12345,''); -ERROR 22007: Illegal non geometric '12345' value found during parsing +ERROR HY000: Illegal parameter data type int for operation 'geometrycollection' SELECT 1 FROM (SELECT GREATEST(1,GEOMETRYCOLLECTION('00000','00000')) b FROM DUAL) AS d WHERE (LINESTRING(d.b)); -ERROR 22007: Illegal non geometric ''00000'' value found during parsing +ERROR HY000: Illegal parameter data type varchar for operation 'geometrycollection' # # BUG#51875: crash when loading data into geometry function ST_polyfromwkb # @@ -1090,7 +1090,7 @@ ST_ISCLOSED(CONVERT(CONCAT(' ', 0x2), BINARY(20))) # GEOMETRY FUNCTION ARGUMENTS # SELECT GEOMETRYCOLLECTION((SELECT @@OLD)); -ERROR 22007: Illegal non geometric '' value found during parsing +ERROR HY000: Illegal parameter data type bigint for operation 'geometrycollection' End of 5.1 tests # # Bug#11908153: CRASH AND/OR VALGRIND ERRORS IN FIELD_BLOB::GET_KEY_IMAGE @@ -1489,5 +1489,4 @@ DROP DATABASE gis_ogs; # Bug#13362660 ASSERTION `FIELD_POS < FIELD_COUNT' FAILED. IN PROTOCOL_TEXT::STORE # SELECT ST_Union('', ''), md5(1); -ST_Union('', '') md5(1) -NULL c4ca4238a0b923820dcc509a6f75849b +ERROR HY000: Illegal parameter data type varchar for operation 'st_union' diff --git a/mysql-test/suite/innodb_gis/r/gis.result b/mysql-test/suite/innodb_gis/r/gis.result index beb411505f9..836a15bb295 100644 --- a/mysql-test/suite/innodb_gis/r/gis.result +++ b/mysql-test/suite/innodb_gis/r/gis.result @@ -1020,9 +1020,9 @@ f5 datetime YES NULL drop view v1; drop table t1; SELECT MultiPoint(12345,''); -ERROR 22007: Illegal non geometric '12345' value found during parsing +ERROR HY000: Illegal parameter data type int for operation 'geometrycollection' SELECT 1 FROM (SELECT GREATEST(1,GEOMETRYCOLLECTION('00000','00000')) b FROM DUAL) AS d WHERE (LINESTRING(d.b)); -ERROR 22007: Illegal non geometric ''00000'' value found during parsing +ERROR HY000: Illegal parameter data type varchar for operation 'geometrycollection' # # BUG#51875: crash when loading data into geometry function ST_polyfromwkb # @@ -1091,7 +1091,7 @@ ST_ISCLOSED(CONVERT(CONCAT(' ', 0x2), BINARY(20))) # GEOMETRY FUNCTION ARGUMENTS # SELECT GEOMETRYCOLLECTION((SELECT @@OLD)); -ERROR 22007: Illegal non geometric '' value found during parsing +ERROR HY000: Illegal parameter data type bigint for operation 'geometrycollection' End of 5.1 tests # # Bug#11908153: CRASH AND/OR VALGRIND ERRORS IN FIELD_BLOB::GET_KEY_IMAGE @@ -1481,5 +1481,4 @@ DROP DATABASE gis_ogs; # Bug#13362660 ASSERTION `FIELD_POS < FIELD_COUNT' FAILED. IN PROTOCOL_TEXT::STORE # SELECT ST_Union('', ''), md5(1); -ST_Union('', '') md5(1) -NULL c4ca4238a0b923820dcc509a6f75849b +ERROR HY000: Illegal parameter data type varchar for operation 'st_union' diff --git a/mysql-test/suite/innodb_gis/r/precise.result b/mysql-test/suite/innodb_gis/r/precise.result index 9d6538bc3ed..3c05b814602 100644 --- a/mysql-test/suite/innodb_gis/r/precise.result +++ b/mysql-test/suite/innodb_gis/r/precise.result @@ -216,8 +216,7 @@ st_u MULTIPOLYGON(((525400 18370,525000.9677614468 183300,525400 183300,525400 18370)),((525000 183300,525000 183700,525000.9677614468 183300,525000 183300)),((525265.58 183481.95,525263.95 183484.75,525260.7 183491.55,525276.79 183500,525278.39 183500.84,525278.63 183500.97,525280.98 183502.26,525283.17 183503.47,525289.11 183506.62,525296.42 183510.31,525296.57 183510.39,525298.67 183511.53,525302.81 183513.8,525304.5 183510.83,525307.85 183504.95,525304.45 183504.25,525301.75 183509.35,525283.55 183500,525282.2 183499.3,525282.3 183499.1,525280.35 183498.2,525275.5 183495.7,525276.5 183493.45,525278.97 183488.73,525265.58 183481.95),(525266.99 183484.33,525263.26 183491.55,525266.15 183493.04,525269.88 183485.82,525266.99 183484.33),(525272.06 183488.37,525268.94 183494.51,525271.94 183496.03,525275.06 183489.89,525272.06 183488.37))) SET @a=0x0000000001030000000200000005000000000000000000000000000000000000000000000000002440000000000000000000000000000024400000000000002440000000000000000000000000000024400000000000000000000000000000000000000000000000000000F03F000000000000F03F0000000000000040000000000000F03F00000000000000400000000000000040000000000000F03F0000000000000040000000000000F03F000000000000F03F; SELECT ST_ASTEXT(ST_TOUCHES(@a, ST_GEOMFROMTEXT('point(0 0)'))) t; -t -NULL +ERROR HY000: Illegal parameter data type int for operation 'st_astext' DROP TABLE IF EXISTS p1; CREATE PROCEDURE p1(dist DOUBLE, geom TEXT) BEGIN diff --git a/mysql-test/suite/innodb_gis/t/1.test b/mysql-test/suite/innodb_gis/t/1.test index cda4ef0afff..0dd4d3262a2 100644 --- a/mysql-test/suite/innodb_gis/t/1.test +++ b/mysql-test/suite/innodb_gis/t/1.test @@ -738,7 +738,7 @@ drop table t1; # Bug#44684: valgrind reports invalid reads in # Item_func_spatial_collection::val_str # ---error ER_ILLEGAL_VALUE_FOR_TYPE +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION SELECT MultiPoint(12345,''); #SELECT MultiPoint(123451,''); #SELECT MultiPoint(1234512,''); @@ -765,7 +765,7 @@ SELECT MultiPoint(12345,''); # # Bug55531 crash with conversions of geometry types / strings # ---error ER_ILLEGAL_VALUE_FOR_TYPE +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION SELECT 1 FROM (SELECT GREATEST(1,GEOMETRYCOLLECTION('00000','00000')) b FROM DUAL) AS d WHERE (LINESTRING(d.b)); @@ -868,7 +868,7 @@ SELECT ST_ISCLOSED(CONVERT(CONCAT(' ', 0x2), BINARY(20))); --echo # GEOMETRY FUNCTION ARGUMENTS --echo # --replace_regex /non geometric .* value/non geometric '' value/ ---error ER_ILLEGAL_VALUE_FOR_TYPE +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION SELECT GEOMETRYCOLLECTION((SELECT @@OLD)); @@ -1449,5 +1449,5 @@ DROP DATABASE gis_ogs; --echo # Bug#13362660 ASSERTION `FIELD_POS < FIELD_COUNT' FAILED. IN PROTOCOL_TEXT::STORE --echo # -# --error ER_GIS_INVALID_DATA +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION SELECT ST_Union('', ''), md5(1); diff --git a/mysql-test/suite/innodb_gis/t/gis.test b/mysql-test/suite/innodb_gis/t/gis.test index d6de03a7e01..8087f6be82e 100644 --- a/mysql-test/suite/innodb_gis/t/gis.test +++ b/mysql-test/suite/innodb_gis/t/gis.test @@ -732,7 +732,7 @@ drop table t1; # Bug#44684: valgrind reports invalid reads in # Item_func_spatial_collection::val_str # ---error ER_ILLEGAL_VALUE_FOR_TYPE +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION SELECT MultiPoint(12345,''); #SELECT MultiPoint(123451,''); #SELECT MultiPoint(1234512,''); @@ -759,7 +759,7 @@ SELECT MultiPoint(12345,''); # # Bug55531 crash with conversions of geometry types / strings # ---error ER_ILLEGAL_VALUE_FOR_TYPE +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION SELECT 1 FROM (SELECT GREATEST(1,GEOMETRYCOLLECTION('00000','00000')) b FROM DUAL) AS d WHERE (LINESTRING(d.b)); @@ -870,7 +870,7 @@ SELECT ST_ISCLOSED(CONVERT(CONCAT(' ', 0x2), BINARY(20))); --echo # GEOMETRY FUNCTION ARGUMENTS --echo # --replace_regex /non geometric .* value/non geometric '' value/ ---error ER_ILLEGAL_VALUE_FOR_TYPE +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION SELECT GEOMETRYCOLLECTION((SELECT @@OLD)); @@ -1443,4 +1443,5 @@ DROP DATABASE gis_ogs; --echo # # --error ER_GIS_INVALID_DATA +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION SELECT ST_Union('', ''), md5(1); diff --git a/mysql-test/suite/innodb_gis/t/precise.test b/mysql-test/suite/innodb_gis/t/precise.test index 9174a100003..08b7e348362 100644 --- a/mysql-test/suite/innodb_gis/t/precise.test +++ b/mysql-test/suite/innodb_gis/t/precise.test @@ -140,7 +140,7 @@ ST_geomfromtext('POLYGON((525298.67 183511.53,525296.57 183491.55))'))) st_u; SET @a=0x0000000001030000000200000005000000000000000000000000000000000000000000000000002440000000000000000000000000000024400000000000002440000000000000000000000000000024400000000000000000000000000000000000000000000000000000F03F000000000000F03F0000000000000040000000000000F03F00000000000000400000000000000040000000000000F03F0000000000000040000000000000F03F000000000000F03F; -# --error ER_GIS_INVALID_DATA +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION SELECT ST_ASTEXT(ST_TOUCHES(@a, ST_GEOMFROMTEXT('point(0 0)'))) t; diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test index abc86476a6b..1038fc0f6d0 100644 --- a/mysql-test/t/func_gconcat.test +++ b/mysql-test/t/func_gconcat.test @@ -745,7 +745,7 @@ DROP TABLE t1; CREATE TABLE t1(f1 int); INSERT INTO t1 values (0),(0); --disable_ps_protocol ---error ER_ILLEGAL_VALUE_FOR_TYPE +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION SELECT POLYGON((SELECT 1 FROM (SELECT 1 IN (GROUP_CONCAT(t1.f1)) FROM t1, t1 t GROUP BY t.f1 ) d)); --enable_ps_protocol DROP TABLE t1; diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test index ff8d6bba46d..ee70102c496 100644 --- a/mysql-test/t/func_math.test +++ b/mysql-test/t/func_math.test @@ -352,10 +352,10 @@ DROP TABLE t1; --echo # Bug#11764994 57900: CREATE TABLE .. SELECT ASSERTS SCALE >= 0 && PRECISION > 0 && SCALE <= PR --echo # +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION CREATE TABLE t1 SELECT CEIL(LINESTRINGFROMWKB(1) DIV NULL); -DROP TABLE t1; +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION CREATE TABLE t1 SELECT FLOOR(LINESTRINGFROMWKB(1) DIV NULL); -DROP TABLE t1; --echo # --echo # Bug#11765923 58937: MANY VALGRIND ERRORS AFTER GROUPING BY RESULT OF DECIMAL COLUMN FUNCTION diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test index c4694619a1f..2f7dd638445 100644 --- a/mysql-test/t/func_str.test +++ b/mysql-test/t/func_str.test @@ -1606,7 +1606,7 @@ format(rpad('111111111.1', # and can't suppress prepare time warnings for DO. # ---error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION SELECT round( concat( ( diff --git a/mysql-test/t/gis-precise.test b/mysql-test/t/gis-precise.test index 5e57569a912..1f8259bb828 100644 --- a/mysql-test/t/gis-precise.test +++ b/mysql-test/t/gis-precise.test @@ -134,6 +134,7 @@ geomfromtext('POLYGON((525298.67 183511.53,525296.57 183491.55))'))) st_u; SET @a=0x0000000001030000000200000005000000000000000000000000000000000000000000000000002440000000000000000000000000000024400000000000002440000000000000000000000000000024400000000000000000000000000000000000000000000000000000F03F000000000000F03F0000000000000040000000000000F03F00000000000000400000000000000040000000000000F03F0000000000000040000000000000F03F000000000000F03F; +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION SELECT ASTEXT(TOUCHES(@a, GEOMFROMTEXT('point(0 0)'))) t; diff --git a/mysql-test/t/gis-rtree.test b/mysql-test/t/gis-rtree.test index a17d691b6f2..976398359c6 100644 --- a/mysql-test/t/gis-rtree.test +++ b/mysql-test/t/gis-rtree.test @@ -61,7 +61,7 @@ while ($1) let $2=10; while ($2) { - eval DELETE FROM t2 WHERE Within(g, Envelope(GeometryFromWKB(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), 0))); SELECT count(*) FROM t2; dec $2; } @@ -998,11 +998,17 @@ DROP TABLE t1; --echo # CREATE TABLE t1 (a GEOMETRY NOT NULL, SPATIAL KEY(a)) ENGINE=MyISAM; INSERT INTO t1 VALUES (Point(1,1)),(Point(2,2)),(Point(3,3)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION EXPLAIN SELECT * FROM t1 WHERE CONTAINS(a,1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION EXPLAIN SELECT * FROM t1 WHERE CONTAINS(a,1.0); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION EXPLAIN SELECT * FROM t1 WHERE CONTAINS(a,1e0); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION EXPLAIN SELECT * FROM t1 WHERE CONTAINS(a,TIME'00:00:00'); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION EXPLAIN SELECT * FROM t1 WHERE CONTAINS(a,DATE'2001-01-01'); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION EXPLAIN SELECT * FROM t1 WHERE CONTAINS(a,TIMESTAMP'2001-01-01 00:00:00'); DROP TABLE t1; diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index 05ec751e686..05f455e6186 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -706,7 +706,7 @@ drop table t1; # Bug#44684: valgrind reports invalid reads in # Item_func_spatial_collection::val_str # ---error ER_ILLEGAL_VALUE_FOR_TYPE +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION SELECT MultiPoint(12345,''); #SELECT MultiPoint(123451,''); #SELECT MultiPoint(1234512,''); @@ -733,7 +733,7 @@ SELECT MultiPoint(12345,''); # # Bug55531 crash with conversions of geometry types / strings # ---error ER_ILLEGAL_VALUE_FOR_TYPE +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION SELECT 1 FROM (SELECT GREATEST(1,GEOMETRYCOLLECTION('00000','00000')) b FROM DUAL) AS d WHERE (LINESTRING(d.b)); @@ -826,7 +826,7 @@ SELECT ISCLOSED(CONVERT(CONCAT(' ', 0x2), BINARY(20))); --echo # GEOMETRY FUNCTION ARGUMENTS --echo # --replace_regex /non geometric .* value/non geometric '' value/ ---error ER_ILLEGAL_VALUE_FOR_TYPE +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION SELECT GEOMETRYCOLLECTION((SELECT @@OLD)); --echo # @@ -1373,6 +1373,7 @@ create table t1(a geometry not null)engine=myisam; insert into t1 values(geomfromtext("POINT(0 0)")); insert into t1 values(geomfromtext("POINT(0 9.2233720368548e18)")); insert into t1 values(geomfromtext("POINT(0 9.2233720368548e18)")); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION select equals(`a`,convert(`a` using utf8)) from `t1`; select equals(`a`,left(`a`,23)) from `t1`; drop table t1; @@ -2318,7 +2319,6 @@ EXECUTE stmt USING POINT(1,1); SHOW CREATE TABLE t1; DROP TABLE t1; - --echo # --echo # MDEV-12854 Synchronize CREATE..SELECT data type and result set metadata data type for INT functions --echo # @@ -2339,5 +2339,341 @@ SELECT --echo # +--echo # MDEV-12803 Improve function parameter data type control +--echo # + +--echo # +--echo # Item_geometry_func_args_geometry +--echo # + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_CENTROID(1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_ENVELOPE(1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_BOUNDARY(1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_STARTPOINT(1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_POINTONSURFACE(1); + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_POINTN(1,1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_POINTN(LineString(Point(1,1)),Point(1,1)); + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_BUFFER(1, 1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_BUFFER(Point(1,1), Point(1,1)); + + +PREPARE stmt FROM 'CREATE TABLE t1 AS SELECT ST_ENVELOPE(?) AS g'; +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +EXECUTE stmt USING 1; +EXECUTE stmt USING POINT(1,1); +SHOW CREATE TABLE t1; +SELECT ST_ASTEXT(g) FROM t1; +DROP TABLE t1; +DEALLOCATE PREPARE stmt; + +PREPARE stmt FROM 'CREATE TABLE t1 AS SELECT ST_BUFFER(?,?) AS g'; +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +EXECUTE stmt USING 1,1; +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +EXECUTE stmt USING POINT(1,1),POINT(1,1); +EXECUTE stmt USING POINT(1,1),0; +SHOW CREATE TABLE t1; +SELECT ST_GEOMETRYTYPE(g) FROM t1; +DROP TABLE t1; +DEALLOCATE PREPARE stmt; + +--echo # +--echo # Functions created GEOMETRY from non-GEOMETRY +--echo # + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_GEOMETRYFROMTEXT(ROW(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_GEOMETRYFROMTEXT(Point(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_GEOMETRYFROMTEXT(Point(1,1), 1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_GEOMETRYFROMTEXT('test', Point(1,1)); + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_GEOMETRYFROMWKB(ROW(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_GEOMETRYFROMWKB(1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_GEOMETRYFROMWKB(1, 1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_GEOMETRYFROMWKB(Point(1,1), Point(1,1)); + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_GEOMFROMGEOJSON(ROW(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_GEOMFROMGEOJSON(1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_GEOMFROMGEOJSON(1,1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_GEOMFROMGEOJSON(Point(1,1), Point(1,1)); + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT POINT(ROW(1,1),1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT POINT(POINT(1,1),1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT POINT(1,ROW(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT POINT(1,POINT(1,1)); + + +PREPARE stmt FROM 'CREATE TABLE t1 AS SELECT ST_GEOMFROMTEXT(?,?) AS g'; +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +EXECUTE stmt USING 1,1; +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +EXECUTE stmt USING POINT(1,1),POINT(1,1); +EXECUTE stmt USING 'POINT(1 1)',1; +SHOW CREATE TABLE t1; +SELECT ST_ASTEXT(g), SRID(g) FROM t1; +DROP TABLE t1; +DEALLOCATE PREPARE stmt; + + + +--echo # Item_func_spatial_collection + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT GEOMETRYCOLLECTION(ROW(1,1), POINT(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT GEOMETRYCOLLECTION(POINT(1,1), ROW(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT GEOMETRYCOLLECTION(1, POINT(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT GEOMETRYCOLLECTION(POINT(1,1), 1); + +--echo # Item_func_spatial_operation + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_UNION(ROW(1,1), POINT(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_UNION(POINT(1,1), ROW(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_UNION(1, POINT(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_UNION(POINT(1,1), 1); + +--echo # Item_binary_func_args_geometry + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_ASWKB(ROW(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_ASWKB(1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_ASWKB('test'); + + +--echo # Item_real_func_args_geometry + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_X(ROW(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_X(1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_X('test'); + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_Y(ROW(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_Y(1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_Y('test'); + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_AREA(ROW(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_AREA(1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_AREA('test'); + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_LENGTH(ROW(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_LENGTH(1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_LENGTH('test'); + + +--echo # Item_real_func_geometry_args_geometry_geometry + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_DISTANCE(ROW(1,1), 1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_DISTANCE(1, 1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_DISTANCE('test', 1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_DISTANCE(POINT(1,1), ROW(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_DISTANCE(POINT(1,1), 1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_DISTANCE(POINT(1,1), 'test'); + + +--echo # Item_int_func_args_geometry + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_ISSIMPLE(ROW(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_ISSIMPLE(1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_ISSIMPLE('test'); + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_ISRING(ROW(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_ISRING(1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_ISRING('test'); + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_ISCLOSED(ROW(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_ISCLOSED(1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_ISCLOSED('test'); + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_DIMENSION(ROW(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_DIMENSION(1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_DIMENSION('test'); + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_NUMGEOMETRIES(ROW(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_NUMGEOMETRIES(1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_NUMGEOMETRIES('test'); + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_NUMINTERIORRINGS(ROW(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_NUMINTERIORRINGS(1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_NUMINTERIORRINGS('test'); + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_NUMPOINTS(ROW(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_NUMPOINTS(1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_NUMPOINTS('test'); + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_SRID(ROW(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_SRID(1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_SRID('test'); + + +--echo # Item_bool_func_args_geometry + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_ISEMPTY(ROW(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_ISEMPTY(1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_ISEMPTY('test'); + +--echo # Item_bool_func_geometry_args_geometry_geometry + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_RELATE(ROW(1,1), POINT(1,1), 'T*F**FFF*'); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_RELATE(POINT(1,1), ROW(1,1), 'T*F**FFF*'); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_RELATE(1, POINT(1,1), 'T*F**FFF*'); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_RELATE(POINT(1,1), 1, 'T*F**FFF*'); +SELECT ST_RELATE(Point(1,1),Point(1,1),'T*F**FFF*') AS equals; +SELECT ST_RELATE(Point(1,1),Point(1,1),NULL); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_RELATE(Point(1,1),Point(1,1),ROW(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_RELATE(Point(1,1),Point(1,1),1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_RELATE(Point(1,1),Point(1,1),1.0); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_RELATE(Point(1,1),Point(1,1),1e0); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_RELATE(Point(1,1),Point(1,1),TIME'10:10:10'); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_RELATE(Point(1,1),Point(1,1),DATE'2010-01-01'); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_RELATE(Point(1,1),Point(1,1),TIMESTAMP'2010-01-01 10:10:10'); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_RELATE(Point(1,1),Point(1,1),Point(1,1)); + + +--echo # Item_str_ascii_func_args_geometry + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_ASTEXT(ROW(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_ASTEXT(1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_ASTEXT('test'); + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_GEOMETRYTYPE(ROW(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_GEOMETRYTYPE(1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_GEOMETRYTYPE('test'); + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_ASGEOJSON(ROW(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_ASGEOJSON(1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_ASGEOJSON('test'); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_ASGEOJSON(POINT(1,1), POINT(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_ASGEOJSON(POINT(1,1), 1, POINT(1,1)); + +--echo # Item_func_spatial_rel + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_TOUCHES(ROW(1,1), POINT(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_TOUCHES(POINT(1,1), ROW(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_TOUCHES(1, POINT(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_TOUCHES(POINT(1,1), 1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_TOUCHES('test', POINT(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT ST_TOUCHES(POINT(1,1), 'test'); + +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT MBRTOUCHES(ROW(1,1), POINT(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT MBRTOUCHES(POINT(1,1), ROW(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT MBRTOUCHES(1, POINT(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT MBRTOUCHES(POINT(1,1), 1); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT MBRTOUCHES('test', POINT(1,1)); +--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION +SELECT MBRTOUCHES(POINT(1,1), 'test'); + +--echo # --echo # End of 10.3 tests --echo # |