File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -50,9 +50,9 @@ let stream res =
50
50
let main () =
51
51
let mariadb = connect () |> or_die " connect" in
52
52
let query = env " OCAML_MARIADB_QUERY"
53
- " SELECT * FROM mysql.user WHERE User LIKE ?" in
53
+ " SELECT * FROM mysql.user WHERE User LIKE ? AND ? < 0 " in
54
54
let stmt = M. prepare mariadb query |> or_die " prepare" in
55
- let res = M.Stmt. execute stmt [| `String " r%" |] |> or_die " exec" in
55
+ let res = M.Stmt. execute stmt [| `String " r%" ; `Int ( - 1 ) |] |> or_die " exec" in
56
56
assert (M.Res. affected_rows res = M.Res. num_rows res);
57
57
printf " #rows: %d\n %!" (M.Res. num_rows res);
58
58
let s = stream res in
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ let int ?(unsigned = false) b param ~at =
120
120
bind b
121
121
~buffer: (coerce (ptr int ) (ptr void) p)
122
122
~size: (sizeof int )
123
- ~mysql_type: T.Type. long_long
123
+ ~mysql_type: T.Type. long
124
124
~unsigned: (if unsigned then yes else no)
125
125
~at
126
126
You can’t perform that action at this time.
0 commit comments