@set_time_limit(10);// Prevent errant search hooks (easily written!) taking down a server. Each call given 5 seconds (calling set_time_limit resets the timer).
@set_time_limit(10);// Prevent errant search hooks (easily written!) taking down a server. Each call given 10 seconds (calling set_time_limit resets the timer).
@@ -1272,12 +1272,12 @@ function get_search_rows($meta_type, $meta_id_field, $content, $boolean_search,
$where_clause_3=$where_clause_2.(($where_clause_3=='')?'':((($where_clause_2=='')?'':' AND ').$where_clause_3));
if(!db_has_subqueries($db->connection_read)){
$_query.='(SELECT COUNT(*) FROM '.$_table_clause.(($where_clause_3=='')?'':(' WHERE '.$where_clause_3)).')';
$_query.=remove_unneeded_joins_rough('(SELECT COUNT(*) FROM '.$_table_clause.(($where_clause_3=='')?'':(' WHERE '.$where_clause_3)).')');
}else{// Has to do a nested subquery to reduce scope of COUNT(*), because the unbounded full-text's binary tree descendance can be extremely slow on physical disks if common words exist that aren't defined as MySQL stop words
$tmp_subquery='SELECT 1 AS x FROM '.$_table_clause.(($where_clause_3=='')?'':(' WHERE '.$where_clause_3));
$t_main_search_rows=$db->query($query,$max+$start,null,false,true/*, $fields Actually will hurt performance - we usually won't show text_parsed fields as we re-parse Comcode with syntax highlighting*/);
$t_main_search_rows=$db->query(remove_unneeded_joins_rough($query),$max+$start,null,false,true/*, $fields Actually will hurt performance - we usually won't show text_parsed fields as we re-parse Comcode with syntax highlighting*/);