Commit 56243861 authored by Lukas Kahwe Smith's avatar Lukas Kahwe Smith Committed by Juozas Kaziukenas

added supportsReleaseSavepoints(), disabled releasing for Oracle and DB2...

added supportsReleaseSavepoints(), disabled releasing for Oracle and DB2 (already disabled for MSSQL
parent 02ed1d6d
...@@ -900,9 +900,8 @@ class Connection implements DriverConnection ...@@ -900,9 +900,8 @@ class Connection implements DriverConnection
ConnectionException::savepointsNotSupported(); ConnectionException::savepointsNotSupported();
} }
$sql = $this->_platform->releaseSavePoint($savepoint); if ($this->_platform->supportsReleaseSavepoints()) {
if ($sql) { $this->_conn->exec($this->_platform->releaseSavePoint($savepoint));
$this->_conn->exec($sql);
} }
} }
......
...@@ -1773,6 +1773,16 @@ abstract class AbstractPlatform ...@@ -1773,6 +1773,16 @@ abstract class AbstractPlatform
return true; return true;
} }
/**
* Whether the platform supports releasing savepoints.
*
* @return boolean
*/
public function supportsReleaseSavepoints()
{
return $this->supportsSavepoints();
}
/** /**
* Whether the platform supports primary key constraints. * Whether the platform supports primary key constraints.
* *
......
...@@ -291,6 +291,16 @@ class DB2Platform extends AbstractPlatform ...@@ -291,6 +291,16 @@ class DB2Platform extends AbstractPlatform
return false; return false;
} }
/**
* Whether the platform supports releasing savepoints.
*
* @return boolean
*/
public function supportsReleaseSavepoints()
{
return false;
}
/** /**
* Gets the SQL specific for the platform to get the current date. * Gets the SQL specific for the platform to get the current date.
* *
......
...@@ -659,6 +659,16 @@ LEFT JOIN all_cons_columns r_cols ...@@ -659,6 +659,16 @@ LEFT JOIN all_cons_columns r_cols
return false; return false;
} }
/**
* Whether the platform supports releasing savepoints.
*
* @return boolean
*/
public function supportsReleaseSavepoints()
{
return false;
}
/** /**
* @inheritdoc * @inheritdoc
*/ */
......
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