summaryrefslogtreecommitdiff
path: root/sql/sql_join_cache.cc
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2010-05-10 19:28:19 +0400
committerSergey Petrunya <psergey@askmonty.org>2010-05-10 19:28:19 +0400
commitb9688830ecb3ab528770aaa00a4b57c29859dc65 (patch)
treeeec72d95c63cc6f14b3adacaebe51a471bd2c6cb /sql/sql_join_cache.cc
parentb2c57cedbfd0f8ce2b4f67021a2aca5dedf9b6c9 (diff)
downloadmariadb-git-b9688830ecb3ab528770aaa00a4b57c29859dc65.tar.gz
Subquery optimizations:
- Better comments - Use more appropriate return types for functions - Provide handling where it was missing.
Diffstat (limited to 'sql/sql_join_cache.cc')
-rw-r--r--sql/sql_join_cache.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/sql_join_cache.cc b/sql/sql_join_cache.cc
index ee863f5ca74..33e688fae54 100644
--- a/sql/sql_join_cache.cc
+++ b/sql/sql_join_cache.cc
@@ -33,8 +33,6 @@
#define NO_MORE_RECORDS_IN_BUFFER (uint)(-1)
-int do_jtbm_materialization_if_needed(JOIN_TAB *tab);
-
/*****************************************************************************
* Join cache module
******************************************************************************/
@@ -1780,8 +1778,11 @@ enum_nested_loop_state JOIN_CACHE_BNL::join_matching_records(bool skip_last)
/* Start retrieving all records of the joined table */
- //jtbm-todo: error handling!
- do_jtbm_materialization_if_needed(join_tab);
+ if (do_jtbm_materialization_if_needed(join_tab))
+ {
+ rc= NESTED_LOOP_ERROR;
+ goto finish;
+ }
if ((error= join_init_read_record(join_tab)))
{