Skip to content

Commit

Permalink
bug #1903724 [interface] Displaying of very large queries in error me…
Browse files Browse the repository at this point in the history
…ssage
  • Loading branch information
lem9 committed Feb 28, 2008
1 parent 854a65a commit 11627b5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Expand Up @@ -5,6 +5,9 @@ phpMyAdmin - ChangeLog
$Id$
$HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyAdmin/ChangeLog $

2.11.6.0 (not yet released)
- bug #1903724 [interface] Displaying of very large queries in error message

2.11.5.0 (not yet released)
- bug #1862661 [GUI] Warn about rename deleting database
- bug #1866041 [interface] Incorrect sorting with AS
Expand Down
9 changes: 7 additions & 2 deletions libraries/common.lib.php
Expand Up @@ -410,7 +410,8 @@ function PMA_showHint($hint_message)
* @uses $GLOBALS['pmaThemeImage']
* @uses $GLOBALS['strEdit']
* @uses $GLOBALS['strMySQLSaid']
* @uses $cfg['PropertiesIconic']
* @uses $GLOBALS['cfg']['PropertiesIconic']
* @uses $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']
* @uses PMA_backquote()
* @uses PMA_DBI_getError()
* @uses PMA_formatSql()
Expand Down Expand Up @@ -471,7 +472,11 @@ function PMA_mysqlDie($error_message = '', $the_query = '',
} elseif (empty($the_query) || trim($the_query) == '') {
$formatted_sql = '';
} else {
$formatted_sql = PMA_formatSql(PMA_SQP_parse($the_query), $the_query);
if (strlen($the_query) > $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) {
$formatted_sql = substr($the_query, 0, $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) . '[...]';
} else {
$formatted_sql = PMA_formatSql(PMA_SQP_parse($the_query), $the_query);
}
}
// ---
echo "\n" . '<!-- PMA-SQL-ERROR -->' . "\n";
Expand Down

0 comments on commit 11627b5

Please sign in to comment.