[2.0] DDC-296 - Fix in quoting
This commit is contained in:
parent
310d98cffe
commit
2fa58ee7b8
@ -64,8 +64,8 @@ class MysqlSessionInit implements EventSubscriber
|
||||
*/
|
||||
public function postConnect(ConnectionEventArgs $args)
|
||||
{
|
||||
$collation = ($this->_collation) ? " COLLATE '".$this->_collation : "'";
|
||||
$args->getConnection()->executeUpdate("SET NAMES '".$this->_charset . "'" . $collation);
|
||||
$collation = ($this->_collation) ? " COLLATE ".$this->_collation : "";
|
||||
$args->getConnection()->executeUpdate("SET NAMES ".$this->_charset . $collation);
|
||||
}
|
||||
|
||||
public function getSubscribedEvents()
|
||||
|
@ -16,7 +16,7 @@ class MysqlSessionInitTest extends DbalTestCase
|
||||
$connectionMock = $this->getMock('Doctrine\DBAL\Connection', array(), array(), '', false);
|
||||
$connectionMock->expects($this->once())
|
||||
->method('executeUpdate')
|
||||
->with($this->equalTo("SET NAMES 'foo' COLLATE 'bar"));
|
||||
->with($this->equalTo("SET NAMES foo COLLATE bar"));
|
||||
|
||||
$eventArgs = new ConnectionEventArgs($connectionMock);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user