PHP  
 PHP_HEAD
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/oci8/tests/bug42173.phpt ('Bug #42173 (TIMESTAMP and INTERVAL query and field functions)')

Script

1: <?php
2:
3:
require(dirname(__FILE__).'/connect.inc');
4:
5:
$stmts = array(
6:
7:
"drop table ts_test",
8:
9:
"create table ts_test (
10: c1 TIMESTAMP,
11: c2 TIMESTAMP (5),
12: c3 TIMESTAMP WITH TIME ZONE,
13: c4 TIMESTAMP (2) WITH TIME ZONE,
14: c5 TIMESTAMP WITH LOCAL TIME ZONE,
15: c6 INTERVAL YEAR TO MONTH,
16: c7 INTERVAL YEAR(2) TO MONTH,
17: c8 INTERVAL DAY TO SECOND,
18: c9 INTERVAL DAY(2) TO SECOND(3)
19: )"
,
20:
21:
"insert into ts_test values (
22: timestamp'1999-01-03 10:00:00.123',
23: timestamp'1999-01-04 10:00:00.123456',
24: timestamp'1999-01-05 10:00:00.123456+1:0',
25: timestamp'1999-01-06 10:00:00.123456-1:0',
26: timestamp'1999-01-06 10:00:00.123456-1:0',
27: interval'1-2' year to month,
28: interval'10-4' year to month,
29: interval'1 2:20:20.123' day to second,
30: interval'1 2:20:20.12345' day to second)"
);
31:
32: foreach (
$stmts as $sql) {
33:     
$s oci_parse($c$sql);
34:     
$r = @oci_execute($s);
35: }
36:
37:
$s oci_parse($c"select * from ts_test");
38:
$r oci_execute($s);
39:
$row oci_fetch_array($sOCI_ASSOC);
40:
var_dump($row);
41:
42: foreach (
$row as $name => $field) {
43:     echo 
"\nColumn $name\n";
44:     
var_dump(oci_field_is_null($s$name));
45:     
var_dump(oci_field_name($s$name));
46:     
var_dump(oci_field_type($s$name));
47:     
var_dump(oci_field_type_raw($s$name));
48:     
var_dump(oci_field_scale($s$name));
49:     
var_dump(oci_field_precision($s$name));
50:     
var_dump(oci_field_size($s$name));
51: }
52:
53:
// Cleanup
54:
55:
$s oci_parse($c"drop table ts_test");
56:
$r = @oci_execute($s);
57:
58: echo 
"Done\n";
59:
60:
?>
61:

Expected

array(9) {
  ["C1"]=>
  string(28) "03-JAN-99 10.00.00.123000 AM"
  ["C2"]=>
  string(27) "04-JAN-99 10.00.00.12346 AM"
  ["C3"]=>
  string(35) "05-JAN-99 10.00.00.123456 AM +01:00"
  ["C4"]=>
  string(31) "06-JAN-99 10.00.00.12 AM -01:00"
  ["C5"]=>
  string(28) "%s"
  ["C6"]=>
  string(6) "+01-02"
  ["C7"]=>
  string(6) "+10-04"
  ["C8"]=>
  string(19) "+01 02:20:20.123000"
  ["C9"]=>
  string(16) "+01 02:20:20.123"
}

Column C1
bool(false)
string(2) "C1"
string(9) "TIMESTAMP"
int(187)
int(6)
int(0)
int(11)

Column C2
bool(false)
string(2) "C2"
string(9) "TIMESTAMP"
int(187)
int(5)
int(0)
int(11)

Column C3
bool(false)
string(2) "C3"
string(23) "TIMESTAMP WITH TIMEZONE"
int(188)
int(6)
int(0)
int(13)

Column C4
bool(false)
string(2) "C4"
string(23) "TIMESTAMP WITH TIMEZONE"
int(188)
int(2)
int(0)
int(13)

Column C5
bool(false)
string(2) "C5"
string(29) "TIMESTAMP WITH LOCAL TIMEZONE"
int(232)
int(6)
int(0)
int(11)

Column C6
bool(false)
string(2) "C6"
string(22) "INTERVAL YEAR TO MONTH"
int(189)
int(0)
int(2)
int(5)

Column C7
bool(false)
string(2) "C7"
string(22) "INTERVAL YEAR TO MONTH"
int(189)
int(0)
int(2)
int(5)

Column C8
bool(false)
string(2) "C8"
string(22) "INTERVAL DAY TO SECOND"
int(190)
int(6)
int(2)
int(11)

Column C9
bool(false)
string(2) "C9"
string(22) "INTERVAL DAY TO SECOND"
int(190)
int(3)
int(2)
int(11)
Done

Output

***********************************************************************
Fatal NI connect error 12541, connecting to:
 (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=XE)(CID=(PROGRAM=php)(HOST=nex2.php.net)(USER=nlopess)))(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))

  VERSION INFORMATION:
	TNS for Linux: Version 11.2.0.2.0 - Beta
	TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.2.0 - Beta
  Time: 17-JUN-2018 05:02:52
  Tracing not turned on.
  Tns error struct:
    ns main err code: 12541
    TNS-12541: TNS:no listener
    ns secondary err code: 12560
    nt main err code: 511
    TNS-00511: No listener

Fatal error: connect.inc: Failed to connect as 'system' to 'localhost/XE': ORA-12541: TNS:no listener in /var/php_gcov/PHP_HEAD/ext/oci8/tests/connect.inc on line 14
    nt secondary err code: 111
    nt OS err code: 0

Diff

001+ ***********************************************************************
002+ Fatal NI connect error 12541, connecting to:
003+  (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=XE)(CID=(PROGRAM=php)(HOST=nex2.php.net)(USER=nlopess)))(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))
004+ 
005+   VERSION INFORMATION:
006+ 	TNS for Linux: Version 11.2.0.2.0 - Beta
007+ 	TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.2.0 - Beta
008+   Time: 17-JUN-2018 05:02:52
009+   Tracing not turned on.
010+   Tns error struct:
011+     ns main err code: 12541
012+     TNS-12541: TNS:no listener
013+     ns secondary err code: 12560
014+     nt main err code: 511
015+     TNS-00511: No listener
001- array(9) {
002-   ["C1"]=>
003-   string(28) "03-JAN-99 10.00.00.123000 AM"
004-   ["C2"]=>
005-   string(27) "04-JAN-99 10.00.00.12346 AM"
006-   ["C3"]=>
007-   string(35) "05-JAN-99 10.00.00.123456 AM +01:00"
008-   ["C4"]=>
009-   string(31) "06-JAN-99 10.00.00.12 AM -01:00"
010-   ["C5"]=>
011-   string(28) "%s"
012-   ["C6"]=>
013-   string(6) "+01-02"
014-   ["C7"]=>
015-   string(6) "+10-04"
016-   ["C8"]=>
017-   string(19) "+01 02:20:20.123000"
018-   ["C9"]=>
019-   string(16) "+01 02:20:20.123"
020- }
017+ Fatal error: connect.inc: Failed to connect as 'system' to 'localhost/XE': ORA-12541: TNS:no listener in /var/php_gcov/PHP_HEAD/ext/oci8/tests/connect.inc on line 14
018+     nt secondary err code: 111
019+     nt OS err code: 0
022- Column C1
023- bool(false)
024- string(2) "C1"
025- string(9) "TIMESTAMP"
026- int(187)
027- int(6)
028- int(0)
029- int(11)
030- 
031- Column C2
032- bool(false)
033- string(2) "C2"
034- string(9) "TIMESTAMP"
035- int(187)
036- int(5)
037- int(0)
038- int(11)
039- 
040- Column C3
041- bool(false)
042- string(2) "C3"
043- string(23) "TIMESTAMP WITH TIMEZONE"
044- int(188)
045- int(6)
046- int(0)
047- int(13)
048- 
049- Column C4
050- bool(false)
051- string(2) "C4"
052- string(23) "TIMESTAMP WITH TIMEZONE"
053- int(188)
054- int(2)
055- int(0)
056- int(13)
057- 
058- Column C5
059- bool(false)
060- string(2) "C5"
061- string(29) "TIMESTAMP WITH LOCAL TIMEZONE"
062- int(232)
063- int(6)
064- int(0)
065- int(11)
066- 
067- Column C6
068- bool(false)
069- string(2) "C6"
070- string(22) "INTERVAL YEAR TO MONTH"
071- int(189)
072- int(0)
073- int(2)
074- int(5)
075- 
076- Column C7
077- bool(false)
078- string(2) "C7"
079- string(22) "INTERVAL YEAR TO MONTH"
080- int(189)
081- int(0)
082- int(2)
083- int(5)
084- 
085- Column C8
086- bool(false)
087- string(2) "C8"
088- string(22) "INTERVAL DAY TO SECOND"
089- int(190)
090- int(6)
091- int(2)
092- int(11)
093- 
094- Column C9
095- bool(false)
096- string(2) "C9"
097- string(22) "INTERVAL DAY TO SECOND"
098- int(190)
099- int(3)
100- int(2)
101- int(11)
102- Done

 

Generated at Mon, 18 Jun 2018 17:33:50 +0000 (2 days ago)

Copyright © 2005-2018 The PHP Group
All rights reserved.