MDL-58689 dml: prevent logging during setup

This commit is contained in:
Marina Glancy
2017-04-27 10:05:25 +08:00
parent 0e526f9ea6
commit 22e22a39af
+3 -3
View File
@@ -519,6 +519,9 @@ class mysqli_native_moodle_database extends moodle_database {
throw new dml_connection_exception($dberr);
}
// Disable logging until we are fully setup.
$this->query_log_prevent();
if (isset($dboptions['dbcollation'])) {
$collationinfo = explode('_', $dboptions['dbcollation']);
$this->dboptions['dbcollation'] = $dboptions['dbcollation'];
@@ -527,9 +530,6 @@ class mysqli_native_moodle_database extends moodle_database {
}
$charset = reset($collationinfo);
// Disable logging until we are fully setup.
$this->query_log_prevent();
$this->query_start("--set_charset()", null, SQL_QUERY_AUX);
$this->mysqli->set_charset($charset);
$this->query_end(true);