Skip to content
New issue

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

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

Already on GitHub? # to your account

Strings concatenation operator may be omitted in some "compound" statements (like 'INSERT INTO ... SELECT ... FROM ...') // 5.x+ #8370

Closed
pavel-zotov opened this issue Dec 29, 2024 · 1 comment

Comments

@pavel-zotov
Copy link

Please consider following script:

set bail on;
set list on;
shell del r:\temp\tmp4test.fdb 2>nul;
create database 'localhost:r:\temp\tmp4test.fdb' user 'sysdba' password 'masterkey';
show version;
commit;
 
recreate table test(id int);
commit;
 
set term ^;
execute block as
begin
    execute statement
        'insert into test(id) '
        'select 1 '
        'from rdb$database'
    ;
end
^

NOTE: there is no concatenation between lines insert into ... and select 1 (and also next pair: select 1 and from rdb$database).

FB 4.x will issue error for such script:

ISQL Version: WI-V4.0.6.3173 Firebird 4.0
...
Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 5, column 9
-'select 1 '

FB 5.x and 6.x silently accept it, no error is issued.

Is it expected ?
(i'm not sure whether this is bug or no, thus i did not set any label for this ticket)

@mrotteveel
Copy link
Member

This is a new feature in Firebird 5.0. See Changes to literals, and tickets #5588 and #5589.

@mrotteveel mrotteveel closed this as not planned Won't fix, can't repro, duplicate, stale Dec 29, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants