mirror of
https://github.com/vrana/adminer.git
synced 2026-01-10 09:33:06 +01:00
ClickHouse: Fix offset (bug #1188)
Previously, the driver used `LIMIT <limit>, <offset>` syntax, causing incorrect pagination behavior (page 2 repeating results from page 1, etc.). Updated the `limit()` function to use ClickHouse-compatible `LIMIT <count> OFFSET <offset>` syntax, ensuring correct row offsets across pages.
This commit is contained in:
committed by
Jakub Vrana
parent
c7ede7331e
commit
4d0e79234c
@@ -1,5 +1,6 @@
|
||||
## Adminer dev
|
||||
- PostgreSQL: Mark unique partial indexes as unique (bug #1172)
|
||||
- ClickHouse: Fix offset (bug #1188)
|
||||
- Plugins: Methods showVariables() and showStatus() (bug #1157)
|
||||
|
||||
## Adminer 5.4.1 (released 2025-09-26)
|
||||
|
||||
@@ -243,7 +243,7 @@ if (isset($_GET["clickhouse"])) {
|
||||
}
|
||||
|
||||
function limit($query, $where, $limit, $offset = 0, $separator = " ") {
|
||||
return " $query$where" . ($limit ? $separator . "LIMIT $limit" . ($offset ? ", $offset" : "") : "");
|
||||
return " $query$where" . ($limit ? $separator . "LIMIT " . ($offset ? "$offset, " : "") . $limit : "");
|
||||
}
|
||||
|
||||
function limit1($table, $query, $where, $separator = "\n") {
|
||||
|
||||
Reference in New Issue
Block a user