Issue Details (XML | Word | Printable)

Key: CORE-5751
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Pavel Zotov
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Firebird Core

ISQL does not understand inline comment ("--") in CONNECT statement

Created: 17/Feb/18 07:05 AM   Updated: 17/Feb/18 09:16 AM
Component/s: ISQL
Affects Version/s: 4.0 Alpha 1, 2.5.8, 3.0.3
Fix Version/s: None

QA Status: No test


 Description  « Hide
Correct path and name of test database file and run this script:
===
shell del C:\MIX\firebird\QA\fbt-repo\tmp\tmpfdb.tmp 2>nul;

set list on;
set echo on;

create database 'localhost:C:\MIX\firebird\QA\fbt-repo\tmp\tmpfdb.tmp' user 'SYSDBA' password 'masterkey'
;
drop database;
commit;


create database 'localhost:C:\MIX\firebird\QA\fbt-repo\tmp\tmpfdb.tmp' user 'SYSDBA' password 'masterkey' --
;
commit;


connect 'localhost:C:\MIX\firebird\QA\fbt-repo\tmp\tmpfdb.tmp' user 'SYSDBA' password 'masterkey' --
;
commit;


connect 'localhost:C:\MIX\firebird\QA\fbt-repo\tmp\tmpfdb.tmp' user 'SYSDBA' password 'masterkey'
;
drop database;
commit;
===

Output will contain:
===
connect 'localhost:C:\MIX\firebird\QA\fbt-repo\tmp\tmpfdb.tmp' user 'SYSDBA' password 'masterkey' --
;
Command error: connect 'localhost:C:\MIX\firebird\QA\fbt-repo\tmp\tmpfdb.tmp' user 'SYSDBA' password 'masterkey' --

commit;

commit;
===


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Dmitry Yemanov added a comment - 17/Feb/18 09:16 AM
CONNECT is a pseudo statement that's processed by ISQL itself, not the FB parser. So it knows nothing about comments and probably other parts of the SQL grammar too. Perhaps it could be improved, but honestly I see no good reason to spend time on that.