bug #1490422, lost connection to MySQL server

This commit is contained in:
Marc Delisle
2006-05-30 15:25:29 +00:00
parent 0f7e8e9e7d
commit 57eaa756e0
2 changed files with 6 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ $Source$
2006-05-30 Marc Delisle <lem9@users.sourceforge.net>
* lang/french*: updates
* querywindow.php: $is_superuser was not defined
* sql.php: bug #1490422, lost connection to MySQL server (SELECT DISTINCT)
2006-05-30 Michal Čihař <michal@cihar.com>
* libraries/export/sql.php: Fix handling of backquotes (bug #1497239).

View File

@@ -520,6 +520,11 @@ else {
$count_query .= ' SQL_CALC_FOUND_ROWS ';
// add everything that was after the first SELECT
$count_query .= PMA_SQP_formatHtml($parsed_sql, 'query_only', $analyzed_sql[0]['position_of_first_select']+1);
// ensure there is no semicolon at the end of the
// count query because we'll probably add
// a LIMIT 1 clause after it
$count_query = rtrim($count_query);
$count_query = rtrim($count_query, ';');
} else { // PMA_MYSQL_INT_VERSION < 40000
if (!empty($analyzed_sql[0]['from_clause'])) {