Differential D10604 Diff 25480 src/aphront/storage/connection/mysql/AphrontMySQLiDatabaseConnection.php
Changeset View
Changeset View
Standalone View
Standalone View
src/aphront/storage/connection/mysql/AphrontMySQLiDatabaseConnection.php
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | protected function connect() { | ||||
$errno = $conn->connect_errno; | $errno = $conn->connect_errno; | ||||
if ($errno) { | if ($errno) { | ||||
$error = $conn->connect_error; | $error = $conn->connect_error; | ||||
throw new AphrontConnectionQueryException( | throw new AphrontConnectionQueryException( | ||||
"Attempt to connect to {$user}@{$host} failed with error ". | "Attempt to connect to {$user}@{$host} failed with error ". | ||||
"#{$errno}: {$error}.", $errno); | "#{$errno}: {$error}.", $errno); | ||||
} | } | ||||
$conn->set_charset('utf8'); | $ok = $conn->set_charset('utf8mb4'); | ||||
zorfling: This is causing massive haemorrhage when it fails... (Server version: 5.1.73)
In DarkConsole… | |||||
if (!$ok) { | |||||
$ok = $conn->set_charset('utf8'); | |||||
} | |||||
return $conn; | return $conn; | ||||
} | } | ||||
protected function rawQuery($raw_query) { | protected function rawQuery($raw_query) { | ||||
return @$this->requireConnection()->query($raw_query); | return @$this->requireConnection()->query($raw_query); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 82 Lines • Show Last 20 Lines |
This is causing massive haemorrhage when it fails... (Server version: 5.1.73)
In DarkConsole:
mysqli::set_charset() [<a href='mysqli.set-charset'>mysqli.set-charset</a>]: Error executing query at [AphrontMySQLiDatabaseConnection.php:70] (12 times)
Same when running CLI scripts.