mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Merge pull request #5786 from yandex/awful_delta_codec_bug
Fix bug in delta codec
This commit is contained in:
commit
72b0bdd0d3
@ -48,7 +48,7 @@ void compressDataForType(const char * source, UInt32 source_size, char * dest)
|
||||
while (source < source_end)
|
||||
{
|
||||
T curr_src = unalignedLoad<T>(source);
|
||||
unalignedStore(dest, curr_src - prev_src);
|
||||
unalignedStore<T>(dest, curr_src - prev_src);
|
||||
prev_src = curr_src;
|
||||
|
||||
source += sizeof(T);
|
||||
|
@ -0,0 +1,2 @@
|
||||
1111
|
||||
2222
|
9
dbms/tests/queries/0_stateless/00957_delta_diff_bug.sql
Normal file
9
dbms/tests/queries/0_stateless/00957_delta_diff_bug.sql
Normal file
@ -0,0 +1,9 @@
|
||||
DROP TABLE IF EXISTS segfault_table;
|
||||
|
||||
CREATE TABLE segfault_table (id UInt16 CODEC(Delta(2))) ENGINE MergeTree() order by tuple();
|
||||
|
||||
INSERT INTO segfault_table VALUES (1111), (2222);
|
||||
|
||||
SELECT * FROM segfault_table;
|
||||
|
||||
DROP TABLE IF EXISTS segfault_table;
|
Loading…
Reference in New Issue
Block a user