mirror of
https://github.com/MariaDB/server.git
synced 2026-04-28 03:05:33 +02:00
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.
This commit is contained in:
parent
36fdaa7d16
commit
08f192f81b
19 changed files with 200 additions and 36 deletions
|
|
@ -140,6 +140,7 @@ void lex_start(THD *thd, uchar *buf,uint length)
|
|||
lex->select_lex.link_next= lex->select_lex.slave= lex->select_lex.next= 0;
|
||||
lex->select_lex.link_prev= (st_select_lex_node**)&(lex->all_selects_list);
|
||||
lex->select_lex.options= 0;
|
||||
lex->select_lex.sql_cache= SELECT_LEX::SQL_CACHE_UNSPECIFIED;
|
||||
lex->select_lex.init_order();
|
||||
lex->select_lex.group_list.empty();
|
||||
lex->describe= 0;
|
||||
|
|
@ -1063,6 +1064,7 @@ int MYSQLlex(void *arg, void *yythd)
|
|||
void st_select_lex_node::init_query()
|
||||
{
|
||||
options= 0;
|
||||
sql_cache= SQL_CACHE_UNSPECIFIED;
|
||||
linkage= UNSPECIFIED_TYPE;
|
||||
no_error= no_table_names_allowed= 0;
|
||||
uncacheable= 0;
|
||||
|
|
@ -1139,6 +1141,7 @@ void st_select_lex::init_select()
|
|||
table_join_options= 0;
|
||||
in_sum_expr= with_wild= 0;
|
||||
options= 0;
|
||||
sql_cache= SQL_CACHE_UNSPECIFIED;
|
||||
braces= 0;
|
||||
when_list.empty();
|
||||
expr_list.empty();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue