in reply to Re: History repeats: 128 bit Math:Bigint numbers in a 64 bit DBI world
in thread History repeats: 128 bit Math:Bigint numbers in a 64 bit DBI world

I'm afraid that won't work for 128 bit numbers.

The largest integer currently available in MySQL is 'bigint' (nothing to do with Math::Bigint) which can store 64 bits. PERL's internal integer type is also 64 bit. Until recently that wasn't even 64 bit clean and suffered overflows (thankfully now fixed). That's why I had to resort to Math::Bigint. My previous code combined two SQL bigint columns to produce one PERL Math::Bigint but that's slow both for the DB and PERL.

  • Comment on Re^2: History repeats: 128 bit Math:Bigint numbers in a 64 bit DBI world

Replies are listed 'Best First'.
Re^3: History repeats: 128 bit Math:Bigint numbers in a 64 bit DBI world
by $h4X4_|=73}{ (Monk) on Jul 01, 2016 at 10:51 UTC
      Yes. That's what I'm already using in the DB.

      This question is about conversions between Math::BigInt and MtSQL via DBI.

      I spoke too soon that the output was being "correctly" converted by DBI.

      It's being printed as a decimal string, rather than as a packed character array of 16 octets.