DBI : Uncleared Implementors

From: Rajdeep Singh Chimni (rajdeep.singh_at_st.com)
Date: 03/31/04

  • Next message: Hardy Merrill: "Re: Access into MVS DB2 using DBI or ???"
    To: <dbi-users@perl.org>
    Date: Wed, 31 Mar 2004 15:40:57 +0530
    
    

    Hi people,
    Having a problem with a script
    that connects to a mysql db and generates a png graph.
    When i run it i get the desired result but i also get the following error

    I saw the destroy sub routine in dbix.pm. It is empty.Is that a problem ??
    I got this reference after some googling = The DESTROY method didn't call DBIc_IMPSET_off

    Name "DBIx::Chart" used only once: possible typo at gp line 8. DBI handle has uncleared implementors data at gp line 16. dbih_clearcom (sth 0x851aa5c 0x85489d0, com 0x8548ae0, imp DBD::mysql::st): FLAGS 0x113: COMSET IMPSET Warn PrintError
    PARENT DBIx::Chart::db=HASH(0x85420c4)
    KIDS 0 (0 Active)
    IMP_DATA undef
    NUM_OF_FIELDS 3
    NUM_OF_PARAMS 0

    SCHEMA
    +-----------+-------------+------+-----+------------+-------+
    | Field | Type | Null | Key | Default | Extra |
    +-----------+-------------+------+-----+------------+-------+
    | ip | varchar(20) | | PRI | | |
    | interface | varchar(25) | | PRI | | |
    | ndate | date | | PRI | 0000-00-00 | |
    | ntime | time | | PRI | 00:00:00 | |
    | bin | int(11) | YES | | NULL | |
    | bout | int(11) | YES | | NULL | |
    +-----------+-------------+------+-----+------------+-------+

    DATA
           ip int ndate ntime bin bout
     10.151.1.254 fe0/1 2004-03-20 04:30:00 0 0
    10.151.1.254 s0/1 2004-03-20 04:30:00 33 44
    138.198.1.254 fe0/0 2004-03-20 04:30:00 455 455

    #! /usr/bin/perl

    use strict;
    use warnings;
    use DBIx::Chart;

    my $db = "DBI:mysql:ndb";
    my $dbh = DBIx::Chart->connect($db,'esm','esm') or die "Can't connect
    +to database: $DBIx::Chart->errstr!";
    my $ip= $dbh->quote('xxx.xxx.xxx.xxx');
    my $int = $dbh->quote('s0/0');
    my $dt = $dbh->quote('2004-03-21');

    my $sth = $dbh->selectrow_arrayref("SELECT ntime,bin,bout from bw_dail
    +y where ndate=".$dt." and ip=".$ip." and interface=".$int." RETURNING
    + LINEGRAPH(ntime,bin,bout) WHERE width=500 and height=250 and title='
    +weekly bandwidth utilization graph' and colors in ('red','blue') and
    +background = 'lgray' and x-axis='time' and y-axis='bandwidth' and sig
    +nature='ESM\@ST' ");
    #$sth->bind_param(1,$dt);
    #$sth->execute;
    open(FI, ">gp1.png");
    binmode FI;
    print FI $$sth[0];
    close FI;
    $dbh->disconnect;
    exit 0;

     how do i get rid of the error ?
    If i graph once it works and throws this warning ,but if i want to run this loop for a number of elements graphing fails after the first one
    Thanks.
    Regards,
    chimni


  • Next message: Hardy Merrill: "Re: Access into MVS DB2 using DBI or ???"