Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: Overflow of $DBI::rows

by mje (Curate)
on Dec 10, 2012 at 10:19 UTC ( #1008082=note: print w/replies, xml ) Need Help??

in reply to Overflow of $DBI::rows

When DBD::ODBC is built 64 bit and has access to the correct header files SQLRowCount (the ODBC API to retrieve rows affected) should return an SQLLEN which on 64 bit platforms is 8 bytes. However, the DBI XS interface to DBD::ODBC has:

int dbd_st_execute( SV *sth, imp_sth_t *imp_sth)

and dbd_db_execute is supposed to return the rows affected. There are also other places in DBD::ODBC where the affected rows is cast to an int. I think fixes would be required in both DBI and DBD::ODBC. See also:

dbd_xsh.h:int dbd_st_execute _((SV *sth, imp_sth_t *imp_sth));

in dbd_xsh.h of DBI.

Replies are listed 'Best First'.
Re^2: Overflow of $DBI::rows
by mbethke (Hermit) on Dec 11, 2012 at 01:47 UTC

    Actually these ints should automatically 64 bits on any sane compiler where SQLLONG would be 64 bits, even if the standard doesn't require it. For clarity they should be fixed to size_t where negative values aren't used to signal errors, although I don't think any of them could be at fault here.

      They cannot be size_t for a start because they have to be able to contain negative values. I cannot comment as to what you believe is a sane compiler but ints and long ints on Windows 64 are 32 bits.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1008082]
and !@monks...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2018-06-18 23:52 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (111 votes). Check out past polls.