Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix system.parts for non-Atomic/Ordinary database engine (i.e. Memory) #60689

Merged
merged 1 commit into from Mar 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Storages/System/StorageSystemPartsBase.cpp
Expand Up @@ -138,7 +138,7 @@ StoragesInfoStream::StoragesInfoStream(const SelectQueryInfo & query_info, Conte

String engine_name = storage->getName();
UUID storage_uuid = storage->getStorageID().uuid;
if (database->getEngineName() == "Ordinary")
if (storage_uuid == UUIDHelpers::Nil)
{
SipHash hash;
hash.update(database_name);
Expand Down
@@ -1 +1,2 @@
test all_1_1_0 1
test2 all_1_1_0 1
Expand Up @@ -5,4 +5,12 @@ CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CUR_DIR"/../shell_config.sh

$CLICKHOUSE_LOCAL --multiquery "CREATE TABLE test (x UInt8) ENGINE = MergeTree ORDER BY (); INSERT INTO test SELECT 1; SELECT table, name, rows FROM system.parts WHERE database = currentDatabase();"
$CLICKHOUSE_LOCAL --multiquery "
CREATE TABLE test (x UInt8) ENGINE = MergeTree ORDER BY ();
INSERT INTO test SELECT 1;

CREATE TABLE test2 (x UInt8) ENGINE = MergeTree ORDER BY ();
INSERT INTO test2 SELECT 1;

SELECT table, name, rows FROM system.parts WHERE database = currentDatabase();
"