Skip to content

Loading…

collects/db/private/mysql/message.rkt: parse-decimal: negative number fi... #530

Closed
wants to merge 1 commit into from

3 participants

@zwizwa

Fixes bug in Mysql->Racket datatype conversion for DECIMAL.

before:
(parse-decimal "-123.12") => 3078/25

after:
(parse-decimal "-123.12") => -3078/25

@samth
Racket member

@rmculpepper, can you look at this?

@rmculpepper

This bug is now fixed, and the PR can be closed.

@samth samth closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1 pkgs/db-pkgs/db-lib/db/private/mysql/message.rkt
View
2 pkgs/db-pkgs/db-lib/db/private/mysql/message.rkt
@@ -749,7 +749,7 @@ computed string on the server can be. See also:
;; big integer
=> (lambda (m)
(string->number s))]
- [(regexp-match #rx"^-?([0-9]*)\\.([0-9]*)$" s)
+ [(regexp-match #rx"^(-?[0-9]*)\\.([0-9]*)$" s)
=> (lambda (m)
(+ (string->number (cadr m))
(parse-exact-fraction (caddr m))))]
Something went wrong with that request. Please try again.