summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2003-11-17 20:53:40 +0200
committerunknown <bell@sanja.is.com.ua>2003-11-17 20:53:40 +0200
commit79533975b1453a716dce3a4b3936740ee22d92d9 (patch)
treeed274b7466c7617feeb74030a1c60751ff018af5 /sql/sql_lex.h
parent8fed6653de2c298704f9ee74f96f17184af46b45 (diff)
downloadmariadb-git-79533975b1453a716dce3a4b3936740ee22d92d9.tar.gz
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
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index be931c56247..118283f141e 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -84,6 +84,7 @@ enum enum_sql_command {
#define DESCRIBE_NORMAL 1
#define DESCRIBE_EXTENDED 2
+
typedef List<Item> List_item;
typedef struct st_lex_master_info
@@ -226,9 +227,14 @@ public:
};
ulong options;
+ /*
+ result of this query can't be cached, bit field, can be :
+ UNCACHEABLE_DEPENDENT
+ UNCACHEABLE_RAND
+ UNCACHEABLE_UNCACHEABLE
+ */
+ uint8 uncacheable;
enum sub_select_type linkage;
- bool dependent; /* dependent from outer select subselect */
- bool uncacheable; /* result of this query can't be cached */
bool no_table_names_allowed; /* used for global order by */
bool no_error; /* suppress error message (convert it to warnings) */
@@ -565,7 +571,7 @@ typedef struct st_lex
bool derived_tables;
bool safe_to_cache_query;
st_lex() {}
- inline void uncacheable()
+ inline void uncacheable(uint8 cause)
{
safe_to_cache_query= 0;
@@ -580,7 +586,8 @@ typedef struct st_lex
un != &unit;
sl= sl->outer_select(), un= sl->master_unit())
{
- sl->uncacheable = un->uncacheable= 1;
+ sl->uncacheable|= cause;
+ un->uncacheable|= cause;
}
}
} LEX;