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

Reject non-constant date/time/timestamp literals [CORE5717] #5983

Closed
firebird-issue-importer opened this issue Jan 19, 2018 · 7 comments
Closed

Comments

@firebird-issue-importer

Submitted by: @asfernandes

There is date, time and timestamp literals with this syntax:

DATE '2018-01-01'
TIME '10:00:00'
TIMESTAMP '2018-01-01 10:00:00'

They are parsed at compile time.

However, there are weird situation with some literals.

We may use things as DATE 'TODAY', DATE 'TOMORROW', DATE 'YESTERDAY', TIME 'NOW' and TIMESTAMP 'NOW'.

And different than these strings used in CAST, these are literais
(evaluated at compile time).

So if you create a procedure/function with them, they value are
refreshed every time you recompile (from SQL) the routine, but never
refreshed when you run it.

Also imagine a compiled statement cache (implementation detail), a
"select timestamp 'now' from rdb$database" will give stalled results.

These strings will not be accepted with the literals syntax anymore.

Commits: 75d34f8 e84f443

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 19, 2018

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 31, 2018

Commented by: @asfernandes

Fixed in branch work/time-zone-support.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Nov 27, 2018

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 4.0 Beta 1 [ 10750 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 5, 2019

Modified by: @pavel-zotov

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

QA Status: No test => Done successfully

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 5, 2019

Modified by: @pavel-zotov

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

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 17, 2020

Commented by: @pavel-zotov

doc\README.incompatibilities.3to4.txt *DEFINITELY* needs to be fulfilled with this incompatibility. IMO.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Apr 20, 2020

Commented by: @asfernandes

> doc\README.incompatibilities.3to4.txt *DEFINITELY* needs to be fulfilled with this incompatibility. IMO.

Done.

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

Successfully merging a pull request may close this issue.

None yet
2 participants