~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/handler/data_dictionary.h

  • Committer: Brian Aker
  • Date: 2010-02-11 22:56:25 UTC
  • Revision ID: brian@gaz-20100211225625-63v3e79p78blva2u
Remove WEIGHT_STRING() from parser (where it does not belong). If someone
wants to they can reimplement this as a straight function.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 
 *
4
 
 *  Copyright (C) 2010 Joseph Daly <skinny.moey@gmail.com> 
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
 
 */
20
 
 
21
 
#ifndef PLUGIN_INNOBASE_HANDLER_DATA_DICTIONARY_H
22
 
#define PLUGIN_INNOBASE_HANDLER_DATA_DICTIONARY_H 
23
 
 
24
 
#include "drizzled/plugin/table_function.h"
25
 
#include "drizzled/field.h"
26
 
 
27
 
class CmpTool : public drizzled::plugin::TableFunction
28
 
{
29
 
public:
30
 
 
31
 
  CmpTool(bool reset);
32
 
 
33
 
  class Generator : public drizzled::plugin::TableFunction::Generator
34
 
  {
35
 
  public:
36
 
    Generator(drizzled::Field **arg, bool outer_reset);
37
 
                        
38
 
    bool populate();
39
 
  private:
40
 
    uint32_t record_number;
41
 
    bool inner_reset;
42
 
  };
43
 
 
44
 
  Generator *generator(drizzled::Field **arg)
45
 
  {
46
 
    return new Generator(arg, outer_reset);
47
 
  }
48
 
private:
49
 
  bool outer_reset; 
50
 
};
51
 
 
52
 
class CmpmemTool : public drizzled::plugin::TableFunction
53
 
{
54
 
public:
55
 
 
56
 
  CmpmemTool(bool reset);
57
 
 
58
 
  class Generator : public drizzled::plugin::TableFunction::Generator
59
 
  {
60
 
  public:
61
 
    Generator(drizzled::Field **arg, bool outer_reset);
62
 
 
63
 
    ~Generator();
64
 
 
65
 
    bool populate();
66
 
  private:
67
 
    uint32_t record_number;
68
 
    bool inner_reset;
69
 
  };
70
 
 
71
 
  Generator *generator(drizzled::Field **arg)
72
 
  {
73
 
    return new Generator(arg, outer_reset);
74
 
  }
75
 
private:
76
 
  bool outer_reset;
77
 
};
78
 
 
79
 
class InnodbTrxTool : public drizzled::plugin::TableFunction
80
 
{
81
 
public:
82
 
 
83
 
  InnodbTrxTool(const char* in_table_name);
84
 
 
85
 
  class Generator : public drizzled::plugin::TableFunction::Generator
86
 
  {
87
 
  public:
88
 
    Generator(drizzled::Field **arg, const char* in_table_name);
89
 
 
90
 
    ~Generator();
91
 
 
92
 
    bool populate();
93
 
  private:
94
 
    void populate_innodb_trx();
95
 
    void populate_innodb_locks();
96
 
    void populate_innodb_lock_waits();
97
 
 
98
 
  private:
99
 
    uint32_t record_number;
100
 
    uint32_t number_rows;
101
 
    const char* table_name;
102
 
  };
103
 
 
104
 
  Generator *generator(drizzled::Field **arg)
105
 
  {
106
 
    return new Generator(arg, table_name);
107
 
  }
108
 
private:
109
 
  const char* table_name;
110
 
};
111
 
 
112
 
#endif /* PLUGIN_INNOBASE_HANDLER_DATA_DICTIONARY_H */