summaryrefslogtreecommitdiff
path: root/mysys/tree.c
diff options
context:
space:
mode:
authormonty@mashka.mysql.fi <>2003-01-21 21:07:59 +0200
committermonty@mashka.mysql.fi <>2003-01-21 21:07:59 +0200
commit25c393a12ea7264f265f958027d6e0a1735acc77 (patch)
treeb3f7b07e6d74a88c6ef0b3e8f43bc27b784bb24d /mysys/tree.c
parent6522ee6c9845cf61903592e9a36c78dc4f69f569 (diff)
downloadmariadb-git-25c393a12ea7264f265f958027d6e0a1735acc77.tar.gz
Portability fixes (for windows)
Some changes to the prepared statement protocol to make it easier to use and faster.
Diffstat (limited to 'mysys/tree.c')
-rw-r--r--mysys/tree.c8
1 files changed, 4 insertions, 4 deletions
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;
}