Repository navigation
Commit e3a7785
Fix matching a foreign key reference to a unique key with a different case
When looking for the unique constraint that a foreign key references, the
referenced column names were compared to the index columns case-sensitively.
MySQL column names are case-insensitive, so a reference like
"REFERENCES t1 (ID)" to a column "id" found no unique constraint, and
UNIQUE_CONSTRAINT_NAME in information_schema.referential_constraints was
NULL.
Compare the column names case-insensitively.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>1 parent 5deb4d6 commit e3a7785
2 files changed
Lines changed: 23 additions & 1 deletion
File tree
- packages/mysql-on-sqlite
- src/sqlite
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1811 | 1811 | | |
1812 | 1812 | | |
1813 | 1813 | | |
| 1814 | + | |
1814 | 1815 | | |
1815 | 1816 | | |
1816 | | - | |
| 1817 | + | |
1817 | 1818 | | |
1818 | 1819 | | |
1819 | 1820 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1943 | 1943 | | |
1944 | 1944 | | |
1945 | 1945 | | |
| 1946 | + | |
| 1947 | + | |
| 1948 | + | |
| 1949 | + | |
| 1950 | + | |
| 1951 | + | |
| 1952 | + | |
| 1953 | + | |
| 1954 | + | |
| 1955 | + | |
| 1956 | + | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
| 1965 | + | |
| 1966 | + | |
1946 | 1967 | | |
1947 | 1968 | | |
1948 | 1969 | | |
| |||
0 commit comments