summaryrefslogtreecommitdiff
path: root/ext/pdo
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2014-08-11 23:56:34 +0400
committerDmitry Stogov <dmitry@zend.com>2014-08-11 23:56:34 +0400
commit7435fc88a6edfb555e21d7a063d9f65ea3c67ecc (patch)
treed77601c75ff1bdd482b69cafe78d4b6238c86ad5 /ext/pdo
parent3ae802508a85dd400cc5004219f2334a0e88c13e (diff)
downloadphp-git-7435fc88a6edfb555e21d7a063d9f65ea3c67ecc.tar.gz
Fixed pdo_firebird tests failures
Diffstat (limited to 'ext/pdo')
-rw-r--r--ext/pdo/tests/bug65946.phpt7
-rw-r--r--ext/pdo/tests/bug_38253.phpt6
2 files changed, 9 insertions, 4 deletions
diff --git a/ext/pdo/tests/bug65946.phpt b/ext/pdo/tests/bug65946.phpt
index 1c4bd8d6c4..4b63a14bb5 100644
--- a/ext/pdo/tests/bug65946.phpt
+++ b/ext/pdo/tests/bug65946.phpt
@@ -16,7 +16,12 @@ $db = PDOTest::factory();
$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);
$db->exec('CREATE TABLE test(id int)');
$db->exec('INSERT INTO test VALUES(1)');
-$stmt = $db->prepare('SELECT * FROM test LIMIT :limit');
+if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'firebird') {
+ $sql = 'SELECT FIRST :limit * FROM test';
+} else {
+ $sql = 'SELECT * FROM test LIMIT :limit';
+}
+$stmt = $db->prepare($sql);
$stmt->bindValue('limit', 1, PDO::PARAM_INT);
if(!($res = $stmt->execute())) var_dump($stmt->errorInfo());
if(!($res = $stmt->execute())) var_dump($stmt->errorInfo());
diff --git a/ext/pdo/tests/bug_38253.phpt b/ext/pdo/tests/bug_38253.phpt
index 4453c3bb23..e749970a5f 100644
--- a/ext/pdo/tests/bug_38253.phpt
+++ b/ext/pdo/tests/bug_38253.phpt
@@ -22,11 +22,11 @@ $stmt = $pdo->prepare ("SELECT * FROM test");
$stmt->execute();
var_dump($stmt->fetchAll());
-$pdo = PDOTest::factory();
-
if ($pdo->getAttribute(PDO::ATTR_DRIVER_NAME) == 'oci') {
$type = "clob";
-} else{
+} else if ($pdo->getAttribute(PDO::ATTR_DRIVER_NAME) == 'firebird') {
+ $type = 'BLOB SUB_TYPE TEXT';
+} else {
$type = "text";
}