~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to include/drizzle.h

Merge/fix in FAQ.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2000-2003 MySQL AB
 
2
 
 
3
   This program is free software; you can redistribute it and/or modify
 
4
   it under the terms of the GNU General Public License as published by
 
5
   the Free Software Foundation; version 2 of the License.
 
6
 
 
7
   This program is distributed in the hope that it will be useful,
 
8
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
9
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10
   GNU General Public License for more details.
 
11
 
 
12
   You should have received a copy of the GNU General Public License
 
13
   along with this program; if not, write to the Free Software
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
15
 
 
16
/*
 
17
  This file defines the client API to MySQL and also the ABI of the
 
18
  dynamically linked libmysqlclient.
 
19
 
 
20
  The ABI should never be changed in a released product of MySQL
 
21
  thus you need to take great care when changing the file. In case
 
22
  the file is changed so the ABI is broken, you must also
 
23
  update the SHAREDLIB_MAJOR_VERSION in configure.in .
 
24
 
 
25
*/
 
26
 
 
27
#ifndef _mysql_h
 
28
#define _mysql_h
 
29
 
 
30
#ifdef  __cplusplus
 
31
extern "C" {
 
32
#endif
 
33
 
 
34
#ifndef _global_h                               /* If not standard header */
 
35
#include <sys/types.h>
 
36
#ifdef __LCC__
 
37
#include <winsock2.h>                           /* For windows */
 
38
#endif
 
39
typedef char my_bool;
 
40
#define STDCALL
 
41
 
 
42
#ifndef my_socket_defined
 
43
typedef int my_socket;
 
44
#endif /* my_socket_defined */
 
45
#endif /* _global_h */
 
46
 
 
47
#include "drizzle_version.h"
 
48
#include "drizzle_com.h"
 
49
#include "drizzle_time.h"
 
50
 
 
51
#include "my_list.h" /* for LISTs used in 'MYSQL' */
 
52
 
 
53
extern unsigned int mysql_port;
 
54
extern char *mysql_unix_port;
 
55
 
 
56
#define CLIENT_NET_READ_TIMEOUT         365*24*3600     /* Timeout on read */
 
57
#define CLIENT_NET_WRITE_TIMEOUT        365*24*3600     /* Timeout on write */
 
58
 
 
59
#define IS_PRI_KEY(n)   ((n) & PRI_KEY_FLAG)
 
60
#define IS_NOT_NULL(n)  ((n) & NOT_NULL_FLAG)
 
61
#define IS_BLOB(n)      ((n) & BLOB_FLAG)
 
62
#define IS_NUM(t)       ((t) <= MYSQL_TYPE_LONGLONG || (t) == MYSQL_TYPE_YEAR || (t) == MYSQL_TYPE_NEWDECIMAL)
 
63
#define IS_NUM_FIELD(f)  ((f)->flags & NUM_FLAG)
 
64
#define INTERNAL_NUM_FIELD(f) (((f)->type <= MYSQL_TYPE_LONGLONG && ((f)->type != MYSQL_TYPE_TIMESTAMP || (f)->length == 14 || (f)->length == 8)) || (f)->type == MYSQL_TYPE_YEAR)
 
65
#define IS_LONGDATA(t) ((t) >= MYSQL_TYPE_TINY_BLOB && (t) <= MYSQL_TYPE_STRING)
 
66
 
 
67
 
 
68
typedef struct st_mysql_field {
 
69
  char *name;                 /* Name of column */
 
70
  char *org_name;             /* Original column name, if an alias */
 
71
  char *table;                /* Table of column if column was a field */
 
72
  char *org_table;            /* Org table name, if table was an alias */
 
73
  char *db;                   /* Database for table */
 
74
  char *catalog;              /* Catalog for table */
 
75
  char *def;                  /* Default value (set by mysql_list_fields) */
 
76
  unsigned long length;       /* Width of column (create length) */
 
77
  unsigned long max_length;   /* Max width for selected set */
 
78
  unsigned int name_length;
 
79
  unsigned int org_name_length;
 
80
  unsigned int table_length;
 
81
  unsigned int org_table_length;
 
82
  unsigned int db_length;
 
83
  unsigned int catalog_length;
 
84
  unsigned int def_length;
 
85
  unsigned int flags;         /* Div flags */
 
86
  unsigned int decimals;      /* Number of decimals in field */
 
87
  unsigned int charsetnr;     /* Character set */
 
88
  enum enum_field_types type; /* Type of field. See mysql_com.h for types */
 
89
  void *extension;
 
90
} MYSQL_FIELD;
 
91
 
 
92
typedef char **MYSQL_ROW;               /* return data as array of strings */
 
93
typedef unsigned int MYSQL_FIELD_OFFSET; /* offset to current field */
 
94
 
 
95
#include "typelib.h"
 
96
 
 
97
#define MYSQL_COUNT_ERROR (~(uint64_t) 0)
 
98
 
 
99
/* backward compatibility define - to be removed eventually */
 
100
#define ER_WARN_DATA_TRUNCATED WARN_DATA_TRUNCATED
 
101
 
 
102
typedef struct st_mysql_rows {
 
103
  struct st_mysql_rows *next;           /* list of rows */
 
104
  MYSQL_ROW data;
 
105
  unsigned long length;
 
106
} MYSQL_ROWS;
 
107
 
 
108
typedef MYSQL_ROWS *MYSQL_ROW_OFFSET;   /* offset to current row */
 
109
 
 
110
#include "my_alloc.h"
 
111
 
 
112
typedef struct embedded_query_result EMBEDDED_QUERY_RESULT;
 
113
typedef struct st_mysql_data {
 
114
  MYSQL_ROWS *data;
 
115
  struct embedded_query_result *embedded_info;
 
116
  MEM_ROOT alloc;
 
117
  uint64_t rows;
 
118
  unsigned int fields;
 
119
  /* extra info for embedded library */
 
120
  void *extension;
 
121
} MYSQL_DATA;
 
122
 
 
123
enum mysql_option 
 
124
{
 
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
 
134
};
 
135
 
 
136
struct st_mysql_options {
 
137
  unsigned int connect_timeout, read_timeout, write_timeout;
 
138
  unsigned int port, protocol;
 
139
  unsigned long client_flag;
 
140
  char *host,*user,*password,*unix_socket,*db;
 
141
  struct st_dynamic_array *init_commands;
 
142
  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 */
 
148
  char *shared_memory_base_name;
 
149
  unsigned long max_allowed_packet;
 
150
  my_bool use_ssl;                              /* if to use SSL or not */
 
151
  my_bool compress,named_pipe;
 
152
  my_bool unused1;
 
153
  my_bool unused2;
 
154
  my_bool unused3;
 
155
  my_bool unused4;
 
156
  enum mysql_option methods_to_use;
 
157
  char *client_ip;
 
158
  /* Refuse client connecting to server if it uses old (pre-4.1.1) protocol */
 
159
  my_bool secure_auth;
 
160
  /* 0 - never report, 1 - always report (default) */
 
161
  my_bool report_data_truncation;
 
162
 
 
163
  /* function pointers for local infile support */
 
164
  int (*local_infile_init)(void **, const char *, void *);
 
165
  int (*local_infile_read)(void *, char *, unsigned int);
 
166
  void (*local_infile_end)(void *);
 
167
  int (*local_infile_error)(void *, char *, unsigned int);
 
168
  void *local_infile_userdata;
 
169
  void *extension;
 
170
};
 
171
 
 
172
enum mysql_status 
 
173
{
 
174
  MYSQL_STATUS_READY,MYSQL_STATUS_GET_RESULT,MYSQL_STATUS_USE_RESULT
 
175
};
 
176
 
 
177
enum mysql_protocol_type 
 
178
{
 
179
  MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET,
 
180
  MYSQL_PROTOCOL_PIPE, MYSQL_PROTOCOL_MEMORY
 
181
};
 
182
 
 
183
typedef struct character_set
 
184
{
 
185
  unsigned int      number;     /* character set number              */
 
186
  unsigned int      state;      /* character set state               */
 
187
  const char        *csname;    /* collation name                    */
 
188
  const char        *name;      /* character set name                */
 
189
  const char        *comment;   /* comment                           */
 
190
  const char        *dir;       /* character set directory           */
 
191
  unsigned int      mbminlen;   /* min. length for multibyte strings */
 
192
  unsigned int      mbmaxlen;   /* max. length for multibyte strings */
 
193
} MY_CHARSET_INFO;
 
194
 
 
195
struct st_mysql_methods;
 
196
struct st_mysql_stmt;
 
197
 
 
198
typedef struct st_mysql
 
199
{
 
200
  NET           net;                    /* Communication parameters */
 
201
  unsigned char *connector_fd;          /* ConnectorFd for SSL */
 
202
  char          *host,*user,*passwd,*unix_socket,*server_version,*host_info;
 
203
  char          *info, *db;
 
204
  struct charset_info_st *charset;
 
205
  MYSQL_FIELD   *fields;
 
206
  MEM_ROOT      field_alloc;
 
207
  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 */
 
211
  uint32_t packet_length;
 
212
  uint32_t      port;
 
213
  uint32_t client_flag,server_capabilities;
 
214
  uint32_t      protocol_version;
 
215
  uint32_t      field_count;
 
216
  uint32_t      server_status;
 
217
  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 */
 
223
 
 
224
  /* session-wide random string */
 
225
  char          scramble[SCRAMBLE_LENGTH+1];
 
226
  bool unused1;
 
227
  void *unused2, *unused3, *unused4, *unused5;
 
228
 
 
229
  LIST  *stmts;                     /* list of all statements */
 
230
  const struct st_mysql_methods *methods;
 
231
  void *thd;
 
232
  /*
 
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.
 
235
  */
 
236
  bool *unbuffered_fetch_owner;
 
237
  /* needed for embedded server - no net buffer to store the 'info' */
 
238
  char *info_buffer;
 
239
  void *extension;
 
240
} MYSQL;
 
241
 
 
242
 
 
243
typedef struct st_mysql_res {
 
244
  uint64_t  row_count;
 
245
  MYSQL_FIELD   *fields;
 
246
  MYSQL_DATA    *data;
 
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;  
 
258
  void *extension;
 
259
} MYSQL_RES;
 
260
 
 
261
 
 
262
#if !defined(MYSQL_SERVER) && !defined(MYSQL_CLIENT)
 
263
#define MYSQL_CLIENT
 
264
#endif
 
265
 
 
266
 
 
267
typedef struct st_mysql_parameters
 
268
{
 
269
  uint32_t *p_max_allowed_packet;
 
270
  uint32_t *p_net_buffer_length;
 
271
  void *extension;
 
272
} MYSQL_PARAMETERS;
 
273
 
 
274
#if !defined(MYSQL_SERVER)
 
275
#define max_allowed_packet (*mysql_get_parameters()->p_max_allowed_packet)
 
276
#define net_buffer_length (*mysql_get_parameters()->p_net_buffer_length)
 
277
#endif
 
278
 
 
279
/*
 
280
  Set up and bring down the server; to ensure that applications will
 
281
  work when linked against either the standard client library or the
 
282
  embedded server library, these functions should be called.
 
283
*/
 
284
int STDCALL mysql_server_init(int argc, char **argv, char **groups);
 
285
void STDCALL mysql_server_end(void);
 
286
 
 
287
/*
 
288
  mysql_server_init/end need to be called when using libmysqld or
 
289
  libmysqlclient (exactly, mysql_server_init() is called by mysql_init() so
 
290
  you don't need to call it explicitely; but you need to call
 
291
  mysql_server_end() to free memory). The names are a bit misleading
 
292
  (mysql_SERVER* to be used when using libmysqlCLIENT). So we add more general
 
293
  names which suit well whether you're using libmysqld or libmysqlclient. We
 
294
  intend to promote these aliases over the mysql_server* ones.
 
295
*/
 
296
#define mysql_library_init mysql_server_init
 
297
#define mysql_library_end mysql_server_end
 
298
 
 
299
MYSQL_PARAMETERS *STDCALL mysql_get_parameters(void);
 
300
 
 
301
/*
 
302
  Set up and bring down a thread; these function should be called
 
303
  for each thread in an application which opens at least one MySQL
 
304
  connection.  All uses of the connection(s) should be between these
 
305
  function calls.
 
306
*/
 
307
my_bool STDCALL mysql_thread_init(void);
 
308
void STDCALL mysql_thread_end(void);
 
309
 
 
310
/*
 
311
  Functions to get information from the MYSQL and MYSQL_RES structures
 
312
  Should definitely be used if one uses shared libraries.
 
313
*/
 
314
 
 
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);
 
323
 
 
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);
 
335
 
 
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,
 
340
                                           const char *user,
 
341
                                           const char *passwd,
 
342
                                           const char *db,
 
343
                                           uint32_t port,
 
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);
 
352
 
 
353
void        STDCALL mysql_get_character_set_info(MYSQL *mysql,
 
354
                           MY_CHARSET_INFO *charset);
 
355
 
 
356
/* local infile support */
 
357
 
 
358
#define LOCAL_INFILE_ERROR_LEN 512
 
359
 
 
360
void
 
361
mysql_set_local_infile_handler(MYSQL *mysql,
 
362
                               int (*local_infile_init)(void **, const char *,
 
363
                            void *),
 
364
                               int (*local_infile_read)(void *, char *,
 
365
                                                        unsigned int),
 
366
                               void (*local_infile_end)(void *),
 
367
                               int (*local_infile_error)(void *, char*,
 
368
                                                         unsigned int),
 
369
                               void *);
 
370
 
 
371
void
 
372
mysql_set_local_infile_default(MYSQL *mysql);
 
373
 
 
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);
 
406
 
 
407
 
 
408
 
 
409
typedef struct st_mysql_methods
 
410
{
 
411
  bool (*read_query_result)(MYSQL *mysql);
 
412
  bool (*advanced_command)(MYSQL *mysql,
 
413
                           enum enum_server_command command,
 
414
                           const unsigned char *header,
 
415
                           uint32_t header_length,
 
416
                           const unsigned char *arg,
 
417
                           uint32_t arg_length,
 
418
                           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);
 
428
} MYSQL_METHODS;
 
429
 
 
430
 
 
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);
 
437
 
 
438
 
 
439
/* status return codes */
 
440
#define MYSQL_NO_DATA        100
 
441
#define MYSQL_DATA_TRUNCATED 101
 
442
 
 
443
#define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT)
 
444
 
 
445
/*
 
446
  The following functions are mainly exported because of mysqlbinlog;
 
447
  They are not for general usage
 
448
*/
 
449
 
 
450
#define simple_command(mysql, command, arg, length, skip_check) \
 
451
  (*(mysql)->methods->advanced_command)(mysql, command, 0,  \
 
452
                                        0, arg, length, skip_check)
 
453
 
 
454
#ifdef  __cplusplus
 
455
}
 
456
#endif
 
457
 
 
458
#endif /* _mysql_h */