Commit cc3a6ed7 authored by Steve Müller's avatar Steve Müller

use different temp table name to avoid reserved keyword conflicts

parent a619261b
...@@ -22,7 +22,7 @@ class TemporaryTableTest extends \Doctrine\Tests\DbalFunctionalTestCase ...@@ -22,7 +22,7 @@ class TemporaryTableTest extends \Doctrine\Tests\DbalFunctionalTestCase
{ {
if ($this->_conn) { if ($this->_conn) {
try { try {
$tempTable = $this->_conn->getDatabasePlatform()->getTemporaryTableName("temporary"); $tempTable = $this->_conn->getDatabasePlatform()->getTemporaryTableName("my_temporary");
$this->_conn->exec($this->_conn->getDatabasePlatform()->getDropTemporaryTableSQL($tempTable)); $this->_conn->exec($this->_conn->getDatabasePlatform()->getDropTemporaryTableSQL($tempTable));
} catch(\Exception $e) { } } catch(\Exception $e) { }
} }
...@@ -36,7 +36,7 @@ class TemporaryTableTest extends \Doctrine\Tests\DbalFunctionalTestCase ...@@ -36,7 +36,7 @@ class TemporaryTableTest extends \Doctrine\Tests\DbalFunctionalTestCase
{ {
$platform = $this->_conn->getDatabasePlatform(); $platform = $this->_conn->getDatabasePlatform();
$columnDefinitions = array("id" => array("type" => Type::getType("integer"), "notnull" => true)); $columnDefinitions = array("id" => array("type" => Type::getType("integer"), "notnull" => true));
$tempTable = $platform->getTemporaryTableName("temporary"); $tempTable = $platform->getTemporaryTableName("my_temporary");
$createTempTableSQL = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' (' $createTempTableSQL = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' ('
. $platform->getColumnDeclarationListSQL($columnDefinitions) . ')'; . $platform->getColumnDeclarationListSQL($columnDefinitions) . ')';
...@@ -69,7 +69,7 @@ class TemporaryTableTest extends \Doctrine\Tests\DbalFunctionalTestCase ...@@ -69,7 +69,7 @@ class TemporaryTableTest extends \Doctrine\Tests\DbalFunctionalTestCase
{ {
$platform = $this->_conn->getDatabasePlatform(); $platform = $this->_conn->getDatabasePlatform();
$columnDefinitions = array("id" => array("type" => Type::getType("integer"), "notnull" => true)); $columnDefinitions = array("id" => array("type" => Type::getType("integer"), "notnull" => true));
$tempTable = $platform->getTemporaryTableName("temporary"); $tempTable = $platform->getTemporaryTableName("my_temporary");
$createTempTableSQL = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' (' $createTempTableSQL = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' ('
. $platform->getColumnDeclarationListSQL($columnDefinitions) . ')'; . $platform->getColumnDeclarationListSQL($columnDefinitions) . ')';
......
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