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
"SHOW FULL TABLES FROM xxx" results always in error #14811
Comments
|
I now added the following in the tryQuery(): The first entry [0] did not have enough privileges on the database (user pma -- set up in the config under 'controluser'). This pma user has ALL rights on the phpmyadmin database, but nothing else. |
|
I also encountered this problem. And happened when I click specific Database in left NodeTree. |
In class DatabaseInterface, the const CONNECT_USER is defined as 256 which is in the _links array. |
|
@Nitromethane : This is indeed defined, and is present in the _links array. The problem however comes from the fact that in Util::getTablesWhenOpen the query is ran with "NULL" (as you can see above). As such, it isn't looking for 256 or 257. NULL is translated in 0 or "" in PHP arrays... Which entry isn't present in the _links array. |
|
@svaningelgem Thanks a lot, I have reproduce this bug. Describe the bugClick DB name in left node tree. It will open the error dialog occasionally To ReproduceSteps to reproduce the behavior:
ScreenshotsServer configuration
Additional contextWe can fix this problem by editting the getTablesWhenOpen function. TO: |
|
Thanks for tracking this issue down @Nitromethane :-). |
|
@Nitromethane are you working on PR for this? |
|
@svaningelgem I can not reproduce this issue, can you please help me ? |
|
@williamdes : I think it's better to ask @Nitromethane (see previous comment: #14811 (comment)) He had a very good description of the bug. My tables are quite often "in use" because of all the different processes running on the server, so it's very feasible what (s)he said. |
|
Thank you for the response @svaningelgem |
|
@williamdes : I thought about reproducing this on the demo version available, but it's just not possible. As @Nitromethane stated, you need to "lock tables table write" in order to make it work. But the locking session immediately ends on the web interface (as the script stops & all locks are cleared at the end of the session). So I tried his steps:
This is reproducible from my side on phpMyAdmin 4.8.5, MySQL server 5.6.43, MySQL Client version: mysqlnd 5.0.12-dev & PHP 7.2.16. |
|
Reproduced successfully when using |
Signed-off-by: William Desportes <williamdes@wdes.fr>
|
Thanks for the fix 👍 |

Describe the bug
When clicking on "structure" I always get the error window saying there is an SQL query error.
It sometimes appeared, so I think it might be related to my session or so?
Additional context
I was so fed up by it that I started to investigate this issue. But I don't see why it wouldn't be working for anyone else.
In Util.php@4483, there is this line:
And this is the $this-object in the tryQuery() function:
Now you see in the _links array, there is no 0, or "" entry. As such entering this function with a null will ALWAYS result in an error. Because of this line in tryQuery:
But sometimes it works, I think this _links[0] is disappearing somewhere. But not all the time.
Very strange and hard to find issue to me.
The text was updated successfully, but these errors were encountered: