xref: /PHP-7.3/ext/pgsql/tests/80_bug14383.phpt (revision 782352c5)
1--TEST--
2Bug #14383 (8.0+) (using postgres with DBA causes DBA not to be able to find any keys)
3--SKIPIF--
4<?php
5require_once(dirname(__FILE__).'/../../dba/tests/skipif.inc');
6require_once('skipif.inc');
7?>
8--FILE--
9<?php
10require_once('config.inc');
11
12$dbh = @pg_connect($conn_str);
13if (!$dbh) {
14	die ("Could not connect to the server");
15}
16pg_close($dbh);
17
18require_once(dirname(__FILE__).'/../../dba/tests/test.inc');
19require_once(dirname(__FILE__).'/../../dba/tests/dba_handler.inc');
20
21?>
22--EXPECTF--
23database handler: %s
243NYNYY
25Content String 2
26Content 2 replaced
27Read during write:%sallowed
28"key number 6" written
29Failed to write "key number 6" 2nd time
30Content 2 replaced 2nd time
31The 6th value
32array(3) {
33  ["key number 6"]=>
34  string(13) "The 6th value"
35  ["key2"]=>
36  string(27) "Content 2 replaced 2nd time"
37  ["key5"]=>
38  string(23) "The last content string"
39}
40--NO-LOCK--
413NYNYY
42Content String 2
43Content 2 replaced
44Read during write: not allowed
45"key number 6" written
46Failed to write "key number 6" 2nd time
47Content 2 replaced 2nd time
48The 6th value
49array(3) {
50  ["key number 6"]=>
51  string(13) "The 6th value"
52  ["key2"]=>
53  string(27) "Content 2 replaced 2nd time"
54  ["key5"]=>
55  string(23) "The last content string"
56}
57