phpmyadmin / phpmyadmin/phpmyadmin
LOCK/UNLOCK commands in imported sql dumps files generate warnings
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 7.9k
- Forks
- 3.6k
- Avg merge
- 4d 18h
- Merged PRs (30d)
- 36
Description
Use mysqldump command in Terminal to dump a database. Open the file in editor. Before and after any INSERT INTO command there are LOCK TABLES/UNLOCK TABLES commands.
-
Import the file into the database in Terminal using command
mysql -u <user> -p <db_name> < <sql_dump>. In my case the file was imported without any errors. Please note if there are any foreign keys you must use SET FOREIGN_KEY_CHECKS at the beginning/end of the file. -
Import the same file in phpMyAdmin interface. The result shows a lot of warnings with the following content Note: #1031 Storage engine InnoDB of the table
database_test.<table_name>doesn't have this option.
Initially I thought it was an issue related to innodb_strict_mode variable but it wasn't. Deleting all LOCK TABLES/UNLOCK TABLES lines from the file phpMyAdmin was able to import it without any warnings. It seems phpMyAdmin doesn't like them.
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
Reproduce the issue by importing a mysqldump containing LOCK TABLES and UNLOCK TABLES through phpMyAdmin, then compare it with the successful Terminal import. Trace phpMyAdmin's SQL import handling for these commands and verify that the dump imports without the reported InnoDB option warnings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, php
- Domain
- database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100