17
17
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20
#ifndef PLUGIN_DRIZZLE_PROTOCOL_OPTIONS_H
21
#define PLUGIN_DRIZZLE_PROTOCOL_OPTIONS_H
23
namespace drizzle_protocol
20
#ifndef _libdrizzle_drizzle_options_h
21
#define _libdrizzle_drizzle_options_h
26
30
enum drizzle_option
28
32
DRIZZLE_OPT_CONNECT_TIMEOUT, DRIZZLE_OPT_COMPRESS, DRIZZLE_OPT_NAMED_PIPE,
29
33
DRIZZLE_INIT_COMMAND, DRIZZLE_READ_DEFAULT_FILE, DRIZZLE_READ_DEFAULT_GROUP,
34
DRIZZLE_OPT_LOCAL_INFILE,
30
35
DRIZZLE_OPT_PROTOCOL, DRIZZLE_SHARED_MEMORY_BASE_NAME, DRIZZLE_OPT_READ_TIMEOUT,
31
36
DRIZZLE_OPT_WRITE_TIMEOUT, DRIZZLE_OPT_USE_RESULT,
32
37
DRIZZLE_OPT_USE_REMOTE_CONNECTION,
35
40
DRIZZLE_OPT_SSL_VERIFY_SERVER_CERT
38
struct st_drizzleclient_options {
43
struct st_drizzle_options {
39
44
unsigned int connect_timeout, read_timeout, write_timeout;
41
46
unsigned long client_flag;
74
#define CLIENT_NET_READ_TIMEOUT 365*24*3600 /* Timeout on read */
75
#define CLIENT_NET_WRITE_TIMEOUT 365*24*3600 /* Timeout on write */
77
#define CLIENT_LONG_PASSWORD 1 /* new more secure passwords */
78
#define CLIENT_FOUND_ROWS 2 /* Found instead of affected rows */
79
#define CLIENT_LONG_FLAG 4 /* Get all column flags */
80
#define CLIENT_CONNECT_WITH_DB 8 /* One can specify db on connect */
81
#define CLIENT_NO_SCHEMA 16 /* Don't allow database.table.column */
82
#define CLIENT_COMPRESS 32 /* Can use compression protocol */
83
#define CLIENT_ODBC 64 /* Odbc client */
84
#define CLIENT_IGNORE_SPACE 256 /* Ignore spaces before '(' */
85
#define CLIENT_PROTOCOL_MYSQL41 512 /* New 4.1 protocol */
86
#define CLIENT_SSL 2048 /* Switch to SSL after handshake */
87
#define CLIENT_IGNORE_SIGPIPE 4096 /* IGNORE sigpipes */
88
#define CLIENT_RESERVED 16384 /* Old flag for 4.1 protocol */
89
#define CLIENT_SECURE_CONNECTION 32768 /* New 4.1 authentication */
90
#define CLIENT_MULTI_STATEMENTS (1UL << 16) /* Enable/disable multi-stmt support */
91
#define CLIENT_MULTI_RESULTS (1UL << 17) /* Enable/disable multi-results */
93
#define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30)
94
#define CLIENT_REMEMBER_OPTIONS (1UL << 31)
96
/* Gather all possible capabilites (flags) supported by the server */
97
#define CLIENT_ALL_FLAGS (CLIENT_LONG_PASSWORD | \
100
CLIENT_CONNECT_WITH_DB | \
104
CLIENT_IGNORE_SPACE | \
106
CLIENT_IGNORE_SIGPIPE | \
108
CLIENT_SECURE_CONNECTION | \
109
CLIENT_MULTI_STATEMENTS | \
110
CLIENT_MULTI_RESULTS | \
111
CLIENT_SSL_VERIFY_SERVER_CERT | \
112
CLIENT_REMEMBER_OPTIONS)
115
Switch off the flags that are optional and depending on build flags
116
If any of the optional flags is supported by the build it will be switched
117
on before sending to the client during the connection handshake.
119
#define CLIENT_BASIC_FLAGS (((CLIENT_ALL_FLAGS & ~CLIENT_SSL) \
120
& ~CLIENT_COMPRESS) \
121
& ~CLIENT_SSL_VERIFY_SERVER_CERT)
123
} /* namespace drizzle_protocol */
125
#endif /* PLUGIN_DRIZZLE_PROTOCOL_OPTIONS_H */
83
#endif /* _libdrizzle_drizzle_options_h */