aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2023-04-22 20:22:17 +0000
committerdrh <>2023-04-22 20:22:17 +0000
commit2f251f4929f3e0dc53fca39d6f9bd4a4a0ef1c24 (patch)
tree4086477c353d29ba4e915d909d4c2b0071d372af /src
parentf661db305078d6109ff6adbba73e56bd45877347 (diff)
downloadsqlite-2f251f4929f3e0dc53fca39d6f9bd4a4a0ef1c24.tar.gz
sqlite-2f251f4929f3e0dc53fca39d6f9bd4a4a0ef1c24.zip
Enhance the ".tables" command in the CLI so that it is able to deal
gracefully with an OOM situation. FossilOrigin-Name: 5157fd1cf753b1c01c6c00e9ac2712da2631a673837ed15ec3420ec869ee66aa
Diffstat (limited to 'src')
-rw-r--r--src/shell.c.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shell.c.in b/src/shell.c.in
index c6007c5e7..c642fbf1b 100644
--- a/src/shell.c.in
+++ b/src/shell.c.in
@@ -5691,7 +5691,7 @@ static int sql_trace_callback(
utf8_printf(p->traceOut, "-- closing database connection\n");
return 0;
}
- if( mType!=SQLITE_TRACE_ROW && ((const char*)pX)[0]=='-' ){
+ if( mType!=SQLITE_TRACE_ROW && pX!=0 && ((const char*)pX)[0]=='-' ){
zSql = (const char*)pX;
}else{
pStmt = (sqlite3_stmt*)pP;