Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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.


Comment on Re: Overflow of $DBI::rows
Select or Download Code
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (15)
As of 2014-12-18 16:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (58 votes), past polls