MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cursor_by_thread_connect_attr.h
1 /* Copyright (c) 2012, 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 Foundation,
14  51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
15 
16 #ifndef CURSOR_BY_THREAD_CONNECT_ATTR_H
17 #define CURSOR_BY_THREAD_CONNECT_ATTR_H
18 
19 #include "pfs_column_types.h"
20 #include "pfs_engine_table.h"
21 #include "pfs_instr.h"
22 
29 : public PFS_double_index
30 {
32  : PFS_double_index(0, 0)
33  {}
34 
35  inline bool has_more_thread(void)
36  {
37  return (m_index_1 < thread_max);
38  }
39 
40  inline void next_thread(void)
41  {
42  m_index_1++;
43  m_index_2= 0;
44  }
45 
46  inline void reset(void)
47  {
48  m_index_1= 0;
49  m_index_2= 0;
50  }
51 };
52 
55 {
56 public:
57  virtual int rnd_next();
58  virtual int rnd_pos(const void *pos);
59  virtual void reset_position(void);
60 
61 protected:
63 
64 public:
66  {}
67 
68 protected:
69  virtual void make_row(PFS_thread *thread, uint ordinal)= 0;
72 
73 private:
78 };
79 
81 #endif