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
5 `COMMAND` varchar(16) NOT NULL DEFAULT '',
6 `TIME` bigint(7) NOT NULL DEFAULT '0',
7 `STATE` varchar(64) DEFAULT NULL,
10 + `TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000'
11 ) ENGINE=MyISAM DEFAULT CHARSET=utf8
13 create temporary table t1 like information_schema.processlist;
15 `COMMAND` varchar(16) NOT NULL DEFAULT '',
16 `TIME` bigint(7) NOT NULL DEFAULT '0',
17 `STATE` varchar(64) DEFAULT NULL,
20 + `TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000'
21 ) ENGINE=MyISAM DEFAULT CHARSET=utf8
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
28 prepare stmt1 from ' SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND!=\'Daemon\' ';
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;
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
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
47 deallocate prepare stmt1;
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
53 +File=acc-pslist.patch
54 +Name=Milliseconds in PROCESSLIST
56 +Author=Percona <info@percona.com>
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
63 TABLE *table= tables->table;
64 CHARSET_INFO *cs= system_charset_info;
66 - time_t now= my_time(0);
67 + ulonglong unow= my_micro_time();
68 DBUG_ENTER("fill_process_list");
70 user= thd->security_ctx->master_access & PROCESS_ACL ?
72 table->field[4]->store(command_name[tmp->command].str,
73 command_name[tmp->command].length, cs);
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);
80 #ifndef EMBEDDED_LIBRARY
81 val= (char*) (tmp->locked ? "Locked" :
82 @@ -1896,11 +1896,15 @@
83 table->field[7]->set_notnull();
87 + table->field[8]->store((double)(utime / 1000.0));
89 if (schema_table_store_record(thd, table))
91 VOID(pthread_mutex_unlock(&LOCK_thread_count));
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 .
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",
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}