From ca0323d2dec404d68ff920f0e71f186b90ead565 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 27 Apr 2010 10:42:58 +0000 Subject: - Patch #701888 by jhodgdon: subqueries are not altered and test clean-up. --- includes/database/select.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'includes') diff --git a/includes/database/select.inc b/includes/database/select.inc index 16c352ea3..8a6a4ab30 100644 --- a/includes/database/select.inc +++ b/includes/database/select.inc @@ -1319,7 +1319,10 @@ class SelectQuery extends Query implements SelectQueryInterface { // If the table is a subquery, compile it and integrate it into this query. if ($table['table'] instanceof SelectQueryInterface) { - $table_string = '(' . (string)$table['table'] . ')'; + // Run preparation steps on this sub-query before converting to string. + $subquery = $table['table']; + $subquery->preExecute(); + $table_string = '(' . (string) $subquery . ')'; } else { $table_string = '{' . $this->connection->escapeTable($table['table']) . '}'; -- cgit v1.2.3