diff options
author | Marc Alff <marc.alff@oracle.com> | 2010-10-06 18:03:27 -0600 |
---|---|---|
committer | Marc Alff <marc.alff@oracle.com> | 2010-10-06 18:03:27 -0600 |
commit | d51cd894dac501d808da0c3bc08636f387014eb3 (patch) | |
tree | 1ae61e6cff185521683ed02b0ceefc681fb764e8 /mysql-test/suite/perfschema/r | |
parent | 985fa88f8b07743dd3a848c11bc1d93b826d3d62 (diff) | |
download | mariadb-git-d51cd894dac501d808da0c3bc08636f387014eb3.tar.gz |
Bug#57154 Rename THREADS.ID to THREADS.PROCESSLIST_ID in 5.5
This change is to align the 5.5 performance_schema.THREADS
table definition with the 5.6 performance_schema.THREADS table,
to facilitate the 5.5 -> 5.6 migration later.
In the table performance_schema.THREADS:
- renamed ID to PROCESSLIST_ID, removed not null
- changed NAME from varchar(64) to varchar(128)
to match the columns definitions from 5.6
Adjusted the test cases accordingly.
Note: this fix is for 5.5 only, to null merge into 5.6
Diffstat (limited to 'mysql-test/suite/perfschema/r')
-rw-r--r-- | mysql-test/suite/perfschema/r/dml_threads.result | 6 | ||||
-rw-r--r-- | mysql-test/suite/perfschema/r/func_file_io.result | 17 | ||||
-rw-r--r-- | mysql-test/suite/perfschema/r/selects.result | 18 |
3 files changed, 13 insertions, 28 deletions
diff --git a/mysql-test/suite/perfschema/r/dml_threads.result b/mysql-test/suite/perfschema/r/dml_threads.result index b4fa8705c95..261e7977aa5 100644 --- a/mysql-test/suite/perfschema/r/dml_threads.result +++ b/mysql-test/suite/perfschema/r/dml_threads.result @@ -1,12 +1,12 @@ select * from performance_schema.THREADS where name like 'Thread/%' limit 1; -THREAD_ID ID NAME +THREAD_ID PROCESSLIST_ID NAME # # # select * from performance_schema.THREADS where name='FOO'; -THREAD_ID ID NAME +THREAD_ID PROCESSLIST_ID NAME insert into performance_schema.THREADS -set name='FOO', thread_id=1, id=2; +set name='FOO', thread_id=1, processlist_id=2; ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'THREADS' update performance_schema.THREADS set thread_id=12; diff --git a/mysql-test/suite/perfschema/r/func_file_io.result b/mysql-test/suite/perfschema/r/func_file_io.result index 201254aca21..655ce1394f9 100644 --- a/mysql-test/suite/perfschema/r/func_file_io.result +++ b/mysql-test/suite/perfschema/r/func_file_io.result @@ -94,24 +94,9 @@ FROM performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME WHERE COUNT_STAR > 0 ORDER BY SUM_TIMER_WAIT DESC LIMIT 10; -SELECT i.user, SUM(TIMER_WAIT) SUM_WAIT -# ((TIME_TO_SEC(TIMEDIFF(NOW(), i.startup_time)) * 1000) / SUM(TIMER_WAIT)) * 100 WAIT_PERCENTAGE -FROM performance_schema.EVENTS_WAITS_HISTORY_LONG h -INNER JOIN performance_schema.THREADS p USING (THREAD_ID) -LEFT JOIN information_schema.PROCESSLIST i USING (ID) -GROUP BY i.user -ORDER BY SUM_WAIT DESC -LIMIT 20; SELECT h.EVENT_NAME, SUM(h.TIMER_WAIT) TOTAL_WAIT FROM performance_schema.EVENTS_WAITS_HISTORY_LONG h INNER JOIN performance_schema.THREADS p USING (THREAD_ID) -WHERE p.ID = 1 +WHERE p.PROCESSLIST_ID = 1 GROUP BY h.EVENT_NAME HAVING TOTAL_WAIT > 0; -SELECT i.user, h.operation, SUM(NUMBER_OF_BYTES) bytes -FROM performance_schema.EVENTS_WAITS_HISTORY_LONG h -INNER JOIN performance_schema.THREADS p USING (THREAD_ID) -LEFT JOIN information_schema.PROCESSLIST i USING (ID) -GROUP BY i.user, h.operation -HAVING BYTES > 0 -ORDER BY i.user, h.operation; diff --git a/mysql-test/suite/perfschema/r/selects.result b/mysql-test/suite/perfschema/r/selects.result index dfc9007c740..6d596ba8d9a 100644 --- a/mysql-test/suite/perfschema/r/selects.result +++ b/mysql-test/suite/perfschema/r/selects.result @@ -84,22 +84,22 @@ id c 13 [EVENT_ID] DROP TRIGGER t_ps_trigger; DROP PROCEDURE IF EXISTS t_ps_proc; -CREATE PROCEDURE t_ps_proc(IN tid INT, OUT pid INT) +CREATE PROCEDURE t_ps_proc(IN conid INT, OUT pid INT) BEGIN -SELECT id FROM performance_schema.THREADS -WHERE THREAD_ID = tid INTO pid; +SELECT thread_id FROM performance_schema.THREADS +WHERE PROCESSLIST_ID = conid INTO pid; END; | -CALL t_ps_proc(0, @p_id); +CALL t_ps_proc(connection_id(), @p_id); DROP FUNCTION IF EXISTS t_ps_proc; -CREATE FUNCTION t_ps_func(tid INT) RETURNS int +CREATE FUNCTION t_ps_func(conid INT) RETURNS int BEGIN -return (SELECT id FROM performance_schema.THREADS -WHERE THREAD_ID = tid); +return (SELECT thread_id FROM performance_schema.THREADS +WHERE PROCESSLIST_ID = conid); END; | -SELECT t_ps_func(0) = @p_id; -t_ps_func(0) = @p_id +SELECT t_ps_func(connection_id()) = @p_id; +t_ps_func(connection_id()) = @p_id 1 SELECT * FROM t_event; EVENT_ID |