Commit 66fd914b authored by Steve Müller's avatar Steve Müller Committed by GitHub

Merge pull request #2692 from jnvsor/mysqlisolevel

MySqlPlatform: Fix default isolation level
parents e0169b2a 84bbcbbb
......@@ -25,6 +25,7 @@ use Doctrine\DBAL\Schema\Index;
use Doctrine\DBAL\Schema\Table;
use Doctrine\DBAL\Types\BlobType;
use Doctrine\DBAL\Types\TextType;
use Doctrine\DBAL\Connection;
/**
* The MySqlPlatform provides the behavior, features and SQL dialect of the
......@@ -1126,4 +1127,12 @@ class MySqlPlatform extends AbstractPlatform
return parent::quoteStringLiteral($str);
}
/**
* {@inheritdoc}
*/
public function getDefaultTransactionIsolationLevel()
{
return Connection::TRANSACTION_REPEATABLE_READ;
}
}
......@@ -3,6 +3,7 @@
namespace Doctrine\Tests\DBAL\Platforms;
use Doctrine\DBAL\Platforms\MySqlPlatform;
use Doctrine\DBAL\Connection;
class MySqlPlatformTest extends AbstractMySQLPlatformTestCase
{
......@@ -10,4 +11,12 @@ class MySqlPlatformTest extends AbstractMySQLPlatformTestCase
{
return new MysqlPlatform;
}
public function testHasCorrectDefaultTransactionIsolationLevel()
{
$this->assertEquals(
Connection::TRANSACTION_REPEATABLE_READ,
$this->_platform->getDefaultTransactionIsolationLevel()
);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment