~ubuntu-branches/ubuntu/saucy/drizzle/saucy-proposed

« back to all changes in this revision

Viewing changes to plugin/mysql_unix_socket_protocol/protocol.h

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-06-19 10:46:49 UTC
  • mfrom: (1.1.6)
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20120619104649-e2l0ggd4oz3um0f4
Tags: upstream-7.1.36-stable
ImportĀ upstreamĀ versionĀ 7.1.36-stable

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include <drizzled/plugin/client.h>
26
26
#include <drizzled/atomics.h>
27
27
#include <drizzled/plugin/table_function.h>
28
 
 
29
28
#include <boost/filesystem.hpp>
30
 
 
31
29
#include <plugin/mysql_protocol/mysql_protocol.h>
32
30
 
33
 
namespace drizzle_plugin
34
 
{
35
 
namespace mysql_unix_socket_protocol
36
 
{
 
31
namespace drizzle_plugin {
 
32
namespace mysql_unix_socket_protocol {
37
33
 
38
 
class Protocol: public ListenMySQLProtocol
 
34
class Protocol : public ListenMySQLProtocol
39
35
{
40
 
  const boost::filesystem::path _unix_socket_path;
41
36
public:
42
 
  Protocol(std::string name,
43
 
           bool using_mysql41_protocol,
44
 
           const boost::filesystem::path &unix_socket_path) :
45
 
    ListenMySQLProtocol(name, unix_socket_path.file_string(),
46
 
                        using_mysql41_protocol),
 
37
  Protocol(std::string name, const boost::filesystem::path &unix_socket_path) :
 
38
    ListenMySQLProtocol(name, unix_socket_path.file_string()), 
47
39
    _unix_socket_path(unix_socket_path)
48
40
  { }
49
41
 
51
43
  bool getFileDescriptors(std::vector<int> &fds);
52
44
 
53
45
  in_port_t getPort(void) const;
54
 
  static ProtocolCounters *mysql_unix_counters;
55
 
  virtual ProtocolCounters *getCounters(void) const {return mysql_unix_counters; }
 
46
  static ProtocolCounters mysql_unix_counters;
 
47
  virtual ProtocolCounters& getCounters() const {return mysql_unix_counters; }
56
48
  drizzled::plugin::Client *getClient(int fd);
57
 
};
58
 
 
59
 
class ClientMySQLUnixSocketProtocol: public ClientMySQLProtocol
60
 
{
61
 
public:
62
 
  ClientMySQLUnixSocketProtocol(int fd, bool __using_mysql41_protocol, ProtocolCounters *set_counters): ClientMySQLProtocol(fd, __using_mysql41_protocol, set_counters) {}
63
 
 
64
 
  /* Unix socket protocol is for MySQL compatibility so do not allow admin connections */
65
 
  bool isAdminAllowed(void) { return false; }
66
 
};
67
 
 
 
49
private:
 
50
  const boost::filesystem::path _unix_socket_path;
 
51
};
68
52
 
69
53
} /* namespace mysql_unix_socket_protocol */
70
54
} /* namespace drizzle_plugin */