diff -r 1a59073d658d mysql-test/r/create.result --- a/mysql-test/r/create.result Sat Sep 13 17:31:30 2008 -0700 +++ b/mysql-test/r/create.result Sat Sep 13 17:31:40 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 1a59073d658d sql/sql_show.cc --- a/sql/sql_show.cc Sat Sep 13 17:31:30 2008 -0700 +++ b/sql/sql_show.cc Sat Sep 13 17:31:40 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 ? @@ -1873,8 +1873,8 @@ table->field[4]->store(command_name[tmp->command].str, command_name[tmp->command].length, cs); /* MYSQL_TIME */ - table->field[5]->store((longlong)(tmp->start_time ? - now - tmp->start_time : 0), FALSE); + 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); } + } } @@ -5531,7 +5535,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