ocaml-community / ocaml-mariadb

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

empty error string for prepared statements #28

Closed ygrek closed 5 years ago

ygrek commented 5 years ago

Looks like it is a simple typo :

diff --git a/lib/common.ml b/lib/common.ml
index dcc8b98..89cbcce 100644
--- a/lib/common.ml
+++ b/lib/common.ml
@@ -278,7 +278,7 @@ module Stmt = struct
     | Prefetch_rows of int

   let error stmt =
-    (B.mysql_stmt_errno stmt.raw, B.mysql_error stmt.raw)
+    (B.mysql_stmt_errno stmt.raw, B.mysql_stmt_error stmt.raw)

   let fetch_field res i =
     coerce (ptr void) (ptr T.Field.t) (B.mysql_fetch_field_direct res i)
andrenth commented 5 years ago

Thanks, I've fixed it. I'll try to make a new release this week.

andrenth commented 5 years ago

Sorry for the delay. The PR was just submitted: https://github.com/ocaml/opam-repository/pull/14606

ygrek commented 5 years ago

opam release haven't went through because of -warn-errors :(

andrenth commented 5 years ago

I ended up submitting another release, 1.1.4, which builds without warning.

ygrek commented 5 years ago

missed that, thanks!