Skip to content

Commit 5ded88e

Browse files
vaintroubvuvova
authored andcommitted
Remove incorrect narrowing size_t->ulong casts. Fix printf format error.
1 parent 4c2c1e6 commit 5ded88e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

storage/innobase/handler/ha_innodb.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3731,7 +3731,7 @@ static void innodb_buffer_pool_size_init()
37313731
{
37323732
/* Size unit of buffer pool is larger than srv_buf_pool_size.
37333733
adjust srv_buf_pool_chunk_unit for srv_buf_pool_size. */
3734-
srv_buf_pool_chunk_unit = ulong(srv_buf_pool_size);
3734+
srv_buf_pool_chunk_unit = srv_buf_pool_size;
37353735
}
37363736
else if (srv_buf_pool_chunk_unit == 0)
37373737
{
@@ -20817,7 +20817,7 @@ innodb_buffer_pool_size_validate(
2081720817
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
2081820818
ER_WRONG_ARGUMENTS,
2081920819
"innodb_buffer_pool_size must be at least"
20820-
" innodb_buffer_pool_chunk_size=%lu",
20820+
" innodb_buffer_pool_chunk_size=%zu",
2082120821
srv_buf_pool_chunk_unit);
2082220822
/* nothing to do */
2082320823
return(0);
@@ -21162,12 +21162,12 @@ ulint
2116221162
buf_pool_size_align(
2116321163
ulint size)
2116421164
{
21165-
const ulong m = srv_buf_pool_chunk_unit;
21166-
size = ut_max((size_t) size, (size_t) MYSQL_SYSVAR_NAME(buffer_pool_size).min_val);
21165+
const size_t m = srv_buf_pool_chunk_unit;
21166+
size = ut_max(size, (size_t) MYSQL_SYSVAR_NAME(buffer_pool_size).min_val);
2116721167

2116821168
if (size % m == 0) {
2116921169
return(size);
2117021170
} else {
21171-
return (ulint)((size / m + 1) * m);
21171+
return (size / m + 1) * m;
2117221172
}
2117321173
}

0 commit comments

Comments
 (0)