summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
Diffstat (limited to 'innobase')
-rw-r--r--innobase/btr/btr0btr.c8
-rw-r--r--innobase/btr/btr0cur.c17
-rw-r--r--innobase/btr/btr0sea.c2
-rw-r--r--innobase/buf/buf0buf.c2
-rw-r--r--innobase/buf/buf0lru.c9
-rw-r--r--innobase/configure.in1
-rw-r--r--innobase/data/data0data.c2
-rw-r--r--innobase/dict/dict0boot.c109
-rw-r--r--innobase/dict/dict0crea.c20
-rw-r--r--innobase/dict/dict0dict.c41
-rw-r--r--innobase/dict/dict0load.c32
-rw-r--r--innobase/eval/eval0eval.c8
-rw-r--r--innobase/fil/fil0fil.c11
-rw-r--r--innobase/fsp/fsp0fsp.c8
-rw-r--r--innobase/ibuf/ibuf0ibuf.c20
-rw-r--r--innobase/include/Makefile.am2
-rw-r--r--innobase/include/Makefile.i2
-rw-r--r--innobase/include/btr0btr.ic6
-rw-r--r--innobase/include/buf0buf.ic7
-rw-r--r--innobase/include/dict0dict.ic2
-rw-r--r--innobase/include/dyn0dyn.h1
-rw-r--r--innobase/include/ha0ha.ic2
-rw-r--r--innobase/include/row0mysql.ic3
-rw-r--r--innobase/include/row0vers.ic2
-rw-r--r--innobase/include/srv0srv.h1
-rw-r--r--innobase/include/sync0rw.ic3
-rw-r--r--innobase/include/univ.i2
-rw-r--r--innobase/include/ut0mem.h2
-rw-r--r--innobase/include/ut0mem.ic2
-rw-r--r--innobase/lock/lock0lock.c7
-rw-r--r--innobase/log/log0log.c17
-rw-r--r--innobase/mem/mem0dbg.c6
-rw-r--r--innobase/mtr/mtr0mtr.c8
-rw-r--r--innobase/odbc/odbc0odbc.c2
-rw-r--r--innobase/os/os0file.c33
-rw-r--r--innobase/os/os0thread.c3
-rw-r--r--innobase/page/page0cur.c9
-rw-r--r--innobase/page/page0page.c6
-rw-r--r--innobase/pars/pars0opt.c6
-rw-r--r--innobase/pars/pars0pars.c2
-rw-r--r--innobase/que/que0que.c46
-rw-r--r--innobase/rem/rem0cmp.c2
-rw-r--r--innobase/rem/rem0rec.c4
-rw-r--r--innobase/row/row0ins.c4
-rw-r--r--innobase/row/row0mysql.c97
-rw-r--r--innobase/row/row0purge.c2
-rw-r--r--innobase/row/row0sel.c21
-rw-r--r--innobase/row/row0uins.c2
-rw-r--r--innobase/row/row0umod.c2
-rw-r--r--innobase/row/row0upd.c2
-rw-r--r--innobase/srv/srv0srv.c18
-rw-r--r--innobase/srv/srv0start.c12
-rw-r--r--innobase/sync/sync0arr.c2
-rw-r--r--innobase/sync/sync0rw.c6
-rw-r--r--innobase/sync/sync0sync.c2
-rw-r--r--innobase/trx/trx0purge.c6
-rw-r--r--innobase/trx/trx0rec.c5
-rw-r--r--innobase/trx/trx0roll.c10
-rw-r--r--innobase/trx/trx0trx.c10
-rw-r--r--innobase/trx/trx0undo.c8
-rw-r--r--innobase/ut/ut0ut.c8
61 files changed, 370 insertions, 325 deletions
diff --git a/innobase/btr/btr0btr.c b/innobase/btr/btr0btr.c
index 15642e6ccbc..38d97785832 100644
--- a/innobase/btr/btr0btr.c
+++ b/innobase/btr/btr0btr.c
@@ -868,7 +868,7 @@ btr_parse_page_reorganize(
/*======================*/
/* out: end of log record or NULL */
byte* ptr, /* in: buffer */
- byte* end_ptr,/* in: buffer end */
+ byte* end_ptr __attribute__((unused)), /* in: buffer end */
page_t* page, /* in: page or NULL */
mtr_t* mtr) /* in: mtr or NULL */
{
@@ -1469,7 +1469,7 @@ btr_page_split_and_insert(
page_t* insert_page;
page_cur_t* page_cursor;
rec_t* first_rec;
- byte* buf;
+ byte* buf = 0; /* remove warning */
rec_t* move_limit;
ibool insert_will_fit;
ulint n_iterations = 0;
@@ -1647,7 +1647,7 @@ static
void
btr_level_list_remove(
/*==================*/
- dict_tree_t* tree, /* in: index tree */
+ dict_tree_t* tree __attribute__((unused)), /* in: index tree */
page_t* page, /* in: page to remove */
mtr_t* mtr) /* in: mtr */
{
@@ -2368,7 +2368,7 @@ btr_validate_level(
{
ulint space;
page_t* page;
- page_t* right_page;
+ page_t* right_page = 0; /* remove warning */
page_t* father_page;
page_t* right_father_page;
rec_t* node_ptr;
diff --git a/innobase/btr/btr0cur.c b/innobase/btr/btr0cur.c
index ada7e482b7e..bab5c78b712 100644
--- a/innobase/btr/btr0cur.c
+++ b/innobase/btr/btr0cur.c
@@ -110,7 +110,7 @@ static
void
btr_cur_latch_leaves(
/*=================*/
- dict_tree_t* tree, /* in: index tree */
+ dict_tree_t* tree __attribute__((unused)), /* in: index tree */
page_t* page, /* in: leaf page where the search
converged */
ulint space, /* in: space id */
@@ -232,7 +232,7 @@ btr_cur_search_to_nth_level(
ulint buf_mode;
ulint estimate;
ulint ignore_sec_unique;
- ulint root_height;
+ ulint root_height = 0; /* remove warning */
#ifdef BTR_CUR_ADAPT
btr_search_t* info;
#endif
@@ -503,7 +503,7 @@ btr_cur_open_at_index_side(
ulint page_no;
ulint space;
ulint height;
- ulint root_height;
+ ulint root_height = 0; /* remove warning */
rec_t* node_ptr;
ulint estimate;
@@ -3064,8 +3064,9 @@ btr_store_big_rec_extern_fields(
rec_t* rec, /* in: record */
big_rec_t* big_rec_vec, /* in: vector containing fields
to be stored externally */
- mtr_t* local_mtr) /* in: mtr containing the latch to
- rec and to the tree */
+ mtr_t* local_mtr __attribute__((unused))) /* in: mtr
+ containing the latch to rec and to the
+ tree */
{
byte* data;
ulint local_len;
@@ -3226,9 +3227,9 @@ btr_free_externally_stored_field(
ibool do_not_free_inherited,/* in: TRUE if called in a
rollback and we do not want to free
inherited fields */
- mtr_t* local_mtr) /* in: mtr containing the latch to
- data an an X-latch to the index
- tree */
+ mtr_t* local_mtr __attribute__((unused))) /* in: mtr
+ containing the latch to data an an
+ X-latch to the index tree */
{
page_t* page;
page_t* rec_page;
diff --git a/innobase/btr/btr0sea.c b/innobase/btr/btr0sea.c
index a798f28b4ab..cef3a4e4b38 100644
--- a/innobase/btr/btr0sea.c
+++ b/innobase/btr/btr0sea.c
@@ -1307,7 +1307,7 @@ btr_search_update_hash_on_insert(
dulint tree_id;
ulint fold;
ulint ins_fold;
- ulint next_fold;
+ ulint next_fold = 0; /* remove warning (??? bug ???) */
ulint n_fields;
ulint n_bytes;
ulint side;
diff --git a/innobase/buf/buf0buf.c b/innobase/buf/buf0buf.c
index ee8e8b91f8d..8b946f4b2a1 100644
--- a/innobase/buf/buf0buf.c
+++ b/innobase/buf/buf0buf.c
@@ -285,7 +285,7 @@ buf_page_print(
ut_print_timestamp(stderr);
fprintf(stderr,
- " InnoDB: Page dump in ascii and hex (%lu bytes):\n%s",
+ " InnoDB: Page dump in ascii and hex (%u bytes):\n%s",
(ulint)UNIV_PAGE_SIZE, buf);
fprintf(stderr, "InnoDB: End of page dump\n");
diff --git a/innobase/buf/buf0lru.c b/innobase/buf/buf0lru.c
index bd69dff740c..2ec1506c522 100644
--- a/innobase/buf/buf0lru.c
+++ b/innobase/buf/buf0lru.c
@@ -104,9 +104,10 @@ ibool
buf_LRU_search_and_free_block(
/*==========================*/
/* out: TRUE if freed */
- ulint n_iterations) /* in: how many times this has been called
- repeatedly without result: a high value
- means that we should search farther */
+ ulint n_iterations __attribute__((unused))) /* in: how many times
+ this has been called repeatedly without
+ result: a high value means that we should
+ search farther */
{
buf_block_t* block;
ibool freed;
@@ -200,7 +201,7 @@ buf_LRU_get_free_block(void)
buf_block_t* block = NULL;
ibool freed;
ulint n_iterations = 0;
- ibool mon_value_was;
+ ibool mon_value_was = 0; /* remove bug */
ibool started_monitor = FALSE;
loop:
mutex_enter(&(buf_pool->mutex));
diff --git a/innobase/configure.in b/innobase/configure.in
index 48787b680b2..100692e06ab 100644
--- a/innobase/configure.in
+++ b/innobase/configure.in
@@ -36,6 +36,7 @@ AC_PROG_RANLIB
AC_PROG_INSTALL
AC_CHECK_HEADERS(aio.h sched.h)
AC_CHECK_SIZEOF(int, 4)
+AC_CHECK_SIZEOF(long, 4)
AC_CHECK_FUNCS(sched_yield)
AC_CHECK_FUNCS(fdatasync)
#AC_CHECK_FUNCS(localtime_r) # Already checked by MySQL
diff --git a/innobase/data/data0data.c b/innobase/data/data0data.c
index 61a02f7efd0..8ab5acb4da7 100644
--- a/innobase/data/data0data.c
+++ b/innobase/data/data0data.c
@@ -683,7 +683,7 @@ from entry with dtuple_convert_big_rec. */
void
dtuple_convert_back_big_rec(
/*========================*/
- dict_index_t* index, /* in: index */
+ dict_index_t* index __attribute__((unused)), /* in: index */
dtuple_t* entry, /* in: entry whose data was put to vector */
big_rec_t* vector) /* in, own: big rec vector; it is
freed in this function */
diff --git a/innobase/dict/dict0boot.c b/innobase/dict/dict0boot.c
index 206fbe32940..374c567c3ca 100644
--- a/innobase/dict/dict0boot.c
+++ b/innobase/dict/dict0boot.c
@@ -254,27 +254,29 @@ dict_boot(void)
/* Insert into the dictionary cache the descriptions of the basic
system tables */
/*-------------------------*/
- table = dict_mem_table_create("SYS_TABLES", DICT_HDR_SPACE, 8);
-
- dict_mem_table_add_col(table, "NAME", DATA_BINARY, 0, 0, 0);
- dict_mem_table_add_col(table, "ID", DATA_BINARY, 0, 0, 0);
- dict_mem_table_add_col(table, "N_COLS", DATA_INT, 0, 4, 0);
- dict_mem_table_add_col(table, "TYPE", DATA_INT, 0, 4, 0);
- dict_mem_table_add_col(table, "MIX_ID", DATA_BINARY, 0, 0, 0);
- dict_mem_table_add_col(table, "MIX_LEN", DATA_INT, 0, 4, 0);
- dict_mem_table_add_col(table, "CLUSTER_NAME", DATA_BINARY, 0, 0, 0);
- dict_mem_table_add_col(table, "SPACE", DATA_INT, 0, 4, 0);
+ table = dict_mem_table_create((char *) "SYS_TABLES", DICT_HDR_SPACE,8);
+
+ dict_mem_table_add_col(table, (char *) "NAME", DATA_BINARY, 0, 0, 0);
+ dict_mem_table_add_col(table, (char *) "ID", DATA_BINARY, 0, 0, 0);
+ dict_mem_table_add_col(table, (char *) "N_COLS", DATA_INT, 0, 4, 0);
+ dict_mem_table_add_col(table, (char *) "TYPE", DATA_INT, 0, 4, 0);
+ dict_mem_table_add_col(table, (char *) "MIX_ID", DATA_BINARY, 0, 0, 0);
+ dict_mem_table_add_col(table, (char *) "MIX_LEN", DATA_INT, 0, 4, 0);
+ dict_mem_table_add_col(table, (char *) "CLUSTER_NAME", DATA_BINARY,
+ 0, 0, 0);
+ dict_mem_table_add_col(table, (char *) "SPACE", DATA_INT, 0, 4, 0);
table->id = DICT_TABLES_ID;
dict_table_add_to_cache(table);
dict_sys->sys_tables = table;
- index = dict_mem_index_create("SYS_TABLES", "CLUST_IND",
- DICT_HDR_SPACE,
- DICT_UNIQUE | DICT_CLUSTERED, 1);
+ index = dict_mem_index_create((char *) "SYS_TABLES", (char *)
+ "CLUST_IND",
+ DICT_HDR_SPACE,
+ DICT_UNIQUE | DICT_CLUSTERED, 1);
- dict_mem_index_add_field(index, "NAME", 0);
+ dict_mem_index_add_field(index, (char *) "NAME", 0);
index->page_no = mtr_read_ulint(dict_hdr + DICT_HDR_TABLES,
MLOG_4BYTES, &mtr);
@@ -282,51 +284,52 @@ dict_boot(void)
ut_a(dict_index_add_to_cache(table, index));
/*-------------------------*/
- index = dict_mem_index_create("SYS_TABLES", "ID_IND", DICT_HDR_SPACE,
- DICT_UNIQUE, 1);
- dict_mem_index_add_field(index, "ID", 0);
+ index = dict_mem_index_create((char *) "SYS_TABLES",
+ (char *) "ID_IND", DICT_HDR_SPACE,
+ DICT_UNIQUE, 1);
+ dict_mem_index_add_field(index, (char *) "ID", 0);
index->page_no = mtr_read_ulint(dict_hdr + DICT_HDR_TABLE_IDS,
MLOG_4BYTES, &mtr);
index->id = DICT_TABLE_IDS_ID;
ut_a(dict_index_add_to_cache(table, index));
/*-------------------------*/
- table = dict_mem_table_create("SYS_COLUMNS", DICT_HDR_SPACE, 7);
-
- dict_mem_table_add_col(table, "TABLE_ID", DATA_BINARY, 0, 0, 0);
- dict_mem_table_add_col(table, "POS", DATA_INT, 0, 4, 0);
- dict_mem_table_add_col(table, "NAME", DATA_BINARY, 0, 0, 0);
- dict_mem_table_add_col(table, "MTYPE", DATA_INT, 0, 4, 0);
- dict_mem_table_add_col(table, "PRTYPE", DATA_INT, 0, 4, 0);
- dict_mem_table_add_col(table, "LEN", DATA_INT, 0, 4, 0);
- dict_mem_table_add_col(table, "PREC", DATA_INT, 0, 4, 0);
+ table = dict_mem_table_create((char *) "SYS_COLUMNS",DICT_HDR_SPACE,7);
+
+ dict_mem_table_add_col(table, (char *) "TABLE_ID", DATA_BINARY,0,0,0);
+ dict_mem_table_add_col(table, (char *) "POS", DATA_INT, 0, 4, 0);
+ dict_mem_table_add_col(table, (char *) "NAME", DATA_BINARY, 0, 0, 0);
+ dict_mem_table_add_col(table, (char *) "MTYPE", DATA_INT, 0, 4, 0);
+ dict_mem_table_add_col(table, (char *) "PRTYPE", DATA_INT, 0, 4, 0);
+ dict_mem_table_add_col(table, (char *) "LEN", DATA_INT, 0, 4, 0);
+ dict_mem_table_add_col(table, (char *) "PREC", DATA_INT, 0, 4, 0);
table->id = DICT_COLUMNS_ID;
dict_table_add_to_cache(table);
dict_sys->sys_columns = table;
- index = dict_mem_index_create("SYS_COLUMNS", "CLUST_IND",
- DICT_HDR_SPACE,
- DICT_UNIQUE | DICT_CLUSTERED, 2);
+ index = dict_mem_index_create((char *) "SYS_COLUMNS",
+ (char *) "CLUST_IND", DICT_HDR_SPACE,
+ DICT_UNIQUE | DICT_CLUSTERED, 2);
- dict_mem_index_add_field(index, "TABLE_ID", 0);
- dict_mem_index_add_field(index, "POS", 0);
+ dict_mem_index_add_field(index, (char *) "TABLE_ID", 0);
+ dict_mem_index_add_field(index, (char *) "POS", 0);
index->page_no = mtr_read_ulint(dict_hdr + DICT_HDR_COLUMNS,
MLOG_4BYTES, &mtr);
index->id = DICT_COLUMNS_ID;
ut_a(dict_index_add_to_cache(table, index));
/*-------------------------*/
- table = dict_mem_table_create("SYS_INDEXES", DICT_HDR_SPACE, 7);
+ table = dict_mem_table_create((char *) "SYS_INDEXES",DICT_HDR_SPACE,7);
- dict_mem_table_add_col(table, "TABLE_ID", DATA_BINARY, 0, 0, 0);
- dict_mem_table_add_col(table, "ID", DATA_BINARY, 0, 0, 0);
- dict_mem_table_add_col(table, "NAME", DATA_BINARY, 0, 0, 0);
- dict_mem_table_add_col(table, "N_FIELDS", DATA_INT, 0, 4, 0);
- dict_mem_table_add_col(table, "TYPE", DATA_INT, 0, 4, 0);
- dict_mem_table_add_col(table, "SPACE", DATA_INT, 0, 4, 0);
- dict_mem_table_add_col(table, "PAGE_NO", DATA_INT, 0, 4, 0);
+ dict_mem_table_add_col(table, (char *) "TABLE_ID", DATA_BINARY, 0,0,0);
+ dict_mem_table_add_col(table, (char *) "ID", DATA_BINARY, 0, 0, 0);
+ dict_mem_table_add_col(table, (char *) "NAME", DATA_BINARY, 0, 0, 0);
+ dict_mem_table_add_col(table, (char *) "N_FIELDS", DATA_INT, 0, 4, 0);
+ dict_mem_table_add_col(table, (char *) "TYPE", DATA_INT, 0, 4, 0);
+ dict_mem_table_add_col(table, (char *) "SPACE", DATA_INT, 0, 4, 0);
+ dict_mem_table_add_col(table, (char *) "PAGE_NO", DATA_INT, 0, 4, 0);
/* The '+ 2' below comes from the 2 system fields */
ut_ad(DICT_SYS_INDEXES_PAGE_NO_FIELD == 6 + 2);
@@ -336,34 +339,34 @@ dict_boot(void)
dict_table_add_to_cache(table);
dict_sys->sys_indexes = table;
- index = dict_mem_index_create("SYS_INDEXES", "CLUST_IND",
- DICT_HDR_SPACE,
- DICT_UNIQUE | DICT_CLUSTERED, 2);
+ index = dict_mem_index_create((char *) "SYS_INDEXES",
+ (char *) "CLUST_IND", DICT_HDR_SPACE,
+ DICT_UNIQUE | DICT_CLUSTERED, 2);
- dict_mem_index_add_field(index, "TABLE_ID", 0);
- dict_mem_index_add_field(index, "ID", 0);
+ dict_mem_index_add_field(index, (char *) "TABLE_ID", 0);
+ dict_mem_index_add_field(index, (char *) "ID", 0);
index->page_no = mtr_read_ulint(dict_hdr + DICT_HDR_INDEXES,
MLOG_4BYTES, &mtr);
index->id = DICT_INDEXES_ID;
ut_a(dict_index_add_to_cache(table, index));
/*-------------------------*/
- table = dict_mem_table_create("SYS_FIELDS", DICT_HDR_SPACE, 3);
+ table = dict_mem_table_create((char *) "SYS_FIELDS", DICT_HDR_SPACE,3);
- dict_mem_table_add_col(table, "INDEX_ID", DATA_BINARY, 0, 0, 0);
- dict_mem_table_add_col(table, "POS", DATA_INT, 0, 4, 0);
- dict_mem_table_add_col(table, "COL_NAME", DATA_BINARY, 0, 0, 0);
+ dict_mem_table_add_col(table, (char *) "INDEX_ID", DATA_BINARY, 0,0,0);
+ dict_mem_table_add_col(table, (char *) "POS", DATA_INT, 0, 4, 0);
+ dict_mem_table_add_col(table, (char *) "COL_NAME", DATA_BINARY, 0,0,0);
table->id = DICT_FIELDS_ID;
dict_table_add_to_cache(table);
dict_sys->sys_fields = table;
- index = dict_mem_index_create("SYS_FIELDS", "CLUST_IND",
- DICT_HDR_SPACE,
- DICT_UNIQUE | DICT_CLUSTERED, 2);
+ index = dict_mem_index_create((char *) "SYS_FIELDS",
+ (char *) "CLUST_IND", DICT_HDR_SPACE,
+ DICT_UNIQUE | DICT_CLUSTERED, 2);
- dict_mem_index_add_field(index, "INDEX_ID", 0);
- dict_mem_index_add_field(index, "POS", 0);
+ dict_mem_index_add_field(index, (char *) "INDEX_ID", 0);
+ dict_mem_index_add_field(index, (char *) "POS", 0);
index->page_no = mtr_read_ulint(dict_hdr + DICT_HDR_FIELDS,
MLOG_4BYTES, &mtr);
diff --git a/innobase/dict/dict0crea.c b/innobase/dict/dict0crea.c
index d981dc59036..60beeacf435 100644
--- a/innobase/dict/dict0crea.c
+++ b/innobase/dict/dict0crea.c
@@ -1045,8 +1045,8 @@ dict_create_or_check_foreign_constraint_tables(void)
mutex_enter(&(dict_sys->mutex));
- table1 = dict_table_get_low("SYS_FOREIGN");
- table2 = dict_table_get_low("SYS_FOREIGN_COLS");
+ table1 = dict_table_get_low((char *) "SYS_FOREIGN");
+ table2 = dict_table_get_low((char *) "SYS_FOREIGN_COLS");
if (table1 && table2
&& UT_LIST_GET_LEN(table1->indexes) == 3
@@ -1062,18 +1062,18 @@ dict_create_or_check_foreign_constraint_tables(void)
trx = trx_allocate_for_mysql();
- trx->op_info = "creating foreign key sys tables";
+ trx->op_info = (char *) "creating foreign key sys tables";
if (table1) {
fprintf(stderr,
"InnoDB: dropping incompletely created SYS_FOREIGN table\n");
- row_drop_table_for_mysql("SYS_FOREIGN", trx, TRUE);
+ row_drop_table_for_mysql((char *) "SYS_FOREIGN", trx, TRUE);
}
if (table2) {
fprintf(stderr,
"InnoDB: dropping incompletely created SYS_FOREIGN_COLS table\n");
- row_drop_table_for_mysql("SYS_FOREIGN_COLS", trx, TRUE);
+ row_drop_table_for_mysql((char *) "SYS_FOREIGN_COLS",trx,TRUE);
}
fprintf(stderr,
@@ -1083,7 +1083,7 @@ dict_create_or_check_foreign_constraint_tables(void)
there are 2 secondary indexes on SYS_FOREIGN, and they
are defined just like below */
- str =
+ str = (char *)
"PROCEDURE CREATE_FOREIGN_SYS_TABLES_PROC () IS\n"
"BEGIN\n"
"CREATE TABLE\n"
@@ -1122,15 +1122,15 @@ dict_create_or_check_foreign_constraint_tables(void)
fprintf(stderr,
"InnoDB: dropping incompletely created SYS_FOREIGN tables\n");
- row_drop_table_for_mysql("SYS_FOREIGN", trx, TRUE);
- row_drop_table_for_mysql("SYS_FOREIGN_COLS", trx, TRUE);
+ row_drop_table_for_mysql((char *) "SYS_FOREIGN", trx, TRUE);
+ row_drop_table_for_mysql((char *) "SYS_FOREIGN_COLS",trx,TRUE);
error = DB_MUST_GET_MORE_FILE_SPACE;
}
que_graph_free(graph);
- trx->op_info = "";
+ trx->op_info = (char *) "";
trx_free_for_mysql(trx);
@@ -1166,7 +1166,7 @@ dict_create_add_foreigns_to_dictionary(
ut_ad(mutex_own(&(dict_sys->mutex)));
- if (NULL == dict_table_get_low("SYS_FOREIGN")) {
+ if (NULL == dict_table_get_low((char *) "SYS_FOREIGN")) {
fprintf(stderr,
"InnoDB: table SYS_FOREIGN not found from internal data dictionary\n");
return(DB_ERROR);
diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c
index 65f40d345d8..85199b90a5a 100644
--- a/innobase/dict/dict0dict.c
+++ b/innobase/dict/dict0dict.c
@@ -594,15 +594,19 @@ dict_table_add_to_cache(
The clustered index will not always physically contain all
system columns. */
- dict_mem_table_add_col(table, "DB_ROW_ID", DATA_SYS, DATA_ROW_ID, 0, 0);
+ dict_mem_table_add_col(table, (char *) "DB_ROW_ID", DATA_SYS,
+ DATA_ROW_ID, 0, 0);
ut_ad(DATA_ROW_ID == 0);
- dict_mem_table_add_col(table, "DB_TRX_ID", DATA_SYS, DATA_TRX_ID, 0, 0);
+ dict_mem_table_add_col(table, (char *) "DB_TRX_ID", DATA_SYS,
+ DATA_TRX_ID, 0, 0);
ut_ad(DATA_TRX_ID == 1);
- dict_mem_table_add_col(table, "DB_ROLL_PTR", DATA_SYS, DATA_ROLL_PTR,
+ dict_mem_table_add_col(table, (char *) "DB_ROLL_PTR", DATA_SYS,
+ DATA_ROLL_PTR,
0, 0);
ut_ad(DATA_ROLL_PTR == 2);
- dict_mem_table_add_col(table, "DB_MIX_ID", DATA_SYS, DATA_MIX_ID, 0, 0);
+ dict_mem_table_add_col(table, (char *) "DB_MIX_ID", DATA_SYS,
+ DATA_MIX_ID, 0, 0);
ut_ad(DATA_MIX_ID == 3);
ut_ad(DATA_N_SYS_COLS == 4); /* This assert reminds that if a new
system column is added to the program,
@@ -1800,8 +1804,8 @@ char*
dict_scan_to(
/*=========*/
- char* ptr, /* in: scan from */
- char* string) /* in: look for this */
+ char* ptr, /* in: scan from */
+ const char *string) /* in: look for this */
{
ibool success;
ulint i;
@@ -1839,7 +1843,7 @@ dict_accept(
/* out: if string was accepted, the pointer
is moved after that, else ptr is returned */
char* ptr, /* in: scan from this */
- char* string, /* in: accept only this string as the next
+ const char* string, /* in: accept only this string as the next
non-whitespace string */
ibool* success)/* out: TRUE if accepted */
{
@@ -2096,7 +2100,7 @@ dict_create_foreign_constraints(
}
loop:
- ptr = dict_scan_to(ptr, "FOREIGN");
+ ptr = dict_scan_to(ptr, (char *) "FOREIGN");
if (*ptr == '\0') {
@@ -2108,19 +2112,19 @@ loop:
return(error);
}
- ptr = dict_accept(ptr, "FOREIGN", &success);
+ ptr = dict_accept(ptr, (char *) "FOREIGN", &success);
if (!isspace(*ptr)) {
goto loop;
}
- ptr = dict_accept(ptr, "KEY", &success);
+ ptr = dict_accept(ptr, (char *) "KEY", &success);
if (!success) {
goto loop;
}
- ptr = dict_accept(ptr, "(", &success);
+ ptr = dict_accept(ptr, (char *) "(", &success);
if (!success) {
goto loop;
@@ -2138,13 +2142,13 @@ col_loop1:
i++;
- ptr = dict_accept(ptr, ",", &success);
+ ptr = dict_accept(ptr, (char *) ",", &success);
if (success) {
goto col_loop1;
}
- ptr = dict_accept(ptr, ")", &success);
+ ptr = dict_accept(ptr, (char *) ")", &success);
if (!success) {
return(DB_CANNOT_ADD_CONSTRAINT);
@@ -2159,7 +2163,7 @@ col_loop1:
return(DB_CANNOT_ADD_CONSTRAINT);
}
- ptr = dict_accept(ptr, "REFERENCES", &success);
+ ptr = dict_accept(ptr, (char *) "REFERENCES", &success);
if (!success || !isspace(*ptr)) {
return(DB_CANNOT_ADD_CONSTRAINT);
@@ -2194,7 +2198,7 @@ col_loop1:
return(DB_CANNOT_ADD_CONSTRAINT);
}
- ptr = dict_accept(ptr, "(", &success);
+ ptr = dict_accept(ptr, (char *) "(", &success);
if (!success) {
dict_foreign_free(foreign);
@@ -2214,13 +2218,13 @@ col_loop2:
return(DB_CANNOT_ADD_CONSTRAINT);
}
- ptr = dict_accept(ptr, ",", &success);
+ ptr = dict_accept(ptr, (char *) ",", &success);
if (success) {
goto col_loop2;
}
- ptr = dict_accept(ptr, ")", &success);
+ ptr = dict_accept(ptr, (char *) ")", &success);
if (!success || foreign->n_fields != i) {
dict_foreign_free(foreign);
@@ -2816,7 +2820,8 @@ void
dict_update_statistics_low(
/*=======================*/
dict_table_t* table, /* in: table */
- ibool has_dict_mutex) /* in: TRUE if the caller has the
+ ibool has_dict_mutex __attribute__((unused)))
+ /* in: TRUE if the caller has the
dictionary mutex */
{
dict_index_t* index;
diff --git a/innobase/dict/dict0load.c b/innobase/dict/dict0load.c
index 6d48ddf4d95..e9caa37fecc 100644
--- a/innobase/dict/dict0load.c
+++ b/innobase/dict/dict0load.c
@@ -48,7 +48,7 @@ dict_get_first_table_name_in_db(
mtr_start(&mtr);
- sys_tables = dict_table_get_low("SYS_TABLES");
+ sys_tables = dict_table_get_low((char *) "SYS_TABLES");
sys_index = UT_LIST_GET_FIRST(sys_tables->indexes);
tuple = dtuple_create(heap, 1);
@@ -127,7 +127,7 @@ dict_print(void)
mtr_start(&mtr);
- sys_tables = dict_table_get_low("SYS_TABLES");
+ sys_tables = dict_table_get_low((char *) "SYS_TABLES");
sys_index = UT_LIST_GET_FIRST(sys_tables->indexes);
btr_pcur_open_at_index_side(TRUE, sys_index, BTR_SEARCH_LEAF, &pcur,
@@ -216,7 +216,7 @@ dict_load_columns(
mtr_start(&mtr);
- sys_columns = dict_table_get_low("SYS_COLUMNS");
+ sys_columns = dict_table_get_low((char*) "SYS_COLUMNS");
sys_index = UT_LIST_GET_FIRST(sys_columns->indexes);
tuple = dtuple_create(heap, 1);
@@ -246,7 +246,7 @@ dict_load_columns(
ut_ad(len == 4);
ut_a(i == mach_read_from_4(field));
- ut_a(0 == ut_strcmp("NAME",
+ ut_a(0 == ut_strcmp((char*) "NAME",
dict_field_get_col(
dict_index_get_nth_field(
dict_table_get_first_index(sys_columns), 4))->name));
@@ -268,7 +268,7 @@ dict_load_columns(
field = rec_get_nth_field(rec, 7, &len);
col_len = mach_read_from_4(field);
- ut_a(0 == ut_strcmp("PREC",
+ ut_a(0 == ut_strcmp((char*) "PREC",
dict_field_get_col(
dict_index_get_nth_field(
dict_table_get_first_index(sys_columns), 8))->name));
@@ -314,7 +314,7 @@ dict_load_fields(
mtr_start(&mtr);
- sys_fields = dict_table_get_low("SYS_FIELDS");
+ sys_fields = dict_table_get_low((char*) "SYS_FIELDS");
sys_index = UT_LIST_GET_FIRST(sys_fields->indexes);
tuple = dtuple_create(heap, 1);
@@ -348,7 +348,7 @@ dict_load_fields(
ut_ad(len == 4);
ut_a(i == mach_read_from_4(field));
- ut_a(0 == ut_strcmp("COL_NAME",
+ ut_a(0 == ut_strcmp((char*) "COL_NAME",
dict_field_get_col(
dict_index_get_nth_field(
dict_table_get_first_index(sys_fields), 4))->name));
@@ -411,7 +411,7 @@ dict_load_indexes(
mtr_start(&mtr);
- sys_indexes = dict_table_get_low("SYS_INDEXES");
+ sys_indexes = dict_table_get_low((char*) "SYS_INDEXES");
sys_index = UT_LIST_GET_FIRST(sys_indexes->indexes);
tuple = dtuple_create(heap, 1);
@@ -476,7 +476,7 @@ dict_load_indexes(
field = rec_get_nth_field(rec, 7, &len);
space = mach_read_from_4(field);
- ut_a(0 == ut_strcmp("PAGE_NO",
+ ut_a(0 == ut_strcmp((char*) "PAGE_NO",
dict_field_get_col(
dict_index_get_nth_field(
dict_table_get_first_index(sys_indexes), 8))->name));
@@ -574,7 +574,7 @@ dict_load_table(
mtr_start(&mtr);
- sys_tables = dict_table_get_low("SYS_TABLES");
+ sys_tables = dict_table_get_low((char *) "SYS_TABLES");
sys_index = UT_LIST_GET_FIRST(sys_tables->indexes);
tuple = dtuple_create(heap, 1);
@@ -610,7 +610,7 @@ dict_load_table(
return(NULL);
}
- ut_a(0 == ut_strcmp("SPACE",
+ ut_a(0 == ut_strcmp((char *) "SPACE",
dict_field_get_col(
dict_index_get_nth_field(
dict_table_get_first_index(sys_tables), 9))->name));
@@ -618,7 +618,7 @@ dict_load_table(
field = rec_get_nth_field(rec, 9, &len);
space = mach_read_from_4(field);
- ut_a(0 == ut_strcmp("N_COLS",
+ ut_a(0 == ut_strcmp((char *) "N_COLS",
dict_field_get_col(
dict_index_get_nth_field(
dict_table_get_first_index(sys_tables), 4))->name));
@@ -628,7 +628,7 @@ dict_load_table(
table = dict_mem_table_create(name, space, n_cols);
- ut_a(0 == ut_strcmp("ID",
+ ut_a(0 == ut_strcmp((char *) "ID",
dict_field_get_col(
dict_index_get_nth_field(
dict_table_get_first_index(sys_tables), 3))->name));
@@ -829,7 +829,7 @@ dict_load_foreign_cols(
foreign->n_fields * sizeof(void*));
mtr_start(&mtr);
- sys_foreign_cols = dict_table_get_low("SYS_FOREIGN_COLS");
+ sys_foreign_cols = dict_table_get_low((char *) "SYS_FOREIGN_COLS");
sys_index = UT_LIST_GET_FIRST(sys_foreign_cols->indexes);
tuple = dtuple_create(foreign->heap, 1);
@@ -907,7 +907,7 @@ dict_load_foreign(
mtr_start(&mtr);
- sys_foreign = dict_table_get_low("SYS_FOREIGN");
+ sys_foreign = dict_table_get_low((char *) "SYS_FOREIGN");
sys_index = UT_LIST_GET_FIRST(sys_foreign->indexes);
tuple = dtuple_create(heap2, 1);
@@ -1026,7 +1026,7 @@ dict_load_foreigns(
ut_ad(mutex_own(&(dict_sys->mutex)));
- sys_foreign = dict_table_get_low("SYS_FOREIGN");
+ sys_foreign = dict_table_get_low((char *) "SYS_FOREIGN");
if (sys_foreign == NULL) {
/* No foreign keys defined yet in this database */
diff --git a/innobase/eval/eval0eval.c b/innobase/eval/eval0eval.c
index 110387d8373..157d4e4f98d 100644
--- a/innobase/eval/eval0eval.c
+++ b/innobase/eval/eval0eval.c
@@ -164,8 +164,8 @@ eval_logical(
que_node_t* arg1;
que_node_t* arg2;
ibool val1;
- ibool val2;
- ibool val;
+ ibool val2 = 0; /* remove warning */
+ ibool val = 0; /* remove warning */
int func;
ut_ad(que_node_get_type(logical_node) == QUE_NODE_FUNC);
@@ -205,7 +205,7 @@ eval_arith(
que_node_t* arg1;
que_node_t* arg2;
lint val1;
- lint val2;
+ lint val2 = 0; /* remove warning */
lint val;
int func;
@@ -283,7 +283,7 @@ eval_predefined_2(
{
que_node_t* arg;
que_node_t* arg1;
- que_node_t* arg2;
+ que_node_t* arg2 = 0; /* remove warning (??? bug ???) */
lint int_val;
byte* data;
ulint len1;
diff --git a/innobase/fil/fil0fil.c b/innobase/fil/fil0fil.c
index 29bd52ff94f..3e0f21395ef 100644
--- a/innobase/fil/fil0fil.c
+++ b/innobase/fil/fil0fil.c
@@ -1290,7 +1290,7 @@ fil_aio_wait(
ut_ad(fil_validate());
if (os_aio_use_native_aio) {
- srv_io_thread_op_info[segment] = "native aio handle";
+ srv_io_thread_op_info[segment] = (char *) "native aio handle";
#ifdef WIN_ASYNC_IO
ret = os_aio_windows_handle(segment, 0, &fil_node, &message,
&type);
@@ -1301,7 +1301,7 @@ fil_aio_wait(
ut_a(0);
#endif
} else {
- srv_io_thread_op_info[segment] = "simulated aio handle";
+ srv_io_thread_op_info[segment] =(char *)"simulated aio handle";
ret = os_aio_simulated_handle(segment, (void**) &fil_node,
&message, &type);
@@ -1309,7 +1309,7 @@ fil_aio_wait(
ut_a(ret);
- srv_io_thread_op_info[segment] = "complete io for fil node";
+ srv_io_thread_op_info[segment] = (char *) "complete io for fil node";
mutex_enter(&(system->mutex));
@@ -1322,10 +1322,11 @@ fil_aio_wait(
/* Do the i/o handling */
if (buf_pool_is_block(message)) {
- srv_io_thread_op_info[segment] = "complete io for buf page";
+ srv_io_thread_op_info[segment] =
+ (char *) "complete io for buf page";
buf_page_io_complete(message);
} else {
- srv_io_thread_op_info[segment] = "complete io for log";
+ srv_io_thread_op_info[segment] =(char *) "complete io for log";
log_io_complete(message);
}
}
diff --git a/innobase/fsp/fsp0fsp.c b/innobase/fsp/fsp0fsp.c
index 10370731edf..1abb043fdc2 100644
--- a/innobase/fsp/fsp0fsp.c
+++ b/innobase/fsp/fsp0fsp.c
@@ -803,7 +803,7 @@ fsp_parse_init_file_page(
/*=====================*/
/* out: end of log record or NULL */
byte* ptr, /* in: buffer */
- byte* end_ptr,/* in: buffer end */
+ byte* end_ptr __attribute__((unused)), /* in: buffer end */
page_t* page) /* in: page or NULL */
{
ut_ad(ptr && end_ptr);
@@ -1428,7 +1428,7 @@ fsp_seg_inode_page_get_nth_inode(
/* out: segment inode */
page_t* page, /* in: segment inode page */
ulint i, /* in: inode index on page */
- mtr_t* mtr) /* in: mini-transaction handle */
+ mtr_t* mtr __attribute__((unused))) /* in: mini-transaction handle */
{
ut_ad(i < FSP_SEG_INODES_PER_PAGE);
ut_ad(mtr_memo_contains(mtr, buf_block_align(page),
@@ -1670,7 +1670,7 @@ fseg_get_nth_frag_page_no(
/* out: page number, FIL_NULL if not in use */
fseg_inode_t* inode, /* in: segment inode */
ulint n, /* in: slot index */
- mtr_t* mtr) /* in: mtr handle */
+ mtr_t* mtr __attribute__((unused))) /* in: mtr handle */
{
ut_ad(inode && mtr);
ut_ad(n < FSEG_FRAG_ARR_N_SLOTS);
@@ -1808,7 +1808,7 @@ fseg_create_general(
fsp_header_t* space_header;
fseg_inode_t* inode;
dulint seg_id;
- fseg_header_t* header;
+ fseg_header_t* header = 0; /* remove warning */
rw_lock_t* latch;
ibool success;
page_t* ret = NULL;
diff --git a/innobase/ibuf/ibuf0ibuf.c b/innobase/ibuf/ibuf0ibuf.c
index 2cbffadf6a9..b7d691485cc 100644
--- a/innobase/ibuf/ibuf0ibuf.c
+++ b/innobase/ibuf/ibuf0ibuf.c
@@ -292,6 +292,7 @@ ibuf_count_get(
/**********************************************************************
Sets the ibuf count for a given page. */
+#ifdef UNIV_IBUF_DEBUG
static
void
ibuf_count_set(
@@ -306,6 +307,7 @@ ibuf_count_set(
*(ibuf_counts[space] + page_no) = val;
}
+#endif
/**********************************************************************
Creates the insert buffer data structure at a database startup and
@@ -472,19 +474,18 @@ ibuf_data_init_for_space(
table = dict_mem_table_create(buf, space, 2);
- dict_mem_table_add_col(table, "PAGE_NO", DATA_BINARY, 0, 0, 0);
- dict_mem_table_add_col(table, "TYPES", DATA_BINARY, 0, 0, 0);
+ dict_mem_table_add_col(table,(char *) "PAGE_NO", DATA_BINARY, 0, 0, 0);
+ dict_mem_table_add_col(table,(char *) "TYPES", DATA_BINARY, 0, 0, 0);
table->id = ut_dulint_add(DICT_IBUF_ID_MIN, space);
dict_table_add_to_cache(table);
- index = dict_mem_index_create(buf, "CLUST_IND", space,
- DICT_CLUSTERED | DICT_UNIVERSAL | DICT_IBUF,
- 2);
+ index = dict_mem_index_create(buf, (char *) "CLUST_IND", space,
+ DICT_CLUSTERED | DICT_UNIVERSAL | DICT_IBUF,2);
- dict_mem_index_add_field(index, "PAGE_NO", 0);
- dict_mem_index_add_field(index, "TYPES", 0);
+ dict_mem_index_add_field(index, (char *) "PAGE_NO", 0);
+ dict_mem_index_add_field(index, (char *) "TYPES", 0);
index->page_no = FSP_IBUF_TREE_ROOT_PAGE_NO;
@@ -538,7 +539,7 @@ ibuf_parse_bitmap_init(
/*===================*/
/* out: end of log record or NULL */
byte* ptr, /* in: buffer */
- byte* end_ptr,/* in: buffer end */
+ byte* end_ptr __attribute__((unused)), /* in: buffer end */
page_t* page, /* in: page or NULL */
mtr_t* mtr) /* in: mtr or NULL */
{
@@ -561,7 +562,8 @@ ibuf_bitmap_page_get_bits(
page_t* page, /* in: bitmap page */
ulint page_no,/* in: page whose bits to get */
ulint bit, /* in: IBUF_BITMAP_FREE, IBUF_BITMAP_BUFFERED, ... */
- mtr_t* mtr) /* in: mtr containing an x-latch to the bitmap page */
+ mtr_t* mtr __attribute__((unused))) /* in: mtr containing an x-latch
+ to the bitmap page */
{
ulint byte_offset;
ulint bit_offset;
diff --git a/innobase/include/Makefile.am b/innobase/include/Makefile.am
index fd5cc8b1a80..8664f6dfc17 100644
--- a/innobase/include/Makefile.am
+++ b/innobase/include/Makefile.am
@@ -55,5 +55,7 @@ noinst_HEADERS = btr0btr.h btr0btr.ic btr0cur.h btr0cur.ic \
ut0dbg.h ut0lst.h ut0mem.h ut0mem.ic ut0rnd.h ut0rnd.ic \
ut0sort.h ut0ut.h ut0ut.ic
+EXTRA_DIST = Makefile.i
+
# Don't update the files from bitkeeper
%::SCCS/s.%
diff --git a/innobase/include/Makefile.i b/innobase/include/Makefile.i
index 8c7e9910f26..985ec525950 100644
--- a/innobase/include/Makefile.i
+++ b/innobase/include/Makefile.i
@@ -2,7 +2,7 @@
libsdir = ../libs
-INCLUDES = -I../../include -I../include
+INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../../include -I../../include
# Don't update the files from bitkeeper
%::SCCS/s.%
diff --git a/innobase/include/btr0btr.ic b/innobase/include/btr0btr.ic
index 5c1c89e9840..09006828cc9 100644
--- a/innobase/include/btr0btr.ic
+++ b/innobase/include/btr0btr.ic
@@ -89,7 +89,7 @@ btr_page_get_level(
/*===============*/
/* out: level, leaf level == 0 */
page_t* page, /* in: index page */
- mtr_t* mtr) /* in: mini-transaction handle */
+ mtr_t* mtr __attribute__((unused))) /* in: mini-transaction handle */
{
ut_ad(page && mtr);
@@ -121,7 +121,7 @@ btr_page_get_next(
/*==============*/
/* out: next page number */
page_t* page, /* in: index page */
- mtr_t* mtr) /* in: mini-transaction handle */
+ mtr_t* mtr __attribute__((unused))) /* in: mini-transaction handle */
{
ut_ad(page && mtr);
ut_ad(mtr_memo_contains(mtr, buf_block_align(page),
@@ -155,7 +155,7 @@ btr_page_get_prev(
/*==============*/
/* out: prev page number */
page_t* page, /* in: index page */
- mtr_t* mtr) /* in: mini-transaction handle */
+ mtr_t* mtr __attribute__((unused))) /* in: mini-transaction handle */
{
ut_ad(page && mtr);
diff --git a/innobase/include/buf0buf.ic b/innobase/include/buf0buf.ic
index 51e2541e04d..7227c79dc6a 100644
--- a/innobase/include/buf0buf.ic
+++ b/innobase/include/buf0buf.ic
@@ -652,9 +652,10 @@ UNIV_INLINE
void
buf_page_dbg_add_level(
/*===================*/
- buf_frame_t* frame, /* in: buffer page where we have acquired
- a latch */
- ulint level) /* in: latching order level */
+ buf_frame_t* frame __attribute__((unused)), /* in: buffer page
+ where we have acquired latch */
+ ulint level __attribute__((unused))) /* in: latching order
+ level */
{
#ifdef UNIV_SYNC_DEBUG
sync_thread_add_level(&(buf_block_align(frame)->lock), level);
diff --git a/innobase/include/dict0dict.ic b/innobase/include/dict0dict.ic
index 821465f96a8..71ea67117a7 100644
--- a/innobase/include/dict0dict.ic
+++ b/innobase/include/dict0dict.ic
@@ -106,7 +106,7 @@ dict_table_get_n_sys_cols(
/*======================*/
/* out: number of system (e.g.,
ROW_ID) columns of a table */
- dict_table_t* table) /* in: table */
+ dict_table_t* table __attribute__((unused))) /* in: table */
{
ut_ad(table);
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
diff --git a/innobase/include/dyn0dyn.h b/innobase/include/dyn0dyn.h
index cca302994c1..501fde05e90 100644
--- a/innobase/include/dyn0dyn.h
+++ b/innobase/include/dyn0dyn.h
@@ -19,7 +19,6 @@ typedef dyn_block_t dyn_array_t;
/* This is the initial 'payload' size of a dynamic array;
this must be > MLOG_BUF_MARGIN + 30! */
-
#define DYN_ARRAY_DATA_SIZE 512
/*************************************************************************
diff --git a/innobase/include/ha0ha.ic b/innobase/include/ha0ha.ic
index 1aad7d5a36f..761bc3b20de 100644
--- a/innobase/include/ha0ha.ic
+++ b/innobase/include/ha0ha.ic
@@ -49,7 +49,7 @@ ha_node_t*
ha_chain_get_next(
/*==============*/
/* out: next node, NULL if none */
- hash_table_t* table, /* in: hash table */
+ hash_table_t* table __attribute__((unused)), /* in: hash table */
ha_node_t* node) /* in: hash chain node */
{
ut_ad(table);
diff --git a/innobase/include/row0mysql.ic b/innobase/include/row0mysql.ic
index 6096e5771f7..e9d493da8b5 100644
--- a/innobase/include/row0mysql.ic
+++ b/innobase/include/row0mysql.ic
@@ -15,7 +15,8 @@ row_mysql_store_var_len(
/*====================*/
/* out: dest + 2 */
byte* dest, /* in: where to store */
- ulint len) /* in: length, must fit in two bytes */
+ ulint len __attribute__((unused))) /* in: length, must fit in two
+ bytes */
{
ut_ad(len < 256 * 256);
/*
diff --git a/innobase/include/row0vers.ic b/innobase/include/row0vers.ic
index aa7a7aa2299..5ece47c35d1 100644
--- a/innobase/include/row0vers.ic
+++ b/innobase/include/row0vers.ic
@@ -60,7 +60,7 @@ row_vers_sec_rec_may_see_older(
/*===========================*/
/* out: FALSE if can be read immediately */
rec_t* rec, /* in: record which should be read or passed */
- dict_index_t* index, /* in: secondary index */
+ dict_index_t* index __attribute__((unused)),/* in: secondary index */
read_view_t* view) /* in: read view */
{
page_t* page;
diff --git a/innobase/include/srv0srv.h b/innobase/include/srv0srv.h
index 1f76974b03d..178c7b6971f 100644
--- a/innobase/include/srv0srv.h
+++ b/innobase/include/srv0srv.h
@@ -94,6 +94,7 @@ extern ulint srv_n_rows_read;
extern ibool srv_print_innodb_monitor;
extern ibool srv_print_innodb_lock_monitor;
extern ibool srv_print_innodb_tablespace_monitor;
+extern ibool srv_print_verbose_log;
extern ibool srv_print_innodb_table_monitor;
extern ibool srv_lock_timeout_and_monitor_active;
diff --git a/innobase/include/sync0rw.ic b/innobase/include/sync0rw.ic
index 7015ff34b99..36ef0a985ed 100644
--- a/innobase/include/sync0rw.ic
+++ b/innobase/include/sync0rw.ic
@@ -126,7 +126,8 @@ rw_lock_s_lock_low(
/*===============*/
/* out: TRUE if success */
rw_lock_t* lock, /* in: pointer to rw-lock */
- ulint pass, /* in: pass value; != 0, if the lock will be
+ ulint pass __attribute__((unused)),
+ /* in: pass value; != 0, if the lock will be
passed to another thread to unlock */
char* file_name, /* in: file name where lock requested */
ulint line) /* in: line where requested */
diff --git a/innobase/include/univ.i b/innobase/include/univ.i
index b511ec044a2..f32161fed20 100644
--- a/innobase/include/univ.i
+++ b/innobase/include/univ.i
@@ -29,7 +29,7 @@ Created 1/20/1994 Heikki Tuuri
in compiling more Posix-compatible. These headers also define __WIN__
if we are compiling on Windows. */
-#include <global.h>
+#include <my_global.h>
#include <my_pthread.h>
/* Include <sys/stat.h> to get S_I... macros defined for os0file.c */
diff --git a/innobase/include/ut0mem.h b/innobase/include/ut0mem.h
index 2d245e5f72f..09e0d800685 100644
--- a/innobase/include/ut0mem.h
+++ b/innobase/include/ut0mem.h
@@ -69,7 +69,7 @@ ut_strcpy(char* dest, char* sour);
UNIV_INLINE
ulint
-ut_strlen(char* str);
+ut_strlen(const char* str);
UNIV_INLINE
int
diff --git a/innobase/include/ut0mem.ic b/innobase/include/ut0mem.ic
index 7ae9bc8bd74..1049aee8ecc 100644
--- a/innobase/include/ut0mem.ic
+++ b/innobase/include/ut0mem.ic
@@ -36,7 +36,7 @@ ut_strcpy(char* dest, char* sour)
UNIV_INLINE
ulint
-ut_strlen(char* str)
+ut_strlen(const char* str)
{
return(strlen(str));
}
diff --git a/innobase/lock/lock0lock.c b/innobase/lock/lock0lock.c
index da4092b926e..7030dbf9130 100644
--- a/innobase/lock/lock0lock.c
+++ b/innobase/lock/lock0lock.c
@@ -544,7 +544,8 @@ lock_sec_rec_cons_read_sees(
index record */
rec_t* rec, /* in: user record which should be read or
passed over by a read cursor */
- dict_index_t* index, /* in: non-clustered index */
+ dict_index_t* index __attribute__((unused)),
+ /* in: non-clustered index */
read_view_t* view) /* in: consistent read view */
{
dulint max_trx_id;
@@ -2311,7 +2312,7 @@ list start is moved to another page. */
void
lock_move_rec_list_start(
/*=====================*/
- page_t* new_page, /* in: index page to move to */
+ page_t* new_page __attribute__((unused)),/*in: index page to move to */
page_t* page, /* in: index page */
rec_t* rec, /* in: record on page: this is the
first record NOT copied */
@@ -2781,7 +2782,7 @@ lock_deadlock_recursive(
we return TRUE */
{
lock_t* lock;
- ulint bit_no;
+ ulint bit_no = 0; /* remove warning */
trx_t* lock_trx;
char* err_buf;
diff --git a/innobase/log/log0log.c b/innobase/log/log0log.c
index cb85e9d3ba6..c798a08e2de 100644
--- a/innobase/log/log0log.c
+++ b/innobase/log/log0log.c
@@ -2111,7 +2111,7 @@ log_group_archive(
os_file_t file_handle;
dulint start_lsn;
dulint end_lsn;
- char name[100];
+ char name[1024];
byte* buf;
ulint len;
ibool ret;
@@ -2903,9 +2903,11 @@ logs_empty_and_mark_files_at_shutdown(void)
dulint lsn;
ulint arch_log_no;
- ut_print_timestamp(stderr);
- fprintf(stderr, " InnoDB: Starting shutdown...\n");
-
+ if (srv_print_verbose_log)
+ {
+ ut_print_timestamp(stderr);
+ fprintf(stderr, " InnoDB: Starting shutdown...\n");
+ }
/* Wait until the master thread and all other operations are idle: our
algorithm only works if the server is idle at shutdown */
@@ -3010,8 +3012,11 @@ loop:
fil_flush_file_spaces(FIL_TABLESPACE);
- ut_print_timestamp(stderr);
- fprintf(stderr, " InnoDB: Shutdown completed\n");
+ if (srv_print_verbose_log)
+ {
+ ut_print_timestamp(stderr);
+ fprintf(stderr, " InnoDB: Shutdown completed\n");
+ }
}
/**********************************************************
diff --git a/innobase/mem/mem0dbg.c b/innobase/mem/mem0dbg.c
index 6bedbd40fef..23585e494b8 100644
--- a/innobase/mem/mem0dbg.c
+++ b/innobase/mem/mem0dbg.c
@@ -372,7 +372,8 @@ void
mem_heap_validate_or_print(
/*=======================*/
mem_heap_t* heap, /* in: memory heap */
- byte* top, /* in: calculate and validate only until
+ byte* top __attribute__((unused)),
+ /* in: calculate and validate only until
this top pointer in the heap is reached,
if this pointer is NULL, ignored */
ibool print, /* in: if TRUE, prints the contents
@@ -578,7 +579,8 @@ static
void
mem_print_info_low(
/*===============*/
- ibool print_all) /* in: if TRUE, all heaps are printed,
+ ibool print_all __attribute__((unused)))
+ /* in: if TRUE, all heaps are printed,
else only the heaps allocated after the
previous call of this function */
{
diff --git a/innobase/mtr/mtr0mtr.c b/innobase/mtr/mtr0mtr.c
index 565489613ae..e9a6e39d98f 100644
--- a/innobase/mtr/mtr0mtr.c
+++ b/innobase/mtr/mtr0mtr.c
@@ -469,7 +469,8 @@ mtr_read_ulint(
/* out: value read */
byte* ptr, /* in: pointer from where to read */
ulint type, /* in: MLOG_1BYTE, MLOG_2BYTES, MLOG_4BYTES */
- mtr_t* mtr) /* in: mini-transaction handle */
+ mtr_t* mtr __attribute__((unused)))
+ /* in: mini-transaction handle */
{
ut_ad(mtr->state == MTR_ACTIVE);
ut_ad(mtr_memo_contains(mtr, buf_block_align(ptr),
@@ -494,8 +495,9 @@ mtr_read_dulint(
/*===========*/
/* out: value read */
byte* ptr, /* in: pointer from where to read */
- ulint type, /* in: MLOG_8BYTES */
- mtr_t* mtr) /* in: mini-transaction handle */
+ ulint type __attribute__((unused)), /* in: MLOG_8BYTES */
+ mtr_t* mtr __attribute__((unused)))
+ /* in: mini-transaction handle */
{
ut_ad(mtr->state == MTR_ACTIVE);
ut_ad(ptr && mtr);
diff --git a/innobase/odbc/odbc0odbc.c b/innobase/odbc/odbc0odbc.c
index 640a88a2503..0deb17c6714 100644
--- a/innobase/odbc/odbc0odbc.c
+++ b/innobase/odbc/odbc0odbc.c
@@ -421,7 +421,7 @@ SQLError(
}
*pfNativeError = 0;
- ut_memcpy(szSqlState, "S1000", 6);
+ ut_memcpy(szSqlState, (char *) "S1000", 6);
len = (ulint)cbErrorMsgMax - 1;
diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c
index 10bb9bb66d7..3ca0fbd68a4 100644
--- a/innobase/os/os0file.c
+++ b/innobase/os/os0file.c
@@ -659,14 +659,13 @@ os_file_get_size(
return(FALSE);
}
- if (sizeof(off_t) > 4) {
- *size = (ulint)(offs & 0xFFFFFFFF);
- *size_high = (ulint)(offs >> 32);
- } else {
- *size = (ulint) offs;
- *size_high = 0;
- }
-
+#if SIZEOF_OFF_T > 4
+ *size = (ulint)(offs & 0xFFFFFFFF);
+ *size_high = (ulint)(offs >> 32);
+#else
+ *size = (ulint) offs;
+ *size_high = 0;
+#endif
return(TRUE);
#endif
}
@@ -829,18 +828,16 @@ os_file_pread(
/* If off_t is > 4 bytes in size, then we assume we can pass a
64-bit address */
- if (sizeof(off_t) > 4) {
- offs = (off_t)offset + (((off_t)offset_high) << 32);
-
- } else {
- offs = (off_t)offset;
+#if SIZEOF_OFF_T > 4
+ offs = (off_t)offset + (((off_t)offset_high) << 32);
+#else
+ offs = (off_t)offset;
- if (offset_high > 0) {
- fprintf(stderr,
- "InnoDB: Error: file read at offset > 4 GB\n");
- }
+ if (offset_high > 0) {
+ fprintf(stderr,
+ "InnoDB: Error: file read at offset > 4 GB\n");
}
-
+#endif
os_n_file_reads++;
#ifdef HAVE_PREAD
diff --git a/innobase/os/os0thread.c b/innobase/os/os0thread.c
index d137014a6af..13990b6743b 100644
--- a/innobase/os/os0thread.c
+++ b/innobase/os/os0thread.c
@@ -233,7 +233,8 @@ ulint
os_thread_get_priority(
/*===================*/
/* out: priority */
- os_thread_t handle) /* in: OS handle to the thread */
+ os_thread_t handle __attribute__((unused)))
+ /* in: OS handle to the thread */
{
#ifdef __WIN__
int os_pri;
diff --git a/innobase/page/page0cur.c b/innobase/page/page0cur.c
index 6ce7008dce0..2909573b14b 100644
--- a/innobase/page/page0cur.c
+++ b/innobase/page/page0cur.c
@@ -518,14 +518,14 @@ page_cur_parse_insert_rec(
mtr_t* mtr) /* in: mtr or NULL */
{
ulint extra_info_yes;
- ulint offset;
+ ulint offset = 0; /* remove warning */
ulint origin_offset;
ulint end_seg_len;
ulint mismatch_index;
rec_t* cursor_rec;
byte buf1[1024];
byte* buf;
- ulint info_bits;
+ ulint info_bits = 0; /* remove warning */
page_cur_t cursor;
if (!is_short) {
@@ -862,9 +862,9 @@ page_copy_rec_list_end_to_created_page(
rec_t* rec, /* in: first record to copy */
mtr_t* mtr) /* in: mtr */
{
- page_dir_slot_t* slot;
+ page_dir_slot_t* slot = 0; /* remove warning */
byte* heap_top;
- rec_t* insert_rec;
+ rec_t* insert_rec = 0; /* remove warning */
rec_t* prev_rec;
ulint count;
ulint n_recs;
@@ -909,6 +909,7 @@ page_copy_rec_list_end_to_created_page(
slot_index = 0;
n_recs = 0;
+ /* should be do ... until, comment by Jani */
while (rec != page_get_supremum_rec(page)) {
insert_rec = rec_copy(heap_top, rec);
diff --git a/innobase/page/page0page.c b/innobase/page/page0page.c
index f3f6776bf13..ed74736c8da 100644
--- a/innobase/page/page0page.c
+++ b/innobase/page/page0page.c
@@ -270,7 +270,7 @@ page_parse_create(
/*==============*/
/* out: end of log record or NULL */
byte* ptr, /* in: buffer */
- byte* end_ptr,/* in: buffer end */
+ byte* end_ptr __attribute__((unused)), /* in: buffer end */
page_t* page, /* in: page or NULL */
mtr_t* mtr) /* in: mtr or NULL */
{
@@ -343,7 +343,7 @@ page_create(
tuple = dtuple_create(heap, 1);
field = dtuple_get_nth_field(tuple, 0);
- dfield_set_data(field, "infimum", strlen("infimum") + 1);
+ dfield_set_data(field,(char *) "infimum", strlen("infimum") + 1);
dtype_set(dfield_get_type(field), DATA_VARCHAR, DATA_ENGLISH, 20, 0);
/* Set the corresponding physical record to its place in the page
@@ -365,7 +365,7 @@ page_create(
tuple = dtuple_create(heap, 1);
field = dtuple_get_nth_field(tuple, 0);
- dfield_set_data(field, "supremum", strlen("supremum") + 1);
+ dfield_set_data(field, (char *) "supremum", strlen("supremum") + 1);
dtype_set(dfield_get_type(field), DATA_VARCHAR, DATA_ENGLISH, 20, 0);
supremum_rec = rec_convert_dtuple_to_rec(heap_top, tuple);
diff --git a/innobase/pars/pars0opt.c b/innobase/pars/pars0opt.c
index 9814c4b21cc..91083e6fa16 100644
--- a/innobase/pars/pars0opt.c
+++ b/innobase/pars/pars0opt.c
@@ -373,7 +373,8 @@ opt_calc_index_goodness(
}
}
- if (index->type & DICT_CLUSTERED) {
+ /* We have to test for goodness here, as last_op may note be set */
+ if (goodness && index->type & DICT_CLUSTERED) {
goodness++;
}
@@ -529,7 +530,7 @@ opt_search_plan_for_table(
ulint last_op = 75946965; /* Eliminate a Purify
warning */
ulint best_goodness;
- ulint best_last_op;
+ ulint best_last_op = 0; /* remove warning */
ulint mix_id_pos;
que_node_t* index_plan[128];
que_node_t* best_index_plan[128];
@@ -547,6 +548,7 @@ opt_search_plan_for_table(
best_index = index; /* Eliminate compiler warning */
best_goodness = 0;
+ /* should be do ... until ? comment by Jani */
while (index) {
goodness = opt_calc_index_goodness(index, sel_node, i,
index_plan, &last_op);
diff --git a/innobase/pars/pars0pars.c b/innobase/pars/pars0pars.c
index 8ffbca579b8..664f498ef3e 100644
--- a/innobase/pars/pars0pars.c
+++ b/innobase/pars/pars0pars.c
@@ -1942,7 +1942,7 @@ Called by yyparse on error. */
void
yyerror(
/*====*/
- char* s) /* in: error message string */
+ char* s __attribute__((unused))) /* in: error message string */
{
ut_ad(s);
diff --git a/innobase/que/que0que.c b/innobase/que/que0que.c
index 41a90a7fb42..7fa444f6741 100644
--- a/innobase/que/que0que.c
+++ b/innobase/que/que0que.c
@@ -103,7 +103,7 @@ que_thr_add_update_info(
mach_write_to_8(thr->msg_buf + SESS_SRV_MSG_N_DELETES,
graph->n_deletes);
}
-#endif
+#endif
/***************************************************************************
Adds a query graph to the session's list of graphs. */
@@ -395,7 +395,7 @@ graph so that the graph can communicate an error message to the client.) */
void
que_fork_error_handle(
/*==================*/
- trx_t* trx, /* in: trx */
+ trx_t* trx __attribute__((unused)), /* in: trx */
que_t* fork) /* in: query graph which was run before signal
handling started, NULL not allowed */
{
@@ -1167,47 +1167,47 @@ que_node_print_info(
addr = (ulint)node;
if (type == QUE_NODE_SELECT) {
- str = "SELECT";
+ str = (char *) "SELECT";
} else if (type == QUE_NODE_INSERT) {
- str = "INSERT";
+ str = (char *) "INSERT";
} else if (type == QUE_NODE_UPDATE) {
- str = "UPDATE";
+ str = (char *) "UPDATE";
} else if (type == QUE_NODE_WHILE) {
- str = "WHILE";
+ str = (char *) "WHILE";
} else if (type == QUE_NODE_ASSIGNMENT) {
- str = "ASSIGNMENT";
+ str = (char *) "ASSIGNMENT";
} else if (type == QUE_NODE_IF) {
- str = "IF";
+ str = (char *) "IF";
} else if (type == QUE_NODE_FETCH) {
- str = "FETCH";
+ str = (char *) "FETCH";
} else if (type == QUE_NODE_OPEN) {
- str = "OPEN";
+ str = (char *) "OPEN";
} else if (type == QUE_NODE_PROC) {
- str = "STORED PROCEDURE";
+ str = (char *) "STORED PROCEDURE";
} else if (type == QUE_NODE_FUNC) {
- str = "FUNCTION";
+ str = (char *) "FUNCTION";
} else if (type == QUE_NODE_LOCK) {
- str = "LOCK";
+ str = (char *) "LOCK";
} else if (type == QUE_NODE_THR) {
- str = "QUERY THREAD";
+ str = (char *) "QUERY THREAD";
} else if (type == QUE_NODE_COMMIT) {
- str = "COMMIT";
+ str = (char *) "COMMIT";
} else if (type == QUE_NODE_UNDO) {
- str = "UNDO ROW";
+ str = (char *) "UNDO ROW";
} else if (type == QUE_NODE_PURGE) {
- str = "PURGE ROW";
+ str = (char *) "PURGE ROW";
} else if (type == QUE_NODE_ROLLBACK) {
- str = "ROLLBACK";
+ str = (char *) "ROLLBACK";
} else if (type == QUE_NODE_CREATE_TABLE) {
- str = "CREATE TABLE";
+ str = (char *) "CREATE TABLE";
} else if (type == QUE_NODE_CREATE_INDEX) {
- str = "CREATE INDEX";
+ str = (char *) "CREATE INDEX";
} else if (type == QUE_NODE_FOR) {
- str = "FOR LOOP";
+ str = (char *) "FOR LOOP";
} else if (type == QUE_NODE_RETURN) {
- str = "RETURN";
+ str = (char *) "RETURN";
} else {
- str = "UNKNOWN NODE TYPE";
+ str = (char *) "UNKNOWN NODE TYPE";
}
printf("Node type %lu: %s, address %lx\n", type, str, addr);
diff --git a/innobase/rem/rem0cmp.c b/innobase/rem/rem0cmp.c
index 31c76705c4b..c50516dfc8b 100644
--- a/innobase/rem/rem0cmp.c
+++ b/innobase/rem/rem0cmp.c
@@ -80,7 +80,7 @@ ulint
cmp_collate(
/*========*/
/* out: collation order position */
- dtype_t* type, /* in: type */
+ dtype_t* type __attribute__((unused)) , /* in: type */
ulint code) /* in: code of a character stored in database
record */
{
diff --git a/innobase/rem/rem0rec.c b/innobase/rem/rem0rec.c
index 3889f62afa2..a151389798d 100644
--- a/innobase/rem/rem0rec.c
+++ b/innobase/rem/rem0rec.c
@@ -528,9 +528,9 @@ rec_print(
ut_ad(rec);
if (rec_get_1byte_offs_flag(rec)) {
- offs = "TRUE";
+ offs = (char *) "TRUE";
} else {
- offs = "FALSE";
+ offs = (char *) "FALSE";
}
n = rec_get_n_fields(rec);
diff --git a/innobase/row/row0ins.c b/innobase/row/row0ins.c
index 1f0d0f40114..2e6dde6db65 100644
--- a/innobase/row/row0ins.c
+++ b/innobase/row/row0ins.c
@@ -633,7 +633,7 @@ row_ins_check_foreign_constraint(
dictionary cache if they exist at all */
dict_table_t* table, /* in: if check_ref is TRUE, then the foreign
table, else the referenced table */
- dict_index_t* index, /* in: index in table */
+ dict_index_t* index __attribute__((unused)),/* in: index in table */
dtuple_t* entry, /* in: index entry for index */
que_thr_t* thr) /* in: query thread */
{
@@ -1159,7 +1159,7 @@ row_ins_index_entry_low(
{
btr_cur_t cursor;
ulint ignore_sec_unique = 0;
- ulint modify;
+ ulint modify = 0; /* remove warning */
rec_t* insert_rec;
rec_t* rec;
ulint err;
diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c
index bb33f7c1485..3ee458f43bf 100644
--- a/innobase/row/row0mysql.c
+++ b/innobase/row/row0mysql.c
@@ -600,7 +600,7 @@ row_lock_table_autoinc_for_mysql(
return(DB_SUCCESS);
}
- trx->op_info = "setting auto-inc lock";
+ trx->op_info = (char *) "setting auto-inc lock";
if (node == NULL) {
row_get_prebuilt_insert_row(prebuilt);
@@ -636,14 +636,14 @@ run_again:
goto run_again;
}
- trx->op_info = "";
+ trx->op_info = (char *) "";
return(err);
}
que_thr_stop_for_mysql_no_error(thr, trx);
- trx->op_info = "";
+ trx->op_info = (char *) "";
return((int) err);
}
@@ -691,7 +691,7 @@ row_insert_for_mysql(
return(DB_ERROR);
}
- trx->op_info = "inserting";
+ trx->op_info = (char *) "inserting";
trx_start_if_not_started(trx);
@@ -732,7 +732,7 @@ run_again:
goto run_again;
}
- trx->op_info = "";
+ trx->op_info = (char *) "";
return(err);
}
@@ -749,7 +749,7 @@ run_again:
}
row_update_statistics_if_needed(prebuilt->table);
- trx->op_info = "";
+ trx->op_info = (char *) "";
return((int) err);
}
@@ -907,7 +907,7 @@ row_update_for_mysql(
return(DB_ERROR);
}
- trx->op_info = "updating or deleting";
+ trx->op_info = (char *) "updating or deleting";
trx_start_if_not_started(trx);
@@ -953,7 +953,7 @@ run_again:
if (err == DB_RECORD_NOT_FOUND) {
trx->error_state = DB_SUCCESS;
- trx->op_info = "";
+ trx->op_info = (char *) "";
return((int) err);
}
@@ -964,7 +964,7 @@ run_again:
goto run_again;
}
- trx->op_info = "";
+ trx->op_info = (char *) "";
return(err);
}
@@ -983,7 +983,7 @@ run_again:
row_update_statistics_if_needed(prebuilt->table);
- trx->op_info = "";
+ trx->op_info = (char *) "";
return((int) err);
}
@@ -1199,7 +1199,7 @@ row_create_table_for_mysql(
return(DB_ERROR);
}
- trx->op_info = "creating table";
+ trx->op_info = (char *) "creating table";
if (0 == ut_strcmp(table->name, "mysql/host")
|| 0 == ut_strcmp(table->name, "mysql/user")
@@ -1237,11 +1237,11 @@ row_create_table_for_mysql(
namelen = ut_strlen(table->name);
- keywordlen = ut_strlen("innodb_monitor");
+ keywordlen = ut_strlen((char *) "innodb_monitor");
if (namelen >= keywordlen
&& 0 == ut_memcmp(table->name + namelen - keywordlen,
- "innodb_monitor", keywordlen)) {
+ (char *) "innodb_monitor", keywordlen)) {
/* Table name ends to characters innodb_monitor:
start monitor prints */
@@ -1254,32 +1254,34 @@ row_create_table_for_mysql(
os_event_set(srv_lock_timeout_thread_event);
}
- keywordlen = ut_strlen("innodb_lock_monitor");
+ keywordlen = ut_strlen((char *) "innodb_lock_monitor");
if (namelen >= keywordlen
&& 0 == ut_memcmp(table->name + namelen - keywordlen,
- "innodb_lock_monitor", keywordlen)) {
+ (char *) "innodb_lock_monitor", keywordlen)) {
srv_print_innodb_monitor = TRUE;
srv_print_innodb_lock_monitor = TRUE;
os_event_set(srv_lock_timeout_thread_event);
}
- keywordlen = ut_strlen("innodb_tablespace_monitor");
+ keywordlen = ut_strlen((char *) "innodb_tablespace_monitor");
if (namelen >= keywordlen
&& 0 == ut_memcmp(table->name + namelen - keywordlen,
- "innodb_tablespace_monitor", keywordlen)) {
+ (char *) "innodb_tablespace_monitor",
+ keywordlen)) {
srv_print_innodb_tablespace_monitor = TRUE;
os_event_set(srv_lock_timeout_thread_event);
}
- keywordlen = ut_strlen("innodb_table_monitor");
+ keywordlen = ut_strlen((char *) "innodb_table_monitor");
if (namelen >= keywordlen
&& 0 == ut_memcmp(table->name + namelen - keywordlen,
- "innodb_table_monitor", keywordlen)) {
+ (char *) "innodb_table_monitor",
+ keywordlen)) {
srv_print_innodb_table_monitor = TRUE;
os_event_set(srv_lock_timeout_thread_event);
@@ -1356,7 +1358,7 @@ row_create_table_for_mysql(
que_graph_free((que_t*) que_node_get_parent(thr));
- trx->op_info = "";
+ trx->op_info = (char *) "";
return((int) err);
}
@@ -1383,7 +1385,7 @@ row_create_index_for_mysql(
ut_ad(mutex_own(&(dict_sys->mutex)));
ut_ad(trx->mysql_thread_id == os_thread_get_curr_id());
- trx->op_info = "creating index";
+ trx->op_info = (char *) "creating index";
trx_start_if_not_started(trx);
@@ -1428,7 +1430,7 @@ row_create_index_for_mysql(
que_graph_free((que_t*) que_node_get_parent(thr));
- trx->op_info = "";
+ trx->op_info = (char *) "";
return((int) err);
}
@@ -1462,7 +1464,7 @@ row_table_add_foreign_constraints(
ut_ad(mutex_own(&(dict_sys->mutex)));
ut_a(sql_string);
- trx->op_info = "adding foreign keys";
+ trx->op_info = (char *) "adding foreign keys";
trx_start_if_not_started(trx);
@@ -1714,16 +1716,16 @@ row_drop_table_for_mysql(
return(DB_ERROR);
}
- trx->op_info = "dropping table";
+ trx->op_info = (char *) "dropping table";
trx_start_if_not_started(trx);
namelen = ut_strlen(name);
- keywordlen = ut_strlen("innodb_monitor");
+ keywordlen = ut_strlen((char *) "innodb_monitor");
if (namelen >= keywordlen
&& 0 == ut_memcmp(name + namelen - keywordlen,
- "innodb_monitor", keywordlen)) {
+ (char *) "innodb_monitor", keywordlen)) {
/* Table name ends to characters innodb_monitor:
stop monitor prints */
@@ -1732,30 +1734,33 @@ row_drop_table_for_mysql(
srv_print_innodb_lock_monitor = FALSE;
}
- keywordlen = ut_strlen("innodb_lock_monitor");
+ keywordlen = ut_strlen((char *) "innodb_lock_monitor");
if (namelen >= keywordlen
&& 0 == ut_memcmp(name + namelen - keywordlen,
- "innodb_lock_monitor", keywordlen)) {
+ (char *) "innodb_lock_monitor",
+ keywordlen)) {
srv_print_innodb_monitor = FALSE;
srv_print_innodb_lock_monitor = FALSE;
}
- keywordlen = ut_strlen("innodb_tablespace_monitor");
+ keywordlen = ut_strlen((char *) "innodb_tablespace_monitor");
if (namelen >= keywordlen
&& 0 == ut_memcmp(name + namelen - keywordlen,
- "innodb_tablespace_monitor", keywordlen)) {
+ (char *) "innodb_tablespace_monitor",
+ keywordlen)) {
srv_print_innodb_tablespace_monitor = FALSE;
}
- keywordlen = ut_strlen("innodb_table_monitor");
+ keywordlen = ut_strlen((char *) "innodb_table_monitor");
if (namelen >= keywordlen
&& 0 == ut_memcmp(name + namelen - keywordlen,
- "innodb_table_monitor", keywordlen)) {
+ (char *) "innodb_table_monitor",
+ keywordlen)) {
srv_print_innodb_table_monitor = FALSE;
}
@@ -1765,7 +1770,7 @@ row_drop_table_for_mysql(
tables in Innobase. Deleting a row from SYS_INDEXES table also
frees the file segments of the B-tree associated with the index. */
- str1 =
+ str1 = (char *)
"PROCEDURE DROP_TABLE_PROC () IS\n"
"table_name CHAR;\n"
"sys_foreign_id CHAR;\n"
@@ -1776,7 +1781,7 @@ row_drop_table_for_mysql(
"BEGIN\n"
"table_name := '";
- str2 =
+ str2 = (char *)
"';\n"
"SELECT ID INTO table_id\n"
"FROM SYS_TABLES\n"
@@ -1947,7 +1952,7 @@ funct_exit:
trx_commit_for_mysql(trx);
- trx->op_info = "";
+ trx->op_info = (char *) "";
srv_wake_master_thread();
@@ -1972,14 +1977,14 @@ row_drop_database_for_mysql(
ut_a(name != NULL);
ut_a(name[strlen(name) - 1] == '/');
- trx->op_info = "dropping database";
+ trx->op_info = (char *) "dropping database";
trx_start_if_not_started(trx);
loop:
rw_lock_x_lock(&(dict_foreign_key_check_lock));
mutex_enter(&(dict_sys->mutex));
- while (table_name = dict_get_first_table_name_in_db(name)) {
+ while ((table_name = dict_get_first_table_name_in_db(name))) {
ut_a(memcmp(table_name, name, strlen(name)) == 0);
table = dict_table_get_low(table_name);
@@ -2023,7 +2028,7 @@ loop:
trx_commit_for_mysql(trx);
- trx->op_info = "";
+ trx->op_info = (char *) "";
return(err);
}
@@ -2100,17 +2105,17 @@ row_rename_table_for_mysql(
return(DB_ERROR);
}
- trx->op_info = "renaming table";
+ trx->op_info = (char *) "renaming table";
trx_start_if_not_started(trx);
- str1 =
+ str1 = (char *)
"PROCEDURE RENAME_TABLE_PROC () IS\n"
"new_table_name CHAR;\n"
"old_table_name CHAR;\n"
"BEGIN\n"
"new_table_name :='";
- str2 =
+ str2 = (char *)
"';\nold_table_name := '";
if (row_is_mysql_tmp_table_name(new_name)) {
@@ -2118,13 +2123,13 @@ row_rename_table_for_mysql(
/* We want to preserve the original foreign key
constraint definitions despite the name change */
- str3 =
+ str3 = (char*)
"';\n"
"UPDATE SYS_TABLES SET NAME = new_table_name\n"
"WHERE NAME = old_table_name;\n"
"END;\n";
} else {
- str3 =
+ str3 = (char*)
"';\n"
"UPDATE SYS_TABLES SET NAME = new_table_name\n"
"WHERE NAME = old_table_name;\n"
@@ -2244,7 +2249,7 @@ funct_exit:
trx_commit_for_mysql(trx);
- trx->op_info = "";
+ trx->op_info = (char *) "";
return((int) err);
}
@@ -2389,7 +2394,7 @@ row_check_table_for_mysql(
ulint n_rows_in_table = ULINT_UNDEFINED;
ulint ret = DB_SUCCESS;
- prebuilt->trx->op_info = "checking table";
+ prebuilt->trx->op_info = (char *) "checking table";
index = dict_table_get_first_index(table);
@@ -2430,7 +2435,7 @@ row_check_table_for_mysql(
ret = DB_ERROR;
}
- prebuilt->trx->op_info = "";
+ prebuilt->trx->op_info = (char *) "";
return(ret);
}
diff --git a/innobase/row/row0purge.c b/innobase/row/row0purge.c
index 5da98943926..60e057b816e 100644
--- a/innobase/row/row0purge.c
+++ b/innobase/row/row0purge.c
@@ -204,7 +204,7 @@ row_purge_remove_sec_if_poss_low(
btr_pcur_t pcur;
btr_cur_t* btr_cur;
ibool success;
- ibool old_has;
+ ibool old_has = 0; /* remove warning */
ibool found;
ulint err;
mtr_t mtr;
diff --git a/innobase/row/row0sel.c b/innobase/row/row0sel.c
index d6b2413c911..f3dced15fdf 100644
--- a/innobase/row/row0sel.c
+++ b/innobase/row/row0sel.c
@@ -64,7 +64,8 @@ row_sel_sec_rec_is_for_clust_rec(
rec_t* sec_rec, /* in: secondary index record */
dict_index_t* sec_index, /* in: secondary index */
rec_t* clust_rec, /* in: clustered index record */
- dict_index_t* clust_index) /* in: clustered index */
+ dict_index_t* clust_index __attribute__((unused)))
+ /* in: clustered index */
{
dict_col_t* col;
byte* sec_field;
@@ -2542,7 +2543,7 @@ row_search_for_mysql(
printf("N tables locked %lu\n", trx->mysql_n_tables_locked);
*/
if (direction == 0) {
- trx->op_info = "starting index read";
+ trx->op_info = (char *) "starting index read";
prebuilt->n_rows_fetched = 0;
prebuilt->n_fetch_cached = 0;
@@ -2553,7 +2554,7 @@ row_search_for_mysql(
row_prebuild_sel_graph(prebuilt);
}
} else {
- trx->op_info = "fetching rows";
+ trx->op_info = (char *) "fetching rows";
if (prebuilt->n_rows_fetched == 0) {
prebuilt->fetch_direction = direction;
@@ -2578,7 +2579,7 @@ row_search_for_mysql(
prebuilt->n_rows_fetched++;
srv_n_rows_read++;
- trx->op_info = "";
+ trx->op_info = (char *) "";
return(DB_SUCCESS);
}
@@ -2590,7 +2591,7 @@ row_search_for_mysql(
cache, but the cache was not full at the time of the
popping: no more rows can exist in the result set */
- trx->op_info = "";
+ trx->op_info = (char *) "";
return(DB_RECORD_NOT_FOUND);
}
@@ -2630,7 +2631,7 @@ row_search_for_mysql(
/* printf("%s record not found 1\n", index->name); */
- trx->op_info = "";
+ trx->op_info = (char *) "";
return(DB_RECORD_NOT_FOUND);
}
@@ -2693,7 +2694,7 @@ row_search_for_mysql(
trx->has_search_latch = FALSE;
}
- trx->op_info = "";
+ trx->op_info = (char *) "";
return(DB_SUCCESS);
} else if (shortcut == SEL_EXHAUSTED) {
@@ -2712,7 +2713,7 @@ row_search_for_mysql(
trx->has_search_latch = FALSE;
}
- trx->op_info = "";
+ trx->op_info = (char *) "";
return(DB_RECORD_NOT_FOUND);
}
@@ -3089,7 +3090,7 @@ lock_wait_or_error:
/* printf("Using index %s cnt %lu ret value %lu err\n", index->name,
cnt, err); */
- trx->op_info = "";
+ trx->op_info = (char *) "";
return(err);
@@ -3110,7 +3111,7 @@ normal_return:
srv_n_rows_read++;
}
- trx->op_info = "";
+ trx->op_info = (char *) "";
return(ret);
}
diff --git a/innobase/row/row0uins.c b/innobase/row/row0uins.c
index 27d1fbcb9ba..9990f893432 100644
--- a/innobase/row/row0uins.c
+++ b/innobase/row/row0uins.c
@@ -234,7 +234,7 @@ void
row_undo_ins_parse_undo_rec(
/*========================*/
undo_node_t* node, /* in: row undo node */
- que_thr_t* thr) /* in: query thread */
+ que_thr_t* thr __attribute__((unused))) /* in: query thread */
{
dict_index_t* clust_index;
byte* ptr;
diff --git a/innobase/row/row0umod.c b/innobase/row/row0umod.c
index bbffda39352..b84e55ca643 100644
--- a/innobase/row/row0umod.c
+++ b/innobase/row/row0umod.c
@@ -139,7 +139,7 @@ row_undo_mod_remove_clust_low(
/* out: DB_SUCCESS, DB_FAIL, or error code:
we may run out of file space */
undo_node_t* node, /* in: row undo node */
- que_thr_t* thr, /* in: query thread */
+ que_thr_t* thr __attribute__((unused)), /* in: query thread */
mtr_t* mtr, /* in: mtr */
ulint mode) /* in: BTR_MODIFY_LEAF or BTR_MODIFY_TREE */
{
diff --git a/innobase/row/row0upd.c b/innobase/row/row0upd.c
index 6eaab79060e..25c82f39da9 100644
--- a/innobase/row/row0upd.c
+++ b/innobase/row/row0upd.c
@@ -428,7 +428,7 @@ row_upd_write_sys_vals_to_log(
dulint roll_ptr,/* in: roll ptr of the undo log record */
byte* log_ptr,/* pointer to a buffer of size > 20 opened
in mlog */
- mtr_t* mtr) /* in: mtr */
+ mtr_t* mtr __attribute__((unused))) /* in: mtr */
{
ut_ad(index->type & DICT_CLUSTERED);
ut_ad(mtr);
diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c
index 0472146013e..d0ac011e60f 100644
--- a/innobase/srv/srv0srv.c
+++ b/innobase/srv/srv0srv.c
@@ -61,7 +61,7 @@ ulint srv_activity_count = 0;
ibool srv_lock_timeout_and_monitor_active = FALSE;
ibool srv_error_monitor_active = FALSE;
-char* srv_main_thread_op_info = "";
+char* srv_main_thread_op_info = (char*) "";
/* Server parameters which are read from the initfile */
@@ -238,6 +238,11 @@ ulint srv_n_rows_updated_old = 0;
ulint srv_n_rows_deleted_old = 0;
ulint srv_n_rows_read_old = 0;
+/*
+ Set the following to 0 if you want InnoDB to write messages on
+ stderr on startup/shutdown
+*/
+ibool srv_print_verbose_log = TRUE;
ibool srv_print_innodb_monitor = FALSE;
ibool srv_print_innodb_lock_monitor = FALSE;
ibool srv_print_innodb_tablespace_monitor = FALSE;
@@ -1629,6 +1634,7 @@ srv_init(void)
for (i = 0; i < OS_THREAD_MAX_N; i++) {
slot = srv_table_get_nth_slot(i);
slot->in_use = FALSE;
+ slot->type=0; /* Avoid purify errors */
slot->event = os_event_create(NULL);
ut_a(slot->event);
}
@@ -2640,7 +2646,7 @@ srv_master_thread(
os_event_set(srv_sys->operational);
loop:
- srv_main_thread_op_info = "reserving kernel mutex";
+ srv_main_thread_op_info = (char*) "reserving kernel mutex";
n_ios_very_old = log_sys->n_log_ios + buf_pool->n_pages_read
+ buf_pool->n_pages_written;
@@ -2736,10 +2742,10 @@ loop:
+ buf_pool->n_pages_written;
if (n_pend_ios < 3 && (n_ios - n_ios_very_old < 200)) {
- srv_main_thread_op_info = "flushing buffer pool pages";
+ srv_main_thread_op_info = (char*) "flushing buffer pool pages";
buf_flush_batch(BUF_FLUSH_LIST, 50, ut_dulint_max);
- srv_main_thread_op_info = "flushing log";
+ srv_main_thread_op_info = (char*) "flushing log";
log_flush_up_to(ut_dulint_max, LOG_WAIT_ONE_GROUP);
log_flush_to_disk();
}
@@ -2774,7 +2780,7 @@ loop:
current_time = time(NULL);
if (difftime(current_time, last_flush_time) > 1) {
- srv_main_thread_op_info = "flushing log";
+ srv_main_thread_op_info = (char*) "flushing log";
log_flush_up_to(ut_dulint_max, LOG_WAIT_ONE_GROUP);
log_flush_to_disk();
@@ -2854,7 +2860,7 @@ background_loop:
}
mutex_exit(&kernel_mutex);
- srv_main_thread_op_info = "waiting for buffer pool flush to end";
+ srv_main_thread_op_info = (char*) "waiting for buffer pool flush to end";
buf_flush_wait_batch_end(BUF_FLUSH_LIST);
srv_main_thread_op_info = (char*)"making checkpoint";
diff --git a/innobase/srv/srv0start.c b/innobase/srv/srv0start.c
index ea0ed7c961e..dfa122b2ece 100644
--- a/innobase/srv/srv0start.c
+++ b/innobase/srv/srv0start.c
@@ -439,7 +439,7 @@ Normalizes a directory path for Windows: converts slashes to backslashes. */
void
srv_normalize_path_for_win(
/*=======================*/
- char* str) /* in/out: null-terminated character string */
+ char* str __attribute__((unused))) /* in/out: null-terminated character string */
{
#ifdef __WIN__
ulint i;
@@ -624,7 +624,7 @@ open_or_create_log_file(
if (k == 0 && i == 0) {
arch_space_id = 2 * k + 1 + SRV_LOG_SPACE_FIRST_ID;
- fil_space_create("arch_log_space", arch_space_id, FIL_LOG);
+ fil_space_create((char*) "arch_log_space", arch_space_id, FIL_LOG);
} else {
arch_space_id = ULINT_UNDEFINED;
}
@@ -1375,9 +1375,11 @@ innobase_start_or_create_for_mysql(void)
os_fast_mutex_unlock(&srv_os_test_mutex);
- ut_print_timestamp(stderr);
- fprintf(stderr, " InnoDB: Started\n");
-
+ if (srv_print_verbose_log)
+ {
+ ut_print_timestamp(stderr);
+ fprintf(stderr, " InnoDB: Started\n");
+ }
return((int) DB_SUCCESS);
}
diff --git a/innobase/sync/sync0arr.c b/innobase/sync/sync0arr.c
index ad3ac84b6eb..4d14c32b1ae 100644
--- a/innobase/sync/sync0arr.c
+++ b/innobase/sync/sync0arr.c
@@ -447,7 +447,7 @@ sync_array_cell_print(
{
mutex_t* mutex;
rw_lock_t* rwlock;
- char* str = NULL;
+ char* str __attribute__((unused)) = NULL;
ulint type;
type = cell->request_type;
diff --git a/innobase/sync/sync0rw.c b/innobase/sync/sync0rw.c
index 93db9b9d507..fe837b119f3 100644
--- a/innobase/sync/sync0rw.c
+++ b/innobase/sync/sync0rw.c
@@ -115,8 +115,8 @@ rw_lock_create_func(
lock->cfile_name = cfile_name;
lock->cline = cline;
- lock->last_s_file_name = "not yet reserved";
- lock->last_x_file_name = "not yet reserved";
+ lock->last_s_file_name = (char *) "not yet reserved";
+ lock->last_x_file_name = (char *) "not yet reserved";
lock->last_s_line = 0;
lock->last_x_line = 0;
@@ -792,7 +792,7 @@ Prints debug info of an rw-lock. */
void
rw_lock_print(
/*==========*/
- rw_lock_t* lock) /* in: rw-lock */
+ rw_lock_t* lock __attribute__((unused))) /* in: rw-lock */
{
#ifndef UNIV_SYNC_DEBUG
printf(
diff --git a/innobase/sync/sync0sync.c b/innobase/sync/sync0sync.c
index 61bd8e587e6..3ea996afd6b 100644
--- a/innobase/sync/sync0sync.c
+++ b/innobase/sync/sync0sync.c
@@ -229,7 +229,7 @@ mutex_create_func(
mutex_set_waiters(mutex, 0);
mutex->magic_n = MUTEX_MAGIC_N;
mutex->line = 0;
- mutex->file_name = "not yet reserved";
+ mutex->file_name = (char *) "not yet reserved";
mutex->level = SYNC_LEVEL_NONE;
mutex->cfile_name = cfile_name;
mutex->cline = cline;
diff --git a/innobase/trx/trx0purge.c b/innobase/trx/trx0purge.c
index b73629c9fa4..97362d00b4b 100644
--- a/innobase/trx/trx0purge.c
+++ b/innobase/trx/trx0purge.c
@@ -674,9 +674,9 @@ trx_purge_choose_next_log(void)
trx_rseg_t* rseg;
trx_rseg_t* min_rseg;
dulint min_trx_no;
- ulint space;
- ulint page_no;
- ulint offset;
+ ulint space = 0; /* remove warning (??? bug ???) */
+ ulint page_no = 0; /* remove warning (??? bug ???) */
+ ulint offset = 0; /* remove warning (??? bug ???) */
mtr_t mtr;
ut_ad(mutex_own(&(purge_sys->mutex)));
diff --git a/innobase/trx/trx0rec.c b/innobase/trx/trx0rec.c
index abce470bd1c..05e179e06a5 100644
--- a/innobase/trx/trx0rec.c
+++ b/innobase/trx/trx0rec.c
@@ -989,7 +989,7 @@ trx_undo_parse_erase_page_end(
/*==========================*/
/* out: end of log record or NULL */
byte* ptr, /* in: buffer */
- byte* end_ptr,/* in: buffer end */
+ byte* end_ptr __attribute__((unused)), /* in: buffer end */
page_t* page, /* in: page or NULL */
mtr_t* mtr) /* in: mtr or NULL */
{
@@ -1263,7 +1263,8 @@ trx_undo_prev_version_build(
DB_ERROR if corrupted record */
rec_t* index_rec,/* in: clustered index record in the
index tree */
- mtr_t* index_mtr,/* in: mtr which contains the latch to
+ mtr_t* index_mtr __attribute__((unused)),
+ /* in: mtr which contains the latch to
index_rec page and purge_view */
rec_t* rec, /* in: version of a clustered index record */
dict_index_t* index, /* in: clustered index */
diff --git a/innobase/trx/trx0roll.c b/innobase/trx/trx0roll.c
index 0a951484b59..4c2ee5dc9be 100644
--- a/innobase/trx/trx0roll.c
+++ b/innobase/trx/trx0roll.c
@@ -101,7 +101,7 @@ trx_rollback_for_mysql(
return(DB_SUCCESS);
}
- trx->op_info = "rollback";
+ trx->op_info = (char *) "rollback";
/* Tell Innobase server that there might be work for
utility threads: */
@@ -117,7 +117,7 @@ trx_rollback_for_mysql(
srv_active_wake_master_thread();
- trx->op_info = "";
+ trx->op_info = (char *) "";
return(err);
}
@@ -138,7 +138,7 @@ trx_rollback_last_sql_stat_for_mysql(
return(DB_SUCCESS);
}
- trx->op_info = "rollback of SQL statement";
+ trx->op_info = (char *) "rollback of SQL statement";
/* Tell Innobase server that there might be work for
utility threads: */
@@ -154,7 +154,7 @@ trx_rollback_last_sql_stat_for_mysql(
srv_active_wake_master_thread();
- trx->op_info = "";
+ trx->op_info = (char *) "";
return(err);
}
@@ -182,7 +182,7 @@ trx_rollback_or_clean_all_without_sess(void)
if (!trx_dummy_sess) {
trx_dummy_sess = sess_open(NULL, (byte*)"Dummy sess",
- ut_strlen("Dummy sess"));
+ ut_strlen((char *) "Dummy sess"));
}
mutex_exit(&kernel_mutex);
diff --git a/innobase/trx/trx0trx.c b/innobase/trx/trx0trx.c
index b8cf7ad4a6d..994a6777924 100644
--- a/innobase/trx/trx0trx.c
+++ b/innobase/trx/trx0trx.c
@@ -79,7 +79,7 @@ trx_create(
trx->magic_n = TRX_MAGIC_N;
- trx->op_info = "";
+ trx->op_info = (char *) "";
trx->type = TRX_USER;
trx->conc_state = TRX_NOT_STARTED;
@@ -163,7 +163,7 @@ trx_allocate_for_mysql(void)
if (!trx_dummy_sess) {
trx_dummy_sess = sess_open(NULL, (byte*)"Dummy sess",
- ut_strlen("Dummy sess"));
+ ut_strlen((char *) "Dummy sess"));
}
trx = trx_create(trx_dummy_sess);
@@ -1135,7 +1135,7 @@ trx_sig_send(
ut_a(0);
sess_raise_error_low(trx, 0, 0, NULL, NULL, NULL, NULL,
- "Signal from another session, or a break execution signal");
+ (char *) "Signal from another session, or a break execution signal");
}
/* If there were no other signals ahead in the queue, try to start
@@ -1436,7 +1436,7 @@ trx_commit_for_mysql(
ut_a(trx);
- trx->op_info = "committing";
+ trx->op_info = (char *) "committing";
trx_start_if_not_started(trx);
@@ -1446,7 +1446,7 @@ trx_commit_for_mysql(
mutex_exit(&kernel_mutex);
- trx->op_info = "";
+ trx->op_info = (char *) "";
return(0);
}
diff --git a/innobase/trx/trx0undo.c b/innobase/trx/trx0undo.c
index dd249a7062a..6303c5bbcdd 100644
--- a/innobase/trx/trx0undo.c
+++ b/innobase/trx/trx0undo.c
@@ -374,7 +374,7 @@ trx_undo_seg_create(
/*================*/
/* out: segment header page x-latched, NULL
if no space left */
- trx_rseg_t* rseg, /* in: rollback segment */
+ trx_rseg_t* rseg __attribute__((unused)),/* in: rollback segment */
trx_rsegf_t* rseg_hdr,/* in: rollback segment header, page
x-latched */
ulint type, /* in: type of the segment: TRX_UNDO_INSERT or
@@ -657,7 +657,7 @@ trx_undo_parse_discard_latest(
/*==========================*/
/* out: end of log record or NULL */
byte* ptr, /* in: buffer */
- byte* end_ptr,/* in: buffer end */
+ byte* end_ptr __attribute__((unused)), /* in: buffer end */
page_t* page, /* in: page or NULL */
mtr_t* mtr) /* in: mtr or NULL */
{
@@ -844,7 +844,7 @@ static
void
trx_undo_free_page_in_rollback(
/*===========================*/
- trx_t* trx, /* in: transaction */
+ trx_t* trx __attribute__((unused)), /* in: transaction */
trx_undo_t* undo, /* in: undo log memory copy */
ulint page_no,/* in: page number to free: must not be the
header page */
@@ -1567,7 +1567,7 @@ trx_undo_set_state_at_finish(
/*=========================*/
/* out: undo log segment header page,
x-latched */
- trx_t* trx, /* in: transaction */
+ trx_t* trx __attribute__((unused)), /* in: transaction */
trx_undo_t* undo, /* in: undo log memory copy */
mtr_t* mtr) /* in: mtr */
{
diff --git a/innobase/ut/ut0ut.c b/innobase/ut/ut0ut.c
index 2274e723be9..c77cbe9cdcf 100644
--- a/innobase/ut/ut0ut.c
+++ b/innobase/ut/ut0ut.c
@@ -52,11 +52,11 @@ ut_get_high32(
/* out: a >> 32 */
ulint a) /* in: ulint */
{
- if (sizeof(ulint) == 4) {
- return(0);
- }
-
+#if SIZEOF_LONG == 4
+ return 0;
+#else
return(a >> 32);
+#endif
}
/************************************************************