1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-05 04:30:38 +03:00

Improved response to error conditions in the ".session" shell command and

in the "changeset" command-line program.

FossilOrigin-Name: b69f7dd1f35846c3bb9f4f160d50c4f03796f887
This commit is contained in:
drh
2014-08-19 00:26:17 +00:00
parent 9f674f2600
commit 2967e0cc9c
4 changed files with 22 additions and 14 deletions

View File

@@ -3232,9 +3232,13 @@ static int do_meta_command(char *zLine, ShellState *p){
int szChng;
void *pChng;
if( azCmd[0][0]=='c' ){
sqlite3session_changeset(pSession->p, &szChng, &pChng);
rc = sqlite3session_changeset(pSession->p, &szChng, &pChng);
}else{
sqlite3session_patchset(pSession->p, &szChng, &pChng);
rc = sqlite3session_patchset(pSession->p, &szChng, &pChng);
}
if( rc ){
printf("Error: error code %d\n", rc);
rc = 0;
}
if( pChng
&& fwrite(pChng, szChng, 1, out)!=1 ){