85
82
unsigned int flags; /* Div flags */
86
83
unsigned int decimals; /* Number of decimals in field */
87
84
unsigned int charsetnr; /* Character set */
88
enum enum_field_types type; /* Type of field. See mysql_com.h for types */
85
enum enum_field_types type; /* Type of field. See drizzle_com.h for types */
92
typedef char **MYSQL_ROW; /* return data as array of strings */
93
typedef unsigned int MYSQL_FIELD_OFFSET; /* offset to current field */
97
#define MYSQL_COUNT_ERROR (~(uint64_t) 0)
99
/* backward compatibility define - to be removed eventually */
100
#define ER_WARN_DATA_TRUNCATED WARN_DATA_TRUNCATED
102
typedef struct st_mysql_rows {
103
struct st_mysql_rows *next; /* list of rows */
89
typedef char **DRIZZLE_ROW; /* return data as array of strings */
90
typedef unsigned int DRIZZLE_FIELD_OFFSET; /* offset to current field */
92
#include <mysys/typelib.h>
94
#define DRIZZLE_COUNT_ERROR (~(uint64_t) 0)
96
typedef struct st_drizzle_rows {
97
struct st_drizzle_rows *next; /* list of rows */
105
99
unsigned long length;
108
typedef MYSQL_ROWS *MYSQL_ROW_OFFSET; /* offset to current row */
110
#include "my_alloc.h"
102
typedef DRIZZLE_ROWS *DRIZZLE_ROW_OFFSET; /* offset to current row */
104
#include <mysys/my_alloc.h>
112
106
typedef struct embedded_query_result EMBEDDED_QUERY_RESULT;
113
typedef struct st_mysql_data {
107
typedef struct st_drizzle_data {
115
109
struct embedded_query_result *embedded_info;
118
112
unsigned int fields;
119
113
/* extra info for embedded library */
125
MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_COMPRESS, MYSQL_OPT_NAMED_PIPE,
126
MYSQL_INIT_COMMAND, MYSQL_READ_DEFAULT_FILE, MYSQL_READ_DEFAULT_GROUP,
127
MYSQL_SET_CHARSET_DIR, MYSQL_SET_CHARSET_NAME, MYSQL_OPT_LOCAL_INFILE,
128
MYSQL_OPT_PROTOCOL, MYSQL_SHARED_MEMORY_BASE_NAME, MYSQL_OPT_READ_TIMEOUT,
129
MYSQL_OPT_WRITE_TIMEOUT, MYSQL_OPT_USE_RESULT,
130
MYSQL_OPT_USE_REMOTE_CONNECTION, MYSQL_OPT_USE_EMBEDDED_CONNECTION,
131
MYSQL_OPT_GUESS_CONNECTION, MYSQL_SET_CLIENT_IP, MYSQL_SECURE_AUTH,
132
MYSQL_REPORT_DATA_TRUNCATION, MYSQL_OPT_RECONNECT,
133
MYSQL_OPT_SSL_VERIFY_SERVER_CERT
119
DRIZZLE_OPT_CONNECT_TIMEOUT, DRIZZLE_OPT_COMPRESS, DRIZZLE_OPT_NAMED_PIPE,
120
DRIZZLE_INIT_COMMAND, DRIZZLE_READ_DEFAULT_FILE, DRIZZLE_READ_DEFAULT_GROUP,
121
DRIZZLE_SET_CHARSET_DIR, DRIZZLE_SET_CHARSET_NAME, DRIZZLE_OPT_LOCAL_INFILE,
122
DRIZZLE_OPT_PROTOCOL, DRIZZLE_SHARED_MEMORY_BASE_NAME, DRIZZLE_OPT_READ_TIMEOUT,
123
DRIZZLE_OPT_WRITE_TIMEOUT, DRIZZLE_OPT_USE_RESULT,
124
DRIZZLE_OPT_USE_REMOTE_CONNECTION, DRIZZLE_OPT_USE_EMBEDDED_CONNECTION,
125
DRIZZLE_OPT_GUESS_CONNECTION, DRIZZLE_SET_CLIENT_IP, DRIZZLE_SECURE_AUTH,
126
DRIZZLE_REPORT_DATA_TRUNCATION, DRIZZLE_OPT_RECONNECT,
127
DRIZZLE_OPT_SSL_VERIFY_SERVER_CERT
136
struct st_mysql_options {
130
struct st_drizzle_options {
137
131
unsigned int connect_timeout, read_timeout, write_timeout;
138
132
unsigned int port, protocol;
139
133
unsigned long client_flag;
140
134
char *host,*user,*password,*unix_socket,*db;
141
135
struct st_dynamic_array *init_commands;
142
136
char *my_cnf_file,*my_cnf_group, *charset_dir, *charset_name;
143
char *ssl_key; /* PEM key file */
144
char *ssl_cert; /* PEM cert file */
145
char *ssl_ca; /* PEM CA file */
146
char *ssl_capath; /* PEM directory of CA-s? */
147
char *ssl_cipher; /* cipher to use */
137
char *ssl_key; /* PEM key file */
138
char *ssl_cert; /* PEM cert file */
139
char *ssl_ca; /* PEM CA file */
140
char *ssl_capath; /* PEM directory of CA-s? */
141
char *ssl_cipher; /* cipher to use */
148
142
char *shared_memory_base_name;
149
143
unsigned long max_allowed_packet;
150
my_bool use_ssl; /* if to use SSL or not */
144
my_bool use_ssl; /* if to use SSL or not */
151
145
my_bool compress,named_pipe;
156
enum mysql_option methods_to_use;
150
enum drizzle_option methods_to_use;
158
152
/* Refuse client connecting to server if it uses old (pre-4.1.1) protocol */
159
153
my_bool secure_auth;
192
186
unsigned int mbmaxlen; /* max. length for multibyte strings */
193
187
} MY_CHARSET_INFO;
195
struct st_mysql_methods;
196
struct st_mysql_stmt;
189
struct st_drizzle_methods;
190
struct st_drizzle_stmt;
198
typedef struct st_mysql
192
typedef struct st_drizzle
200
NET net; /* Communication parameters */
201
unsigned char *connector_fd; /* ConnectorFd for SSL */
202
char *host,*user,*passwd,*unix_socket,*server_version,*host_info;
194
NET net; /* Communication parameters */
195
unsigned char *connector_fd; /* ConnectorFd for SSL */
196
char *host,*user,*passwd,*unix_socket,*server_version,*host_info;
204
198
struct charset_info_st *charset;
206
MEM_ROOT field_alloc;
199
DRIZZLE_FIELD *fields;
200
MEM_ROOT field_alloc;
207
201
uint64_t affected_rows;
208
uint64_t insert_id; /* id if insert on table with NEXTNR */
209
uint64_t extra_info; /* Not used */
210
uint32_t thread_id; /* Id for connection in server */
202
uint64_t insert_id; /* id if insert on table with NEXTNR */
203
uint64_t extra_info; /* Not used */
204
uint32_t thread_id; /* Id for connection in server */
211
205
uint32_t packet_length;
213
207
uint32_t client_flag,server_capabilities;
214
uint32_t protocol_version;
215
uint32_t field_count;
216
uint32_t server_status;
208
uint32_t protocol_version;
209
uint32_t field_count;
210
uint32_t server_status;
217
211
uint32_t server_language;
218
uint32_t warning_count;
219
struct st_mysql_options options;
220
enum mysql_status status;
221
bool free_me; /* If free in mysql_close */
222
bool reconnect; /* set to 1 if automatic reconnect */
212
uint32_t warning_count;
213
struct st_drizzle_options options;
214
enum drizzle_status status;
215
bool free_me; /* If free in drizzle_close */
216
bool reconnect; /* set to 1 if automatic reconnect */
224
218
/* session-wide random string */
225
char scramble[SCRAMBLE_LENGTH+1];
219
char scramble[SCRAMBLE_LENGTH+1];
227
221
void *unused2, *unused3, *unused4, *unused5;
229
223
LIST *stmts; /* list of all statements */
230
const struct st_mysql_methods *methods;
224
const struct st_drizzle_methods *methods;
233
Points to boolean flag in MYSQL_RES or MYSQL_STMT. We set this flag
234
from mysql_stmt_close if close had to cancel result set of this object.
227
Points to boolean flag in DRIZZLE_RES or MYSQL_STMT. We set this flag
228
from drizzle_stmt_close if close had to cancel result set of this object.
236
230
bool *unbuffered_fetch_owner;
237
231
/* needed for embedded server - no net buffer to store the 'info' */
238
232
char *info_buffer;
243
typedef struct st_mysql_res {
237
typedef struct st_drizzle_res {
244
238
uint64_t row_count;
247
MYSQL_ROWS *data_cursor;
248
uint32_t *lengths; /* column lengths of current row */
249
MYSQL *handle; /* for unbuffered reads */
250
const struct st_mysql_methods *methods;
251
MYSQL_ROW row; /* If unbuffered read */
252
MYSQL_ROW current_row; /* buffer to current row */
253
MEM_ROOT field_alloc;
254
uint32_t field_count, current_field;
255
bool eof; /* Used by mysql_fetch_row */
256
/* mysql_stmt_close() had to cancel this result */
257
bool unbuffered_fetch_cancelled;
239
DRIZZLE_FIELD *fields;
241
DRIZZLE_ROWS *data_cursor;
242
uint32_t *lengths; /* column lengths of current row */
243
DRIZZLE *handle; /* for unbuffered reads */
244
const struct st_drizzle_methods *methods;
245
DRIZZLE_ROW row; /* If unbuffered read */
246
DRIZZLE_ROW current_row; /* buffer to current row */
247
MEM_ROOT field_alloc;
248
uint32_t field_count, current_field;
249
bool eof; /* Used by drizzle_fetch_row */
250
/* drizzle_stmt_close() had to cancel this result */
251
bool unbuffered_fetch_cancelled;
262
256
#if !defined(MYSQL_SERVER) && !defined(MYSQL_CLIENT)
304
296
connection. All uses of the connection(s) should be between these
307
my_bool STDCALL mysql_thread_init(void);
308
void STDCALL mysql_thread_end(void);
299
bool STDCALL drizzle_thread_init(void);
300
void STDCALL drizzle_thread_end(void);
311
Functions to get information from the MYSQL and MYSQL_RES structures
303
Functions to get information from the DRIZZLE and DRIZZLE_RES structures
312
304
Should definitely be used if one uses shared libraries.
315
uint64_t STDCALL mysql_num_rows(MYSQL_RES *res);
316
unsigned int STDCALL mysql_num_fields(MYSQL_RES *res);
317
my_bool STDCALL mysql_eof(MYSQL_RES *res);
318
MYSQL_FIELD *STDCALL mysql_fetch_field_direct(MYSQL_RES *res,
319
unsigned int fieldnr);
320
MYSQL_FIELD * STDCALL mysql_fetch_fields(MYSQL_RES *res);
321
MYSQL_ROW_OFFSET STDCALL mysql_row_tell(MYSQL_RES *res);
322
MYSQL_FIELD_OFFSET STDCALL mysql_field_tell(MYSQL_RES *res);
324
uint32_t STDCALL mysql_field_count(MYSQL *mysql);
325
uint64_t STDCALL mysql_affected_rows(MYSQL *mysql);
326
uint64_t STDCALL mysql_insert_id(MYSQL *mysql);
327
uint32_t STDCALL mysql_errno(MYSQL *mysql);
328
const char * STDCALL mysql_error(MYSQL *mysql);
329
const char *STDCALL mysql_sqlstate(MYSQL *mysql);
330
uint32_t STDCALL mysql_warning_count(MYSQL *mysql);
331
const char * STDCALL mysql_info(MYSQL *mysql);
332
uint32_t STDCALL mysql_thread_id(MYSQL *mysql);
333
const char * STDCALL mysql_character_set_name(MYSQL *mysql);
334
int32_t STDCALL mysql_set_character_set(MYSQL *mysql, const char *csname);
336
MYSQL * STDCALL mysql_init(MYSQL *mysql);
337
my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
338
const char *passwd, const char *db);
339
MYSQL * STDCALL mysql_real_connect(MYSQL *mysql, const char *host,
344
const char *unix_socket,
345
uint32_t clientflag);
346
int32_t STDCALL mysql_select_db(MYSQL *mysql, const char *db);
347
int32_t STDCALL mysql_query(MYSQL *mysql, const char *q);
348
int32_t STDCALL mysql_send_query(MYSQL *mysql, const char *q, uint32_t length);
349
int32_t STDCALL mysql_real_query(MYSQL *mysql, const char *q, uint32_t length);
350
MYSQL_RES * STDCALL mysql_store_result(MYSQL *mysql);
351
MYSQL_RES * STDCALL mysql_use_result(MYSQL *mysql);
353
void STDCALL mysql_get_character_set_info(MYSQL *mysql,
354
MY_CHARSET_INFO *charset);
307
uint64_t STDCALL drizzle_num_rows(DRIZZLE_RES *res);
308
unsigned int STDCALL drizzle_num_fields(DRIZZLE_RES *res);
309
bool STDCALL drizzle_eof(DRIZZLE_RES *res);
310
DRIZZLE_FIELD *STDCALL drizzle_fetch_field_direct(DRIZZLE_RES *res,
311
unsigned int fieldnr);
312
DRIZZLE_FIELD * STDCALL drizzle_fetch_fields(DRIZZLE_RES *res);
313
DRIZZLE_ROW_OFFSET STDCALL DRIZZLE_ROW_tell(DRIZZLE_RES *res);
314
DRIZZLE_FIELD_OFFSET STDCALL drizzle_field_tell(DRIZZLE_RES *res);
316
uint32_t STDCALL drizzle_field_count(DRIZZLE *drizzle);
317
uint64_t STDCALL drizzle_affected_rows(DRIZZLE *drizzle);
318
uint64_t STDCALL drizzle_insert_id(DRIZZLE *drizzle);
319
uint32_t STDCALL drizzle_errno(DRIZZLE *drizzle);
320
const char * STDCALL drizzle_error(DRIZZLE *drizzle);
321
const char *STDCALL drizzle_sqlstate(DRIZZLE *drizzle);
322
uint32_t STDCALL drizzle_warning_count(DRIZZLE *drizzle);
323
const char * STDCALL drizzle_info(DRIZZLE *drizzle);
324
uint32_t STDCALL drizzle_thread_id(DRIZZLE *drizzle);
325
const char * STDCALL drizzle_character_set_name(DRIZZLE *drizzle);
326
int32_t STDCALL drizzle_set_character_set(DRIZZLE *drizzle, const char *csname);
328
DRIZZLE * STDCALL drizzle_create(DRIZZLE *drizzle);
329
bool STDCALL drizzle_change_user(DRIZZLE *drizzle, const char *user,
330
const char *passwd, const char *db);
331
DRIZZLE * STDCALL drizzle_connect(DRIZZLE *drizzle, const char *host,
336
const char *unix_socket,
337
uint32_t clientflag);
338
int32_t STDCALL drizzle_select_db(DRIZZLE *drizzle, const char *db);
339
int32_t STDCALL drizzle_query(DRIZZLE *drizzle, const char *q);
340
int32_t STDCALL drizzle_send_query(DRIZZLE *drizzle, const char *q, uint32_t length);
341
int32_t STDCALL drizzle_real_query(DRIZZLE *drizzle, const char *q, uint32_t length);
342
DRIZZLE_RES * STDCALL drizzle_store_result(DRIZZLE *drizzle);
343
DRIZZLE_RES * STDCALL drizzle_use_result(DRIZZLE *drizzle);
345
void STDCALL drizzle_get_character_set_info(DRIZZLE *drizzle,
346
MY_CHARSET_INFO *charset);
356
348
/* local infile support */
358
350
#define LOCAL_INFILE_ERROR_LEN 512
361
mysql_set_local_infile_handler(MYSQL *mysql,
362
int (*local_infile_init)(void **, const char *,
364
int (*local_infile_read)(void *, char *,
366
void (*local_infile_end)(void *),
367
int (*local_infile_error)(void *, char*,
353
drizzle_set_local_infile_handler(DRIZZLE *drizzle,
354
int (*local_infile_init)(void **, const char *, void *),
355
int (*local_infile_read)(void *, char *, unsigned int),
356
void (*local_infile_end)(void *),int (*local_infile_error)
357
(void *, char*, unsigned int), void *);
372
mysql_set_local_infile_default(MYSQL *mysql);
374
int32_t STDCALL mysql_shutdown(MYSQL *mysql, enum mysql_enum_shutdown_level shutdown_level);
375
int32_t STDCALL mysql_dump_debug_info(MYSQL *mysql);
376
int32_t STDCALL mysql_refresh(MYSQL *mysql, uint32_t refresh_options);
377
int32_t STDCALL mysql_kill(MYSQL *mysql, uint32_t pid);
378
int32_t STDCALL mysql_set_server_option(MYSQL *mysql, enum enum_mysql_set_option option);
379
int32_t STDCALL mysql_ping(MYSQL *mysql);
380
const char * STDCALL mysql_stat(MYSQL *mysql);
381
const char * STDCALL mysql_get_server_info(MYSQL *mysql);
382
const char * STDCALL mysql_get_client_info(void);
383
uint32_t STDCALL mysql_get_client_version(void);
384
const char * STDCALL mysql_get_host_info(MYSQL *mysql);
385
uint32_t STDCALL mysql_get_server_version(MYSQL *mysql);
386
uint32_t STDCALL mysql_get_proto_info(MYSQL *mysql);
387
MYSQL_RES * STDCALL mysql_list_dbs(MYSQL *mysql,const char *wild);
388
MYSQL_RES * STDCALL mysql_list_tables(MYSQL *mysql,const char *wild);
389
MYSQL_RES * STDCALL mysql_list_processes(MYSQL *mysql);
390
int32_t STDCALL mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg);
391
void STDCALL mysql_free_result(MYSQL_RES *result);
392
void STDCALL mysql_data_seek(MYSQL_RES *result, uint64_t offset);
393
MYSQL_ROW_OFFSET STDCALL mysql_row_seek(MYSQL_RES *result, MYSQL_ROW_OFFSET offset);
394
MYSQL_FIELD_OFFSET STDCALL mysql_field_seek(MYSQL_RES *result, MYSQL_FIELD_OFFSET offset);
395
MYSQL_ROW STDCALL mysql_fetch_row(MYSQL_RES *result);
396
uint32_t * STDCALL mysql_fetch_lengths(MYSQL_RES *result);
397
MYSQL_FIELD * STDCALL mysql_fetch_field(MYSQL_RES *result);
398
MYSQL_RES * STDCALL mysql_list_fields(MYSQL *mysql, const char *table, const char *wild);
399
uint32_t STDCALL mysql_escape_string(char *to,const char *from, uint32_t from_length);
400
uint32_t STDCALL mysql_hex_string(char *to,const char *from, uint32_t from_length);
401
uint32_t STDCALL mysql_real_escape_string(MYSQL *mysql, char *to, const char *from, uint32_t length);
402
void STDCALL myodbc_remove_escape(MYSQL *mysql,char *name);
403
uint32_t STDCALL mysql_thread_safe(void);
404
my_bool STDCALL mysql_embedded(void);
405
my_bool STDCALL mysql_read_query_result(MYSQL *mysql);
409
typedef struct st_mysql_methods
360
drizzle_set_local_infile_default(DRIZZLE *drizzle);
362
int32_t STDCALL drizzle_shutdown(DRIZZLE *drizzle, enum drizzle_enum_shutdown_level shutdown_level);
363
int32_t STDCALL drizzle_dump_debug_info(DRIZZLE *drizzle);
364
int32_t STDCALL drizzle_refresh(DRIZZLE *drizzle, uint32_t refresh_options);
365
int32_t STDCALL drizzle_kill(DRIZZLE *drizzle, uint32_t pid);
366
int32_t STDCALL drizzle_set_server_option(DRIZZLE *drizzle, enum enum_drizzle_set_option option);
367
int32_t STDCALL drizzle_ping(DRIZZLE *drizzle);
368
const char * STDCALL drizzle_stat(DRIZZLE *drizzle);
369
const char * STDCALL drizzle_get_server_info(DRIZZLE *drizzle);
370
const char * STDCALL drizzle_get_client_info(void);
371
uint32_t STDCALL drizzle_get_client_version(void);
372
const char * STDCALL drizzle_get_host_info(DRIZZLE *drizzle);
373
uint32_t STDCALL drizzle_get_server_version(DRIZZLE *drizzle);
374
uint32_t STDCALL drizzle_get_proto_info(DRIZZLE *drizzle);
375
DRIZZLE_RES * STDCALL drizzle_list_dbs(DRIZZLE *drizzle,const char *wild);
376
DRIZZLE_RES * STDCALL drizzle_list_tables(DRIZZLE *drizzle,const char *wild);
377
DRIZZLE_RES * STDCALL drizzle_list_processes(DRIZZLE *drizzle);
378
int32_t STDCALL drizzle_options(DRIZZLE *drizzle,enum drizzle_option option, const void *arg);
379
void STDCALL drizzle_free_result(DRIZZLE_RES *result);
380
void STDCALL drizzle_data_seek(DRIZZLE_RES *result, uint64_t offset);
381
DRIZZLE_ROW_OFFSET STDCALL drizzle_row_seek(DRIZZLE_RES *result, DRIZZLE_ROW_OFFSET offset);
382
DRIZZLE_FIELD_OFFSET STDCALL drizzle_field_seek(DRIZZLE_RES *result, DRIZZLE_FIELD_OFFSET offset);
383
DRIZZLE_ROW STDCALL drizzle_fetch_row(DRIZZLE_RES *result);
384
uint32_t * STDCALL drizzle_fetch_lengths(DRIZZLE_RES *result);
385
DRIZZLE_FIELD * STDCALL drizzle_fetch_field(DRIZZLE_RES *result);
386
DRIZZLE_RES * STDCALL drizzle_list_fields(DRIZZLE *drizzle, const char *table, const char *wild);
387
uint32_t STDCALL drizzle_escape_string(char *to,const char *from, uint32_t from_length);
388
uint32_t STDCALL drizzle_hex_string(char *to,const char *from, uint32_t from_length);
389
uint32_t STDCALL drizzle_real_escape_string(DRIZZLE *drizzle, char *to, const char *from, uint32_t length);
390
void STDCALL myodbc_remove_escape(DRIZZLE *drizzle,char *name);
391
uint32_t STDCALL drizzle_thread_safe(void);
392
bool STDCALL drizzle_embedded(void);
393
bool STDCALL drizzle_read_query_result(DRIZZLE *drizzle);
397
typedef struct st_drizzle_methods
411
bool (*read_query_result)(MYSQL *mysql);
412
bool (*advanced_command)(MYSQL *mysql,
399
bool (*read_query_result)(DRIZZLE *drizzle);
400
bool (*advanced_command)(DRIZZLE *drizzle,
413
401
enum enum_server_command command,
414
402
const unsigned char *header,
415
403
uint32_t header_length,
416
404
const unsigned char *arg,
417
405
uint32_t arg_length,
418
406
bool skip_check);
419
MYSQL_DATA *(*read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields, uint32_t fields);
420
MYSQL_RES * (*use_result)(MYSQL *mysql);
421
void (*fetch_lengths)(uint32_t *to, MYSQL_ROW column, uint32_t field_count);
422
void (*flush_use_result)(MYSQL *mysql);
423
MYSQL_FIELD * (*list_fields)(MYSQL *mysql);
424
int32_t (*unbuffered_fetch)(MYSQL *mysql, char **row);
425
const char *(*read_statistics)(MYSQL *mysql);
426
bool (*next_result)(MYSQL *mysql);
427
int32_t (*read_change_user_result)(MYSQL *mysql, char *buff, const char *passwd);
431
my_bool STDCALL mysql_commit(MYSQL * mysql);
432
my_bool STDCALL mysql_rollback(MYSQL * mysql);
433
my_bool STDCALL mysql_autocommit(MYSQL * mysql, my_bool auto_mode);
434
my_bool STDCALL mysql_more_results(MYSQL *mysql);
435
int STDCALL mysql_next_result(MYSQL *mysql);
436
void STDCALL mysql_close(MYSQL *sock);
407
DRIZZLE_DATA *(*read_rows)(DRIZZLE *drizzle,DRIZZLE_FIELD *drizzle_fields, uint32_t fields);
408
DRIZZLE_RES * (*use_result)(DRIZZLE *drizzle);
409
void (*fetch_lengths)(uint32_t *to, DRIZZLE_ROW column, uint32_t field_count);
410
void (*flush_use_result)(DRIZZLE *drizzle);
411
DRIZZLE_FIELD * (*list_fields)(DRIZZLE *drizzle);
412
int32_t (*unbuffered_fetch)(DRIZZLE *drizzle, char **row);
413
const char *(*read_statistics)(DRIZZLE *drizzle);
414
bool (*next_result)(DRIZZLE *drizzle);
415
int32_t (*read_change_user_result)(DRIZZLE *drizzle, char *buff, const char *passwd);
419
bool STDCALL drizzle_commit(DRIZZLE *drizzle);
420
bool STDCALL drizzle_rollback(DRIZZLE *drizzle);
421
bool STDCALL drizzle_autocommit(DRIZZLE *drizzle, bool auto_mode);
422
bool STDCALL drizzle_more_results(DRIZZLE *drizzle);
423
int STDCALL drizzle_next_result(DRIZZLE *drizzle);
424
void STDCALL drizzle_close(DRIZZLE *sock);
439
427
/* status return codes */
440
#define MYSQL_NO_DATA 100
441
#define MYSQL_DATA_TRUNCATED 101
428
#define DRIZZLE_NO_DATA 100
429
#define DRIZZLE_DATA_TRUNCATED 101
443
#define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT)
431
#define drizzle_reload(drizzle) drizzle_refresh((drizzle),REFRESH_GRANT)
446
The following functions are mainly exported because of mysqlbinlog;
434
The following functions are mainly exported because of binlog;
447
435
They are not for general usage
450
#define simple_command(mysql, command, arg, length, skip_check) \
451
(*(mysql)->methods->advanced_command)(mysql, command, 0, \
438
#define simple_command(drizzle, command, arg, length, skip_check) \
439
(*(drizzle)->methods->advanced_command)(drizzle, command, 0, \
452
440
0, arg, length, skip_check)
458
#endif /* _mysql_h */
446
#endif /* _drizzle_h */