Closed
Description
Preconditions
- Install Magento2 with setup (MySQL), don't change default initStatement.
Steps to reproduce
- Edit the
app/etc/env.php
. - Change the order of the default db connection configuration.
- Make sure that
initStatement
is the upper most entry. - Reload page or run CLI tool.
Expected result
- Working site with selected DB.
Actual result
- The DSN will contain the initStatement with
;
sign. Resulting in:
mysql:host=localhost;model=mysql4;active=1;initStatements=SET NAMES utf8;;dbname=test_db;engine=innodb;type=pdo_mysql
The problem will be between the initStatements=
and the dbname=
. The dubble semicolon will result in ignoring everything after it.
By default the Magento setup will add initStatements with the semicolon on the end, which is the failt. The only reason why it isn't failing on all environments is order of the env.php array which will ignore nothing on the end of the generated DSN.
This affects Magento 2.1.1 and (not yet tested) everything < 2.1.1.
Metadata
Metadata
Assignees
Labels
Gate 2 Passed. Manual verification of the issue description passedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentThe issue has been reproduced on latest 2.1 releaseThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.3 release