mirror of
https://github.com/MariaDB/server.git
synced 2025-10-25 18:38:00 +03:00
Merge calliope.local:/Users/cmiller/work/src/mysql-5.1-new
into calliope.local:/Users/cmiller/work/src/mysql-5.1-new__cleanup_mysqldump client/mysqldump.c: Auto merged mysql-test/r/mysqldump.result: Auto merged mysql-test/t/mysqldump.test: Auto merged sql/event_timed.cc: Auto merged
This commit is contained in:
@@ -2907,3 +2907,40 @@ mysql-import: Error: 1146, Table 'test.words' doesn't exist, when using table: w
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table words2;
|
||||
create database first;
|
||||
use first;
|
||||
set time_zone = 'UTC';
|
||||
create event ee1 on schedule at '2035-12-31 20:01:23' do set @a=5;
|
||||
show events;
|
||||
Db Name Definer Type Execute at Interval value Interval field Starts Ends Status
|
||||
first ee1 root@localhost ONE TIME 2035-12-31 20:01:23 NULL NULL NULL NULL ENABLED
|
||||
show create event ee1;
|
||||
Event sql_mode Create Event
|
||||
ee1 CREATE EVENT `ee1` ON SCHEDULE AT '2035-12-31 20:01:23' ON COMPLETION NOT PRESERVE ENABLE DO set @a=5
|
||||
drop database first;
|
||||
create database second;
|
||||
use second;
|
||||
show events;
|
||||
Db Name Definer Type Execute at Interval value Interval field Starts Ends Status
|
||||
second ee1 root@localhost ONE TIME 2035-12-31 20:01:23 NULL NULL NULL NULL ENABLED
|
||||
show create event ee1;
|
||||
Event sql_mode Create Event
|
||||
ee1 NO_AUTO_VALUE_ON_ZERO CREATE EVENT `ee1` ON SCHEDULE AT '2035-12-31 20:01:23' ON COMPLETION NOT PRESERVE ENABLE DO set @a=5
|
||||
create event ee2 on schedule at '2018-12-31 21:01:23' do set @a=5;
|
||||
create event ee3 on schedule at '2030-12-31 22:01:23' do set @a=5;
|
||||
show events;
|
||||
Db Name Definer Type Execute at Interval value Interval field Starts Ends Status
|
||||
second ee1 root@localhost ONE TIME 2035-12-31 20:01:23 NULL NULL NULL NULL ENABLED
|
||||
second ee2 root@localhost ONE TIME 2018-12-31 21:01:23 NULL NULL NULL NULL ENABLED
|
||||
second ee3 root@localhost ONE TIME 2030-12-31 22:01:23 NULL NULL NULL NULL ENABLED
|
||||
drop database second;
|
||||
create database third;
|
||||
use third;
|
||||
show events;
|
||||
Db Name Definer Type Execute at Interval value Interval field Starts Ends Status
|
||||
third ee1 root@localhost ONE TIME 2035-12-31 20:01:23 NULL NULL NULL NULL ENABLED
|
||||
third ee2 root@localhost ONE TIME 2018-12-31 21:01:23 NULL NULL NULL NULL ENABLED
|
||||
third ee3 root@localhost ONE TIME 2030-12-31 22:01:23 NULL NULL NULL NULL ENABLED
|
||||
drop database third;
|
||||
set time_zone = 'SYSTEM';
|
||||
use test;
|
||||
|
||||
@@ -1166,3 +1166,43 @@ drop table t1;
|
||||
drop table t2;
|
||||
|
||||
drop table words2;
|
||||
|
||||
#
|
||||
# BUG# 16853: mysqldump doesn't show events
|
||||
#
|
||||
create database first;
|
||||
use first;
|
||||
set time_zone = 'UTC';
|
||||
|
||||
## prove one works
|
||||
create event ee1 on schedule at '2035-12-31 20:01:23' do set @a=5;
|
||||
show events;
|
||||
show create event ee1;
|
||||
--exec $MYSQL_DUMP --events first > $MYSQLTEST_VARDIR/tmp/bug16853-1.sql
|
||||
drop database first;
|
||||
|
||||
create database second;
|
||||
use second;
|
||||
--exec $MYSQL second < $MYSQLTEST_VARDIR/tmp/bug16853-1.sql
|
||||
show events;
|
||||
show create event ee1;
|
||||
|
||||
## prove three works
|
||||
# start with one from the previous restore
|
||||
create event ee2 on schedule at '2018-12-31 21:01:23' do set @a=5;
|
||||
create event ee3 on schedule at '2030-12-31 22:01:23' do set @a=5;
|
||||
show events;
|
||||
--exec $MYSQL_DUMP --events second > $MYSQLTEST_VARDIR/tmp/bug16853-2.sql
|
||||
drop database second;
|
||||
|
||||
create database third;
|
||||
use third;
|
||||
--exec $MYSQL third < $MYSQLTEST_VARDIR/tmp/bug16853-2.sql
|
||||
show events;
|
||||
drop database third;
|
||||
|
||||
# revert back to normal settings
|
||||
set time_zone = 'SYSTEM';
|
||||
use test;
|
||||
|
||||
#####
|
||||
|
||||
Reference in New Issue
Block a user