1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Add the sqlite3rbu_savestate() function to the rbu extension. To force rbu to save its state to disk without closing the sqlite3rbu* handle.

FossilOrigin-Name: 851a875ad6b81f90960caf4d03b116afc911858d
This commit is contained in:
dan
2015-08-13 18:26:09 +00:00
parent 4510faa6df
commit 82d7aea6d4
6 changed files with 163 additions and 10 deletions

View File

@ -56,7 +56,9 @@ static int test_sqlite3rbu_cmd(
){
int ret = TCL_OK;
sqlite3rbu *pRbu = (sqlite3rbu*)clientData;
const char *azMethod[] = { "step", "close", "create_rbu_delta", 0 };
const char *azMethod[] = {
"step", "close", "create_rbu_delta", "savestate", 0
};
int iMethod;
if( objc!=2 ){
@ -103,6 +105,13 @@ static int test_sqlite3rbu_cmd(
break;
}
case 3: /* savestate */ {
int rc = sqlite3rbu_savestate(pRbu);
Tcl_SetObjResult(interp, Tcl_NewStringObj(sqlite3ErrName(rc), -1));
ret = (rc==SQLITE_OK ? TCL_OK : TCL_ERROR);
break;
}
default: /* seems unlikely */
assert( !"cannot happen" );
break;