Skip to content

Commit

Permalink
fixup! fixup! Allow for very large Integers
Browse files Browse the repository at this point in the history
  • Loading branch information
rbt committed Nov 23, 2022
1 parent e63ea77 commit ab4c1b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/DBDish/mysql/StatementHandle.rakumod
Expand Up @@ -117,7 +117,7 @@ method execute(*@params --> DBDish::StatementHandle) {
when Blob { $st = MYSQL_TYPE_BLOB; $_ }
when Str { .encode }
when Int {
if $_ < 2^63 and $_ > (-1 * 2^63) {
if $_ > (-1 * 2^63) and $_ < 2^63 {
say "TEST TEST TEST !!! $_";
$st = MYSQL_TYPE_LONGLONG;
Blob[int64].new($_);
Expand Down
2 changes: 1 addition & 1 deletion t/24-mysql-large-value.t
Expand Up @@ -75,7 +75,7 @@ subtest 'Very large integer' => {
for @values -> $num {
my ($col1) = $sth.row;

isa-ok $col1, Str;
isa-ok $col1, Int;
is $col1, $num, 'Value: %d digits'.sprintf($num.chars);
}
}

0 comments on commit ab4c1b1

Please sign in to comment.