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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user