From a20195bba5ff695b8c00b8b3f57edced3c1108a6 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 3 May 2021 23:26:30 +0200 Subject: MDEV-21603 Crashing SHOW TABLES with derived table in WHERE condition When you only need view structure, don't call handle_derived with DT_CREATE and rely on its internal hackish check to skip DT_CREATE. Because handle_derived is called from many different places, and this internal hackish check is indiscriminative. Instead, just don't ask handle_derived to do DT_CREATE if you don't want it to do DT_CREATE. --- sql/sql_class.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'sql/sql_class.h') diff --git a/sql/sql_class.h b/sql/sql_class.h index ce4bf67e745..e08bb3e6358 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -3469,10 +3469,6 @@ public: { return server_status & SERVER_STATUS_IN_TRANS; } - inline bool fill_derived_tables() - { - return !stmt_arena->is_stmt_prepare() && !lex->only_view_structure(); - } inline bool fill_information_schema_tables() { return !stmt_arena->is_stmt_prepare(); -- cgit v1.2.1