in reply to Typeless bind fails for certain large numbers with MySQL decimal

My attempts to reproduce this (on a 32 bit platform):
$ perl 688836.pl 1..3002 ok 1 - Expect delete_all to return 1 DBD::mysql::st execute failed: Duplicate entry '6700000000000000000' f +or key 1 at 688836.pl line 33. execute failed at 688836.pl line 33. # Looks like you planned 3002 tests but only ran 1. # Looks like your test died just after 1. $ echo 'delete from foo' | mysql moritz2 $ perl -Mbigint 688836.pl 1..3002 ok 1 - Expect delete_all to return 1 ok 2 - Expect 1000 insert(s) ok 3 - Expect 1 row from dynamic_sql(6700000000000000001) Segmentation fault

As I said in the CB, take a look at the trace options in the DBI manpage. Maybe it helps.

Update: valgrind output of the seg fault - maybe somebody knows what to do about it? Perl is version 5.8.8, DBI is 1.53-1etch1 (both as shipped with Debian Etch).

ok 3 - Expect 1 row from dynamic_sql(6700000000000000001) ==28975== ==28975== Invalid read of size 4 ==28975== at 0x56F27A4: (within /usr/lib/perl5/auto/DBD/mysql/mysql +.so) ==28975== by 0x4BDE44D: XS_DBI_dispatch (in /usr/lib/perl5/auto/DBI +/DBI.so) ==28975== by 0x80BDAA0: Perl_pp_entersub (in /usr/bin/perl) ==28975== by 0x80BC378: Perl_runops_standard (in /usr/bin/perl) ==28975== by 0x8063BFC: perl_run (in /usr/bin/perl) ==28975== by 0x805FFD0: main (in /usr/bin/perl) ==28975== Address 0x63697411 is not stack'd, malloc'd or (recently) f +ree'd ==28975== ==28975== Jump to the invalid address stated on the next line ==28975== at 0x0: ??? ==28975== by 0x4BDE44D: XS_DBI_dispatch (in /usr/lib/perl5/auto/DBI +/DBI.so) ==28975== by 0x80BDAA0: Perl_pp_entersub (in /usr/bin/perl) ==28975== by 0x80BC378: Perl_runops_standard (in /usr/bin/perl) ==28975== by 0x8063BFC: perl_run (in /usr/bin/perl) ==28975== by 0x805FFD0: main (in /usr/bin/perl) ==28975== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==28975== ==28975== Process terminating with default action of signal 11 (SIGSEG +V) ==28975== Bad permissions for mapped region at address 0x0 ==28975== at 0x0: ??? ==28975== by 0x4BDE44D: XS_DBI_dispatch (in /usr/lib/perl5/auto/DBI +/DBI.so) ==28975== by 0x80BDAA0: Perl_pp_entersub (in /usr/bin/perl) ==28975== by 0x80BC378: Perl_runops_standard (in /usr/bin/perl) ==28975== by 0x8063BFC: perl_run (in /usr/bin/perl) ==28975== by 0x805FFD0: main (in /usr/bin/perl) ==28975== ==28975== ERROR SUMMARY: 62 errors from 38 contexts (suppressed: 19 fr +om 1) ==28975== malloc/free: in use at exit: 5,927,223 bytes in 136,642 bloc +ks. ==28975== malloc/free: 233,735 allocs, 97,093 frees, 23,564,561 bytes +allocated. ==28975== For counts of detected errors, rerun with: -v ==28975== searching for pointers to 136,642 not-freed blocks. ==28975== checked 6,165,360 bytes. ==28975== ==28975== LEAK SUMMARY: ==28975== definitely lost: 1,365 bytes in 39 blocks. ==28975== possibly lost: 88 bytes in 6 blocks. ==28975== still reachable: 5,925,770 bytes in 136,597 blocks. ==28975== suppressed: 0 bytes in 0 blocks. ==28975== Use --leak-check=full to see details of leaked memory. Segmentation fault