| @@ 51-74 (lines=24) @@ | ||
| 48 | /** |
|
| 49 | * {@inheritdoc} |
|
| 50 | */ |
|
| 51 | public function dropDatabase($database) |
|
| 52 | { |
|
| 53 | try { |
|
| 54 | parent::dropDatabase($database); |
|
| 55 | } catch (DBALException $exception) { |
|
| 56 | $exception = $exception->getPrevious(); |
|
| 57 | ||
| 58 | if (! $exception instanceof DriverException) { |
|
| 59 | throw $exception; |
|
| 60 | } |
|
| 61 | ||
| 62 | // If we have a error code 1940 (ORA-01940), the drop database operation failed |
|
| 63 | // because of active connections on the database. |
|
| 64 | // To force dropping the database, we first have to close all active connections |
|
| 65 | // on that database and issue the drop database operation again. |
|
| 66 | if ($exception->getErrorCode() !== 1940) { |
|
| 67 | throw $exception; |
|
| 68 | } |
|
| 69 | ||
| 70 | $this->killUserSessions($database); |
|
| 71 | ||
| 72 | parent::dropDatabase($database); |
|
| 73 | } |
|
| 74 | } |
|
| 75 | ||
| 76 | /** |
|
| 77 | * {@inheritdoc} |
|
| @@ 49-72 (lines=24) @@ | ||
| 46 | /** |
|
| 47 | * {@inheritdoc} |
|
| 48 | */ |
|
| 49 | public function dropDatabase($database) |
|
| 50 | { |
|
| 51 | try { |
|
| 52 | parent::dropDatabase($database); |
|
| 53 | } catch (DBALException $exception) { |
|
| 54 | $exception = $exception->getPrevious(); |
|
| 55 | ||
| 56 | if (! $exception instanceof DriverException) { |
|
| 57 | throw $exception; |
|
| 58 | } |
|
| 59 | ||
| 60 | // If we have a error code 3702, the drop database operation failed |
|
| 61 | // because of active connections on the database. |
|
| 62 | // To force dropping the database, we first have to close all active connections |
|
| 63 | // on that database and issue the drop database operation again. |
|
| 64 | if ($exception->getErrorCode() !== 3702) { |
|
| 65 | throw $exception; |
|
| 66 | } |
|
| 67 | ||
| 68 | $this->closeActiveDatabaseConnections($database); |
|
| 69 | ||
| 70 | parent::dropDatabase($database); |
|
| 71 | } |
|
| 72 | } |
|
| 73 | ||
| 74 | /** |
|
| 75 | * {@inheritdoc} |
|