summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2017-04-04 11:00:25 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2017-04-07 13:22:21 +0200
commit2d670d26dea98b35dddb6690de31b98080a3e424 (patch)
tree819f9967f6f950843ea7191d0173b4810116dd68 /sql/sql_select.cc
parent85da56bf2dc983b346089f463f2cce1552b0d3bf (diff)
downloadmariadb-git-bb-10.2-MDEV-12379.tar.gz
MDEV-12379: Server crashes in TABLE_LIST::is_with_table on SHOW CREATE VIEWbb-10.2-MDEV-12379
In case of error on opening VIEW (absent table for example) it is still possible to print its definition but some variable is not set (table_list->derived->derived) so it is better do not try to test it when there is safer alternative (table_list itself).
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 6e355ef58f5..ecbac041dc4 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -25077,7 +25077,7 @@ void TABLE_LIST::print(THD *thd, table_map eliminated_tables, String *str,
}
else if (derived)
{
- if (!derived->derived->is_with_table())
+ if (!is_with_table())
{
// A derived table
str->append('(');