diff --git a/ChangeLog b/ChangeLog index 12cb4f28c..57a23bbf8 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,11 @@ phpMyAdmin - Changelog $Id$ $Source$ +2003-05-09 Marc Delisle + * libraries/display_tbl.lib.php3: bug 731367: hexifying all + TEXT fields (a if on the type returns "blob") caused + problems + 2003-05-05 Marc Delisle * libraries/build_dump.lib.php3: bug 731866: text fields were exported hexified, because mysql_field_type() was used and diff --git a/libraries/display_tbl.lib.php3 b/libraries/display_tbl.lib.php3 index 9fcb67782..1c9b8fb30 100644 --- a/libraries/display_tbl.lib.php3 +++ b/libraries/display_tbl.lib.php3 @@ -917,6 +917,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) { // "primary" key to use in links if ($is_display['edit_lnk'] == 'ur' /* || $is_display['edit_lnk'] == 'dr' */) { for ($i = 0; $i < $fields_cnt; ++$i) { + $field_flags = PMA_mysql_field_flags($dt_result, $i); $meta = $fields_meta[$i]; // do not use an alias in a condition @@ -951,8 +952,10 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) { || (function_exists('is_null') && is_null($row[$pointer]))) { $condition .= 'IS NULL AND'; } else { - if ($meta->type == 'blob') { - $condition .= 'LIKE 0x' . bin2hex($row[$pointer]). ' AND'; + if ($meta->type == 'blob' + // hexify only if this is a true BLOB + && eregi('BINARY', $field_flags)) { + $condition .= 'LIKE 0x' . bin2hex($row[$pointer]). ' AND'; } else { $condition .= '= \'' . PMA_sqlAddslashes($row[$pointer], FALSE, TRUE) . '\' AND'; } @@ -1182,7 +1185,6 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) { // TEXT fields type, however TEXT fields must be displayed // even if $cfg['ShowBlob'] is false -> get the true type // of the fields. - $field_flags = PMA_mysql_field_flags($dt_result, $i); if (eregi('BINARY', $field_flags)) { $blobtext = '[BLOB';