summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
authorDmitry Shulga <dmitry.shulga@mariadb.com>2021-05-05 17:56:12 +0700
committerSergei Golubchik <serg@mariadb.org>2021-06-17 19:30:24 +0200
commit5478ca779a8769c4ebdf03ba5f5d7be9fdcf7ef5 (patch)
treee2e35ea1b49cad7622d949c82301efa44a9f5f66 /sql/sql_lex.h
parentf536974b73dec47ddd87cb525f2f0d26d84f1a1d (diff)
downloadmariadb-git-5478ca779a8769c4ebdf03ba5f5d7be9fdcf7ef5.tar.gz
MDEV-25576: The statement EXPLAIN running as regular statement and as prepared statement produces different results for UPDATE with subquery
10.6 cleanup
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index 6df1996409c..0d8251968e8 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -4773,6 +4773,19 @@ public:
bool resolve_references_to_cte(TABLE_LIST *tables,
TABLE_LIST **tables_last);
+ /**
+ Turn on the SELECT_DESCRIBE flag for every SELECT_LEX involved into
+ the statement being processed in case the statement is EXPLAIN UPDATE/DELETE.
+
+ @param lex current LEX
+ */
+
+ void promote_select_describe_flag_if_needed()
+ {
+ if (describe)
+ builtin_select.options |= SELECT_DESCRIBE;
+ }
+
};