MySQL: Use CONVERT() only when searching for non-ASCII (bug #603)

This commit is contained in:
Jakub Vrana 2018-03-01 11:01:35 +01:00
parent 53dd78f5af
commit 52d7c38ef1
2 changed files with 2 additions and 1 deletions

View file

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

View file

@ -2,6 +2,7 @@ Adminer 4.6.3-dev:
Stop session before connecting
Fix displaying info about non-alphabetical objects (bug #599)
PDO: Support binary fields download
MySQL: Use CONVERT() only when searching for non-ASCII (bug #603)
Adminer 4.6.2 (released 2018-02-20):
Semi-transparent border on table actions