aboutsummaryrefslogtreecommitdiff
path: root/src/delete.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2013-10-10 20:13:18 +0000
committerdrh <drh@noemail.net>2013-10-10 20:13:18 +0000
commita63b85299290b7eca076ea6e031e7f43d4feadcf (patch)
treee925eb05965ec76f37b6483581d5bd8f8ea9e53b /src/delete.c
parent59255f9a98381960cfede9253277f128895531f6 (diff)
parent7e65c94bdc689bebd222321dec5c034194267ac9 (diff)
downloadsqlite-a63b85299290b7eca076ea6e031e7f43d4feadcf.tar.gz
sqlite-a63b85299290b7eca076ea6e031e7f43d4feadcf.zip
Synchronize with the trunk.
FossilOrigin-Name: 136445ba020c9475d3f5a7843d7d0add98477138
Diffstat (limited to 'src/delete.c')
-rw-r--r--src/delete.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/delete.c b/src/delete.c
index 99891e737..f52c0c67f 100644
--- a/src/delete.c
+++ b/src/delete.c
@@ -357,6 +357,7 @@ void sqlite3DeleteFrom(
&& 0==sqlite3FkRequired(pParse, pTab, 0, 0)
){
assert( !isView );
+ sqlite3TableLock(pParse, iDb, pTab->tnum, 1, pTab->zName);
sqlite3VdbeAddOp4(v, OP_Clear, pTab->tnum, iDb, memCnt,
pTab->zName, P4_STATIC);
for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
@@ -543,7 +544,7 @@ void sqlite3GenerateRowDelete(
/* Do FK processing. This call checks that any FK constraints that
** refer to this table (i.e. constraints attached to other tables)
** are not violated by deleting this row. */
- sqlite3FkCheck(pParse, pTab, iOld, 0);
+ sqlite3FkCheck(pParse, pTab, iOld, 0, 0, 0);
}
/* Delete the index and table entries. Skip this step if pTab is really
@@ -565,7 +566,7 @@ void sqlite3GenerateRowDelete(
/* Do any ON CASCADE, SET NULL or SET DEFAULT operations required to
** handle rows (possibly in other tables) that refer via a foreign key
** to the row just deleted. */
- sqlite3FkActions(pParse, pTab, 0, iOld);
+ sqlite3FkActions(pParse, pTab, 0, iOld, 0, 0);
/* Invoke AFTER DELETE trigger programs. */
sqlite3CodeRowTrigger(pParse, pTrigger,