Skip to content

Some functions 'bleed' into following rows #442

Closed

Description

@tobia

Example:

CREATE TABLE test (
    name FixedString(3)
) ENGINE = TinyLog;

INSERT INTO test VALUES ('foo'), ('bar'), ('zzz');

SELECT 
    name, 
    reinterpretAsUInt64(name), 
    reinterpretAsUInt64('foo')
FROM test 
WHERE name = 'foo';

┌─name─┬─reinterpretAsUInt64(name)─┬─reinterpretAsUInt64(\'foo\')─┐
│ foo  │       7017296931985518438 │                      7303014 │
└──────┴───────────────────────────┴──────────────────────────────┘

The middle value looks wrong. What is really inside it?

SELECT reinterpretAsString(reinterpretAsUInt64(name))
FROM test 
WHERE name = 'foo'

┌─reinterpretAsString(reinterpretAsUInt64(name))─┐
│ foobarzz                                       │
└────────────────────────────────────────────────┘

Oh boy! Is this expected behaviour?

I'm using client and server 1.1.54140.

Activity

  1. ztlpn commented on Feb 2, 2017

    @ztlpn
    Contributor

    Confirmed.

  2. added
    bug
    on Feb 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions