summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2017-01-18 09:27:19 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2017-01-18 09:27:19 +0100
commit9ea0b44c5696d9357465625c3fc9b7f57a856009 (patch)
treee33ef9e70c5c40b8bd5c510476f6989785f2b4ff
parent08413254b7ad952d9cd97c2faf1f6898ea73d387 (diff)
downloadmariadb-git-9ea0b44c5696d9357465625c3fc9b7f57a856009.tar.gz
Such big blocks in query processing should be represented in the debugging trace.
-rw-r--r--sql/sql_derived.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc
index 898b6336ae5..c27649ca5e8 100644
--- a/sql/sql_derived.cc
+++ b/sql/sql_derived.cc
@@ -1129,23 +1129,24 @@ bool mysql_derived_reinit(THD *thd, LEX *lex, TABLE_LIST *derived)
bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived)
{
+ DBUG_ENTER("pushdown_cond_for_derived");
if (!cond)
- return false;
+ DBUG_RETURN(false);
st_select_lex_unit *unit= derived->get_unit();
st_select_lex *sl= unit->first_select();
/* Do not push conditions into constant derived */
if (unit->executed)
- return false;
+ DBUG_RETURN(false);
/* Do not push conditions into recursive with tables */
if (derived->is_recursive_with_table())
- return false;
+ DBUG_RETURN(false);
/* Do not push conditions into unit with global ORDER BY ... LIMIT */
if (unit->fake_select_lex && unit->fake_select_lex->explicit_limit)
- return false;
+ DBUG_RETURN(false);
/* Check whether any select of 'unit' allows condition pushdown */
bool some_select_allows_cond_pushdown= false;
@@ -1158,7 +1159,7 @@ bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived)
}
}
if (!some_select_allows_cond_pushdown)
- return false;
+ DBUG_RETURN(false);
/*
Build the most restrictive condition extractable from 'cond'
@@ -1173,7 +1174,7 @@ bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived)
if (!extracted_cond)
{
/* Nothing can be pushed into the derived table */
- return false;
+ DBUG_RETURN(false);
}
/* Push extracted_cond into every select of the unit specifying 'derived' */
st_select_lex *save_curr_select= thd->lex->current_select;
@@ -1257,6 +1258,6 @@ bool pushdown_cond_for_derived(THD *thd, Item *cond, TABLE_LIST *derived)
sl->cond_pushed_into_having= extracted_cond_copy;
}
thd->lex->current_select= save_curr_select;
- return false;
+ DBUG_RETURN(false);
}