From: monty Date: November 18 2002 12:59pm Subject: bk commit into 3.23 tree List-Archive: http://lists.mysql.com/internals/5538 Message-Id: <200211181259.gAICxk0A001361@mashka.mysql.fi> Below is the list of changes that have just been committed into a local 3.23 repository of monty. When monty 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://www.mysql.com/doc/I/n/Installing_source_tree.html ChangeSet 1.1254 02/11/18 14:59:45 monty@stripped +1 -0 Small change to make key cache code cleaer mysys/mf_keycache.c 1.15 02/11/18 14:59:43 monty@stripped +6 -5 Small change to make key cache code cleaer # 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: monty # Host: mashka.mysql.fi # Root: /home/my/mysql-3.23 --- 1.14/mysys/mf_keycache.c Sat May 19 10:14:04 2001 +++ 1.15/mysys/mf_keycache.c Mon Nov 18 14:59:43 2002 @@ -548,13 +548,14 @@ count++; } /* Only allocate a new buffer if its bigger than the one we have */ - if (count <= FLUSH_CACHE || - !(cache=(SEC_LINK**) my_malloc(sizeof(SEC_LINK*)*count,MYF(0)))) + if (count > FLUSH_CACHE) { - cache=cache_buff; /* Fall back to safe buffer */ - count=FLUSH_CACHE; + if (!(cache=(SEC_LINK**) my_malloc(sizeof(SEC_LINK*)*count,MYF(0)))) + { + cache=cache_buff; /* Fall back to safe buffer */ + count=FLUSH_CACHE; + } } - end=cache+count; } /* Go through the keys and write them to buffer to be flushed */