diff options
Diffstat (limited to 'mysql-test/t/gis.test')
-rw-r--r-- | mysql-test/t/gis.test | 54 |
1 files changed, 47 insertions, 7 deletions
diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index 6e41660d598..4192a3284b7 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -356,15 +356,15 @@ insert into t1 values ('85984',GeomFromText('MULTIPOLYGON(((-115.006363 36.248666,-115.263639 36.247466,-115.263839 36.252766,-115.261439 36.252666,-115.261439 36.247366,-115.247239 36.247066)))')); -# Expected result is 115.31877315203187, but IA64 returns 115.31877315203188 -# due to fused multiply-add instructions. ---replace_result 115.31877315203188 115.31877315203187 +# Expected results are 115.2970604672862 and 36.23335610879993, but IA64 returns +# slightly different values due to fused multiply-add instructions. +--replace_result 115.29706047613604 115.2970604672862 36.23335611157958 36.23335610879993 select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from t1 where object_id=85998; -# Expected result is 36.3310176346905, but IA64 returns 36.3310176346904 +# Expected result is 36.34725218253213, but IA64 returns 36.34725217627852 # due to fused multiply-add instructions. ---replace_result 36.3310176346904 36.3310176346905 -114.87787186923326 -114.87787186923313 36.33101763469053 36.33101763469059 36.33101763469043 36.33101763469059 +--replace_result 36.34725217627852 36.34725218253213 -114.86854470090232 -114.86854472054372 select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from t1 where object_id=85984; @@ -542,6 +542,18 @@ insert into t1 values(default); drop table t1; # +# Bug #27300: create view with geometry functions lost columns types +# +CREATE TABLE t1 (a GEOMETRY); +CREATE VIEW v1 AS SELECT GeomFromwkb(ASBINARY(a)) FROM t1; +CREATE VIEW v2 AS SELECT a FROM t1; +DESCRIBE v1; +DESCRIBE v2; + +DROP VIEW v1,v2; +DROP TABLE t1; + +# # Bug#24563: MBROverlaps does not seem to function propertly # Bug#54888: MBROverlaps missing in 5.1? # @@ -610,9 +622,9 @@ DROP TABLE t1; # # Bug#28763: Selecting geometry fields in UNION caused server crash. # -create table t1(f1 geometry, f2 point, f3 linestring); +create table t1(f1 geometry, f2 linestring, f3 linestring); select f1 from t1 union select f1 from t1; -insert into t1 (f2,f3) values (GeomFromText('POINT(1 1)'), +insert into t1 (f2,f3) values (GeomFromText('LINESTRING(1 1, 2 2)'), GeomFromText('LINESTRING(0 0,1 1,2 2)')); select AsText(f2),AsText(f3) from t1; select AsText(a) from (select f2 as a from t1 union select f3 from t1) t; @@ -1480,3 +1492,31 @@ SELECT ASTEXT(p) FROM v1; DROP VIEW v1; # --echo End of 5.5 tests + +--echo # +--echo # Start of 10.0 tests +--echo # + +--echo # +--echo # MDEV-12495 Conditional jump depends on uninitialised value for: SELECT NULL UNION geom_expression +--echo # +SELECT AsText(g) FROM (SELECT NULL AS g UNION SELECT Point(1,1)) AS t1; + +--echo # +--echo # MDEV-10306 Wrong results with combination of CONCAT, SUBSTR and CONVERT in subquery +--echo # + +SET @save_optimizer_switch=@@optimizer_switch; +SET optimizer_switch='derived_merge=on'; +CREATE TABLE t1 (x INT, y INT); +INSERT INTO t1 VALUES(0,0); +SELECT LENGTH(t2) c2 FROM (SELECT ST_BUFFER(POINT(x,y), 0) t2 FROM t1) sub; +SELECT LENGTH(CONCAT(t2,'-',t2)) c2 FROM (SELECT ST_BUFFER(POINT(x,y), 0) t2 FROM t1) sub; +SELECT LENGTH(CONCAT(t2,'--',t2)) c2 FROM (SELECT ST_BUFFER(POINT(x,y), 0) t2 FROM t1) sub; +DROP TABLE t1; +SET optimizer_switch=@save_optimizer_switch; + + +--echo # +--echo # End 10.0 tests +--echo # |