From 25c393a12ea7264f265f958027d6e0a1735acc77 Mon Sep 17 00:00:00 2001 From: "monty@mashka.mysql.fi" <> Date: Tue, 21 Jan 2003 21:07:59 +0200 Subject: Portability fixes (for windows) Some changes to the prepared statement protocol to make it easier to use and faster. --- mysys/tree.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mysys/tree.c') diff --git a/mysys/tree.c b/mysys/tree.c index 4b14ffd7112..a3b69ebff5e 100644 --- a/mysys/tree.c +++ b/mysys/tree.c @@ -455,7 +455,7 @@ void *tree_search_next(TREE *tree, TREE_ELEMENT ***last_pos, int l_offs, (each path from root to leaf has the same length) */ ha_rows tree_record_pos(TREE *tree, const void *key, - enum ha_rkey_function flag, void *custom_arg) + enum ha_rkey_function flag, void *custom_arg) { int cmp; TREE_ELEMENT *element= tree->root; @@ -470,7 +470,7 @@ ha_rows tree_record_pos(TREE *tree, const void *key, { switch (flag) { case HA_READ_KEY_EXACT: - last_equal_pos= (left + right) / 2; + last_equal_pos= (ha_rows) ((left + right) / 2); cmp= 1; break; case HA_READ_BEFORE_KEY: @@ -498,9 +498,9 @@ ha_rows tree_record_pos(TREE *tree, const void *key, case HA_READ_KEY_EXACT: return last_equal_pos; case HA_READ_BEFORE_KEY: - return (uint) right; + return (ha_rows) right; case HA_READ_AFTER_KEY: - return (uint) left; + return (ha_rows) left; default: return HA_POS_ERROR; } -- cgit v1.2.1