diff options
author | Konstantin Osipov <kostja@sun.com> | 2009-11-20 23:30:00 +0300 |
---|---|---|
committer | Konstantin Osipov <kostja@sun.com> | 2009-11-20 23:30:00 +0300 |
commit | 55fcbe34a2161992e406750a5d7cfdf051ddd4ec (patch) | |
tree | dc28e372f770d368a0be5a66f2c06c3e16837bda /mysql-test/t/status.test | |
parent | 78ded89e617a748e49b090b8171ccf72fd54ef7c (diff) | |
download | mariadb-git-55fcbe34a2161992e406750a5d7cfdf051ddd4ec.tar.gz |
Backport of:
------------------------------------------------------------
revno: 2572.23.1
committer: davi@mysql.com/endora.local
timestamp: Wed 2008-03-19 09:03:08 -0300
message:
Bug#17954 Threads_connected > Threads_created
The problem is that insert delayed threads are counted as connected
but not as created, leading to a Threads_connected value greater then
the Threads_created value.
The solution is to enforce the documented behavior that the
Threads_connected value shall be the number of currently
open connections and that Threads_created shall be the
number of threads created to handle connections.
mysql-test/r/status.result:
Add test case result for Bug#17954
mysql-test/t/status.test:
Add test case for Bug#17954
sql/mysqld.cc:
Change Threads_connected to reflect the number of
open connections. SHOW_INT type variables are not
reset.
Diffstat (limited to 'mysql-test/t/status.test')
-rw-r--r-- | mysql-test/t/status.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/status.test b/mysql-test/t/status.test index 5da210f5a69..f951218f5c8 100644 --- a/mysql-test/t/status.test +++ b/mysql-test/t/status.test @@ -353,6 +353,21 @@ DROP FUNCTION f1; # End of 5.1 tests +# +# Bug#17954 Threads_connected > Threads_created +# + +--disable_warnings +DROP VIEW IF EXISTS v1; +--enable_warnings + +CREATE VIEW v1 AS SELECT VARIABLE_NAME AS NAME, CONVERT(VARIABLE_VALUE, UNSIGNED) AS VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS; + +SELECT VALUE INTO @tc FROM v1 WHERE NAME = 'Threads_connected'; +SELECT NAME FROM v1 WHERE NAME = 'Threads_created' AND VALUE < @tc; + +DROP VIEW v1; + # Restore global concurrent_insert value. Keep in the end of the test file. --connection default set @@global.concurrent_insert= @old_concurrent_insert; |