php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59895 RRDUpdater::update not working with multiple DS
Submitted: 2011-08-17 04:25 UTC Modified: 2011-09-05 10:55 UTC
From: henrikolsen at gmail dot com Assigned: koubel (profile)
Status: Closed Package: rrd (PECL)
PHP Version: 5.3.2 OS: Ubuntu 10.04.1 LTS
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:
40 - 32 = ?
Subscribe to this entry?

 
 [2011-08-17 04:25 UTC] henrikolsen at gmail dot com
Description:
------------
When giving multiple key/value pairs in the values argument to 
RRFUpdater::update, it seems only the first pair is actually 
being set.

Reproduce code:
---------------
<?php
$rrdFile = '/tmp/test.rrd';

$creator = new RRDCreator($rrdFile, 1313557200, 3600);
$creator->addDataSource("speed:GAUGE:3600:U:U");
$creator->addDataSource("weight:GAUGE:3600:U:U");
$creator->addArchive("AVERAGE:0.5:1:24");
$creator->save();

$updator = new RRDUpdater($rrdFile);
$updator->update(array('speed' => 42, 'weight' => 18), 1313560800);

rm /tmp/test.rrd; php /tmp/rrd.php; rrdtool fetch /tmp/test.rrd AVERAGE -s 1313557200 -e 1313557200
                          speed              weight

1313560800: 4.2000000000e+01 -nan

Expected result:
----------------
I expect both key/value pairs set (speed to 42 and weight to 
18).

Actual result:
--------------
Only the first key/value pair is set.

rm /tmp/test.rrd; php /tmp/rrd.php; rrdtool fetch 
/tmp/test.rrd AVERAGE -s 1313557200 -e 1313557200
                          speed              weight

1313560800: 4.2000000000e+01 -nan

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-09-05 10:55 UTC] koubel at seznam dot cz
This bug has been fixed in SVN.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 11:01:29 2024 UTC