1
0
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:
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
);