MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NdbInfoScanOperation.hpp
1 /*
2  Copyright 2009, 2010 Sun Microsystems, Inc.
3  All rights reserved. Use is subject to license terms.
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; version 2 of the License.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #ifndef NDBINFOSCANOPERATION_H
20 #define NDBINFOSCANOPERATION_H
21 
23 public:
24  int readTuples();
25  const class NdbInfoRecAttr* getValue(const char * anAttrName);
26  const class NdbInfoRecAttr* getValue(Uint32 anAttrId);
27  int execute();
28  int nextResult();
29 protected:
30  friend class NdbInfo;
33  const NdbInfo::Table*,
34  Uint32 max_rows, Uint32 max_bytes);
35  bool init(Uint32 id);
37  void close();
38 private:
39  bool execDBINFO_TRANSID_AI(const struct SimpleSignal * signal);
40  bool execDBINFO_SCANCONF(const struct SimpleSignal * signal);
41  bool execDBINFO_SCANREF(const struct SimpleSignal * signal, int& error_code);
42  int sendDBINFO_SCANREQ();
43 
44  int receive(void);
45  bool find_next_node();
46 
47  struct NdbInfoScanOperationImpl& m_impl;
48  const NdbInfo& m_info;
49  enum State { Undefined, Initial, Prepared,
50  MoreData, End, Error } m_state;
51  class Ndb_cluster_connection* m_connection;
52  class SignalSender* m_signal_sender;
53  const NdbInfo::Table* m_table;
54  Vector<NdbInfoRecAttr*> m_recAttrs;
55  Vector<Uint32> m_cursor;
56  Uint32 m_node_id;
57  Uint32 m_transid0;
58  Uint32 m_transid1;
59  Uint32 m_result_ref;
60  Uint32 m_max_rows;
61  Uint32 m_max_bytes;
62  Uint32 m_result_data;
63  Uint32 m_rows_received;
64  Uint32 m_rows_confirmed;
65  Uint32 m_nodes; // Number of nodes scanned
66  Uint32 m_max_nodes; // Max number of nodes to scan
67 };
68 
69 
70 #endif