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

@ -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;
}
}