Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re^8: DBIC intermittently returning rows missing date_time value

by Corion (Patriarch)
on Jun 29, 2009 at 13:22 UTC ( [id://775660]=note: print w/replies, xml ) Need Help??

in reply to Re^7: DBIC intermittently returning rows missing date_time value
in thread DBIC intermittently returning rows missing date_time value

Now, looking at your actual output, I see that indeed, date_time cannot be NULL because you order by it. So it must be a bug or a problem with either DBIx::Class or your database driver. I don't know if it's easy to get at the unsullied result set as returned by DBI, but maybe you can determine the culprit by doing:

my $dbh = DBI->connect(..., {RaiseError => 1}); my $sth = $dbh->prepare(<<SQL); SELECT,, me.date_time, me.status_code, me.time_taken + FROM tests me WHERE ( ( ( date_time <= ? AND date_time >= ? ) AND name = ? ) ) ORDER BY date_time SQL $sth->execute('2009-06-24 23:59:59', '2009-06-24 00:00:00', 'ART_CRV') +; my $res = $sth->fetchall_arrayref(); print Dumper($res);

If you find any undef in there, the problem is with your DBD. If you don't find any undef there, the problem is likely in your DBIx::Class stack somewhere.

Replies are listed 'Best First'.
Re^9: DBIC intermittently returning rows missing date_time value
by reasonablekeith (Deacon) on Jun 29, 2009 at 14:23 UTC
    ++. I just ran this and was missing data in the results from this too.

    I would have perhaps guessed earlier that this might be a db problem if I'd paid attention to the version of mysql we have on this box, 6.0.11-alpha-community!

    I shall be getting this downgraded sharpish! Sorry to waste your time guys, I think it was the only version number I didn't put in my original post!

    Many Thanks,

    my name's not Keith, and I'm not reasonable.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://775660]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-16 11:57 GMT
Find Nodes?
    Voting Booth?

    No recent polls found