[Koha-bugs] [Bug 26035] AutoMemberNum fails on very large cardnumbers

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jul 29 17:22:48 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26035

--- Comment #4 from Andrew Fuerste-Henry <andrew at bywatersolutions.com> ---
So if we don't cast the cardnumber as an integer, mysql doesn't know how to
properly determine the highest cardnumber. It treats them as as strings and
oputs 42 higher than 218250005. If we replace "CAST(cardnumber AS SIGNED" with
"(cardnumber + 0)," the math forces mysql to treat it as a number, but we end
up with a cardnumber in scientific notation if our existing biggest cardnumber
is as big as the initial example (603628999632182575912). 
I played around with "use bigint" and "use Math::BigInt" but didn't get quite
work. They both went from 603628999632182575912 to 603628999630000000001,
suggesting that it's still going to scientific notation and then back again
poorly.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list