Annotation of embedaddon/php/ext/pdo_firebird/tests/bug_47415.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #47415 PDO_Firebird segfaults when passing lowercased column name to bindColumn()
3: --SKIPIF--
4: <?php extension_loaded("pdo_firebird") or die("skip"); ?>
5: --FILE--
6: <?php
7:
8: require("testdb.inc");
9:
10: $dbh = new PDO("firebird:dbname=$test_base",$user,$password) or die;
11: $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
12: $value = '2';
13: @$dbh->exec('DROP TABLE testz');
14: $dbh->exec('CREATE TABLE testz (idx int NOT NULL PRIMARY KEY, txt VARCHAR(20))');
15: $dbh->exec('INSERT INTO testz VALUES(0, \'String0\')');
16: $dbh->commit();
17:
18: $query = "SELECT idx, txt FROM testz ORDER by idx";
19: $idx = $txt = 0;
20: $stmt = $dbh->prepare($query);
21: $stmt->bindColumn('idx', $idx);
22: $stmt->bindColumn('txt', $txt);
23: $stmt->execute();
24: $rows = $stmt->fetch(PDO::FETCH_BOUND);
25: var_dump($stmt->fetch());
26: var_dump($stmt->rowCount());
27:
28:
29: $stmt = $dbh->prepare('DELETE FROM testz');
30: $stmt->execute();
31:
32: $dbh->commit();
33:
34: $dbh->exec('DROP TABLE testz');
35:
36: unset($stmt);
37: unset($dbh);
38:
39: ?>
40: --EXPECT--
41: bool(false)
42: int(1)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>