summaryrefslogtreecommitdiff
path: root/sql/sql_priv.h
diff options
context:
space:
mode:
authorSergey Glukhov <sergey.glukhov@oracle.com>2010-12-14 13:46:00 +0300
committerSergey Glukhov <sergey.glukhov@oracle.com>2010-12-14 13:46:00 +0300
commite6bf102466847e992c8cec894b7ef6bb7a971c8b (patch)
treefefb04085998222a7c9fcd629b204667e76e3a20 /sql/sql_priv.h
parent8d311a855164416744c35742a3e1368c49ca6c1a (diff)
parentfcb83cbf15653bbed15936d8eafb4fc7de3e743b (diff)
downloadmariadb-git-e6bf102466847e992c8cec894b7ef6bb7a971c8b.tar.gz
5.1-bugteam->5.5-bugteam merge
Diffstat (limited to 'sql/sql_priv.h')
-rw-r--r--sql/sql_priv.h33
1 files changed, 29 insertions, 4 deletions
diff --git a/sql/sql_priv.h b/sql/sql_priv.h
index 4e1dac269b7..434dfb1e306 100644
--- a/sql/sql_priv.h
+++ b/sql/sql_priv.h
@@ -182,17 +182,42 @@
*/
+/*
+ Flags below are set when we perform
+ context analysis of the statement and make
+ subqueries non-const. It prevents subquery
+ evaluation at context analysis stage.
+*/
+
+/*
+ Don't evaluate this subquery during statement prepare even if
+ it's a constant one. The flag is switched off in the end of
+ mysqld_stmt_prepare.
+*/
+#define CONTEXT_ANALYSIS_ONLY_PREPARE 1
+/*
+ Special JOIN::prepare mode: changing of query is prohibited.
+ When creating a view, we need to just check its syntax omitting
+ any optimizations: afterwards definition of the view will be
+ reconstructed by means of ::print() methods and written to
+ to an .frm file. We need this definition to stay untouched.
+*/
+#define CONTEXT_ANALYSIS_ONLY_VIEW 2
+/*
+ Don't evaluate this subquery during derived table prepare even if
+ it's a constant one.
+*/
+#define CONTEXT_ANALYSIS_ONLY_DERIVED 4
+
// uncachable cause
#define UNCACHEABLE_DEPENDENT 1
#define UNCACHEABLE_RAND 2
#define UNCACHEABLE_SIDEEFFECT 4
/// forcing to save JOIN for explain
#define UNCACHEABLE_EXPLAIN 8
-/** Don't evaluate subqueries in prepare even if they're not correlated */
-#define UNCACHEABLE_PREPARE 16
/* For uncorrelated SELECT in an UNION with some correlated SELECTs */
-#define UNCACHEABLE_UNITED 32
-#define UNCACHEABLE_CHECKOPTION 64
+#define UNCACHEABLE_UNITED 16
+#define UNCACHEABLE_CHECKOPTION 32
/* Used to check GROUP BY list in the MODE_ONLY_FULL_GROUP_BY mode */
#define UNDEF_POS (-1)