summaryrefslogtreecommitdiff
path: root/storage/innobase
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase')
-rw-r--r--storage/innobase/btr/btr0cur.cc2
-rw-r--r--storage/innobase/btr/btr0defragment.cc2
-rw-r--r--storage/innobase/buf/buf0flu.cc8
-rw-r--r--storage/innobase/fil/fil0crypt.cc8
-rw-r--r--storage/innobase/handler/ha_innodb.cc2
-rw-r--r--storage/innobase/lock/lock0lock.cc4
-rw-r--r--storage/innobase/log/log0crypt.cc4
-rw-r--r--storage/innobase/os/os0file.cc4
-rw-r--r--storage/innobase/row/row0merge.cc14
9 files changed, 24 insertions, 24 deletions
diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc
index a6bb258344f..3b41fcf34fc 100644
--- a/storage/innobase/btr/btr0cur.cc
+++ b/storage/innobase/btr/btr0cur.cc
@@ -4070,7 +4070,7 @@ btr_estimate_number_of_different_key_vals(
*/
if (index->stat_index_size > 1) {
n_sample_pages = (srv_stats_transient_sample_pages < index->stat_index_size) ?
- ut_min(index->stat_index_size,
+ (ulint) ut_min((double) index->stat_index_size,
log2(index->stat_index_size)*srv_stats_transient_sample_pages)
: index->stat_index_size;
diff --git a/storage/innobase/btr/btr0defragment.cc b/storage/innobase/btr/btr0defragment.cc
index 26bab936de5..4d9eab8f2bd 100644
--- a/storage/innobase/btr/btr0defragment.cc
+++ b/storage/innobase/btr/btr0defragment.cc
@@ -151,7 +151,7 @@ void
btr_defragment_init()
{
srv_defragment_interval = ut_microseconds_to_timer(
- 1000000.0 / srv_defragment_frequency);
+ (ulonglong) (1000000.0 / srv_defragment_frequency));
mutex_create(btr_defragment_mutex_key, &btr_defragment_mutex,
SYNC_ANY_LATCH);
os_thread_create(btr_defragment_thread, NULL, NULL);
diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc
index 780230b38ba..30b3b6f4698 100644
--- a/storage/innobase/buf/buf0flu.cc
+++ b/storage/innobase/buf/buf0flu.cc
@@ -2066,7 +2066,7 @@ ulint
af_get_pct_for_dirty()
/*==================*/
{
- ulint dirty_pct = buf_get_modified_ratio_pct();
+ ulint dirty_pct = (ulint) buf_get_modified_ratio_pct();
if (dirty_pct > 0 && srv_max_buf_pool_modified_pct == 0) {
return(100);
@@ -2086,7 +2086,7 @@ af_get_pct_for_dirty()
}
} else if (dirty_pct > srv_max_dirty_pages_pct_lwm) {
/* We should start flushing pages gradually. */
- return((dirty_pct * 100)
+ return (ulint) ((dirty_pct * 100)
/ (srv_max_buf_pool_modified_pct + 1));
}
@@ -2104,8 +2104,8 @@ af_get_pct_for_lsn(
{
lsn_t max_async_age;
lsn_t lsn_age_factor;
- lsn_t af_lwm = (srv_adaptive_flushing_lwm
- * log_get_capacity()) / 100;
+ lsn_t af_lwm = (lsn_t) ((srv_adaptive_flushing_lwm
+ * log_get_capacity()) / 100);
if (age < af_lwm) {
/* No adaptive flushing. */
diff --git a/storage/innobase/fil/fil0crypt.cc b/storage/innobase/fil/fil0crypt.cc
index ceffa950739..2db3063d6b5 100644
--- a/storage/innobase/fil/fil0crypt.cc
+++ b/storage/innobase/fil/fil0crypt.cc
@@ -474,7 +474,7 @@ fil_parse_write_crypt_data(
4 + // size of key_id
1; // fil_encryption_t
- if (end_ptr - ptr < entry_size){
+ if ((uint) (end_ptr - ptr) < entry_size){
return NULL;
}
@@ -500,7 +500,7 @@ fil_parse_write_crypt_data(
fil_encryption_t encryption = (fil_encryption_t)mach_read_from_1(ptr);
ptr +=1;
- if (end_ptr - ptr < len) {
+ if ((uint) (end_ptr - ptr) < len) {
return NULL;
}
@@ -1351,7 +1351,7 @@ fil_crypt_space_needs_rotation(
last_scrub_completed;
bool need_scrubbing =
crypt_data->rotate_state.scrubbing.is_active
- && diff >= srv_background_scrub_data_interval;
+ && diff >= (time_t) srv_background_scrub_data_interval;
if (need_key_rotation == false && need_scrubbing == false)
break;
@@ -2247,7 +2247,7 @@ DECLARE_THREAD(fil_crypt_thread)(
time_t waited = time(0) - wait_start;
- if (waited >= srv_background_scrub_data_check_interval) {
+ if (waited >= (time_t) srv_background_scrub_data_check_interval) {
break;
}
}
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index a7987f1596e..dc4b4487eeb 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -17753,7 +17753,7 @@ innodb_defragment_frequency_update(
{
srv_defragment_frequency = (*static_cast<const uint*>(save));
srv_defragment_interval = ut_microseconds_to_timer(
- 1000000.0 / srv_defragment_frequency);
+ (ulonglong) (1000000.0 / srv_defragment_frequency));
}
/****************************************************************//**
diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc
index bc7ec1d221b..2798cf00d1f 100644
--- a/storage/innobase/lock/lock0lock.cc
+++ b/storage/innobase/lock/lock0lock.cc
@@ -2387,7 +2387,7 @@ lock_rec_add_to_queue(
if (wsrep_debug) {
fprintf(stderr,
"BF skipping wait: %lu\n",
- trx->id);
+ (ulong) trx->id);
lock_rec_print(stderr, lock);
}
} else
@@ -4961,7 +4961,7 @@ lock_table_other_has_incompatible(
#ifdef WITH_WSREP
if(wsrep_thd_is_wsrep(trx->mysql_thd)) {
if (wsrep_debug) {
- fprintf(stderr, "WSREP: trx %ld table lock abort\n",
+ fprintf(stderr, "WSREP: trx " TRX_ID_FMT " table lock abort\n",
trx->id);
}
trx_mutex_enter(lock->trx);
diff --git a/storage/innobase/log/log0crypt.cc b/storage/innobase/log/log0crypt.cc
index db2e84d7e45..f518845b1a8 100644
--- a/storage/innobase/log/log0crypt.cc
+++ b/storage/innobase/log/log0crypt.cc
@@ -144,11 +144,11 @@ log_crypt_print_checkpoint_keys(
ib_uint64_t checkpoint_no = log_block_get_checkpoint_no(log_block);
if (crypt_info.size()) {
- fprintf(stderr, "InnoDB: redo log checkpoint: %lu [ chk key ]: ", checkpoint_no);
+ fprintf(stderr, "InnoDB: redo log checkpoint: %lu [ chk key ]: ", (ulong) checkpoint_no);
for (size_t i = 0; i < crypt_info.size(); i++) {
struct crypt_info_t* it = &crypt_info[i];
fprintf(stderr, "[ %lu %u ] ",
- it->checkpoint_no,
+ (ulong) it->checkpoint_no,
it->key_version);
}
fprintf(stderr, "\n");
diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc
index 3a0bd1fc328..5948aadf220 100644
--- a/storage/innobase/os/os0file.cc
+++ b/storage/innobase/os/os0file.cc
@@ -2402,7 +2402,7 @@ os_file_set_size(
fprintf(stderr, "InnoDB: Error: preallocating file "
"space for file \'%s\' failed. Current size "
"%lu, desired size %lu\n",
- name, current_size, size);
+ name, (ulong) current_size, (ulong) size);
os_file_handle_error_no_exit(name, "posix_fallocate", FALSE, __FILE__, __LINE__);
return(FALSE);
@@ -6298,7 +6298,7 @@ os_file_trim(
fprintf(stderr,
" InnoDB: Warning: fallocate call failed with error code %d.\n"
" InnoDB: start: %lu len: %lu payload: %lu\n"
- " InnoDB: Disabling fallocate for now.\n", errno, off, trim_len, len);
+ " InnoDB: Disabling fallocate for now.\n", errno, (ulong) off, (ulong) trim_len, (ulong) len);
os_file_handle_error_no_exit(slot->name,
" fallocate(FALLOC_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE) ",
diff --git a/storage/innobase/row/row0merge.cc b/storage/innobase/row/row0merge.cc
index 36ae979e965..e8f3ad97c67 100644
--- a/storage/innobase/row/row0merge.cc
+++ b/storage/innobase/row/row0merge.cc
@@ -109,9 +109,9 @@ row_merge_encrypt_buf(
if (! ((rc == MY_AES_OK) && ((ulint)dstlen == srv_sort_buf_size-ROW_MERGE_RESERVE_SIZE))) {
ib_logf(IB_LOG_LEVEL_FATAL,
"Unable to encrypt data-block "
- " src: %p srclen: %lu buf: %p buflen: %d."
+ " src: %p srclen: %lu buf: %p buflen: %u."
" return-code: %d. Can't continue!\n",
- input_buf, (size_t)srv_sort_buf_size,
+ input_buf, (ulong) srv_sort_buf_size,
crypted_buf, dstlen, rc);
ut_error;
}
@@ -153,7 +153,7 @@ row_merge_decrypt_buf(
"Unable to encrypt data-block "
" src: %p srclen: %lu buf: %p buflen: %d."
" return-code: %d. Can't continue!\n",
- input_buf, (size_t)srv_sort_buf_size,
+ input_buf, (ulong) srv_sort_buf_size,
crypted_buf, dstlen, rc);
ut_error;
}
@@ -2067,7 +2067,7 @@ write_buffers:
pct_cost :
((pct_cost * read_rows) / table_total_rows);
/* presenting 10.12% as 1012 integer */
- onlineddl_pct_progress = curr_progress * 100;
+ onlineddl_pct_progress = (ulint) (curr_progress * 100);
}
}
@@ -2603,7 +2603,7 @@ row_merge_sort(
/* Find the number N which 2^N is greater or equal than num_runs */
/* N is merge sort running count */
- total_merge_sort_count = ceil(my_log2f(num_runs));
+ total_merge_sort_count = (ulint) ceil(my_log2f(num_runs));
if(total_merge_sort_count <= 0) {
total_merge_sort_count=1;
}
@@ -2650,7 +2650,7 @@ row_merge_sort(
pct_cost :
((pct_cost * merge_count) / total_merge_sort_count);
/* presenting 10.12% as 1012 integer */;
- onlineddl_pct_progress = (pct_progress + curr_progress) * 100;
+ onlineddl_pct_progress = (ulint) ((pct_progress + curr_progress) * 100);
}
if (error != DB_SUCCESS) {
@@ -2933,7 +2933,7 @@ row_merge_insert_index_tuples(
((pct_cost * inserted_rows) / table_total_rows);
/* presenting 10.12% as 1012 integer */;
- onlineddl_pct_progress = (pct_progress + curr_progress) * 100;
+ onlineddl_pct_progress = (ulint) ((pct_progress + curr_progress) * 100);
}
}
}