mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 22:43: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);
|
lexer.appendBuffer(buffer);
|
||||||
buffer.clear();
|
buffer.clear();
|
||||||
|
|
||||||
// If there was something valuable before EOF - error
|
bool isBufferEmpty = lexer.isBufferEmpty();
|
||||||
if (!lexer.isBufferEmpty())
|
|
||||||
{
|
|
||||||
bool isEmpty = false;
|
|
||||||
|
|
||||||
|
// If there was something valuable before EOF - error
|
||||||
|
if (!isBufferEmpty)
|
||||||
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
isEmpty = FrontendLexer::stripComments(lexer.getBuffer()).empty();
|
isBufferEmpty = FrontendLexer::stripComments(lexer.getBuffer()).empty();
|
||||||
}
|
}
|
||||||
catch (const FrontendLexer::IncompleteTokenError&)
|
catch (const FrontendLexer::IncompleteTokenError&)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isEmpty)
|
if (!isBufferEmpty)
|
||||||
{
|
{
|
||||||
TEXT errbuf[MSG_LENGTH];
|
TEXT errbuf[MSG_LENGTH];
|
||||||
IUTILS_msg_get(UNEXPECTED_EOF, errbuf);
|
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.
|
// This should fix the INPUT bug introduced with editline.
|
||||||
getColumn = -1;
|
getColumn = -1;
|
||||||
|
|
||||||
if (!lexer.isBufferEmpty())
|
if (!isBufferEmpty)
|
||||||
{
|
{
|
||||||
lexer.reset();
|
lexer.reset();
|
||||||
Exit_value = FINI_ERROR;
|
Exit_value = FINI_ERROR;
|
||||||
|
Loading…
Reference in New Issue
Block a user