summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h37
1 files changed, 26 insertions, 11 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index a46aaa0bab7..f42f70d4397 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -338,6 +338,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
@@ -793,6 +801,16 @@ public:
byte **sroutines_list_own_last;
uint sroutines_list_own_elements;
+#ifdef HAVE_ROW_BASED_REPLICATION
+ /*
+ Tells if the parsing stage detected that some items require row-based
+ binlogging to give a reliable binlog/replication, or if we will use
+ stored functions or triggers which themselves need require row-based
+ binlogging.
+ */
+ bool binlog_row_based_if_mixed;
+#endif
+
/*
These constructor and destructor serve for creation/destruction
of Query_tables_list instances which are used as backup storage.
@@ -808,6 +826,11 @@ public:
*this= *state;
}
+ /*
+ Direct addition to the list of query tables.
+ If you are using this function, you must ensure that the table
+ object, in particular table->db member, is initialized.
+ */
void add_to_query_tables(TABLE_LIST *table)
{
*(table->prev_global= query_tables_last)= table;
@@ -914,7 +937,7 @@ typedef struct st_lex : public Query_tables_list
List<Name_resolution_context> context_stack;
List<LEX_STRING> db_list;
- SQL_LIST proc_list, auxilliary_table_list, save_list;
+ SQL_LIST proc_list, auxiliary_table_list, save_list;
create_field *last_field;
Item_sum *in_sum_func;
udf_func udf;
@@ -970,11 +993,7 @@ typedef struct st_lex : public Query_tables_list
uint8 create_view_check;
bool drop_if_exists, drop_temporary, local_file, one_shot_set;
bool in_comment, ignore_space, verbose, no_write_to_binlog;
- /*
- binlog_row_based_if_mixed tells if the parsing stage detected that some
- items require row-based binlogging to give a reliable binlog/replication.
- */
- bool tx_chain, tx_release, binlog_row_based_if_mixed;
+ bool tx_chain, tx_release;
/*
Special JOIN::prepare mode: changing of query is prohibited.
When creating a view, we need to just check its syntax omitting
@@ -1172,8 +1191,4 @@ extern void lex_start(THD *thd, const uchar *buf, uint length);
extern void lex_end(LEX *lex);
extern int MYSQLlex(void *arg, void *yythd);
-extern pthread_key(LEX*,THR_LEX);
-
-#define current_lex (current_thd->lex)
-
-#endif
+#endif /* MYSQL_SERVER */