phpmyadmin / phpmyadmin/phpmyadmin
phpMyAdmin hangs on LOCK TABLES statement with MySQL 5.7
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
Cannot execute standard MySQL 5.7 database dump script in PMA because of it contains LOCK/UNLOCK TABLES statements.
To Reproduce
- Use PMA 4.8.5. Login to MySQL 5.7 server and create/choose a clean database.
- Go to SQL tab and copy SQL script from attachment:
sql.txt - Click Go.
- See that:
A. PMA hangs.
B. MySQL server eats about 50% CPU.
C. If you try close PMA and open again it hangs.
D. Restart of MySQL server can help you only.
Expected behavior
User can execute SQL scripts with LOCK/UNLOCK TABLES statements on MySQL 5.7 and any other version.
Screenshots
Server configuration
- Operating system:
OS Name: Microsoft Windows Server 2016 Datacenter
OS Version: 10.0.14393 N/A Build 14393
or
OS Name: Microsoft Windows Server 2008 R2 Enterprise
OS Version: 6.1.7601 Service Pack 1 Build 7601
- Web server:
Microsoft-IIS/10.0 or Microsoft-IIS/7.5
- Database version:
5.7.25 - MySQL Community Server
- PHP version:
7.1.14 or 7.3.3
- phpMyAdmin version:
4.8.5 or 4.8.4
Client configuration
- Browser:
IE 11 or Firefox 66
- Operating system:
OS Name: Microsoft Windows Server 2016 Datacenter
OS Version: 10.0.14393 N/A Build 14393
or
OS Name: Microsoft Windows Server 2008 R2 Enterprise
OS Version: 6.1.7601 Service Pack 1 Build 7601
Additional context
my.ini settings:
[MySQLD]
port=3306
basedir=...
datadir=...
character-set-server=latin1
default-storage-engine=INNODB
read_buffer_size=1M
read_rnd_buffer_size=256K
sort_buffer_size=256K
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=1M
innodb_buffer_pool_size=16M
innodb_log_file_size=10M
innodb_thread_concurrency=8
max_connections=151
old_passwords=0
max_user_connections=30
thread_cache_size=4
thread_stack=196608
binlog_cache_size=32768
net_read_timeout=30
net_retry_count=10
net_write_timeout=30
open_files_limit=4161
table_definition_cache=400
[client]
port=3306
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 attached sql.txt through the SQL tab against MySQL 5.7, including the LOCK/UNLOCK TABLES statements. Trace the SQL execution path involved in the hang and verify that the script completes without PMA or MySQL becoming unresponsive.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, php
- Domain
- database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100