19 #define DRIZZLE_RETURN_CHECK(__ret, __function, __drizzle) \
21 if ((__ret) != DRIZZLE_RETURN_OK) \
22 DRIZZLE_RETURN_ERROR(__function, __drizzle) \
25 #define DRIZZLE_RETURN_ERROR(__function, __drizzle) \
27 printf(__function ":%s\n", drizzle_error(__drizzle)); \
35 int main(
int argc,
char *argv[])
39 const char *server_host= NULL;
40 const char *client_host= NULL;
41 bool server_mysql=
false;
42 bool client_mysql=
false;
43 in_port_t server_port= 0;
44 in_port_t client_port= 0;
55 while((c = getopt(argc, argv,
"c:h:H:mMp:P:v")) != -1)
60 count= (uint32_t)atoi(optarg);
80 server_port= (in_port_t)atoi(optarg);
84 client_port= (in_port_t)atoi(optarg);
92 printf(
"\nusage: %s [-c <count>] [-h <host>] [-H <host>] [-m] [-M] "
93 "[-p <port>] [-p <port>] [-v]\n", argv[0]);
94 printf(
"\t-c <count> - Number of connections to accept before exiting\n");
95 printf(
"\t-h <host> - Host to listen on\n");
96 printf(
"\t-H <host> - Host to connect to\n");
97 printf(
"\t-m - Use MySQL protocol for incoming connections\n");
98 printf(
"\t-M - Use MySQL protocol for outgoing connectionsn\n");
99 printf(
"\t-p <port> - Port to listen on\n");
100 printf(
"\t-P <port> - Port to connect to\n");
101 printf(
"\t-v - Increase verbosity level\n");
108 printf(
"drizzle_create:NULL\n");
117 printf(
"drizzle_con_create:NULL\n");
144 printf(
"drizzle_con_create:NULL\n");
161 proxy(&drizzle, &server, &client, &server_result, &client_result, &column);
251 if ((offset + size) == total)
336 while (row_break ==
false)