mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Fix segmentation fault
This commit is contained in:
parent
c29b39002d
commit
b222ec1209
@ -100,7 +100,9 @@ DatabaseTablesIteratorPtr DatabaseWithOwnTablesBase::getTablesWithDictionaryTabl
|
||||
while (dictionaries_it && dictionaries_it->isValid())
|
||||
{
|
||||
auto table_name = dictionaries_it->name();
|
||||
result.emplace(table_name, getDictionaryStorage(context, table_name, getDatabaseName()));
|
||||
auto table_ptr = getDictionaryStorage(context, table_name, getDatabaseName());
|
||||
if (table_ptr)
|
||||
result.emplace(table_name, table_ptr);
|
||||
dictionaries_it->next();
|
||||
}
|
||||
|
||||
|
@ -6,3 +6,11 @@
|
||||
300
|
||||
300
|
||||
300
|
||||
dict1
|
||||
dict2
|
||||
dict3
|
||||
table_for_dict
|
||||
dict1
|
||||
dict2
|
||||
dict3
|
||||
dict4
|
||||
|
@ -65,7 +65,6 @@ SOURCE(CLICKHOUSE(HOST 'localhost' PORT 9000 USER 'default' TABLE 'dict2' DB 'da
|
||||
LIFETIME(MIN 1 MAX 10)
|
||||
LAYOUT(HASHED());
|
||||
|
||||
|
||||
SELECT count(*) FROM database_for_dict.dict3;
|
||||
|
||||
INSERT INTO database_for_dict.table_for_dict SELECT number, number % 17, toString(number * number), number / 2.0 from numbers(200, 100);
|
||||
@ -91,6 +90,9 @@ LAYOUT(HASHED());
|
||||
|
||||
SELECT count(*) FROM database_for_dict.dict4; -- {serverError 60}
|
||||
|
||||
SELECT name from system.tables WHERE database = 'database_for_dict' ORDER BY name;
|
||||
SELECT name from system.dictionaries WHERE database = 'database_for_dict' ORDER BY name;
|
||||
|
||||
DROP DATABASE IF EXISTS database_for_dict;
|
||||
|
||||
SELECT count(*) from database_for_dict.dict3; --{serverError 81}
|
||||
|
Loading…
Reference in New Issue
Block a user