Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions libraries/classes/Export.php
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,11 @@ public function exportDatabase(
$tableObj = new Table($table, $db);
$nonGeneratedCols = $tableObj->getNonGeneratedColumns(true);

// Skip tables that cannot be read
if ($nonGeneratedCols === []) {
continue;
}

$localQuery = 'SELECT ' . implode(', ', $nonGeneratedCols)
. ' FROM ' . Util::backquote($db)
. '.' . Util::backquote($table);
Expand Down Expand Up @@ -1110,6 +1115,11 @@ public function exportTable(
$tableObj = new Table($table, $db);
$nonGeneratedCols = $tableObj->getNonGeneratedColumns(true);

// Skip tables that cannot be read
if ($nonGeneratedCols === []) {
return;
}

Comment on lines 844 to +1122
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a warning to the front end ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those lines aren't related to export, just copy. Should I remove them?

Also, not sure how to add one, I tried, but I still get an error:

Internal error in .\libraries\classes\Plugins\Export\ExportSql.php#1543
ErrorException: Error reading structure for table test21.1: #1707 - Table rebuild required. Please do "ALTER TABLE `test21.1` FORCE" or dump/reload to fix it!

$localQuery = 'SELECT ' . implode(', ', $nonGeneratedCols)
. ' FROM ' . Util::backquote($db)
. '.' . Util::backquote($table) . $addQuery;
Expand Down
Loading