-
Tor Didriksen authored
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.
0cd92281