summaryrefslogtreecommitdiff
path: root/sql/item_subselect.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r--sql/item_subselect.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index da651cec70c..29db9eb0903 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -311,9 +311,14 @@ void Item_subselect::update_used_tables()
void Item_subselect::print(String *str, enum_query_type query_type)
{
- str->append('(');
- engine->print(str, query_type);
- str->append(')');
+ if (engine)
+ {
+ str->append('(');
+ engine->print(str, query_type);
+ str->append(')');
+ }
+ else
+ str->append("(...)");
}