Index: branches/5.2.x/core/kernel/db/dblist.php =================================================================== diff -u -N -r15268 -r15464 --- branches/5.2.x/core/kernel/db/dblist.php (.../dblist.php) (revision 15268) +++ branches/5.2.x/core/kernel/db/dblist.php (.../dblist.php) (revision 15464) @@ -1,6 +1,6 @@ GetGroupClause(); if ( $for_counting ) { - $optimizer = new LeftJoinOptimizer($q, $where . '|' . $having . '|' . $order . '|' . $group . '|' . $keep_clause); + $usage_string = $where . '|' . $having . '|' . $order . '|' . $group . '|' . $keep_clause; + $optimizer = new LeftJoinOptimizer($q, str_replace('%1$s', $this->TableName, $usage_string)); $q = $optimizer->simplify(); }