~maria-captains/maria/5.1

Viewing all changes in revision 2502.1137.146.

  • Committer: Marko Mäkelä
  • Date: 2012-02-28 12:00:00 UTC
  • mto: (2502.1194.1 mysql-5.1.64-release)
  • mto: This revision was merged to the branch mainline in revision 3149.
  • Revision ID: marko.makela@oracle.com-20120228120000-cx2hdxo07411fa9e
Bug#12861864 RACE CONDITION IN BTR_GET_SIZE() AND DROP INDEX/TABLE/DATABASE
also filed as Bug#13146269, Bug#13713178

btr_get_size(): Add mtr_t parameter. Require that the caller S-latches
index->lock. If index->page==FIL_NULL or the index is to be dropped,
return ULINT_UNDEFINED to indicate that the statistics are
unavailable.

dict_update_statistics(): If btr_get_size() returns ULINT_UNDEFINED,
fake the index cardinality statistics.

dict_index_set_page(): Unused function, remove.

row_drop_table_for_mysql(): Before starting to drop the table, mark
the indexes unavailable in the data dictionary cache while holding
index->lock X-latch.

ha_innobase::prepare_drop_index(), ha_innobase::final_drop_index():
When setting index->to_be_dropped, acquire the index->lock X-latch.

rb:960 approved by Jimmy Yang

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: