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

Fix a bug that could cause UPDATE to fail for a table that contains

both an INTEGER PRIMARY KEY and an index. (CVS 346)

FossilOrigin-Name: 96cd07a881d7bea86a66d7dfe54713be9c81cb4c
This commit is contained in:
drh
2002-01-14 02:56:24 +00:00
parent da9e034610
commit 9647ff85fe
5 changed files with 37 additions and 13 deletions

View File

@@ -12,7 +12,7 @@
** This file contains C code routines that are called by the parser
** to handle UPDATE statements.
**
** $Id: update.c,v 1.25 2001/12/31 02:48:51 drh Exp $
** $Id: update.c,v 1.26 2002/01/14 02:56:25 drh Exp $
*/
#include "sqliteInt.h"
@@ -101,7 +101,7 @@ void sqliteUpdate(
}
for(j=0; j<pTab->nCol; j++){
if( sqliteStrICmp(pTab->aCol[j].zName, pChanges->a[i].zName)==0 ){
if( i==pTab->iPKey ){
if( j==pTab->iPKey ){
chngRecno = 1;
pRecnoExpr = pChanges->a[i].pExpr;
}