Decrease limit for query truncating (see comments in bug #951744).

This commit is contained in:
Michal Čihař
2004-05-28 08:02:51 +00:00
parent b3f0385960
commit 8ed5e573fc
2 changed files with 8 additions and 8 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$
$Source$
2004-05-28 Michal Čihař <michal@cihar.com>
* libraries/display_tbl.lib.php: Decrease limit for query truncating (see
comments in bug #951744).
2004-05-26 Michal Čihař <michal@cihar.com>
* lang/norwegian: Update, thanks to Sven-Erik Andersen - sven-erik.
* lang/estonian: Update thanks to Alvar Soome - finsoft.

View File

@@ -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'])) {