Commit 549e7644 authored by vasil's avatar vasil

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)
parent 944431f0
......@@ -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));
}
/********************************************************************//**
......
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