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'],