1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

fixed using 'uncachable' tag and RAND_TABLE_BIT setting

sql/item_create.cc:
  specify cause of uncachability
sql/item_func.cc:
  specify cause of uncachability
sql/item_subselect.cc:
  fixed setting RAND_TABLE_BIT
  specify cause of uncachability
sql/item_subselect.h:
  used one field for all uncachability causes
sql/mysql_priv.h:
  causes of uncachability
sql/sql_lex.cc:
  specify cause of uncachability
sql/sql_lex.h:
  used one field for all uncachability causes
sql/sql_select.cc:
  used one field for all uncachability causes
sql/sql_union.cc:
  used one field for all uncachability causes
sql/sql_yacc.yy:
  specify cause of uncachability
This commit is contained in:
unknown
2003-11-17 20:53:40 +02:00
parent 8fed6653de
commit 79533975b1
10 changed files with 62 additions and 60 deletions

View File

@@ -965,7 +965,8 @@ void st_select_lex_node::init_query()
{
options= 0;
linkage= UNSPECIFIED_TYPE;
no_error= no_table_names_allowed= uncacheable= dependent= 0;
no_error= no_table_names_allowed= 0;
uncacheable= 0;
}
void st_select_lex_node::init_select()
@@ -1215,12 +1216,12 @@ void st_select_lex::mark_as_dependent(SELECT_LEX *last)
for (SELECT_LEX *s= this;
s && s != last;
s= s->outer_select())
if ( !s->dependent )
if (!(s->uncacheable & UNCACHEABLE_DEPENDENT))
{
// Select is dependent of outer select
s->dependent= s->uncacheable= 1;
s->uncacheable|= UNCACHEABLE_DEPENDENT;
SELECT_LEX_UNIT *munit= s->master_unit();
munit->dependent= munit->uncacheable= 1;
munit->uncacheable|= UNCACHEABLE_DEPENDENT;
//Tables will be reopened many times
for (TABLE_LIST *tbl= s->get_table_list();
tbl;