php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58048 value of Interval is right shifted
Submitted: 2008-02-20 06:37 UTC Modified: 2008-11-11 06:39 UTC
From: yetos at seznam dot cz Assigned:
Status: Closed Package: PDO_INFORMIX (PECL)
PHP Version: 5.1.6 OS: RHEL 5.1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: yetos at seznam dot cz
New email:
PHP Version: OS:

 

 [2008-02-20 06:37 UTC] yetos at seznam dot cz
Description:
------------
Select interval value is right shifted 

"12:34:56"  - value in DB : INTERVAL HOUR TO SECOND

pdo_informix return as

" 12:34:5"


Datetime work OK

Reproduce code:
---------------
echo "<PRE>";

$db = new PDO("informix: database=dbxy; server=ds0_vyvoj");
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

$db->exec("CREATE TEMP TABLE ttt ( col1  interval hour to second ) ");
$db->exec("INSERT INTO ttt VALUES ('01:23:45' ) ");

$stm = $db->query("SELECT * FROM ttt");
foreach ( $stm as $row )
     var_dump( $row );


Expected result:
----------------
array(2) {
  ["COL1"]=>
  string(8) "12:34:56"
  [0]=>
  string(8) "12:34:56"
}

Actual result:
--------------
array(2) {
  ["COL1"]=>
  string(8) " 12:34:5"
  [0]=>
  string(8) " 12:34:5"
}

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-22 09:18 UTC] cgourion at yahoo dot fr
Same bug with PDO_INFORMIX (php_pdo_informix.dll version 5.2.5.5) on Windows XP
 [2008-08-28 08:11 UTC] opendev at us dot ibm dot com
Hi,

We are able to reproduce this problem. We will fix this bug and make new release as soon as possible.

Regards,
Ambrish Bhargava
 [2008-11-11 06:39 UTC] abhargav at in dot ibm dot com
Hi All,

"Value of Interval is right shifted" bug in PDO_INFORMIX has been fixed in 1.2.6 version release.

Regards,
Ambrish Bhargava
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC