MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
table_ews_global_by_event_name.h
Go to the documentation of this file.
1 /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
15 
16 #ifndef TABLE_EWS_GLOBAL_BY_EVENT_NAME_H
17 #define TABLE_EWS_GLOBAL_BY_EVENT_NAME_H
18 
24 #include "pfs_column_types.h"
25 #include "pfs_engine_table.h"
26 #include "pfs_instr_class.h"
27 #include "pfs_instr.h"
28 #include "table_helper.h"
29 
40 {
45 };
46 
55 {
57  : PFS_double_index(FIRST_VIEW, 1)
58  {}
59 
60  inline void reset(void)
61  {
62  m_index_1= FIRST_VIEW;
63  m_index_2= 1;
64  }
65 
66  inline bool has_more_view(void)
67  { return (m_index_1 <= LAST_VIEW); }
68 
69  inline void next_view(void)
70  {
71  m_index_1++;
72  m_index_2= 1;
73  }
74 };
75 
78 {
79 public:
82  static PFS_engine_table* create();
83  static int delete_all_rows();
84 
85  virtual int rnd_next();
86  virtual int rnd_pos(const void *pos);
87  virtual void reset_position(void);
88 
89 protected:
90  virtual int read_row_values(TABLE *table,
91  unsigned char *buf,
92  Field **fields,
93  bool read_all);
94 
96 
97 public:
99  {}
100 
101 protected:
102  void make_mutex_row(PFS_mutex_class *klass);
103  void make_rwlock_row(PFS_rwlock_class *klass);
104  void make_cond_row(PFS_cond_class *klass);
105  void make_file_row(PFS_file_class *klass);
106  void make_table_io_row(PFS_instr_class *klass);
107  void make_table_lock_row(PFS_instr_class *klass);
108  void make_socket_row(PFS_socket_class *klass);
109  void make_idle_row(PFS_instr_class *klass);
110 
111 private:
113  static THR_LOCK m_table_lock;
115  static TABLE_FIELD_DEF m_field_def;
116 
120  bool m_row_exists;
124  pos_ews_global_by_event_name m_next_pos;
125 };
126 
128 #endif