function backup_migrate_source_db_mysql::_lock_tables in Backup and Migrate 8.3
Same name and namespace in other branches
- 6.3 includes/sources.db.mysql.inc \backup_migrate_source_db_mysql::_lock_tables()
- 7.3 includes/sources.db.mysql.inc \backup_migrate_source_db_mysql::_lock_tables()
Lock the list of given tables in the database.
Overrides backup_migrate_source_db::_lock_tables
File
- includes/
sources.db.mysql.inc, line 262 - Functions to handle the direct to database source.
Class
- backup_migrate_source_db_mysql
- A source type for backing up from database server.
Code
function _lock_tables($tables) {
if ($tables) {
$tables_escaped = array();
foreach ($tables as $table) {
$tables_escaped[] = '`' . db_escape_table($table) . '` WRITE';
}
$this
->query('LOCK TABLES ' . implode(', ', $tables_escaped));
}
}