提交 51fef277 authored 作者: Thomas Mueller's avatar Thomas Mueller

Issue 380: ALTER TABLE ADD FOREIGN KEY with an explicit index didn't verify the…

Issue 380: ALTER TABLE ADD FOREIGN KEY with an explicit index didn't verify the index can be used, which would lead to a NullPointerException later on.
上级 d5b46ed8
......@@ -5,15 +5,15 @@ create table test (id int not null, pid int);
create index idx_test_pid on test (pid);
> ok
alter table test add constraint fk_test foreign key (pid)
alter table test add constraint fk_test foreign key (pid)
references test (id) index idx_test_pid;
> ok
insert into test values (2, null);
> ok
> update count: 1
update test set pid = 1 where id = 2;
> ok
> exception
drop table test;
> ok
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论