mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
Merge pull request #51260 from ClickHouse/urlfree
Fix use-after-free in StorageURL when switching URLs
This commit is contained in:
commit
9945118dbe
@ -153,6 +153,7 @@ public:
|
||||
/// * Parallel reading.
|
||||
/// To enable it, make sure `buf` is a SeekableReadBuffer implementing readBigAt().
|
||||
/// * Parallel parsing.
|
||||
/// `buf` must outlive the returned IInputFormat.
|
||||
InputFormatPtr getInput(
|
||||
const String & name,
|
||||
ReadBuffer & buf,
|
||||
|
@ -361,6 +361,8 @@ Chunk StorageURLSource::generate()
|
||||
|
||||
pipeline->reset();
|
||||
reader.reset();
|
||||
input_format.reset();
|
||||
read_buf.reset();
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
@ -0,0 +1,5 @@
|
||||
136
|
||||
136
|
||||
136
|
||||
136
|
||||
136
|
@ -0,0 +1,5 @@
|
||||
select sum(*) from (select * from url('http://127.0.0.1:8123?query=select+{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}+as+x+format+TSV', 'TSV') settings max_threads=1, max_download_threads=1);
|
||||
select sum(*) from (select * from url('http://127.0.0.1:8123?query=select+{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}+as+x+format+CSV', 'CSV') settings max_threads=1, max_download_threads=1);
|
||||
select sum(*) from (select * from url('http://127.0.0.1:8123?query=select+{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}+as+x+format+JSONEachRow', 'JSONEachRow') settings max_threads=1, max_download_threads=1);
|
||||
select sum(*) from (select * from url('http://127.0.0.1:8123?query=select+{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}+as+x+format+TSKV', 'TSKV') settings max_threads=1, max_download_threads=1);
|
||||
select sum(*) from (select * from url('http://127.0.0.1:8123?query=select+{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}+as+x+format+Native', 'Native') settings max_threads=1, max_download_threads=1);
|
Loading…
Reference in New Issue
Block a user