mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 17:23:03 +01:00
Fix #7886 - ISQL sets return code to 1 for script that is called via IN command even if this script completes OK.
Problem caused by presence of tail comments in the callee.
This commit is contained in:
parent
e303504f22
commit
12f5664e4b
@ -5934,20 +5934,20 @@ std::pair<FrontendLexer::SingleStatement, processing_state> StatementGetter::get
|
||||
lexer.appendBuffer(buffer);
|
||||
buffer.clear();
|
||||
|
||||
// If there was something valuable before EOF - error
|
||||
if (!lexer.isBufferEmpty())
|
||||
{
|
||||
bool isEmpty = false;
|
||||
bool isBufferEmpty = lexer.isBufferEmpty();
|
||||
|
||||
// If there was something valuable before EOF - error
|
||||
if (!isBufferEmpty)
|
||||
{
|
||||
try
|
||||
{
|
||||
isEmpty = FrontendLexer::stripComments(lexer.getBuffer()).empty();
|
||||
isBufferEmpty = FrontendLexer::stripComments(lexer.getBuffer()).empty();
|
||||
}
|
||||
catch (const FrontendLexer::IncompleteTokenError&)
|
||||
{
|
||||
}
|
||||
|
||||
if (!isEmpty)
|
||||
if (!isBufferEmpty)
|
||||
{
|
||||
TEXT errbuf[MSG_LENGTH];
|
||||
IUTILS_msg_get(UNEXPECTED_EOF, errbuf);
|
||||
@ -5983,7 +5983,7 @@ std::pair<FrontendLexer::SingleStatement, processing_state> StatementGetter::get
|
||||
// This should fix the INPUT bug introduced with editline.
|
||||
getColumn = -1;
|
||||
|
||||
if (!lexer.isBufferEmpty())
|
||||
if (!isBufferEmpty)
|
||||
{
|
||||
lexer.reset();
|
||||
Exit_value = FINI_ERROR;
|
||||
|
Loading…
Reference in New Issue
Block a user