Thanks for your hint (DBD::mysql). It seems I am closer to the reason (but more confused).

Machine-1 (with correct output) had DBD::mysql version 4.005 and machine-2 (with incorrect output) had DBD::version 3.0001_x.

There is an entry in change-log of DBD::mysql 4.001 which says -

Fix handling of negative integers bound to a column marked as SQL_INTEGER.
[rt.cpan.org #18976], patch from Mike Schilli.

We planned to install 4.00 (to check incorrect value) and then 4.001 (to check correct value) to make sure that the mentioned change is the one we are looking for. But we faced some strange thing. The script gave the desired output even with DBD::mysql version 4.00. We uninstalled it and installed 3.0005 and it also gave the desired output. Finally we installed 3.0000 but everything was working fine now. We manually removed DBD/mysql.pm and the mysql.so files installed with the module and reinstalled the 3.0000 version but unlike previously now we are getting the desired output. Although this solves the problem on our development servers I am keen to find out the reason.


In reply to Re^2: Same DBI version gives different output on different machines by samarzone
in thread Same DBI version gives different output on different machines by samarzone

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.