In
https://github.com/FirebirdSQL/firebird/pull/7868#issuecomment-1826727278
Pavel Zotov is saying about "broken" behavior of ISQL in master.
I think this is wrong.
ISQL should not eat comments just because it's in the start of a statement.
Engine just accepts comments, no matter their position.
And in this version, ISQL also accept comments as parts of frontend
statements (even in their middle):
v5:
SQL> set /* comment */ echo on;
Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 1, column 19
-echo
SQL>
master:
SQL> set /* comment */ echo on;
SQL>
Here is another weird thing about old behavior, where errors don't match:
v5:
SQL> /* comment */ select @ from rdb$database;
Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 1, column 8
-@
master:
SQL> /* comment */ select @ from rdb$database;
Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 1, column 22
-@
Let's see another example:
SQL> /* Multi-line comments
---> */
CON> create package pkg as begin end;
Currently engine don't preserve these comments before CREATE and I don't
think it's a correct behavior. One day that could be preserved, but if
ISQL eats comments, they will be lost anyway.
So IMO, the new behavior must be maintained as an improvement.
Adriano