From dd14447aa518ef473df9a8fcf5878649a9d1ae7d Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Thu, 27 Mar 2003 16:11:38 +0000 Subject: [PATCH] browse delays --- sql.php3 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sql.php3 b/sql.php3 index f32cf1693..f2cef507e 100755 --- a/sql.php3 +++ b/sql.php3 @@ -392,6 +392,13 @@ else { $count_query .= ' HAVING ' . $analyzed_sql[0]['having_clause']; } + // if using SQL_CALC_FOUND_ROWS, add a LIMIT to avoid + // long delays. Returned count will be complete anyway. + + if (PMA_MYSQL_INT_VERSION >= 40000) { + $count_query .= ' LIMIT 1'; + } + // do not put the order_by_clause, it interferes // run the count query if (PMA_MYSQL_INT_VERSION < 40000) {