1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-06 15:49:35 +03:00

Fix an assertion failure due to interaction between the count_changes pragma and triggers. (CVS 2187)

FossilOrigin-Name: 6c7bec1b3aee0287e30f43c1d6a7b67b1c47e774
This commit is contained in:
danielk1977
2005-01-10 02:48:49 +00:00
parent 49766d6cd0
commit cc6bd38380
5 changed files with 72 additions and 15 deletions

View File

@@ -12,7 +12,7 @@
** This file contains C code routines that are called by the parser
** in order to generate code for DELETE FROM statements.
**
** $Id: delete.c,v 1.94 2004/12/25 01:03:14 drh Exp $
** $Id: delete.c,v 1.95 2005/01/10 02:48:49 danielk1977 Exp $
*/
#include "sqliteInt.h"
@@ -329,7 +329,7 @@ void sqlite3DeleteFrom(
** generating code because of a call to sqlite3NestedParse(), do not
** invoke the callback function.
*/
if( db->flags & SQLITE_CountRows && pParse->nested==0 ){
if( db->flags & SQLITE_CountRows && pParse->nested==0 && !pParse->trigStack ){
sqlite3VdbeAddOp(v, OP_Callback, 1, 0);
sqlite3VdbeSetNumCols(v, 1);
sqlite3VdbeSetColName(v, 0, "rows deleted", P3_STATIC);