Commit 61e26289 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-18582 preparation: Allocate ibuf statically

parent d09aec7a
...@@ -3099,7 +3099,7 @@ buf_pool_resize() ...@@ -3099,7 +3099,7 @@ buf_pool_resize()
" dictionary."; " dictionary.";
} }
/* normalize ibuf->max_size */ /* normalize ibuf.max_size */
ibuf_max_size_update(srv_change_buffer_max_size); ibuf_max_size_update(srv_change_buffer_max_size);
if (srv_buf_pool_old_size != srv_buf_pool_size) { if (srv_buf_pool_old_size != srv_buf_pool_size) {
......
This diff is collapsed.
...@@ -62,7 +62,7 @@ enum ibuf_use_t { ...@@ -62,7 +62,7 @@ enum ibuf_use_t {
extern ulong innodb_change_buffering; extern ulong innodb_change_buffering;
/** The insert buffer control structure */ /** The insert buffer control structure */
extern ibuf_t* ibuf; extern ibuf_t ibuf;
/* The purpose of the insert buffer is to reduce random disk access. /* The purpose of the insert buffer is to reduce random disk access.
When we wish to insert a record into a non-unique secondary index and When we wish to insert a record into a non-unique secondary index and
......
...@@ -126,7 +126,7 @@ ibuf_should_try( ...@@ -126,7 +126,7 @@ ibuf_should_try(
decide */ decide */
{ {
return(innodb_change_buffering return(innodb_change_buffering
&& ibuf->max_size != 0 && ibuf.max_size != 0
&& !dict_index_is_clust(index) && !dict_index_is_clust(index)
&& !dict_index_is_spatial(index) && !dict_index_is_spatial(index)
&& index->table->quiesce == QUIESCE_NONE && index->table->quiesce == QUIESCE_NONE
......
...@@ -1951,35 +1951,35 @@ srv_mon_process_existing_counter( ...@@ -1951,35 +1951,35 @@ srv_mon_process_existing_counter(
break; break;
case MONITOR_OVLD_IBUF_MERGE_INSERT: case MONITOR_OVLD_IBUF_MERGE_INSERT:
value = ibuf->n_merged_ops[IBUF_OP_INSERT]; value = ibuf.n_merged_ops[IBUF_OP_INSERT];
break; break;
case MONITOR_OVLD_IBUF_MERGE_DELETE: case MONITOR_OVLD_IBUF_MERGE_DELETE:
value = ibuf->n_merged_ops[IBUF_OP_DELETE_MARK]; value = ibuf.n_merged_ops[IBUF_OP_DELETE_MARK];
break; break;
case MONITOR_OVLD_IBUF_MERGE_PURGE: case MONITOR_OVLD_IBUF_MERGE_PURGE:
value = ibuf->n_merged_ops[IBUF_OP_DELETE]; value = ibuf.n_merged_ops[IBUF_OP_DELETE];
break; break;
case MONITOR_OVLD_IBUF_MERGE_DISCARD_INSERT: case MONITOR_OVLD_IBUF_MERGE_DISCARD_INSERT:
value = ibuf->n_discarded_ops[IBUF_OP_INSERT]; value = ibuf.n_discarded_ops[IBUF_OP_INSERT];
break; break;
case MONITOR_OVLD_IBUF_MERGE_DISCARD_DELETE: case MONITOR_OVLD_IBUF_MERGE_DISCARD_DELETE:
value = ibuf->n_discarded_ops[IBUF_OP_DELETE_MARK]; value = ibuf.n_discarded_ops[IBUF_OP_DELETE_MARK];
break; break;
case MONITOR_OVLD_IBUF_MERGE_DISCARD_PURGE: case MONITOR_OVLD_IBUF_MERGE_DISCARD_PURGE:
value = ibuf->n_discarded_ops[IBUF_OP_DELETE]; value = ibuf.n_discarded_ops[IBUF_OP_DELETE];
break; break;
case MONITOR_OVLD_IBUF_MERGES: case MONITOR_OVLD_IBUF_MERGES:
value = ibuf->n_merges; value = ibuf.n_merges;
break; break;
case MONITOR_OVLD_IBUF_SIZE: case MONITOR_OVLD_IBUF_SIZE:
value = ibuf->size; value = ibuf.size;
break; break;
case MONITOR_OVLD_SERVER_ACTIVITY: case MONITOR_OVLD_SERVER_ACTIVITY:
......
...@@ -2483,7 +2483,7 @@ void innodb_shutdown() ...@@ -2483,7 +2483,7 @@ void innodb_shutdown()
#ifdef BTR_CUR_HASH_ADAPT #ifdef BTR_CUR_HASH_ADAPT
ut_ad(btr_search_sys || !srv_was_started); ut_ad(btr_search_sys || !srv_was_started);
#endif /* BTR_CUR_HASH_ADAPT */ #endif /* BTR_CUR_HASH_ADAPT */
ut_ad(ibuf || !srv_was_started); ut_ad(ibuf.index || !srv_was_started);
if (dict_stats_event) { if (dict_stats_event) {
dict_stats_thread_deinit(); dict_stats_thread_deinit();
...@@ -2507,9 +2507,7 @@ void innodb_shutdown() ...@@ -2507,9 +2507,7 @@ void innodb_shutdown()
btr_search_disable(true); btr_search_disable(true);
} }
#endif /* BTR_CUR_HASH_ADAPT */ #endif /* BTR_CUR_HASH_ADAPT */
if (ibuf) { ibuf_close();
ibuf_close();
}
log_sys.close(); log_sys.close();
purge_sys.close(); purge_sys.close();
trx_sys.close(); trx_sys.close();
......
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