diff options
Diffstat (limited to 'sql/sql_class.h')
| -rw-r--r-- | sql/sql_class.h | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h index c50d8c9aba6..fccca9e8cbf 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -700,6 +700,8 @@ typedef struct system_status_var ulonglong binlog_bytes_written; double last_query_cost; double cpu_time, busy_time; + /* Don't initialize */ + volatile int64 memory_used; /* This shouldn't be accumulated */ } STATUS_VAR; /* @@ -709,6 +711,7 @@ typedef struct system_status_var */ #define last_system_status_var questions +#define last_cleared_system_status_var memory_used void mark_transaction_to_rollback(THD *thd, bool all); @@ -1442,7 +1445,8 @@ public: m_reopen_array(NULL), m_locked_tables_count(0) { - init_sql_alloc(&m_locked_tables_root, MEM_ROOT_BLOCK_SIZE, 0); + init_sql_alloc(&m_locked_tables_root, MEM_ROOT_BLOCK_SIZE, 0, + MYF(MY_THREAD_SPECIFIC)); } void unlock_locked_tables(THD *thd); ~Locked_tables_list() @@ -1782,7 +1786,7 @@ public: bool save_prep_leaf_list; #ifndef MYSQL_CLIENT - int binlog_setup_trx_data(); + binlog_cache_mngr * binlog_setup_trx_data(); /* Public interface to write RBR events to the binlog @@ -1916,7 +1920,8 @@ public: { bzero((char*)this, sizeof(*this)); xid_state.xid.null(); - init_sql_alloc(&mem_root, ALLOC_ROOT_MIN_BLOCK_SIZE, 0); + init_sql_alloc(&mem_root, ALLOC_ROOT_MIN_BLOCK_SIZE, 0, + MYF(MY_THREAD_SPECIFIC)); } } transaction; Global_read_lock global_read_lock; @@ -2315,6 +2320,7 @@ public: bool no_errors; uint8 password; + uint8 failed_com_change_user; /** Set to TRUE if execution of the current compound statement @@ -2848,6 +2854,19 @@ public: { return ::killed_errno(killed); } + inline void reset_killed() + { + /* + Resetting killed has to be done under a mutex to ensure + its not done during an awake() call. + */ + if (killed != NOT_KILLED) + { + mysql_mutex_lock(&LOCK_thd_data); + killed= NOT_KILLED; + mysql_mutex_unlock(&LOCK_thd_data); + } + } inline void send_kill_message() const { int err= killed_errno(); @@ -4092,6 +4111,8 @@ class Unique :public Sql_alloc uint full_size; uint min_dupl_count; /* always 0 for unions, > 0 for intersections */ + bool merge(TABLE *table, uchar *buff, bool without_last_merge); + public: ulong elements; Unique(qsort_cmp2 comp_func, void *comp_func_fixed_arg, @@ -4132,7 +4153,7 @@ public: } void reset(); - bool walk(tree_walk_action action, void *walk_action_arg); + bool walk(TABLE *table, tree_walk_action action, void *walk_action_arg); uint get_size() const { return size; } ulonglong get_max_in_memory_size() const { return max_in_memory_size; } |
