8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 16:43:03 +01:00

Fix #8409 - Error message "SQL -104 / Unexpected end of command" appears in a trace log when 'SET AUTOTERM ON;' is used.

This commit is contained in:
Adriano dos Santos Fernandes 2025-01-22 07:53:18 -03:00
parent 47fb637751
commit 3f188ec758
2 changed files with 15 additions and 5 deletions

View File

@ -337,8 +337,8 @@ It is set to OFF by default. The name WIRE_STATS could be shortened up to WIRE.
The statistics counters shown in two groups: 'logical' and 'physical':
- logical counters show numbers of packets in terms of Firebird wire protocol
and number of bytes send before compression and received after decompression;
- physical counters show number of physical packets and bytes send and
received over the wire, number of bytes could be affected by wire compression,
- physical counters show number of physical packets and bytes send and
received over the wire, number of bytes could be affected by wire compression,
if present. Also, number of network roundtrips is shown: it is number of
changes of IO direction from 'send' to 'receive'.
@ -489,7 +489,9 @@ If engine prepares the statement correctly, it's run and ISQL is put in new stat
mode.
If engine returns error isc_command_end_err2, then ISQL is put in statement
continuation mode and asks for another line, repeating the process.
continuation mode and asks for another line, repeating the process. When this error
happens together with IStatement::PREPARE_REQUIRE_SEMICOLON, trace does not log the
error.
If engine returns a different error, the error is shown and ISQL is put in new statement
mode.

View File

@ -480,9 +480,17 @@ static DsqlRequest* prepareRequest(thread_db* tdbb, dsql_dbb* database, jrd_tra*
return dsqlRequest;
}
catch (const Exception&)
catch (const Exception& ex)
{
trace.prepare(ITracePlugin::RESULT_FAILED);
StaticStatusVector st;
ex.stuffException(st);
if (!((prepareFlags & IStatement::PREPARE_REQUIRE_SEMICOLON) &&
fb_utils::containsErrorCode(st.begin(), isc_command_end_err2)))
{
trace.prepare(ITracePlugin::RESULT_FAILED);
}
throw;
}
}