~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/mysql_protocol/mysql_protocol.h

  • Committer: Mark Atwood
  • Date: 2011-06-14 19:30:31 UTC
  • mfrom: (2318.2.41 refactor5)
  • Revision ID: me@mark.atwood.name-20110614193031-lwbrlwfgf6id4r8b
merge lp:~olafvdspek/drizzle/refactor6
 with resolved conflict in drizzled/plugin/client.h

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
 
48
48
class ListenMySQLProtocol: public drizzled::plugin::ListenTcp
49
49
{
50
 
protected:
51
 
  const std::string _hostname;
52
 
  bool _using_mysql41_protocol;
53
 
 
54
50
public:
55
 
  ListenMySQLProtocol(std::string name,
56
 
                      const std::string &hostname,
57
 
                      bool using_mysql41_protocol):
 
51
  ListenMySQLProtocol(std::string name, const std::string &hostname) :
58
52
   drizzled::plugin::ListenTcp(name),
59
 
   _hostname(hostname),
60
 
   _using_mysql41_protocol(using_mysql41_protocol)
 
53
   _hostname(hostname)
61
54
  { }
62
55
  virtual const std::string getHost() const;
63
56
  virtual in_port_t getPort() const;
65
58
  static ProtocolCounters mysql_counters;
66
59
  virtual ProtocolCounters& getCounters() const { return mysql_counters; }
67
60
  void addCountersToTable();
 
61
protected:
 
62
  const std::string _hostname;
68
63
};
69
64
 
70
65
class ClientMySQLProtocol: public drizzled::plugin::Client
73
68
  NET net;
74
69
  drizzled::String packet;
75
70
  uint32_t client_capabilities;
76
 
  bool _using_mysql41_protocol;
77
71
  bool _is_interactive;
78
72
 
79
73
  bool checkConnection();
83
77
  void makeScramble(char *scramble);
84
78
 
85
79
public:
86
 
  ClientMySQLProtocol(int fd, bool _using_mysql41_protocol, ProtocolCounters&);
 
80
  ClientMySQLProtocol(int fd, ProtocolCounters&);
87
81
  virtual ~ClientMySQLProtocol();
88
82
 
89
83
  bool isInteractive() const
93
87
 
94
88
  ProtocolCounters& counters;
95
89
 
96
 
  virtual int getFileDescriptor(void);
 
90
  virtual int getFileDescriptor();
97
91
  virtual bool isConnected();
98
 
  virtual bool isReading(void);
99
 
  virtual bool isWriting(void);
100
 
  virtual bool flush(void);
101
 
  virtual void close(void);
 
92
  virtual bool flush();
 
93
  virtual void close();
102
94
 
103
 
  virtual bool authenticate(void);
 
95
  virtual bool authenticate();
104
96
  virtual bool readCommand(char **packet, uint32_t& packet_length);
105
97
 
106
 
  virtual void sendOK(void);
107
 
  virtual void sendEOF(void);
 
98
  virtual void sendOK();
 
99
  virtual void sendEOF();
108
100
  virtual void sendError(const drizzled::error_t sql_errno, const char *err);
109
101
 
110
102
  virtual void sendFields(drizzled::List<drizzled::Item>&);
111
103
 
112
104
  using Client::store;
113
 
  virtual void store(drizzled::Field *from);
 
105
  virtual void store(drizzled::Field*);
114
106
  virtual void store();
115
107
  virtual void store(int32_t from);
116
108
  virtual void store(uint32_t from);
117
109
  virtual void store(int64_t from);
118
110
  virtual void store(uint64_t from);
119
111
  virtual void store(double from, uint32_t decimals, drizzled::String *buffer);
120
 
  virtual void store(const char *from, size_t length);
 
112
  virtual void store(const char*, size_t);
121
113
 
122
 
  virtual bool haveError(void);
123
 
  virtual bool wasAborted(void);
 
114
  virtual bool haveError();
 
115
  virtual bool wasAborted();
124
116
};
125
117
 
126
118
} /* namespace drizzle_plugin */