Closed
Description
Describe the bug
InnoDB supports the syntax SELECT ... FOR UPDATE to allow row level locking. When run in PMA this statement causes an SQL error as the LIMIT clause appears to be injected into the wrong place within it.
To Reproduce
Steps to reproduce the behavior:
- Go to for 5.1 demo server https://www.phpmyadmin.net/try/ and use MariaDB
- Run
SELECT * FROM information_schema.CHARACTER_SETS FOR UPDATE;
- See error
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'LIMIT 0, 25' at line 1
Expected behavior
The statement should run correctly.
Screenshots
Server configuration
- Database version: 10.4.8-MariaDB-1:10.4.8+maria~stretch-log - mariadb.org binary distribution
- PHP version: 7.4.25
- phpMyAdmin version: 5.1.2-dev
Additional context
If the LIMIT clause is manually entered, it does run with no error SELECT * FROM information_schema.CHARACTER_SETS LIMIT 1 FOR UPDATE;
There are other combinations, like FOR SHARE
and SKIP LOCKED
which probably exhibit the same issues.