diff options
-rw-r--r-- | mysql-test/r/gis.result | 13 | ||||
-rw-r--r-- | mysql-test/t/gis.test | 17 | ||||
-rw-r--r-- | sql/item_subselect.cc | 1 | ||||
-rw-r--r-- | sql/spatial.cc | 3 |
4 files changed, 33 insertions, 1 deletions
diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result index bcfc95bd905..46a36ad8276 100644 --- a/mysql-test/r/gis.result +++ b/mysql-test/r/gis.result @@ -1077,6 +1077,19 @@ SPATIAL INDEX i1 (col1, col2) ERROR HY000: Incorrect arguments to SPATIAL INDEX DROP TABLE t0, t1, t2; # +# BUG#12414917 - ISCLOSED() CRASHES ON 64-BIT BUILDS +# +SELECT ISCLOSED(CONVERT(CONCAT(' ', 0x2), BINARY(20))); +ISCLOSED(CONVERT(CONCAT(' ', 0x2), BINARY(20))) +NULL +# +# BUG#12537203 - CRASH WHEN SUBSELECTING GLOBAL VARIABLES IN +# GEOMETRY FUNCTION ARGUMENTS +# +SELECT GEOMETRYCOLLECTION((SELECT @@OLD)); +ERROR 22007: Illegal non geometric '' value found during parsing +End of 5.1 tests +# # Bug#11908153: CRASH AND/OR VALGRIND ERRORS IN FIELD_BLOB::GET_KEY_IMAGE # CREATE TABLE g1 diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index e75ae732979..6be81c9ff05 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -820,6 +820,23 @@ CREATE TABLE t3 ( # cleanup DROP TABLE t0, t1, t2; + +--echo # +--echo # BUG#12414917 - ISCLOSED() CRASHES ON 64-BIT BUILDS +--echo # +SELECT ISCLOSED(CONVERT(CONCAT(' ', 0x2), BINARY(20))); + +--echo # +--echo # BUG#12537203 - CRASH WHEN SUBSELECTING GLOBAL VARIABLES IN +--echo # GEOMETRY FUNCTION ARGUMENTS +--echo # +--error ER_ILLEGAL_VALUE_FOR_TYPE +SELECT GEOMETRYCOLLECTION((SELECT @@OLD)); + + +--echo End of 5.1 tests + + --echo # --echo # Bug#11908153: CRASH AND/OR VALGRIND ERRORS IN FIELD_BLOB::GET_KEY_IMAGE --echo # diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 0c4b96f7be0..458465ea8f7 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -182,6 +182,7 @@ bool Item_subselect::fix_fields(THD *thd_param, Item **ref) (*ref)= substitution; substitution->name= name; + substitution->name_length= name_length; if (have_to_be_excluded) engine->exclude(); substitution= 0; diff --git a/sql/spatial.cc b/sql/spatial.cc index ee701d82657..ceede83d9b2 100644 --- a/sql/spatial.cc +++ b/sql/spatial.cc @@ -609,7 +609,8 @@ int Gis_line_string::is_closed(int *closed) const return 0; } data+= 4; - if (no_data(data, SIZEOF_STORED_DOUBLE * 2 * n_points)) + if (n_points == 0 || + no_data(data, SIZEOF_STORED_DOUBLE * 2 * n_points)) return 1; /* Get first point */ |