Merge pull request #730 from acelaya-forks/feature/fix-mysql-buffered-error

Feature/fix mysql buffered error
This commit is contained in:
Alejandro Celaya 2020-04-18 13:29:24 +02:00 committed by GitHub
commit 85714c931d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 2 deletions

View File

@ -35,7 +35,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this
#### Fixed
* *Nothing*
* [#729](https://github.com/shlinkio/shlink/issues/729) Fixed weird error when fetching multiple visits result sets concurrently using mariadb or mysql.
## 2.1.3 - 2020-04-09

View File

@ -51,7 +51,7 @@
"shlinkio/shlink-common": "dev-master#e659cf9d9b5b3b131419e2f55f2e595f562baafc as 3.1.0",
"shlinkio/shlink-config": "^1.0",
"shlinkio/shlink-event-dispatcher": "^1.4",
"shlinkio/shlink-installer": "dev-master#487227bfc03233b44e8a113af0bc5bd0c6d67d5d as 5.0.0",
"shlinkio/shlink-installer": "dev-master#508652c895fb88512b8685198be1e2cfca59f4ce as 5.0.0",
"shlinkio/shlink-ip-geolocation": "^1.4",
"symfony/console": "^5.0",
"symfony/filesystem": "^5.0",

View File

@ -12,6 +12,7 @@ return [
'host' => 'shlink_db',
'driverOptions' => [
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true,
],
],
],

View File

@ -35,6 +35,7 @@ $buildDbConnection = function (): array {
'charset' => 'utf8',
'driverOptions' => [
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true,
],
],
'postgres' => [

View File

@ -41,6 +41,8 @@ $helper = new class {
$driverOptions = ! contains(['maria', 'mysql'], $driver) ? [] : [
// 1002 -> PDO::MYSQL_ATTR_INIT_COMMAND
1002 => 'SET NAMES utf8',
// 1000 -> PDO::MYSQL_ATTR_USE_BUFFERED_QUERY
1000 => true,
];
return [
'driver' => self::DB_DRIVERS_MAP[$driver],