From d2e959e32eeab62ba06136fed93a640b66bc2be5 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 8 Aug 2016 20:28:35 +0200 Subject: [PATCH] add command to set sql_mode as default by Ubuntu 16.04 (not active) --- SeedDMS_Core/Core/inc.DBAccessPDO.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SeedDMS_Core/Core/inc.DBAccessPDO.php b/SeedDMS_Core/Core/inc.DBAccessPDO.php index 4bd77a0d8..5d48723cf 100644 --- a/SeedDMS_Core/Core/inc.DBAccessPDO.php +++ b/SeedDMS_Core/Core/inc.DBAccessPDO.php @@ -181,6 +181,8 @@ class SeedDMS_Core_DatabaseAccess { $this->_conn->exec('SET NAMES utf8'); /* Turn this on if you want strict checking of default values, etc. */ // $this->_conn->exec("SET SESSION sql_mode = 'STRICT_TRANS_TABLES'"); + /* The following is the default on Ubuntu 16.04 */ +// $this->_conn->exec("SET SESSION sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'"); break; case 'sqlite': $this->_conn->exec('PRAGMA foreign_keys = ON');