mariadb/storage
Inaam Rana 358a31df43 Bug#11759044 - 51325: DROPPING AN EMPTY INNODB TABLE TAKES A LONG TIME
WITH LARGE BUFFER POOL

(Note: this a backport of revno:3472 from mysql-trunk)

rb://845
approved by: Marko

  When dropping a table (with an .ibd file i.e.: with
  innodb_file_per_table set) we scan entire LRU to invalidate pages from
  that table. This can be painful in case of large buffer pools as we hold
  the buf_pool->mutex for the scan. Note that gravity of the problem does
  not depend on the size of the table. Even with an empty table but a
  large and filled up buffer pool we'll end up scanning a very long LRU
  list.
  
  The fix is to scan flush_list and just remove the blocks belonging to
  the table from the flush_list, marking them as non-dirty. The blocks
  are left in the LRU list for eventual eviction due to aging. The
  flush_list is typically much smaller than the LRU list but for cases
  where it is very long we have the solution of releasing the
  buf_pool->mutex after scanning 1K pages.
  
  buf_page_[set|unset]_sticky(): Use new IO-state BUF_IO_PIN to ensure
  that a block stays in the flush_list and LRU list when we release
  buf_pool->mutex. Previously we have been abusing BUF_IO_READ to achieve
  this.
2011-12-07 09:12:53 -05:00
..
archive BUG#11751793 - 42784: Merge from mysql-5.1 to mysql-5.5 2011-11-23 18:50:29 +05:30
blackhole Merging into mysql-5.5.16-release. 2011-08-15 20:12:11 +02:00
csv Merging into mysql-5.5.16-release. 2011-08-15 20:12:11 +02:00
example Merging into mysql-5.5.16-release. 2011-08-15 20:12:11 +02:00
federated Bug #11750417 40942: UNABLE TO INSTALL FEDERATED PLUGIN 2011-09-05 14:38:20 +02:00
heap Bug#11759349 -- Merge of patch from mysql-5.1. 2011-09-27 17:44:31 +05:30
innobase Bug#11759044 - 51325: DROPPING AN EMPTY INNODB TABLE TAKES A LONG TIME 2011-12-07 09:12:53 -05:00
myisam Merge of patch for bug#11756764 from mysql-5.1. 2011-11-29 19:31:51 +05:30
myisammrg Merging into mysql-5.5.16-release. 2011-08-15 20:12:11 +02:00
ndb Merge from mysql-5.5.14-release 2011-07-06 01:13:50 +02:00
perfschema Merging into mysql-5.5.16-release. 2011-08-15 20:12:11 +02:00