Commit bc3dc7df authored by Vasil Dimov's avatar Vasil Dimov

Merge from mysql-5.1-innodb:

  ------------------------------------------------------------
  revno: 3433
  revision-id: mmakela@bk-internal.mysql.com-20100429133750-7ggyepb4erfg8eqe
  parent: mmakela@bk-internal.mysql.com-20100429132945-l4gm15tsmkjm24kv
  committer: Marko Makela <mmakela@bk-internal.mysql.com>
  branch nick: mysql-5.1-innodb
  timestamp: Thu 2010-04-29 15:37:50 +0200
  message:
    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.
    This addresses Bug #53122 in the InnoDB Plugin.
  modified:
    storage/innodb_plugin/ChangeLog 2425@16c675df-0fcb-4bc9-8058-dcc011a37293:branches%2Fzip%2FChangeLog
    storage/innodb_plugin/include/log0recv.h 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Flog0recv.h
    storage/innodb_plugin/log/log0recv.c 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Flog%2Flog0recv.c
  ------------------------------------------------------------
parent 4b2c8e26
...@@ -368,8 +368,8 @@ typedef struct recv_addr_struct recv_addr_t; ...@@ -368,8 +368,8 @@ typedef struct recv_addr_struct recv_addr_t;
struct recv_addr_struct{ struct recv_addr_struct{
enum recv_addr_state state; enum recv_addr_state state;
/*!< recovery state of the page */ /*!< recovery state of the page */
ulint space; /*!< space id */ unsigned space:32;/*!< space id */
ulint page_no;/*!< page number */ unsigned page_no:32;/*!< page number */
UT_LIST_BASE_NODE_T(recv_t) UT_LIST_BASE_NODE_T(recv_t)
rec_list;/*!< list of log records for this page */ rec_list;/*!< list of log records for this page */
hash_node_t addr_hash;/*!< hash node in the hash bucket chain */ hash_node_t addr_hash;/*!< hash node in the hash bucket chain */
......
...@@ -331,7 +331,7 @@ recv_sys_init( ...@@ -331,7 +331,7 @@ recv_sys_init(
recv_sys->len = 0; recv_sys->len = 0;
recv_sys->recovered_offset = 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->n_addrs = 0;
recv_sys->apply_log_recs = FALSE; recv_sys->apply_log_recs = FALSE;
...@@ -371,7 +371,7 @@ recv_sys_empty_hash(void) ...@@ -371,7 +371,7 @@ recv_sys_empty_hash(void)
hash_table_free(recv_sys->addr_hash); hash_table_free(recv_sys->addr_hash);
mem_heap_empty(recv_sys->heap); 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 #ifndef UNIV_HOTBACKUP
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment