From 8ed5e573fcf891f9bedd2e403b19223019eed96f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 28 May 2004 08:02:51 +0000 Subject: [PATCH] Decrease limit for query truncating (see comments in bug #951744). --- ChangeLog | 4 ++++ libraries/display_tbl.lib.php | 12 ++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index d70ccab16..0f2c37361 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2004-05-28 Michal Čihař + * libraries/display_tbl.lib.php: Decrease limit for query truncating (see + comments in bug #951744). + 2004-05-26 Michal Čihař * lang/norwegian: Update, thanks to Sven-Erik Andersen - sven-erik. * lang/estonian: Update thanks to Alvar Soome - finsoft. diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php index 8a57d62ad..fd7abc7fc 100644 --- a/libraries/display_tbl.lib.php +++ b/libraries/display_tbl.lib.php @@ -457,7 +457,6 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ // Just as fallback $unsorted_sql_query = $sql_query; - $url_sql_query = $sql_query; // sorting by indexes, only if it makes sense if (isset($analyzed_sql) && isset($analyzed_sql[0]) && @@ -472,11 +471,6 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ if (!empty($analyzed_sql[0]['from_clause'])) { $unsorted_sql_query .= ' FROM ' . $analyzed_sql[0]['from_clause']; } - - // query without conditions to shorten urls when needed, 800 is just guess, it should depend on remaining url length - if (strlen($sql_query) > 800) { - $url_sql_query = $unsorted_sql_query; - } if (!empty($analyzed_sql[0]['where_clause'])) { $unsorted_sql_query .= ' WHERE ' . $analyzed_sql[0]['where_clause']; @@ -970,10 +964,12 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) $url_sql_query = $sql_query; - // query without conditions to shorten urls when needed, 600 is just guess, it should depend on remaining url length + // query without conditions to shorten urls when needed, 200 is just + // guess, it should depend on remaining url length + if (isset($analyzed_sql) && isset($analyzed_sql[0]) && isset($analyzed_sql[0]['querytype']) && $analyzed_sql[0]['querytype'] == 'SELECT' && - strlen($sql_query) > 600) { + strlen($sql_query) > 200) { $url_sql_query = 'SELECT '; if (isset($analyzed_sql[0]['queryflags']['distinct'])) {