Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISQL does not understand inline comment ("--") in CONNECT statement [CORE5751] #6014

Open
firebird-automations opened this issue Feb 17, 2018 · 1 comment

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @pavel-zotov

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;

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant