diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2018-05-22 19:08:39 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2018-07-04 19:13:55 +0200 |
commit | de745ecf29721795710910a19bd0ea3389da804c (patch) | |
tree | d5beaf48411123b9212a024480e495f1774c633c /sql/sql_cache.cc | |
parent | 1b981b9edb419e2ac3be1d6e007192a827504185 (diff) | |
download | mariadb-git-de745ecf29721795710910a19bd0ea3389da804c.tar.gz |
MDEV-11953: support of brackets in UNION/EXCEPT/INTERSECT operations
Diffstat (limited to 'sql/sql_cache.cc')
-rw-r--r-- | sql/sql_cache.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index aa4c77d0939..76b2d6db247 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -4147,13 +4147,13 @@ Query_cache::is_cacheable(THD *thd, LEX *lex, if (thd->lex->safe_to_cache_query && (thd->variables.query_cache_type == 1 || - (thd->variables.query_cache_type == 2 && (lex->select_lex.options & - OPTION_TO_QUERY_CACHE))) && + (thd->variables.query_cache_type == 2 && + (lex->first_select_lex()->options & OPTION_TO_QUERY_CACHE))) && qc_is_able_to_intercept_result(thd)) { DBUG_PRINT("qcache", ("options: %lx %lx type: %u", (long) OPTION_TO_QUERY_CACHE, - (long) lex->select_lex.options, + (long) lex->first_select_lex()->options, (int) thd->variables.query_cache_type)); if (!(table_count= process_and_count_tables(thd, tables_used, @@ -4174,7 +4174,7 @@ Query_cache::is_cacheable(THD *thd, LEX *lex, ("not interesting query: %d or not cacheable, options %lx %lx type: %u net->vio present: %u", (int) lex->sql_command, (long) OPTION_TO_QUERY_CACHE, - (long) lex->select_lex.options, + (long) lex->first_select_lex()->options, (int) thd->variables.query_cache_type, (uint) MY_TEST(qc_is_able_to_intercept_result(thd)))); DBUG_RETURN(0); |