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

EXECUTE STATEMENT fails on FB 4.x if containing time/timestamp with time zone parameters [CORE6453] #6686

Closed
firebird-automations opened this issue Nov 25, 2020 · 4 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @pavel-zotov

Please look at this:

set heading off;
set term ^;
execute block returns(sttm varchar(100), result varchar(100)) as
begin
/*
sttm = 'select --#⁠EDS#⁠TAG#⁠' || v_lf
|| 'current_time' || v_lf
|| 'from rdb$database'
;
*/
-- sttm = 'select 123 from rdb$database'; -- OK
-- sttm = 'select ''foo'' from rdb$database'; -- OK
-- sttm = 'select current_date from rdb$database'; -- OK
-- sttm = 'select 123456789012345678901234567890 from rdb$database'; -- OK (but only in 4.0 because this is greater than max bigint)
-- sttm = 'select cast(current_timestamp as timestamp) from rdb$database'; -- OK

\-\- sttm = 'select current\_time from rdb$database';
sttm = 'select current\_timestamp from rdb$database';


execute statement sttm into result;
suspend;

end
^
set term ;^

These two cases:
-- sttm = 'select current_time from rdb$database';
sttm = 'select current_timestamp from rdb$database';

-- lead to fail with

Statement failed, SQLSTATE = 07002
Dynamic SQL Error
-SQLDA error
-Data type unknown
-at SQLVAR index 0

No such problem in FB 3.x, and I could not find anything about this in README.incompatibilities.3to4.txt

Commits: d0fc106

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

reporter: Adriano dos Santos Fernandes [ asfernandes ] => Pavel Zotov [ tabloid ]

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 4.0 RC 1 [ 10930 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: No test => Done successfully

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Closed [ 6 ]

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

2 participants