diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-04-28 16:28:30 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-04-28 20:45:39 +0300 |
commit | e37df0f95a3b216c8cdecb5cacb360037dc631c3 (patch) | |
tree | e4c5fe8aa92c3e2e90291f9df41b7df680c47aaf | |
parent | 1292a01c7fe6394e0bd04d92bea6038586b63d9c (diff) | |
download | mariadb-git-e37df0f95a3b216c8cdecb5cacb360037dc631c3.tar.gz |
Fix some -Wsign-conversion
-rw-r--r-- | storage/innobase/ha/ha0ha.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/storage/innobase/ha/ha0ha.cc b/storage/innobase/ha/ha0ha.cc index da542d4f742..f5d1a9db831 100644 --- a/storage/innobase/ha/ha0ha.cc +++ b/storage/innobase/ha/ha0ha.cc @@ -192,7 +192,7 @@ ha_clear( #ifdef BTR_CUR_HASH_ADAPT # if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG /** Maximum number of records in a page */ -static const lint MAX_N_POINTERS +static const ulint MAX_N_POINTERS = UNIV_PAGE_SIZE_MAX / REC_N_NEW_EXTRA_BYTES; # endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ @@ -242,8 +242,8 @@ ha_insert_for_fold_func( buf_block_t* prev_block = prev_node->block; ut_a(prev_block->frame == page_align(prev_node->data)); - ut_a(my_atomic_addlint( - &prev_block->n_pointers, -1) + ut_a(my_atomic_addlint(&prev_block->n_pointers, + ulint(-1)) < MAX_N_POINTERS); ut_a(my_atomic_addlint(&block->n_pointers, 1) < MAX_N_POINTERS); @@ -339,7 +339,7 @@ ha_delete_hash_node( #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG if (table->adaptive) { ut_a(del_node->block->frame = page_align(del_node->data)); - ut_a(my_atomic_addlint(&del_node->block->n_pointers, -1) + ut_a(my_atomic_addlint(&del_node->block->n_pointers, ulint(-1)) < MAX_N_POINTERS); } #endif /* UNIV_AHI_DEBUG || UNIV_DEBUG */ @@ -382,7 +382,8 @@ ha_search_and_update_if_found_func( if (node) { #if defined UNIV_AHI_DEBUG || defined UNIV_DEBUG if (table->adaptive) { - ut_a(my_atomic_addlint(&node->block->n_pointers, -1) + ut_a(my_atomic_addlint(&node->block->n_pointers, + ulint(-1)) < MAX_N_POINTERS); ut_a(my_atomic_addlint(&new_block->n_pointers, 1) < MAX_N_POINTERS); |