List:Commits« Previous MessageNext Message »
From:Ingo Struewing Date:September 15 2009 9:26am
Subject:bzr commit into mysql-pe branch (ingo.struewing:3591) Bug#17332
View as plain text  
#At file:///home2/mydev/bzrroot/mysql-6.0-bug17332-7/ based on revid:joro@stripped

 3591 Ingo Struewing	2009-09-15 [merge]
      Bug#17332 - changing key_buffer_size on a running server
                  can crash under load
      
      Merge from 5.1, after backport from 5.1/5.4 to 5.0.

    modified:
      mysys/mf_keycache.c
      sql/sql_partition.cc
=== modified file 'mysys/mf_keycache.c'
--- a/mysys/mf_keycache.c	2009-07-28 14:16:37 +0000
+++ b/mysys/mf_keycache.c	2009-09-15 09:25:32 +0000
@@ -372,8 +372,8 @@ static inline uint next_power(uint value
 */
 
 int init_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
-		   size_t use_mem, uint division_limit,
-		   uint age_threshold)
+                   size_t use_mem, uint division_limit,
+                   uint age_threshold)
 {
   ulong blocks, hash_links;
   size_t length;
@@ -565,8 +565,8 @@ err:
 */
 
 int resize_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
-		     size_t use_mem, uint division_limit,
-		     uint age_threshold)
+                     size_t use_mem, uint division_limit,
+                     uint age_threshold)
 {
   int blocks;
   DBUG_ENTER("resize_key_cache");
@@ -2449,7 +2449,7 @@ static void read_block(KEY_CACHE *keycac
                        BLOCK_LINK *block, uint read_length,
                        uint min_length, my_bool primary)
 {
-  uint got_length;
+  size_t got_length;
 
   /* On entry cache_lock is locked */
 
@@ -2613,7 +2613,6 @@ uchar *key_cache_read(KEY_CACHE *keycach
     do
     {
       /* Cache could be disabled in a later iteration. */
-      
       if (!keycache->can_be_used)
       {
         KEYCACHE_DBUG_PRINT("key_cache_read", ("keycache cannot be used"));
@@ -2730,7 +2729,7 @@ uchar *key_cache_read(KEY_CACHE *keycach
       if (return_buffer)
 	DBUG_RETURN(block->buffer);
 #endif
-  next_block:
+    next_block:
       buff+= read_length;
       filepos+= read_length+offset;
       offset= 0;
@@ -2968,7 +2967,6 @@ int key_cache_insert(KEY_CACHE *keycache
         DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE));
       } /* end of if (!(block->status & BLOCK_ERROR)) */
 
-
       remove_reader(block);
 
       /* Error injection for coverage testing. */
@@ -3580,7 +3578,6 @@ static int flush_cached_blocks(KEY_CACHE
         right queue anyway.
       */
       link_to_file_list(keycache, block, file, 1);
-
     }
     block->status&= ~BLOCK_IN_FLUSH;
     /*
@@ -3616,7 +3613,7 @@ static int flush_cached_blocks(KEY_CACHE
 
 
 /*
-  flush all key blocks for a file to disk, but don't do any mutex locks.
+  Flush all key blocks for a file to disk, but don't do any mutex locks.
 
   SYNOPSIS
     flush_key_blocks_int()
@@ -3782,7 +3779,6 @@ restart:
             {
               /* It's a temporary file */
               DBUG_ASSERT(!(block->status & BLOCK_REASSIGNED));
-
               /*
                 free_block() must not be called with BLOCK_CHANGED. Note
                 that we must not change the BLOCK_CHANGED flag outside of

=== modified file 'sql/sql_partition.cc'
--- a/sql/sql_partition.cc	2009-09-03 09:40:21 +0000
+++ b/sql/sql_partition.cc	2009-09-15 09:25:32 +0000
@@ -6807,7 +6807,7 @@ int get_part_iter_for_interval_via_mappi
         part_iter->part_nums.cur= part_iter->part_nums.start= 0;
         part_iter->part_nums.end= 0;
         part_iter->ret_null_part= part_iter->ret_null_part_orig= TRUE;
-        return 1;
+        DBUG_RETURN(1);
       }
       part_iter->part_nums.cur= part_iter->part_nums.start;
       if (part_iter->part_nums.start == max_endpoint_val)


Attachment: [text/bzr-bundle] bzr/ingo.struewing@sun.com-20090915092532-1mg4gxh6g96tjd57.bundle
Thread
bzr commit into mysql-pe branch (ingo.struewing:3591) Bug#17332Ingo Struewing15 Sep