File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ drop table if exists gh_ost_test;
2
+ drop table if exists gh_ost_test_fk_parent;
3
+ create table gh_ost_test_fk_parent (
4
+ id int auto_increment,
5
+ ts timestamp ,
6
+ primary key (id)
7
+ );
8
+ create table gh_ost_test (
9
+ id int auto_increment,
10
+ i int not null ,
11
+ parent_id int not null ,
12
+ primary key (id),
13
+ constraint test_fk foreign key (parent_id) references gh_ost_test_fk_parent (id) on delete no action
14
+ ) auto_increment= 1 ;
15
+
16
+ insert into gh_ost_test_fk_parent (id) values (1 ),(2 ),(3 );
17
+
18
+ drop event if exists gh_ost_test;
19
+ delimiter ;;
20
+ create event gh_ost_test
21
+ on schedule every 1 second
22
+ starts current_timestamp
23
+ ends current_timestamp + interval 60 second
24
+ on completion not preserve
25
+ enable
26
+ do
27
+ begin
28
+ insert into gh_ost_test values (null , 11 , 1 );
29
+ insert into gh_ost_test values (null , 13 , 2 );
30
+ insert into gh_ost_test values (null , 17 , 3 );
31
+ end ;;
Original file line number Diff line number Diff line change
1
+ --discard-foreign-keys
You can’t perform that action at this time.
0 commit comments