From 240c8fc5e740da1f80d8fb517855a853cf69bae6 Mon Sep 17 00:00:00 2001 From: Marcus <47229647+Marcus-Nightingale@users.noreply.github.com> Date: Wed, 24 Sep 2025 10:16:02 +0100 Subject: [PATCH] ClickHouse: Fix list of tables (bug #1176) --- CHANGELOG.md | 4 +--- plugins/drivers/clickhouse.php | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17d286fc..5ed25715 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,7 @@ ## Adminer dev -- Autocomplete: fix in empty textarea (bug #1173) -- Prolong printed SQL query to 10000 characters (bug #1186) -- MySQL: Use information_schema to get routine definition (bug #1179) - PostgreSQL: Mark unique partial indexes as unique (bug #1172) - ClickHouse: Fix offset (bug #1188) +- ClickHouse: Fix list of tables (bug #1176) - Plugins: Methods showVariables() and showStatus() (bug #1157) ## Adminer 5.4.1 (released 2025-09-26) diff --git a/plugins/drivers/clickhouse.php b/plugins/drivers/clickhouse.php index 7cbd6a57..59e4d047 100644 --- a/plugins/drivers/clickhouse.php +++ b/plugins/drivers/clickhouse.php @@ -274,7 +274,7 @@ if (isset($_GET["clickhouse"])) { function table_status($name = "", $fast = false) { $return = array(); - $tables = get_rows("SELECT name, engine FROM system.tables WHERE database = " . q(connection()->_db)); + $tables = get_rows("SELECT name, engine FROM system.tables WHERE database = " . q(connection()->_db) . ($name != "" ? " AND name = " . q($name) : "")); foreach ($tables as $table) { $return[$table['name']] = array( 'Name' => $table['name'],