diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2017-10-07 14:17:45 +0400 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2017-10-07 14:24:49 +0400 |
commit | ea4e8bab327806bdfcaa8e92dd2d1436476a8cef (patch) | |
tree | d4155f419d906cd5c4bedb21742874bdb6ac632d /sql/item_geofunc.cc | |
parent | a659291e8543704ed7ee116758ca87a57e5c092f (diff) | |
download | mariadb-git-ea4e8bab327806bdfcaa8e92dd2d1436476a8cef.tar.gz |
MDEV-12705 10.1.18-MariaDB-1~jessie - mysqld got signal 11.
Space for the next operation wasn't reserved in
Item_func_spatial_relate::val_str()
Diffstat (limited to 'sql/item_geofunc.cc')
-rw-r--r-- | sql/item_geofunc.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc index 3f0efbfa871..a271e481814 100644 --- a/sql/item_geofunc.cc +++ b/sql/item_geofunc.cc @@ -1332,6 +1332,8 @@ static int setup_relate_func(Geometry *g1, Geometry *g2, } else func->repeat_expression(shape_a); + if (func->reserve_op_buffer(1)) + return 1; func->add_operation(op_matrix(nc%3), 1); if (do_store_shapes) { @@ -1502,11 +1504,13 @@ longlong Item_func_spatial_precise_rel::val_int() Gcalc_function::op_intersection, 2); func.add_operation(Gcalc_function::op_internals, 1); shape_a= func.get_next_expression_pos(); - if ((null_value= g1.store_shapes(&trn))) + if ((null_value= g1.store_shapes(&trn)) || + func.reserve_op_buffer(1)) break; func.add_operation(Gcalc_function::op_internals, 1); shape_b= func.get_next_expression_pos(); - if ((null_value= g2.store_shapes(&trn))) + if ((null_value= g2.store_shapes(&trn)) || + func.reserve_op_buffer(1)) break; func.add_operation(Gcalc_function::v_find_t | Gcalc_function::op_intersection, 2); @@ -1741,6 +1745,8 @@ int Item_func_buffer::Transporter::single_point(double x, double y) { if (buffer_op == Gcalc_function::op_difference) { + if (m_fn->reserve_op_buffer(1)) + return 1; m_fn->add_operation(Gcalc_function::op_false, 0); return 0; } |