ocaml-community / ocaml-mariadb

OCaml bindings to MariaDB, supporting the nonblocking API
55 stars 18 forks source link

int63 values are bound as int64, making them unsigned #31

Closed cyberhuman closed 2 months ago

cyberhuman commented 4 years ago

Since integers are 63-bit in ocaml, the following code does not work properly when trying to bind negative integers:

https://github.com/andrenth/ocaml-mariadb/blob/master/lib/bind.ml#L123

The effect is when trying to bind -1 to an integer placeholder, it takes the value 2147483647.

rr0gi commented 2 years ago

ref #43