summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorunknown <bjorn.munch@oracle.com>2011-05-06 10:27:04 +0200
committerBjorn Munch <bjorn.munch@oracle.com>2011-05-06 10:27:04 +0200
commitdb4c6f56e2f890f5854e7896a06d492d21011dbe (patch)
tree645e1ea2659598cac24bc1f7732c5d77ecccb7d6 /sql/sql_parse.cc
parent6875f4df30209c8682e37db03a163d596394809e (diff)
parentd5db154065da9b82c2b990e007e24a676d39185f (diff)
downloadmariadb-git-db4c6f56e2f890f5854e7896a06d492d21011dbe.tar.gz
Merge from mysql-5.5.12-release
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index d9d99de2911..24f7fdb8e61 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -4434,7 +4434,11 @@ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables)
return 1; /* purecov: inspected */
thd->send_explain_fields(result);
res= mysql_explain_union(thd, &thd->lex->unit, result);
- if (lex->describe & DESCRIBE_EXTENDED)
+ /*
+ The code which prints the extended description is not robust
+ against malformed queries, so skip it if we have an error.
+ */
+ if (!res && (lex->describe & DESCRIBE_EXTENDED))
{
char buff[1024];
String str(buff,(uint32) sizeof(buff), system_charset_info);