1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-12-06 08:21:01 +03:00

Ensure that the correct number of columns in a UNIQUE index are checked for

uniqueness, regardless of whether or not the original table has a ROWID or
if the columns are NOT NULL, etc.  Ticket [9a6daf340df99ba93c].

FossilOrigin-Name: 6b785e92f279cb65746834d5cd25594fd3333342
This commit is contained in:
drh
2014-07-30 13:56:48 +00:00
parent a7f37491a7
commit ac50232d0f
6 changed files with 102 additions and 24 deletions

View File

@@ -2712,7 +2712,7 @@ static void sqlite3RefillIndex(Parse *pParse, Index *pIndex, int memRootPage){
sqlite3VdbeAddOp2(v, OP_Goto, 0, j2);
addr2 = sqlite3VdbeCurrentAddr(v);
sqlite3VdbeAddOp4Int(v, OP_SorterCompare, iSorter, j2, regRecord,
pKey->nField - pIndex->nKeyCol); VdbeCoverage(v);
pIndex->nKeyCol); VdbeCoverage(v);
sqlite3UniqueConstraint(pParse, OE_Abort, pIndex);
}else{
addr2 = sqlite3VdbeCurrentAddr(v);