mirror of
https://github.com/vrana/adminer.git
synced 2025-08-22 22:23:19 +02:00
MySQL: Use CONVERT() only when searching for non-ASCII (bug #603)
This commit is contained in:
@@ -299,7 +299,7 @@ if (!defined("DRIVER")) {
|
||||
}
|
||||
|
||||
function convertSearch($idf, $val, $field) {
|
||||
return (preg_match('~char|text|enum|set~', $field["type"]) && !preg_match("~^utf8~", $field["collation"])
|
||||
return (preg_match('~char|text|enum|set~', $field["type"]) && !preg_match("~^utf8~", $field["collation"]) && preg_match('~[\x80-\xFF]~', $val['val'])
|
||||
? "CONVERT($idf USING " . charset($this->_conn) . ")"
|
||||
: $idf
|
||||
);
|
||||
|
Reference in New Issue
Block a user