summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
authorkroki@mysql.com <>2006-06-27 21:28:32 +0400
committerkroki@mysql.com <>2006-06-27 21:28:32 +0400
commit08f192f81b57a17c789793ea4761b9dff08a71d9 (patch)
treed990a0f6a903487ece2ecf5aaf7d5c52d538cf3f /sql/sql_lex.h
parent36fdaa7d1625ab77e1848c86ab08d4246336d22f (diff)
downloadmariadb-git-08f192f81b57a17c789793ea4761b9dff08a71d9.tar.gz
Bug#17203: "sql_no_cache sql_cache" in views created from prepared statement
The problem was that we restored SQL_CACHE, SQL_NO_CACHE flags in SELECT statement from internal structures based on value set later at runtime, not the original value set by the user. The solution is to remember that original value.
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index d63c6ef9f20..285e1d6d5a6 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -311,6 +311,14 @@ protected:
public:
ulonglong options;
+
+ /*
+ In sql_cache we store SQL_CACHE flag as specified by user to be
+ able to restore SELECT statement from internal structures.
+ */
+ enum e_sql_cache { SQL_CACHE_UNSPECIFIED, SQL_NO_CACHE, SQL_CACHE };
+ e_sql_cache sql_cache;
+
/*
result of this query can't be cached, bit field, can be :
UNCACHEABLE_DEPENDENT