From 5a4c91003a73c551d89e0c6878edfe03704352fe Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Sun, 20 Nov 2011 12:30:43 +0400 Subject: Fix for bug #809849 spatial operations must be KILL-able. Checks for thd->killed state added to the long loops in geometry calculations. per-file comments: sql/gcalc_slicescan.cc Fix for bug #809849 spatial operations must be KILL-able. checks for TERMINATED_STATE added. sql/gcalc_slicescan.h Fix for bug #809849 spatial operations must be KILL-able. defines added to include checks for termination in the library. sql/gcalc_tools.cc Fix for bug #809849 spatial operations must be KILL-able. checks for TERMINATED_STATE added. sql/gcalc_tools.h Fix for bug #809849 spatial operations must be KILL-able. TERMINATED_STATE pointers added. sql/item_geofunc.cc Fix for bug #809849 spatial operations must be KILL-able. sql/item_geofunc.h Fix for bug #809849 spatial operations must be KILL-able. --- sql/item_geofunc.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sql/item_geofunc.cc') diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc index 23b9483233d..acaa50536ff 100644 --- a/sql/item_geofunc.cc +++ b/sql/item_geofunc.cc @@ -896,6 +896,8 @@ longlong Item_func_spatial_rel::val_int() collector.prepare_operation(); scan_it.init(&collector); + scan_it.killed= (int *) &(current_thd->killed); + #ifdef TMP_BLOCK if (spatial_rel == SP_EQUALS_FUNC) { @@ -950,7 +952,6 @@ String *Item_func_spatial_operation::val_str(String *str_value) collector.prepare_operation(); - scan_it.init(&collector); if (func.alloc_states()) goto exit; @@ -973,7 +974,6 @@ String *Item_func_spatial_operation::val_str(String *str_value) exit: collector.reset(); func.reset(); - scan_it.reset(); res_receiver.reset(); DBUG_RETURN(str_value); } @@ -1399,6 +1399,7 @@ String *Item_func_buffer::val_str(String *str_value) if (func.alloc_states()) goto mem_error; operation.init(&func); + operation.killed= (int *) &(current_thd->killed); if (operation.count_all(&collector) || operation.get_result(&res_receiver)) @@ -1419,7 +1420,6 @@ String *Item_func_buffer::val_str(String *str_value) mem_error: collector.reset(); func.reset(); - scan_it.reset(); res_receiver.reset(); DBUG_RETURN(str_result); } -- cgit v1.2.1