mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-16 23:02:26 +03:00
Add the savepoint feature. This feature is largely untested at this point. (CVS 6036)
FossilOrigin-Name: 34b56600ec0c5cd7b5faab265750252bc9850e3e
This commit is contained in:
19
src/build.c
19
src/build.c
@@ -22,7 +22,7 @@
|
||||
** COMMIT
|
||||
** ROLLBACK
|
||||
**
|
||||
** $Id: build.c,v 1.508 2008/12/10 22:30:25 shane Exp $
|
||||
** $Id: build.c,v 1.509 2008/12/17 17:30:26 danielk1977 Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <ctype.h>
|
||||
@@ -3311,6 +3311,23 @@ void sqlite3RollbackTransaction(Parse *pParse){
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** This function is called by the parser when it parses a command to create,
|
||||
** release or rollback an SQL savepoint.
|
||||
*/
|
||||
void sqlite3Savepoint(Parse *pParse, int op, Token *pName){
|
||||
Vdbe *v;
|
||||
if( pParse->nErr || pParse->db->mallocFailed ) return;
|
||||
|
||||
/* TODO: Invoke the authorization callback */
|
||||
|
||||
v = sqlite3GetVdbe(pParse);
|
||||
if( v ){
|
||||
const char *zName = (const char *)pName->z;
|
||||
sqlite3VdbeAddOp4(v, OP_Savepoint, op, 0, 0, zName, pName->n);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** Make sure the TEMP database is open and available for use. Return
|
||||
** the number of errors. Leave any error messages in the pParse structure.
|
||||
|
||||
Reference in New Issue
Block a user