1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Improved matching of COLLATE clauses within the ON CONFLICT conflict-target.

FossilOrigin-Name: 8f4376e52b6124986937a3837ad83a18863c3144ef3b438a0d5e9231bf6c8980
This commit is contained in:
drh
2018-04-18 18:18:12 +00:00
parent 370c32628f
commit 277434e9a7
3 changed files with 14 additions and 9 deletions

View File

@@ -148,13 +148,18 @@ int sqlite3UpsertAnalyzeTarget(
nn = pIdx->nKeyCol;
for(ii=0; ii<nn; ii++){
Expr *pExpr;
sCol[0].u.zToken = (char*)pIdx->azColl[ii];
if( pIdx->aiColumn[ii]==XN_EXPR ){
assert( pIdx->aColExpr!=0 );
assert( pIdx->aColExpr->nExpr>ii );
pExpr = pIdx->aColExpr->a[ii].pExpr;
if( pExpr->op!=TK_COLLATE ){
sCol[0].pLeft = pExpr;
pExpr = &sCol[0];
}
}else{
sCol[0].pLeft = &sCol[1];
sCol[1].iColumn = pIdx->aiColumn[ii];
sCol[0].u.zToken = (char*)pIdx->azColl[ii];
pExpr = &sCol[0];
}
for(jj=0; jj<nn; jj++){