mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Fix bug in delta codec caused by genious C++ implicit type conversion and consequent template type deduction
This commit is contained in:
parent
ab8dd1d4e3
commit
cfd8df6568
@ -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