Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions