aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/docs/INSTALL.html2
-rw-r--r--phpBB/docs/coding-guidelines.html2
-rw-r--r--phpBB/includes/functions_install.php2
-rw-r--r--phpBB/language/en/install.php2
-rw-r--r--tests/cache/apc_driver_test.php38
-rw-r--r--tests/cache/common_test_case.php33
-rw-r--r--tests/cache/file_driver_test.php38
-rw-r--r--tests/cache/redis_driver_test.php44
8 files changed, 38 insertions, 123 deletions
diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html
index 07f0cbc8c2..58aeb904c7 100644
--- a/phpBB/docs/INSTALL.html
+++ b/phpBB/docs/INSTALL.html
@@ -132,7 +132,7 @@
<li>A SQL database system, <strong>one of</strong>:
<ul>
<li>MySQL 3.23 or above (MySQLi supported)</li>
- <li>PostgreSQL 7.3+</li>
+ <li>PostgreSQL 8.3+</li>
<li>SQLite 2.8.2+ (SQLite 3 is not supported)</li>
<li>Firebird 2.1+</li>
<li>MS SQL Server 2000 or above (directly or via ODBC or the native adapter)</li>
diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html
index 0e3a97c004..eb569d12d5 100644
--- a/phpBB/docs/coding-guidelines.html
+++ b/phpBB/docs/coding-guidelines.html
@@ -740,7 +740,7 @@ static private function f()
<a name="sql"></a><h3>2.iii. SQL/SQL Layout</h3>
<h4>Common SQL Guidelines: </h4>
- <p>All SQL should be cross-DB compatible, if DB specific SQL is used alternatives must be provided which work on all supported DB's (MySQL3/4/5, MSSQL (7.0 and 2000), PostgreSQL (7.0+), Firebird, SQLite, Oracle8, ODBC (generalised if possible)).</p>
+ <p>All SQL should be cross-DB compatible, if DB specific SQL is used alternatives must be provided which work on all supported DB's (MySQL3/4/5, MSSQL (7.0 and 2000), PostgreSQL (8.3+), Firebird, SQLite, Oracle8, ODBC (generalised if possible)).</p>
<p>All SQL commands should utilise the DataBase Abstraction Layer (DBAL)</p>
<h4>SQL code layout:</h4>
diff --git a/phpBB/includes/functions_install.php b/phpBB/includes/functions_install.php
index 7a799993db..ab6b3ea009 100644
--- a/phpBB/includes/functions_install.php
+++ b/phpBB/includes/functions_install.php
@@ -87,7 +87,7 @@ function get_available_dbms($dbms = false, $return_unavailable = false, $only_20
'2.0.x' => false,
),
'postgres' => array(
- 'LABEL' => 'PostgreSQL 7.x/8.x',
+ 'LABEL' => 'PostgreSQL 8.3+',
'SCHEMA' => 'postgres',
'MODULE' => 'pgsql',
'DELIM' => ';',
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index cb6a17afa2..1c45deae11 100644
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -210,7 +210,7 @@ $lang = array_merge($lang, array(
<p>phpBB3 supports the following databases:</p>
<ul>
<li>MySQL 3.23 or above (MySQLi supported)</li>
- <li>PostgreSQL 7.3+</li>
+ <li>PostgreSQL 8.3+</li>
<li>SQLite 2.8.2+</li>
<li>Firebird 2.1+</li>
<li>MS SQL Server 2000 or above (directly or via ODBC)</li>
diff --git a/tests/cache/apc_driver_test.php b/tests/cache/apc_driver_test.php
index c8b8f82b67..3380762878 100644
--- a/tests/cache/apc_driver_test.php
+++ b/tests/cache/apc_driver_test.php
@@ -50,42 +50,4 @@ class phpbb_cache_apc_driver_test extends phpbb_cache_common_test_case
$this->driver = new phpbb_cache_driver_apc;
$this->driver->purge();
}
-
- public function test_cache_sql()
- {
- global $db, $cache;
- $db = $this->new_dbal();
- $cache = new phpbb_cache_service($this->driver);
-
- $sql = "SELECT * FROM phpbb_config
- WHERE config_name = 'foo'";
-
- $key = $this->driver->key_prefix . 'sql_' . md5(preg_replace('/[\n\r\s\t]+/', ' ', $sql));
- $this->assertFalse(apc_fetch($key));
-
- $result = $db->sql_query($sql, 300);
- $first_result = $db->sql_fetchrow($result);
- $expected = array('config_name' => 'foo', 'config_value' => '23', 'is_dynamic' => 0);
- $this->assertEquals($expected, $first_result);
-
- $this->assertTrue((bool) apc_fetch($key));
-
- $sql = 'DELETE FROM phpbb_config';
- $result = $db->sql_query($sql);
-
- $sql = "SELECT * FROM phpbb_config
- WHERE config_name = 'foo'";
- $result = $db->sql_query($sql, 300);
-
- $this->assertEquals($expected, $db->sql_fetchrow($result));
-
- $sql = "SELECT * FROM phpbb_config
- WHERE config_name = 'foo'";
- $result = $db->sql_query($sql);
-
- $no_cache_result = $db->sql_fetchrow($result);
- $this->assertSame(false, $no_cache_result);
-
- $db->sql_close();
- }
}
diff --git a/tests/cache/common_test_case.php b/tests/cache/common_test_case.php
index 45cf80e424..fa298ec9ae 100644
--- a/tests/cache/common_test_case.php
+++ b/tests/cache/common_test_case.php
@@ -61,4 +61,37 @@ abstract class phpbb_cache_common_test_case extends phpbb_database_test_case
$this->driver->get('second_key')
);
}
+
+ public function test_cache_sql()
+ {
+ global $db, $cache;
+ $db = $this->new_dbal();
+ $cache = new phpbb_cache_service($this->driver);
+
+ $sql = "SELECT * FROM phpbb_config
+ WHERE config_name = 'foo'";
+
+ $result = $db->sql_query($sql, 300);
+ $first_result = $db->sql_fetchrow($result);
+ $expected = array('config_name' => 'foo', 'config_value' => '23', 'is_dynamic' => 0);
+ $this->assertEquals($expected, $first_result);
+
+ $sql = 'DELETE FROM phpbb_config';
+ $result = $db->sql_query($sql);
+
+ $sql = "SELECT * FROM phpbb_config
+ WHERE config_name = 'foo'";
+ $result = $db->sql_query($sql, 300);
+
+ $this->assertEquals($expected, $db->sql_fetchrow($result));
+
+ $sql = "SELECT * FROM phpbb_config
+ WHERE config_name = 'foo'";
+ $result = $db->sql_query($sql);
+
+ $no_cache_result = $db->sql_fetchrow($result);
+ $this->assertSame(false, $no_cache_result);
+
+ $db->sql_close();
+ }
}
diff --git a/tests/cache/file_driver_test.php b/tests/cache/file_driver_test.php
index 2353940277..745c6bb081 100644
--- a/tests/cache/file_driver_test.php
+++ b/tests/cache/file_driver_test.php
@@ -66,42 +66,4 @@ class phpbb_cache_file_driver_test extends phpbb_cache_common_test_case
}
rmdir($this->cache_dir);
}
-
- public function test_cache_sql()
- {
- global $db, $cache;
- $db = $this->new_dbal();
- $cache = new phpbb_cache_service($this->driver);
-
- $sql = "SELECT * FROM phpbb_config
- WHERE config_name = 'foo'";
-
- $cache_path = $this->cache_dir . 'sql_' . md5(preg_replace('/[\n\r\s\t]+/', ' ', $sql)) . '.php';
- $this->assertFileNotExists($cache_path);
-
- $result = $db->sql_query($sql, 300);
- $first_result = $db->sql_fetchrow($result);
- $expected = array('config_name' => 'foo', 'config_value' => '23', 'is_dynamic' => 0);
- $this->assertEquals($expected, $first_result);
-
- $this->assertFileExists($cache_path);
-
- $sql = 'DELETE FROM phpbb_config';
- $result = $db->sql_query($sql);
-
- $sql = "SELECT * FROM phpbb_config
- WHERE config_name = 'foo'";
- $result = $db->sql_query($sql, 300);
-
- $this->assertEquals($expected, $db->sql_fetchrow($result));
-
- $sql = "SELECT * FROM phpbb_config
- WHERE config_name = 'foo'";
- $result = $db->sql_query($sql);
-
- $no_cache_result = $db->sql_fetchrow($result);
- $this->assertSame(false, $no_cache_result);
-
- $db->sql_close();
- }
}
diff --git a/tests/cache/redis_driver_test.php b/tests/cache/redis_driver_test.php
index cd24e33baf..1308519a18 100644
--- a/tests/cache/redis_driver_test.php
+++ b/tests/cache/redis_driver_test.php
@@ -35,7 +35,7 @@ class phpbb_cache_redis_driver_test extends phpbb_cache_common_test_case
}
else
{
- $this->markTestSkipped('Test redis host/port is not specified');
+ self::markTestSkipped('Test redis host/port is not specified');
}
}
@@ -46,46 +46,4 @@ class phpbb_cache_redis_driver_test extends phpbb_cache_common_test_case
$this->driver = new phpbb_cache_driver_redis(self::$config['host'], self::$config['port']);
$this->driver->purge();
}
-
- public function test_cache_sql()
- {
- global $db, $cache;
- $db = $this->new_dbal();
- $cache = new phpbb_cache_service($this->driver);
-
- $redis = new Redis();
- $ok = $redis->connect(self::$config['host'], self::$config['port']);
- $this->assertTrue($ok);
-
- $sql = "SELECT * FROM phpbb_config
- WHERE config_name = 'foo'";
-
- $key = $this->driver->key_prefix . 'sql_' . md5(preg_replace('/[\n\r\s\t]+/', ' ', $sql));
- $this->assertFalse($redis->exists($key));
-
- $result = $db->sql_query($sql, 300);
- $first_result = $db->sql_fetchrow($result);
- $expected = array('config_name' => 'foo', 'config_value' => '23', 'is_dynamic' => 0);
- $this->assertEquals($expected, $first_result);
-
- $this->assertTrue($redis->exists($key));
-
- $sql = 'DELETE FROM phpbb_config';
- $result = $db->sql_query($sql);
-
- $sql = "SELECT * FROM phpbb_config
- WHERE config_name = 'foo'";
- $result = $db->sql_query($sql, 300);
-
- $this->assertEquals($expected, $db->sql_fetchrow($result));
-
- $sql = "SELECT * FROM phpbb_config
- WHERE config_name = 'foo'";
- $result = $db->sql_query($sql);
-
- $no_cache_result = $db->sql_fetchrow($result);
- $this->assertSame(false, $no_cache_result);
-
- $db->sql_close();
- }
}