diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-12-22 12:49:06 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-12-22 12:49:06 +0100 |
commit | 9fefe973360124f281122a129434a36e661168b9 (patch) | |
tree | d4028e2d680914e2a0c233fc4ea287ba0cbaeba0 /sql/item_subselect.cc | |
parent | 8fcdd6b0ecbb966f4479856efe93a963a7a422f7 (diff) | |
parent | c8f0eeb9c8596be83fefb7fef9f9871e53edb020 (diff) | |
download | mariadb-git-9fefe973360124f281122a129434a36e661168b9.tar.gz |
Merge branch 'mysql/5.5' into 5.5
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r-- | sql/item_subselect.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index dda9986f60f..5750de713e6 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 @@ -2969,8 +2969,12 @@ bool subselect_union_engine::is_executed() const bool subselect_union_engine::no_rows() { + bool rows_present= false; + /* Check if we got any rows when reading UNION result from temp. table: */ - return test(!unit->fake_select_lex->join->send_records); + if (unit->fake_select_lex->join) + rows_present= test(!unit->fake_select_lex->join->send_records); + return rows_present; } @@ -6105,4 +6109,3 @@ end: void subselect_table_scan_engine::cleanup() { } - |