Repository navigation
Commit 84b1693
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 81d6afa commit 84b1693
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 | |
|---|---|---|---|
| |||
1820 | 1820 | | |
1821 | 1821 | | |
1822 | 1822 | | |
| 1823 | + | |
1823 | 1824 | | |
1824 | 1825 | | |
1825 | | - | |
| 1826 | + | |
1826 | 1827 | | |
1827 | 1828 | | |
1828 | 1829 | | |
| |||
| 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