diff --git a/src/Export/Export.php b/src/Export/Export.php index 134c8eabe0..3cc685fc4b 100644 --- a/src/Export/Export.php +++ b/src/Export/Export.php @@ -337,6 +337,11 @@ class Export $tableObj = new Table($table, $db->getName(), $this->dbi); $nonGeneratedCols = $tableObj->getNonGeneratedColumns(); + // Skip tables that cannot be read + if ($nonGeneratedCols === []) { + continue; + } + $localQuery = 'SELECT ' . implode(', ', $nonGeneratedCols) . ' FROM ' . Util::backquote($db->getName()) . '.' . Util::backquote($table); @@ -468,6 +473,11 @@ class Export $tableObj = new Table($table, $db, $this->dbi); $nonGeneratedCols = $tableObj->getNonGeneratedColumns(); + // Skip tables that cannot be read + if ($nonGeneratedCols === []) { + return; + } + $localQuery = 'SELECT ' . implode(', ', $nonGeneratedCols) . ' FROM ' . Util::backquote($db) . '.' . Util::backquote($table) . $addQuery;