]> git.pld-linux.org Git - packages/mysql.git/blame - mysql-acc-pslist.patch
- up to 5.1.44
[packages/mysql.git] / mysql-acc-pslist.patch
CommitLineData
f11bce9d
ER
1diff -r 1a59073d658d mysql-test/r/create.result
2--- a/mysql-test/r/create.result Sat Sep 13 17:31:30 2008 -0700
3+++ b/mysql-test/r/create.result Sat Sep 13 17:31:40 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;
24diff -r 1a59073d658d sql/sql_show.cc
25--- a/sql/sql_show.cc Sat Sep 13 17:31:30 2008 -0700
26+++ b/sql/sql_show.cc Sat Sep 13 17:31:40 2008 -0700
27@@ -1803,7 +1803,7 @@
28 TABLE *table= tables->table;
29 CHARSET_INFO *cs= system_charset_info;
30 char *user;
31- time_t now= my_time(0);
32+ ulonglong unow= my_micro_time();
33 DBUG_ENTER("fill_process_list");
34
35 user= thd->security_ctx->master_access & PROCESS_ACL ?
36@@ -1873,8 +1873,8 @@
37 table->field[4]->store(command_name[tmp->command].str,
38 command_name[tmp->command].length, cs);
39 /* MYSQL_TIME */
40- table->field[5]->store((longlong)(tmp->start_time ?
41- now - tmp->start_time : 0), FALSE);
42+ const ulonglong utime= tmp->start_utime ? unow - tmp->start_utime : 0;
43+ table->field[5]->store(utime / 1000000, TRUE);
44 /* STATE */
45 #ifndef EMBEDDED_LIBRARY
46 val= (char*) (tmp->locked ? "Locked" :
47@@ -1896,11 +1896,15 @@
48 table->field[7]->set_notnull();
49 }
50
51+ /* TIME_MS */
52+ table->field[8]->store((double)(utime / 1000.0));
53+
54 if (schema_table_store_record(thd, table))
55 {
56 VOID(pthread_mutex_unlock(&LOCK_thread_count));
57 DBUG_RETURN(1);
58 }
59+
60 }
61 }
62
63@@ -5531,7 +5535,7 @@
64 into it two numbers, based on modulus of base-10 numbers. In the ones
65 position is the number of decimals. Tens position is unused. In the
66 hundreds and thousands position is a two-digit decimal number representing
67- length. Encode this value with (decimals*100)+length , where
68+ length. Encode this value with (length*100)+decimals , where
69 0<decimals<10 and 0<=length<100 .
70
71 @param
72@@ -6539,6 +6543,8 @@
73 {"STATE", 64, MYSQL_TYPE_STRING, 0, 1, "State", SKIP_OPEN_TABLE},
74 {"INFO", PROCESS_LIST_INFO_WIDTH, MYSQL_TYPE_STRING, 0, 1, "Info",
75 SKIP_OPEN_TABLE},
76+ {"TIME_MS", 100 * (MY_INT64_NUM_DECIMAL_DIGITS + 1) + 3, MYSQL_TYPE_DECIMAL,
77+ 0, 0, "Time_ms", SKIP_OPEN_TABLE},
78 {0, 0, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE}
79 };
80
This page took 0.070594 seconds and 4 git commands to generate.