Issue Details (XML | Word | Printable)

Key: CORE-2501
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Claudio Valderrama C.
Reporter: Claudio Valderrama C.
Votes: 0
Watchers: 0
Operations

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

Binary shift functions give wrong results with negative shift values

Created: 09/Jun/09 07:38 AM   Updated: 07/Jun/11 08:49 AM
Component/s: Engine
Affects Version/s: 2.1.0, 2.5 Alpha 1, 2.1.1, 2.1.2, 2.5 Beta 1, 2.5 Beta 2, 2.1.3
Fix Version/s: 2.5 Beta 2

Time Tracking:
Not Specified

Environment: Platform independent
Issue Links:
Relate
 

Planning Status: Unspecified


 Description  « Hide
These results are inconsistent, showing that the shift operators in C are designed for non-negative values only:

SQL> select bin_shl(100, -1) from rdb$database;

              BIN_SHL
=====================
                    0

SQL> select bin_shr(100, -1) from rdb$database;

              BIN_SHR
=====================
                    0

It seems I will have to put more error messages.


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