List:Commits« Previous MessageNext Message »
From:marko.makela Date:April 28 2010 1:02pm
Subject:bzr commit into mysql-5.1-innodb branch (marko.makela:3425) Bug#53122
View as plain text  
#At file:///home/marko/innobase/dev/mysql/5.1-innodb/ based on revid:marko.makela@strippedlc8kzw10ub

 3425 Marko Mäkelä	2010-04-28
      recv_sys_init(), recv_sys_empty_hash(): Shrink recv_sys->addr_hash.
      recv_addr_t: Turn space,page_no into bitfields to save space on 64-bit.
      (Bug #53122)

    modified:
      storage/innodb_plugin/ChangeLog
      storage/innodb_plugin/include/log0recv.h
      storage/innodb_plugin/log/log0recv.c
=== modified file 'storage/innodb_plugin/ChangeLog'
--- a/storage/innodb_plugin/ChangeLog	2010-04-27 13:54:07 +0000
+++ b/storage/innodb_plugin/ChangeLog	2010-04-28 13:02:25 +0000
@@ -1,3 +1,9 @@
+2010-04-28	The InnoDB Team
+
+	* log/log0recv.h, log/log0recv.c:
+	Fix Bug#53122 InnoDB recovery uses too big a hash table for redo
+	log records
+
 2010-04-27	The InnoDB Team
 
 	* handler/ha_innodb.cc, lock/lock0lock.c, row/row0mysql.c,

=== modified file 'storage/innodb_plugin/include/log0recv.h'
--- a/storage/innodb_plugin/include/log0recv.h	2010-02-20 16:45:41 +0000
+++ b/storage/innodb_plugin/include/log0recv.h	2010-04-28 13:02:25 +0000
@@ -368,8 +368,8 @@ typedef struct recv_addr_struct	recv_add
 struct recv_addr_struct{
 	enum recv_addr_state state;
 				/*!< recovery state of the page */
-	ulint		space;	/*!< space id */
-	ulint		page_no;/*!< page number */
+	unsigned	space:32;/*!< space id */
+	unsigned	page_no:32;/*!< page number */
 	UT_LIST_BASE_NODE_T(recv_t)
 			rec_list;/*!< list of log records for this page */
 	hash_node_t	addr_hash;/*!< hash node in the hash bucket chain */

=== modified file 'storage/innodb_plugin/log/log0recv.c'
--- a/storage/innodb_plugin/log/log0recv.c	2010-04-26 11:26:09 +0000
+++ b/storage/innodb_plugin/log/log0recv.c	2010-04-28 13:02:25 +0000
@@ -321,7 +321,7 @@ recv_sys_init(
 	recv_sys->len = 0;
 	recv_sys->recovered_offset = 0;
 
-	recv_sys->addr_hash = hash_create(available_memory / 64);
+	recv_sys->addr_hash = hash_create(available_memory / 512);
 	recv_sys->n_addrs = 0;
 
 	recv_sys->apply_log_recs = FALSE;
@@ -361,7 +361,7 @@ recv_sys_empty_hash(void)
 	hash_table_free(recv_sys->addr_hash);
 	mem_heap_empty(recv_sys->heap);
 
-	recv_sys->addr_hash = hash_create(buf_pool_get_curr_size() / 256);
+	recv_sys->addr_hash = hash_create(buf_pool_get_curr_size() / 512);
 }
 
 #ifndef UNIV_HOTBACKUP

Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20100428130225-napi1bi6395i5073.bundle
Thread
bzr commit into mysql-5.1-innodb branch (marko.makela:3425) Bug#53122marko.makela28 Apr