phpmyadmin / phpmyadmin/phpmyadmin

LOCK/UNLOCK commands in imported sql dumps files generate warnings

Open
#16,270 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug
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.

  1. 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.

  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.