mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
Fix issue #45195
This commit is contained in:
parent
f02a763830
commit
9c48ac79c8
@ -403,7 +403,7 @@ UInt32 CompressionCodecGorilla::doCompressData(const char * source, UInt32 sourc
|
||||
break;
|
||||
}
|
||||
|
||||
return 1 + 1 + result_size;
|
||||
return 2 + bytes_to_skip + result_size;
|
||||
}
|
||||
|
||||
void CompressionCodecGorilla::doDecompressData(const char * source, UInt32 source_size, char * dest, UInt32 uncompressed_size) const
|
||||
|
@ -0,0 +1,9 @@
|
||||
Original bug: the same query executed multiple times yielded different results.
|
||||
For unclear reasons this happened only in Release builds, not in Debug builds.
|
||||
0
|
||||
0
|
||||
0
|
||||
The same issue in a much smaller repro happens also in Debug builds
|
||||
0
|
||||
1
|
||||
3
|
34
tests/queries/0_stateless/02536_delta_gorilla_corruption.sql
Normal file
34
tests/queries/0_stateless/02536_delta_gorilla_corruption.sql
Normal file
@ -0,0 +1,34 @@
|
||||
select 'Original bug: the same query executed multiple times yielded different results.';
|
||||
select 'For unclear reasons this happened only in Release builds, not in Debug builds.';
|
||||
|
||||
drop table if exists bug_delta_gorilla;
|
||||
|
||||
create table bug_delta_gorilla
|
||||
(value_bug UInt64 codec (Delta, Gorilla))
|
||||
engine = MergeTree
|
||||
order by tuple()
|
||||
as (select 0 from numbers(30000000));
|
||||
|
||||
select count(*)
|
||||
from bug_delta_gorilla
|
||||
where 0 <> value_bug;
|
||||
|
||||
select count(*)
|
||||
from bug_delta_gorilla
|
||||
where 0 <> value_bug;
|
||||
|
||||
select count(*)
|
||||
from bug_delta_gorilla
|
||||
where 0 <> value_bug;
|
||||
|
||||
drop table if exists bug_delta_gorilla;
|
||||
|
||||
select 'The same issue in a much smaller repro happens also in Debug builds';
|
||||
|
||||
create table bug_delta_gorilla (val UInt64 codec (Delta, Gorilla))
|
||||
engine = MergeTree
|
||||
order by val;
|
||||
insert into bug_delta_gorilla values (0)(1)(3);
|
||||
select * from bug_delta_gorilla;
|
||||
|
||||
drop table if exists bug_delta_gorilla;
|
Loading…
Reference in New Issue
Block a user