diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2011-07-04 16:17:34 +0500 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2011-07-04 16:17:34 +0500 |
commit | 7f55ea121191131723c99889943f8a278c5a7b4b (patch) | |
tree | 05822e1d1ec37e565ce128d4ef0c1916cb6e6ba1 /sql/item_geofunc.cc | |
parent | 0e6c889c83bcf6c37526e3a3fee192bb59cab92e (diff) | |
download | mariadb-git-7f55ea121191131723c99889943f8a278c5a7b4b.tar.gz |
fix for bug #801212 Assertion with ST_INTERSECTION on NULL values
The ::val_str() method has to return NULL if it calculated
the null_value, not just set the related flag.
per-file comments:
mysql-test/r/gis-precise.result
fix for bug #801212 Assertion with ST_INTERSECTION on NULL values
test result updated.
mysql-test/t/gis-precise.test
fix for bug #801212 Assertion with ST_INTERSECTION on NULL values
test case added.
sql/item_geofunc.cc
fix for bug #801212 Assertion with ST_INTERSECTION on NULL values
return NULL from the val_str if we get the null_value.
Diffstat (limited to 'sql/item_geofunc.cc')
-rw-r--r-- | sql/item_geofunc.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc index 8cae6dd6564..b1fe72e99e0 100644 --- a/sql/item_geofunc.cc +++ b/sql/item_geofunc.cc @@ -1014,7 +1014,10 @@ String *Item_func_spatial_operation::val_str(String *str_value) !(g1= Geometry::construct(&buffer1, res1->ptr(), res1->length())) || !(g2= Geometry::construct(&buffer2, res2->ptr(), res2->length())) || g1->store_shapes(&trn) || g2->store_shapes(&trn)))) + { + str_value= 0; goto exit; + } collector.prepare_operation(); |