 modules/node/node.install                          |    6 +++---
 modules/simpletest/tests/upgrade/upgrade.node.test |   11 ++++++++++-
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git modules/node/node.install modules/node/node.install
index bd91588..8d90c9f 100644
--- modules/node/node.install
+++ modules/node/node.install
@@ -598,7 +598,7 @@ function node_update_7006(&$sandbox) {
     $sandbox['count'] = 0;
 
     $query = db_select('node', 'n');
-    $query->join('node_revision', 'nr', 'n.vid = nr.vid');
+    $query->join('node_revision', 'nr', 'n.nid = nr.nid');
     $sandbox['total'] = $query->countQuery()->execute()->fetchField();
 
     $sandbox['body_field_id'] = $body_field['id'];
@@ -611,7 +611,7 @@ function node_update_7006(&$sandbox) {
       // Operate on every revision of every node (whee!), in batches.
       $batch_size = 200;
       $query = db_select('node_revision', 'nr');
-      $query->innerJoin('node', 'n', 'n.vid = nr.vid');
+      $query->innerJoin('node', 'n', 'n.nid = nr.nid');
       $query
         ->fields('nr', array('nid', 'vid', 'body', 'teaser', 'format'))
         ->fields('n', array('type', 'status', 'comment', 'promote', 'sticky', 'language'))
@@ -620,7 +620,7 @@ function node_update_7006(&$sandbox) {
         ->range(0, $batch_size);
       $revisions = $query->execute();
 
-      // Load each reversion of each node, set up 'body'
+      // Load each revision of each node, set up 'body'
       // appropriately, and save the node's field data.  Note that
       // node_load() will not return the body or teaser values from
       // {node_revision} because those columns have been removed from the
diff --git modules/simpletest/tests/upgrade/upgrade.node.test modules/simpletest/tests/upgrade/upgrade.node.test
index a3e2b10..641c96d 100644
--- modules/simpletest/tests/upgrade/upgrade.node.test
+++ modules/simpletest/tests/upgrade/upgrade.node.test
@@ -26,10 +26,19 @@ class NodeBodyUpgradePathTestCase extends UpgradePathTestCase {
   /**
    * Test a successful upgrade.
    */
-  public function testNodyBodyUpgrade() {
+  public function testNodeBodyUpgrade() {
     $this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.'));
     $this->drupalGet("content/1263769200");
     $this->assertText('node body (broken) - 37');
+
+    // Find a published node revision and make sure it still has a body.
+    $revision = db_query_range("SELECT r.nid, r.vid FROM {node_revision} r JOIN {node} n ON n.nid = r.nid WHERE n.status = 1 AND n.vid <> r.vid", 0, 1)->fetch();
+    $revision = node_load($revision->nid, $revision->vid);
+    $this->assertTrue(!empty($revision->body), 'Non-current node revisions still have a node body.');
+    // Find an unpublished node revision and make sure it still has a body.
+    $revision = db_query_range("SELECT r.nid, r.vid FROM {node_revision} r JOIN {node} n ON n.nid = r.nid WHERE n.status = 0 AND n.vid <> r.vid", 0, 1)->fetch();
+    $revision = node_load($revision->nid, $revision->vid);
+    $this->assertTrue(!empty($revision->body), 'Unpublished non-current node revisions still have a node body.');
   }
 }
 
