mirror of
https://github.com/vrana/adminer.git
synced 2025-08-13 18:14:07 +02:00
MySQL: Use utf8mb4 if available
This commit is contained in:
@@ -292,7 +292,9 @@ if (!defined("DRIVER")) {
|
|||||||
$connection = new Min_DB;
|
$connection = new Min_DB;
|
||||||
$credentials = $adminer->credentials();
|
$credentials = $adminer->credentials();
|
||||||
if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
|
if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
|
||||||
$connection->set_charset("utf8"); // available in MySQLi since PHP 5.0.5
|
$connection->set_charset( // available in MySQLi since PHP 5.0.5
|
||||||
|
version_compare($connection->server_info, "5.5.3") > 0 ? "utf8mb4" : "utf8" // SHOW CHARSET would require an extra query
|
||||||
|
);
|
||||||
$connection->query("SET sql_quote_show_create = 1, autocommit = 1");
|
$connection->query("SET sql_quote_show_create = 1, autocommit = 1");
|
||||||
return $connection;
|
return $connection;
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
Adminer 4.1.1-dev:
|
Adminer 4.1.1-dev:
|
||||||
Fix reading routine column collations
|
Fix reading routine column collations
|
||||||
|
MySQL: Use utf8mb4 if available
|
||||||
|
|
||||||
Adminer 4.1.0 (released 2014-04-18)
|
Adminer 4.1.0 (released 2014-04-18)
|
||||||
Provide size of all databases in the overview
|
Provide size of all databases in the overview
|
||||||
|
Reference in New Issue
Block a user