Below is the list of changes that have just been committed into a local
4.1 repository of Kristofer Pettersson. When Kristofer Pettersson does a push these
changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-01-10 18:04:01+01:00, Kristofer.Pettersson@naruto. +1 -0
Bug#24751 - Possible infinit loop in init_io_cache() when insufficient memory
- When cache memory can't be allocated size is recaclulated using 3/4 of
the requested memory. This number is rounded to the nearest min_cache
step. However with the previous implementation the new cache size might
become bigger than requested because of round errors and thus we get
an infinit loop.
- This patch fixes this problem by ensuring that the rounded number
always will be smaller.
mysys/mf_iocache.c@stripped, 2007-01-10 18:01:42+01:00, Kristofer.Pettersson@naruto. +1 -1
- Added mask to cachesize to ensure that new cache size is smaller than
current.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: Kristofer.Pettersson
# Host: naruto.
# Root: C:/cpp/bug24751/my41-bug24751
--- 1.51/mysys/mf_iocache.c 2007-01-10 18:04:13 +01:00
+++ 1.52/mysys/mf_iocache.c 2007-01-10 18:04:13 +01:00
@@ -222,7 +222,7 @@ int init_io_cache(IO_CACHE *info, File f
}
if (cachesize == min_cache)
DBUG_RETURN(2); /* Can't alloc cache */
- cachesize= (uint) ((long) cachesize*3/4); /* Try with less memory */
+ cachesize= (uint) ((long) cachesize*3/4 & (ulong)~(min_cache-1)); /* Try with
less memory */
}
}
| Thread |
|---|
| • bk commit into 4.1 tree (Kristofer.Pettersson:1.2588) BUG#24751 | kpettersson | 10 Jan |