~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/information_engine/information_engine.h

  • Committer: Brian Aker
  • Date: 2009-11-30 19:13:19 UTC
  • mfrom: (1225.1.39 figure)
  • Revision ID: brian@gaz-20091130191319-zyt51fidacic3brf
Merge Padraig

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2005 MySQL AB
2
 
 
3
 
  This program is free software; you can redistribute it and/or modify
4
 
  it under the terms of the GNU General Public License as published by
5
 
  the Free Software Foundation; version 2 of the License.
6
 
 
7
 
  This program is distributed in the hope that it will be useful,
8
 
  but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
 
  GNU General Public License for more details.
11
 
 
12
 
  You should have received a copy of the GNU General Public License
13
 
  along with this program; if not, write to the Free Software
14
 
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
 
 
 
1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
 
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
 
3
 *
 
4
 *  Copyright (C) 2009 Sun Microsystems
 
5
 *
 
6
 *  This program is free software; you can redistribute it and/or modify
 
7
 *  it under the terms of the GNU General Public License as published by
 
8
 *  the Free Software Foundation; either version 2 of the License, or
 
9
 *  (at your option) any later version.
 
10
 *
 
11
 *  This program is distributed in the hope that it will be useful,
 
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 *  GNU General Public License for more details.
 
15
 *
 
16
 *  You should have received a copy of the GNU General Public License
 
17
 *  along with this program; if not, write to the Free Software
 
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
19
 */
16
20
 
17
21
#ifndef PLUGIN_INFORMATION_ENGINE_INFORMATION_ENGINE_H
18
22
#define PLUGIN_INFORMATION_ENGINE_INFORMATION_ENGINE_H
33
37
    : drizzled::plugin::StorageEngine(name_arg,
34
38
                                      HTON_ALTER_NOT_SUPPORTED |
35
39
                                      HTON_HIDDEN |
36
 
                                      HTON_NOT_USER_SELECTABLE |
37
40
                                      HTON_TEMPORARY_NOT_SUPPORTED)
38
41
  {
39
42
    pthread_mutex_init(&mutex, NULL);
61
64
    Share(const std::string &in_name) :
62
65
      count(1)
63
66
    {
 
67
      table= drizzled::plugin::InfoSchemaTable::getTable(in_name.c_str());
 
68
    }
 
69
 
 
70
    ~Share()  {}
 
71
 
 
72
    void initThreadLock()
 
73
    {
64
74
      thr_lock_init(&lock);
65
 
      table= drizzled::plugin::InfoSchemaTable::getTable(in_name.c_str());
66
75
    }
67
76
 
68
 
    ~Share() 
 
77
    void deinitThreadLock()
69
78
    {
70
79
      thr_lock_delete(&lock);
71
80
    }
107
116
    }
108
117
 
109
118
    /**
 
119
     * Set the I_S table associated with this share.
 
120
     * @param[in] name the name of the I_S table
 
121
     */
 
122
    void setInfoSchemaTable(const std::string &name)
 
123
    {
 
124
      table= drizzled::plugin::InfoSchemaTable::getTable(name.c_str());
 
125
    }
 
126
 
 
127
    /**
110
128
     * @return the I_S table associated with this share.
111
 
   */
 
129
     */
112
130
    drizzled::plugin::InfoSchemaTable *getInfoSchemaTable()
113
131
    {
114
132
      return table;