Issue Details (XML | Word | Printable)

Key: CORE-6281
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Adriano dos Santos Fernandes
Reporter: Adriano dos Santos Fernandes
Votes: 0
Watchers: 2

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

Invalid timestamp errors with RDB$TIME_ZONE_UTIL.TRANSITIONS

Created: 12/Apr/20 02:13 PM   Updated: 15/Apr/20 04:18 PM
Component/s: Engine
Affects Version/s: 4.0 Beta 1
Fix Version/s: 4.0 Beta 2

QA Status: Done successfully

 Description  « Hide
The way ticks are internaly calculated from timestamps causes problems with RDB$TIME_ZONE_UTIL.TRANSITIONS, as well possible (but unlikely) problems with timers.

Test case:
select * from RDB$TIME_ZONE_UTIL.TRANSITIONS('Asia/Calcutta', date '0001-01-01', date '9999-01-01');

The problem is that old timestamps ticks are negative and the time field is unsigned. When a negative field is used with % operator it produces negative result that is stored in time. In ExprNodes.cpp that is somewhat workarounded, but the code is also weird.

Timers are unlikely to be affected because from this moment to the future the current_timestamp is positive, but if clock is reverted it may be problematic.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.