summaryrefslogtreecommitdiff
path: root/sql/item_subselect.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-02-11 09:45:34 +0100
committerSergei Golubchik <serg@mariadb.org>2017-02-11 09:45:34 +0100
commitf3914d10b61eb4bc4184b2a9aa92a998e1abd779 (patch)
tree0f973c0dc2fb1f667ed852e4177b17938e28b6b9 /sql/item_subselect.cc
parent559345806216369bad999539018bd3943860a5d5 (diff)
parent2195bb4e416232ab807ff67eecf03b1223bf6bff (diff)
downloadmariadb-git-f3914d10b61eb4bc4184b2a9aa92a998e1abd779.tar.gz
Merge branch 'bb-10.2-serg-merge' into 10.2
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r--sql/item_subselect.cc19
1 files changed, 12 insertions, 7 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index 89c663b5f16..94bc71ca889 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -1,5 +1,5 @@
-/* Copyright (c) 2002, 2015, Oracle and/or its affiliates.
- Copyright (c) 2010, 2015, MariaDB
+/* Copyright (c) 2002, 2016, Oracle and/or its affiliates.
+ Copyright (c) 2010, 2016, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -3520,9 +3520,14 @@ bool subselect_union_engine::is_executed() const
bool subselect_union_engine::no_rows()
{
/* Check if we got any rows when reading UNION result from temp. table: */
- return MY_TEST(!(unit->fake_select_lex ?
- unit->fake_select_lex->join->send_records :
- ((select_union_direct *)(unit->get_union_result()))
+ if (unit->fake_select_lex)
+ {
+ JOIN *join= unit->fake_select_lex->join;
+ if (join)
+ return MY_TEST(!join->send_records);
+ return false;
+ }
+ return MY_TEST(!(((select_union_direct *)(unit->get_union_result()))
->send_records));
}
@@ -4897,9 +4902,9 @@ bool subselect_hash_sj_engine::init(List<Item> *tmp_columns, uint subquery_id)
result= result_sink;
/*
- If the subquery has blobs, or the total key lenght is bigger than
+ If the subquery has blobs, or the total key length is bigger than
some length, or the total number of key parts is more than the
- allowed maximum (currently MAX_REF_PARTS == 16), then the created
+ allowed maximum (currently MAX_REF_PARTS == 32), then the created
index cannot be used for lookups and we can't use hash semi
join. If this is the case, delete the temporary table since it
will not be used, and tell the caller we failed to initialize the