SQLite Forum

.selecttrace unknown and strange errors
Login
The primary key of A1 has two fields, the reference from C1 only has one.

You need a UNIQUE index on A1_INDEX (not on A1_INDEX and something else besides).

That is, the UNIQUE constraint needs to have A1_CAT removed from it.