-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Redis table with Variant std::out_of_range error #71558
Copy link
Copy link
Closed
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasefuzzProblem found by one of the fuzzersProblem found by one of the fuzzers
Description
Describe the bug
Using an empty Variant column as PK in a Redis table gives std::out_of_range error on SELECT.
How to reproduce
Run:
SET allow_experimental_variant_type = 1;
CREATE TABLE t0 (c0 Variant() PRIMARY KEY) ENGINE = Redis('<host>:<port>', 0, '<password>');
INSERT INTO TABLE t0 (c0) VALUES (NULL);
SELECT 1 FROM t0; --std::out_of_rangeStack trace:
<Fatal> : Logical error: 'std::exception. Code: 1001, type: std::out_of_range, e.what() = vector (version 24.11.1.1066 (official build)), Stack trace:
0. std::exception::capture() @ 0x0000000019428f0b
1. contrib/llvm-project/libcxx/include/exception:114: std::logic_error::logic_error(char const*) @ 0x000000003af824df
2. contrib/llvm-project/libcxx/include/stdexcept:166: std::out_of_range::out_of_range[abi:v15007](char const*) @ 0x0000000019299396
3. contrib/llvm-project/libcxx/include/stdexcept:268: std::__throw_out_of_range[abi:v15007](char const*) @ 0x0000000019299337
4. std::vector<char8_t, std::allocator<char8_t>>::__throw_out_of_range[abi:v15007]() const @ 0x000000001a3e0230
5. DB::ColumnVariant::getVariantByGlobalDiscriminator(unsigned long) @ 0x000000002fc31a0c
6. src/DataTypes/Serializations/SerializationVariant.cpp:661: DB::SerializationVariant::deserializeBinary(DB::IColumn&, DB::ReadBuffer&, DB::FormatSettings const&) const @ 0x0000000030ca0454
7. src/Storages/KVStorageUtils.h:35: void DB::fillColumns<String, String>(String const&, String const&, unsigned long, DB::Block const&, std::vector<COW<DB::IColumn>::mutable_ptr<DB::IColumn>, std::allocator<COW<DB::IColumn>::mutable_ptr<DB::IColumn>>>&) @ 0x0000000033f6defb
8. src/Storages/StorageRedis.cpp:117: DB::RedisDataSource::generateFullScan() @ 0x000000003405536c
9. src/Storages/StorageRedis.cpp:74: DB::RedisDataSource::generate() @ 0x000000003405422d
10. src/Processors/ISource.cpp:139: DB::ISource::tryGenerate() @ 0x0000000035374694
11. src/Processors/ISource.cpp:108: DB::ISource::work() @ 0x0000000035373cba
12. src/Processors/Executors/ExecutionThreadContext.cpp:47: DB::ExecutionThreadContext::executeTask() @ 0x00000000353a3e20
13. src/Processors/Executors/PipelineExecutor.cpp:289: DB::PipelineExecutor::executeStepImpl(unsigned long, std::atomic<bool>*) @ 0x000000003538eac3
14. src/Processors/Executors/PipelineExecutor.cpp:255: void std::__function::__policy_invoker<void ()>::__call_impl<std::__function::__default_alloc_func<DB::PipelineExecutor::spawnThreads()::$_0, void ()>>(std::__function::__policy_storage const*) @ 0x0000000035390409
15. contrib/llvm-project/libcxx/include/__functional/function.h:848: ? @ 0x00000000256bd07c
16. contrib/llvm-project/libcxx/include/__functional/invoke.h:359: ? @ 0x00000000256c5134
17. contrib/llvm-project/libcxx/include/__functional/function.h:848: ? @ 0x00000000256ba7cf
18. contrib/llvm-project/libcxx/include/__functional/invoke.h:359: ? @ 0x00000000256c19ca
19. ? @ 0x00007ffff7ca1e2e
20. ? @ 0x00007ffff7d33a4c
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasefuzzProblem found by one of the fuzzersProblem found by one of the fuzzers