Commit c912fc30 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-18582 preparation: Allocate ibuf statically

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