Commit 48ac7e1a authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-24609: innodb_io_capacity can exceed innodb_io_capacity_max

innodb_io_capacity_update(): When the requested innodb_io_capacity
exceeds innodb_io_capacity_max and is more than half the maximum,
do not double it for computing innodb_io_capacity_max.

This integer arithmetics overflow was introduced in
commit 0f322994 (MDEV-7035).

No test case is added, because sizeof(ulong) varies between platforms.
parent 959dfac4
......@@ -17532,7 +17532,8 @@ innodb_io_capacity_update(
" higher than innodb_io_capacity_max %lu",
in_val, srv_max_io_capacity);
srv_max_io_capacity = in_val * 2;
srv_max_io_capacity = (in_val & ~(~0UL >> 1))
? in_val : in_val * 2;
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
ER_WRONG_ARGUMENTS,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment