phpmyadmin / phpmyadmin/phpmyadmin
[Bug]: Pagination count is not accurate
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 7.9k
- Forks
- 3.6k
- Avg merge
- 4d 18h
- Merged PRs (30d)
- 36
Description
Describe the bug
Pagination count is not accurate when using WHERE and also when there are hundreds of thousands of rows.
It adds 1 more page than it should.
How to Reproduce
CREATE TABLE `test` (
`id` int(10) unsigned NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=FIXED;
INSERT INTO `test` (`id`) SELECT `seq` FROM seq_1_to_982289;
SELECT * FROM `test` WHERE `id` >= 82290;
- Go to last page
Expected behavior
Exact pagination count.
Screenshots
https://github.com/user-attachments/assets/c2dc1eab-7858-4564-b7e3-4326815f5dd0
Database Server
MariaDB
phpMyAdmin version
5.2.4-dev, 6.0.0-dev
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue from the linked phpMyAdmin database structure page with the provided MariaDB SQL, especially the SELECT using WHERE on the large test table. Trace how pagination calculates the count and verify that the last page shows the exact number of matching rows without an extra page.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mariadb, php
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100