Add an API to indicate the percentage progress of an rbu update.

FossilOrigin-Name: ffc58d2c2576a5b6e1c2c7112612c5760e711afd
This commit is contained in:
dan
2016-03-17 21:06:42 +00:00
parent 4b058dd4d1
commit e42195b044
6 changed files with 377 additions and 21 deletions
+13
View File
@@ -66,6 +66,7 @@ static int test_sqlite3rbu_cmd(
{"create_rbu_delta", 2, ""}, /* 2 */
{"savestate", 2, ""}, /* 3 */
{"dbMain_eval", 3, "SQL"}, /* 4 */
{"stage_progress", 2, ""}, /* 5 */
{0,0,0}
};
int iCmd;
@@ -136,6 +137,18 @@ static int test_sqlite3rbu_cmd(
break;
}
case 5: /* stage_progress */ {
int one, two;
Tcl_Obj *pObj;
sqlite3rbu_stage_progress(pRbu, &one, &two);
pObj = Tcl_NewObj();
Tcl_ListObjAppendElement(interp, pObj, Tcl_NewIntObj(one));
Tcl_ListObjAppendElement(interp, pObj, Tcl_NewIntObj(two));
Tcl_SetObjResult(interp, pObj);
break;
}
default: /* seems unlikely */
assert( !"cannot happen" );
break;