mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Bug#53102 perfschema.pfs_upgrade fails on sol10 sparc64 max in parallel mode
The reason for the bug above is unclear but - Modify pfs_upgrade so that it's result is easier to analyze in case something fails - Fix several minor weaknesses which could cause that a successing test (either an already existing or a to be developed one) fails because of imperfect cleanup, too slow disconnected sessions etc. should either fix the bug or reduce it's probability or at least make the analysis of failures easier. mysql-test/suite/perfschema/include/upgrade_check.inc: New include file which contains redundant stuff taken from pfs_upgrade.test. Remove any file which might harm analysis of suspicious results. mysql-test/suite/perfschema/r/query_cache.result: Updated results mysql-test/suite/perfschema/r/selects.result: Updated results mysql-test/suite/perfschema/t/bad_option_1.test: Add the missing remove_file at beginning and end of test. mysql-test/suite/perfschema/t/bad_option_2.test: Add the missing remove_file at beginning and end of test. mysql-test/suite/perfschema/t/global_read_lock.test: Add a wait routine which ensures that the disconnect is really completed when the test ends. mysql-test/suite/perfschema/t/pfs_upgrade.test: - Move redundant actions to include/upgrade_check.inc - Add preemptive removal of files mysql-test/suite/perfschema/t/privilege.test: Add a wait routine which ensures that the disconnect is really completed when the test ends. mysql-test/suite/perfschema/t/query_cache.test: Add "flush status" so that counters are reset. (./mtr --repeat=2 perfschema.query_cache failed) mysql-test/suite/perfschema/t/read_only.test: Add a wait routine which ensures that the disconnect is really completed when the test ends. mysql-test/suite/perfschema/t/selects-master.opt: Needed for running with enabled event-scheduler mysql-test/suite/perfschema/t/selects.test: - Correct the sub test for the EVENT scheduler - Replace "sleep" by wait_routine - Add premptive cleanups like "DROP ... IF EXISTS ..."
This commit is contained in:
@ -55,14 +55,21 @@ THREAD_ID EVENT_ID
|
||||
[THREAD_ID] [EVENT_ID]
|
||||
[THREAD_ID] [EVENT_ID]
|
||||
[THREAD_ID] [EVENT_ID]
|
||||
DROP TABLE IF EXISTS t_event;
|
||||
DROP EVENT IF EXISTS t_ps_event;
|
||||
CREATE TABLE t_event AS
|
||||
SELECT EVENT_ID FROM performance_schema.EVENTS_WAITS_CURRENT
|
||||
WHERE 1 = 2;
|
||||
CREATE EVENT t_ps_event
|
||||
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 SECOND
|
||||
DO SELECT DISTINCT EVENT_ID
|
||||
DO INSERT INTO t_event
|
||||
SELECT DISTINCT EVENT_ID
|
||||
FROM performance_schema.EVENTS_WAITS_CURRENT
|
||||
JOIN performance_schema.EVENTS_WAITS_HISTORY USING (EVENT_ID)
|
||||
ORDER BY EVENT_ID
|
||||
LIMIT 1;
|
||||
ALTER TABLE t1 ADD COLUMN c INT;
|
||||
DROP TRIGGER IF EXISTS t_ps_trigger;
|
||||
CREATE TRIGGER t_ps_trigger BEFORE INSERT ON t1
|
||||
FOR EACH ROW BEGIN
|
||||
SET NEW.c = (SELECT MAX(EVENT_ID)
|
||||
@ -76,6 +83,7 @@ id c
|
||||
12 [EVENT_ID]
|
||||
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)
|
||||
BEGIN
|
||||
SELECT id FROM performance_schema.PROCESSLIST
|
||||
@ -83,6 +91,7 @@ WHERE THREAD_ID = tid INTO pid;
|
||||
END;
|
||||
|
|
||||
CALL t_ps_proc(0, @p_id);
|
||||
DROP FUNCTION IF EXISTS t_ps_proc;
|
||||
CREATE FUNCTION t_ps_func(tid INT) RETURNS int
|
||||
BEGIN
|
||||
return (SELECT id FROM performance_schema.PROCESSLIST
|
||||
@ -92,6 +101,10 @@ END;
|
||||
SELECT t_ps_func(0) = @p_id;
|
||||
t_ps_func(0) = @p_id
|
||||
1
|
||||
SELECT * FROM t_event;
|
||||
EVENT_ID
|
||||
[EVENT_ID]
|
||||
DROP PROCEDURE t_ps_proc;
|
||||
DROP FUNCTION t_ps_func;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t_event;
|
||||
|
Reference in New Issue
Block a user