Commit 8b40a79c authored by marko's avatar marko

branches/zip: Enable calls to inlined InnoDB functions in ha_innodb.cc,

now that all of InnoDB code is built from a single Makefile and it should
not be possible to build the modules with mutually incompatible options.

#define INSIDE_HA_INNOBASE_CC: Remove.

srv_sizeof_trx_t_in_ha_innodb_cc: Remove.

dict_table_get_low_noninlined(): Remove.  This function was unused.

Remove all _noninline functions.  Remove the _noninline suffix from
all function calls in ha_innodb.cc.
parent 7e687905
......@@ -29,41 +29,6 @@ ulint data_dummy; /* this is used to fool the compiler in
dtuple_validate */
#endif /* UNIV_DEBUG */
/* Some non-inlined functions used in the MySQL interface: */
void
dfield_set_data_noninline(
dfield_t* field, /* in: field */
void* data, /* in: data */
ulint len) /* in: length or UNIV_SQL_NULL */
{
dfield_set_data(field, data, len);
}
void*
dfield_get_data_noninline(
dfield_t* field) /* in: field */
{
return(dfield_get_data(field));
}
ulint
dfield_get_len_noninline(
const dfield_t* field) /* in: field */
{
return(dfield_get_len(field));
}
ulint
dtuple_get_n_fields_noninline(
const dtuple_t* tuple) /* in: tuple */
{
return(dtuple_get_n_fields(tuple));
}
const dfield_t*
dtuple_get_nth_field_noninline(
const dtuple_t* tuple, /* in: tuple */
ulint n) /* in: index of field */
{
return(dtuple_get_nth_field(tuple, n));
}
/*************************************************************************
Tests if dfield data length and content is equal to the given. */
......
......@@ -152,17 +152,6 @@ dtype_is_non_binary_string_type(
return(FALSE);
}
/*************************************************************************
Gets the MySQL charset-collation code for MySQL string types. */
ulint
dtype_get_charset_coll_noninline(
/*=============================*/
ulint prtype) /* in: precise data type */
{
return(dtype_get_charset_coll(prtype));
}
/*************************************************************************
Forms a precise type from the < 4.1.2 format precise type plus the
charset-collation code. */
......
......@@ -320,55 +320,6 @@ dict_table_decrement_handle_count(
mutex_exit(&(dict_sys->mutex));
}
/*************************************************************************
Gets the column data type. */
void
dict_col_copy_type_noninline(
/*=========================*/
const dict_col_t* col, /* in: column */
dtype_t* type) /* out: data type */
{
dict_col_copy_type(col, type);
}
/************************************************************************
Gets the nth column of a table. */
const dict_col_t*
dict_table_get_nth_col_noninline(
/*=============================*/
/* out: pointer to column object */
const dict_table_t* table, /* in: table */
ulint pos) /* in: position of column */
{
return(dict_table_get_nth_col(table, pos));
}
/************************************************************************
Gets the first index on the table (the clustered index). */
dict_index_t*
dict_table_get_first_index_noninline(
/*=================================*/
/* out: index, NULL if none exists */
dict_table_t* table) /* in: table */
{
return(dict_table_get_first_index(table));
}
/************************************************************************
Gets the next index on the table. */
dict_index_t*
dict_table_get_next_index_noninline(
/*================================*/
/* out: index, NULL if none left */
dict_index_t* index) /* in: index */
{
return(dict_table_get_next_index(index));
}
/**************************************************************************
Returns a column's name. */
......@@ -730,19 +681,6 @@ dict_table_get_nth_col_pos(
n));
}
/************************************************************************
Check whether the table uses the compact page format. */
ibool
dict_table_is_comp_noninline(
/*=========================*/
/* out: TRUE if table uses the
compact page format */
const dict_table_t* table) /* in: table */
{
return(dict_table_is_comp(table));
}
/************************************************************************
Checks if a column is in the ordering columns of the clustered index of a
table. Column prefixes are treated like whole columns. */
......@@ -1310,18 +1248,6 @@ dict_table_remove_from_cache(
dict_mem_table_free(table);
}
/*************************************************************************
Gets the column position in the clustered index. */
ulint
dict_col_get_clust_pos_noninline(
/*=============================*/
const dict_col_t* col, /* in: table column */
const dict_index_t* clust_index) /* in: clustered index */
{
return(dict_col_get_clust_pos(col, clust_index));
}
/********************************************************************
If the given column name is reserved for InnoDB system columns, return
TRUE. */
......@@ -4003,18 +3929,6 @@ dict_update_statistics(
dict_update_statistics_low(table, FALSE);
}
/**************************************************************************
A noninlined version of dict_table_get_low. */
dict_table_t*
dict_table_get_low_noninlined(
/*==========================*/
/* out: table, NULL if not found */
const char* table_name) /* in: table name */
{
return(dict_table_get_low(table_name));
}
/**************************************************************************
Prints info of a foreign key constraint. */
static
......
......@@ -13,10 +13,6 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* This file defines the InnoDB handler: the interface between MySQL and InnoDB
NOTE: You can only use noninlined InnoDB functions in this file, because we
have disabled the InnoDB inlining in this file. */
/* TODO list for the InnoDB handler in 5.0:
- Remove the flag trx->active_trans and look at trx->conc_state
- fix savepoint functions to use savepoint storage area
......@@ -83,8 +79,6 @@ uses unsigned char; the header univ.i which we include next defines
typedef uchar mysql_byte;
#define INSIDE_HA_INNOBASE_CC
/* Include necessary InnoDB headers */
extern "C" {
#include "univ.i"
......@@ -1163,9 +1157,9 @@ innobase_query_caching_of_table_permitted(
"search, latch though calling "
"innobase_query_caching_of_table_permitted.");
mutex_enter_noninline(&kernel_mutex);
mutex_enter(&kernel_mutex);
trx_print(stderr, trx, 1024);
mutex_exit_noninline(&kernel_mutex);
mutex_exit(&kernel_mutex);
}
innobase_release_stat_resources(trx);
......@@ -1377,7 +1371,7 @@ ha_innobase::init_table_handle_for_HANDLER(void)
/* If the transaction is not started yet, start it */
trx_start_if_not_started_noninline(prebuilt->trx);
trx_start_if_not_started(prebuilt->trx);
/* Assign a read view if the transaction does not have it yet */
......@@ -1662,8 +1656,6 @@ innobase_init(
modules, we check at run time that the size is the same in
these compilation modules. */
srv_sizeof_trx_t_in_ha_innodb_cc = sizeof(trx_t);
err = innobase_start_or_create_for_mysql();
if (err != DB_SUCCESS) {
......@@ -1803,7 +1795,7 @@ innobase_start_trx_and_assign_read_view(
/* If the transaction is not started yet, start it */
trx_start_if_not_started_noninline(trx);
trx_start_if_not_started(trx);
/* Assign a read view if the transaction does not have it yet */
......@@ -2003,7 +1995,7 @@ innobase_store_binlog_offset_and_flush_log(
assert(binlog_name != NULL);
/* Start a mini-transaction */
mtr_start_noninline(&mtr);
mtr_start(&mtr);
/* Update the latest MySQL binlog name and offset info
in trx sys header */
......@@ -2303,7 +2295,7 @@ ha_innobase::get_row_type() const
/* out: ROW_TYPE_REDUNDANT or ROW_TYPE_COMPACT */
{
if (prebuilt && prebuilt->table) {
if (dict_table_is_comp_noninline(prebuilt->table)) {
if (dict_table_is_comp(prebuilt->table)) {
return(ROW_TYPE_COMPACT);
} else {
return(ROW_TYPE_REDUNDANT);
......@@ -3195,7 +3187,7 @@ build_template(
}
}
clust_index = dict_table_get_first_index_noninline(prebuilt->table);
clust_index = dict_table_get_first_index(prebuilt->table);
if (templ_type == ROW_MYSQL_REC_FIELDS) {
index = prebuilt->index;
......@@ -3215,8 +3207,7 @@ build_template(
if (!prebuilt->mysql_template) {
prebuilt->mysql_template = (mysql_row_templ_t*)
mem_alloc_noninline(
n_fields * sizeof(mysql_row_templ_t));
mem_alloc(n_fields * sizeof(mysql_row_templ_t));
}
prebuilt->template_type = templ_type;
......@@ -3274,7 +3265,7 @@ include_field:
templ->col_no = i;
if (index == clust_index) {
templ->rec_field_no = dict_col_get_clust_pos_noninline(
templ->rec_field_no = dict_col_get_clust_pos(
&index->table->cols[i], index);
} else {
templ->rec_field_no = dict_index_get_nth_col_pos(
......@@ -3312,7 +3303,7 @@ include_field:
(((Field_varstring*)field)->length_bytes);
}
templ->charset = dtype_get_charset_coll_noninline(
templ->charset = dtype_get_charset_coll(
index->table->cols[i].prtype);
templ->mbminlen = index->table->cols[i].mbminlen;
templ->mbmaxlen = index->table->cols[i].mbmaxlen;
......@@ -3334,7 +3325,7 @@ skip_field:
for (i = 0; i < n_requested_fields; i++) {
templ = prebuilt->mysql_template + i;
templ->rec_field_no = dict_col_get_clust_pos_noninline(
templ->rec_field_no = dict_col_get_clust_pos(
&index->table->cols[templ->col_no],
clust_index);
}
......@@ -3604,7 +3595,7 @@ calc_row_difference(
uint i;
n_fields = table->s->fields;
clust_index = dict_table_get_first_index_noninline(prebuilt->table);
clust_index = dict_table_get_first_index(prebuilt->table);
/* We use upd_buff to convert changed fields */
buf = (byte*) upd_buff;
......@@ -3683,7 +3674,7 @@ calc_row_difference(
/* Let us use a dummy dfield to make the conversion
from the MySQL column format to the InnoDB format */
dict_col_copy_type_noninline(prebuilt->table->cols + i,
dict_col_copy_type(prebuilt->table->cols + i,
&dfield.type);
if (n_len != UNIV_SQL_NULL) {
......@@ -3693,8 +3684,7 @@ calc_row_difference(
TRUE,
new_mysql_row_col,
col_pack_len,
dict_table_is_comp_noninline(
prebuilt->table));
dict_table_is_comp(prebuilt->table));
ufield->new_val.data = dfield.data;
ufield->new_val.len = dfield.len;
} else {
......@@ -3703,7 +3693,7 @@ calc_row_difference(
}
ufield->exp = NULL;
ufield->field_no = dict_col_get_clust_pos_noninline(
ufield->field_no = dict_col_get_clust_pos(
&prebuilt->table->cols[i], clust_index);
n_changed++;
}
......@@ -4176,8 +4166,7 @@ ha_innobase::change_active_index(
prebuilt->index = dict_table_get_index_on_name(
prebuilt->table, key->name);
} else {
prebuilt->index = dict_table_get_first_index_noninline(
prebuilt->table);
prebuilt->index = dict_table_get_first_index(prebuilt->table);
}
if (!prebuilt->index) {
......@@ -4567,7 +4556,7 @@ innodb_check_for_record_too_big_error(
{
if (error == (int)DB_TOO_BIG_RECORD) {
ulint max_row_size
= page_get_free_space_of_empty_noninline(comp) / 2;
= page_get_free_space_of_empty(comp) / 2;
my_error(ER_TOO_BIG_ROWSIZE, MYF(0), max_row_size);
}
......@@ -5547,7 +5536,7 @@ ha_innobase::estimate_rows_upper_bound(void)
trx_search_latch_release_if_reserved(prebuilt->trx);
index = dict_table_get_first_index_noninline(prebuilt->table);
index = dict_table_get_first_index(prebuilt->table);
ut_a(index->stat_n_leaf_pages > 0);
......@@ -5741,10 +5730,10 @@ ha_innobase::info(
}
if (flag & HA_STATUS_CONST) {
index = dict_table_get_first_index_noninline(ib_table);
index = dict_table_get_first_index(ib_table);
if (prebuilt->clust_index_was_generated) {
index = dict_table_get_next_index_noninline(index);
index = dict_table_get_next_index(index);
}
for (i = 0; i < table->s->keys; i++) {
......@@ -5802,7 +5791,7 @@ ha_innobase::info(
rec_per_key;
}
index = dict_table_get_next_index_noninline(index);
index = dict_table_get_next_index(index);
}
}
......@@ -5957,7 +5946,7 @@ ha_innobase::update_table_comment(
/* output the data to a temporary file */
mutex_enter_noninline(&srv_dict_tmpfile_mutex);
mutex_enter(&srv_dict_tmpfile_mutex);
rewind(srv_dict_tmpfile);
fprintf(srv_dict_tmpfile, "InnoDB free: %lu kB",
......@@ -5990,7 +5979,7 @@ ha_innobase::update_table_comment(
pos[flen] = 0;
}
mutex_exit_noninline(&srv_dict_tmpfile_mutex);
mutex_exit(&srv_dict_tmpfile_mutex);
prebuilt->trx->op_info = (char*)"";
......@@ -6026,7 +6015,7 @@ ha_innobase::get_foreign_key_create_info(void)
trx_search_latch_release_if_reserved(prebuilt->trx);
mutex_enter_noninline(&srv_dict_tmpfile_mutex);
mutex_enter(&srv_dict_tmpfile_mutex);
rewind(srv_dict_tmpfile);
/* output the data to a temporary file */
......@@ -6052,7 +6041,7 @@ ha_innobase::get_foreign_key_create_info(void)
str[flen] = 0;
}
mutex_exit_noninline(&srv_dict_tmpfile_mutex);
mutex_exit(&srv_dict_tmpfile_mutex);
return(str);
}
......@@ -6068,7 +6057,7 @@ ha_innobase::get_foreign_key_list(THD *thd, List<FOREIGN_KEY_INFO> *f_key_list)
update_thd(ha_thd());
prebuilt->trx->op_info = (char*)"getting list of foreign keys";
trx_search_latch_release_if_reserved(prebuilt->trx);
mutex_enter_noninline(&(dict_sys->mutex));
mutex_enter(&(dict_sys->mutex));
foreign = UT_LIST_GET_FIRST(prebuilt->table->foreign_list);
while (foreign != NULL) {
......@@ -6180,7 +6169,7 @@ ha_innobase::get_foreign_key_list(THD *thd, List<FOREIGN_KEY_INFO> *f_key_list)
f_key_list->push_back(pf_key_info);
foreign = UT_LIST_GET_NEXT(foreign_list, foreign);
}
mutex_exit_noninline(&(dict_sys->mutex));
mutex_exit(&(dict_sys->mutex));
prebuilt->trx->op_info = (char*)"";
DBUG_RETURN(0);
......@@ -6697,7 +6686,7 @@ innodb_show_status(
long flen, usable_len;
char* str;
mutex_enter_noninline(&srv_monitor_file_mutex);
mutex_enter(&srv_monitor_file_mutex);
rewind(srv_monitor_file);
srv_printf_innodb_monitor(srv_monitor_file,
&trx_list_start, &trx_list_end);
......@@ -6718,7 +6707,7 @@ innodb_show_status(
read the contents of the temporary file */
if (!(str = (char*) my_malloc(usable_len + 1, MYF(0)))) {
mutex_exit_noninline(&srv_monitor_file_mutex);
mutex_exit(&srv_monitor_file_mutex);
DBUG_RETURN(TRUE);
}
......@@ -6743,7 +6732,7 @@ innodb_show_status(
flen = (long) fread(str, 1, MAX_STATUS_SIZE - 1, srv_monitor_file);
}
mutex_exit_noninline(&srv_monitor_file_mutex);
mutex_exit(&srv_monitor_file_mutex);
bool result = FALSE;
......@@ -6780,7 +6769,7 @@ innodb_mutex_show_status(
uint hton_name_len= strlen(innobase_hton_name), buf1len, buf2len;
DBUG_ENTER("innodb_mutex_show_status");
mutex_enter_noninline(&mutex_list_mutex);
mutex_enter(&mutex_list_mutex);
mutex = UT_LIST_GET_FIRST(mutex_list);
......@@ -6806,8 +6795,7 @@ innodb_mutex_show_status(
if (stat_print(thd, innobase_hton_name,
hton_name_len, buf1, buf1len,
buf2, buf2len)) {
mutex_exit_noninline(
&mutex_list_mutex);
mutex_exit(&mutex_list_mutex);
DBUG_RETURN(1);
}
}
......@@ -6829,7 +6817,7 @@ innodb_mutex_show_status(
if (stat_print(thd, innobase_hton_name,
hton_name_len, buf1, buf1len,
buf2, buf2len)) {
mutex_exit_noninline(&mutex_list_mutex);
mutex_exit(&mutex_list_mutex);
DBUG_RETURN(1);
}
#endif /* UNIV_DEBUG */
......@@ -6837,7 +6825,7 @@ innodb_mutex_show_status(
mutex = UT_LIST_GET_NEXT(list, mutex);
}
mutex_exit_noninline(&mutex_list_mutex);
mutex_exit(&mutex_list_mutex);
#ifdef UNIV_DEBUG
buf2len= my_snprintf(buf2, sizeof(buf2),
......@@ -7889,13 +7877,13 @@ innobase_create_index_def(
DBUG_ENTER("innobase_create_index_def");
index->fields = (merge_index_field_t*) mem_heap_alloc_noninline(
index->fields = (merge_index_field_t*) mem_heap_alloc(
heap, n_fields * sizeof *index->fields);
index->ind_type = 0;
index->n_fields = n_fields;
len = strlen(key->name) + 2;
index->name = (char *)mem_heap_alloc_noninline(heap, len);
index->name = (char *)mem_heap_alloc(heap, len);
--len;
......@@ -7969,7 +7957,7 @@ innobase_copy_index_def(
n_fields = index->n_fields;
}
new_index->fields = (merge_index_field_t*) mem_heap_alloc_noninline(
new_index->fields = (merge_index_field_t*) mem_heap_alloc(
heap, n_fields * sizeof *new_index->fields);
new_index->ind_type = index->type;
......@@ -8024,7 +8012,7 @@ innobase_create_key_def(
const ulint n_indexes = n_keys + UT_LIST_GET_LEN(table->indexes) - 1;
indexdef = indexdefs = (merge_index_def_t*)
mem_heap_alloc_noninline(heap, sizeof *indexdef * n_indexes);
mem_heap_alloc(heap, sizeof *indexdef * n_indexes);
/* Primary key if defined is always the first index defined for
the table */
......@@ -8043,8 +8031,8 @@ innobase_create_key_def(
/* Skip the clustered index */
index = dict_table_get_next_index_noninline(
dict_table_get_first_index_noninline(table));
index = dict_table_get_next_index(
dict_table_get_first_index(table));
/* Copy the definitions of old secondary indexes */
......@@ -8053,7 +8041,7 @@ innobase_create_key_def(
ut_a(!dict_index_is_clust(index));
innobase_copy_index_def(index, indexdef++, heap);
index = dict_table_get_next_index_noninline(index);
index = dict_table_get_next_index(index);
}
row_mysql_unlock_data_dictionary(trx);
......@@ -8090,7 +8078,7 @@ innobase_create_temporary_tablename(
len = strlen(table_name) + 3;
name = (char*) mem_heap_alloc_noninline(heap, len);
name = (char*) mem_heap_alloc(heap, len);
/* The prefix must be 2 bytes, and the second byte must not be 'd'.
See fil_make_ibd_name(). */
name[0] = TEMP_TABLE_PREFIX;
......@@ -8131,12 +8119,12 @@ ha_innobase::add_index(
update_thd(ha_thd());
heap = mem_heap_create_noninline(1024);
heap = mem_heap_create(1024);
trx = check_trx_exists(user_thd);
trx_search_latch_release_if_reserved(trx);
trx_start_if_not_started_noninline(trx);
trx_start_if_not_started(trx);
innobase_register_stmt(ht, user_thd);
......@@ -8161,7 +8149,7 @@ ha_innobase::add_index(
if (UNIV_UNLIKELY(error != DB_SUCCESS)) {
err_exit:
mem_heap_free_noninline(heap);
mem_heap_free(heap);
trx_general_rollback_for_mysql(trx, FALSE, NULL);
DBUG_RETURN(convert_error_code_to_mysql(error, user_thd));
}
......@@ -8207,7 +8195,7 @@ err_exit:
/* Allocate memory for dictionary index definitions */
index = (dict_index_t**) mem_heap_alloc_noninline(
index = (dict_index_t**) mem_heap_alloc(
heap, num_of_idx * sizeof *index);
/* Latch the InnoDB data dictionary exclusively so that no deadlocks
......@@ -8248,7 +8236,7 @@ err_exit:
row_mysql_unlock_data_dictionary(trx);
dict_locked = FALSE;
mem_heap_empty_noninline(heap);
mem_heap_empty(heap);
ut_a(trx->n_active_thrs == 0);
ut_a(UT_LIST_GET_LEN(trx->signals) == 0);
......@@ -8327,7 +8315,7 @@ error_handling:
char* tmp_table_name = innobase_create_temporary_tablename(
heap, '2', innodb_table->name);
trx_start_if_not_started_noninline(trx);
trx_start_if_not_started(trx);
/* Write entry for UNDO */
error = row_undo_report_rename_table_dict_operation(
......@@ -8372,7 +8360,7 @@ error_handling:
}
func_exit:
mem_heap_free_noninline(heap);
mem_heap_free(heap);
/* There might be work for utility threads.*/
srv_active_wake_master_thread();
......@@ -8519,7 +8507,7 @@ ha_innobase::prepare_drop_index(
error = DB_CANNOT_DROP_FOREIGN_INDEX;
mutex_enter_noninline(&dict_foreign_err_mutex);
mutex_enter(&dict_foreign_err_mutex);
rewind(ef);
ut_print_timestamp(ef);
......@@ -8529,7 +8517,7 @@ ha_innobase::prepare_drop_index(
ut_print_name(ef, trx, TRUE,
foreign->foreign_table_name);
putc('\n', ef);
mutex_exit_noninline(&dict_foreign_err_mutex);
mutex_exit(&dict_foreign_err_mutex);
break;
}
......@@ -8590,12 +8578,12 @@ ha_innobase::final_drop_index(
row_mysql_lock_data_dictionary(trx);
index = dict_table_get_first_index_noninline(prebuilt->table);
index = dict_table_get_first_index(prebuilt->table);
while (index) {
dict_index_t* next_index;
next_index = dict_table_get_next_index_noninline(index);
next_index = dict_table_get_next_index(index);
if (index->to_be_dropped) {
......@@ -8748,7 +8736,7 @@ innobase_stat_zip_fill(
/* Determine log2(PAGE_ZIP_MIN_SIZE / 2 / BUF_BUDDY_LOW). */
for (uint r = PAGE_ZIP_MIN_SIZE / 2 / BUF_BUDDY_LOW; r >>= 1; y++);
mutex_enter_noninline(&buf_pool->mutex);
mutex_enter(&buf_pool->mutex);
for (uint x = 0; x <= BUF_BUDDY_SIZES; x++) {
table->field[0]->store(BUF_BUDDY_LOW << x);
......@@ -8787,7 +8775,7 @@ innobase_stat_zip_fill(
}
}
mutex_exit_noninline(&buf_pool->mutex);
mutex_exit(&buf_pool->mutex);
DBUG_RETURN(status);
}
......
......@@ -18,26 +18,6 @@ Created 5/30/1994 Heikki Tuuri
typedef struct big_rec_struct big_rec_t;
/* Some non-inlined functions used in the MySQL interface: */
void
dfield_set_data_noninline(
dfield_t* field, /* in: field */
void* data, /* in: data */
ulint len); /* in: length or UNIV_SQL_NULL */
void*
dfield_get_data_noninline(
dfield_t* field); /* in: field */
ulint
dfield_get_len_noninline(
const dfield_t* field); /* in: field */
ulint
dtuple_get_n_fields_noninline(
const dtuple_t* tuple); /* in: tuple */
const dfield_t*
dtuple_get_nth_field_noninline(
const dtuple_t* tuple, /* in: tuple */
ulint n); /* in: index of field */
#ifdef UNIV_DEBUG
/*************************************************************************
Gets pointer to the type struct of SQL data field. */
......
......@@ -257,13 +257,6 @@ dtype_get_mblen(
multi-byte character */
/*************************************************************************
Gets the MySQL charset-collation code for MySQL string types. */
ulint
dtype_get_charset_coll_noninline(
/*=============================*/
ulint prtype);/* in: precise data type */
/*************************************************************************
Gets the MySQL charset-collation code for MySQL string types. */
UNIV_INLINE
ulint
dtype_get_charset_coll(
......
......@@ -93,14 +93,6 @@ dict_col_copy_type(
/*===============*/
const dict_col_t* col, /* in: column */
dtype_t* type); /* out: data type */
/*************************************************************************
Gets the column data type. */
void
dict_col_copy_type_noninline(
/*=========================*/
const dict_col_t* col, /* in: column */
dtype_t* type); /* out: data type */
#ifdef UNIV_DEBUG
/*************************************************************************
Assert that a column and a data type match. */
......@@ -162,14 +154,6 @@ dict_col_get_clust_pos(
/*===================*/
const dict_col_t* col, /* in: table column */
const dict_index_t* clust_index); /* in: clustered index */
/*************************************************************************
Gets the column position in the clustered index. */
ulint
dict_col_get_clust_pos_noninline(
/*=============================*/
const dict_col_t* col, /* in: table column */
const dict_index_t* clust_index); /* in: clustered index */
/********************************************************************
If the given column name is reserved for InnoDB system columns, return
TRUE. */
......@@ -446,14 +430,6 @@ dict_table_get_on_id_low(
/* out: table, NULL if does not exist */
dulint table_id); /* in: table id */
/**************************************************************************
A noninlined version of dict_table_get_low. */
dict_table_t*
dict_table_get_low_noninlined(
/*==========================*/
/* out: table, NULL if not found */
const char* table_name); /* in: table name */
/**************************************************************************
Returns an index object by matching on the name and column names and if
more than index is found return the index with the higher id.*/
......@@ -539,14 +515,6 @@ dict_table_get_first_index(
/* out: index, NULL if none exists */
dict_table_t* table); /* in: table */
/************************************************************************
Gets the first index on the table (the clustered index). */
dict_index_t*
dict_table_get_first_index_noninline(
/*=================================*/
/* out: index, NULL if none exists */
dict_table_t* table); /* in: table */
/************************************************************************
Gets the next index on the table. */
UNIV_INLINE
dict_index_t*
......@@ -555,15 +523,6 @@ dict_table_get_next_index(
/* out: index, NULL if none left */
dict_index_t* index); /* in: index */
/************************************************************************
Gets the next index on the table. */
dict_index_t*
dict_table_get_next_index_noninline(
/*================================*/
/* out: index, NULL if none left */
dict_index_t* index); /* in: index */
/************************************************************************
Check whether the index is the clustered index. */
UNIV_INLINE
ulint
......@@ -638,15 +597,6 @@ dict_table_get_sys_col(
((table)->cols + (table)->n_cols + (sys) - DATA_N_SYS_COLS)
#endif /* UNIV_DEBUG */
/************************************************************************
Gets the nth column of a table. */
const dict_col_t*
dict_table_get_nth_col_noninline(
/*=============================*/
/* out: pointer to column object */
const dict_table_t* table, /* in: table */
ulint pos); /* in: position of column */
/************************************************************************
Gets the given system column number of a table. */
UNIV_INLINE
ulint
......@@ -673,15 +623,6 @@ dict_table_is_comp(
compact page format */
const dict_table_t* table); /* in: table */
/************************************************************************
Check whether the table uses the compact page format. */
ibool
dict_table_is_comp_noninline(
/*=========================*/
/* out: TRUE if table uses the
compact page format */
const dict_table_t* table); /* in: table */
/************************************************************************
Check whether the table uses the compressed compact page format. */
UNIV_INLINE
ulint
......@@ -1121,15 +1062,6 @@ dict_table_find_equivalent_index(
dict_table_t* table, /* in/out: table */
dict_index_t* index); /* in: index to match */
/**************************************************************************
Find and return an index in the table that matches the index id.*/
dict_index_t*
dict_table_get_index_on_id_noninline(
/*=================================*/
/* out: index, NULL if does not exist */
dict_table_t* table, /* in: table */
dulint index_id);/* in: table id */
/**************************************************************************
In case there is more than one index with the same name return the index
with the min(id). */
......
......@@ -73,12 +73,6 @@ heap creation. */
Use this macro instead of the corresponding function! Macro for memory
heap creation. */
#define mem_heap_create_noninline(N) mem_heap_create_func_noninline(\
(N), MEM_HEAP_DYNAMIC, __FILE__, __LINE__)
/******************************************************************
Use this macro instead of the corresponding function! Macro for memory
heap creation. */
#define mem_heap_create_in_buffer(N) mem_heap_create_func(\
(N), MEM_HEAP_BUFFER, __FILE__, __LINE__)
/******************************************************************
......@@ -95,12 +89,6 @@ heap freeing. */
#define mem_heap_free(heap) mem_heap_free_func(\
(heap), __FILE__, __LINE__)
/******************************************************************
Use this macro instead of the corresponding function! Macro for memory
heap freeing. */
#define mem_heap_free_noninline(heap) mem_heap_free_func_noninline(\
(heap), __FILE__, __LINE__)
/*********************************************************************
NOTE: Use the corresponding macros instead of this function. Creates a
memory heap. For debugging purposes, takes also the file name and line as
......@@ -130,37 +118,6 @@ mem_heap_free_func(
mem_heap_t* heap, /* in, own: heap to be freed */
const char* file_name, /* in: file name where freed */
ulint line); /* in: line where freed */
/*********************************************************************
NOTE: Use the corresponding macros instead of this function. Creates a
memory heap. For debugging purposes, takes also the file name and line as
arguments. */
mem_heap_t*
mem_heap_create_func_noninline(
/*===========================*/
/* out, own: memory heap, NULL if
did not succeed (only possible for
MEM_HEAP_BTR_SEARCH type heaps)*/
ulint n, /* in: desired start block size,
this means that a single user buffer
of size n will fit in the block,
0 creates a default size block;
if init_block is not NULL, n tells
its size in bytes */
ulint type, /* in: heap type */
const char* file_name, /* in: file name where created */
ulint line); /* in: line where created */
/*********************************************************************
NOTE: Use the corresponding macro instead of this function. Frees the space
occupied by a memory heap. In the debug version erases the heap memory
blocks. */
void
mem_heap_free_func_noninline(
/*=========================*/
mem_heap_t* heap, /* in, own: heap to be freed */
const char* file_name, /* in: file name where freed */
ulint line); /* in: line where freed */
/*******************************************************************
Allocates and zero-fills n bytes of memory from a memory heap. */
UNIV_INLINE
......@@ -187,19 +144,6 @@ mem_heap_alloc(
ulint n); /* in: number of bytes; if the heap is allowed
to grow into the buffer pool, this must be
<= MEM_MAX_ALLOC_IN_BUF */
/*******************************************************************
Allocates n bytes of memory from a memory heap. */
void*
mem_heap_alloc_noninline(
/*=====================*/
/* out: allocated storage, NULL if did not
succeed (only possible for
MEM_HEAP_BTR_SEARCH type heaps) */
mem_heap_t* heap, /* in: memory heap */
ulint n); /* in: number of bytes; if the heap is allowed
to grow into the buffer pool, this must be
<= MEM_MAX_ALLOC_IN_BUF */
/*********************************************************************
Returns a pointer to the heap top. */
UNIV_INLINE
......@@ -226,13 +170,6 @@ mem_heap_empty(
/*===========*/
mem_heap_t* heap); /* in: heap to empty */
/*********************************************************************
Empties a memory heap. The first memory block of the heap is not freed. */
void
mem_heap_empty_noninline(
/*=====================*/
mem_heap_t* heap); /* in: heap to empty */
/*********************************************************************
Returns a pointer to the topmost element in a memory heap.
The size of the element must be given. */
UNIV_INLINE
......@@ -265,18 +202,6 @@ Macro for memory buffer allocation */
#define mem_calloc(N) memset(mem_alloc(N), 0, (N));
#define mem_alloc(N) mem_alloc_func((N), __FILE__, __LINE__)
/******************************************************************
Use this macro instead of the corresponding function!
Macro for memory buffer allocation */
#define mem_alloc_noninline(N) mem_alloc_func_noninline(\
(N), __FILE__, __LINE__)
/******************************************************************
Use this macro instead of the corresponding function!
Macro for memory buffer allocation */
#define mem_free_noninline(N) mem_free_func_noninline(\
(N), __FILE__, __LINE__)
/*******************************************************************
NOTE: Use the corresponding macro instead of this function.
Allocates a single buffer of memory from the dynamic memory of
......@@ -291,20 +216,6 @@ mem_alloc_func(
const char* file_name, /* in: file name where created */
ulint line); /* in: line where created */
/*******************************************************************
NOTE: Use the corresponding macro instead of this function.
Allocates a single buffer of memory from the dynamic memory of
the C compiler. Is like malloc of C. The buffer must be freed
with mem_free. */
void*
mem_alloc_func_noninline(
/*=====================*/
/* out, own: free storage */
ulint n, /* in: desired number of bytes */
const char* file_name, /* in: file name where created */
ulint line); /* in: line where created */
/******************************************************************
Use this macro instead of the corresponding function!
Macro for memory buffer freeing */
......@@ -322,18 +233,6 @@ mem_free_func(
const char* file_name, /* in: file name where created */
ulint line /* in: line where created */
);
/*******************************************************************
NOTE: Use the corresponding macro instead of this function.
Frees a single buffer of storage from
the dynamic memory of C compiler. Similar to free of C. */
void
mem_free_func_noninline(
/*====================*/
void* ptr, /* in, own: buffer to be freed */
const char* file_name, /* in: file name where created */
ulint line /* in: line where created */
);
/**************************************************************************
Duplicates a NUL-terminated string. */
......
......@@ -155,16 +155,6 @@ mtr_start(
the mtr handle */
mtr_t* mtr); /* in: memory buffer for the mtr buffer */
/*******************************************************************
Starts a mini-transaction and creates a mini-transaction handle
and buffer in the memory buffer given by the caller. */
mtr_t*
mtr_start_noninline(
/*================*/
/* out: mtr buffer which also acts as
the mtr handle */
mtr_t* mtr); /* in: memory buffer for the mtr buffer */
/*******************************************************************
Commits a mini-transaction. */
void
......
......@@ -604,15 +604,6 @@ page_get_free_space_of_empty(
/* out: free space */
ulint comp) /* in: nonzero=compact page format */
__attribute__((const));
/*****************************************************************
Calculates free space if a page is emptied. */
ulint
page_get_free_space_of_empty_noninline(
/*===================================*/
/* out: free space */
ulint comp) /* in: nonzero=compact page format */
__attribute__((const));
/**************************************************************
Returns the base extra size of a physical record. This is the
size of the fixed header, independent of the record size. */
......
......@@ -89,8 +89,6 @@ void set_panic_flag_for_netware(void);
extern ibool srv_have_fullfsync;
#endif
extern ulint srv_sizeof_trx_t_in_ha_innodb_cc;
extern ibool srv_is_being_started;
extern ibool srv_startup_is_before_trx_rollback_phase;
extern ibool srv_is_being_shut_down;
......
......@@ -85,15 +85,6 @@ NOTE! The following macro should be used in mutex locking, not the
corresponding function. */
#define mutex_enter(M) mutex_enter_func((M), __FILE__, __LINE__)
/**********************************************************************
A noninlined function that reserves a mutex. In ha_innodb.cc we have disabled
inlining of InnoDB functions, and no inlined functions should be called from
there. That is why we need to duplicate the inlined function here. */
void
mutex_enter_noninline(
/*==================*/
mutex_t* mutex); /* in: mutex */
/******************************************************************
NOTE! The following macro should be used in mutex locking, not the
corresponding function. */
......@@ -140,13 +131,6 @@ mutex_exit(
/*=======*/
mutex_t* mutex); /* in: pointer to mutex */
/**********************************************************************
Releases a mutex. */
void
mutex_exit_noninline(
/*=================*/
mutex_t* mutex); /* in: mutex */
/**********************************************************************
Returns TRUE if no mutex or rw-lock is currently locked.
Works only in the debug version. */
......
......@@ -171,13 +171,6 @@ void
trx_start_if_not_started_low(
/*=========================*/
trx_t* trx); /* in: transaction */
/*****************************************************************
Starts the transaction if it is not yet started. */
void
trx_start_if_not_started_noninline(
/*===============================*/
trx_t* trx); /* in: transaction */
/********************************************************************
Commits a transaction. */
......
......@@ -142,7 +142,7 @@ by one. */
/* the above option enables basic recovery debugging:
new allocated file pages are reset */
#if (!defined(UNIV_DEBUG) && !defined(INSIDE_HA_INNOBASE_CC) && !defined(UNIV_MUST_NOT_INLINE))
#if (!defined(UNIV_DEBUG) && !defined(UNIV_MUST_NOT_INLINE))
/* Definition for inline version */
#ifdef __WIN__
......
......@@ -84,48 +84,6 @@ UT_LIST_BASE_NODE_T(mem_block_t) mem_block_list;
#endif
/*********************************************************************
Empties a memory heap. The first memory block of the heap is not freed. */
void
mem_heap_empty_noninline(
/*=====================*/
mem_heap_t* heap) /* in: heap to empty */
{
return(mem_heap_empty(heap));
}
/*******************************************************************
NOTE: Use the corresponding macro instead of this function.
Allocates a single buffer of memory from the dynamic memory of
the C compiler. Is like malloc of C. The buffer must be freed
with mem_free. */
void*
mem_alloc_func_noninline(
/*=====================*/
/* out, own: free storage */
ulint n, /* in: desired number of bytes */
const char* file_name, /* in: file name where created */
ulint line) /* in: line where created */
{
return(mem_alloc_func(n, file_name, line));
}
/*******************************************************************
NOTE: Use the corresponding macro instead of this function.
Frees a single buffer of storage from
the dynamic memory of C compiler. Similar to free of C. */
void
mem_free_func_noninline(
/*====================*/
void* ptr, /* in, own: buffer to be freed */
const char* file_name, /* in: file name where created */
ulint line) /* in: line where created */
{
return(mem_free_func(ptr, file_name, line));
}
/**************************************************************************
Duplicates a NUL-terminated string, allocated from a memory heap. */
......@@ -591,60 +549,3 @@ mem_validate_all_blocks(void)
mem_pool_mutex_exit();
}
#endif
/*******************************************************************
Allocates n bytes of memory from a memory heap. */
void*
mem_heap_alloc_noninline(
/*=====================*/
/* out: allocated storage, NULL if did not
succeed (only possible for
MEM_HEAP_BTR_SEARCH type heaps) */
mem_heap_t* heap, /* in: memory heap */
ulint n) /* in: number of bytes; if the heap is allowed
to grow into the buffer pool, this must be
<= MEM_MAX_ALLOC_IN_BUF */
{
return(mem_heap_alloc(heap, n));
}
/*********************************************************************
NOTE: Use the corresponding macros instead of this function. Creates a
memory heap. For debugging purposes, takes also the file name and line as
argument. */
mem_heap_t*
mem_heap_create_func_noninline(
/*===========================*/
/* out, own: memory heap, NULL if
did not succeed (only possible for
MEM_HEAP_BTR_SEARCH type heaps)*/
ulint n, /* in: desired start block size,
this means that a single user buffer
of size n will fit in the block,
0 creates a default size block;
if init_block is not NULL, n tells
its size in bytes */
ulint type, /* in: heap type */
const char* file_name, /* in: file name where created */
ulint line) /* in: line where created */
{
return(mem_heap_create_func(n, type, file_name, line));
}
/*********************************************************************
NOTE: Use the corresponding macro instead of this function. Frees the space
occupied by a memory heap. In the debug version erases the heap memory
blocks. */
void
mem_heap_free_func_noninline(
/*=========================*/
mem_heap_t* heap, /* in, own: heap to be freed */
const char* file_name __attribute__((unused)),
/* in: file name where freed */
ulint line __attribute__((unused)))
{
mem_heap_free_func(heap, file_name, line);
}
......@@ -17,20 +17,6 @@ Created 11/26/1995 Heikki Tuuri
#include "mtr0log.h"
#include "log0log.h"
/*******************************************************************
Starts a mini-transaction and creates a mini-transaction handle
and buffer in the memory buffer given by the caller. */
mtr_t*
mtr_start_noninline(
/*================*/
/* out: mtr buffer which also acts as
the mtr handle */
mtr_t* mtr) /* in: memory buffer for the mtr buffer */
{
return(mtr_start(mtr));
}
/*********************************************************************
Releases the item in the slot given. */
UNIV_INLINE
......
......@@ -216,18 +216,6 @@ page_set_max_trx_id(
}
}
/*****************************************************************
Calculates free space if a page is emptied. */
ulint
page_get_free_space_of_empty_noninline(
/*===================================*/
/* out: free space */
ulint comp) /* in: nonzero=compact page format */
{
return(page_get_free_space_of_empty(comp));
}
/****************************************************************
Allocates a block of memory from the heap of an index page. */
......
......@@ -68,8 +68,6 @@ ibool srv_have_fullfsync = FALSE;
ibool srv_start_raw_disk_in_use = FALSE;
ulint srv_sizeof_trx_t_in_ha_innodb_cc;
ibool srv_startup_is_before_trx_rollback_phase = FALSE;
ibool srv_is_being_started = FALSE;
#ifndef UNIV_HOTBACKUP
......@@ -1045,18 +1043,6 @@ innobase_start_or_create_for_mysql(void)
"InnoDB: !!!!!!!! UNIV_MEM_DEBUG switched on !!!!!!!!!\n");
#endif
if (srv_sizeof_trx_t_in_ha_innodb_cc != (ulint)sizeof(trx_t)) {
fprintf(stderr,
"InnoDB: Error: trx_t size is %lu in ha_innodb.cc"
" but %lu in srv0start.c\n"
"InnoDB: Check that pthread_mutex_t is defined"
" in the same way in these\n"
"InnoDB: compilation modules. Cannot continue.\n",
(ulong) srv_sizeof_trx_t_in_ha_innodb_cc,
(ulong) sizeof(trx_t));
return(DB_ERROR);
}
/* Since InnoDB does not currently clean up all its internal data
structures in MySQL Embedded Server Library server_end(), we
print an error message if someone tries to start up InnoDB a
......
......@@ -167,30 +167,6 @@ struct sync_level_struct{
ulint level; /* level of the latch in the latching order */
};
/**********************************************************************
A noninlined function that reserves a mutex. In ha_innodb.cc we have disabled
inlining of InnoDB functions, and no inlined functions should be called from
there. That is why we need to duplicate the inlined function here. */
void
mutex_enter_noninline(
/*==================*/
mutex_t* mutex) /* in: mutex */
{
mutex_enter(mutex);
}
/**********************************************************************
Releases a mutex. */
void
mutex_exit_noninline(
/*=================*/
mutex_t* mutex) /* in: mutex */
{
mutex_exit(mutex);
}
/**********************************************************************
Creates, or rather, initializes a mutex object in a specified memory
location (which must be appropriately aligned). The mutex is initialized
......
......@@ -42,17 +42,6 @@ sess_t* trx_dummy_sess = NULL;
the kernel mutex */
ulint trx_n_mysql_transactions = 0;
/*****************************************************************
Starts the transaction if it is not yet started. */
void
trx_start_if_not_started_noninline(
/*===============================*/
trx_t* trx) /* in: transaction */
{
trx_start_if_not_started(trx);
}
/*****************************************************************
Set detailed error message for the transaction. */
......
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