[rrd-users] 2nd Update: PATCH: rrdtool with SQL DS using libdbi

Martin Sperl rrdtool at martin.sperl.org
Sun Nov 19 13:23:19 MET 2006


Hi!
There was a tiny error in my lib-dbi patch in August, which effects
predictions...

Here the short diff to fix the problem as delta to the patch from August:
--- src/rrd_fetch_libdbi.c.orig 2006-10-27 18:46:15.000000000 +0000
+++ src/rrd_fetch_libdbi.c      2006-10-27 18:46:37.000000000 +0000
@@ -160,7 +160,7 @@

    /* now that we have gathered everthing from all tables, process from
here */
    /* calculate deltas */
-  if (valueflags && 1) {
+  if (valueflags & 1) {
      /* create 2 temporary tables */
      if (! rrd_fetch_dbi_do_sql(conn,"CREATE TEMPORARY TABLE tmpDerive1
(id INTEGER NOT NULL AUTO_INCREMENT,grouped INTEGER NOT NULL,time
INTEGER NOT NULL, value DOUBLE NOT NULL, PRIMARY KEY (id),KEY (grouped),
KEY (time))",1)) {
        rrd_fetch_dbi_do_sql(conn,"DROP TEMPORARY TABLE
tmpVals,tmpDerive1",1);

And the full diff as attatchment!

Ciao,
          Martin



-- Attached file removed by Ecartis and put at URL below --
-- Type: text/x-patch
-- Size: 59k (60684 bytes)
-- URL : http://lists.ee.ethz.ch/p/04-rrdtool+libdbi.patch


--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list