From ae4905d123c8fc597f7135307ef50f28ad00a7f7 Mon Sep 17 00:00:00 2001 From: Rob Andrews Date: Tue, 2 May 2017 12:45:55 +0100 Subject: [PATCH] set result buffering options on connection handle ref issue #50 --- src/DB/Driver/PdoDriver.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DB/Driver/PdoDriver.php b/src/DB/Driver/PdoDriver.php index fba3895..5a7b0a1 100644 --- a/src/DB/Driver/PdoDriver.php +++ b/src/DB/Driver/PdoDriver.php @@ -116,8 +116,8 @@ public function simpleQuery($query) // enable/disable result_buffering in mysql // @codeCoverageIgnoreStart - if (($this->getPlatform() === 'mysql') && !$this->options['result_buffering']) { - $queryDriverOptions[PDO::MYSQL_ATTR_USE_BUFFERED_QUERY] = false; + if ($this->getPlatform() === 'mysql') { + $this->connection->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, $this->options['result_buffering'] ? true : false); } // @codeCoverageIgnoreEnd