1--TEST--
2Bug #62024 Cannot insert second row with null using parametrized query (Firebird PDO)
3--EXTENSIONS--
4pdo_firebird
5--SKIPIF--
6<?php require('skipif.inc'); ?>
7--ENV--
8LSAN_OPTIONS=detect_leaks=0
9--FILE--
10<?php
11
12require("testdb.inc");
13
14$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
15@$dbh->exec('DROP TABLE test_insert');
16$dbh->exec("CREATE TABLE test_insert (ID INTEGER NOT NULL, TEXT VARCHAR(10))");
17
18$dbh->commit();
19
20//start actual test
21
22$sql = "insert into test_insert (id, text) values (?, ?)";
23$sttmt = $dbh->prepare($sql);
24
25$args_ok = array(1, "test1");
26$args_err = array(2, null);
27
28$res = $sttmt->execute($args_ok);
29var_dump($res);
30
31$res = $sttmt->execute($args_err);
32var_dump($res);
33
34$dbh->commit();
35
36
37//teardown test data
38$sttmt = $dbh->prepare('DELETE FROM test_insert');
39$sttmt->execute();
40
41$dbh->commit();
42
43$dbh->exec('DROP TABLE test_insert');
44
45unset($sttmt);
46unset($dbh);
47
48?>
49--EXPECT--
50bool(true)
51bool(true)
52