summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2016-11-25 06:09:00 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2016-11-25 12:43:34 +0200
commitcdaa1d768ebc002b968dee347c1928fef87b9537 (patch)
tree1d2cb2b352264ab26b6f33821b5036b386261327 /storage
parent1a1749e38c774ce3a3493da2410b19ebe71eccb5 (diff)
downloadmariadb-git-cdaa1d768ebc002b968dee347c1928fef87b9537.tar.gz
MDEV-11349 (1/2) Fix some clang 4.0 warnings
In functions that declare pointer parameters as nonnull, remove nullness checks, because GCC would optimize them away anyway. Use #ifdef instead of #if when checking for a configuration flag. Clang says that left shifts of negative values are undefined. So, use ~0U instead of ~0 in a number of macros. Some functions that were defined as UNIV_INLINE were declared as UNIV_INTERN. Consistently use the same type of linkage. ibuf_merge_or_delete_for_page() could pass bitmap_page=NULL to buf_page_print(), conflicting with the __attribute__((nonnull)).
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/handler/ha_innodb.cc2
-rw-r--r--storage/innobase/include/dict0mem.h12
-rw-r--r--storage/innobase/include/fil0pagecompress.h8
-rw-r--r--storage/innobase/include/fsp0fsp.h2
-rw-r--r--storage/innobase/include/fsp0types.h8
-rw-r--r--storage/innobase/row/row0merge.cc5
-rw-r--r--storage/innobase/row/row0upd.cc2
-rw-r--r--storage/xtradb/btr/btr0cur.cc8
-rw-r--r--storage/xtradb/buf/buf0buf.cc7
-rw-r--r--storage/xtradb/dict/dict0dict.cc7
-rw-r--r--storage/xtradb/handler/ha_innodb.cc2
-rw-r--r--storage/xtradb/ibuf/ibuf0ibuf.cc10
-rw-r--r--storage/xtradb/include/dict0mem.h12
-rw-r--r--storage/xtradb/include/fil0pagecompress.h18
-rw-r--r--storage/xtradb/include/fsp0fsp.h15
-rw-r--r--storage/xtradb/include/page0page.ic3
-rw-r--r--storage/xtradb/page/page0zip.cc4
-rw-r--r--storage/xtradb/row/row0merge.cc5
-rw-r--r--storage/xtradb/row/row0upd.cc3
-rw-r--r--storage/xtradb/sync/sync0sync.cc3
20 files changed, 57 insertions, 79 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 164287b5676..fcae0bc1d34 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -22362,7 +22362,7 @@ wsrep_fake_trx_id(
trx_id_t trx_id = trx_sys_get_new_trx_id();
mutex_exit(&trx_sys->mutex);
- (void *)wsrep_ws_handle_for_trx(wsrep_thd_ws_handle(thd), trx_id);
+ wsrep_ws_handle_for_trx(wsrep_thd_ws_handle(thd), trx_id);
}
#endif /* WITH_WSREP */
diff --git a/storage/innobase/include/dict0mem.h b/storage/innobase/include/dict0mem.h
index 4fac0648bcb..4ee19f96008 100644
--- a/storage/innobase/include/dict0mem.h
+++ b/storage/innobase/include/dict0mem.h
@@ -179,7 +179,7 @@ DEFAULT=0, ON = 1, OFF = 2
+ DICT_TF_WIDTH_PAGE_ENCRYPTION_KEY)
/** A mask of all the known/used bits in table flags */
-#define DICT_TF_BIT_MASK (~(~0 << DICT_TF_BITS))
+#define DICT_TF_BIT_MASK (~(~0U << DICT_TF_BITS))
/** Zero relative shift position of the COMPACT field */
#define DICT_TF_POS_COMPACT 0
@@ -235,23 +235,23 @@ DEFAULT=0, ON = 1, OFF = 2
<< DICT_TF_POS_SHARED_SPACE)
/** Bit mask of the PAGE_COMPRESSION field */
#define DICT_TF_MASK_PAGE_COMPRESSION \
- ((~(~0 << DICT_TF_WIDTH_PAGE_COMPRESSION)) \
+ ((~(~0U << DICT_TF_WIDTH_PAGE_COMPRESSION)) \
<< DICT_TF_POS_PAGE_COMPRESSION)
/** Bit mask of the PAGE_COMPRESSION_LEVEL field */
#define DICT_TF_MASK_PAGE_COMPRESSION_LEVEL \
- ((~(~0 << DICT_TF_WIDTH_PAGE_COMPRESSION_LEVEL)) \
+ ((~(~0U << DICT_TF_WIDTH_PAGE_COMPRESSION_LEVEL)) \
<< DICT_TF_POS_PAGE_COMPRESSION_LEVEL)
/** Bit mask of the ATOMIC_WRITES field */
#define DICT_TF_MASK_ATOMIC_WRITES \
- ((~(~0 << DICT_TF_WIDTH_ATOMIC_WRITES)) \
+ ((~(~0U << DICT_TF_WIDTH_ATOMIC_WRITES)) \
<< DICT_TF_POS_ATOMIC_WRITES)
/** Bit mask of the PAGE_ENCRYPTION field */
#define DICT_TF_MASK_PAGE_ENCRYPTION \
- ((~(~0 << DICT_TF_WIDTH_PAGE_ENCRYPTION)) \
+ ((~(~0U << DICT_TF_WIDTH_PAGE_ENCRYPTION)) \
<< DICT_TF_POS_PAGE_ENCRYPTION)
/** Bit mask of the PAGE_ENCRYPTION_KEY field */
#define DICT_TF_MASK_PAGE_ENCRYPTION_KEY \
- ((~(~0 << DICT_TF_WIDTH_PAGE_ENCRYPTION_KEY)) \
+ ((~(~0U << DICT_TF_WIDTH_PAGE_ENCRYPTION_KEY)) \
<< DICT_TF_POS_PAGE_ENCRYPTION_KEY)
/** Return the value of the COMPACT field */
diff --git a/storage/innobase/include/fil0pagecompress.h b/storage/innobase/include/fil0pagecompress.h
index 4d27a61be64..2948207133b 100644
--- a/storage/innobase/include/fil0pagecompress.h
+++ b/storage/innobase/include/fil0pagecompress.h
@@ -34,7 +34,7 @@ Created 11/12/2013 Jan Lindström jan.lindstrom@skysql.com
Returns the page compression level flag of the space, or 0 if the space
is not compressed. The tablespace must be cached in the memory cache.
@return page compression level if page compressed, ULINT_UNDEFINED if space not found */
-UNIV_INTERN
+UNIV_INLINE
ulint
fil_space_get_page_compression_level(
/*=================================*/
@@ -43,7 +43,7 @@ fil_space_get_page_compression_level(
Returns the page compression flag of the space, or false if the space
is not compressed. The tablespace must be cached in the memory cache.
@return true if page compressed, false if not or space not found */
-UNIV_INTERN
+UNIV_INLINE
bool
fil_space_is_page_compressed(
/*=========================*/
@@ -61,7 +61,7 @@ fil_space_get_page_compressed(
Returns the atomic writes flag of the space, or false if the space
is not using atomic writes. The tablespace must be cached in the memory cache.
@return atomic write table option value */
-UNIV_INTERN
+UNIV_INLINE
atomic_writes_t
fil_space_get_atomic_writes(
/*=========================*/
@@ -118,7 +118,7 @@ fil_node_get_space_id(
/****************************************************************//**
Get block size from fil node
@return block size*/
-UNIV_INTERN
+UNIV_INLINE
ulint
fil_node_get_block_size(
/*====================*/
diff --git a/storage/innobase/include/fsp0fsp.h b/storage/innobase/include/fsp0fsp.h
index 3709c4a4f24..17ccb113e91 100644
--- a/storage/innobase/include/fsp0fsp.h
+++ b/storage/innobase/include/fsp0fsp.h
@@ -48,7 +48,7 @@ Created 12/18/1995 Heikki Tuuri
+ FSP_FLAGS_WIDTH_PAGE_SSIZE)
/** Bit mask of the DATA_DIR field */
#define FSP_FLAGS_MASK_DATA_DIR_ORACLE \
- ((~(~0 << FSP_FLAGS_WIDTH_DATA_DIR)) \
+ ((~(~0U << FSP_FLAGS_WIDTH_DATA_DIR)) \
<< FSP_FLAGS_POS_DATA_DIR_ORACLE)
#define FSP_FLAGS_HAS_DATA_DIR_ORACLE(flags) \
diff --git a/storage/innobase/include/fsp0types.h b/storage/innobase/include/fsp0types.h
index 73fd6341d94..21951acf72b 100644
--- a/storage/innobase/include/fsp0types.h
+++ b/storage/innobase/include/fsp0types.h
@@ -275,7 +275,7 @@ is a tablespace with encryption. */
+ FSP_FLAGS_WIDTH_ATOMIC_WRITES )
/** A mask of all the known/used bits in tablespace flags */
-#define FSP_FLAGS_MASK (~(~0 << FSP_FLAGS_WIDTH))
+#define FSP_FLAGS_MASK (~(~0U << FSP_FLAGS_WIDTH))
/** Zero relative shift position of the POST_ANTELOPE field */
#define FSP_FLAGS_POS_POST_ANTELOPE 0
@@ -348,15 +348,15 @@ is a tablespace with encryption. */
<< FSP_FLAGS_POS_ENCRYPTION)
/** Bit mask of the PAGE_COMPRESSION field */
#define FSP_FLAGS_MASK_PAGE_COMPRESSION \
- ((~(~0 << FSP_FLAGS_WIDTH_PAGE_COMPRESSION)) \
+ ((~(~0U << FSP_FLAGS_WIDTH_PAGE_COMPRESSION)) \
<< FSP_FLAGS_POS_PAGE_COMPRESSION)
/** Bit mask of the PAGE_COMPRESSION_LEVEL field */
#define FSP_FLAGS_MASK_PAGE_COMPRESSION_LEVEL \
- ((~(~0 << FSP_FLAGS_WIDTH_PAGE_COMPRESSION_LEVEL)) \
+ ((~(~0U << FSP_FLAGS_WIDTH_PAGE_COMPRESSION_LEVEL)) \
<< FSP_FLAGS_POS_PAGE_COMPRESSION_LEVEL)
/** Bit mask of the ATOMIC_WRITES field */
#define FSP_FLAGS_MASK_ATOMIC_WRITES \
- ((~(~0 << FSP_FLAGS_WIDTH_ATOMIC_WRITES)) \
+ ((~(~0U << FSP_FLAGS_WIDTH_ATOMIC_WRITES)) \
<< FSP_FLAGS_POS_ATOMIC_WRITES)
/** Return the value of the POST_ANTELOPE field */
diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc
index b1454436468..0b7c1c36231 100644
--- a/storage/innobase/row/row0merge.cc
+++ b/storage/innobase/row/row0merge.cc
@@ -4941,9 +4941,10 @@ wait_again:
(total_static_cost + total_dynamic_cost)
* PCT_COST_MERGESORT_INDEX * 100;
- bufend = innobase_convert_name(buf, sizeof buf,
+ bufend = innobase_convert_name(
+ buf, sizeof buf,
indexes[i]->name, strlen(indexes[i]->name),
- trx ? trx->mysql_thd : NULL);
+ trx->mysql_thd);
buf[bufend - buf]='\0';
diff --git a/storage/innobase/row/row0upd.cc b/storage/innobase/row/row0upd.cc
index 40a153a4345..4e515bab30d 100644
--- a/storage/innobase/row/row0upd.cc
+++ b/storage/innobase/row/row0upd.cc
@@ -3265,8 +3265,6 @@ row_upd(
dberr_t err = DB_SUCCESS;
DBUG_ENTER("row_upd");
- ut_ad(node != NULL);
- ut_ad(thr != NULL);
ut_ad(!thr_get_trx(thr)->in_rollback);
DBUG_PRINT("row_upd", ("table: %s", node->table->name.m_name));
diff --git a/storage/xtradb/btr/btr0cur.cc b/storage/xtradb/btr/btr0cur.cc
index b52a068863f..0dc6a7a3ee9 100644
--- a/storage/xtradb/btr/btr0cur.cc
+++ b/storage/xtradb/btr/btr0cur.cc
@@ -1862,9 +1862,7 @@ btr_cur_upd_lock_and_undo(
const rec_t* rec;
dberr_t err;
- ut_ad((thr != NULL) || (flags & BTR_NO_LOCKING_FLAG));
-
- if (UNIV_UNLIKELY(thr && thr_get_trx(thr)->fake_changes)) {
+ if (UNIV_UNLIKELY(thr_get_trx(thr)->fake_changes)) {
/* skip LOCK, UNDO */
return(DB_SUCCESS);
}
@@ -3208,7 +3206,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 != NULL)) {
+ if (btr_cur_print_record_ops) {
btr_cur_trx_report(thr_get_trx(thr)->id, index, "del mark ");
rec_print_new(stderr, rec, offsets);
}
@@ -3366,7 +3364,7 @@ btr_cur_del_mark_set_sec_rec(
rec = btr_cur_get_rec(cursor);
#ifdef UNIV_DEBUG
- if (btr_cur_print_record_ops && (thr != NULL)) {
+ if (btr_cur_print_record_ops) {
btr_cur_trx_report(thr_get_trx(thr)->id, cursor->index,
"del mark ");
rec_print(stderr, rec, cursor->index);
diff --git a/storage/xtradb/buf/buf0buf.cc b/storage/xtradb/buf/buf0buf.cc
index 6e7f0e44c79..8dcb4825b7c 100644
--- a/storage/xtradb/buf/buf0buf.cc
+++ b/storage/xtradb/buf/buf0buf.cc
@@ -889,13 +889,6 @@ buf_page_print(
#endif /* !UNIV_HOTBACKUP */
ulint size = zip_size;
- if (!read_buf) {
- fprintf(stderr,
- " InnoDB: Not dumping page as (in memory) pointer "
- "is NULL\n");
- return;
- }
-
if (!size) {
size = UNIV_PAGE_SIZE;
}
diff --git a/storage/xtradb/dict/dict0dict.cc b/storage/xtradb/dict/dict0dict.cc
index 86ec720d24e..47dfa2e009d 100644
--- a/storage/xtradb/dict/dict0dict.cc
+++ b/storage/xtradb/dict/dict0dict.cc
@@ -6317,15 +6317,10 @@ dict_set_corrupted_index_cache_only(
/* Mark the table as corrupted only if the clustered index
is corrupted */
if (dict_index_is_clust(index)) {
- dict_table_t* corrupt_table;
-
- corrupt_table = (table != NULL) ? table : index->table;
ut_ad((index->table != NULL) || (table != NULL)
|| index->table == table);
- if (corrupt_table) {
- corrupt_table->corrupted = TRUE;
- }
+ table->corrupted = TRUE;
}
index->type |= DICT_CORRUPT;
diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc
index bd02e97b739..9d9dd04ac23 100644
--- a/storage/xtradb/handler/ha_innodb.cc
+++ b/storage/xtradb/handler/ha_innodb.cc
@@ -19755,7 +19755,7 @@ wsrep_fake_trx_id(
trx_id_t trx_id = trx_sys_get_new_trx_id();
mutex_exit(&trx_sys->mutex);
- (void *)wsrep_ws_handle_for_trx(wsrep_thd_ws_handle(thd), trx_id);
+ wsrep_ws_handle_for_trx(wsrep_thd_ws_handle(thd), trx_id);
}
#endif /* WITH_WSREP */
diff --git a/storage/xtradb/ibuf/ibuf0ibuf.cc b/storage/xtradb/ibuf/ibuf0ibuf.cc
index dc6ad49838e..4a496cb4190 100644
--- a/storage/xtradb/ibuf/ibuf0ibuf.cc
+++ b/storage/xtradb/ibuf/ibuf0ibuf.cc
@@ -4722,8 +4722,14 @@ ibuf_merge_or_delete_for_page(
bitmap_page = ibuf_bitmap_get_map_page(space, page_no,
zip_size, &mtr);
- buf_page_print(bitmap_page, 0,
- BUF_PAGE_PRINT_NO_CRASH);
+ if (bitmap_page == NULL)
+ {
+ fputs("InnoDB: cannot retrieve bitmap page\n",
+ stderr);
+ } else {
+ buf_page_print(bitmap_page, 0,
+ BUF_PAGE_PRINT_NO_CRASH);
+ }
ibuf_mtr_commit(&mtr);
fputs("\nInnoDB: Dump of the page:\n", stderr);
diff --git a/storage/xtradb/include/dict0mem.h b/storage/xtradb/include/dict0mem.h
index 24219ac8799..0ee1c7692fd 100644
--- a/storage/xtradb/include/dict0mem.h
+++ b/storage/xtradb/include/dict0mem.h
@@ -164,7 +164,7 @@ DEFAULT=0, ON = 1, OFF = 2
+ DICT_TF_WIDTH_PAGE_ENCRYPTION_KEY)
/** A mask of all the known/used bits in table flags */
-#define DICT_TF_BIT_MASK (~(~0 << DICT_TF_BITS))
+#define DICT_TF_BIT_MASK (~(~0U << DICT_TF_BITS))
/** Zero relative shift position of the COMPACT field */
#define DICT_TF_POS_COMPACT 0
@@ -215,23 +215,23 @@ DEFAULT=0, ON = 1, OFF = 2
<< DICT_TF_POS_DATA_DIR)
/** Bit mask of the PAGE_COMPRESSION field */
#define DICT_TF_MASK_PAGE_COMPRESSION \
- ((~(~0 << DICT_TF_WIDTH_PAGE_COMPRESSION)) \
+ ((~(~0U << DICT_TF_WIDTH_PAGE_COMPRESSION)) \
<< DICT_TF_POS_PAGE_COMPRESSION)
/** Bit mask of the PAGE_COMPRESSION_LEVEL field */
#define DICT_TF_MASK_PAGE_COMPRESSION_LEVEL \
- ((~(~0 << DICT_TF_WIDTH_PAGE_COMPRESSION_LEVEL)) \
+ ((~(~0U << DICT_TF_WIDTH_PAGE_COMPRESSION_LEVEL)) \
<< DICT_TF_POS_PAGE_COMPRESSION_LEVEL)
/** Bit mask of the ATOMIC_WRITES field */
#define DICT_TF_MASK_ATOMIC_WRITES \
- ((~(~0 << DICT_TF_WIDTH_ATOMIC_WRITES)) \
+ ((~(~0U << DICT_TF_WIDTH_ATOMIC_WRITES)) \
<< DICT_TF_POS_ATOMIC_WRITES)
/** Bit mask of the PAGE_ENCRYPTION field */
#define DICT_TF_MASK_PAGE_ENCRYPTION \
- ((~(~0L << DICT_TF_WIDTH_PAGE_ENCRYPTION)) \
+ ((~(~0U << DICT_TF_WIDTH_PAGE_ENCRYPTION)) \
<< DICT_TF_POS_PAGE_ENCRYPTION)
/** Bit mask of the PAGE_ENCRYPTION_KEY field */
#define DICT_TF_MASK_PAGE_ENCRYPTION_KEY \
- ((~(~0L << DICT_TF_WIDTH_PAGE_ENCRYPTION_KEY)) \
+ ((~(~0U << DICT_TF_WIDTH_PAGE_ENCRYPTION_KEY)) \
<< DICT_TF_POS_PAGE_ENCRYPTION_KEY)
/** Return the value of the COMPACT field */
diff --git a/storage/xtradb/include/fil0pagecompress.h b/storage/xtradb/include/fil0pagecompress.h
index 99a05f14ffe..10db59fb218 100644
--- a/storage/xtradb/include/fil0pagecompress.h
+++ b/storage/xtradb/include/fil0pagecompress.h
@@ -34,7 +34,7 @@ Created 11/12/2013 Jan Lindström jan.lindstrom@skysql.com
Returns the page compression level flag of the space, or 0 if the space
is not compressed. The tablespace must be cached in the memory cache.
@return page compression level if page compressed, ULINT_UNDEFINED if space not found */
-UNIV_INTERN
+UNIV_INLINE
ulint
fil_space_get_page_compression_level(
/*=================================*/
@@ -43,7 +43,7 @@ fil_space_get_page_compression_level(
Returns the page compression flag of the space, or false if the space
is not compressed. The tablespace must be cached in the memory cache.
@return true if page compressed, false if not or space not found */
-UNIV_INTERN
+UNIV_INLINE
ibool
fil_space_is_page_compressed(
/*=========================*/
@@ -61,7 +61,7 @@ fil_space_get_page_compressed(
Returns the atomic writes flag of the space, or false if the space
is not using atomic writes. The tablespace must be cached in the memory cache.
@return atomic write table option value */
-UNIV_INTERN
+UNIV_INLINE
atomic_writes_t
fil_space_get_atomic_writes(
/*=========================*/
@@ -69,7 +69,7 @@ fil_space_get_atomic_writes(
/*******************************************************************//**
Find out wheather the page is index page or not
@return true if page type index page, false if not */
-UNIV_INTERN
+UNIV_INLINE
ibool
fil_page_is_index_page(
/*===================*/
@@ -79,7 +79,7 @@ fil_page_is_index_page(
Get the name of the compression algorithm used for page
compression.
@return compression algorithm name or "UNKNOWN" if not known*/
-UNIV_INTERN
+UNIV_INLINE
const char*
fil_get_compression_alg_name(
/*=========================*/
@@ -136,7 +136,7 @@ fil_node_get_space_id(
/****************************************************************//**
Get block size from fil node
@return block size*/
-UNIV_INTERN
+UNIV_INLINE
ulint
fil_node_get_block_size(
fil_node_t* node); /*!< in: Node where to get block
@@ -144,7 +144,7 @@ fil_node_get_block_size(
/*******************************************************************//**
Find out wheather the page is page compressed
@return true if page is page compressed*/
-UNIV_INTERN
+UNIV_INLINE
ibool
fil_page_is_compressed(
/*===================*/
@@ -153,7 +153,7 @@ fil_page_is_compressed(
/*******************************************************************//**
Find out wheather the page is page compressed
@return true if page is page compressed*/
-UNIV_INTERN
+UNIV_INLINE
ibool
fil_page_is_compressed_encrypted(
/*=============================*/
@@ -162,7 +162,7 @@ fil_page_is_compressed_encrypted(
/*******************************************************************//**
Find out wheather the page is page compressed with lzo method
@return true if page is page compressed with lzo method*/
-UNIV_INTERN
+UNIV_INLINE
ibool
fil_page_is_lzo_compressed(
/*=======================*/
diff --git a/storage/xtradb/include/fsp0fsp.h b/storage/xtradb/include/fsp0fsp.h
index 9212328f724..551a8c9ef97 100644
--- a/storage/xtradb/include/fsp0fsp.h
+++ b/storage/xtradb/include/fsp0fsp.h
@@ -128,21 +128,20 @@ dictionary */
<< FSP_FLAGS_POS_DATA_DIR)
/** Bit mask of the DATA_DIR field */
#define FSP_FLAGS_MASK_DATA_DIR_ORACLE \
- ((~(~0 << FSP_FLAGS_WIDTH_DATA_DIR)) \
+ ((~(~0U << FSP_FLAGS_WIDTH_DATA_DIR)) \
<< FSP_FLAGS_POS_DATA_DIR_ORACLE)
/** Bit mask of the PAGE_COMPRESSION field */
-#define FSP_FLAGS_MASK_PAGE_COMPRESSION \
- ((~(~0 << FSP_FLAGS_WIDTH_PAGE_COMPRESSION)) \
+#define FSP_FLAGS_MASK_PAGE_COMPRESSION \
+ ((~(~0U << FSP_FLAGS_WIDTH_PAGE_COMPRESSION)) \
<< FSP_FLAGS_POS_PAGE_COMPRESSION)
/** Bit mask of the PAGE_COMPRESSION_LEVEL field */
-#define FSP_FLAGS_MASK_PAGE_COMPRESSION_LEVEL \
- ((~(~0 << FSP_FLAGS_WIDTH_PAGE_COMPRESSION_LEVEL)) \
+#define FSP_FLAGS_MASK_PAGE_COMPRESSION_LEVEL \
+ ((~(~0U << FSP_FLAGS_WIDTH_PAGE_COMPRESSION_LEVEL)) \
<< FSP_FLAGS_POS_PAGE_COMPRESSION_LEVEL)
/** Bit mask of the ATOMIC_WRITES field */
-#define FSP_FLAGS_MASK_ATOMIC_WRITES \
- ((~(~0 << FSP_FLAGS_WIDTH_ATOMIC_WRITES)) \
+#define FSP_FLAGS_MASK_ATOMIC_WRITES \
+ ((~(~0U << FSP_FLAGS_WIDTH_ATOMIC_WRITES)) \
<< FSP_FLAGS_POS_ATOMIC_WRITES)
-
/** Return the value of the POST_ANTELOPE field */
#define FSP_FLAGS_GET_POST_ANTELOPE(flags) \
((flags & FSP_FLAGS_MASK_POST_ANTELOPE) \
diff --git a/storage/xtradb/include/page0page.ic b/storage/xtradb/include/page0page.ic
index efa5e855eb7..5cf92fd5d8d 100644
--- a/storage/xtradb/include/page0page.ic
+++ b/storage/xtradb/include/page0page.ic
@@ -275,9 +275,6 @@ page_is_leaf(
/*=========*/
const page_t* page) /*!< in: page */
{
- if (!page) {
- return(FALSE);
- }
return(!*(const uint16*) (page + (PAGE_HEADER + PAGE_LEVEL)));
}
diff --git a/storage/xtradb/page/page0zip.cc b/storage/xtradb/page/page0zip.cc
index 63d6fe225c2..04340c0f3d2 100644
--- a/storage/xtradb/page/page0zip.cc
+++ b/storage/xtradb/page/page0zip.cc
@@ -1250,10 +1250,6 @@ page_zip_compress(
anytime. */
my_bool cmp_per_index_enabled = srv_cmp_per_index_enabled;
- if (!page) {
- return(FALSE);
- }
-
ut_a(page_is_comp(page));
ut_a(fil_page_get_type(page) == FIL_PAGE_INDEX);
ut_ad(page_simple_validate_new((page_t*) page));
diff --git a/storage/xtradb/row/row0merge.cc b/storage/xtradb/row/row0merge.cc
index b803a0d76c4..f46da173eaa 100644
--- a/storage/xtradb/row/row0merge.cc
+++ b/storage/xtradb/row/row0merge.cc
@@ -4189,9 +4189,10 @@ wait_again:
(total_static_cost + total_dynamic_cost)
* PCT_COST_MERGESORT_INDEX * 100;
- bufend = innobase_convert_name(buf, sizeof buf,
+ bufend = innobase_convert_name(
+ buf, sizeof buf,
indexes[i]->name, strlen(indexes[i]->name),
- trx ? trx->mysql_thd : NULL,
+ trx->mysql_thd,
FALSE);
buf[bufend - buf]='\0';
diff --git a/storage/xtradb/row/row0upd.cc b/storage/xtradb/row/row0upd.cc
index d1a23748aa1..69206efd530 100644
--- a/storage/xtradb/row/row0upd.cc
+++ b/storage/xtradb/row/row0upd.cc
@@ -2822,9 +2822,6 @@ row_upd(
{
dberr_t err = DB_SUCCESS;
- ut_ad(node != NULL);
- ut_ad(thr != NULL);
-
if (UNIV_LIKELY(node->in_mysql_interface)) {
/* We do not get the cmpl_info value from the MySQL
diff --git a/storage/xtradb/sync/sync0sync.cc b/storage/xtradb/sync/sync0sync.cc
index 7458a052224..5c4b45eb3c0 100644
--- a/storage/xtradb/sync/sync0sync.cc
+++ b/storage/xtradb/sync/sync0sync.cc
@@ -223,9 +223,6 @@ UNIV_INTERN mysql_pfs_key_t mutex_list_mutex_key;
/** Latching order checks start when this is set TRUE */
UNIV_INTERN ibool sync_order_checks_on = FALSE;
-/** Number of slots reserved for each OS thread in the sync level array */
-static const ulint SYNC_THREAD_N_LEVELS = 10000;
-
/** Array for tracking sync levels per thread. */
typedef std::vector<sync_level_t> sync_arr_t;