Experimental change to invoke the preupdate hook when WITHOUT ROWID tables are

written.

FossilOrigin-Name: 856f8604c59c8fdd9bfb7d86fc0e212f091ab49a
This commit is contained in:
dan
2017-01-30 19:44:53 +00:00
parent e7eeeb99f7
commit cb9a364390
10 changed files with 458 additions and 139 deletions
+8 -3
View File
@@ -4620,10 +4620,15 @@ void sqlite3VdbePreUpdateHook(
assert( db->pPreUpdate==0 );
memset(&preupdate, 0, sizeof(PreUpdate));
if( op==SQLITE_UPDATE ){
iKey2 = v->aMem[iReg].u.i;
if( HasRowid(pTab)==0 ){
iKey1 = iKey2 = 0;
preupdate.pPk = sqlite3PrimaryKeyIndex(pTab);
}else{
iKey2 = iKey1;
if( op==SQLITE_UPDATE ){
iKey2 = v->aMem[iReg].u.i;
}else{
iKey2 = iKey1;
}
}
assert( pCsr->nField==pTab->nCol