db_lock_table

Versions
4.7 – 6
db_lock_table($table)

Lock a table. This function automatically starts a transaction.

Related topics

▾ 3 functions call db_lock_table()

cache_set in includes/cache.inc
Store data in the persistent cache.
variable_set in includes/bootstrap.inc
Set a persistent variable.
_block_rehash in modules/block/block.module
Update the 'blocks' DB table with the blocks currently exported by modules.

Code

includes/database.pgsql.inc, line 378

<?php
function db_lock_table($table) {
  db_query('BEGIN; LOCK TABLE {'. db_escape_table($table) .'} IN EXCLUSIVE MODE');
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.