1 backup.database.inc | protected BackupDatabase::getLockedTables() |
Get a list of tables to be locked during the backup.
Return value
array: The list of tables to be locked, if any.
File
- core/
includes/ backup/ backup.database.inc, line 410 - Functions to handle the direct to/from database backup source.
Class
- BackupDatabase
- A destination type for saving to a database server.
Code
protected function getLockedTables() {
$tables = array();
if ($this->settings['lock_tables']) {
foreach ($this->getTableNames() as $table) {
// There's no need to lock excluded tables because it doesn't matter if
// they are updated during the backup. If the "include_tables" option is
// used, it takes precedence.
if ($this->settings['include_tables'] && in_array($table, $this->settings['include_tables'])) {
$tables[] = $table;
}
elseif (!in_array($table, $this->settings['exclude_tables'])) {
$tables[] = $table;
}
}
}
return $tables;
}