You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: restore primary table from pitr report 'internal error: can not drop database. It has been referenced by foreign keys'. #19377
changed the title [-][Bug]: restore pri table from pitr report 'internal error: can not drop database. It has been referenced by foreign keys'.[/-][+][Bug]: restore primary table from pitr report 'internal error: can not drop database. It has been referenced by foreign keys'.[/+]on Oct 16, 2024
Activity
[-][Bug]: restore pri table from pitr report 'internal error: can not drop database. It has been referenced by foreign keys'.[/-][+][Bug]: restore primary table from pitr report 'internal error: can not drop database. It has been referenced by foreign keys'.[/+]YANGGMM commentedon Oct 17, 2024
drop database if exists test03;
create database test03;
use test03;
create snapshot sp01 for account sys;
drop table if exists pri01;
create table pri01(
deptno int unsigned comment '部门编号',
dname varchar(15) comment '部门名称',
loc varchar(50) comment '部门所在位置',
primary key(deptno)
) comment='部门表';
insert into pri01 values (10,'ACCOUNTING','NEW YORK');
insert into pri01 values (20,'RESEARCH','DALLAS');
drop database if exists test02;
create database test02;
use test02;
drop table if exists aff01;
create table aff01(
empno int unsigned auto_increment COMMENT '雇员编号',
ename varchar(15) comment '雇员姓名',
job varchar(10) comment '雇员职位',
mgr int unsigned comment '雇员对应的领导的编号',
hiredate date comment '雇员的雇佣日期',
sal decimal(7,2) comment '雇员的基本工资',
comm decimal(7,2) comment '奖金',
deptno int unsigned comment '所在部门',
primary key(empno),
constraint
c1foreign key (deptno) references test03.pri01(deptno));insert into aff01 values (7369,'SMITH','CLERK',7902,'1980-12-17',800,NULL,10);
restore account sys database test03 from snapshot sp01 ;
YANGGMM commentedon Oct 17, 2024
fixed,snapshot 和 pitr都需要测试 @Ariznawlll
Ariznawlll commentedon Oct 18, 2024
pitr测试结果:

snapshot测试结果:

测试✅