mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 09:32:01 +00:00
Merge pull request #55962 from Algunenano/show_databases_limit
Fix `SHOW DATABASES LIMIT <N>`
This commit is contained in:
commit
bee9eb5df4
@ -473,7 +473,7 @@ Shows all [users](../../guides/sre/user-management/index.md#user-account-managem
|
||||
``` sql
|
||||
SHOW ACCESS
|
||||
```
|
||||
## SHOW CLUSTER(s)
|
||||
## SHOW CLUSTER(S)
|
||||
|
||||
Returns a list of clusters. All available clusters are listed in the [system.clusters](../../operations/system-tables/clusters.md) table.
|
||||
|
||||
|
@ -48,12 +48,12 @@ String InterpreterShowTablesQuery::getRewrittenQuery()
|
||||
<< DB::quote << query.like;
|
||||
}
|
||||
|
||||
if (query.limit_length)
|
||||
rewritten_query << " LIMIT " << query.limit_length;
|
||||
|
||||
/// (*)
|
||||
rewritten_query << " ORDER BY name";
|
||||
|
||||
if (query.limit_length)
|
||||
rewritten_query << " LIMIT " << query.limit_length;
|
||||
|
||||
return rewritten_query.str();
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@ String InterpreterShowTablesQuery::getRewrittenQuery()
|
||||
else if (query.where_expression)
|
||||
rewritten_query << " AND (" << query.where_expression << ")";
|
||||
|
||||
/// (*)
|
||||
/// (*)
|
||||
rewritten_query << " ORDER BY name ";
|
||||
|
||||
if (query.limit_length)
|
||||
|
1
tests/queries/0_stateless/02902_show_databases_limit.sql
Normal file
1
tests/queries/0_stateless/02902_show_databases_limit.sql
Normal file
@ -0,0 +1 @@
|
||||
SHOW DATABASES LIMIT 0;
|
Loading…
Reference in New Issue
Block a user