php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61316 data array shouldn't use timestamp as key in rrd_lastupdate
Submitted: 2012-03-07 10:02 UTC Modified: 2012-06-04 09:52 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: david at nfrance dot com Assigned: koubel (profile)
Status: Closed Package: rrd (PECL)
PHP Version: 5.3.10 OS: FreeBSD
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
9 + 11 = ?
Subscribe to this entry?

 
 [2012-03-07 10:02 UTC] david at nfrance dot com
Description:
------------
When using rrd_lastupdate on a rrd file with multiples values, the data array only contain one value, but the ds_navm array contain multiples values.

The data array shouldn't use timestamp as key in rrd_lastupdate, but the ds_name (or ds_index), to support multiple values.



Test script:
---------------
$values = rrd_lastupdate("my_multiples_values_rrd_file");;
print_r($values);

Expected result:
----------------
The data array should contain values for each ds.

Actual result:
--------------
The data array contain only one value and the index is the timestamp.

Patches

rrd_lastupdate_use_ds_name_as_index (last revision 2012-03-07 10:04 UTC by david at nfrance dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-06-04 09:10 UTC] koubel@php.net
Simple array will be used. When the associative array would be used, data source names in the return array (under "ds_navm" key) would be useless and duplicate. It's little BC break also.
 [2012-06-04 09:10 UTC] koubel@php.net
-Status: Open +Status: Assigned -Type: Feature/Change Request +Type: Bug
 [2012-06-04 09:11 UTC] koubel@php.net
-Assigned To: +Assigned To: koubel
 [2012-06-04 09:18 UTC] koubel@php.net
Automatic comment from SVN on behalf of koubel
Revision: http://svn.php.net/viewvc/?view=revision&revision=325960
Log: rrd_lastupdate - bug with multiple data source #61316
 [2012-06-04 09:52 UTC] koubel@php.net
fixed, new version (1.1.0 because of BC break) will be released.
 [2012-06-04 09:52 UTC] koubel@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 08:01:27 2024 UTC