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

Fix an assert() failure that can occur if the user attempts to set an into an integer primary key column to a text value in a table that has a BEFORE UPDATE trigger. (CVS 5787)

FossilOrigin-Name: c2cf9d60d6626844193b008a37e4417aa0a0f323
This commit is contained in:
danielk1977
2008-10-09 18:48:30 +00:00
parent 5eddafeb64
commit 510f96590b
4 changed files with 22 additions and 10 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.184 2008/09/01 21:59:43 shane Exp $
** $Id: update.c,v 1.185 2008/10/09 18:48:31 danielk1977 Exp $
*/
#include "sqliteInt.h"
@@ -433,6 +433,7 @@ void sqlite3Update(
*/
if( chngRowid ){
sqlite3ExprCodeAndCache(pParse, pRowidExpr, regRowid);
sqlite3VdbeAddOp1(v, OP_MustBeInt, regRowid);
}else{
sqlite3VdbeAddOp2(v, OP_Rowid, iCur, regRowid);
}