diff options
author | kroki@mysql.com <> | 2006-06-27 21:28:32 +0400 |
---|---|---|
committer | kroki@mysql.com <> | 2006-06-27 21:28:32 +0400 |
commit | 08f192f81b57a17c789793ea4761b9dff08a71d9 (patch) | |
tree | d990a0f6a903487ece2ecf5aaf7d5c52d538cf3f /sql/sql_lex.h | |
parent | 36fdaa7d1625ab77e1848c86ab08d4246336d22f (diff) | |
download | mariadb-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.h | 8 |
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 |