Skip to content

Segmentation fault when inserting data #30

@buremba

Description

@buremba

Initially I thought that the primary key must contain at least two columns so I created a table with constant expression in primary key tuple with this query:

create table hoba (naber Date) ENGINE = MergeTree(naber, (1, naber), 8192)

The query is executed successfully and I tried to INSERT data to the table:

INSERT INTO hoba (naber) VALUES ('2010-01-01')

However this query causes ClickHouse to throw Segmentation fault and exits ungracefully:

2016.06.21 13:27:03.361 [ 6 ] <Error> BaseDaemon: (from thread 5) Received signal Segmentation fault (11).
2016.06.21 13:27:03.361 [ 6 ] <Error> BaseDaemon: Address: 0x1
2016.06.21 13:27:03.366 [ 6 ] <Error> BaseDaemon: 1. clickhouse-server(DB::IDataTypeNumberFixed<unsigned char, DB::ColumnVector<unsigned char> >::serializeBinary(DB::IColumn const&, unsigned long, DB::WriteBuffer&) const+0x39) [0x100f269]
2016.06.21 13:27:03.366 [ 6 ] <Error> BaseDaemon: 2. clickhouse-server(Poco::ThreadImpl::runnableEntry(void*)+0x87) [0x3018287]
2016.06.21 13:27:03.366 [ 6 ] <Error> BaseDaemon: 3. /lib/x86_64-linux-gnu/libpthread.so.0(+0x8184) [0x7f8078fc7184]
2016.06.21 13:27:03.366 [ 6 ] <Error> BaseDaemon: 4. /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f80785e237d]

Using constant values in primary key may be invalid but in this case Clickhouse should not allow such table definition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions