summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r--sql/sql_class.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 9ac70d4bcee..f10b517a606 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -683,6 +683,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;
/*
@@ -692,6 +694,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);
@@ -1425,7 +1428,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,
+ MY_THREAD_SPECIFIC);
}
void unlock_locked_tables(THD *thd);
~Locked_tables_list()
@@ -1881,7 +1885,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,
+ MY_THREAD_SPECIFIC);
}
} transaction;
Global_read_lock global_read_lock;