Skip to content

Commit

Permalink
Address swallowed error message
Browse files Browse the repository at this point in the history
Signed-off-by: Morgan Douglas <mdouglas47@bloomberg.net>
  • Loading branch information
morgando committed Dec 31, 2024
1 parent 051d7a2 commit d2852e5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db/sqlinterfaces.c
Original file line number Diff line number Diff line change
Expand Up @@ -2901,9 +2901,9 @@ static void _prepare_error(struct sqlthdstate *thd,
return;
}

if(rc == ERR_SQL_PREPARE && !rec->stmt)
if (rc == ERR_SQL_PREPARE && !rec->stmt) {
errstr = "no statement";
if(rc == SQLITE_SCHEMA && rec->stmt && clnt->remsql_set.is_remsql) {
} else if (rc == SQLITE_SCHEMA && rec->stmt && clnt->remsql_set.is_remsql) {
errstr = clnt->remsql_set.xerr.errstr;
} else if (clnt->fdb_state.xerr.errval) {
errstr = clnt->fdb_state.xerr.errstr;
Expand Down
1 change: 1 addition & 0 deletions tests/cdb2sql.test/t02.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[] failed with rc -3 no statement
1 change: 1 addition & 0 deletions tests/cdb2sql.test/t02.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
;

0 comments on commit d2852e5

Please sign in to comment.