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

Fix the ".dump", ".schema", and ".fullschema" commands of the command-line

shell so that they work even if PRAGMA empty_result_callbacks is enabled.
Fix for ticket [02f0f4c54f281].

FossilOrigin-Name: cf0d3715caac9149e65bb4802fd179d0952cfaf9add17ac243c6ca87cbd6e6b7
This commit is contained in:
drh
2017-08-28 11:12:57 +00:00
parent f49759bf03
commit 20554381d9
3 changed files with 10 additions and 8 deletions

View File

@@ -2659,6 +2659,7 @@ static int shell_callback(
int i;
ShellState *p = (ShellState*)pArg;
if( azArg==0 ) return 0;
switch( p->cMode ){
case MODE_Line: {
int w = 5;
@@ -3009,6 +3010,7 @@ static int captureOutputCallback(void *pArg, int nArg, char **azArg, char **az){
ShellText *p = (ShellText*)pArg;
int i;
UNUSED_PARAMETER(az);
if( azArg==0 ) return 0;
if( p->n ) appendText(p, "|", 0);
for(i=0; i<nArg; i++){
if( i ) appendText(p, ",", 0);
@@ -3890,7 +3892,7 @@ static int dump_callback(void *pArg, int nArg, char **azArg, char **azNotUsed){
ShellState *p = (ShellState *)pArg;
UNUSED_PARAMETER(azNotUsed);
if( nArg!=3 ) return 1;
if( nArg!=3 || azArg==0 ) return 0;
zTable = azArg[0];
zType = azArg[1];
zSql = azArg[2];