1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

When generating code for partial indexes, be sure not to modify the

index condition expression in the schema.

FossilOrigin-Name: e63d01c69c3e50f49ee3022a519c4f3e91f00520
This commit is contained in:
drh
2015-06-11 13:58:35 +00:00
parent 033eb6c8d3
commit 72bc8208f0
7 changed files with 51 additions and 16 deletions

View File

@@ -1381,8 +1381,8 @@ void sqlite3GenerateConstraintChecks(
if( pIdx->pPartIdxWhere ){
sqlite3VdbeAddOp2(v, OP_Null, 0, aRegIdx[ix]);
pParse->ckBase = regNewData+1;
sqlite3ExprIfFalse(pParse, pIdx->pPartIdxWhere, addrUniqueOk,
SQLITE_JUMPIFNULL);
sqlite3ExprIfFalseDup(pParse, pIdx->pPartIdxWhere, addrUniqueOk,
SQLITE_JUMPIFNULL);
pParse->ckBase = 0;
}