mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge from mysql-5.5-bugteam to mysql-5.5-runtime
Text conflict in mysql-test/suite/perfschema/r/dml_setup_instruments.result Text conflict in mysql-test/suite/perfschema/r/global_read_lock.result Text conflict in mysql-test/suite/perfschema/r/server_init.result Text conflict in mysql-test/suite/perfschema/t/global_read_lock.test Text conflict in mysql-test/suite/perfschema/t/server_init.test
This commit is contained in:
@ -22,9 +22,9 @@
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'NO', timed = 'YES';
|
||||
UPDATE performance_schema.setup_instruments SET enabled = 'NO', timed = 'YES';
|
||||
|
||||
UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'YES'
|
||||
UPDATE performance_schema.setup_instruments SET enabled = 'YES'
|
||||
WHERE name LIKE 'wait/io/file/%';
|
||||
|
||||
--disable_warnings
|
||||
@ -40,9 +40,9 @@ ENGINE=MyISAM;
|
||||
|
||||
INSERT INTO t1 (id) VALUES (1), (2), (3), (4), (5), (6), (7), (8);
|
||||
|
||||
TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY_LONG;
|
||||
TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY;
|
||||
TRUNCATE TABLE performance_schema.EVENTS_WAITS_CURRENT;
|
||||
TRUNCATE TABLE performance_schema.events_waits_history_long;
|
||||
TRUNCATE TABLE performance_schema.events_waits_history;
|
||||
TRUNCATE TABLE performance_schema.events_waits_current;
|
||||
|
||||
#
|
||||
# FF1: Count for file should increase with instrumentation enabled and
|
||||
@ -52,7 +52,7 @@ TRUNCATE TABLE performance_schema.EVENTS_WAITS_CURRENT;
|
||||
SELECT * FROM t1 WHERE id = 1;
|
||||
|
||||
SET @before_count = (SELECT SUM(TIMER_WAIT)
|
||||
FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
|
||||
FROM performance_schema.events_waits_history_long
|
||||
WHERE (EVENT_NAME = 'wait/io/file/myisam/dfile')
|
||||
AND (OBJECT_NAME LIKE '%t1.MYD'));
|
||||
|
||||
@ -61,23 +61,23 @@ SELECT IF(@before_count > 0, 'Success', 'Failure') has_instrumentation;
|
||||
SELECT * FROM t1 WHERE id < 4;
|
||||
|
||||
SET @after_count = (SELECT SUM(TIMER_WAIT)
|
||||
FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
|
||||
FROM performance_schema.events_waits_history_long
|
||||
WHERE (EVENT_NAME = 'wait/io/file/myisam/dfile')
|
||||
AND (OBJECT_NAME LIKE '%t1.MYD') AND (1 = 1));
|
||||
|
||||
SELECT IF((@after_count - @before_count) > 0, 'Success', 'Failure') test_ff1_timed;
|
||||
|
||||
UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled='NO';
|
||||
UPDATE performance_schema.setup_instruments SET enabled='NO';
|
||||
|
||||
SET @before_count = (SELECT SUM(TIMER_WAIT)
|
||||
FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
|
||||
FROM performance_schema.events_waits_history_long
|
||||
WHERE (EVENT_NAME = 'wait/io/file/myisam/dfile')
|
||||
AND (OBJECT_NAME LIKE '%t1.MYD') AND (2 = 2));
|
||||
|
||||
SELECT * FROM t1 WHERE id < 6;
|
||||
|
||||
SET @after_count = (SELECT SUM(TIMER_WAIT)
|
||||
FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
|
||||
FROM performance_schema.events_waits_history_long
|
||||
WHERE (EVENT_NAME = 'wait/io/file/myisam/dfile')
|
||||
AND (OBJECT_NAME LIKE '%t1.MYD') AND (3 = 3));
|
||||
|
||||
@ -87,33 +87,33 @@ SELECT IF((COALESCE(@after_count, 0) - COALESCE(@before_count, 0)) = 0, 'Success
|
||||
# Check not timed measurements
|
||||
#
|
||||
|
||||
UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'YES'
|
||||
UPDATE performance_schema.setup_instruments SET enabled = 'YES'
|
||||
WHERE name LIKE 'wait/io/file/%';
|
||||
|
||||
UPDATE performance_schema.SETUP_INSTRUMENTS SET timed = 'NO';
|
||||
UPDATE performance_schema.setup_instruments SET timed = 'NO';
|
||||
|
||||
TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY_LONG;
|
||||
TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY;
|
||||
TRUNCATE TABLE performance_schema.EVENTS_WAITS_CURRENT;
|
||||
TRUNCATE TABLE performance_schema.events_waits_history_long;
|
||||
TRUNCATE TABLE performance_schema.events_waits_history;
|
||||
TRUNCATE TABLE performance_schema.events_waits_current;
|
||||
|
||||
SELECT * FROM t1 WHERE id > 4;
|
||||
|
||||
SELECT * FROM performance_schema.EVENTS_WAITS_HISTORY_LONG
|
||||
SELECT * FROM performance_schema.events_waits_history_long
|
||||
WHERE TIMER_WAIT != NULL
|
||||
OR TIMER_START != NULL
|
||||
OR TIMER_END != NULL;
|
||||
|
||||
SELECT * FROM performance_schema.EVENTS_WAITS_HISTORY
|
||||
SELECT * FROM performance_schema.events_waits_history
|
||||
WHERE TIMER_WAIT != NULL
|
||||
OR TIMER_START != NULL
|
||||
OR TIMER_END != NULL;
|
||||
|
||||
SELECT * FROM performance_schema.EVENTS_WAITS_CURRENT
|
||||
SELECT * FROM performance_schema.events_waits_current
|
||||
WHERE TIMER_WAIT != NULL
|
||||
OR TIMER_START != NULL
|
||||
OR TIMER_END != NULL;
|
||||
|
||||
UPDATE performance_schema.SETUP_INSTRUMENTS SET timed = 'YES';
|
||||
UPDATE performance_schema.setup_instruments SET timed = 'YES';
|
||||
|
||||
SELECT * FROM t1 WHERE id < 4;
|
||||
|
||||
@ -128,7 +128,7 @@ SELECT SUM(COUNT_READ) AS sum_count_read,
|
||||
SUM(COUNT_WRITE) AS sum_count_write,
|
||||
SUM(SUM_NUMBER_OF_BYTES_READ) AS sum_num_bytes_read,
|
||||
SUM(SUM_NUMBER_OF_BYTES_WRITE) AS sum_num_bytes_write
|
||||
FROM performance_schema.FILE_SUMMARY_BY_INSTANCE
|
||||
FROM performance_schema.file_summary_by_instance
|
||||
WHERE FILE_NAME LIKE CONCAT('%', @@tmpdir, '%') ORDER BY NULL;
|
||||
--enable_result_log
|
||||
|
||||
@ -144,7 +144,7 @@ WHERE FILE_NAME LIKE CONCAT('%', @@tmpdir, '%') ORDER BY NULL;
|
||||
#
|
||||
--disable_result_log
|
||||
SELECT EVENT_NAME, COUNT_STAR, AVG_TIMER_WAIT, SUM_TIMER_WAIT
|
||||
FROM performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME
|
||||
FROM performance_schema.events_waits_summary_global_by_event_name
|
||||
WHERE COUNT_STAR > 0
|
||||
ORDER BY SUM_TIMER_WAIT DESC
|
||||
LIMIT 10;
|
||||
@ -157,8 +157,8 @@ LIMIT 10;
|
||||
## --disable_result_log
|
||||
## 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)
|
||||
## 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
|
||||
@ -170,8 +170,8 @@ LIMIT 10;
|
||||
#
|
||||
--disable_result_log
|
||||
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)
|
||||
FROM performance_schema.events_waits_history_long h
|
||||
INNER JOIN performance_schema.threads p USING (THREAD_ID)
|
||||
WHERE p.PROCESSLIST_ID = 1
|
||||
GROUP BY h.EVENT_NAME
|
||||
HAVING TOTAL_WAIT > 0;
|
||||
@ -183,8 +183,8 @@ HAVING TOTAL_WAIT > 0;
|
||||
|
||||
## --disable_result_log
|
||||
## 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)
|
||||
## 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
|
||||
@ -192,4 +192,4 @@ HAVING TOTAL_WAIT > 0;
|
||||
## --enable_result_log
|
||||
|
||||
# Clean-up.
|
||||
UPDATE performance_schema.SETUP_INSTRUMENTS SET enabled = 'YES';
|
||||
UPDATE performance_schema.setup_instruments SET enabled = 'YES';
|
||||
|
Reference in New Issue
Block a user