summaryrefslogtreecommitdiff
path: root/sql/item_subselect.h
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2016-09-07 15:49:56 -0700
committerIgor Babaev <igor@askmonty.org>2016-09-07 15:49:56 -0700
commita2b8bdfbb98a193cdaf1e331819446db94c2f362 (patch)
tree7b4b2a012d821a2a0d69db1ab54f61651ad9f604 /sql/item_subselect.h
parent82626d78799c59bddd10ee63c03f5770fc11fa3a (diff)
parent4ec088f2e76a8004c270d28d042f548c0f81e5f7 (diff)
downloadmariadb-git-a2b8bdfbb98a193cdaf1e331819446db94c2f362.tar.gz
Merge branch '10.2' into bb-10.2-mdev9864
Diffstat (limited to 'sql/item_subselect.h')
-rw-r--r--sql/item_subselect.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/item_subselect.h b/sql/item_subselect.h
index 492ad10c2b6..83340573e8a 100644
--- a/sql/item_subselect.h
+++ b/sql/item_subselect.h
@@ -765,7 +765,8 @@ public:
ROWID_MERGE_ENGINE, TABLE_SCAN_ENGINE};
subselect_engine(Item_subselect *si,
- select_result_interceptor *res)
+ select_result_interceptor *res):
+ thd(NULL)
{
result= res;
item= si;
@@ -781,7 +782,7 @@ public:
Should be called before prepare().
*/
void set_thd(THD *thd_arg);
- THD * get_thd() { return thd; }
+ THD * get_thd() { return thd ? thd : current_thd; }
virtual int prepare(THD *)= 0;
virtual void fix_length_and_dec(Item_cache** row)= 0;
/*