Use utf8mb4 only if supported

This commit is contained in:
Jakub Vrana 2015-03-06 11:56:04 -08:00
parent c7f302ca0b
commit 26dafd9320

View file

@ -529,9 +529,10 @@ function db_size($db) {
* @return null
*/
function set_utf8mb4($create) {
global $connection;
static $set = false;
if (!$set && preg_match('~\butf8mb4~i', $create)) { // possible false positive
$set = true;
echo "SET NAMES utf8mb4;\n\n";
echo "SET NAMES " . charset($connection) . ";\n\n";
}
}