phpmyadmin / phpmyadmin/phpmyadmin

Error while exporting a database with tables that cannot be read

Aperta
#18,028 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

affects/5.2 affects/6.0 Bug confirmed/5.2 confirmed/6.0
Lingua principale
PHP
Stelle
7.9k
Fork
3.6k
Merge medio
4g 18h
PR unite (30g)
36

Descrizione

Describe the bug

If a table is created with a different version of MySQL, and if it says that it's in use, the database isn't exported successfully. Both 5.2.1-dev and 5.3.0-dev are affected.

To Reproduce

Steps to reproduce the behavior:

  1. Have a table that cannot be read (in use).
  2. Export database
  3. See error
Expected behavior

The database should be exported successfully, except the table that cannot be read.

Screenshots

bug1

Server configuration
  • Operating system: Windows 10
  • Web server: nginx/1.23.3
  • Database version: 5.7.40 - MySQL Community Server (GPL)
  • PHP version: 8.2.1
  • phpMyAdmin version: 5.2.1-dev, 5.3.0-dev
Additional context

5.2.1-dev

CREATE TABLE `tbl_test` (
  `id` int(10) UNSIGNED NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
<div class="alert alert-danger" role="alert"><strong>Internal error</strong> in .\libraries\classes\Plugins\Export\ExportSql.php#1532<br>
<img src="themes/dot.gif" title="" alt="" class="icon ic_s_error"> ErrorException: Error reading structure for table db_test.tbl_test1: #1033 - Table &amp;#039;.\db_test\tbl_test1.frm&amp;#039; was created with a different version of MySQL and cannot be read<br>
<br>
<strong>Backtrace</strong><br>
<br>
</div></body></html>

5.3.0-dev

CREATE TABLE `tbl_test` (
  `id` int(10) UNSIGNED NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
<div class="alert alert-danger" role="alert"><p><strong>Internal error</strong> in .\libraries\classes\Plugins\Export\ExportSql.php#1417</p><img src="themes/dot.gif" title="" alt="" class="icon ic_s_error"> ErrorException: Error reading structure for table db_test.tbl_test1: #1033 - Table &amp;#039;.\db_test\tbl_test1.frm&amp;#039; was created with a different version of MySQL and cannot be read<p class="mt-3"><strong>Backtrace</strong></p><ol class="list-group"></ol></div>
</body></html>

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia da libraries/classes/Plugins/Export/ExportSql.php, in particolare nei percorsi di esportazione intorno alle righe segnalate, e riproduci il problema con una tabella che non può essere letta. Traccia la gestione dell’errore relativo alla tabella non leggibile durante l’esportazione del database; il lavoro è completato quando l’esportazione termina escludendo quella tabella, senza produrre l’errore interno mostrato nel report.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
mysql, php
Ambito
databases
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.