diff options
Diffstat (limited to 'mysql-test/r/gis.result')
-rw-r--r-- | mysql-test/r/gis.result | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result index ba69416b0ef..4b7a9a5dc0c 100644 --- a/mysql-test/r/gis.result +++ b/mysql-test/r/gis.result @@ -834,6 +834,17 @@ create table t1 (g geometry not null); insert into t1 values(default); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field drop table t1; +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; +Field Type Null Key Default Extra +GeomFromwkb(ASBINARY(a)) geometry YES NULL +DESCRIBE v2; +Field Type Null Key Default Extra +a geometry YES NULL +DROP VIEW v1,v2; +DROP TABLE t1; create table t1 (name VARCHAR(100), square GEOMETRY); INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); @@ -918,25 +929,25 @@ SELECT Overlaps(@horiz1, @point2) FROM DUAL; Overlaps(@horiz1, @point2) 0 DROP TABLE t1; -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; f1 -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; AsText(f2) AsText(f3) -POINT(1 1) LINESTRING(0 0,1 1,2 2) +LINESTRING(1 1,2 2) LINESTRING(0 0,1 1,2 2) select AsText(a) from (select f2 as a from t1 union select f3 from t1) t; AsText(a) -POINT(1 1) +LINESTRING(1 1,2 2) LINESTRING(0 0,1 1,2 2) create table t2 as select f2 as a from t1 union select f3 from t1; desc t2; Field Type Null Key Default Extra -a point YES NULL +a linestring YES NULL select AsText(a) from t2; AsText(a) -POINT(1 1) +LINESTRING(1 1,2 2) LINESTRING(0 0,1 1,2 2) drop table t1, t2; SELECT 1; |