~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to plugin/myisam/ha_myisam.cc

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-06-19 10:46:49 UTC
  • mfrom: (1.1.6)
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20120619104649-e2l0ggd4oz3um0f4
Tags: upstream-7.1.36-stable
ImportĀ upstreamĀ versionĀ 7.1.36-stable

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#include <drizzled/table.h>
34
34
#include <drizzled/memory/multi_malloc.h>
35
35
#include <drizzled/plugin/daemon.h>
36
 
 
 
36
#include <drizzled/session/table_messages.h>
37
37
#include <drizzled/plugin/storage_engine.h>
38
38
#include <drizzled/key.h>
 
39
#include <drizzled/statistics_variables.h>
 
40
#include <drizzled/system_variables.h>
39
41
 
40
42
#include <boost/algorithm/string.hpp>
41
43
#include <boost/scoped_ptr.hpp>
58
60
boost::mutex THR_LOCK_myisam;
59
61
 
60
62
static uint32_t myisam_key_cache_block_size= KEY_CACHE_BLOCK_SIZE;
61
 
static uint32_t myisam_key_cache_size;
62
 
static uint32_t myisam_key_cache_division_limit;
63
 
static uint32_t myisam_key_cache_age_threshold;
64
63
static uint64_t max_sort_file_size;
65
64
typedef constrained_check<size_t, SIZE_MAX, 1024, 1024> sort_buffer_constraint;
66
65
static sort_buffer_constraint sort_buffer_size;
67
66
 
68
 
void st_mi_isam_share::setKeyCache()
69
 
{
70
 
  (void)init_key_cache(&key_cache,
71
 
                       myisam_key_cache_block_size,
72
 
                       myisam_key_cache_size,
73
 
                       myisam_key_cache_division_limit, 
74
 
                       myisam_key_cache_age_threshold);
75
 
}
76
 
 
77
67
/*****************************************************************************
78
68
** MyISAM tables
79
69
*****************************************************************************/
86
76
 
87
77
class MyisamEngine : public plugin::StorageEngine
88
78
{
89
 
  MyisamEngine();
90
 
  MyisamEngine(const MyisamEngine&);
91
 
  MyisamEngine& operator=(const MyisamEngine&);
92
79
public:
93
80
  explicit MyisamEngine(string name_arg) :
94
81
    plugin::StorageEngine(name_arg,
146
133
 
147
134
  void doGetTableIdentifiers(drizzled::CachedDirectory &directory,
148
135
                             const drizzled::identifier::Schema &schema_identifier,
149
 
                             drizzled::identifier::Table::vector &set_of_identifiers);
 
136
                             drizzled::identifier::table::vector &set_of_identifiers);
150
137
  bool validateCreateTableOption(const std::string &key, const std::string &state)
151
138
  {
152
139
    (void)state;
161
148
 
162
149
void MyisamEngine::doGetTableIdentifiers(drizzled::CachedDirectory&,
163
150
                                         const drizzled::identifier::Schema&,
164
 
                                         drizzled::identifier::Table::vector&)
 
151
                                         drizzled::identifier::table::vector&)
165
152
{
166
153
}
167
154
 
1524
1511
DRIZZLE_DECLARE_PLUGIN
1525
1512
{
1526
1513
  DRIZZLE_VERSION_ID,
1527
 
  "MyISAM",
 
1514
  "myisam",
1528
1515
  "2.0",
1529
1516
  "MySQL AB",
1530
 
  "Default engine as of MySQL 3.23 with great performance",
 
1517
  N_("MyISAM storage engine: non-transactional, legacy, deprecated"),
1531
1518
  PLUGIN_LICENSE_GPL,
1532
 
  myisam_init, /* Plugin Init */
1533
 
  NULL,           /* depends */
1534
 
  init_options                        /* config options                  */
 
1519
  myisam_init,
 
1520
  NULL,
 
1521
  init_options
1535
1522
}
1536
1523
DRIZZLE_DECLARE_PLUGIN_END;