Unverified Commit 8dab48bf authored by Fokkema's avatar Fokkema Committed by GitHub

Merge pull request #387 from LOVDnl/fix/variants/in_gene

Fix `variants/in_gene` view.
parents 3c8e3fd1 79e5154a
......@@ -4,10 +4,10 @@
* LEIDEN OPEN VARIATION DATABASE (LOVD)
*
* Created : 2011-08-17
* Modified : 2017-01-25
* For LOVD : 3.0-19
* Modified : 2019-08-01
* For LOVD : 3.0-22
*
* Copyright : 2004-2017 Leiden University Medical Center; http://www.LUMC.nl/
* Copyright : 2004-2019 Leiden University Medical Center; http://www.LUMC.nl/
* Programmers : Ivo F.A.C. Fokkema <I.F.A.C.Fokkema@LUMC.nl>
* Ivar C. Lugtenburg <I.C.Lugtenburg@LUMC.nl>
*
......@@ -59,7 +59,12 @@ class LOVD_PDO extends PDO {
// Still needs check though, in case two PDO connections are opened.
define('MYSQL_ATTR_INIT_COMMAND', 1002);
}
$aOptions = array(MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8, SQL_MODE = REPLACE(@@SQL_MODE, "NO_ZERO_DATE", "")', PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => TRUE);
$aOptions = array(
// ONLY_FULL_GROUP_BY is causing issues; even if we try to play nice,
// the totally unnecessary MIN() and MAX() calls slow down queries a lot. See #386.
MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8, SQL_MODE = REPLACE(REPLACE(@@SQL_MODE, "NO_ZERO_DATE", ""), "ONLY_FULL_GROUP_BY", "")',
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => TRUE,
);
}
try {
parent::__construct($sDSN, $sUsername, $sPassword, $aOptions);
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment