Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/blocking/blocking_example.ml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ let stream res =
let main () =
let mariadb = connect () |> or_die "connect" in
let query = env "OCAML_MARIADB_QUERY"
"SELECT * FROM mysql.user WHERE User LIKE ?" in
"SELECT * FROM mysql.user WHERE User LIKE ? AND ? < 0" in
let stmt = M.prepare mariadb query |> or_die "prepare" in
let res = M.Stmt.execute stmt [| `String "r%" |] |> or_die "exec" in
let res = M.Stmt.execute stmt [| `String "r%"; `Int (-1) |] |> or_die "exec" in
assert (M.Res.affected_rows res = M.Res.num_rows res);
printf "#rows: %d\n%!" (M.Res.num_rows res);
let s = stream res in
Expand Down
2 changes: 1 addition & 1 deletion lib/bind.ml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ let int ?(unsigned = false) b param ~at =
bind b
~buffer:(coerce (ptr int) (ptr void) p)
~size:(sizeof int)
~mysql_type:T.Type.long_long
~mysql_type:T.Type.long
~unsigned:(if unsigned then yes else no)
~at

Expand Down