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

Maybe you need an "integer". This link can help you out 12.1.1 Numeric Type Overview

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

Replies are listed 'Best First'.
Re^2: History repeats: 128 bit Math:Bigint numbers in a 64 bit DBI world
by RayHunter (Acolyte) on Jul 01, 2016 at 10:16 UTC
    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.

        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.