summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--storage/innobase/btr/btr0btr.c1
-rw-r--r--storage/innobase/btr/btr0cur.c8
-rw-r--r--storage/innobase/buf/buf0buddy.c1
-rw-r--r--storage/innobase/dict/dict0crea.c10
-rw-r--r--storage/innobase/dict/dict0dict.c1
-rw-r--r--storage/innobase/dict/dict0load.c8
-rw-r--r--storage/innobase/dict/dict0mem.c2
-rw-r--r--storage/innobase/dyn/dyn0dyn.c1
-rw-r--r--storage/innobase/fil/fil0fil.c2
-rw-r--r--storage/innobase/fsp/fsp0fsp.c5
-rw-r--r--storage/innobase/include/dict0dict.ic7
-rw-r--r--storage/innobase/include/dict0mem.h12
-rw-r--r--storage/innobase/include/dyn0dyn.ic10
-rw-r--r--storage/innobase/include/fsp0fsp.h2
-rw-r--r--storage/innobase/include/mach0data.ic13
-rw-r--r--storage/innobase/include/mtr0mtr.ic1
-rw-r--r--storage/innobase/include/page0page.ic1
-rw-r--r--storage/innobase/include/rem0rec.ic1
-rw-r--r--storage/innobase/include/ut0lst.h3
-rw-r--r--storage/innobase/mtr/mtr0mtr.c1
-rw-r--r--storage/innobase/page/page0page.c2
-rw-r--r--storage/innobase/page/page0zip.c1
-rw-r--r--storage/innobase/rem/rem0rec.c3
-rw-r--r--storage/innobase/row/row0merge.c12
-rw-r--r--storage/innobase/row/row0purge.c3
-rw-r--r--storage/innobase/row/row0upd.c4
-rw-r--r--storage/innobase/trx/trx0trx.c1
-rw-r--r--storage/xtradb/btr/btr0btr.c1
-rw-r--r--storage/xtradb/btr/btr0cur.c10
-rw-r--r--storage/xtradb/buf/buf0buddy.c1
-rw-r--r--storage/xtradb/dict/dict0crea.c10
-rw-r--r--storage/xtradb/dict/dict0dict.c1
-rw-r--r--storage/xtradb/dict/dict0load.c10
-rw-r--r--storage/xtradb/dict/dict0mem.c2
-rw-r--r--storage/xtradb/dyn/dyn0dyn.c1
-rw-r--r--storage/xtradb/fil/fil0fil.c2
-rw-r--r--storage/xtradb/fsp/fsp0fsp.c5
-rw-r--r--storage/xtradb/include/btr0sea.ic4
-rw-r--r--storage/xtradb/include/dict0dict.ic7
-rw-r--r--storage/xtradb/include/dict0mem.h12
-rw-r--r--storage/xtradb/include/dyn0dyn.ic10
-rw-r--r--storage/xtradb/include/fsp0fsp.h2
-rw-r--r--storage/xtradb/include/mach0data.ic13
-rw-r--r--storage/xtradb/include/mtr0mtr.ic1
-rw-r--r--storage/xtradb/include/page0page.ic1
-rw-r--r--storage/xtradb/include/rem0rec.ic1
-rw-r--r--storage/xtradb/include/trx0trx.h1
-rw-r--r--storage/xtradb/include/ut0lst.h3
-rw-r--r--storage/xtradb/mtr/mtr0mtr.c1
-rw-r--r--storage/xtradb/page/page0page.c2
-rw-r--r--storage/xtradb/page/page0zip.c1
-rw-r--r--storage/xtradb/rem/rem0rec.c3
-rw-r--r--storage/xtradb/row/row0merge.c12
-rw-r--r--storage/xtradb/row/row0purge.c3
-rw-r--r--storage/xtradb/row/row0upd.c4
-rw-r--r--storage/xtradb/trx/trx0trx.c1
56 files changed, 43 insertions, 198 deletions
diff --git a/storage/innobase/btr/btr0btr.c b/storage/innobase/btr/btr0btr.c
index ede72ba57bb..58d816559d4 100644
--- a/storage/innobase/btr/btr0btr.c
+++ b/storage/innobase/btr/btr0btr.c
@@ -2932,7 +2932,6 @@ btr_level_list_remove_func(
ulint prev_page_no;
ulint next_page_no;
- ut_ad(page && mtr);
ut_ad(mtr_memo_contains_page(mtr, page, MTR_MEMO_PAGE_X_FIX));
ut_ad(space == page_get_space_id(page));
/* Get the previous and next page numbers of page */
diff --git a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
index 3b533909e67..2c1ab4bffae 100644
--- a/storage/innobase/btr/btr0cur.c
+++ b/storage/innobase/btr/btr0cur.c
@@ -1877,7 +1877,6 @@ btr_cur_update_alloc_zip(
mtr_t* mtr) /*!< in: mini-transaction */
{
ut_a(page_zip == buf_block_get_page_zip(block));
- ut_ad(page_zip);
ut_ad(!dict_index_is_ibuf(index));
if (page_zip_available(page_zip, dict_index_is_clust(index),
@@ -2837,7 +2836,7 @@ btr_cur_del_mark_set_clust_rec(
ut_ad(page_is_leaf(page_align(rec)));
#ifdef UNIV_DEBUG
- if (btr_cur_print_record_ops && thr) {
+ if (btr_cur_print_record_ops) {
btr_cur_trx_report(thr_get_trx(thr), index, "del mark ");
rec_print_new(stderr, rec, offsets);
}
@@ -4128,7 +4127,6 @@ btr_cur_disown_inherited_fields(
ut_ad(rec_offs_validate(rec, index, offsets));
ut_ad(!rec_offs_comp(offsets) || !rec_get_node_ptr_flag(rec));
ut_ad(rec_offs_any_extern(offsets));
- ut_ad(mtr);
for (i = 0; i < rec_offs_n_fields(offsets); i++) {
if (rec_offs_nth_extern(offsets, i)
@@ -4191,9 +4189,6 @@ btr_push_update_extern_fields(
ulint n;
const upd_field_t* uf;
- ut_ad(tuple);
- ut_ad(update);
-
uf = update->fields;
n = upd_get_n_fields(update);
@@ -4366,7 +4361,6 @@ btr_store_big_rec_extern_fields(
ut_ad(rec_offs_validate(rec, index, offsets));
ut_ad(rec_offs_any_extern(offsets));
- ut_ad(btr_mtr);
ut_ad(mtr_memo_contains(btr_mtr, dict_index_get_lock(index),
MTR_MEMO_X_LOCK));
ut_ad(mtr_memo_contains(btr_mtr, rec_block, MTR_MEMO_PAGE_X_FIX));
diff --git a/storage/innobase/buf/buf0buddy.c b/storage/innobase/buf/buf0buddy.c
index 9277a89ce66..fa2515eddc2 100644
--- a/storage/innobase/buf/buf0buddy.c
+++ b/storage/innobase/buf/buf0buddy.c
@@ -276,7 +276,6 @@ buf_buddy_alloc_low(
{
buf_block_t* block;
- ut_ad(lru);
ut_ad(buf_pool_mutex_own(buf_pool));
ut_ad(!mutex_own(&buf_pool->zip_mutex));
ut_ad(i >= buf_buddy_get_slot(PAGE_ZIP_MIN_SIZE));
diff --git a/storage/innobase/dict/dict0crea.c b/storage/innobase/dict/dict0crea.c
index f8bcc6f2d5f..4e173fb905d 100644
--- a/storage/innobase/dict/dict0crea.c
+++ b/storage/innobase/dict/dict0crea.c
@@ -112,13 +112,13 @@ dict_create_sys_tables_tuple(
dfield = dtuple_get_nth_field(entry, 3/*TYPE*/);
ptr = mem_heap_alloc(heap, 4);
- if (table->flags & (~DICT_TF_COMPACT & ~(~0 << DICT_TF_BITS))) {
+ if (table->flags & (~DICT_TF_COMPACT & ~(~0U << DICT_TF_BITS))) {
ut_a(table->flags & DICT_TF_COMPACT);
ut_a(dict_table_get_format(table) >= DICT_TF_FORMAT_ZIP);
ut_a((table->flags & DICT_TF_ZSSIZE_MASK)
<= (DICT_TF_ZSSIZE_MAX << DICT_TF_ZSSIZE_SHIFT));
- ut_a(!(table->flags & (~0 << DICT_TF2_BITS)));
- mach_write_to_4(ptr, table->flags & ~(~0 << DICT_TF_BITS));
+ ut_a(!(table->flags & (~0U << DICT_TF2_BITS)));
+ mach_write_to_4(ptr, table->flags & ~(~0U << DICT_TF_BITS));
} else {
mach_write_to_4(ptr, DICT_TABLE_ORDINARY);
}
@@ -306,7 +306,7 @@ dict_build_table_def_step(
ut_ad(!dict_table_zip_size(table)
|| dict_table_get_format(table) >= DICT_TF_FORMAT_ZIP);
- flags = table->flags & ~(~0 << DICT_TF_BITS);
+ flags = table->flags & ~(~0U << DICT_TF_BITS);
error = fil_create_new_single_table_tablespace(
space, path_or_name, is_path,
flags == DICT_TF_COMPACT ? 0 : flags,
@@ -325,7 +325,7 @@ dict_build_table_def_step(
mtr_commit(&mtr);
} else {
/* Create in the system tablespace: disallow new features */
- table->flags &= (~0 << DICT_TF_BITS) | DICT_TF_COMPACT;
+ table->flags &= (~0U << DICT_TF_BITS) | DICT_TF_COMPACT;
}
row = dict_create_sys_tables_tuple(table, node->heap);
diff --git a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c
index 33b110ce97a..588c2968b6a 100644
--- a/storage/innobase/dict/dict0dict.c
+++ b/storage/innobase/dict/dict0dict.c
@@ -5848,7 +5848,6 @@ dict_set_corrupted(
const char* status;
btr_cur_t cursor;
- ut_ad(index);
ut_ad(mutex_own(&dict_sys->mutex));
ut_ad(!dict_table_is_comp(dict_sys->sys_tables));
ut_ad(!dict_table_is_comp(dict_sys->sys_indexes));
diff --git a/storage/innobase/dict/dict0load.c b/storage/innobase/dict/dict0load.c
index 22de23af7ee..d7168b6e4bb 100644
--- a/storage/innobase/dict/dict0load.c
+++ b/storage/innobase/dict/dict0load.c
@@ -643,7 +643,7 @@ dict_sys_tables_get_flags(
return(ULINT_UNDEFINED);
}
- if (UNIV_UNLIKELY(flags & (~0 << DICT_TF_BITS))) {
+ if (UNIV_UNLIKELY(flags & (~0U << DICT_TF_BITS))) {
/* Some unused bits are set. */
return(ULINT_UNDEFINED);
}
@@ -1332,7 +1332,7 @@ err_len:
goto err_len;
}
type = mach_read_from_4(field);
- if (UNIV_UNLIKELY(type & (~0 << DICT_IT_BITS))) {
+ if (UNIV_UNLIKELY(type & (~0U << DICT_IT_BITS))) {
return("unknown SYS_INDEXES.TYPE bits");
}
@@ -1696,7 +1696,7 @@ err_len:
flags2 = mach_read_from_4(field);
- if (flags2 & (~0 << (DICT_TF2_BITS - DICT_TF2_SHIFT))) {
+ if (flags2 & (~0U << (DICT_TF2_BITS - DICT_TF2_SHIFT))) {
ut_print_timestamp(stderr);
fputs(" InnoDB: Warning: table ", stderr);
ut_print_filename(stderr, name);
@@ -1705,7 +1705,7 @@ err_len:
" has unknown flags %lx.\n",
(ulong) flags2);
- flags2 &= ~(~0 << (DICT_TF2_BITS - DICT_TF2_SHIFT));
+ flags2 &= ~(~0U << (DICT_TF2_BITS - DICT_TF2_SHIFT));
}
flags |= flags2 << DICT_TF2_SHIFT;
diff --git a/storage/innobase/dict/dict0mem.c b/storage/innobase/dict/dict0mem.c
index cea7a253ba0..87d03eff3c2 100644
--- a/storage/innobase/dict/dict0mem.c
+++ b/storage/innobase/dict/dict0mem.c
@@ -69,7 +69,7 @@ dict_mem_table_create(
DBUG_ENTER("dict_mem_table_create");
ut_ad(name);
- ut_a(!(flags & (~0 << DICT_TF2_BITS)));
+ ut_a(!(flags & (~0U << DICT_TF2_BITS)));
heap = mem_heap_create(DICT_HEAP_SIZE);
diff --git a/storage/innobase/dyn/dyn0dyn.c b/storage/innobase/dyn/dyn0dyn.c
index d0f50ad0c32..b723877d648 100644
--- a/storage/innobase/dyn/dyn0dyn.c
+++ b/storage/innobase/dyn/dyn0dyn.c
@@ -40,7 +40,6 @@ dyn_array_add_block(
mem_heap_t* heap;
dyn_block_t* block;
- ut_ad(arr);
ut_ad(arr->magic_n == DYN_BLOCK_MAGIC_N);
if (arr->heap == NULL) {
diff --git a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
index b30e8056c0a..d7ac3dd14eb 100644
--- a/storage/innobase/fil/fil0fil.c
+++ b/storage/innobase/fil/fil0fil.c
@@ -3308,7 +3308,7 @@ fil_open_single_table_tablespace(
}
if (space_id != id
- || space_flags != (flags & ~(~0 << DICT_TF_BITS))) {
+ || space_flags != (flags & ~(~0U << DICT_TF_BITS))) {
ut_print_timestamp(stderr);
fputs(" InnoDB: Error: tablespace id and flags in file ",
diff --git a/storage/innobase/fsp/fsp0fsp.c b/storage/innobase/fsp/fsp0fsp.c
index 6d00a1f1d4a..e2e27608e5d 100644
--- a/storage/innobase/fsp/fsp0fsp.c
+++ b/storage/innobase/fsp/fsp0fsp.c
@@ -1285,7 +1285,6 @@ fsp_fill_free_list(
ulint i;
mtr_t ibuf_mtr;
- ut_ad(header && mtr);
ut_ad(page_offset(header) == FSP_HEADER_OFFSET);
/* Check if we can fill free list from above the free list limit */
@@ -1584,9 +1583,6 @@ fsp_alloc_free_page(
ulint page_no;
ulint space_size;
- ut_ad(mtr);
- ut_ad(init_mtr);
-
header = fsp_get_space_header(space, zip_size, mtr);
/* Get the hinted descriptor */
@@ -2602,7 +2598,6 @@ fseg_alloc_free_page_low(
ibool success;
ulint n;
- ut_ad(mtr);
ut_ad((direction >= FSP_UP) && (direction <= FSP_NO_DIR));
ut_ad(mach_read_from_4(seg_inode + FSEG_MAGIC_N)
== FSEG_MAGIC_N_VALUE);
diff --git a/storage/innobase/include/dict0dict.ic b/storage/innobase/include/dict0dict.ic
index b65cae2a1d8..dbc3ce99ab0 100644
--- a/storage/innobase/include/dict0dict.ic
+++ b/storage/innobase/include/dict0dict.ic
@@ -247,7 +247,6 @@ dict_index_is_clust(
/*================*/
const dict_index_t* index) /*!< in: index */
{
- ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
return(UNIV_UNLIKELY(index->type & DICT_CLUSTERED));
@@ -261,7 +260,6 @@ dict_index_is_unique(
/*=================*/
const dict_index_t* index) /*!< in: index */
{
- ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
return(UNIV_UNLIKELY(index->type & DICT_UNIQUE));
@@ -276,7 +274,6 @@ dict_index_is_ibuf(
/*===============*/
const dict_index_t* index) /*!< in: index */
{
- ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
return(UNIV_UNLIKELY(index->type & DICT_IBUF));
@@ -293,7 +290,6 @@ dict_index_is_sec_or_ibuf(
{
ulint type;
- ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
type = index->type;
@@ -311,7 +307,6 @@ dict_table_get_n_user_cols(
/*=======================*/
const dict_table_t* table) /*!< in: table */
{
- ut_ad(table);
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
return(table->n_cols - DATA_N_SYS_COLS);
@@ -343,7 +338,6 @@ dict_table_get_n_cols(
/*==================*/
const dict_table_t* table) /*!< in: table */
{
- ut_ad(table);
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
return(table->n_cols);
@@ -937,7 +931,6 @@ dict_index_is_corrupted(
/*====================*/
const dict_index_t* index) /*!< in: index */
{
- ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
return(UNIV_UNLIKELY((index->type & DICT_CORRUPT)
diff --git a/storage/innobase/include/dict0mem.h b/storage/innobase/include/dict0mem.h
index a58bb914be2..1b12c8303bb 100644
--- a/storage/innobase/include/dict0mem.h
+++ b/storage/innobase/include/dict0mem.h
@@ -85,9 +85,14 @@ combination of types */
/** File format */
/* @{ */
+#define DICT_TF_BITS 6 /*!< number of flag bits */
+#if (1 << (DICT_TF_BITS - DICT_TF_FORMAT_SHIFT)) <= DICT_TF_FORMAT_MAX
+# error "DICT_TF_BITS is insufficient for DICT_TF_FORMAT_MAX"
+#endif
+
#define DICT_TF_FORMAT_SHIFT 5 /* file format */
#define DICT_TF_FORMAT_MASK \
-((~(~0 << (DICT_TF_BITS - DICT_TF_FORMAT_SHIFT))) << DICT_TF_FORMAT_SHIFT)
+((~(~0U << (DICT_TF_BITS - DICT_TF_FORMAT_SHIFT))) << DICT_TF_FORMAT_SHIFT)
#define DICT_TF_FORMAT_51 0 /*!< InnoDB/MySQL up to 5.1 */
#define DICT_TF_FORMAT_ZIP 1 /*!< InnoDB plugin for 5.1:
compressed tables,
@@ -99,11 +104,6 @@ combination of types */
#define DICT_TF_FORMAT_MIN DICT_TF_FORMAT_51
/* @} */
-#define DICT_TF_BITS 6 /*!< number of flag bits */
-#if (1 << (DICT_TF_BITS - DICT_TF_FORMAT_SHIFT)) <= DICT_TF_FORMAT_MAX
-# error "DICT_TF_BITS is insufficient for DICT_TF_FORMAT_MAX"
-#endif
-/* @} */
/** @brief Additional table flags.
diff --git a/storage/innobase/include/dyn0dyn.ic b/storage/innobase/include/dyn0dyn.ic
index 177877ed1fd..2565a249271 100644
--- a/storage/innobase/include/dyn0dyn.ic
+++ b/storage/innobase/include/dyn0dyn.ic
@@ -47,8 +47,6 @@ dyn_block_get_used(
/*===============*/
const dyn_block_t* block) /*!< in: dyn array block */
{
- ut_ad(block);
-
return((block->used) & ~DYN_BLOCK_FULL_FLAG);
}
@@ -61,8 +59,6 @@ dyn_block_get_data(
/*===============*/
const dyn_block_t* block) /*!< in: dyn array block */
{
- ut_ad(block);
-
return((byte*) block->data);
}
@@ -76,7 +72,6 @@ dyn_array_create(
dyn_array_t* arr) /*!< in/out: memory buffer of
size sizeof(dyn_array_t) */
{
- ut_ad(arr);
#if DYN_ARRAY_DATA_SIZE >= DYN_BLOCK_FULL_FLAG
# error "DYN_ARRAY_DATA_SIZE >= DYN_BLOCK_FULL_FLAG"
#endif
@@ -119,7 +114,6 @@ dyn_array_push(
dyn_block_t* block;
ulint used;
- ut_ad(arr);
ut_ad(arr->magic_n == DYN_BLOCK_MAGIC_N);
ut_ad(size <= DYN_ARRAY_DATA_SIZE);
ut_ad(size);
@@ -159,7 +153,6 @@ dyn_array_open(
{
dyn_block_t* block;
- ut_ad(arr);
ut_ad(arr->magic_n == DYN_BLOCK_MAGIC_N);
ut_ad(size <= DYN_ARRAY_DATA_SIZE);
ut_ad(size);
@@ -195,7 +188,6 @@ dyn_array_close(
{
dyn_block_t* block;
- ut_ad(arr);
ut_ad(arr->magic_n == DYN_BLOCK_MAGIC_N);
block = dyn_array_get_last_block(arr);
@@ -222,7 +214,6 @@ dyn_array_get_element(
{
const dyn_block_t* block;
- ut_ad(arr);
ut_ad(arr->magic_n == DYN_BLOCK_MAGIC_N);
/* Get the first array block */
@@ -260,7 +251,6 @@ dyn_array_get_data_size(
const dyn_block_t* block;
ulint sum = 0;
- ut_ad(arr);
ut_ad(arr->magic_n == DYN_BLOCK_MAGIC_N);
if (arr->heap == NULL) {
diff --git a/storage/innobase/include/fsp0fsp.h b/storage/innobase/include/fsp0fsp.h
index f07e3decc66..0b813182947 100644
--- a/storage/innobase/include/fsp0fsp.h
+++ b/storage/innobase/include/fsp0fsp.h
@@ -42,7 +42,7 @@ Created 12/18/1995 Heikki Tuuri
#define FSP_FLAGS_POS_PAGE_SSIZE 6
/** Bit mask of the PAGE_SSIZE field */
#define FSP_FLAGS_MASK_PAGE_SSIZE \
- ((~(~0 << FSP_FLAGS_WIDTH_PAGE_SSIZE)) \
+ ((~(~0U << FSP_FLAGS_WIDTH_PAGE_SSIZE)) \
<< FSP_FLAGS_POS_PAGE_SSIZE)
/** Return the value of the PAGE_SSIZE field */
#define FSP_FLAGS_GET_PAGE_SSIZE(flags) \
diff --git a/storage/innobase/include/mach0data.ic b/storage/innobase/include/mach0data.ic
index 238a56577af..fdcb07ca29b 100644
--- a/storage/innobase/include/mach0data.ic
+++ b/storage/innobase/include/mach0data.ic
@@ -50,7 +50,6 @@ mach_read_from_1(
/*=============*/
const byte* b) /*!< in: pointer to byte */
{
- ut_ad(b);
return((ulint)(b[0]));
}
@@ -143,7 +142,6 @@ mach_read_from_3(
/*=============*/
const byte* b) /*!< in: pointer to 3 bytes */
{
- ut_ad(b);
return( ((ulint)(b[0]) << 16)
| ((ulint)(b[1]) << 8)
| (ulint)(b[2])
@@ -178,7 +176,6 @@ mach_read_from_4(
/*=============*/
const byte* b) /*!< in: pointer to four bytes */
{
- ut_ad(b);
return( ((ulint)(b[0]) << 24)
| ((ulint)(b[1]) << 16)
| ((ulint)(b[2]) << 8)
@@ -255,8 +252,6 @@ mach_read_compressed(
{
ulint flag;
- ut_ad(b);
-
flag = mach_read_from_1(b);
if (flag < 0x80UL) {
@@ -333,8 +328,6 @@ mach_read_from_7(
/*=============*/
const byte* b) /*!< in: pointer to 7 bytes */
{
- ut_ad(b);
-
return(ut_ull_create(mach_read_from_3(b), mach_read_from_4(b + 3)));
}
@@ -364,8 +357,6 @@ mach_read_from_6(
/*=============*/
const byte* b) /*!< in: pointer to 6 bytes */
{
- ut_ad(b);
-
return(ut_ull_create(mach_read_from_2(b), mach_read_from_4(b + 2)));
}
@@ -413,8 +404,6 @@ mach_ull_read_compressed(
ib_uint64_t n;
ulint size;
- ut_ad(b);
-
n = (ib_uint64_t) mach_read_compressed(b);
size = mach_get_compressed_size((ulint) n);
@@ -480,8 +469,6 @@ mach_ull_read_much_compressed(
ib_uint64_t n;
ulint size;
- ut_ad(b);
-
if (*b != (byte)0xFF) {
n = 0;
size = 0;
diff --git a/storage/innobase/include/mtr0mtr.ic b/storage/innobase/include/mtr0mtr.ic
index a03a0271535..c9e2f2e39de 100644
--- a/storage/innobase/include/mtr0mtr.ic
+++ b/storage/innobase/include/mtr0mtr.ic
@@ -149,7 +149,6 @@ mtr_memo_contains(
dyn_array_t* memo;
ulint offset;
- ut_ad(mtr);
ut_ad(mtr->magic_n == MTR_MAGIC_N);
ut_ad(mtr->state == MTR_ACTIVE || mtr->state == MTR_COMMITTING);
diff --git a/storage/innobase/include/page0page.ic b/storage/innobase/include/page0page.ic
index 781ad029e87..1689c0ade6b 100644
--- a/storage/innobase/include/page0page.ic
+++ b/storage/innobase/include/page0page.ic
@@ -154,7 +154,6 @@ page_header_get_offs(
{
ulint offs;
- ut_ad(page);
ut_ad((field == PAGE_FREE)
|| (field == PAGE_LAST_INSERT)
|| (field == PAGE_HEAP_TOP));
diff --git a/storage/innobase/include/rem0rec.ic b/storage/innobase/include/rem0rec.ic
index 564d2d1b31c..c81388391d7 100644
--- a/storage/innobase/include/rem0rec.ic
+++ b/storage/innobase/include/rem0rec.ic
@@ -1545,7 +1545,6 @@ rec_copy(
ulint extra_len;
ulint data_len;
- ut_ad(rec && buf);
ut_ad(rec_offs_validate((rec_t*) rec, NULL, offsets));
ut_ad(rec_validate(rec, offsets));
diff --git a/storage/innobase/include/ut0lst.h b/storage/innobase/include/ut0lst.h
index a010f464570..1fb43fd4805 100644
--- a/storage/innobase/include/ut0lst.h
+++ b/storage/innobase/include/ut0lst.h
@@ -88,7 +88,6 @@ Adds the node as the first element in a two-way linked list.
*/
#define UT_LIST_ADD_FIRST(NAME, BASE, N)\
{\
- ut_ad(N);\
((BASE).count)++;\
((N)->NAME).next = (BASE).start;\
((N)->NAME).prev = NULL;\
@@ -134,7 +133,6 @@ Inserts a NODE2 after NODE1 in a list.
#define UT_LIST_INSERT_AFTER(NAME, BASE, NODE1, NODE2)\
{\
ut_ad(NODE1);\
- ut_ad(NODE2);\
ut_ad((NODE1) != (NODE2));\
((BASE).count)++;\
((NODE2)->NAME).prev = (NODE1);\
@@ -169,7 +167,6 @@ Removes a node from a two-way linked list.
*/
#define UT_LIST_REMOVE(NAME, BASE, N) \
do { \
- ut_ad(N); \
ut_a((BASE).count > 0); \
((BASE).count)--; \
if (((N)->NAME).next != NULL) { \
diff --git a/storage/innobase/mtr/mtr0mtr.c b/storage/innobase/mtr/mtr0mtr.c
index a5c98761523..ebad6e7bfa1 100644
--- a/storage/innobase/mtr/mtr0mtr.c
+++ b/storage/innobase/mtr/mtr0mtr.c
@@ -257,7 +257,6 @@ mtr_commit(
/*=======*/
mtr_t* mtr) /*!< in: mini-transaction */
{
- ut_ad(mtr);
ut_ad(mtr->magic_n == MTR_MAGIC_N);
ut_ad(mtr->state == MTR_ACTIVE);
ut_ad(!mtr->inside_ibuf);
diff --git a/storage/innobase/page/page0page.c b/storage/innobase/page/page0page.c
index 81051f8f4fe..9af4b1c8faa 100644
--- a/storage/innobase/page/page0page.c
+++ b/storage/innobase/page/page0page.c
@@ -1345,7 +1345,6 @@ page_dir_split_slot(
ulint i;
ulint n_owned;
- ut_ad(page);
ut_ad(!page_zip || page_is_comp(page));
ut_ad(slot_no > 0);
@@ -1407,7 +1406,6 @@ page_dir_balance_slot(
rec_t* old_rec;
rec_t* new_rec;
- ut_ad(page);
ut_ad(!page_zip || page_is_comp(page));
ut_ad(slot_no > 0);
diff --git a/storage/innobase/page/page0zip.c b/storage/innobase/page/page0zip.c
index 7c04e0b9183..faa004be730 100644
--- a/storage/innobase/page/page0zip.c
+++ b/storage/innobase/page/page0zip.c
@@ -4739,7 +4739,6 @@ page_zip_parse_compress(
ulint size;
ulint trailer_size;
- ut_ad(ptr && end_ptr);
ut_ad(!page == !page_zip);
if (UNIV_UNLIKELY(ptr + (2 + 2) > end_ptr)) {
diff --git a/storage/innobase/rem/rem0rec.c b/storage/innobase/rem/rem0rec.c
index f7252594c29..7f435a92489 100644
--- a/storage/innobase/rem/rem0rec.c
+++ b/storage/innobase/rem/rem0rec.c
@@ -791,8 +791,7 @@ rec_get_converted_size_comp_prefix_low(
ulint extra_size;
ulint data_size;
ulint i;
- ut_ad(index);
- ut_ad(fields);
+
ut_ad(n_fields > 0);
ut_ad(n_fields <= dict_index_get_n_fields(index));
ut_ad(!temp || extra);
diff --git a/storage/innobase/row/row0merge.c b/storage/innobase/row/row0merge.c
index 7d87d1f9c8f..a393254d145 100644
--- a/storage/innobase/row/row0merge.c
+++ b/storage/innobase/row/row0merge.c
@@ -807,14 +807,8 @@ row_merge_read_rec(
ulint data_size;
ulint avail_size;
- ut_ad(block);
- ut_ad(buf);
ut_ad(b >= block[0]);
ut_ad(b < block[1]);
- ut_ad(index);
- ut_ad(foffs);
- ut_ad(mrec);
- ut_ad(offsets);
ut_ad(*offsets == 1 + REC_OFFS_HEADER_SIZE
+ dict_index_get_n_fields(index));
@@ -1175,12 +1169,6 @@ row_merge_read_clustered_index(
trx->op_info = "reading clustered index";
- ut_ad(trx);
- ut_ad(old_table);
- ut_ad(new_table);
- ut_ad(index);
- ut_ad(files);
-
/* Create and initialize memory for record buffers */
merge_buf = mem_alloc(n_index * sizeof *merge_buf);
diff --git a/storage/innobase/row/row0purge.c b/storage/innobase/row/row0purge.c
index 9018582f5d6..5f3e4175544 100644
--- a/storage/innobase/row/row0purge.c
+++ b/storage/innobase/row/row0purge.c
@@ -751,9 +751,6 @@ row_purge(
{
ibool updated_extern;
- ut_ad(node);
- ut_ad(thr);
-
node->undo_rec = trx_purge_fetch_next_rec(&node->roll_ptr,
&node->reservation,
node->heap);
diff --git a/storage/innobase/row/row0upd.c b/storage/innobase/row/row0upd.c
index e7ac42a566f..4b23165cc59 100644
--- a/storage/innobase/row/row0upd.c
+++ b/storage/innobase/row/row0upd.c
@@ -1066,8 +1066,6 @@ row_upd_index_replace_new_col_vals_index_pos(
ulint n_fields;
const ulint zip_size = dict_table_zip_size(index->table);
- ut_ad(index);
-
dtuple_set_info_bits(entry, update->info_bits);
if (order_only) {
@@ -1250,8 +1248,6 @@ row_upd_changes_ord_field_binary_func(
ulint i;
const dict_index_t* clust_index;
- ut_ad(index);
- ut_ad(update);
ut_ad(thr);
ut_ad(thr->graph);
ut_ad(thr->graph->trx);
diff --git a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c
index 2d585b7507f..151e70013f9 100644
--- a/storage/innobase/trx/trx0trx.c
+++ b/storage/innobase/trx/trx0trx.c
@@ -97,7 +97,6 @@ trx_create(
trx_t* trx;
ut_ad(mutex_own(&kernel_mutex));
- ut_ad(sess);
trx = mem_alloc(sizeof(trx_t));
diff --git a/storage/xtradb/btr/btr0btr.c b/storage/xtradb/btr/btr0btr.c
index 0c429363789..fb670df2329 100644
--- a/storage/xtradb/btr/btr0btr.c
+++ b/storage/xtradb/btr/btr0btr.c
@@ -2974,7 +2974,6 @@ btr_level_list_remove_func(
ulint prev_page_no;
ulint next_page_no;
- ut_ad(page && mtr);
ut_ad(mtr_memo_contains_page(mtr, page, MTR_MEMO_PAGE_X_FIX));
ut_ad(space == page_get_space_id(page));
/* Get the previous and next page numbers of page */
diff --git a/storage/xtradb/btr/btr0cur.c b/storage/xtradb/btr/btr0cur.c
index 0ec9367b27c..d9c1a2ef7a8 100644
--- a/storage/xtradb/btr/btr0cur.c
+++ b/storage/xtradb/btr/btr0cur.c
@@ -2008,7 +2008,6 @@ btr_cur_update_alloc_zip(
trx_t* trx) /*!< in: NULL or transaction */
{
ut_a(page_zip == buf_block_get_page_zip(block));
- ut_ad(page_zip);
ut_ad(!dict_index_is_ibuf(index));
if (page_zip_available(page_zip, dict_index_is_clust(index),
@@ -3008,7 +3007,7 @@ btr_cur_del_mark_set_clust_rec(
ut_ad(page_is_leaf(page_align(rec)));
#ifdef UNIV_DEBUG
- if (btr_cur_print_record_ops && thr) {
+ if (btr_cur_print_record_ops) {
btr_cur_trx_report(thr_get_trx(thr), index, "del mark ");
rec_print_new(stderr, rec, offsets);
}
@@ -3017,7 +3016,7 @@ btr_cur_del_mark_set_clust_rec(
ut_ad(dict_index_is_clust(index));
ut_ad(!rec_get_deleted_flag(rec, rec_offs_comp(offsets)));
- if (UNIV_UNLIKELY(thr && thr_get_trx(thr)->fake_changes)) {
+ if (UNIV_UNLIKELY(thr_get_trx(thr)->fake_changes)) {
/* skip LOCK, UNDO, CHANGE, LOG */
return(DB_SUCCESS);
}
@@ -4323,7 +4322,6 @@ btr_cur_disown_inherited_fields(
ut_ad(rec_offs_validate(rec, index, offsets));
ut_ad(!rec_offs_comp(offsets) || !rec_get_node_ptr_flag(rec));
ut_ad(rec_offs_any_extern(offsets));
- ut_ad(mtr);
for (i = 0; i < rec_offs_n_fields(offsets); i++) {
if (rec_offs_nth_extern(offsets, i)
@@ -4386,9 +4384,6 @@ btr_push_update_extern_fields(
ulint n;
const upd_field_t* uf;
- ut_ad(tuple);
- ut_ad(update);
-
uf = update->fields;
n = upd_get_n_fields(update);
@@ -4571,7 +4566,6 @@ btr_store_big_rec_extern_fields(
ut_ad(rec_offs_validate(rec, index, offsets));
ut_ad(rec_offs_any_extern(offsets));
- ut_ad(btr_mtr);
ut_ad(mtr_memo_contains(btr_mtr, dict_index_get_lock(index),
MTR_MEMO_X_LOCK));
ut_ad(mtr_memo_contains(btr_mtr, rec_block, MTR_MEMO_PAGE_X_FIX));
diff --git a/storage/xtradb/buf/buf0buddy.c b/storage/xtradb/buf/buf0buddy.c
index 439be08b01f..493d0d2d41c 100644
--- a/storage/xtradb/buf/buf0buddy.c
+++ b/storage/xtradb/buf/buf0buddy.c
@@ -288,7 +288,6 @@ buf_buddy_alloc_low(
{
buf_block_t* block;
- ut_ad(lru);
//ut_ad(buf_pool_mutex_own(buf_pool));
ut_ad(mutex_own(&buf_pool->LRU_list_mutex));
ut_ad(!mutex_own(&buf_pool->zip_mutex));
diff --git a/storage/xtradb/dict/dict0crea.c b/storage/xtradb/dict/dict0crea.c
index b44fdc1d2e4..1529c22bbb9 100644
--- a/storage/xtradb/dict/dict0crea.c
+++ b/storage/xtradb/dict/dict0crea.c
@@ -112,13 +112,13 @@ dict_create_sys_tables_tuple(
dfield = dtuple_get_nth_field(entry, 3/*TYPE*/);
ptr = mem_heap_alloc(heap, 4);
- if (table->flags & (~DICT_TF_COMPACT & ~(~0 << DICT_TF_BITS))) {
+ if (table->flags & (~DICT_TF_COMPACT & ~(~0U << DICT_TF_BITS))) {
ut_a(table->flags & DICT_TF_COMPACT);
ut_a(dict_table_get_format(table) >= DICT_TF_FORMAT_ZIP);
ut_a(((ulonglong) table->flags & DICT_TF_ZSSIZE_MASK)
<= (ulonglong) (DICT_TF_ZSSIZE_MAX << DICT_TF_ZSSIZE_SHIFT));
- ut_a(!(table->flags & (~0 << DICT_TF2_BITS)));
- mach_write_to_4(ptr, table->flags & ~(~0 << DICT_TF_BITS));
+ ut_a(!(table->flags & (~0U << DICT_TF2_BITS)));
+ mach_write_to_4(ptr, table->flags & ~(~0U << DICT_TF_BITS));
} else {
mach_write_to_4(ptr, DICT_TABLE_ORDINARY);
}
@@ -306,7 +306,7 @@ dict_build_table_def_step(
ut_ad(!dict_table_zip_size(table)
|| dict_table_get_format(table) >= DICT_TF_FORMAT_ZIP);
- flags = table->flags & ~(~0 << DICT_TF_BITS);
+ flags = table->flags & ~(~0U << DICT_TF_BITS);
error = fil_create_new_single_table_tablespace(
space, path_or_name, is_path,
flags == DICT_TF_COMPACT ? 0 : flags,
@@ -325,7 +325,7 @@ dict_build_table_def_step(
mtr_commit(&mtr);
} else {
/* Create in the system tablespace: disallow new features */
- table->flags &= (~0 << DICT_TF_BITS) | DICT_TF_COMPACT;
+ table->flags &= (~0U << DICT_TF_BITS) | DICT_TF_COMPACT;
}
row = dict_create_sys_tables_tuple(table, node->heap);
diff --git a/storage/xtradb/dict/dict0dict.c b/storage/xtradb/dict/dict0dict.c
index 87d7a3b2403..5da4509599e 100644
--- a/storage/xtradb/dict/dict0dict.c
+++ b/storage/xtradb/dict/dict0dict.c
@@ -6394,7 +6394,6 @@ dict_set_corrupted(
const char* status;
btr_cur_t cursor;
- ut_ad(index);
ut_ad(mutex_own(&dict_sys->mutex));
ut_ad(!dict_table_is_comp(dict_sys->sys_tables));
ut_ad(!dict_table_is_comp(dict_sys->sys_indexes));
diff --git a/storage/xtradb/dict/dict0load.c b/storage/xtradb/dict/dict0load.c
index 1fdbffee3c8..5184746e48e 100644
--- a/storage/xtradb/dict/dict0load.c
+++ b/storage/xtradb/dict/dict0load.c
@@ -716,7 +716,7 @@ dict_sys_tables_get_flags(
return(ULINT_UNDEFINED);
}
- if (UNIV_UNLIKELY(flags & (~0 << DICT_TF_BITS))) {
+ if (UNIV_UNLIKELY(flags & (~0U << DICT_TF_BITS))) {
/* Some unused bits are set. */
return(ULINT_UNDEFINED);
}
@@ -1405,7 +1405,7 @@ err_len:
goto err_len;
}
type = mach_read_from_4(field);
- if (UNIV_UNLIKELY(type & (~0 << DICT_IT_BITS))) {
+ if (UNIV_UNLIKELY(type & (~0U << DICT_IT_BITS))) {
return("unknown SYS_INDEXES.TYPE bits");
}
@@ -1770,7 +1770,7 @@ err_len:
flags2 = mach_read_from_4(field);
- if (flags2 & (~0 << (DICT_TF2_BITS - DICT_TF2_SHIFT))) {
+ if (flags2 & (~0U << (DICT_TF2_BITS - DICT_TF2_SHIFT))) {
ut_print_timestamp(stderr);
fputs(" InnoDB: Warning: table ", stderr);
ut_print_filename(stderr, name);
@@ -1779,7 +1779,7 @@ err_len:
" has unknown flags %lx.\n",
(ulong) flags2);
- flags2 &= ~(~0 << (DICT_TF2_BITS - DICT_TF2_SHIFT));
+ flags2 &= ~(~0U << (DICT_TF2_BITS - DICT_TF2_SHIFT));
}
flags |= flags2 << DICT_TF2_SHIFT;
@@ -1912,7 +1912,7 @@ err_exit:
if (!fil_open_single_table_tablespace(
TRUE, table->space,
table->flags == DICT_TF_COMPACT ? 0 :
- table->flags & ~(~0 << DICT_TF_BITS), name, NULL)) {
+ table->flags & ~(~0U << DICT_TF_BITS), name, NULL)) {
/* We failed to find a sensible
tablespace file */
diff --git a/storage/xtradb/dict/dict0mem.c b/storage/xtradb/dict/dict0mem.c
index 40099c06823..18917a30ff6 100644
--- a/storage/xtradb/dict/dict0mem.c
+++ b/storage/xtradb/dict/dict0mem.c
@@ -69,7 +69,7 @@ dict_mem_table_create(
DBUG_ENTER("dict_mem_table_create");
ut_ad(name);
- ut_a(!(flags & (~0 << DICT_TF2_BITS)));
+ ut_a(!(flags & (~0U << DICT_TF2_BITS)));
heap = mem_heap_create(DICT_HEAP_SIZE);
diff --git a/storage/xtradb/dyn/dyn0dyn.c b/storage/xtradb/dyn/dyn0dyn.c
index d0f50ad0c32..b723877d648 100644
--- a/storage/xtradb/dyn/dyn0dyn.c
+++ b/storage/xtradb/dyn/dyn0dyn.c
@@ -40,7 +40,6 @@ dyn_array_add_block(
mem_heap_t* heap;
dyn_block_t* block;
- ut_ad(arr);
ut_ad(arr->magic_n == DYN_BLOCK_MAGIC_N);
if (arr->heap == NULL) {
diff --git a/storage/xtradb/fil/fil0fil.c b/storage/xtradb/fil/fil0fil.c
index 7682b49e755..86e00dc22e4 100644
--- a/storage/xtradb/fil/fil0fil.c
+++ b/storage/xtradb/fil/fil0fil.c
@@ -3883,7 +3883,7 @@ skip_write:
}
if (space_id != id
- || space_flags != (flags & ~(~0 << DICT_TF_BITS))) {
+ || space_flags != (flags & ~(~0U << DICT_TF_BITS))) {
ut_print_timestamp(stderr);
fputs(" InnoDB: Error: tablespace id and flags in file ",
diff --git a/storage/xtradb/fsp/fsp0fsp.c b/storage/xtradb/fsp/fsp0fsp.c
index 772e224f6f7..4477b34f7b4 100644
--- a/storage/xtradb/fsp/fsp0fsp.c
+++ b/storage/xtradb/fsp/fsp0fsp.c
@@ -1290,7 +1290,6 @@ fsp_fill_free_list(
ulint i;
mtr_t ibuf_mtr;
- ut_ad(header && mtr);
ut_ad(page_offset(header) == FSP_HEADER_OFFSET);
/* Check if we can fill free list from above the free list limit */
@@ -1589,9 +1588,6 @@ fsp_alloc_free_page(
ulint page_no;
ulint space_size;
- ut_ad(mtr);
- ut_ad(init_mtr);
-
header = fsp_get_space_header(space, zip_size, mtr);
/* Get the hinted descriptor */
@@ -2613,7 +2609,6 @@ fseg_alloc_free_page_low(
ibool success;
ulint n;
- ut_ad(mtr);
ut_ad((direction >= FSP_UP) && (direction <= FSP_NO_DIR));
ut_ad(mach_read_from_4(seg_inode + FSEG_MAGIC_N)
== FSEG_MAGIC_N_VALUE);
diff --git a/storage/xtradb/include/btr0sea.ic b/storage/xtradb/include/btr0sea.ic
index 3f0dfdaa511..677cb52f458 100644
--- a/storage/xtradb/include/btr0sea.ic
+++ b/storage/xtradb/include/btr0sea.ic
@@ -91,7 +91,6 @@ btr_search_get_hash_table(
/*======================*/
const dict_index_t* index) /*!< in: index */
{
- ut_ad(index);
ut_ad(index->search_table);
return(index->search_table);
@@ -103,7 +102,6 @@ btr_search_get_latch(
/*=================*/
const dict_index_t* index) /*!< in: index */
{
- ut_ad(index);
ut_ad(index->search_latch >= btr_search_latch_arr &&
index->search_latch < btr_search_latch_arr +
btr_search_index_num);
@@ -130,8 +128,6 @@ btr_search_index_init(
/*===============*/
dict_index_t* index) /*!< in: index */
{
- ut_ad(index);
-
index->search_latch =
&btr_search_latch_arr[btr_search_get_key(index->id)];
index->search_table =
diff --git a/storage/xtradb/include/dict0dict.ic b/storage/xtradb/include/dict0dict.ic
index 6836928ff49..3410c945a80 100644
--- a/storage/xtradb/include/dict0dict.ic
+++ b/storage/xtradb/include/dict0dict.ic
@@ -247,7 +247,6 @@ dict_index_is_clust(
/*================*/
const dict_index_t* index) /*!< in: index */
{
- ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
return(UNIV_UNLIKELY(index->type & DICT_CLUSTERED));
@@ -261,7 +260,6 @@ dict_index_is_unique(
/*=================*/
const dict_index_t* index) /*!< in: index */
{
- ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
return(UNIV_UNLIKELY(index->type & DICT_UNIQUE));
@@ -276,7 +274,6 @@ dict_index_is_ibuf(
/*===============*/
const dict_index_t* index) /*!< in: index */
{
- ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
return(UNIV_UNLIKELY(index->type & DICT_IBUF));
@@ -293,7 +290,6 @@ dict_index_is_sec_or_ibuf(
{
ulint type;
- ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
type = index->type;
@@ -311,7 +307,6 @@ dict_table_get_n_user_cols(
/*=======================*/
const dict_table_t* table) /*!< in: table */
{
- ut_ad(table);
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
return(table->n_cols - DATA_N_SYS_COLS);
@@ -343,7 +338,6 @@ dict_table_get_n_cols(
/*==================*/
const dict_table_t* table) /*!< in: table */
{
- ut_ad(table);
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
return(table->n_cols);
@@ -950,7 +944,6 @@ dict_index_is_corrupted(
/*====================*/
const dict_index_t* index) /*!< in: index */
{
- ut_ad(index);
ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
return(UNIV_UNLIKELY((index->type & DICT_CORRUPT)
diff --git a/storage/xtradb/include/dict0mem.h b/storage/xtradb/include/dict0mem.h
index ba98eed7701..07ecc42f045 100644
--- a/storage/xtradb/include/dict0mem.h
+++ b/storage/xtradb/include/dict0mem.h
@@ -85,9 +85,14 @@ combination of types */
/** File format */
/* @{ */
+#define DICT_TF_BITS 6 /*!< number of flag bits */
+#if (1 << (DICT_TF_BITS - DICT_TF_FORMAT_SHIFT)) <= DICT_TF_FORMAT_MAX
+# error "DICT_TF_BITS is insufficient for DICT_TF_FORMAT_MAX"
+#endif
+
#define DICT_TF_FORMAT_SHIFT 5 /* file format */
#define DICT_TF_FORMAT_MASK \
-((~(~0 << (DICT_TF_BITS - DICT_TF_FORMAT_SHIFT))) << DICT_TF_FORMAT_SHIFT)
+((~(~0U << (DICT_TF_BITS - DICT_TF_FORMAT_SHIFT))) << DICT_TF_FORMAT_SHIFT)
#define DICT_TF_FORMAT_51 0 /*!< InnoDB/MySQL up to 5.1 */
#define DICT_TF_FORMAT_ZIP 1 /*!< InnoDB plugin for 5.1:
compressed tables,
@@ -99,11 +104,6 @@ combination of types */
#define DICT_TF_FORMAT_MIN DICT_TF_FORMAT_51
/* @} */
-#define DICT_TF_BITS 6 /*!< number of flag bits */
-#if (1 << (DICT_TF_BITS - DICT_TF_FORMAT_SHIFT)) <= DICT_TF_FORMAT_MAX
-# error "DICT_TF_BITS is insufficient for DICT_TF_FORMAT_MAX"
-#endif
-/* @} */
/** @brief Additional table flags.
diff --git a/storage/xtradb/include/dyn0dyn.ic b/storage/xtradb/include/dyn0dyn.ic
index 177877ed1fd..2565a249271 100644
--- a/storage/xtradb/include/dyn0dyn.ic
+++ b/storage/xtradb/include/dyn0dyn.ic
@@ -47,8 +47,6 @@ dyn_block_get_used(
/*===============*/
const dyn_block_t* block) /*!< in: dyn array block */
{
- ut_ad(block);
-
return((block->used) & ~DYN_BLOCK_FULL_FLAG);
}
@@ -61,8 +59,6 @@ dyn_block_get_data(
/*===============*/
const dyn_block_t* block) /*!< in: dyn array block */
{
- ut_ad(block);
-
return((byte*) block->data);
}
@@ -76,7 +72,6 @@ dyn_array_create(
dyn_array_t* arr) /*!< in/out: memory buffer of
size sizeof(dyn_array_t) */
{
- ut_ad(arr);
#if DYN_ARRAY_DATA_SIZE >= DYN_BLOCK_FULL_FLAG
# error "DYN_ARRAY_DATA_SIZE >= DYN_BLOCK_FULL_FLAG"
#endif
@@ -119,7 +114,6 @@ dyn_array_push(
dyn_block_t* block;
ulint used;
- ut_ad(arr);
ut_ad(arr->magic_n == DYN_BLOCK_MAGIC_N);
ut_ad(size <= DYN_ARRAY_DATA_SIZE);
ut_ad(size);
@@ -159,7 +153,6 @@ dyn_array_open(
{
dyn_block_t* block;
- ut_ad(arr);
ut_ad(arr->magic_n == DYN_BLOCK_MAGIC_N);
ut_ad(size <= DYN_ARRAY_DATA_SIZE);
ut_ad(size);
@@ -195,7 +188,6 @@ dyn_array_close(
{
dyn_block_t* block;
- ut_ad(arr);
ut_ad(arr->magic_n == DYN_BLOCK_MAGIC_N);
block = dyn_array_get_last_block(arr);
@@ -222,7 +214,6 @@ dyn_array_get_element(
{
const dyn_block_t* block;
- ut_ad(arr);
ut_ad(arr->magic_n == DYN_BLOCK_MAGIC_N);
/* Get the first array block */
@@ -260,7 +251,6 @@ dyn_array_get_data_size(
const dyn_block_t* block;
ulint sum = 0;
- ut_ad(arr);
ut_ad(arr->magic_n == DYN_BLOCK_MAGIC_N);
if (arr->heap == NULL) {
diff --git a/storage/xtradb/include/fsp0fsp.h b/storage/xtradb/include/fsp0fsp.h
index f07e3decc66..0b813182947 100644
--- a/storage/xtradb/include/fsp0fsp.h
+++ b/storage/xtradb/include/fsp0fsp.h
@@ -42,7 +42,7 @@ Created 12/18/1995 Heikki Tuuri
#define FSP_FLAGS_POS_PAGE_SSIZE 6
/** Bit mask of the PAGE_SSIZE field */
#define FSP_FLAGS_MASK_PAGE_SSIZE \
- ((~(~0 << FSP_FLAGS_WIDTH_PAGE_SSIZE)) \
+ ((~(~0U << FSP_FLAGS_WIDTH_PAGE_SSIZE)) \
<< FSP_FLAGS_POS_PAGE_SSIZE)
/** Return the value of the PAGE_SSIZE field */
#define FSP_FLAGS_GET_PAGE_SSIZE(flags) \
diff --git a/storage/xtradb/include/mach0data.ic b/storage/xtradb/include/mach0data.ic
index 238a56577af..fdcb07ca29b 100644
--- a/storage/xtradb/include/mach0data.ic
+++ b/storage/xtradb/include/mach0data.ic
@@ -50,7 +50,6 @@ mach_read_from_1(
/*=============*/
const byte* b) /*!< in: pointer to byte */
{
- ut_ad(b);
return((ulint)(b[0]));
}
@@ -143,7 +142,6 @@ mach_read_from_3(
/*=============*/
const byte* b) /*!< in: pointer to 3 bytes */
{
- ut_ad(b);
return( ((ulint)(b[0]) << 16)
| ((ulint)(b[1]) << 8)
| (ulint)(b[2])
@@ -178,7 +176,6 @@ mach_read_from_4(
/*=============*/
const byte* b) /*!< in: pointer to four bytes */
{
- ut_ad(b);
return( ((ulint)(b[0]) << 24)
| ((ulint)(b[1]) << 16)
| ((ulint)(b[2]) << 8)
@@ -255,8 +252,6 @@ mach_read_compressed(
{
ulint flag;
- ut_ad(b);
-
flag = mach_read_from_1(b);
if (flag < 0x80UL) {
@@ -333,8 +328,6 @@ mach_read_from_7(
/*=============*/
const byte* b) /*!< in: pointer to 7 bytes */
{
- ut_ad(b);
-
return(ut_ull_create(mach_read_from_3(b), mach_read_from_4(b + 3)));
}
@@ -364,8 +357,6 @@ mach_read_from_6(
/*=============*/
const byte* b) /*!< in: pointer to 6 bytes */
{
- ut_ad(b);
-
return(ut_ull_create(mach_read_from_2(b), mach_read_from_4(b + 2)));
}
@@ -413,8 +404,6 @@ mach_ull_read_compressed(
ib_uint64_t n;
ulint size;
- ut_ad(b);
-
n = (ib_uint64_t) mach_read_compressed(b);
size = mach_get_compressed_size((ulint) n);
@@ -480,8 +469,6 @@ mach_ull_read_much_compressed(
ib_uint64_t n;
ulint size;
- ut_ad(b);
-
if (*b != (byte)0xFF) {
n = 0;
size = 0;
diff --git a/storage/xtradb/include/mtr0mtr.ic b/storage/xtradb/include/mtr0mtr.ic
index 7b5d268b70f..bebe202e6ac 100644
--- a/storage/xtradb/include/mtr0mtr.ic
+++ b/storage/xtradb/include/mtr0mtr.ic
@@ -170,7 +170,6 @@ mtr_memo_contains(
dyn_array_t* memo;
ulint offset;
- ut_ad(mtr);
ut_ad(mtr->magic_n == MTR_MAGIC_N);
ut_ad(mtr->state == MTR_ACTIVE || mtr->state == MTR_COMMITTING);
diff --git a/storage/xtradb/include/page0page.ic b/storage/xtradb/include/page0page.ic
index 4fe93345ce5..da9fbc5f01d 100644
--- a/storage/xtradb/include/page0page.ic
+++ b/storage/xtradb/include/page0page.ic
@@ -154,7 +154,6 @@ page_header_get_offs(
{
ulint offs;
- ut_ad(page);
ut_ad((field == PAGE_FREE)
|| (field == PAGE_LAST_INSERT)
|| (field == PAGE_HEAP_TOP));
diff --git a/storage/xtradb/include/rem0rec.ic b/storage/xtradb/include/rem0rec.ic
index b14366312e0..b99d076b500 100644
--- a/storage/xtradb/include/rem0rec.ic
+++ b/storage/xtradb/include/rem0rec.ic
@@ -1545,7 +1545,6 @@ rec_copy(
ulint extra_len;
ulint data_len;
- ut_ad(rec && buf);
ut_ad(rec_offs_validate((rec_t*) rec, NULL, offsets));
ut_ad(rec_validate(rec, offsets));
diff --git a/storage/xtradb/include/trx0trx.h b/storage/xtradb/include/trx0trx.h
index eac5eb87703..5da06c83a79 100644
--- a/storage/xtradb/include/trx0trx.h
+++ b/storage/xtradb/include/trx0trx.h
@@ -508,6 +508,7 @@ struct trx_struct{
trx_release_descriptor(). Different name
ensures we notice any new code changing
the state. */
+
/*------------------------------*/
/* MySQL has a transaction coordinator to coordinate two phase
commit between multiple storage engines and the binary log. When
diff --git a/storage/xtradb/include/ut0lst.h b/storage/xtradb/include/ut0lst.h
index 9bb4bc7723f..2b5f5c7a705 100644
--- a/storage/xtradb/include/ut0lst.h
+++ b/storage/xtradb/include/ut0lst.h
@@ -88,7 +88,6 @@ Adds the node as the first element in a two-way linked list.
*/
#define UT_LIST_ADD_FIRST(NAME, BASE, N)\
{\
- ut_ad(N);\
((BASE).count)++;\
((N)->NAME).next = (BASE).start;\
((N)->NAME).prev = NULL;\
@@ -134,7 +133,6 @@ Inserts a NODE2 after NODE1 in a list.
#define UT_LIST_INSERT_AFTER(NAME, BASE, NODE1, NODE2)\
{\
ut_ad(NODE1);\
- ut_ad(NODE2);\
ut_ad((NODE1) != (NODE2));\
((BASE).count)++;\
((NODE2)->NAME).prev = (NODE1);\
@@ -169,7 +167,6 @@ Removes a node from a two-way linked list.
*/
#define UT_LIST_REMOVE(NAME, BASE, N) \
do { \
- ut_ad(N); \
ut_a((BASE).count > 0); \
((BASE).count)--; \
if (((N)->NAME).next != NULL) { \
diff --git a/storage/xtradb/mtr/mtr0mtr.c b/storage/xtradb/mtr/mtr0mtr.c
index 083692efd77..d6aed7ee723 100644
--- a/storage/xtradb/mtr/mtr0mtr.c
+++ b/storage/xtradb/mtr/mtr0mtr.c
@@ -289,7 +289,6 @@ mtr_commit(
/*=======*/
mtr_t* mtr) /*!< in: mini-transaction */
{
- ut_ad(mtr);
ut_ad(mtr->magic_n == MTR_MAGIC_N);
ut_ad(mtr->state == MTR_ACTIVE);
ut_ad(!mtr->inside_ibuf);
diff --git a/storage/xtradb/page/page0page.c b/storage/xtradb/page/page0page.c
index f2ce6c9fe16..2dd5a4ba472 100644
--- a/storage/xtradb/page/page0page.c
+++ b/storage/xtradb/page/page0page.c
@@ -1345,7 +1345,6 @@ page_dir_split_slot(
ulint i;
ulint n_owned;
- ut_ad(page);
ut_ad(!page_zip || page_is_comp(page));
ut_ad(slot_no > 0);
@@ -1407,7 +1406,6 @@ page_dir_balance_slot(
rec_t* old_rec;
rec_t* new_rec;
- ut_ad(page);
ut_ad(!page_zip || page_is_comp(page));
ut_ad(slot_no > 0);
diff --git a/storage/xtradb/page/page0zip.c b/storage/xtradb/page/page0zip.c
index 3d3605d6362..7482323c9b5 100644
--- a/storage/xtradb/page/page0zip.c
+++ b/storage/xtradb/page/page0zip.c
@@ -4743,7 +4743,6 @@ page_zip_parse_compress(
ulint size;
ulint trailer_size;
- ut_ad(ptr && end_ptr);
ut_ad(!page == !page_zip);
if (UNIV_UNLIKELY(ptr + (2 + 2) > end_ptr)) {
diff --git a/storage/xtradb/rem/rem0rec.c b/storage/xtradb/rem/rem0rec.c
index 69d9e49e693..ef020fe3a80 100644
--- a/storage/xtradb/rem/rem0rec.c
+++ b/storage/xtradb/rem/rem0rec.c
@@ -791,8 +791,7 @@ rec_get_converted_size_comp_prefix_low(
ulint extra_size;
ulint data_size;
ulint i;
- ut_ad(index);
- ut_ad(fields);
+
ut_ad(n_fields > 0);
ut_ad(n_fields <= dict_index_get_n_fields(index));
ut_ad(!temp || extra);
diff --git a/storage/xtradb/row/row0merge.c b/storage/xtradb/row/row0merge.c
index 3a03c7c8578..7409d5a5e1a 100644
--- a/storage/xtradb/row/row0merge.c
+++ b/storage/xtradb/row/row0merge.c
@@ -823,14 +823,8 @@ row_merge_read_rec(
ulint data_size;
ulint avail_size;
- ut_ad(block);
- ut_ad(buf);
ut_ad(b >= block[0]);
ut_ad(b < block[1]);
- ut_ad(index);
- ut_ad(foffs);
- ut_ad(mrec);
- ut_ad(offsets);
ut_ad(*offsets == 1 + REC_OFFS_HEADER_SIZE
+ dict_index_get_n_fields(index));
@@ -1202,12 +1196,6 @@ row_merge_read_clustered_index(
trx->op_info = "reading clustered index";
- ut_ad(trx);
- ut_ad(old_table);
- ut_ad(new_table);
- ut_ad(index);
- ut_ad(files);
-
/* Create and initialize memory for record buffers */
merge_buf = mem_alloc(n_index * sizeof *merge_buf);
diff --git a/storage/xtradb/row/row0purge.c b/storage/xtradb/row/row0purge.c
index 1e87016bc5e..8ada79a2bbc 100644
--- a/storage/xtradb/row/row0purge.c
+++ b/storage/xtradb/row/row0purge.c
@@ -751,9 +751,6 @@ row_purge(
{
ibool updated_extern;
- ut_ad(node);
- ut_ad(thr);
-
node->undo_rec = trx_purge_fetch_next_rec(&node->roll_ptr,
&node->reservation,
node->heap);
diff --git a/storage/xtradb/row/row0upd.c b/storage/xtradb/row/row0upd.c
index c0515c423db..64ae0e3f1d0 100644
--- a/storage/xtradb/row/row0upd.c
+++ b/storage/xtradb/row/row0upd.c
@@ -1084,8 +1084,6 @@ row_upd_index_replace_new_col_vals_index_pos(
ulint n_fields;
const ulint zip_size = dict_table_zip_size(index->table);
- ut_ad(index);
-
dtuple_set_info_bits(entry, update->info_bits);
if (order_only) {
@@ -1268,8 +1266,6 @@ row_upd_changes_ord_field_binary_func(
ulint i;
const dict_index_t* clust_index;
- ut_ad(index);
- ut_ad(update);
ut_ad(thr);
ut_ad(thr->graph);
ut_ad(thr->graph->trx);
diff --git a/storage/xtradb/trx/trx0trx.c b/storage/xtradb/trx/trx0trx.c
index 17cb8374d5c..dd7b8bfdd1d 100644
--- a/storage/xtradb/trx/trx0trx.c
+++ b/storage/xtradb/trx/trx0trx.c
@@ -218,7 +218,6 @@ trx_create(
trx_t* trx;
ut_ad(mutex_own(&kernel_mutex));
- ut_ad(sess);
trx = mem_alloc(sizeof(trx_t));