=== modified file modules/comment/comment.module 
--- modules/comment/comment.module	2010-08-25 22:05:24.000000000 +0530
+++ modules/comment/comment.module	2010-08-25 22:07:38.000000000 +0530
@@ -2568,7 +2568,7 @@ function comment_ranking() {
         'on' => 'node_comment_statistics.nid = i.sid',
       ),
       // Inverse law that maps the highest reply count on the site to 1 and 0 to 0.
-      'score' => '2.0 - 2.0 / (1.0 + node_comment_statistics.comment_count * CAST(:scale AS DECIMAL))',
+      'score' => '2.0 - 2.0 / (1.0 + node_comment_statistics.comment_count * :scale)',
       'arguments' => array(':scale' => variable_get('node_cron_comments_scale', 0)),
     ),
   );
=== modified file modules/search/search.module
--- modules/search/search.module	2010-08-25 22:05:25.000000000 +0530
+++ modules/search/search.module	2010-08-25 22:06:44.000000000 +0530
@@ -361,10 +361,7 @@ function search_cron() {
   // to date.
   drupal_register_shutdown_function('search_update_totals');
 
-  foreach(variable_get('search_active_modules', array('node', 'user')) as $module) {
-    // Update word index
-    module_invoke($module, 'update_index');
-  }
+  module_invoke_all('update_index');
 }
 
 /**
