~ubuntu-branches/debian/squeeze/mysql-5.1/squeeze

« back to all changes in this revision

Viewing changes to mysql-test/r/events_bugs.result

  • Committer: Package Import Robot
  • Author(s): Moritz Muehlenhoff
  • Date: 2014-01-14 10:40:30 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20140114104030-44alii0hx3x3g41y
Tags: 5.1.73-1
* New upstream release
  http://dev.mysql.com/doc/relnotes/mysql/5.1/en/news-5-1-73.html
* Update patches
* Disable flaky test rpl.rpl_innodb_bug28430 breaking the build. It's  marked
  as experimental by upstream and the internet is full of reports about it's
  unrelialibity

Show diffs side-by-side

added added

removed removed

Lines of Context:
419
419
ALTER EVENT e1 DO SELECT 2;
420
420
SHOW EVENTS;
421
421
Db      Name    Definer Time zone       Type    Execute at      Interval value  Interval field  Starts  Ends    Status  Originator      character_set_client    collation_connection    Database Collation
422
 
events_test     e1      root@localhost  -03:00  RECURRING       NULL    1       DAY     2005-12-31 20:58:59     2030-01-03 00:00:00     ENABLED 1       latin1  latin1_swedish_ci       latin1_swedish_ci
 
422
events_test     e1      root@localhost  -03:00  RECURRING       NULL    1       DAY     2005-12-31 20:58:59     2030-01-03 00:00:00     DISABLED        1       latin1  latin1_swedish_ci       latin1_swedish_ci
423
423
DROP EVENT e1;
424
424
SET TIME_ZONE='+05:00';
425
425
CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO
535
535
DROP EVENT e2;
536
536
DROP EVENT e1;
537
537
SET TIME_ZONE=@save_time_zone;
 
538
SET TIMESTAMP=DEFAULT;
538
539
drop event if exists new_event;
539
540
CREATE EVENT new_event ON SCHEDULE EVERY 0 SECOND DO SELECT 1;
540
541
ERROR HY000: INTERVAL is either not positive or too big
747
748
ev1     4294967295
748
749
DROP EVENT ev1;
749
750
SET GLOBAL server_id = @old_server_id;
 
751
CREATE DATABASE event_test12;
 
752
USE event_test12;
 
753
CREATE EVENT ev1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
 
754
CREATE DATABASE event_test1;
 
755
USE event_test1;
 
756
SHOW EVENTS;
 
757
Db      Name    Definer Time zone       Type    Execute at      Interval value  Interval field  Starts  Ends    Status  Originator      character_set_client    collation_connection    Database Collation
 
758
DROP DATABASE event_test1;
 
759
DROP DATABASE event_test12;
 
760
#
 
761
# Bug#12546938 (formerly known as bug#61005):
 
762
# CREATE IF NOT EXIST EVENT WILL CREATE MULTIPLE RUNNING EVENTS
 
763
#
 
764
USE events_test;
 
765
SET GLOBAL event_scheduler = ON;
 
766
DROP TABLE IF EXISTS table_bug12546938;
 
767
DROP EVENT IF EXISTS event_Bug12546938;
 
768
CREATE TABLE table_bug12546938 (i INT);
 
769
# Create an event which will be executed with a small delay
 
770
# and won't be automatically dropped after that.
 
771
CREATE EVENT event_Bug12546938
 
772
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 SECOND ON COMPLETION PRESERVE
 
773
ENABLE DO
 
774
BEGIN 
 
775
INSERT INTO table_bug12546938 VALUES(1);
 
776
END
 
777
|
 
778
# Now try to create the same event using CREATE EVENT IF NOT EXISTS.
 
779
# A warning should be emitted. A new event should not be created nor
 
780
# the old event should be re-executed.
 
781
CREATE EVENT IF NOT EXISTS event_bug12546938
 
782
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 SECOND ON COMPLETION PRESERVE
 
783
ENABLE DO
 
784
BEGIN
 
785
INSERT INTO table_bug12546938 VALUES (1);
 
786
END
 
787
|
 
788
Warnings:
 
789
Note    1537    Event 'event_bug12546938' already exists
 
790
# Wait until at least one instance of event is executed.
 
791
# Check that only one instance of our event was executed.
 
792
SELECT COUNT(*) FROM table_bug12546938;
 
793
COUNT(*)
 
794
1
 
795
# Clean-up.
 
796
DROP EVENT IF EXISTS event_Bug12546938;
 
797
DROP TABLE table_bug12546938;
 
798
SET GLOBAL EVENT_SCHEDULER = OFF;
 
799
DROP DATABASE IF EXISTS event_test11764334;
 
800
CREATE DATABASE event_test11764334;
 
801
USE event_test11764334;
 
802
CREATE EVENT ev1 ON SCHEDULE EVERY 3 SECOND DISABLE DO SELECT 1;
 
803
SHOW EVENTS IN event_test11764334 WHERE NAME='ev1';
 
804
Db      Name    Definer Time zone       Type    Execute at      Interval value  Interval field  Starts  Ends    Status  Originator      character_set_client    collation_connection    Database Collation
 
805
event_test11764334      ev1     root@localhost  SYSTEM  RECURRING       NULL    3       SECOND  #       #       DISABLED        1       latin1  latin1_swedish_ci       latin1_swedish_ci
 
806
ALTER EVENT ev1 ON SCHEDULE EVERY 4 SECOND;
 
807
SHOW EVENTS IN event_test11764334 WHERE NAME='ev1';
 
808
Db      Name    Definer Time zone       Type    Execute at      Interval value  Interval field  Starts  Ends    Status  Originator      character_set_client    collation_connection    Database Collation
 
809
event_test11764334      ev1     root@localhost  SYSTEM  RECURRING       NULL    4       SECOND  #       #       DISABLED        1       latin1  latin1_swedish_ci       latin1_swedish_ci
 
810
DROP EVENT ev1;
 
811
DROP DATABASE event_test11764334;
 
812
USE test;
750
813
DROP DATABASE events_test;
751
814
SET GLOBAL event_scheduler= 'ON';
752
815
SET @@global.concurrent_insert= @concurrent_insert;