]>
Commit | Line | Data |
---|---|---|
833f2639 ER |
1 | diff -r 174803e7e869 mysql-test/r/create.result |
2 | --- a/mysql-test/r/create.result Thu Sep 04 12:17:56 2008 -0700 | |
3 | +++ b/mysql-test/r/create.result Thu Sep 04 12:20:19 2008 -0700 | |
4 | @@ -1720,7 +1720,8 @@ | |
5 | `COMMAND` varchar(16) NOT NULL DEFAULT '', | |
6 | `TIME` bigint(7) NOT NULL DEFAULT '0', | |
7 | `STATE` varchar(64) DEFAULT NULL, | |
8 | - `INFO` longtext | |
9 | + `INFO` longtext, | |
10 | + `TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000' | |
11 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 | |
12 | drop table t1; | |
13 | create temporary table t1 like information_schema.processlist; | |
14 | @@ -1734,7 +1735,8 @@ | |
15 | `COMMAND` varchar(16) NOT NULL DEFAULT '', | |
16 | `TIME` bigint(7) NOT NULL DEFAULT '0', | |
17 | `STATE` varchar(64) DEFAULT NULL, | |
18 | - `INFO` longtext | |
19 | + `INFO` longtext, | |
20 | + `TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000' | |
21 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 | |
22 | drop table t1; | |
23 | create table t1 like information_schema.character_sets; | |
24 | diff -r 174803e7e869 mysql-test/r/not_embedded_server.result | |
25 | --- a/mysql-test/r/not_embedded_server.result Thu Sep 04 12:17:56 2008 -0700 | |
26 | +++ b/mysql-test/r/not_embedded_server.result Thu Sep 04 12:20:19 2008 -0700 | |
27 | @@ -1,7 +1,7 @@ | |
28 | prepare stmt1 from ' SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND!=\'Daemon\' '; | |
29 | execute stmt1; | |
30 | -ID USER HOST DB COMMAND TIME STATE INFO | |
31 | -number root localhost test Query time executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND!='Daemon' | |
32 | +ID USER HOST DB COMMAND TIME STATE INFO TIME_MS | |
33 | +number root localhost test Query time executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND!='Daemon' time_ms | |
34 | deallocate prepare stmt1; | |
35 | FLUSH STATUS; | |
36 | SHOW GLOBAL STATUS LIKE 'com_select'; | |
37 | diff -r 174803e7e869 mysql-test/t/not_embedded_server.test | |
38 | --- a/mysql-test/t/not_embedded_server.test Thu Sep 04 12:17:56 2008 -0700 | |
39 | +++ b/mysql-test/t/not_embedded_server.test Thu Sep 04 12:20:19 2008 -0700 | |
40 | @@ -16,7 +16,7 @@ | |
41 | # End of 4.1 tests | |
42 | ||
43 | prepare stmt1 from ' SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND!=\'Daemon\' '; | |
44 | ---replace_column 1 number 6 time 3 localhost | |
45 | +--replace_column 1 number 6 time 3 localhost 9 time_ms | |
46 | execute stmt1; | |
47 | deallocate prepare stmt1; | |
48 | ||
49 | diff -r 174803e7e869 patch_info/acc-pslist.info | |
50 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
51 | +++ b/patch_info/acc-pslist.info Thu Sep 04 12:20:19 2008 -0700 | |
52 | @@ -0,0 +1,6 @@ | |
53 | +File=acc-pslist.patch | |
54 | +Name=Milliseconds in PROCESSLIST | |
55 | +Version=1.0 | |
56 | +Author=Percona <info@percona.com> | |
57 | +License=GPL | |
58 | +Comment= | |
59 | diff -r 174803e7e869 sql/sql_show.cc | |
60 | --- a/sql/sql_show.cc Thu Sep 04 12:17:56 2008 -0700 | |
61 | +++ b/sql/sql_show.cc Thu Sep 04 12:20:19 2008 -0700 | |
62 | @@ -1803,7 +1803,7 @@ | |
63 | TABLE *table= tables->table; | |
64 | CHARSET_INFO *cs= system_charset_info; | |
65 | char *user; | |
66 | - time_t now= my_time(0); | |
67 | + ulonglong unow= my_micro_time(); | |
68 | DBUG_ENTER("fill_process_list"); | |
69 | ||
70 | user= thd->security_ctx->master_access & PROCESS_ACL ? | |
71 | @@ -1861,8 +1861,8 @@ | |
72 | table->field[4]->store(command_name[tmp->command].str, | |
73 | command_name[tmp->command].length, cs); | |
74 | /* MYSQL_TIME */ | |
75 | - table->field[5]->store((uint32)(tmp->start_time ? | |
76 | - now - tmp->start_time : 0), TRUE); | |
77 | + const ulonglong utime= tmp->start_utime ? unow - tmp->start_utime : 0; | |
78 | + table->field[5]->store(utime / 1000000, TRUE); | |
79 | /* STATE */ | |
80 | #ifndef EMBEDDED_LIBRARY | |
81 | val= (char*) (tmp->locked ? "Locked" : | |
82 | @@ -1896,11 +1896,15 @@ | |
83 | table->field[7]->set_notnull(); | |
84 | } | |
85 | ||
86 | + /* TIME_MS */ | |
87 | + table->field[8]->store((double)(utime / 1000.0)); | |
88 | + | |
89 | if (schema_table_store_record(thd, table)) | |
90 | { | |
91 | VOID(pthread_mutex_unlock(&LOCK_thread_count)); | |
92 | DBUG_RETURN(1); | |
93 | } | |
94 | + | |
95 | } | |
96 | } | |
97 | ||
98 | @@ -5532,7 +5536,7 @@ | |
99 | into it two numbers, based on modulus of base-10 numbers. In the ones | |
100 | position is the number of decimals. Tens position is unused. In the | |
101 | hundreds and thousands position is a two-digit decimal number representing | |
102 | - length. Encode this value with (decimals*100)+length , where | |
103 | + length. Encode this value with (length*100)+decimals , where | |
104 | 0<decimals<10 and 0<=length<100 . | |
105 | ||
106 | @param | |
107 | @@ -6540,6 +6544,8 @@ | |
108 | {"STATE", 64, MYSQL_TYPE_STRING, 0, 1, "State", SKIP_OPEN_TABLE}, | |
109 | {"INFO", PROCESS_LIST_INFO_WIDTH, MYSQL_TYPE_STRING, 0, 1, "Info", | |
110 | SKIP_OPEN_TABLE}, | |
111 | + {"TIME_MS", 100 * (MY_INT64_NUM_DECIMAL_DIGITS + 1) + 3, MYSQL_TYPE_DECIMAL, | |
112 | + 0, 0, "Time_ms", SKIP_OPEN_TABLE}, | |
113 | {0, 0, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE} | |
114 | }; | |
115 |