From 955385cee7a979c5be871b8cc5d4c424900b2b98 Mon Sep 17 00:00:00 2001 From: Jure Kajzer Date: Thu, 28 Apr 2011 12:44:19 +0000 Subject: [PATCH] * close connection in class destructor (unlike MySql, Oracle does not commit on close) --- includes/db/DatabaseOracle.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php index 3e84badabb..32ffcc9098 100644 --- a/includes/db/DatabaseOracle.php +++ b/includes/db/DatabaseOracle.php @@ -185,6 +185,14 @@ class DatabaseOracle extends DatabaseBase { wfRunHooks( 'DatabaseOraclePostInit', array( $this ) ); } + function __destruct() { + if ($this->mOpened) { + wfSuppressWarnings(); + $this->close(); + wfRestoreWarnings(); + } + } + function getType() { return 'oracle'; } -- 2.20.1