1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-01 06:27:03 +03:00

Fix sqlite3rbu_close() so that the pzErrmsg parameter may be passed NULL.

FossilOrigin-Name: c433672dd8ab625628bde2f4f40a2dc000ed915dbe91833d3f753d8ab51baf25
This commit is contained in:
dan
2017-06-13 16:52:34 +00:00
parent 6e3bccd5c9
commit 2ebf8f474e
6 changed files with 35 additions and 17 deletions

View File

@ -78,6 +78,7 @@ static int SQLITE_TCLAPI test_sqlite3rbu_cmd(
{"db", 3, "RBU"}, /* 6 */
{"state", 2, ""}, /* 7 */
{"progress", 2, ""}, /* 8 */
{"close_no_error", 2, ""}, /* 9 */
{0,0,0}
};
int iCmd;
@ -102,11 +103,16 @@ static int SQLITE_TCLAPI test_sqlite3rbu_cmd(
break;
}
case 9: /* close_no_error */
case 1: /* close */ {
char *zErrmsg = 0;
int rc;
Tcl_DeleteCommand(interp, Tcl_GetString(objv[0]));
rc = sqlite3rbu_close(pRbu, &zErrmsg);
if( iCmd==1 ){
rc = sqlite3rbu_close(pRbu, &zErrmsg);
}else{
rc = sqlite3rbu_close(pRbu, 0);
}
if( rc==SQLITE_OK || rc==SQLITE_DONE ){
Tcl_SetObjResult(interp, Tcl_NewStringObj(sqlite3ErrName(rc), -1));
assert( zErrmsg==0 );