summaryrefslogtreecommitdiff
path: root/mysql-test/t/gis.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/gis.test')
-rw-r--r--mysql-test/t/gis.test13
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test
index 3845bdcb983..426eec4be6d 100644
--- a/mysql-test/t/gis.test
+++ b/mysql-test/t/gis.test
@@ -558,6 +558,19 @@ SELECT Overlaps(@horiz1, @point2) FROM DUAL;
DROP TABLE t1;
+#
+# Bug#28763: Selecting geometry fields in UNION caused server crash.
+#
+create table t1(f1 geometry, f2 point, f3 linestring);
+select f1 from t1 union select f1 from t1;
+insert into t1 (f2,f3) values (GeomFromText('POINT(1 1)'),
+ 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;
+create table t2 as select f2 as a from t1 union select f3 from t1;
+desc t2;
+select AsText(a) from t2;
+drop table t1, t2;
--echo End of 5.0 tests