diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2011-11-20 12:30:43 +0400 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2011-11-20 12:30:43 +0400 |
commit | 5a4c91003a73c551d89e0c6878edfe03704352fe (patch) | |
tree | 2be110dc992f0631b422ea2ea9a55fe64e8beb28 /sql/gcalc_slicescan.h | |
parent | 8ea398292e9c5ae8e8efcaccde8e781317855d13 (diff) | |
download | mariadb-git-5a4c91003a73c551d89e0c6878edfe03704352fe.tar.gz |
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.
Diffstat (limited to 'sql/gcalc_slicescan.h')
-rw-r--r-- | sql/gcalc_slicescan.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/gcalc_slicescan.h b/sql/gcalc_slicescan.h index 812b6e6e923..9fc4cea5199 100644 --- a/sql/gcalc_slicescan.h +++ b/sql/gcalc_slicescan.h @@ -38,6 +38,11 @@ #define GCALC_DBUG_ASSERT(r) do {} while(0) #endif /*GCALC_DBUG_OFF*/ +#define GCALC_TERMINATED(state_var) (state_var && (*state_var)) +#define GCALC_SET_TERMINATED(state_var, val) state_var= val +#define GCALC_DECL_TERMINATED_STATE(varname) \ + volatile int *varname; + /* Gcalc_dyn_list class designed to manage long lists of same-size objects with the possible efficiency. @@ -448,6 +453,8 @@ public: public: Gcalc_scan_iterator(size_t blk_size= 8192); + GCALC_DECL_TERMINATED_STATE(killed) + void init(Gcalc_heap *points); /* Iterator can be reused */ void reset(); int step(); |