summaryrefslogtreecommitdiff
path: root/sql/sql_union.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-02-14 14:09:29 +0100
committerSergei Golubchik <sergii@pisem.net>2014-02-14 14:09:29 +0100
commitfb27ce22f77705d394beb6acd7aa4be2ff008890 (patch)
treecf1288c289055405cf14f2b9ee408a90948e95ab /sql/sql_union.cc
parente2a99f1863a7a4d5d6d22c9f39de3b255c959f98 (diff)
parent5a21dc7df1024c13c212f687c5ebc40d9cb74c5b (diff)
downloadmariadb-git-fb27ce22f77705d394beb6acd7aa4be2ff008890.tar.gz
5.3 merge
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r--sql/sql_union.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index 82fe7f2936a..1d4ceb6245d 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -639,7 +639,8 @@ bool st_select_lex_unit::exec()
if (!(uncacheable & ~UNCACHEABLE_EXPLAIN) && item)
item->make_const();
- saved_error= optimize();
+ if ((saved_error= optimize()))
+ DBUG_RETURN(saved_error);
if (uncacheable || !item || !item->assigned() || describe)
{