Index: bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.60
diff -u -F^function -r1.60 bootstrap.inc
--- bootstrap.inc	5 Aug 2005 00:49:02 -0000	1.60
+++ bootstrap.inc	5 Aug 2005 15:35:14 -0000
@@ -233,10 +233,11 @@ function variable_get($name, $default) {
 function variable_set($name, $value) {
   global $conf;
 
-  db_query('LOCK TABLES {variable} WRITE');
+  db_query('BEGIN');
+  db_query('LOCK TABLE {variable}');
   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('COMMIT');
 
   cache_clear_all('variables');
 
@@ -320,12 +321,13 @@ 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('BEGIN');
+  db_query('LOCK TABLE {cache}');
   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('COMMIT');
 }
 
 /**
