From 7a366c3f088cc060b769d56378605c6473b185e8 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 14 Mar 2010 10:05:51 -0400 Subject: [PATCH] bug #2967366 Some results of Propose table structure are shown in hex --- ChangeLog | 2 ++ libraries/display_tbl.lib.php | 11 ++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8d4d63b421..9514bd8266 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,8 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA - patch #2969449 [core] Name for MERGE engine varies depending on the MySQL version, thanks to Dieter Adriaenssens - ruleant - bug #2966078 [browse] Incorrect LIMIT is saved and sticks while browsing +- bug #2967366 [Structure] Some results of Propose table structure are + shown in hex 3.3.1.0 (not yet released) - bug #2941037 [core] Database structure not sorted by table correctly diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php index f4809d37a6..41bb987656 100644 --- a/libraries/display_tbl.lib.php +++ b/libraries/display_tbl.lib.php @@ -1361,12 +1361,13 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) { $field_flags = PMA_DBI_field_flags($dt_result, $i); if (isset($meta->_type) && $meta->_type === MYSQLI_TYPE_BIT) { $row[$i] = PMA_printable_bit_value($row[$i], $meta->length); - } elseif (stristr($field_flags, 'BINARY') && $meta->type == 'string') { - if ($_SESSION['tmp_user_values']['display_binary'] || (isset($GLOBALS['is_analyse']) && $GLOBALS['is_analyse'])) { + // some results of PROCEDURE ANALYSE() are reported as + // being BINARY but they are quite readable, + // so don't treat them as BINARY + } elseif (stristr($field_flags, 'BINARY') && $meta->type == 'string' && !(isset($GLOBALS['is_analyse']) && $GLOBALS['is_analyse'])) { + if ($_SESSION['tmp_user_values']['display_binary']) { // user asked to see the real contents of BINARY - // fields, or we detected a PROCEDURE ANALYSE in - // the query (results are reported as being - // binary strings) + // fields if ($_SESSION['tmp_user_values']['display_binary_as_hex']) { $row[$i] = bin2hex($row[$i]); } -- 2.11.4.GIT