1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-27 00:05:18 +02:00

MySQL: Support non-utf8 charset in search in column

This commit is contained in:
Jakub Vrana
2018-02-06 13:19:12 +01:00
parent c2de3b8ec1
commit 197abdcb70
4 changed files with 21 additions and 6 deletions

View File

@@ -277,6 +277,13 @@ if (!defined("DRIVER")) {
return queries($prefix . implode(",\n", $values) . $suffix);
}
function convertSearch($idf, $field) {
return (preg_match('~char|text|enum|set~', $field["type"]) && !preg_match("~^utf8~", $field["collation"])
? "CONVERT($idf USING " . charset($this->_conn) . ")"
: $idf
);
}
function warnings() {
$result = $this->_conn->query("SHOW WARNINGS");
if ($result && $result->num_rows) {