diff options
author | Matthias Leich <Matthias.Leich@sun.com> | 2008-11-04 12:27:21 +0100 |
---|---|---|
committer | Matthias Leich <Matthias.Leich@sun.com> | 2008-11-04 12:27:21 +0100 |
commit | d2603f9aedaa36e0d8e8bb4e9e257d7eecbb1b96 (patch) | |
tree | 87364d33b3483785a5d8c3f05acff64d3ce24404 /mysql-test/r/events_bugs.result | |
parent | e1fb0c9a1adbfa6798c0aa9dc3158e77f2dee1cb (diff) | |
download | mariadb-git-d2603f9aedaa36e0d8e8bb4e9e257d7eecbb1b96.tar.gz |
- Fix for Bug #39848, #39863, #39978, #39569
Bug#39848 events_bugs fails sporadically on pushbuild
(missing rows in table event_log)
Details: Reimplement the subtest for BUG 28924
- check if the number of rows within the table
event_log changes but don't print rows
because the number varies depending on
load on testing box
- shift DROP USER befor DROP EVENT
= Subtest fits again to old bug
- remove no more needed comments + variables
Bug#39863 events_bugs fails sporadically on pushbuild
(extra processes in I_S.PROCESSLIST)
Details: Abort with appropriate message to the protocol if
release_lock() does not has the intended effect.
This cannot prevent problems caused by the probably
buggy release_lock() but it reveals if we had a
problem in this area.
Bug#39978 main.events_bugs does not clean up
Detail: Restore global.event_scheduler = ON at end of test
Bug#39569 events_bugs fails sporadically on pushbuild
(should have failed with errno 1539)
Detail: Set $wait_timeout to 4 instead of 2
- Fix two instabilities (result sets pulled from processlist in
subtest for bug 16407) which were found during tests with high
parallel I/O load
- Minor improvements of formatting
Details:
- Add comments
- Remove tabs and trailing blanks
- Add line breaks for better readability
Diffstat (limited to 'mysql-test/r/events_bugs.result')
-rw-r--r-- | mysql-test/r/events_bugs.result | 62 |
1 files changed, 33 insertions, 29 deletions
diff --git a/mysql-test/r/events_bugs.result b/mysql-test/r/events_bugs.result index 814cf42d16c..c698531dfec 100644 --- a/mysql-test/r/events_bugs.result +++ b/mysql-test/r/events_bugs.result @@ -59,7 +59,8 @@ begin select get_lock('test_bug16407', 60); end| "Now if everything is fine the event has compiled and is locked" -select /*1*/ user, host, db, info from information_schema.processlist where command!='Daemon' and (info is null or info not like '%processlist%') order by info; +select /*1*/ user, host, db, info from information_schema.processlist +where info = 'select get_lock(\'test_bug16407\', 60)'; user host db info root localhost events_test select get_lock('test_bug16407', 60) select release_lock('test_bug16407'); @@ -114,18 +115,18 @@ event_schema event_name sql_mode events_test ee_16407_2 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER events_test ee_16407_3 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER events_test ee_16407_4 -select /*2*/ user, host, db, info from information_schema.processlist where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') order by info; +select /*2*/ user, host, db, info from information_schema.processlist +where info = 'select get_lock(\'ee_16407_2\', 60)'; user host db info -event_scheduler localhost NULL NULL root localhost events_test select get_lock('ee_16407_2', 60) root localhost events_test select get_lock('ee_16407_2', 60) root localhost events_test select get_lock('ee_16407_2', 60) select release_lock('ee_16407_2'); release_lock('ee_16407_2') 1 -select /*3*/ user, host, db, info from information_schema.processlist where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') order by info; +select /*3*/ user, host, db, info from information_schema.processlist +where info = 'select get_lock(\'ee_16407_2\', 60)'; user host db info -event_scheduler localhost NULL NULL set global event_scheduler= off; select * from events_smode_test order by ev_name, a; ev_name a @@ -164,7 +165,9 @@ select release_lock('ee_16407_5'); call events_test.ee_16407_6_pendant(); end| "Should have 2 locked processes" -select /*4*/ user, host, db, info from information_schema.processlist where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') order by info; +select /*4*/ user, host, db, info from information_schema.processlist +where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') +order by info; user host db info event_scheduler localhost NULL NULL root localhost events_test select get_lock('ee_16407_5', 60) @@ -173,7 +176,9 @@ select release_lock('ee_16407_5'); release_lock('ee_16407_5') 1 "Should have 0 processes locked" -select /*5*/ user, host, db, info from information_schema.processlist where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') order by info; +select /*5*/ user, host, db, info from information_schema.processlist +where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') +order by info; user host db info event_scheduler localhost NULL NULL select * from events_smode_test order by ev_name, a; @@ -566,10 +571,9 @@ SHOW GRANTS FOR CURRENT_USER; Grants for root@localhost GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION SET GLOBAL event_scheduler = ON; -CREATE TABLE event_log (id int KEY AUTO_INCREMENT, -ev_nm char(40), ev_cnt int, -ev_tm timestamp) ENGINE=MyISAM; -SET @ev_base_date = 20281224180000; +CREATE TABLE events_test.event_log +(id int KEY AUTO_INCREMENT, ev_nm char(40), ev_cnt int, ev_tm timestamp) +ENGINE=MyISAM; SET autocommit=0; CREATE USER evtest1@localhost; SET PASSWORD FOR evtest1@localhost = password('ev1'); @@ -582,41 +586,40 @@ GRANT USAGE ON *.* TO 'evtest1'@'localhost' IDENTIFIED BY PASSWORD '*3170F3644E3 GRANT SELECT, INSERT ON `test`.* TO 'evtest1'@'localhost' GRANT SELECT, INSERT, CREATE, EVENT ON `events_test`.* TO 'evtest1'@'localhost' connection e1; -USE events_test; CREATE EVENT ev_sched_1823 ON SCHEDULE EVERY 2 SECOND DO BEGIN SET AUTOCOMMIT = 0; SET @evname = 'ev_sched_1823'; SET @cnt = 0; -SELECT COUNT(*) INTO @cnt FROM test.event_log WHERE ev_nm = @evname; +SELECT COUNT(*) INTO @cnt FROM events_test.event_log WHERE ev_nm = @evname; IF @cnt < 6 THEN -INSERT INTO test.event_log VALUES (NULL,@evname,@cnt+1,current_timestamp()); +INSERT INTO events_test.event_log VALUES (NULL,@evname,@cnt+1,current_timestamp()); COMMIT; END IF; -SELECT COUNT(*) INTO @cnt FROM test.event_log WHERE ev_nm = @evname; +SELECT COUNT(*) INTO @cnt FROM events_test.event_log WHERE ev_nm = @evname; IF @cnt < 6 THEN -INSERT INTO test.event_log VALUES (NULL,@evname,@cnt+1,current_timestamp()); +INSERT INTO events_test.event_log VALUES (NULL,@evname,@cnt+1,current_timestamp()); ROLLBACK; END IF; END;| +Sleep till the first INSERT into events_test.event_log occured +SELECT COUNT(*) > 0 AS "Expect 1" FROM events_test.event_log; +Expect 1 +1 connection default; -DROP EVENT ev_sched_1823; DROP USER evtest1@localhost; -USE test; -===================================================================================== -select id,ev_nm,ev_cnt from event_log order by id; -id ev_nm ev_cnt -1 ev_sched_1823 1 -2 ev_sched_1823 2 -3 ev_sched_1823 3 -4 ev_sched_1823 4 -5 ev_sched_1823 5 -6 ev_sched_1823 6 -DROP TABLE event_log; +Sleep 4 seconds +SELECT COUNT(*) INTO @row_cnt FROM events_test.event_log; +Sleep 4 seconds +SELECT COUNT(*) > @row_cnt AS "Expect 0" FROM events_test.event_log; +Expect 0 +0 +DROP EVENT events_test.ev_sched_1823; +DROP TABLE events_test.event_log; SET GLOBAL event_scheduler = OFF; SET GLOBAL event_scheduler= ON; CREATE EVENT bug28641 ON SCHEDULE AT '2038.01.18 03:00:00' - DO BEGIN +DO BEGIN SELECT 1; END;| SET GLOBAL event_scheduler= OFF; @@ -736,3 +739,4 @@ select name from mysql.event where name = 'p' and sql_mode = @full_mode; name drop event e1; DROP DATABASE events_test; +SET GLOBAL event_scheduler = 'ON'; |