Skip to content

Commit e1dd7aa

Browse files
author
root
committed
comments and mode added
1 parent a103201 commit e1dd7aa

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

install/lib/installer_base.lib.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,8 @@ public function reconfigure_app($service, $reconfigure_services_answer) {
224224
public function configure_database() {
225225
global $conf;
226226

227-
$this->db->query("SET sql_mode = ''");
227+
//* prevent substitution of ENGINE=MyISAM
228+
$this->db->query("SET sql_mode = 'NO_ENGINE_SUBSTITUTION'");
228229

229230
//** Create the database
230231
if(!$this->db->query('CREATE DATABASE IF NOT EXISTS ?? DEFAULT CHARACTER SET ?', $conf['mysql']['database'], $conf['mysql']['charset'])) {

install/lib/update.lib.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ function checkDbHealth() {
123123
function updateDbAndIni() {
124124
global $inst, $conf;
125125

126-
$inst->db->query("SET sql_mode = ''");
126+
//* prevent substitution of ENGINE=MyISAM
127+
$this->db->query("SET sql_mode = 'NO_ENGINE_SUBSTITUTION'");
127128

128129
//* Update $conf array with values from the server.ini that shall be preserved
129130
$tmp = $inst->db->queryOneRecord("SELECT * FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . '.server', $conf['server_id']);

0 commit comments

Comments
 (0)