Index: modules/user/user.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.install,v
retrieving revision 1.31
diff -u -r1.31 user.install
--- modules/user/user.install	18 Oct 2009 06:56:24 -0000	1.31
+++ modules/user/user.install	10 Nov 2009 05:34:35 -0000
@@ -360,7 +360,7 @@
       else {
         $sandbox['user_not_migrated']++;
         db_update('users')
-          ->fields(array('timezone', NULL))
+          ->fields(array('timezone' => NULL))
           ->condition('uid', $account->uid)
           ->execute();
       }
@@ -427,13 +427,13 @@
     // Initialize batch update information.
     $sandbox['progress'] = 0;
     $sandbox['last_user_processed'] = -1;
-    $sandbox['max'] = db_query("SELECT COUNT(*) FROM {user} WHERE picture <> ''")->fetchField();
+    $sandbox['max'] = db_query("SELECT COUNT(*) FROM {users} WHERE picture <> ''")->fetchField();
   }
 
   // As a batch operation move the photos into the {file} table and update the
   // {users} records.
   $limit = 500;
-  $result = db_query_range("SELECT uid, picture FROM {user} WHERE picture <> '' AND uid > :uid ORDER BY uid", 0, $limit, array(':uid' => $sandbox['last_user_processed']));
+  $result = db_query_range("SELECT uid, picture FROM {users} WHERE picture <> '' AND uid > :uid ORDER BY uid", 0, $limit, array(':uid' => $sandbox['last_user_processed']));
   foreach ($result as $user) {
     // Don't bother adding files that don't exist.
     if (!file_exists($user->picture)) {
@@ -473,8 +473,8 @@
   // When we're finished, drop the old picture field and rename the new one to
   // replace it.
   if (isset($sandbox['#finished']) && $sandbox['#finished'] == 1) {
-    db_drop_field('user', 'picture');
-    db_change_field('user', 'picture_fid', 'picture', $picture_field);
+    db_drop_field('users', 'picture');
+    db_change_field('users', 'picture_fid', 'picture', $picture_field);
   }
 }
 
Index: modules/block/block.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.install,v
retrieving revision 1.34
diff -u -r1.34 block.install
--- modules/block/block.install	16 Oct 2009 19:06:22 -0000	1.34
+++ modules/block/block.install	10 Nov 2009 05:34:33 -0000
@@ -207,7 +207,6 @@
  * Implement hook_install().
  */
 function block_install() {
-
   // Block should go first so that other modules can alter its output
   // during hook_page_alter(). Almost everything on the page is a block,
   // so before block module runs, there will not be much to alter.
@@ -226,7 +225,7 @@
  */
 function block_update_7000() {
   db_update('system')
-    ->fields(array('weight', '-5'))
+    ->fields(array('weight' => -5))
     ->condition('name', 'block')
     ->execute();
 }
Index: update.php
===================================================================
RCS file: /cvs/drupal/drupal/update.php,v
retrieving revision 1.310
diff -u -r1.310 update.php
--- update.php	4 Nov 2009 05:39:14 -0000	1.310
+++ update.php	10 Nov 2009 05:34:32 -0000
@@ -396,6 +396,9 @@
 if (isset($output) && $output) {
   // Explictly start a session so that the update.php token will be accepted.
   drupal_session_start();
+  // Force the session to stay open for 15 minutes.
+  drupal_session_keep(300);
+
   // We defer the display of messages until all updates are done.
   $progress_page = ($batch = batch_get()) && isset($batch['running']);
   print theme('update_page', array('content' => $output, 'show_messages' => !$progress_page));
Index: modules/node/node.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.install,v
retrieving revision 1.34
diff -u -r1.34 node.install
--- modules/node/node.install	16 Oct 2009 19:06:23 -0000	1.34
+++ modules/node/node.install	10 Nov 2009 05:34:33 -0000
@@ -369,6 +369,9 @@
     ->fields(array('module' => 'node_content'))
     ->condition('module', 'node')
     ->execute();
+
+  // Rename the module column to base.
+  db_change_field('node_type', 'module', 'base', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE));
 }
 
 /**
@@ -461,6 +464,12 @@
   else {
     // Subsequent invocations.
 
+    // Save the field IDs for field_sql_storage_field_storage_write().
+    $title_field = field_info_field('title');
+    $title_field_id = $title_field['id'];
+    $body_field = field_info_field('body');
+    $body_field_id = $body_field['id'];
+
     $found = FALSE;
     if ($context['total']) {
       // Operate on every revision of every node (whee!), in batches.
@@ -507,7 +516,7 @@
           $node->body[FIELD_LANGUAGE_NONE][0]['format'] = !empty($revision->format) ? $revision->format : variable_get('filter_default_format', 1);
           // This is a core update and no contrib modules are enabled yet, so
           // we can assume default field storage for a faster update.
-          field_sql_storage_field_storage_write('node', $node, FIELD_STORAGE_INSERT, array());
+          field_sql_storage_field_storage_write('node', $node, FIELD_STORAGE_INSERT, array($title_field_id, $body_field_id));
         }
 
         // Migrate the status columns to the {node_revision} table.
Index: modules/upload/upload.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/upload/upload.install,v
retrieving revision 1.16
diff -u -r1.16 upload.install
--- modules/upload/upload.install	16 Oct 2009 19:06:25 -0000	1.16
+++ modules/upload/upload.install	10 Nov 2009 05:34:34 -0000
@@ -98,7 +98,7 @@
 
   // As a batch operation move records from {files} into the {file} table.
   $limit = 500;
-  $result = db_query_range("SELECT DISTINCT u.fid FROM {upload} u ORDER BY u.vid", array(), 0, $limit);
+  $result = db_query_range("SELECT DISTINCT u.fid FROM {upload} u ORDER BY u.vid", 0, $limit, array());
   foreach ($result as $record) {
     $old_file = db_query('SELECT f.* FROM {files} f WHERE f.fid = :fid', array(':fid' => $record->fid))->fetch(PDO::FETCH_OBJ);
     if (!$old_file) {
Index: modules/system/system.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.install,v
retrieving revision 1.419
diff -u -r1.419 system.install
--- modules/system/system.install	9 Nov 2009 18:34:26 -0000	1.419
+++ modules/system/system.install	10 Nov 2009 05:34:34 -0000
@@ -1941,43 +1941,7 @@
  * longer needed.
  */
 function system_update_7006() {
-  $schema['registry'] = array(
-    'fields' => array(
-      'name'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'type'   => array('type' => 'varchar', 'length' => 9, 'not null' => TRUE, 'default' => ''),
-      'filename'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'module'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'weight'   => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-    ),
-    'primary key' => array('name', 'type'),
-    'indexes' => array(
-      'hook' => array('type', 'weight', 'module'),
-    ),
-  );
-  $schema['registry_file'] = array(
-    'fields' => array(
-      'filename'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE),
-      'filectime'  => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'filemtime'  => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-    ),
-    'primary key' => array('filename'),
-  );
-  $schema['cache_registry'] = array(
-    'fields' => array(
-      'cid'        => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
-      'data'       => array('type' => 'blob', 'not null' => FALSE, 'size' => 'big'),
-      'expire'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'created'    => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
-      'headers'    => array('type' => 'text', 'not null' => FALSE),
-      'serialized' => array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0)
-    ),
-    'indexes' => array('expire' => array('expire')),
-    'primary key' => array('cid'),
-  );
-  db_create_table('cache_registry', $schema['cache_registry']);
-  db_create_table('registry', $schema['registry']);
-  db_create_table('registry_file', $schema['registry_file']);
-  registry_rebuild();
+  // Update moved to update_fix_d7_requirements().
 }
 
 /**
@@ -2514,7 +2478,7 @@
  * Add a missing index on the {menu_router} table.
  */
 function system_update_7031() {
-  db_add_index('menu_router', 'tab_root_weight_title', array(array('tab_root', 64), 'weight', 'title'));
+  // Update moved to system_update_6052().
 }
 
 /**
Index: includes/session.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/session.inc,v
retrieving revision 1.73
diff -u -r1.73 session.inc
--- includes/session.inc	4 Nov 2009 05:05:52 -0000	1.73
+++ includes/session.inc	10 Nov 2009 05:34:32 -0000
@@ -242,6 +242,11 @@
     return;
   }
 
+  // Expire the keep if possible.
+  if (isset($_SESSION['drupal_keep']) && ($_SESSION['drupal_keep'] > REQUEST_TIME)) {
+    unset($_SESSION['drupal_keep']);
+  }
+
   if (empty($user->uid) && empty($_SESSION)) {
     // There is no session data to store, destroy the session if it was
     // previously started.
@@ -271,6 +276,25 @@
   return $session_started && session_id();
 }
 
+ /**
+ * Keep the current user's session open for a given length of time.
+ *
+ * @param $duration The length the session needs to remain open, in seconds.
+ */
+function drupal_session_keep($duration) {
+  $new_timestamp = REQUEST_TIME + $duration;
+  if (!isset($_SESSION['drupal_keep']) || ($new_timestamp > $_SESSION['drupal_keep'])) {
+    $_SESSION['drupal_keep'] = $new_timestamp;
+  }
+}
+
+/**
+ * Stop keeping the current user's session open.
+ */
+function drupal_session_keep_reset() {
+  unset($_SESSION['drupal_keep']);
+}
+
 /**
  * Called when an anonymous user becomes authenticated or vice-versa.
  *
Index: includes/update.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/update.inc,v
retrieving revision 1.21
diff -u -r1.21 update.inc
--- includes/update.inc	9 Nov 2009 18:34:26 -0000	1.21
+++ includes/update.inc	10 Nov 2009 05:34:33 -0000
@@ -126,6 +126,7 @@
     // Add the cache_path table.
     $schema['cache_path'] = drupal_get_schema_unprocessed('system', 'cache');
     $schema['cache_path']['description'] = 'Cache table used for path alias lookups.';
+    db_create_table('cache_path', $schema['cache_path']);
 
     // system_update_7042() renames columns, but these are needed to bootstrap.
     // Add empty columns for now.
@@ -198,6 +199,45 @@
     );
     db_create_table('semaphore', $schema['semaphore']);
 
+    // Add registry tables since these are required during an update.
+    $schema['registry'] = array(
+      'fields' => array(
+        'name'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+        'type'   => array('type' => 'varchar', 'length' => 9, 'not null' => TRUE, 'default' => ''),
+        'filename'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+        'module'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+        'weight'   => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      ),
+      'primary key' => array('name', 'type'),
+      'indexes' => array(
+        'hook' => array('type', 'weight', 'module'),
+      ),
+    );
+    $schema['registry_file'] = array(
+      'fields' => array(
+        'filename'   => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE),
+        'filectime'  => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+        'filemtime'  => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+      ),
+      'primary key' => array('filename'),
+    );
+    $schema['cache_registry'] = array(
+      'fields' => array(
+        'cid'        => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+        'data'       => array('type' => 'blob', 'not null' => FALSE, 'size' => 'big'),
+        'expire'     => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+        'created'    => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+        'headers'    => array('type' => 'text', 'not null' => FALSE),
+        'serialized' => array('type' => 'int', 'size' => 'small', 'not null' => TRUE, 'default' => 0)
+      ),
+      'indexes' => array('expire' => array('expire')),
+      'primary key' => array('cid'),
+    );
+    db_create_table('cache_registry', $schema['cache_registry']);
+    db_create_table('registry', $schema['registry']);
+    db_create_table('registry_file', $schema['registry_file']);
+
+    // Create date format tables.
     $schema['date_format_type'] = array(
       'description' => 'Stores configured date format types.',
       'fields' => array(
Index: modules/filter/filter.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.install,v
retrieving revision 1.24
diff -u -r1.24 filter.install
--- modules/filter/filter.install	7 Nov 2009 22:14:58 -0000	1.24
+++ modules/filter/filter.install	10 Nov 2009 05:34:33 -0000
@@ -195,7 +195,7 @@
   foreach ($renamed_deltas as $module => $deltas) {
     foreach ($deltas as $old_delta => $new_delta) {
     	db_update('filter')
-    	  ->fields(array('name', $new_delta))
+    	  ->fields(array('name' => $new_delta))
     	  ->condition('module', $module)
     	  ->condition('name', $old_delta)
     	  ->execute();
@@ -234,7 +234,7 @@
 
   // Enable all existing filters ({filter} contained only enabled previously).
   db_update('filter')
-    ->fields('status', '1')
+    ->fields(array('status' => '1'))
     ->execute();
 
   // Move filter settings from system variables into {filter}.settings.
@@ -262,7 +262,7 @@
       }
     }
     if (!empty($settings)) {
-    	db_upddate('filter')
+    	db_update('filter')
     	  ->fields(array('settings' => serialize($settings)))
     	  ->condition('format', $filter->format)
     	  ->condition('name', $filter->name)
Index: modules/comment/comment.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.install,v
retrieving revision 1.51
diff -u -r1.51 comment.install
--- modules/comment/comment.install	16 Oct 2009 13:20:15 -0000	1.51
+++ modules/comment/comment.install	10 Nov 2009 05:34:33 -0000
@@ -73,7 +73,7 @@
 
   foreach ($changes as $old => $new) {
   db_update('comments')
-    ->fields(array('status', $new))
+    ->fields(array('status' => $new))
     ->condition('status', $old)
     ->execute();
   }
Index: modules/taxonomy/taxonomy.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.install,v
retrieving revision 1.28
diff -u -r1.28 taxonomy.install
--- modules/taxonomy/taxonomy.install	7 Nov 2009 14:18:07 -0000	1.28
+++ modules/taxonomy/taxonomy.install	10 Nov 2009 05:34:34 -0000
@@ -332,8 +332,9 @@
 
     foreach ($vocabulary->nodes as $bundle) {
       $instance = array(
-        'label' => $vocabulary->name,
         'field_name' => $field_name,
+        'object_type' => 'taxonomy_term',
+        'label' => $vocabulary->name,
         'bundle' => $bundle,
         'description' => $vocabulary->help,
         'widget' => array(
