Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pagination doesn't work as expected for identical table names in different databases #17062

Closed
liviuconcioiu opened this issue Aug 7, 2021 · 0 comments · Fixed by #17070
Closed
Assignees
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
Milestone

Comments

@liviuconcioiu
Copy link
Contributor

Describe the bug

Pagination doesn't work as expected for identical table names in different databases. Count is greater than rows in table.
I have attached the SQL files for both databases.

To Reproduce

Steps to reproduce the behavior:

  1. Create two databases db_test_1 and db_test_2 (database names don't matter)
  2. Create a table name db_test_1.tbl_test and insert 3 rows
  3. Copy the table with structure and data in the second database
  4. Insert 100-200 rows in db_test_2.tbl_test
  5. Open db_test_1.tbl_test in a browser tab
  6. Open db_test_2.tbl_test in another browser tab
  7. Navigate to a page greater than 1 in db_test_2.tbl_test
  8. Click on table name at the top in db_test_1.tbl_test
  9. See error - Showing rows 75 - 74 (75 total, Query took 0.0004 seconds.) even though the first table has 3 rows, and pagination is messed.

Expected behavior

An accurate count should be done when clicking on table name at the top.

Screenshots

First table

tbl1

Second table

tbl2

Server configuration

  • Operating system: Windows
  • Web server: nginx/1.21.1
  • Database version: 5.7.35 - MySQL Community Server (GPL)
  • PHP version: 8.0.9
  • phpMyAdmin version: RELEASE_5_1_1-1242-g3c2d727139

Client configuration

  • Browser: Firefox
  • Operating system: Windows

Additional context

tables.zip

@williamdes williamdes added the Bug A problem or regression with an existing feature label Aug 8, 2021
@williamdes williamdes added this to Needs triage in issues via automation Aug 8, 2021
lrb2 added a commit to lrb2/phpmyadmin-phpmyadmin that referenced this issue Aug 11, 2021
Use server and database in addition to query when generating hash

Signed-off-by: Lukas Bixen <lrb2_@outlook.com>
@williamdes williamdes added this to the 5.1.3 milestone Aug 15, 2021
@williamdes williamdes self-assigned this Aug 21, 2021
@williamdes williamdes modified the milestones: 5.1.3, 5.1.2 Aug 21, 2021
@williamdes williamdes added the has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete label Aug 21, 2021
williamdes added a commit that referenced this issue Aug 22, 2021
…ically named tables in separate databases

Pull-request: #17070
Fixes: #17062

Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Aug 22, 2021
Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from Needs triage to Closed Aug 22, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
issues
  
Closed
2 participants