diff options
author | unknown <knielsen@knielsen-hq.org> | 2009-09-23 13:03:47 +0200 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2009-09-23 13:03:47 +0200 |
commit | e16081e1ac37d209708d44a5cbbd6d7ae6f9a5fc (patch) | |
tree | 5e109efe12f0b8fd85c44bee300786655cd615c1 /mysql-test/r | |
parent | cb4121f26f7de18df808e2c1dbd4c13108fa3a16 (diff) | |
download | mariadb-git-e16081e1ac37d209708d44a5cbbd6d7ae6f9a5fc.tar.gz |
Merge Percona microsec_process patch into MariaDB.
This adds a TIME_MS column to SHOW FULL PROCESSLIST and
INFORMATION_SCHEMA.PROCESSLIST that works like the TIME column, but
in units of milliseconds with microsecond precision.
Note that this also changes behaviour of the existing TIME column. In
the MySQL server, the TIME column changes when a thread sets @TIMESTAMP.
This is contrary to documentation and also potentially confusing, so
could in any case be considered a bug. With this patch, to ensure
consistency between TIME and TIME_MS, setting @TIMESTAMP has no effect
on either value.
Add a test case for the TIME and TIME_MS columns.
Update existing test cases for changed behaviour.
Author: Percona
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
mysql-test/r/create.result:
Result file update.
mysql-test/r/information_schema.result:
Add test case.
Result file update (changed behaviour).
mysql-test/t/information_schema.test:
Add test case.
Adjust test case for changed behaviour.
mysql-test/t/not_embedded_server.test:
Update (commented-out) test case for newly added column.
sql/sql_show.cc:
Merge Percona microsec_process patch into MariaDB.
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/create.result | 6 | ||||
-rw-r--r-- | mysql-test/r/information_schema.result | 14 |
2 files changed, 16 insertions, 4 deletions
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index 1f118de9d24..88e4bade130 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -1749,7 +1749,8 @@ t1 CREATE TABLE `t1` ( `COMMAND` varchar(16) NOT NULL DEFAULT '', `TIME` int(7) NOT NULL DEFAULT '0', `STATE` varchar(64) DEFAULT NULL, - `INFO` longtext + `INFO` longtext, + `TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000' ) DEFAULT CHARSET=utf8 drop table t1; create temporary table t1 like information_schema.processlist; @@ -1763,7 +1764,8 @@ t1 CREATE TEMPORARY TABLE `t1` ( `COMMAND` varchar(16) NOT NULL DEFAULT '', `TIME` int(7) NOT NULL DEFAULT '0', `STATE` varchar(64) DEFAULT NULL, - `INFO` longtext + `INFO` longtext, + `TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000' ) DEFAULT CHARSET=utf8 drop table t1; create table t1 like information_schema.character_sets; diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 0ec34618581..bf09258efe9 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -1380,6 +1380,17 @@ select user,db from information_schema.processlist; user db user3148 test drop user user3148@localhost; +SELECT 'other connection here' AS who; +who +other connection here +SELECT IF(`time` > 0, 'OK', `time`) AS time_low, +IF(`time` < 1000, 'OK', `time`) AS time_high, +IF(time_ms > 900, 'OK', time_ms) AS time_ms_low, +IF(time_ms < 1000000, 'OK', time_ms) AS time_ms_high +FROM INFORMATION_SCHEMA.PROCESSLIST +WHERE ID=@tid; +time_low time_high time_ms_low time_ms_high +OK OK OK OK DROP TABLE IF EXISTS server_status; DROP EVENT IF EXISTS event_status; SET GLOBAL event_scheduler=1; @@ -1602,8 +1613,7 @@ CREATE_OPTIONS key_block_size=1 DROP TABLE t1; SET TIMESTAMP=@@TIMESTAMP + 10000000; -SELECT 'OK' AS TEST_RESULT FROM INFORMATION_SCHEMA.PROCESSLIST WHERE time < 0; +SELECT 'NOT_OK' AS TEST_RESULT FROM INFORMATION_SCHEMA.PROCESSLIST WHERE time < 0; TEST_RESULT -OK SET TIMESTAMP=DEFAULT; End of 5.1 tests. |