bug 731367

This commit is contained in:
Marc Delisle
2003-05-09 14:35:26 +00:00
parent 720a8fb359
commit 2636090111
2 changed files with 10 additions and 3 deletions

View File

@@ -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

View File

@@ -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';