diff options
author | Tor Didriksen <tor.didriksen@oracle.com> | 2011-12-05 15:42:45 +0100 |
---|---|---|
committer | Tor Didriksen <tor.didriksen@oracle.com> | 2011-12-05 15:42:45 +0100 |
commit | 0cd9228124266a1e8cf41e74994cdba1380ac2e2 (patch) | |
tree | 411757003da4dbc4ebbd20eca60c3288a86d885a /mysql-test/t/gis.test | |
parent | bce2360f53eb238aba4196c4893bc0ecf560a6cd (diff) | |
download | mariadb-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/t/gis.test')
-rw-r--r-- | mysql-test/t/gis.test | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index 104afddeee5..e75ae732979 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -838,5 +838,16 @@ FORCE INDEX(i) WHERE a = date_sub(now(), interval 2808.4 year_month) DROP TABLE g1; +--echo # +--echo # Bug#13013970 MORE CRASHES IN FIELD_BLOB::GET_KEY_IMAGE +--echo # + +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) ; + +DROP TABLE g1; --echo End of 5.5 tests |