summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorsasha@mysql.sashanet.com <>2001-06-04 17:34:11 -0600
committersasha@mysql.sashanet.com <>2001-06-04 17:34:11 -0600
commit060da63ab3b830770d5573708766a187d2916811 (patch)
tree4a4e924d33acb60a72c034f4b7ff58112c07d6dd /mysys
parent1d05b8998070a23dd6f49a4885fe09f4cbc1fb8c (diff)
parentf237cdc04145e027365727093a82240e6d162bc0 (diff)
downloadmariadb-git-060da63ab3b830770d5573708766a187d2916811.tar.gz
Merge mysql.sashanet.com:/home/sasha/src/bk/mysql
into mysql.sashanet.com:/home/sasha/src/bk/mysql-4.0
Diffstat (limited to 'mysys')
-rw-r--r--mysys/getvar.c2
-rw-r--r--mysys/tree.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/mysys/getvar.c b/mysys/getvar.c
index e0f60b207b7..90ab599244d 100644
--- a/mysys/getvar.c
+++ b/mysys/getvar.c
@@ -101,7 +101,7 @@ my_bool set_changeable_var(my_string str,CHANGEABLE_VAR *vars)
}
if (num < (longlong) found->min_value)
num=(longlong) found->min_value;
- else if (num > (longlong) (ulong) found->max_value)
+ else if (num > 0 && (ulonglong) num > (ulonglong) (ulong) found->max_value)
num=(longlong) (ulong) found->max_value;
num=((num- (longlong) found->sub_size) / (ulonglong) found->block_size);
(*found->varptr)= (long) (num*(ulonglong) found->block_size);
diff --git a/mysys/tree.c b/mysys/tree.c
index af64be55d2f..02e8fdb12bd 100644
--- a/mysys/tree.c
+++ b/mysys/tree.c
@@ -266,6 +266,8 @@ int tree_delete(TREE *tree, void *key)
}
if (remove_colour == BLACK)
rb_delete_fixup(tree,parent);
+ if (tree->free)
+ (*tree->free)(ELEMENT_KEY(tree,element));
my_free((gptr) element,MYF(0));
tree->elements_in_tree--;
return 0;