Skip to content

Commit

Permalink
bug 731367
Browse files Browse the repository at this point in the history
  • Loading branch information
lem9 committed May 9, 2003
1 parent 720a8fb commit 2636090
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Expand Up @@ -5,6 +5,11 @@ phpMyAdmin - Changelog
$Id$
$Source$

2003-05-09 Marc Delisle <lem9@users.sourceforge.net>
* 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 <lem9@users.sourceforge.net>
* libraries/build_dump.lib.php3: bug 731866: text fields were
exported hexified, because mysql_field_type() was used and
Expand Down
8 changes: 5 additions & 3 deletions libraries/display_tbl.lib.php3
Expand Up @@ -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
Expand Down Expand Up @@ -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';
}
Expand Down Expand Up @@ -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';
Expand Down

0 comments on commit 2636090

Please sign in to comment.