summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2019-05-08 00:08:09 -0700
committerIgor Babaev <igor@askmonty.org>2019-05-08 09:45:24 -0700
commit09aa5d3f6988e92f869adfd13a925bfead6f040d (patch)
tree6e487e5d025573d3d638be0d07b52cb6210609f0 /sql/sql_lex.h
parent9d805004d8e7913a98d25142d22627a4a6e39063 (diff)
downloadmariadb-git-09aa5d3f6988e92f869adfd13a925bfead6f040d.tar.gz
MDEV-17894 Assertion `(thd->lex)->current_select' failed in MYSQLparse(),
query with VALUES() A table value constructor can be used in all contexts where a select can be used. In particular an ORDER BY clause or a LIMIT clause or both of them can be attached to a table value constructor to produce a new query. Unfortunately execution of such queries was not supported. This patch fixes the problem.
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index 4eaec7d062b..24383b1949c 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -801,6 +801,12 @@ public:
*/
Item_int *intersect_mark;
/**
+ TRUE if the unit contained TVC at the top level that has been wrapped
+ into SELECT:
+ VALUES (v1) ... (vn) => SELECT * FROM (VALUES (v1) ... (vn)) as tvc
+ */
+ bool with_wrapped_tvc;
+ /**
Pointer to 'last' select, or pointer to select where we stored
global parameters for union.