Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
65dec836
Commit
65dec836
authored
Dec 19, 2008
by
Matthias Leich
Browse files
Options
Browse Files
Download
Plain Diff
Merge into GCA tree
parents
4c0e2e8a
ed1049f9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
33 deletions
+7
-33
mysql-test/r/events_scheduling.result
mysql-test/r/events_scheduling.result
+0
-12
mysql-test/t/events_scheduling.test
mysql-test/t/events_scheduling.test
+7
-21
No files found.
mysql-test/r/events_scheduling.result
View file @
65dec836
...
...
@@ -62,18 +62,6 @@ CREATE EVENT event_4 ON SCHEDULE EVERY 1 SECOND ENDS NOW() + INTERVAL 1 SECOND
ON COMPLETION PRESERVE
DO
INSERT INTO table_4 VALUES (1);
SELECT IF(SUM(a) >= 4, 'OK', 'ERROR') FROM table_1;
IF(SUM(a) >= 4, 'OK', 'ERROR')
OK
SELECT IF(SUM(a) >= 4, 'OK', 'ERROR') FROM table_2;
IF(SUM(a) >= 4, 'OK', 'ERROR')
OK
SELECT IF(SUM(a) >= 1, 'OK', 'ERROR') FROM table_3;
IF(SUM(a) >= 1, 'OK', 'ERROR')
OK
SELECT IF(SUM(a) >= 1, 'OK', 'ERROR') FROM table_4;
IF(SUM(a) >= 1, 'OK', 'ERROR')
OK
SELECT IF(TIME_TO_SEC(TIMEDIFF(ENDS,STARTS))=6, 'OK', 'ERROR')
FROM INFORMATION_SCHEMA.EVENTS
WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='event_2';
...
...
mysql-test/t/events_scheduling.test
View file @
65dec836
...
...
@@ -58,8 +58,6 @@ ON COMPLETION PRESERVE
DO
INSERT
INTO
table_4
VALUES
(
1
);
# Wait for the events to fire and check the data afterwards
# Let event_1 insert at least 4 records into the table
let
$wait_condition
=
select
count
(
*
)
>=
4
from
table_1
;
--
source
include
/
wait_condition
.
inc
...
...
@@ -85,25 +83,13 @@ let $wait_condition=select count(*) = 0 from information_schema.events
where
event_name
=
'event_4'
and
status
=
'enabled'
;
--
source
include
/
wait_condition
.
inc
let
$wait_condition
=
SELECT
SUM
(
a
)
>=
4
FROM
table_1
;
source
include
/
wait_condition
.
inc
;
SELECT
IF
(
SUM
(
a
)
>=
4
,
'OK'
,
'ERROR'
)
FROM
table_1
;
# In case of a testing box under heavy load it cannot be guaranteed that
# it is really often enough checked if event_2 has to be executed.
# -> Bug#39854 events_scheduling fails sporadically on pushbuild
# Therefore we lowered here the original expectation of 5 to 4.
let
$wait_condition
=
SELECT
SUM
(
a
)
>=
4
FROM
table_2
;
source
include
/
wait_condition
.
inc
;
SELECT
IF
(
SUM
(
a
)
>=
4
,
'OK'
,
'ERROR'
)
FROM
table_2
;
let
$wait_condition
=
SELECT
SUM
(
a
)
>=
1
FROM
table_3
;
source
include
/
wait_condition
.
inc
;
SELECT
IF
(
SUM
(
a
)
>=
1
,
'OK'
,
'ERROR'
)
FROM
table_3
;
let
$wait_condition
=
SELECT
SUM
(
a
)
>=
1
FROM
table_4
;
source
include
/
wait_condition
.
inc
;
SELECT
IF
(
SUM
(
a
)
>=
1
,
'OK'
,
'ERROR'
)
FROM
table_4
;
#
# On a busy system the scheduler may skip execution of events,
# we can't reliably expect that the data in a table to be modified
# by an event will be exact. Thus we do not SELECT from the tables
# in this test. See also
# Bug#39854 events_scheduling fails sporadically on pushbuild
#
SELECT
IF
(
TIME_TO_SEC
(
TIMEDIFF
(
ENDS
,
STARTS
))
=
6
,
'OK'
,
'ERROR'
)
FROM
INFORMATION_SCHEMA
.
EVENTS
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment