diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2013-03-18 17:58:00 +0400 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2013-03-18 17:58:00 +0400 |
commit | 589247ae86b25eaa9bd75e4f26ecd06831469311 (patch) | |
tree | 59322d96d5fd1f4f28565101f06a64aa23c028f0 /mysql-test | |
parent | a4a18e0cbbaf2a43507b3c2232fed700403ad04d (diff) | |
download | mariadb-git-589247ae86b25eaa9bd75e4f26ecd06831469311.tar.gz |
MDEV-4252 geometry query crashes server.
Additional fixes for possible overflows in length-related
calculations in 'spatial' implementations.
Checks added to the ::get_data_size() methods.
max_n_points decreased to occupy less 2G size. An
object of that size is practically inoperable anyway.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/gis.result | 12 | ||||
-rw-r--r-- | mysql-test/t/gis.test | 6 |
2 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result index 69e73d018c7..7566f0beb8c 100644 --- a/mysql-test/r/gis.result +++ b/mysql-test/r/gis.result @@ -1087,7 +1087,19 @@ NULL # SELECT GEOMETRYCOLLECTION((SELECT @@OLD)); ERROR 22007: Illegal non geometric '' value found during parsing +# +# MDEV-4252 geometry query crashes server +# select astext(0x0100000000030000000100000000000010); astext(0x0100000000030000000100000000000010) NULL +select envelope(0x0100000000030000000100000000000010); +envelope(0x0100000000030000000100000000000010) +NULL +select geometryn(0x0100000000070000000100000001030000000200000000000000ffff0000, 1); +geometryn(0x0100000000070000000100000001030000000200000000000000ffff0000, 1) +NULL +select geometryn(0x0100000000070000000100000001030000000200000000000000ffffff0f, 1); +geometryn(0x0100000000070000000100000001030000000200000000000000ffffff0f, 1) +NULL End of 5.1 tests diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index cc5d158f600..c42541e82b8 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -826,6 +826,12 @@ SELECT ISCLOSED(CONVERT(CONCAT(' ', 0x2), BINARY(20))); --error ER_ILLEGAL_VALUE_FOR_TYPE SELECT GEOMETRYCOLLECTION((SELECT @@OLD)); +--echo # +--echo # MDEV-4252 geometry query crashes server +--echo # select astext(0x0100000000030000000100000000000010); +select envelope(0x0100000000030000000100000000000010); +select geometryn(0x0100000000070000000100000001030000000200000000000000ffff0000, 1); +select geometryn(0x0100000000070000000100000001030000000200000000000000ffffff0f, 1); --echo End of 5.1 tests |