Sync with Drupal 6.6
[6.x-perf-patches.git/.git] / path_innodb / path.inc.patch
1  includes/path.inc |    2 +-
2  1 files changed, 1 insertions(+), 1 deletions(-)
3
4 diff --git a/includes/path.inc b/includes/path.inc
5 index b98f192..73783ef 100644
6 --- a/includes/path.inc
7 +++ b/includes/path.inc
8 @@ -52,7 +52,7 @@ function drupal_lookup_path($action, $path = '', $path_language = '') {
9  
10    // Use $count to avoid looking up paths in subsequent calls if there simply are no aliases
11    if (!isset($count)) {
12 -    $count = db_result(db_query('SELECT COUNT(pid) FROM {url_alias}'));
13 +    $count = (int)db_result(db_query('SELECT pid FROM {url_alias} LIMIT 1'));
14    }
15  
16    if ($action == 'wipe') {