mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 06:44:16 +01:00
branches/zip:
Fix a bug in manipulating the variable innodb_old_blocks_pct: for any value assigned it got that value -1, except for 75. When assigned 75, it got 75. mysql> set global innodb_old_blocks_pct=15; Query OK, 0 rows affected (0.00 sec) mysql> show variables like 'innodb_old_blocks_pct'; +-----------------------+-------+ | Variable_name | Value | +-----------------------+-------+ | innodb_old_blocks_pct | 14 | +-----------------------+-------+ 1 row in set (0.00 sec) mysql> set global innodb_old_blocks_pct=75; Query OK, 0 rows affected (0.00 sec) mysql> show variables like 'innodb_old_blocks_pct'; +-----------------------+-------+ | Variable_name | Value | +-----------------------+-------+ | innodb_old_blocks_pct | 75 | +-----------------------+-------+ After the fix it gets exactly what was assigned. Approved by: Marko (via IM)
This commit is contained in:
parent
944431f027
commit
549e764431
1 changed files with 3 additions and 1 deletions
|
@ -1866,7 +1866,9 @@ buf_LRU_old_ratio_update(
|
|||
buf_LRU_old_ratio = ratio;
|
||||
}
|
||||
|
||||
return(ratio * 100 / BUF_LRU_OLD_RATIO_DIV);
|
||||
/* the reverse of
|
||||
ratio = old_pct * BUF_LRU_OLD_RATIO_DIV / 100 */
|
||||
return((uint) (ratio * 100 / (double) BUF_LRU_OLD_RATIO_DIV + 0.5));
|
||||
}
|
||||
|
||||
/********************************************************************//**
|
||||
|
|
Loading…
Add table
Reference in a new issue