mirror of
https://github.com/vrana/adminer.git
synced 2025-08-23 06:32:55 +02:00
MySQL: Fix usage of utf8mb4 if the client library doesn't support it
This commit is contained in:
@@ -27,6 +27,12 @@ if (!defined("DRIVER")) {
|
|||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function set_charset($charset) {
|
||||||
|
// the client library may not support utf8mb4
|
||||||
|
parent::set_charset('utf8');
|
||||||
|
return $this->query("SET NAMES $charset");
|
||||||
|
}
|
||||||
|
|
||||||
function result($query, $field = 0) {
|
function result($query, $field = 0) {
|
||||||
$result = $this->query($query);
|
$result = $this->query($query);
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
@@ -80,7 +86,8 @@ if (!defined("DRIVER")) {
|
|||||||
*/
|
*/
|
||||||
function set_charset($charset) {
|
function set_charset($charset) {
|
||||||
if (function_exists('mysql_set_charset')) {
|
if (function_exists('mysql_set_charset')) {
|
||||||
return mysql_set_charset($charset, $this->_link);
|
// the client library may not support utf8mb4
|
||||||
|
mysql_set_charset('utf8', $this->_link);
|
||||||
}
|
}
|
||||||
return $this->query("SET NAMES $charset");
|
return $this->query("SET NAMES $charset");
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
Adminer 4.2.1-dev:
|
Adminer 4.2.1-dev:
|
||||||
Send referrer header to the same domain
|
Send referrer header to the same domain
|
||||||
|
MySQL: Fix usage of utf8mb4 if the client library doesn't support it
|
||||||
MySQL: Use utf8mb4 in export only if required
|
MySQL: Use utf8mb4 in export only if required
|
||||||
SQLite: Use EXPLAIN QUERY PLAN in SQL query
|
SQLite: Use EXPLAIN QUERY PLAN in SQL query
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user