summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2013-06-24 17:46:51 +0200
committerBart Visscher <bartv@thisnet.nl>2013-06-24 22:38:19 +0200
commit23da0c7d188b4c0a119e16c5be48ce322df29068 (patch)
tree2eeaeb50177ac80f2a4364a4cb0a1ec481921487 /tests
parent9fa4b78ba46a7763f3274b8fa4932cbc16e2ca7f (diff)
downloadnextcloud-server-23da0c7d188b4c0a119e16c5be48ce322df29068.tar.gz
nextcloud-server-23da0c7d188b4c0a119e16c5be48ce322df29068.zip
Fix tableExists test function for Oracle
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/dbschema.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/lib/dbschema.php b/tests/lib/dbschema.php
index 59f203993ef..813112f1fe5 100644
--- a/tests/lib/dbschema.php
+++ b/tests/lib/dbschema.php
@@ -102,9 +102,10 @@ class Test_DBSchema extends PHPUnit_Framework_TestCase {
$exists = $result && $result->fetchOne();
break;
case 'oci':
- $sql = 'SELECT table_name FROM user_tables WHERE table_name = ?';
- $result = \OC_DB::executeAudited($sql, array($table));
- $exists = (bool)$result->fetchOne(); //oracle uses MDB2 and returns null
+ $sql = "SELECT table_name FROM user_tables WHERE table_name = '{$table}'";
+ $query = OC_DB::prepare($sql);
+ $result = $query->execute(array());
+ $exists = $result && $result->fetchOne();
break;
case 'mssql':
$sql = "SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = '{$table}'";