diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-08-29 19:32:55 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-08-29 19:32:55 +0000 |
commit | 75fad91cf544e9b6598fa30574290d6a6e73f033 (patch) | |
tree | 39b033a0c93e9bb59f9fee6cfa112d087e0bb557 /includes/database.mysql.inc | |
parent | 8ae8865abca6f118808ec56223f6741b8444bbe5 (diff) | |
download | brdo-75fad91cf544e9b6598fa30574290d6a6e73f033.tar.gz brdo-75fad91cf544e9b6598fa30574290d6a6e73f033.tar.bz2 |
- Patch #22911 by Cvgbe: fixed table locking in PostgreSQL. You'll have to
use db_lock_table() and db_unlock_tables() for your code to be compatible.
Diffstat (limited to 'includes/database.mysql.inc')
-rw-r--r-- | includes/database.mysql.inc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/includes/database.mysql.inc b/includes/database.mysql.inc index f13636b90..2f771d9e6 100644 --- a/includes/database.mysql.inc +++ b/includes/database.mysql.inc @@ -270,6 +270,21 @@ function db_escape_string($text) { } /** + * Lock a table. + */ +function db_lock_table($table) { + db_query('LOCK TABLES {%s} WRITE', $table); +} + +/** + * Unlock all locked tables. + */ +function db_unlock_tables() { + db_query('UNLOCK TABLES'); +} + + +/** * @} End of "ingroup database". */ |