bug #1204235, searching on a VARBINARY field
This commit is contained in:
@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2005-05-19 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* tbl_select.php: bug #1204235, searching on a VARBINARY field
|
||||
|
||||
2005-05-18 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* export.php: bug #1193442, 8 extra spaces at end of export area,
|
||||
thanks to Ryan Schmidt
|
||||
|
@@ -68,7 +68,16 @@ if (!isset($param) || $param[0] == '') {
|
||||
|| strncasecmp($type, 'enum', 4) == 0) {
|
||||
$type = str_replace(',', ', ', $type);
|
||||
} else {
|
||||
$type = str_replace(array('binary', 'zerofill', 'unsigned'), '', strtolower($type));
|
||||
|
||||
// strip the "BINARY" attribute, except if we find "BINARY(" because
|
||||
// this would be a BINARY or VARBINARY field type
|
||||
if (!preg_match('@BINARY[\(]@i', $type)) {
|
||||
$type = preg_replace('@BINARY@i', '', $type);
|
||||
}
|
||||
$type = preg_replace('@ZEROFILL@i', '', $type);
|
||||
$type = preg_replace('@UNSIGNED@i', '', $type);
|
||||
|
||||
$type = strtolower($type);
|
||||
}
|
||||
if (empty($type)) {
|
||||
$type = ' ';
|
||||
@@ -411,7 +420,10 @@ else {
|
||||
}
|
||||
|
||||
// Make query independant from the selected connection charset.
|
||||
if (PMA_MYSQL_INT_VERSION >= 40101 && $charsets[$i] != $charset_connection && preg_match('@char|binary|blob|text|set@i', $types[$i])) {
|
||||
// But if the field's type is VARBINARY, it has no charset
|
||||
// and $charsets[$i] is empty, so we cannot generate a CONVERT
|
||||
|
||||
if (PMA_MYSQL_INT_VERSION >= 40101 && !empty($charsets[$i]) && $charsets[$i] != $charset_connection && preg_match('@char|binary|blob|text|set@i', $types[$i])) {
|
||||
$prefix = 'CONVERT(_utf8 ';
|
||||
$suffix = ' USING ' . $charsets[$i] . ') COLLATE ' . $collations[$i];
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user