Commit 788dea96 authored by Lukas Kahwe Smith's avatar Lukas Kahwe Smith

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

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