summaryrefslogtreecommitdiff
path: root/mysql-test/r/gis.result
diff options
context:
space:
mode:
authorTor Didriksen <tor.didriksen@oracle.com>2011-12-05 15:42:45 +0100
committerTor Didriksen <tor.didriksen@oracle.com>2011-12-05 15:42:45 +0100
commit0cd9228124266a1e8cf41e74994cdba1380ac2e2 (patch)
tree411757003da4dbc4ebbd20eca60c3288a86d885a /mysql-test/r/gis.result
parentbce2360f53eb238aba4196c4893bc0ecf560a6cd (diff)
downloadmariadb-git-0cd9228124266a1e8cf41e74994cdba1380ac2e2.tar.gz
Bug#13013970 MORE CRASHES IN FIELD_BLOB::GET_KEY_IMAGE
The predicate is re-written from ((`test`.`g1`.`a` = geometryfromtext('')) or ... to ((`test`.`g1`.`a` = <cache>(geometryfromtext(''))) or ... The range optimizer calls save_in_field_no_warnings, in order to fetch keys. save_in_field_no_warnings returns 0 because of the cache wrapper, and get_mm_leaf() proceeded to call Field_blob::get_key_image() which accesses un-initialized data. mysql-test/r/gis.result: New test case. mysql-test/t/gis.test: New test case. sql/item.cc: If we have cached a null_value, then verify that the Field can accept it.
Diffstat (limited to 'mysql-test/r/gis.result')
-rw-r--r--mysql-test/r/gis.result9
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result
index 0dc10c56bd0..bcfc95bd905 100644
--- a/mysql-test/r/gis.result
+++ b/mysql-test/r/gis.result
@@ -1091,4 +1091,13 @@ FORCE INDEX(i) WHERE a = date_sub(now(), interval 2808.4 year_month)
Warnings:
Warning 1441 Datetime function: datetime field overflow
DROP TABLE g1;
+#
+# Bug#13013970 MORE CRASHES IN FIELD_BLOB::GET_KEY_IMAGE
+#
+CREATE TABLE g1(a TEXT NOT NULL, KEY(a(255)));
+INSERT INTO g1 VALUES ('a'),('a');
+SELECT 1 FROM g1 WHERE a >= ANY
+(SELECT 1 FROM g1 WHERE a = geomfromtext('') OR a) ;
+1
+DROP TABLE g1;
End of 5.5 tests