protected function MySQLiSource::_lockTables in Backup and Migrate 5.0.x
Lock the list of given tables in the database.
File
- src/
Core/ Source/ MySQLiSource.php, line 297
Class
- MySQLiSource
- @package Drupal\backup_migrate\Core\Source
Namespace
Drupal\backup_migrate\Core\SourceCode
protected function _lockTables($tables) {
if ($tables) {
$tables_escaped = [];
foreach ($tables as $table) {
$tables_escaped[] = '`' . $table . '` WRITE';
}
$this
->query('LOCK TABLES ' . implode(', ', $tables_escaped));
}
}