Jira issue originally created by user daniel.sippel:
In a mysql master/slave environment with "charset:" set to "UTF8" an Event "postConnect" is dispatched after establishing the connection.
MysqlSessionInit->postConnect() uses MasterSlaveConnection->executeUpdate() to submit this information to the current connection. executeUpdate() always connects to the master and the slaves won't be used (as documentated: "3. If master was picked once during the lifetime of the connection it will always get picked afterwards.").
We suggest to use executeQuery() in postConnect() instead.
Comment created by @beberlei:
MysqlInitListener is deprecated, because SET NAMES UTF8 is not a safe operation. Use the "charset" option of the PDO MySQL driver instead.
Comment created by stof:
Then we need to fix DoctrineBundle to stop using the init listener for mysql.
Comment created by daniel.sippel:
I agree with Christophe and reopened this issue.
Please close the issue Benjamin. This has been fixed in DoctrineBundle: doctrine/DoctrineBundle#111
I don't have enough rights in JIRA to close it myself.
Issue was closed with resolution "Invalid"