18 #define DRIZZLE_FIELD_MAX 32
19 #define DRIZZLE_RESULT_ROWS 20
21 #define DRIZZLE_RETURN_CHECK(__ret, __function, __drizzle) \
23 if ((__ret) != DRIZZLE_RETURN_OK) \
24 DRIZZLE_RETURN_ERROR(__function, __drizzle) \
27 #define DRIZZLE_RETURN_ERROR(__function, __drizzle) \
29 printf(__function ":%s\n", drizzle_error(__drizzle)); \
36 int main(
int argc,
char *argv[])
40 const char *host= NULL;
51 while((c = getopt(argc, argv,
"c:h:mp:v")) != -1)
56 count= (uint32_t)atoi(optarg);
68 port= (in_port_t)atoi(optarg);
76 printf(
"\nusage: %s [-c <count>] [-h <host>] [-m] [-p <port>] [-v]\n",
78 printf(
"\t-c <count> - Number of connections to accept before exiting\n");
79 printf(
"\t-h <host> - Host to listen on\n");
80 printf(
"\t-m - Use the MySQL protocol\n");
81 printf(
"\t-p <port> - Port to listen on\n");
82 printf(
"\t-v - Increase verbosity level\n");
89 printf(
"drizzle_create:NULL\n");
98 printf(
"drizzle_con_create:NULL\n");
123 server(&drizzle, &con, &result, &column);
246 "field %" PRIu64
"-1", x);
251 "field %" PRIu64
"-2", x);