http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6981
Marc Véron <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #5 from Marc Véron <[email protected]> --- It seems that it is an issue of representation of numbers in Perl. Up to a certain value they are repersented as integers, then as float, and that leads to a loss of precision. I did the following test: Using MySQL, set the highest value in the table to 2345678765345430 Adding an item, the form displays 2345678765345431 (as expected) Following item sticks with 2345678765345431 (as described in the bug report) However: I you set the value to 2345678765345435 the form will show a value of 2345678765345441 (!) This is the code snippet in barcode.pl (around line 90): ----snip---- elsif ($autoBarcodeType eq 'incremental') { # not the best, two catalogers could add the same barcode easily this way :/ $query = "select max(abs(barcode)) from items"; my $sth = $dbh->prepare($query); $sth->execute(); while (my ($count)= $sth->fetchrow_array) { $nextnum = $count; } $nextnum++; } ----end snip---- About numbers in Perl: http://perldoc.perl.org/perlnumber.html Maybe the issue could be solved with http://perldoc.perl.org/Math/BigInt.html Following questions should be considered: - Side effects with BigInt? - If the correct new number can be transferred into the java script code, what happens when writing back the number into the database? - What about the comment in the code snippet: # not the best, two catalogers could add the same barcode easily this way :/ ? -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
