xref: /PHP-8.0/ext/pgsql/tests/80_bug14383.phpt (revision 36de002c)
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(__DIR__.'/../../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(__DIR__.'/../../dba/tests/test.inc');
19require_once(__DIR__.'/../../dba/tests/dba_handler.inc');
20
21?>
22--CLEAN--
23<?php
24require_once(__DIR__.'/../../dba/tests/clean.inc');
25?>
26--EXPECTF--
27database handler: %s
283NYNYY
29Content String 2
30Content 2 replaced
31Read during write:%sallowed
32"key number 6" written
33Failed to write "key number 6" 2nd time
34Content 2 replaced 2nd time
35The 6th value
36array(3) {
37  ["key number 6"]=>
38  string(13) "The 6th value"
39  ["key2"]=>
40  string(27) "Content 2 replaced 2nd time"
41  ["key5"]=>
42  string(23) "The last content string"
43}
44--NO-LOCK--
453NYNYY
46Content String 2
47Content 2 replaced
48Read during write: not allowed
49"key number 6" written
50Failed to write "key number 6" 2nd time
51Content 2 replaced 2nd time
52The 6th value
53array(3) {
54  ["key number 6"]=>
55  string(13) "The 6th value"
56  ["key2"]=>
57  string(27) "Content 2 replaced 2nd time"
58  ["key5"]=>
59  string(23) "The last content string"
60}
61