From 9c61455d264d92194f66549d244ec68cdb3c9ead Mon Sep 17 00:00:00 2001 From: Josh Woody Date: Sun, 6 Jun 2010 08:42:27 -0500 Subject: [ticket/9637] Do not cache SQL server version in all cases Because the existing cache is global, there is no way to differentiate between each of two databases which may be two different DBAL objects pointing to servers with wildly different versions of an RDBMS. phpBB only has this situation in the UCF, thus only one file changed outside the DBAL. I have added a second optional parameter, $use_cache to each of the implementations of dbal::sql_server_info() PHPBB3-9637 --- phpBB/includes/db/oracle.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'phpBB/includes/db/oracle.php') diff --git a/phpBB/includes/db/oracle.php b/phpBB/includes/db/oracle.php index 55b3599800..25df029ea3 100644 --- a/phpBB/includes/db/oracle.php +++ b/phpBB/includes/db/oracle.php @@ -56,10 +56,18 @@ class dbal_oracle extends dbal /** * Version information about used database * @param bool $raw if true, only return the fetched sql_server_version + * @param bool $use_cache forced to false for Oracle * @return string sql server version */ - function sql_server_info($raw = false) + function sql_server_info($raw = false, $use_cache = true) { + /** + * force $use_cache false. I didn't research why the caching code below is commented out + * but I assume its because the Oracle extension provides a direct method to access it + * without a query. + */ + + $use_cache = false; /* global $cache; -- cgit v1.2.1