summaryrefslogtreecommitdiff
path: root/mysql-test/t/gis-json.test
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2017-08-10 16:23:26 -0700
committerIgor Babaev <igor@askmonty.org>2017-08-10 16:23:26 -0700
commit5a71e6bd5a61dff6d549d2c4f5927bbbd7ebcfee (patch)
tree98ca05164f4a2bf2fce6e1644bc6335193e69bbd /mysql-test/t/gis-json.test
parent1710dd2bf286f9a240f380925a0067c57c1b29f9 (diff)
parentbf75dcac89d1496032015526dc6ce78d327e329f (diff)
downloadmariadb-git-bb-10-ext-mdev-13369.tar.gz
Merge branch 'bb-10.2-ext' into bb-10-ext-mdev-13369bb-10-ext-mdev-13369
# Conflicts: # mysql-test/r/derived_cond_pushdown.result # mysql-test/t/derived_cond_pushdown.test # sql/sql_derived.cc # sql/sql_select.cc # sql/sql_select.h
Diffstat (limited to 'mysql-test/t/gis-json.test')
-rw-r--r--mysql-test/t/gis-json.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/t/gis-json.test b/mysql-test/t/gis-json.test
index 645c21bf011..5e695fbca9c 100644
--- a/mysql-test/t/gis-json.test
+++ b/mysql-test/t/gis-json.test
@@ -23,6 +23,23 @@ SELECT st_astext(st_geomfromgeojson('{"type""point"}'));
SELECT st_astext(st_geomfromgeojson('{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [102.0, 0.5] } }'));
SELECT st_astext(st_geomfromgeojson('{ "type": "FeatureCollection", "features": [{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [102.0, 0.5] }, "properties": { "prop0": "value0" } }]}'));
+--error ER_WRONG_VALUE_FOR_TYPE
+SELECT ST_AsText(ST_GeomFromGeoJSON('{ "type": "Point", "coordinates": [5.3, 15.0, 4.3]}',5));
+
+--error ER_GIS_INVALID_DATA
+SELECT ST_AsText(ST_GeomFromGeoJSON('{ "type": "Point", "coordinates": [5.3, 15.0, 4.3]}',1));
+
+SELECT ST_AsText(ST_GeomFromGeoJSON('{ "type": "Point", "coordinates": [5.3, 15.0, 4.3]}',2));
+SELECT ST_AsText(ST_GeomFromGeoJSON('{ "type": "Point", "coordinates": [5.3, 15.0, 4.3]}',3));
+SELECT ST_AsText(ST_GeomFromGeoJSON('{ "type": "Point", "coordinates": [5.3, 15.0, 4.3]}',4));
+
+SELECT ST_AsGeoJSON(ST_GeomFromText('POINT(5.363 7.266)'),2);
+SELECT ST_AsGeoJSON(ST_GeomFromText('POINT(5.363 7.266)'),1);
+SELECT ST_AsGeoJSON(ST_GeomFromText('POINT(5.363 7.266)'),10);
+
+SELECT ST_AsGeoJSON(ST_GeomFromText("POINT(10 11)"), 100, 1);
+SELECT ST_AsGeoJSON(ST_GeomFromText("POINT(10 11)"), 100, 5);
+
--echo #
--echo # End of 10.2 tests
--echo #