diff -r 174803e7e869 mysql-test/r/create.result --- a/mysql-test/r/create.result Thu Sep 04 12:17:56 2008 -0700 +++ b/mysql-test/r/create.result Thu Sep 04 12:20:19 2008 -0700 @@ -1720,7 +1720,8 @@ `COMMAND` varchar(16) NOT NULL DEFAULT '', `TIME` bigint(7) NOT NULL DEFAULT '0', `STATE` varchar(64) DEFAULT NULL, - `INFO` longtext + `INFO` longtext, + `TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 drop table t1; create temporary table t1 like information_schema.processlist; @@ -1734,7 +1735,8 @@ `COMMAND` varchar(16) NOT NULL DEFAULT '', `TIME` bigint(7) NOT NULL DEFAULT '0', `STATE` varchar(64) DEFAULT NULL, - `INFO` longtext + `INFO` longtext, + `TIME_MS` decimal(22,3) NOT NULL DEFAULT '0.000' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 drop table t1; create table t1 like information_schema.character_sets; diff -r 174803e7e869 mysql-test/r/not_embedded_server.result --- a/mysql-test/r/not_embedded_server.result Thu Sep 04 12:17:56 2008 -0700 +++ b/mysql-test/r/not_embedded_server.result Thu Sep 04 12:20:19 2008 -0700 @@ -1,7 +1,7 @@ prepare stmt1 from ' SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND!=\'Daemon\' '; execute stmt1; -ID USER HOST DB COMMAND TIME STATE INFO -number root localhost test Query time executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND!='Daemon' +ID USER HOST DB COMMAND TIME STATE INFO TIME_MS +number root localhost test Query time executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND!='Daemon' time_ms deallocate prepare stmt1; FLUSH STATUS; SHOW GLOBAL STATUS LIKE 'com_select'; diff -r 174803e7e869 mysql-test/t/not_embedded_server.test --- a/mysql-test/t/not_embedded_server.test Thu Sep 04 12:17:56 2008 -0700 +++ b/mysql-test/t/not_embedded_server.test Thu Sep 04 12:20:19 2008 -0700 @@ -16,7 +16,7 @@ # End of 4.1 tests prepare stmt1 from ' SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND!=\'Daemon\' '; ---replace_column 1 number 6 time 3 localhost +--replace_column 1 number 6 time 3 localhost 9 time_ms execute stmt1; deallocate prepare stmt1; diff -r 174803e7e869 patch_info/acc-pslist.info --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patch_info/acc-pslist.info Thu Sep 04 12:20:19 2008 -0700 @@ -0,0 +1,6 @@ +File=acc-pslist.patch +Name=Milliseconds in PROCESSLIST +Version=1.0 +Author=Percona +License=GPL +Comment= diff -r 174803e7e869 sql/sql_show.cc --- a/sql/sql_show.cc Thu Sep 04 12:17:56 2008 -0700 +++ b/sql/sql_show.cc Thu Sep 04 12:20:19 2008 -0700 @@ -1803,7 +1803,7 @@ TABLE *table= tables->table; CHARSET_INFO *cs= system_charset_info; char *user; - time_t now= my_time(0); + ulonglong unow= my_micro_time(); DBUG_ENTER("fill_process_list"); user= thd->security_ctx->master_access & PROCESS_ACL ? @@ -1861,8 +1861,8 @@ table->field[4]->store(command_name[tmp->command].str, command_name[tmp->command].length, cs); /* MYSQL_TIME */ - table->field[5]->store((uint32)(tmp->start_time ? - now - tmp->start_time : 0), TRUE); + const ulonglong utime= tmp->start_utime ? unow - tmp->start_utime : 0; + table->field[5]->store(utime / 1000000, TRUE); /* STATE */ #ifndef EMBEDDED_LIBRARY val= (char*) (tmp->locked ? "Locked" : @@ -1896,11 +1896,15 @@ table->field[7]->set_notnull(); } + /* TIME_MS */ + table->field[8]->store((double)(utime / 1000.0)); + if (schema_table_store_record(thd, table)) { VOID(pthread_mutex_unlock(&LOCK_thread_count)); DBUG_RETURN(1); } + } } @@ -5532,7 +5536,7 @@ into it two numbers, based on modulus of base-10 numbers. In the ones position is the number of decimals. Tens position is unused. In the hundreds and thousands position is a two-digit decimal number representing - length. Encode this value with (decimals*100)+length , where + length. Encode this value with (length*100)+decimals , where 0