Skip to content

Add foreign key test case #40784

Closed
Closed
@crazycs520

Description

Dev Task

Add following test case:

create table t1 (t timestamp, index(t));
create table t2 (t timestamp, foreign key (t) references t1(t) on delete cascade);
set @@time_zone='+8:00';
insert into t1 values ('2023-01-28 10:29:16');
insert into t2 values ('2023-01-28 10:29:16');
set @@time_zone='+0:00';
delete from t1;

Then, both table t1 and t2 should be empty:

mysql> select * from t1;
Empty set (0.00 sec)

mysql> select * from t2;
Empty set (0.00 sec)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    type/enhancementThe issue or PR belongs to an enhancement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions