Foreign key constraint fails when it should succeed.
|User & Date:||drh 2010-07-29 01:55:02|
<hr><i>drh added on 2010-07-29 01:55:02:</i><br> The issue was in the handling of multi-column foreign key constraints where one of the columns was an integer primary key. The error has always been in the code. It was simply masked by the prior error of ticket [dd08e5a988d00decc4a543daa8dbbfab9c577ad8]. The fix in check-in [636f86095eb1f4bdcfb0c9ed846c4c6b3589c10b] is correct. That fix did not introduce a new problem; it merely brought an existing problem into view. The Severity of this ticket is downgraded to Important since one can easily argue that any schema that has a multi-column foreign key constraint where one of the columns is a primary key is a broken schema. Even so, we ought to handle even broken schemas correctly, which should be the case after check-in [53902f7d4a46aa70ecc5bf180a01ff888d52686a].