mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Split the (internal) sqlite3VdbeCheckFk() routine into two variants,
sqlite3VdbeCheckFkImmediate() and sqlite3VdbeCheckFkDeferred(), which run faster than the combined general-purpose variant. FossilOrigin-Name: 872b1b52ed93ef85911c2ef87b15673f9e102aef564f208e0a916af62671df93
This commit is contained in:
@@ -1726,7 +1726,7 @@ case OP_IntCopy: { /* out2 */
|
||||
** RETURNING clause.
|
||||
*/
|
||||
case OP_FkCheck: {
|
||||
if( (rc = sqlite3VdbeCheckFk(p,0))!=SQLITE_OK ){
|
||||
if( (rc = sqlite3VdbeCheckFkImmediate(p))!=SQLITE_OK ){
|
||||
goto abort_due_to_error;
|
||||
}
|
||||
break;
|
||||
@@ -3910,7 +3910,7 @@ case OP_Savepoint: {
|
||||
*/
|
||||
int isTransaction = pSavepoint->pNext==0 && db->isTransactionSavepoint;
|
||||
if( isTransaction && p1==SAVEPOINT_RELEASE ){
|
||||
if( (rc = sqlite3VdbeCheckFk(p, 1))!=SQLITE_OK ){
|
||||
if( (rc = sqlite3VdbeCheckFkDeferred(p))!=SQLITE_OK ){
|
||||
goto vdbe_return;
|
||||
}
|
||||
db->autoCommit = 1;
|
||||
@@ -4028,7 +4028,7 @@ case OP_AutoCommit: {
|
||||
"SQL statements in progress");
|
||||
rc = SQLITE_BUSY;
|
||||
goto abort_due_to_error;
|
||||
}else if( (rc = sqlite3VdbeCheckFk(p, 1))!=SQLITE_OK ){
|
||||
}else if( (rc = sqlite3VdbeCheckFkDeferred(p))!=SQLITE_OK ){
|
||||
goto vdbe_return;
|
||||
}else{
|
||||
db->autoCommit = (u8)desiredAutoCommit;
|
||||
|
Reference in New Issue
Block a user