Skip to content

self referential foreign key is case sensitive #7700

@jycor

Description

@jycor

For some reason, dolt's foreign key constraints don't work when columns are capitalized.
This doesn't happen in MySQL

create table t (i int primary key, j int);
alter table t add foreign key (j) references t(i);
insert into t values (1, 1); -- passes
insert into t values (2, 3); -- should error, and does
create table t (i int primary key, J int);
alter table t add foreign key (J) references t(i);
insert into t values (1, 1); -- passes
insert into t values (2, 3); -- should error, but doesn't

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcorrectnessWe don't return the same result as MySQLsqlIssue with SQL

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions