~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/message/cache.h

  • Committer: Stewart Smith
  • Author(s): Vasil Dimov, Stewart Smith
  • Date: 2010-12-20 02:24:00 UTC
  • mto: (2021.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2022.
  • Revision ID: stewart@flamingspork.com-20101220022400-0p9lvvppwgaowdju
Merge Revision revid:vasil.dimov@oracle.com-20101102165720-164z3666y3tut4c2 from MySQL InnoDB

Original revid:vasil.dimov@oracle.com-20101102165720-164z3666y3tut4c2

Original Authors: Vasil Dimov <vasil.dimov@oracle.com>
Original commit message:
Fix Bug#53046 dict_update_statistics_low can still be run concurrently on same table

Replace the array of mutexes that used to protect
dict_index_t::stat_n_diff_key_vals[] with an array of rw locks that protects
all the stats related members in dict_table_t and all of its indexes.

Approved by:    Jimmy (rb://503)

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include <boost/unordered_map.hpp>
25
25
#include <boost/shared_ptr.hpp>
26
26
 
27
 
#include <drizzled/message.h>
28
 
#include <drizzled/identifier/table.h>
 
27
#include "drizzled/message.h"
 
28
#include "drizzled/identifier/table.h"
29
29
 
30
30
namespace drizzled {
31
31
namespace message {
32
32
 
33
 
typedef boost::unordered_map< drizzled::identifier::Table::Key, drizzled::message::table::shared_ptr> Map;
 
33
typedef boost::unordered_map< drizzled::TableIdentifier::Key, drizzled::message::table::shared_ptr> Map;
34
34
 
35
35
class Cache
36
36
{
55
55
    cache.rehash(arg);
56
56
  }
57
57
 
58
 
  drizzled::message::table::shared_ptr find(const identifier::Table &identifier);
59
 
  void erase(const identifier::Table &identifier);
60
 
  bool insert(const identifier::Table &identifier, drizzled::message::table::shared_ptr share);
61
 
  bool insert(const identifier::Table &identifier, message::Table &share);
 
58
  drizzled::message::table::shared_ptr find(const TableIdentifier &identifier);
 
59
  void erase(const TableIdentifier &identifier);
 
60
  bool insert(const TableIdentifier &identifier, drizzled::message::table::shared_ptr share);
 
61
  bool insert(const TableIdentifier &identifier, message::Table &share);
62
62
};
63
63
 
64
64
} /* namespace message */