Skip to content

Too long numeric hex literal silently converted to value 0 with an alias #7594

@mrotteveel

Description

@mrotteveel

If a numeric hex literal is too long (more than 32 hex digits in Firebird 4.0 and 5.0, more than 16 hex digits in Firebird 3.0), it is silently converted to the value 0 with an alias equal to the remainder of the literal.

For example

select 0x12345678901234567890123456789012, 0x123456789012345678901234567890123 from rdb$database;
                                     CONSTANT X123456789012345678901234567890123
============================================= ==================================
       24197857199965561741520400062332047378                                  0

(first column is a valid INT128 literal in Firebird 4.0 and higher with 32 digits, while the second is invalid, with 33 digits)

This should raise an error instead.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions