From 7e5584ed2eff694e6d0b354b684b04412274b59d Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sat, 29 May 2010 06:56:27 -0400 Subject: [PATCH 1/2] problem showing UNHEX function by default when editing a BLOB was not fixed correctly in version 3.3.3 --- tbl_change.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tbl_change.php b/tbl_change.php index d7b86dd60..9731974b6 100644 --- a/tbl_change.php +++ b/tbl_change.php @@ -442,7 +442,7 @@ foreach ($rows as $row_id => $vrow) { $special_chars = PMA_printable_bit_value($vrow[$field['Field']], $extracted_fieldspec['spec_in_brackets']); } else { // loic1: special binary "characters" - if ($field['is_binary'] || $field['is_blob']) { + if ($field['is_binary'] || ($field['is_blob'] && ! $cfg['ProtectBinary'])) { if ($_SESSION['tmp_user_values']['display_binary_as_hex'] && $cfg['ShowFunctionFields']) { $vrow[$field['Field']] = bin2hex($vrow[$field['Field']]); $field['display_binary_as_hex'] = true; From 024120107cdce3dbca886b1814f746bb8c6e3873 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sat, 29 May 2010 07:45:56 -0400 Subject: [PATCH 2/2] removed code that was adding all fields, even untouched ones, in the UPDATE statement --- libraries/tbl_replace_fields.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/tbl_replace_fields.inc.php b/libraries/tbl_replace_fields.inc.php index dd24882fe..08bbdb7fd 100644 --- a/libraries/tbl_replace_fields.inc.php +++ b/libraries/tbl_replace_fields.inc.php @@ -114,7 +114,7 @@ if (false !== $possibly_uploaded_val) { $val = preg_replace('/[^01]/', '0', $val); $val = "b'" . PMA_sqlAddslashes($val) . "'"; } elseif (! (($type == 'datetime' || $type == 'timestamp') && $val == 'CURRENT_TIMESTAMP')) { - $val = "'" . PMA_sqlAddslashes($val) . "' /*" . $type . " */"; + $val = "'" . PMA_sqlAddslashes($val) . "'"; } // Was the Null checkbox checked for this field?