summaryrefslogtreecommitdiff
path: root/libmysqld
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@mysql.com>2008-11-17 20:06:03 +0400
committerAlexey Botchkov <holyfoot@mysql.com>2008-11-17 20:06:03 +0400
commit1199dfcbfa996b7053e7aba113b639a74162052b (patch)
treeb89fde6cd3b40da46135be16bf3037a53380c84f /libmysqld
parented77f02a921d037cd92b968991731c2b8fed38a8 (diff)
downloadmariadb-git-1199dfcbfa996b7053e7aba113b639a74162052b.tar.gz
Bug#34517 SHOW GLOBAL STATUS does not work properly in embedded server.
GLOBAL STATUS is calculated by studying the list of threads. In the embedded server threads were not linked to the internal list, so the calculation always returns 0. Fixed by 'linking' the embedded-server threads to the same list per-file comments: libmysqld/lib_sql.cc Bug#34517 SHOW GLOBAL STATUS does not work properly in embedded server. Add newly created 'threads' to the internal thread list. Remove them from the list as they're freed. mysql-test/r/information_schema.result Bug#34517 SHOW GLOBAL STATUS does not work properly in embedded server. test result mysql-test/t/information_schema.test Bug#34517 SHOW GLOBAL STATUS does not work properly in embedded server. test case added
Diffstat (limited to 'libmysqld')
-rw-r--r--libmysqld/lib_sql.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index 6e82812239e..e78c656d565 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -384,6 +384,7 @@ static void emb_free_embedded_thd(MYSQL *mysql)
thd->clear_data_list();
thread_count--;
thd->store_globals();
+ thd->unlink();
delete thd;
mysql->thd=0;
}
@@ -627,6 +628,7 @@ void *create_embedded_thd(int client_flag)
bzero((char*) &thd->net, sizeof(thd->net));
thread_count++;
+ threads.append(thd);
return thd;
err:
delete(thd);