summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
authorGuilhem Bichot <guilhem@mysql.com>2009-02-12 15:08:56 +0100
committerGuilhem Bichot <guilhem@mysql.com>2009-02-12 15:08:56 +0100
commit704b4845aa9ce51a6c5a9f5f42265e376db0dfb3 (patch)
tree73476f970c229f75846855edeeddfbc6fd87ed4b /sql/sql_class.h
parent2637dda66845868fe996e60e54996acf03f6c537 (diff)
parenta5e5b0180a6b86cce258eef232ef59d6e7c40bb0 (diff)
downloadmariadb-git-704b4845aa9ce51a6c5a9f5f42265e376db0dfb3.tar.gz
merge of 5.1-main into 5.1-maria. Myisam->Maria change propagation will follow.
There were so many changes into mtr (this is the new mtr coming) that I rather copied mtr from 6.0-main here (at least this one knows how to run Maria tests). I also fixed suite/maria tests to be accepted by the new mtr. mysys/thr_mutex.c: adding DBUG_PRINT here, so that we can locate where the warning is issued.
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r--sql/sql_class.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 01f5c9eb1e9..c491f2d3348 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -462,8 +462,15 @@ typedef struct system_status_var
ulong com_stmt_fetch;
ulong com_stmt_reset;
ulong com_stmt_close;
-
/*
+ Number of statements sent from the client
+ */
+ ulong questions;
+ /*
+ IMPORTANT!
+ SEE last_system_status_var DEFINITION BELOW.
+ Below 'last_system_status_var' are all variables which doesn't make any
+ sense to add to the /global/ status variable counter.
Status variables which it does not make sense to add to
global status variable counter
*/
@@ -476,7 +483,7 @@ typedef struct system_status_var
counter
*/
-#define last_system_status_var com_stmt_close
+#define last_system_status_var questions
void mark_transaction_to_rollback(THD *thd, bool all);
@@ -1009,6 +1016,7 @@ show_system_thread(enum_thread_type thread)
{
#define RETURN_NAME_AS_STRING(NAME) case (NAME): return #NAME
switch (thread) {
+ static char buf[64];
RETURN_NAME_AS_STRING(NON_SYSTEM_THREAD);
RETURN_NAME_AS_STRING(SYSTEM_THREAD_DELAYED_INSERT);
RETURN_NAME_AS_STRING(SYSTEM_THREAD_SLAVE_IO);
@@ -1016,9 +1024,11 @@ show_system_thread(enum_thread_type thread)
RETURN_NAME_AS_STRING(SYSTEM_THREAD_NDBCLUSTER_BINLOG);
RETURN_NAME_AS_STRING(SYSTEM_THREAD_EVENT_SCHEDULER);
RETURN_NAME_AS_STRING(SYSTEM_THREAD_EVENT_WORKER);
+ default:
+ sprintf(buf, "<UNKNOWN SYSTEM THREAD: %d>", thread);
+ return buf;
}
#undef RETURN_NAME_AS_STRING
- return "UNKNOWN"; /* keep gcc happy */
}
/**
@@ -2118,8 +2128,8 @@ public:
Don't reset binlog format for NDB binlog injector thread.
*/
DBUG_PRINT("debug",
- ("temporary_tables: %p, in_sub_stmt: %d, system_thread: %s",
- temporary_tables, in_sub_stmt,
+ ("temporary_tables: %s, in_sub_stmt: %s, system_thread: %s",
+ YESNO(temporary_tables), YESNO(in_sub_stmt),
show_system_thread(system_thread)));
if ((temporary_tables == NULL) && (in_sub_stmt == 0) &&
(system_thread != SYSTEM_THREAD_NDBCLUSTER_BINLOG))