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
d9937202
Commit
d9937202
authored
Sep 25, 2006
by
andrey@example.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanups - fix a test and remove unneeded declaration
parent
2fe744c8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
61 deletions
+35
-61
mysql-test/r/events.result
mysql-test/r/events.result
+24
-39
mysql-test/t/events.test
mysql-test/t/events.test
+11
-20
sql/sql_show.cc
sql/sql_show.cc
+0
-2
No files found.
mysql-test/r/events.result
View file @
d9937202
...
@@ -38,52 +38,37 @@ drop event event2;
...
@@ -38,52 +38,37 @@ drop event event2;
create event event2 on schedule every 2 second starts now() ends date_add(now(), interval 5 hour) comment "some" DO begin end;
create event event2 on schedule every 2 second starts now() ends date_add(now(), interval 5 hour) comment "some" DO begin end;
drop event event2;
drop event event2;
CREATE EVENT event_starts_test ON SCHEDULE EVERY 10 SECOND COMMENT "" DO SELECT 1;
CREATE EVENT event_starts_test ON SCHEDULE EVERY 10 SECOND COMMENT "" DO SELECT 1;
S
HOW EVENTS
;
S
ELECT interval_field, interval_value, body FROM mysql.event WHERE db='events_test' AND name='event_starts_test'
;
Db Name Definer Type Execute at Interval value Interval field Starts Ends Status
interval_field interval_value body
events_test event_starts_test root@localhost RECURRING NULL 10 SECOND # # ENABLED
SECOND 10 SELECT 1
SELECT starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
SELECT
execute_at IS NULL,
starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
starts IS NULL ends IS NULL comment
execute_at IS NULL
starts IS NULL ends IS NULL comment
0 1
1
0 1
ALTER EVENT event_starts_test ON SCHEDULE AT '2020-02-02 20:00:02';
ALTER EVENT event_starts_test ON SCHEDULE AT '2020-02-02 20:00:02';
SHOW EVENTS;
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
Db Name Definer Type Execute at Interval value Interval field Starts Ends Status
execute_at IS NULL starts IS NULL ends IS NULL comment
events_test event_starts_test root@localhost ONE TIME 2020-02-02 17:00:02 NULL NULL # # ENABLED
0 1 1
SELECT starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
starts IS NULL ends IS NULL comment
1 1
ALTER EVENT event_starts_test COMMENT "non-empty comment";
ALTER EVENT event_starts_test COMMENT "non-empty comment";
SHOW EVENTS;
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
Db Name Definer Type Execute at Interval value Interval field Starts Ends Status
execute_at IS NULL starts IS NULL ends IS NULL comment
events_test event_starts_test root@localhost ONE TIME 2020-02-02 17:00:02 NULL NULL # # ENABLED
0 1 1 non-empty comment
SELECT starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
starts IS NULL ends IS NULL comment
1 1 non-empty comment
ALTER EVENT event_starts_test COMMENT "";
ALTER EVENT event_starts_test COMMENT "";
SHOW EVENTS;
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
Db Name Definer Type Execute at Interval value Interval field Starts Ends Status
execute_at IS NULL starts IS NULL ends IS NULL comment
events_test event_starts_test root@localhost ONE TIME 2020-02-02 17:00:02 NULL NULL # # ENABLED
0 1 1
SELECT starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
starts IS NULL ends IS NULL comment
1 1
DROP EVENT event_starts_test;
DROP EVENT event_starts_test;
CREATE EVENT event_starts_test ON SCHEDULE EVERY 20 SECOND STARTS '2020-02-02 20:00:02' ENDS '2022-02-02 20:00:02' DO SELECT 2;
CREATE EVENT event_starts_test ON SCHEDULE EVERY 20 SECOND STARTS '2020-02-02 20:00:02' ENDS '2022-02-02 20:00:02' DO SELECT 2;
SHOW EVENTS;
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
Db Name Definer Type Execute at Interval value Interval field Starts Ends Status
execute_at IS NULL starts IS NULL ends IS NULL comment
events_test event_starts_test root@localhost RECURRING NULL 20 SECOND # # ENABLED
1 0 0
SELECT starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
starts IS NULL ends IS NULL comment
0 0
ALTER EVENT event_starts_test COMMENT "non-empty comment";
ALTER EVENT event_starts_test COMMENT "non-empty comment";
SHOW EVENTS;
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
Db Name Definer Type Execute at Interval value Interval field Starts Ends Status
execute_at IS NULL starts IS NULL ends IS NULL comment
events_test event_starts_test root@localhost RECURRING NULL 20 SECOND # # ENABLED
1 0 0 non-empty comment
SELECT starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
starts IS NULL ends IS NULL comment
0 0 non-empty comment
ALTER EVENT event_starts_test COMMENT "";
ALTER EVENT event_starts_test COMMENT "";
S
HOW EVENTS
;
S
ELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test'
;
Db Name Definer Type Execute at Interval value Interval field Starts Ends Status
execute_at IS NULL starts IS NULL ends IS NULL comment
events_test event_starts_test root@localhost RECURRING NULL 20 SECOND # # ENABLED
1 0 0
DROP EVENT event_starts_test;
DROP EVENT event_starts_test;
create table test_nested(a int);
create table test_nested(a int);
create event e_43 on schedule every 1 second do set @a = 5;
create event e_43 on schedule every 1 second do set @a = 5;
...
...
mysql-test/t/events.test
View file @
d9937202
...
@@ -49,35 +49,26 @@ drop event event2;
...
@@ -49,35 +49,26 @@ drop event event2;
create
event
event2
on
schedule
every
2
second
starts
now
()
ends
date_add
(
now
(),
interval
5
hour
)
comment
"some"
DO
begin
end
;
create
event
event2
on
schedule
every
2
second
starts
now
()
ends
date_add
(
now
(),
interval
5
hour
)
comment
"some"
DO
begin
end
;
drop
event
event2
;
drop
event
event2
;
#
# BUG #16537 (Events: mysql.event.starts is null)
# BUG #16537 (Events: mysql.event.starts is null)
#
CREATE
EVENT
event_starts_test
ON
SCHEDULE
EVERY
10
SECOND
COMMENT
""
DO
SELECT
1
;
CREATE
EVENT
event_starts_test
ON
SCHEDULE
EVERY
10
SECOND
COMMENT
""
DO
SELECT
1
;
--
replace_column
8
# 9 #
SELECT
interval_field
,
interval_value
,
body
FROM
mysql
.
event
WHERE
db
=
'events_test'
AND
name
=
'event_starts_test'
;
SHOW
EVENTS
;
SELECT
execute_at
IS
NULL
,
starts
IS
NULL
,
ends
IS
NULL
,
comment
FROM
mysql
.
event
WHERE
db
=
'events_test'
AND
name
=
'event_starts_test'
;
SELECT
starts
IS
NULL
,
ends
IS
NULL
,
comment
FROM
mysql
.
event
WHERE
db
=
'events_test'
AND
name
=
'event_starts_test'
;
ALTER
EVENT
event_starts_test
ON
SCHEDULE
AT
'2020-02-02 20:00:02'
;
ALTER
EVENT
event_starts_test
ON
SCHEDULE
AT
'2020-02-02 20:00:02'
;
--
replace_column
8
# 9 #
SELECT
execute_at
IS
NULL
,
starts
IS
NULL
,
ends
IS
NULL
,
comment
FROM
mysql
.
event
WHERE
db
=
'events_test'
AND
name
=
'event_starts_test'
;
SHOW
EVENTS
;
SELECT
starts
IS
NULL
,
ends
IS
NULL
,
comment
FROM
mysql
.
event
WHERE
db
=
'events_test'
AND
name
=
'event_starts_test'
;
ALTER
EVENT
event_starts_test
COMMENT
"non-empty comment"
;
ALTER
EVENT
event_starts_test
COMMENT
"non-empty comment"
;
--
replace_column
8
# 9 #
SELECT
execute_at
IS
NULL
,
starts
IS
NULL
,
ends
IS
NULL
,
comment
FROM
mysql
.
event
WHERE
db
=
'events_test'
AND
name
=
'event_starts_test'
;
SHOW
EVENTS
;
SELECT
starts
IS
NULL
,
ends
IS
NULL
,
comment
FROM
mysql
.
event
WHERE
db
=
'events_test'
AND
name
=
'event_starts_test'
;
ALTER
EVENT
event_starts_test
COMMENT
""
;
ALTER
EVENT
event_starts_test
COMMENT
""
;
--
replace_column
8
# 9 #
SELECT
execute_at
IS
NULL
,
starts
IS
NULL
,
ends
IS
NULL
,
comment
FROM
mysql
.
event
WHERE
db
=
'events_test'
AND
name
=
'event_starts_test'
;
SHOW
EVENTS
;
SELECT
starts
IS
NULL
,
ends
IS
NULL
,
comment
FROM
mysql
.
event
WHERE
db
=
'events_test'
AND
name
=
'event_starts_test'
;
DROP
EVENT
event_starts_test
;
DROP
EVENT
event_starts_test
;
CREATE
EVENT
event_starts_test
ON
SCHEDULE
EVERY
20
SECOND
STARTS
'2020-02-02 20:00:02'
ENDS
'2022-02-02 20:00:02'
DO
SELECT
2
;
CREATE
EVENT
event_starts_test
ON
SCHEDULE
EVERY
20
SECOND
STARTS
'2020-02-02 20:00:02'
ENDS
'2022-02-02 20:00:02'
DO
SELECT
2
;
--
replace_column
8
# 9 #
SELECT
execute_at
IS
NULL
,
starts
IS
NULL
,
ends
IS
NULL
,
comment
FROM
mysql
.
event
WHERE
db
=
'events_test'
AND
name
=
'event_starts_test'
;
SHOW
EVENTS
;
SELECT
starts
IS
NULL
,
ends
IS
NULL
,
comment
FROM
mysql
.
event
WHERE
db
=
'events_test'
AND
name
=
'event_starts_test'
;
ALTER
EVENT
event_starts_test
COMMENT
"non-empty comment"
;
ALTER
EVENT
event_starts_test
COMMENT
"non-empty comment"
;
--
replace_column
8
# 9 #
SELECT
execute_at
IS
NULL
,
starts
IS
NULL
,
ends
IS
NULL
,
comment
FROM
mysql
.
event
WHERE
db
=
'events_test'
AND
name
=
'event_starts_test'
;
SHOW
EVENTS
;
SELECT
starts
IS
NULL
,
ends
IS
NULL
,
comment
FROM
mysql
.
event
WHERE
db
=
'events_test'
AND
name
=
'event_starts_test'
;
ALTER
EVENT
event_starts_test
COMMENT
""
;
ALTER
EVENT
event_starts_test
COMMENT
""
;
--
replace_column
8
# 9 #
SELECT
execute_at
IS
NULL
,
starts
IS
NULL
,
ends
IS
NULL
,
comment
FROM
mysql
.
event
WHERE
db
=
'events_test'
AND
name
=
'event_starts_test'
;
SHOW
EVENTS
;
DROP
EVENT
event_starts_test
;
DROP
EVENT
event_starts_test
;
#
#
#
#
...
...
sql/sql_show.cc
View file @
d9937202
...
@@ -4201,8 +4201,6 @@ static interval_type get_real_interval_type(interval_type i_type)
...
@@ -4201,8 +4201,6 @@ static interval_type get_real_interval_type(interval_type i_type)
return
INTERVAL_SECOND
;
return
INTERVAL_SECOND
;
}
}
extern
LEX_STRING
interval_type_to_name
[];
/*
/*
Loads an event from mysql.event and copies it's data to a row of
Loads an event from mysql.event and copies it's data to a row of
...
...
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