Patch 859034 better BLOB comparison
This commit is contained in:
@@ -18,6 +18,7 @@ $Source$
|
||||
* lang/slovak: Updated, thanks to Lubos Klokner (erkac).
|
||||
* lang/swedish: Updated, thanks to Björn T. Hallberg (bth).
|
||||
* lang/slovenian update, thanks to Kositer Uros
|
||||
* libraries/common.lib.php: patch #859034, better BLOB comparison
|
||||
|
||||
2004-04-29 Michal Cihar <michal@cihar.com>
|
||||
* libraries/display_tbl.lib.php, libraries/sqlparser.lib.php,
|
||||
|
@@ -1971,7 +1971,13 @@ if (typeof(document.getElementById) != 'undefined'
|
||||
// hexify only if this is a true not empty BLOB
|
||||
&& stristr($field_flags, 'BINARY')
|
||||
&& !empty($row[$i])) {
|
||||
// use a CAST if possible, to avoid problems
|
||||
// if the field contains wildcard characters % or _
|
||||
if (PMA_MYSQL_INT_VERSION < 40002) {
|
||||
$condition .= 'LIKE 0x' . bin2hex($row[$i]). ' AND';
|
||||
} else {
|
||||
$condition .= '= CAST(0x' . bin2hex($row[$i]). ' AS BINARY) AND';
|
||||
}
|
||||
} else {
|
||||
$condition .= '= \'' . PMA_sqlAddslashes($row[$i], FALSE, TRUE) . '\' AND';
|
||||
}
|
||||
|
Reference in New Issue
Block a user