diff --git a/core/lib/Drupal/Core/Database/Query/Update.php b/core/lib/Drupal/Core/Database/Query/Update.php
index 5ffdb33..6240f56 100644
--- a/core/lib/Drupal/Core/Database/Query/Update.php
+++ b/core/lib/Drupal/Core/Database/Query/Update.php
@@ -212,6 +212,10 @@ public function execute() {
       if (!empty($data['arguments'])) {
         $update_values += $data['arguments'];
       }
+      if ($data['expression'] instanceof SelectInterface) {
+        $data['expression']->compile($this->connection, $this);
+        $update_values += $data['expression']->arguments();
+      }
       unset($fields[$field]);
     }
 
@@ -245,6 +249,9 @@ public function __toString() {
     $fields = $this->fields;
     $update_fields = array();
     foreach ($this->expressionFields as $field => $data) {
+      if ($data['expression'] instanceof SelectInterface) {
+        $data['expression'] = ' (' . $data['expression'] . ')';
+      }
       $update_fields[] = $field . '=' . $data['expression'];
       unset($fields[$field]);
     }
diff --git a/core/modules/system/lib/Drupal/system/Tests/Database/UpdateComplexTest.php b/core/modules/system/lib/Drupal/system/Tests/Database/UpdateComplexTest.php
index 4778363..fc6f6c5 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Database/UpdateComplexTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Database/UpdateComplexTest.php
@@ -132,4 +132,18 @@ function testUpdateOnlyExpression() {
     $after_age = db_query('SELECT age FROM {test} WHERE name = :name', array(':name' => 'Ringo'))->fetchField();
     $this->assertEqual($before_age + 4, $after_age, 'Age updated correctly');
   }
+
+  /**
+   * Test UPDATE with a subselect value.
+   */
+  function testSubSelectUpdate() {
+    $subselect = db_select('test', 't');
+    $subselect->addExpression('MAX(age) + :increment', 'max_age', array(':increment' => 1));
+    db_update('test_task')
+      ->expression('priority', $subselect)
+      ->execute();
+    $results = array_map('intval', db_query('SELECT priority FROM {test_task}')->fetchCol());
+    $this->assertIdentical(array(29), array_unique($results));
+  }
+
 }
