diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-08-25 21:11:52 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-08-25 21:11:52 +0000 |
commit | afeff189b8a60bc775a4557e5bda003d8b54dc76 (patch) | |
tree | 0c2837de25e2729cee2f43f43b35f7adcfe27a6a /includes | |
parent | 347ac3b08fbb2938f7b10fa3d20670b931a51891 (diff) | |
download | brdo-afeff189b8a60bc775a4557e5bda003d8b54dc76.tar.gz brdo-afeff189b8a60bc775a4557e5bda003d8b54dc76.tar.bz2 |
- Bug #22911: PostgreSQL doesn't like "LOCK TABLES", but does like "LOCK TABLE". MySQL likes both.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/bootstrap.inc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 5e51e4fc8..56bd7aef0 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -232,10 +232,10 @@ function variable_get($name, $default) { function variable_set($name, $value) { global $conf; - db_query('LOCK TABLES {variable} WRITE'); + db_query('LOCK TABLE {variable} WRITE'); db_query("DELETE FROM {variable} WHERE name = '%s'", $name); db_query("INSERT INTO {variable} (name, value) VALUES ('%s', '%s')", $name, serialize($value)); - db_query('UNLOCK TABLES'); + db_query('UNLOCK TABLE'); cache_clear_all('variables'); @@ -321,12 +321,12 @@ function cache_get($key) { function cache_set($cid, $data, $expire = CACHE_PERMANENT, $headers = NULL) { $data = db_encode_blob($data); - db_query('LOCK TABLES {cache} WRITE'); + db_query('LOCK TABLE {cache} WRITE'); db_query("UPDATE {cache} SET data = '%s', created = %d, expire = %d, headers = '%s' WHERE cid = '%s'", $data, time(), $expire, $headers, $cid); if (!db_affected_rows()) { @db_query("INSERT INTO {cache} (cid, data, created, expire, headers) VALUES ('%s', '%s', %d, %d, '%s')", $cid, $data, time(), $expire, $headers); } - db_query('UNLOCK TABLES'); + db_query('UNLOCK TABLE'); } /** |