MySQL  8.0.17
Source Code Documentation
mysql.h
Go to the documentation of this file.
1 /* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
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, version 2.0,
5  as published by the Free Software Foundation.
6 
7  This program is also distributed with certain software (including
8  but not limited to OpenSSL) that is licensed under separate terms,
9  as designated in a particular file or component or in included license
10  documentation. The authors of MySQL hereby grant you an additional
11  permission to link the program and your derivative works with the
12  separately licensed software that they have included with MySQL.
13 
14  Without limiting anything contained in the foregoing, this file,
15  which is part of C Driver for MySQL (Connector/C), is also subject to the
16  Universal FOSS Exception, version 1.0, a copy of which can be found at
17  http://oss.oracle.com/licenses/universal-foss-exception.
18 
19  This program is distributed in the hope that it will be useful,
20  but WITHOUT ANY WARRANTY; without even the implied warranty of
21  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  GNU General Public License, version 2.0, for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with this program; if not, write to the Free Software
26  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
27 
28 /**
29  @file include/mysql.h
30  This file defines the client API to MySQL and also the ABI of the
31  dynamically linked libmysqlclient.
32 
33  The ABI should never be changed in a released product of MySQL,
34  thus you need to take great care when changing the file. In case
35  the file is changed so the ABI is broken, you must also update
36  the SHARED_LIB_MAJOR_VERSION in cmake/mysql_version.cmake
37 */
38 
39 #ifndef _mysql_h
40 #define _mysql_h
41 
42 #ifndef MYSQL_ABI_CHECK
43 #include <stdbool.h>
44 #include <stddef.h>
45 #include <sys/types.h>
46 #endif
47 
48 // Small extra definitions to avoid pulling in my_inttypes.h in client code.
49 // IWYU pragma: no_include "my_inttypes.h"
50 #if defined(_WIN32)
51 typedef unsigned __int64 my_ulonglong;
52 #else
53 typedef unsigned long long my_ulonglong;
54 #endif /* _WIN32 */
55 
56 #ifndef my_socket_defined
57 #define my_socket_defined
58 #ifdef _WIN32
59 #include <windows.h>
60 #ifdef WIN32_LEAN_AND_MEAN
61 #include <winsock2.h>
62 #endif
63 #define my_socket SOCKET
64 #else
65 typedef int my_socket;
66 #endif /* _WIN32 */
67 #endif /* my_socket_defined */
68 
69 // Small extra definition to avoid pulling in my_compiler.h in client code.
70 // IWYU pragma: no_include "my_compiler.h"
71 #ifndef MY_COMPILER_INCLUDED
72 #if !defined(_WIN32)
73 #define STDCALL
74 #else
75 #define STDCALL __stdcall
76 #endif
77 #endif /* MY_COMPILER_INCLUDED */
78 
79 #include "field_types.h"
80 #include "my_list.h"
81 #include "mysql_com.h"
82 
83 /* Include declarations of plug-in API */
84 #include "mysql/client_plugin.h" // IWYU pragma: keep
85 
86 /*
87  The client should be able to know which version it is compiled against,
88  even if mysql.h doesn't use this information directly.
89 */
90 #include "mysql_version.h" // IWYU pragma: keep
91 
92 // MYSQL_TIME is part of our public API.
93 #include "mysql_time.h" // IWYU pragma: keep
94 
95 // The error messages are part of our public API.
96 #include "errmsg.h" // IWYU pragma: keep
97 
98 #ifdef __cplusplus
99 extern "C" {
100 #endif
101 
102 extern unsigned int mysql_port;
103 extern char *mysql_unix_port;
104 
105 #define CLIENT_NET_RETRY_COUNT 1 /* Retry count */
106 #define CLIENT_NET_READ_TIMEOUT 365 * 24 * 3600 /* Timeout on read */
107 #define CLIENT_NET_WRITE_TIMEOUT 365 * 24 * 3600 /* Timeout on write */
108 
109 #define IS_PRI_KEY(n) ((n)&PRI_KEY_FLAG)
110 #define IS_NOT_NULL(n) ((n)&NOT_NULL_FLAG)
111 #define IS_BLOB(n) ((n)&BLOB_FLAG)
112 /**
113  Returns true if the value is a number which does not need quotes for
114  the sql_lex.cc parser to parse correctly.
115 */
116 #define IS_NUM(t) \
117  (((t) <= MYSQL_TYPE_INT24 && (t) != MYSQL_TYPE_TIMESTAMP) || \
118  (t) == MYSQL_TYPE_YEAR || (t) == MYSQL_TYPE_NEWDECIMAL)
119 #define IS_LONGDATA(t) ((t) >= MYSQL_TYPE_TINY_BLOB && (t) <= MYSQL_TYPE_STRING)
120 
121 typedef struct MYSQL_FIELD {
122  char *name; /* Name of column */
123  char *org_name; /* Original column name, if an alias */
124  char *table; /* Table of column if column was a field */
125  char *org_table; /* Org table name, if table was an alias */
126  char *db; /* Database for table */
127  char *catalog; /* Catalog for table */
128  char *def; /* Default value (set by mysql_list_fields) */
129  unsigned long length; /* Width of column (create length) */
130  unsigned long max_length; /* Max width for selected set */
131  unsigned int name_length;
132  unsigned int org_name_length;
133  unsigned int table_length;
134  unsigned int org_table_length;
135  unsigned int db_length;
136  unsigned int catalog_length;
137  unsigned int def_length;
138  unsigned int flags; /* Div flags */
139  unsigned int decimals; /* Number of decimals in field */
140  unsigned int charsetnr; /* Character set */
141  enum enum_field_types type; /* Type of field. See mysql_com.h for types */
142  void *extension;
143 } MYSQL_FIELD;
144 
145 typedef char **MYSQL_ROW; /* return data as array of strings */
146 typedef unsigned int MYSQL_FIELD_OFFSET; /* offset to current field */
147 
148 #define MYSQL_COUNT_ERROR (~(my_ulonglong)0)
149 
150 /* backward compatibility define - to be removed eventually */
151 #define ER_WARN_DATA_TRUNCATED WARN_DATA_TRUNCATED
152 
153 typedef struct MYSQL_ROWS {
154  struct MYSQL_ROWS *next; /* list of rows */
156  unsigned long length;
157 } MYSQL_ROWS;
158 
159 typedef MYSQL_ROWS *MYSQL_ROW_OFFSET; /* offset to current row */
160 
161 struct MEM_ROOT;
162 
163 typedef struct MYSQL_DATA {
165  struct MEM_ROOT *alloc;
167  unsigned int fields;
168 } MYSQL_DATA;
169 
212 };
213 
214 /**
215  @todo remove the "extension", move st_mysql_options completely
216  out of mysql.h
217 */
219 
222  unsigned int port, protocol;
223  unsigned long client_flag;
224  char *host, *user, *password, *unix_socket, *db;
227  char *ssl_key; /* PEM key file */
228  char *ssl_cert; /* PEM cert file */
229  char *ssl_ca; /* PEM CA file */
230  char *ssl_capath; /* PEM directory of CA-s? */
231  char *ssl_cipher; /* cipher to use */
233  unsigned long max_allowed_packet;
235  /**
236  The local address to bind when connecting to remote server.
237  */
239  /* 0 - never report, 1 - always report (default) */
241 
242  /* function pointers for local infile support */
243  int (*local_infile_init)(void **, const char *, void *);
244  int (*local_infile_read)(void *, char *, unsigned int);
245  void (*local_infile_end)(void *);
246  int (*local_infile_error)(void *, char *, unsigned int);
249 };
250 
256 };
257 
264 };
265 
272 };
273 
278 };
279 
280 typedef struct character_set {
281  unsigned int number; /* character set number */
282  unsigned int state; /* character set state */
283  const char *csname; /* collation name */
284  const char *name; /* character set name */
285  const char *comment; /* comment */
286  const char *dir; /* character set directory */
287  unsigned int mbminlen; /* min. length for multibyte strings */
288  unsigned int mbmaxlen; /* max. length for multibyte strings */
290 
291 struct MYSQL_METHODS;
292 struct MYSQL_STMT;
293 
294 typedef struct MYSQL {
295  NET net; /* Communication parameters */
296  unsigned char *connector_fd; /* ConnectorFd for SSL */
298  char *info, *db;
303  my_ulonglong insert_id; /* id if insert on table with NEXTNR */
304  my_ulonglong extra_info; /* Not used */
305  unsigned long thread_id; /* Id for connection in server */
306  unsigned long packet_length;
307  unsigned int port;
309  unsigned int protocol_version;
310  unsigned int field_count;
311  unsigned int server_status;
312  unsigned int server_language;
313  unsigned int warning_count;
317  bool free_me; /* If free in mysql_close */
318  bool reconnect; /* set to 1 if automatic reconnect */
319 
320  /* session-wide random string */
322 
323  LIST *stmts; /* list of all statements */
324  const struct MYSQL_METHODS *methods;
325  void *thd;
326  /*
327  Points to boolean flag in MYSQL_RES or MYSQL_STMT. We set this flag
328  from mysql_stmt_close if close had to cancel result set of this object.
329  */
331  void *extension;
332 } MYSQL;
333 
334 typedef struct MYSQL_RES {
337  struct MYSQL_DATA *data;
339  unsigned long *lengths; /* column lengths of current row */
340  MYSQL *handle; /* for unbuffered reads */
341  const struct MYSQL_METHODS *methods;
342  MYSQL_ROW row; /* If unbuffered read */
343  MYSQL_ROW current_row; /* buffer to current row */
345  unsigned int field_count, current_field;
346  bool eof; /* Used by mysql_fetch_row */
347  /* mysql_stmt_close() had to cancel this result */
350  void *extension;
351 } MYSQL_RES;
352 
353 /**
354  Flag to indicate that COM_BINLOG_DUMP_GTID should
355  be used rather than COM_BINLOG_DUMP in the @sa mysql_binlog_open().
356 */
357 #define MYSQL_RPL_GTID (1 << 16)
358 /**
359  Skip HEARBEAT events in the @sa mysql_binlog_fetch().
360 */
361 #define MYSQL_RPL_SKIP_HEARTBEAT (1 << 17)
362 
363 /**
364  Struct for information about a replication stream.
365 
366  @sa mysql_binlog_open()
367  @sa mysql_binlog_fetch()
368  @sa mysql_binlog_close()
369 */
370 typedef struct MYSQL_RPL {
371  size_t file_name_length; /** Length of the 'file_name' or 0 */
372  const char *file_name; /** Filename of the binary log to read */
373  my_ulonglong start_position; /** Position in the binary log to */
374  /* start reading from */
375  unsigned int server_id; /** Server ID to use when identifying */
376  /* with the master */
377  unsigned int flags; /** Flags, e.g. MYSQL_RPL_GTID */
378 
379  /** Size of gtid set data */
381  /** Callback function which is called */
382  /* from @sa mysql_binlog_open() to */
383  /* fill command packet gtid set */
384  void (*fix_gtid_set)(struct MYSQL_RPL *rpl, unsigned char *packet_gtid_set);
385  void *gtid_set_arg; /** GTID set data or an argument for */
386  /* fix_gtid_set() callback function */
387 
388  unsigned long size; /** Size of the packet returned by */
389  /* mysql_binlog_fetch() */
390  const unsigned char *buffer; /** Pointer to returned data */
391 } MYSQL_RPL;
392 
393 /*
394  Set up and bring down the server; to ensure that applications will
395  work when linked against either the standard client library or the
396  embedded server library, these functions should be called.
397 */
398 int STDCALL mysql_server_init(int argc, char **argv, char **groups);
399 void STDCALL mysql_server_end(void);
400 
401 /*
402  mysql_server_init/end need to be called when using libmysqld or
403  libmysqlclient (exactly, mysql_server_init() is called by mysql_init() so
404  you don't need to call it explicitely; but you need to call
405  mysql_server_end() to free memory). The names are a bit misleading
406  (mysql_SERVER* to be used when using libmysqlCLIENT). So we add more general
407  names which suit well whether you're using libmysqld or libmysqlclient. We
408  intend to promote these aliases over the mysql_server* ones.
409 */
410 #define mysql_library_init mysql_server_init
411 #define mysql_library_end mysql_server_end
412 
413 /*
414  Set up and bring down a thread; these function should be called
415  for each thread in an application which opens at least one MySQL
416  connection. All uses of the connection(s) should be between these
417  function calls.
418 */
419 bool STDCALL mysql_thread_init(void);
420 void STDCALL mysql_thread_end(void);
421 
422 /*
423  Functions to get information from the MYSQL and MYSQL_RES structures
424  Should definitely be used if one uses shared libraries.
425 */
426 
428 unsigned int STDCALL mysql_num_fields(MYSQL_RES *res);
429 bool STDCALL mysql_eof(MYSQL_RES *res);
431  unsigned int fieldnr);
436 
437 unsigned int STDCALL mysql_field_count(MYSQL *mysql);
440 unsigned int STDCALL mysql_errno(MYSQL *mysql);
441 const char *STDCALL mysql_error(MYSQL *mysql);
442 const char *STDCALL mysql_sqlstate(MYSQL *mysql);
443 unsigned int STDCALL mysql_warning_count(MYSQL *mysql);
444 const char *STDCALL mysql_info(MYSQL *mysql);
445 unsigned long STDCALL mysql_thread_id(MYSQL *mysql);
447 int STDCALL mysql_set_character_set(MYSQL *mysql, const char *csname);
448 
450 bool STDCALL mysql_ssl_set(MYSQL *mysql, const char *key, const char *cert,
451  const char *ca, const char *capath,
452  const char *cipher);
454 bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
455  const char *passwd, const char *db);
457  const char *user, const char *passwd,
458  const char *db, unsigned int port,
459  const char *unix_socket,
460  unsigned long clientflag);
461 int STDCALL mysql_select_db(MYSQL *mysql, const char *db);
462 int STDCALL mysql_query(MYSQL *mysql, const char *q);
463 int STDCALL mysql_send_query(MYSQL *mysql, const char *q, unsigned long length);
464 int STDCALL mysql_real_query(MYSQL *mysql, const char *q, unsigned long length);
467 
469  MYSQL *mysql, const char *host, const char *user, const char *passwd,
470  const char *db, unsigned int port, const char *unix_socket,
471  unsigned long clientflag);
473  MYSQL *mysql, const char *query, unsigned long length);
475  MYSQL *mysql, const char *query, unsigned long length);
480  const char *db,
481  bool *error);
483  MY_CHARSET_INFO *charset);
484 
487  const char **data, size_t *length);
490  const char **data, size_t *length);
491 /* local infile support */
492 
493 #define LOCAL_INFILE_ERROR_LEN 512
494 
496  MYSQL *mysql, int (*local_infile_init)(void **, const char *, void *),
497  int (*local_infile_read)(void *, char *, unsigned int),
498  void (*local_infile_end)(void *),
499  int (*local_infile_error)(void *, char *, unsigned int), void *);
500 
503  enum mysql_enum_shutdown_level shutdown_level);
505 int STDCALL mysql_refresh(MYSQL *mysql, unsigned int refresh_options);
506 int STDCALL mysql_kill(MYSQL *mysql, unsigned long pid);
510 const char *STDCALL mysql_stat(MYSQL *mysql);
512 const char *STDCALL mysql_get_client_info(void);
513 unsigned long STDCALL mysql_get_client_version(void);
514 const char *STDCALL mysql_get_host_info(MYSQL *mysql);
516 unsigned int STDCALL mysql_get_proto_info(MYSQL *mysql);
517 MYSQL_RES *STDCALL mysql_list_dbs(MYSQL *mysql, const char *wild);
518 MYSQL_RES *STDCALL mysql_list_tables(MYSQL *mysql, const char *wild);
521  const void *arg);
523  const void *arg1, const void *arg2);
525  const void *arg);
526 void STDCALL mysql_free_result(MYSQL_RES *result);
528 void STDCALL mysql_data_seek(MYSQL_RES *result, my_ulonglong offset);
530  MYSQL_ROW_OFFSET offset);
532  MYSQL_FIELD_OFFSET offset);
535  MYSQL_ROW *row);
536 
537 unsigned long *STDCALL mysql_fetch_lengths(MYSQL_RES *result);
539 MYSQL_RES *STDCALL mysql_list_fields(MYSQL *mysql, const char *table,
540  const char *wild);
541 unsigned long STDCALL mysql_escape_string(char *to, const char *from,
542  unsigned long from_length);
543 unsigned long STDCALL mysql_hex_string(char *to, const char *from,
544  unsigned long from_length);
545 unsigned long STDCALL mysql_real_escape_string(MYSQL *mysql, char *to,
546  const char *from,
547  unsigned long length);
548 unsigned long STDCALL mysql_real_escape_string_quote(MYSQL *mysql, char *to,
549  const char *from,
550  unsigned long length,
551  char quote);
552 void STDCALL mysql_debug(const char *debug);
554 unsigned int STDCALL mysql_thread_safe(void);
557 
561 
562 /*
563  The following definitions are added for the enhanced
564  client-server protocol
565 */
566 
567 /* statement state */
573 };
574 
575 /*
576  This structure is used to define bind information, and
577  internally by the client library.
578  Public members with their descriptions are listed below
579  (conventionally `On input' refers to the binds given to
580  mysql_stmt_bind_param, `On output' refers to the binds given
581  to mysql_stmt_bind_result):
582 
583  buffer_type - One of the MYSQL_* types, used to describe
584  the host language type of buffer.
585  On output: if column type is different from
586  buffer_type, column value is automatically converted
587  to buffer_type before it is stored in the buffer.
588  buffer - On input: points to the buffer with input data.
589  On output: points to the buffer capable to store
590  output data.
591  The type of memory pointed by buffer must correspond
592  to buffer_type. See the correspondence table in
593  the comment to mysql_stmt_bind_param.
594 
595  The two above members are mandatory for any kind of bind.
596 
597  buffer_length - the length of the buffer. You don't have to set
598  it for any fixed length buffer: float, double,
599  int, etc. It must be set however for variable-length
600  types, such as BLOBs or STRINGs.
601 
602  length - On input: in case when lengths of input values
603  are different for each execute, you can set this to
604  point at a variable containining value length. This
605  way the value length can be different in each execute.
606  If length is not NULL, buffer_length is not used.
607  Note, length can even point at buffer_length if
608  you keep bind structures around while fetching:
609  this way you can change buffer_length before
610  each execution, everything will work ok.
611  On output: if length is set, mysql_stmt_fetch will
612  write column length into it.
613 
614  is_null - On input: points to a boolean variable that should
615  be set to TRUE for NULL values.
616  This member is useful only if your data may be
617  NULL in some but not all cases.
618  If your data is never NULL, is_null should be set to 0.
619  If your data is always NULL, set buffer_type
620  to MYSQL_TYPE_NULL, and is_null will not be used.
621 
622  is_unsigned - On input: used to signify that values provided for one
623  of numeric types are unsigned.
624  On output describes signedness of the output buffer.
625  If, taking into account is_unsigned flag, column data
626  is out of range of the output buffer, data for this column
627  is regarded truncated. Note that this has no correspondence
628  to the sign of result set column, if you need to find it out
629  use mysql_stmt_result_metadata.
630  error - where to write a truncation error if it is present.
631  possible error value is:
632  0 no truncation
633  1 value is out of range or buffer is too small
634 
635  Please note that MYSQL_BIND also has internals members.
636 */
637 
638 typedef struct MYSQL_BIND {
639  unsigned long *length; /* output length pointer */
640  bool *is_null; /* Pointer to null indicator */
641  void *buffer; /* buffer to get/put data */
642  /* set this if you want to track data truncations happened during fetch */
643  bool *error;
644  unsigned char *row_ptr; /* for the current data position */
645  void (*store_param_func)(NET *net, struct MYSQL_BIND *param);
646  void (*fetch_result)(struct MYSQL_BIND *, MYSQL_FIELD *, unsigned char **row);
647  void (*skip_result)(struct MYSQL_BIND *, MYSQL_FIELD *, unsigned char **row);
648  /* output buffer length, must be set when fetching str/binary */
649  unsigned long buffer_length;
650  unsigned long offset; /* offset position for char/binary fetch */
651  unsigned long length_value; /* Used if length is 0 */
652  unsigned int param_number; /* For null count and error messages */
653  unsigned int pack_length; /* Internal length for packed data */
654  enum enum_field_types buffer_type; /* buffer type */
655  bool error_value; /* used if error is 0 */
656  bool is_unsigned; /* set if integer type is unsigned */
657  bool long_data_used; /* If used with mysql_send_long_data */
658  bool is_null_value; /* Used if is_null is 0 */
659  void *extension;
660 } MYSQL_BIND;
661 
662 struct MYSQL_STMT_EXT;
663 
664 /* statement handler */
665 typedef struct MYSQL_STMT {
666  struct MEM_ROOT *mem_root; /* root allocations */
667  LIST list; /* list to keep track of all stmts */
668  MYSQL *mysql; /* connection handle */
669  MYSQL_BIND *params; /* input parameters */
670  MYSQL_BIND *bind; /* output parameters */
671  MYSQL_FIELD *fields; /* result set metadata */
672  MYSQL_DATA result; /* cached result set */
673  MYSQL_ROWS *data_cursor; /* current row in cached result */
674  /*
675  mysql_stmt_fetch() calls this function to fetch one row (it's different
676  for buffered, unbuffered and cursor fetch).
677  */
678  int (*read_row_func)(struct MYSQL_STMT *stmt, unsigned char **row);
679  /* copy of mysql->affected_rows after statement execution */
681  my_ulonglong insert_id; /* copy of mysql->insert_id */
682  unsigned long stmt_id; /* Id for prepared statement */
683  unsigned long flags; /* i.e. type of cursor to open */
684  unsigned long prefetch_rows; /* number of rows per one COM_FETCH */
685  /*
686  Copied from mysql->server_status after execute/fetch to know
687  server-side cursor status for this statement.
688  */
689  unsigned int server_status;
690  unsigned int last_errno; /* error code */
691  unsigned int param_count; /* input parameter count */
692  unsigned int field_count; /* number of columns in result set */
693  enum enum_mysql_stmt_state state; /* statement state */
694  char last_error[MYSQL_ERRMSG_SIZE]; /* error message */
696  /* Types of input parameters should be sent to server */
698  bool bind_param_done; /* input buffers were supplied */
699  unsigned char bind_result_done; /* output buffers were supplied */
700  /* mysql_stmt_close() had to cancel this result */
702  /*
703  Is set to true if we need to calculate field->max_length for
704  metadata fields when doing mysql_stmt_store_result.
705  */
708 } MYSQL_STMT;
709 
711  /*
712  When doing mysql_stmt_store_result calculate max_length attribute
713  of statement metadata. This is to be consistent with the old API,
714  where this was done automatically.
715  In the new API we do that only by request because it slows down
716  mysql_stmt_store_result sufficiently.
717  */
719  /*
720  unsigned long with combination of cursor flags (read only, for update,
721  etc)
722  */
724  /*
725  Amount of rows to retrieve from server per one fetch if using cursors.
726  Accepts unsigned long attribute in the range 1 - ulong_max
727  */
729 };
730 
732 int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query,
733  unsigned long length);
737  unsigned int column, unsigned long offset);
739 unsigned long STDCALL mysql_stmt_param_count(MYSQL_STMT *stmt);
741  enum enum_stmt_attr_type attr_type,
742  const void *attr);
744  enum enum_stmt_attr_type attr_type,
745  void *attr);
752  unsigned int param_number,
753  const char *data, unsigned long length);
756 unsigned int STDCALL mysql_stmt_errno(MYSQL_STMT *stmt);
757 const char *STDCALL mysql_stmt_error(MYSQL_STMT *stmt);
758 const char *STDCALL mysql_stmt_sqlstate(MYSQL_STMT *stmt);
760  MYSQL_ROW_OFFSET offset);
766 unsigned int STDCALL mysql_stmt_field_count(MYSQL_STMT *stmt);
767 
770 bool STDCALL mysql_autocommit(MYSQL *mysql, bool auto_mode);
775 
776 /* Public key reset */
778 
779 /* status return codes */
780 #define MYSQL_NO_DATA 100
781 #define MYSQL_DATA_TRUNCATED 101
782 
783 #define mysql_reload(mysql) mysql_refresh((mysql), REFRESH_GRANT)
784 
785 #define HAVE_MYSQL_REAL_CONNECT
786 
787 #ifdef __cplusplus
788 }
789 #endif
790 
791 #endif /* _mysql_h */
Definition: mysql.h:183
const char * comment
Definition: mysql.h:285
unsigned int write_timeout
Definition: mysql.h:221
const char *STDCALL mysql_get_client_info(void)
Definition: libmysql.cc:843
Struct for information about a replication stream.
Definition: mysql.h:370
MYSQL_RES *STDCALL mysql_list_fields(MYSQL *mysql, const char *table, const char *wild)
Definition: libmysql.cc:702
unsigned int STDCALL mysql_get_proto_info(MYSQL *mysql)
Definition: libmysql.cc:839
unsigned long size
GTID set data or an argument for.
Definition: mysql.h:388
bool * error
Definition: mysql.h:643
mysql_protocol_type
Definition: mysql.h:258
bool named_pipe
Definition: mysql.h:234
unsigned long STDCALL mysql_escape_string(char *to, const char *from, unsigned long from_length)
Definition: libmysql.cc:994
unsigned int fields
Definition: mysql.h:167
unsigned long STDCALL mysql_get_client_version(void)
Definition: libmysql.cc:845
unsigned long offset
Definition: mysql.h:650
Definition: mysql.h:180
Definition: mysql.h:205
unsigned long * length
Definition: mysql.h:639
This file contains the field type.
unsigned int mbminlen
Definition: mysql.h:287
Definition: mysql.h:267
unsigned int protocol
Definition: mysql.h:222
char * charset_name
Definition: mysql.h:226
MYSQL_FIELD *STDCALL mysql_fetch_fields(MYSQL_RES *res)
Definition: libmysql.cc:854
void(* fetch_result)(struct MYSQL_BIND *, MYSQL_FIELD *, unsigned char **row)
Definition: mysql.h:646
MYSQL_ROW row
Definition: mysql.h:342
MYSQL_ROWS * MYSQL_ROW_OFFSET
Definition: mysql.h:159
const char *STDCALL mysql_stmt_error(MYSQL_STMT *stmt)
Definition: libmysql.cc:4461
Definition: mysql.h:177
int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind_arg, unsigned int column, unsigned long offset)
Definition: libmysql.cc:3993
struct character_set MY_CHARSET_INFO
unsigned int mbmaxlen
Definition: mysql.h:288
bool update_max_length
Definition: mysql.h:706
char * db
Definition: mysql.h:224
MYSQL_RES *STDCALL mysql_list_tables(MYSQL *mysql, const char *wild)
Definition: libmysql.cc:669
get_options & argc
Definition: do_ctype.cc:51
unsigned long STDCALL mysql_get_server_version(MYSQL *mysql)
Definition: client.cc:8108
char * user
Definition: mysqladmin.cc:58
MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_tell(MYSQL_STMT *stmt)
Definition: libmysql.cc:4253
MYSQL_RES *STDCALL mysql_stmt_result_metadata(MYSQL_STMT *stmt)
Definition: libmysql.cc:1661
unsigned int param_number
Definition: mysql.h:652
struct Init_commands_array * init_commands
Definition: mysql.h:225
my_ulonglong insert_id
Definition: mysql.h:303
MYSQL_ROW STDCALL mysql_fetch_row(MYSQL_RES *result)
Definition: client.cc:7342
unsigned long flags
Definition: mysql.h:683
int debug
Definition: example2.cc:1
mysql_option
Definition: mysql.h:170
Definition: mysql.h:121
MYSQL * handle
Definition: mysql.h:340
static char * query
Definition: myisam_ftdump.cc:44
Definition: mysql.h:207
void STDCALL mysql_reset_server_public_key(void)
Definition: mysql.h:260
Definition: mysql.h:208
const string name("\ame\)
void(* store_param_func)(NET *net, struct MYSQL_BIND *param)
Definition: mysql.h:645
Definition: mysql.h:572
MYSQL_ROWS * data_cursor
Definition: mysql.h:673
char * db
Definition: mysql.h:298
bool STDCALL mysql_eof(MYSQL_RES *res)
Definition: libmysql.cc:847
char * my_cnf_file
Definition: mysql.h:226
unsigned int read_timeout
Definition: mysql.h:221
int STDCALL mysql_set_server_option(MYSQL *mysql, enum enum_mysql_set_option option)
Definition: libmysql.cc:788
NET net
Definition: mysql.h:295
bool error_value
Definition: mysql.h:655
int(* local_infile_read)(void *, char *, unsigned int)
Definition: mysql.h:244
Definition: mysql.h:182
void mysql_set_local_infile_handler(MYSQL *mysql, int(*local_infile_init)(void **, const char *, void *), int(*local_infile_read)(void *, char *, unsigned int), void(*local_infile_end)(void *), int(*local_infile_error)(void *, char *, unsigned int), void *)
Definition: libmysql.cc:578
unsigned int name_length
Definition: mysql.h:131
int(* read_row_func)(struct MYSQL_STMT *stmt, unsigned char **row)
Definition: mysql.h:678
char * host_info
Definition: mysql.h:297
const char *STDCALL mysql_stmt_sqlstate(MYSQL_STMT *stmt)
Definition: libmysql.cc:4452
Definition: mysql.h:179
unsigned long length_value
Definition: mysql.h:651
char * org_table
Definition: mysql.h:125
Definition: mysql.h:172
MYSQL_RES *STDCALL mysql_store_result(MYSQL *mysql)
Definition: client.cc:7152
mysql_enum_shutdown_level
We want levels to be in growing order of hardness (because we use number comparisons).
Definition: mysql_com.h:920
bool STDCALL mysql_thread_init(void)
Definition: libmysql.cc:210
Definition: mysql.h:276
Definition: mysql.h:194
my_ulonglong STDCALL mysql_insert_id(MYSQL *mysql)
Definition: libmysql.cc:880
unsigned int port
Definition: mysql.h:307
char * ssl_ca
Definition: mysql.h:229
unsigned char * row_ptr
Definition: mysql.h:644
enum net_async_status STDCALL mysql_free_result_nonblocking(MYSQL_RES *result)
Frees the memory allocated for a result, set by APIs which would have returned rows.
Definition: client.cc:1830
int STDCALL mysql_refresh(MYSQL *mysql, unsigned int refresh_options)
Definition: libmysql.cc:765
bool STDCALL mysql_change_user(MYSQL *mysql, const char *user, const char *passwd, const char *db)
Definition: libmysql.cc:265
struct MYSQL_ROWS * next
Definition: mysql.h:154
Definition: mysql.h:718
enum enum_mysql_stmt_state state
Definition: mysql.h:693
enum net_async_status STDCALL mysql_next_result_nonblocking(MYSQL *mysql)
Definition: libmysql.cc:4557
enum net_async_status STDCALL mysql_fetch_row_nonblocking(MYSQL_RES *res, MYSQL_ROW *row)
Reads next row of a result set in an asynchronous way.
Definition: client.cc:7392
enum enum_field_types buffer_type
Definition: mysql.h:654
static MYSQL * sock
Definition: mysqlcheck.cc:54
enum mysql_status status
Definition: mysql.h:315
void STDCALL mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong offset)
Definition: libmysql.cc:4263
const char * host
Definition: mysqladmin.cc:57
char scramble[SCRAMBLE_LENGTH+1]
Definition: mysql.h:321
int STDCALL mysql_kill(MYSQL *mysql, unsigned long pid)
Definition: libmysql.cc:772
Definition: mysql.h:191
MYSQL *STDCALL mysql_init(MYSQL *mysql)
Definition: client.cc:3130
Definition: mysql.h:271
char sqlstate[SQLSTATE_LENGTH+1]
Definition: mysql.h:695
MYSQL_FIELD * fields
Definition: mysql.h:336
unsigned long long my_ulonglong
Definition: mysql.h:53
const char * csname
Definition: mysql.h:283
bool compress
Definition: mysql.h:234
bool STDCALL mysql_commit(MYSQL *mysql)
Definition: libmysql.cc:4474
int STDCALL mysql_send_query(MYSQL *mysql, const char *q, unsigned long length)
Definition: client.cc:7020
enum net_async_status STDCALL mysql_select_db_nonblocking(MYSQL *mysql, const char *db, bool *error)
int STDCALL mysql_next_result(MYSQL *mysql)
Definition: libmysql.cc:4521
my_ulonglong rows
Definition: mysql.h:166
#define STDCALL
Definition: mysql.h:73
int STDCALL mysql_session_track_get_first(MYSQL *mysql, enum enum_session_state_type type, const char **data, size_t *length)
Get the first state change information received from the server.
Definition: client.cc:8045
Definition: mysql.h:728
int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, unsigned long length)
Definition: libmysql.cc:1442
Definition: mysql.h:178
bool unbuffered_fetch_cancelled
Definition: mysql.h:701
Definition: mysql.h:261
my_ulonglong extra_info
Definition: mysql.h:304
enum enum_resultset_metadata STDCALL mysql_result_metadata(MYSQL_RES *result)
Definition: libmysql.cc:866
unsigned int table_length
Definition: mysql.h:133
void mysql_set_local_infile_default(MYSQL *mysql)
Definition: libmysql.cc:590
char * catalog
Definition: mysql.h:127
Definition: mysql.h:175
enum_resultset_metadata
Definition: mysql_com.h:939
Definition: init_commands_array.h:25
char * charset_dir
Definition: mysql.h:226
Definition: mysql.h:334
char * unix_socket
Definition: mysql.h:297
bool free_me
Definition: mysql.h:317
unsigned int field_count
Definition: mysql.h:310
char * unix_socket
Definition: mysql.h:224
char * name
Definition: mysql.h:122
unsigned long STDCALL mysql_stmt_param_count(MYSQL_STMT *stmt)
Definition: libmysql.cc:2423
MYSQL_RES *STDCALL mysql_list_dbs(MYSQL *mysql, const char *wild)
Definition: libmysql.cc:655
unsigned long length
Definition: mysql.h:129
void * gtid_set_arg
Definition: mysql.h:385
net_async_status
Definition: plugin_auth_common.h:130
Definition: mysql.h:211
struct MYSQL_DATA * data
Definition: mysql.h:337
void * extension
Definition: mysql.h:142
my_ulonglong STDCALL mysql_stmt_insert_id(MYSQL_STMT *stmt)
Definition: libmysql.cc:2461
int STDCALL mysql_server_init(int argc, char **argv, char **groups)
Definition: libmysql.cc:125
unsigned int flags
Definition: mysql.h:138
Definition: mysql.h:174
int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt)
Definition: libmysql.cc:4577
struct MYSQL_ROWS MYSQL_ROWS
Definition: mysql.h:268
enum net_async_status STDCALL mysql_real_query_nonblocking(MYSQL *mysql, const char *query, unsigned long length)
Executes the SQL statement pointed by query.
Definition: client.cc:7096
void STDCALL mysql_server_end(void)
Definition: libmysql.cc:192
int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt)
Definition: libmysql.cc:4143
unsigned int server_status
Definition: mysql.h:311
MYSQL_ROW data
Definition: mysql.h:155
unsigned int number
Definition: mysql.h:281
bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt)
Definition: libmysql.cc:4375
const char *STDCALL mysql_error(MYSQL *mysql)
Definition: client.cc:8008
int STDCALL mysql_stmt_fetch(MYSQL_STMT *stmt)
Definition: libmysql.cc:3960
Common definition between mysql server & client.
int STDCALL mysql_reset_connection(MYSQL *mysql)
Definition: libmysql.cc:4620
Definition: mysql.h:254
const char *STDCALL mysql_character_set_name(MYSQL *mysql)
Definition: libmysql.cc:909
unsigned long * lengths
Definition: mysql.h:339
unsigned int STDCALL mysql_warning_count(MYSQL *mysql)
Definition: libmysql.cc:886
unsigned int port
Definition: mysql.h:222
size_t file_name_length
Definition: mysql.h:371
struct st_mysql_options_extention * extension
Definition: mysql.h:248
unsigned int org_name_length
Definition: mysql.h:132
Definition: mysql.h:199
my_ulonglong STDCALL mysql_num_rows(MYSQL_RES *res)
Definition: client.cc:7998
void STDCALL mysql_close(MYSQL *sock)
Definition: client.cc:6824
Definition: mysql.h:184
Definition: mysql.h:204
void * buffer
Definition: mysql.h:641
Definition: mysql.h:638
#define SQLSTATE_LENGTH
Definition: mysql_com.h:72
my_ulonglong STDCALL mysql_affected_rows(MYSQL *mysql)
Definition: libmysql.cc:876
bool STDCALL mysql_read_query_result(MYSQL *mysql)
Definition: libmysql.cc:4616
Definition: mysql.h:153
bool is_null_value
Definition: mysql.h:658
Definition: mysql.h:571
unsigned int def_length
Definition: mysql.h:137
char * host
Definition: mysql.h:297
structure to define some default "config_option" option settings
Definition: innodb_config.h:180
static in_port_t port
Definition: testapp.c:33
mysql_ssl_mode
Definition: mysql.h:266
Definition: mysql.h:253
unsigned int db_length
Definition: mysql.h:135
bool * is_null
Definition: mysql.h:640
MYSQL_FIELD * fields
Definition: mysql.h:300
int STDCALL mysql_ping(MYSQL *mysql)
Definition: libmysql.cc:822
char last_error[MYSQL_ERRMSG_SIZE]
Definition: mysql.h:694
MYSQL_BIND * bind
Definition: mysql.h:670
unsigned long STDCALL mysql_real_escape_string_quote(MYSQL *mysql, char *to, const char *from, unsigned long length, char quote)
Escapes special characters in a string for use in an SQL statement.
Definition: libmysql.cc:1065
MYSQL_RES *STDCALL mysql_use_result(MYSQL *mysql)
Definition: libmysql.cc:4612
bool is_unsigned
Definition: mysql.h:656
char * my_cnf_group
Definition: mysql.h:226
Definition: mysql.h:195
Definition: mysql.h:193
int(* local_infile_error)(void *, char *, unsigned int)
Definition: mysql.h:246
Definition: mysql.h:197
char * bind_address
The local address to bind when connecting to remote server.
Definition: mysql.h:238
unsigned long client_flag
Definition: mysql.h:308
MYSQL_ROWS * data_cursor
Definition: mysql.h:338
my_ulonglong affected_rows
Definition: mysql.h:680
char * shared_memory_base_name
Definition: mysql.h:232
bool reconnect
Definition: mysql.h:318
const char *STDCALL mysql_get_server_info(MYSQL *mysql)
Definition: libmysql.cc:831
unsigned int pack_length
Definition: mysql.h:653
bool STDCALL mysql_stmt_free_result(MYSQL_STMT *stmt)
Definition: libmysql.cc:4351
MYSQL_FIELD * fields
Definition: mysql.h:671
my_ulonglong STDCALL mysql_stmt_num_rows(MYSQL_STMT *stmt)
Definition: libmysql.cc:4283
Definition: mysql.h:275
Definition: mysql.h:176
my_ulonglong start_position
Filename of the binary log to read.
Definition: mysql.h:373
unsigned int flags
Server ID to use when identifying.
Definition: mysql.h:377
char * argv[]
Definition: example1.cc:2
Definition: mysql.h:187
void(* skip_result)(struct MYSQL_BIND *, MYSQL_FIELD *, unsigned char **row)
Definition: mysql.h:647
unsigned int param_count
Definition: mysql.h:691
unsigned long long my_ulonglong
Definition: my_inttypes.h:78
Definition: mysql.h:570
bool STDCALL mysql_stmt_attr_get(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, void *attr)
Definition: libmysql.cc:2269
unsigned int MYSQL_FIELD_OFFSET
Definition: mysql.h:146
Definition: mysql.h:192
const struct MYSQL_METHODS * methods
Definition: mysql.h:341
unsigned int connect_timeout
Definition: mysql.h:221
MYSQL_ROW_OFFSET STDCALL mysql_row_tell(MYSQL_RES *res)
Definition: libmysql.cc:858
unsigned int field_count
Definition: mysql.h:345
LIST * stmts
Definition: mysql.h:323
Definition: mysql.h:259
unsigned int STDCALL mysql_field_count(MYSQL *mysql)
Definition: libmysql.cc:872
MYSQL_BIND * params
Definition: mysql.h:669
Definition: mysql.h:220
MYSQL_RES *STDCALL mysql_stmt_param_metadata(MYSQL_STMT *stmt)
Definition: libmysql.cc:1703
#define SCRAMBLE_LENGTH
Length of random string sent by server on handshake; this is also length of obfuscated password...
Definition: mysql_com.h:114
Definition: libmysql.cc:103
bool * unbuffered_fetch_owner
Definition: mysql.h:330
Definition: mysql.h:173
const char * name
Definition: mysql.h:284
enum_field_types
Column types for MySQL.
Definition: field_types.h:52
void STDCALL mysql_binlog_close(MYSQL *mysql, MYSQL_RPL *rpl)
Close replication stream.
Definition: client.cc:6655
Definition: mysql.h:181
unsigned int STDCALL mysql_errno(MYSQL *mysql)
Definition: client.cc:8004
char * password
Definition: mysql.h:224
unsigned int last_errno
Definition: mysql.h:690
#define MYSQL_ERRMSG_SIZE
Max length of a error message.
Definition: mysql_com.h:804
struct MYSQL MYSQL
MySQL Client Plugin API.
const char *STDCALL mysql_stat(MYSQL *mysql)
Definition: libmysql.cc:815
enum_stmt_attr_type
Definition: mysql.h:710
unsigned int mysql_port
Definition: client.cc:194
my_ulonglong insert_id
Definition: mysql.h:681
unsigned int protocol_version
Definition: mysql.h:309
void(* local_infile_end)(void *)
Definition: mysql.h:245
mysql_status
Definition: mysql.h:251
Definition: mysql.h:201
Definition: mysql.h:280
struct MYSQL_DATA MYSQL_DATA
unsigned int state
Definition: mysql.h:282
unsigned long STDCALL mysql_real_escape_string(MYSQL *mysql, char *to, const char *from, unsigned long length)
Escapes special characters in a string for use in an SQL statement.
Definition: libmysql.cc:1026
struct CHARSET_INFO * charset
Definition: mysql.h:299
Definition: mysql.h:252
bool STDCALL mysql_stmt_bind_param(MYSQL_STMT *stmt, MYSQL_BIND *bnd)
Definition: libmysql.cc:2637
void STDCALL mysql_data_seek(MYSQL_RES *result, my_ulonglong offset)
Definition: libmysql.cc:620
unsigned long thread_id
Definition: mysql.h:305
char * db
Definition: mysql.h:126
unsigned int field_count
Definition: mysql.h:692
MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_seek(MYSQL_STMT *stmt, MYSQL_ROW_OFFSET offset)
Definition: libmysql.cc:4240
const char *STDCALL mysql_sqlstate(MYSQL *mysql)
Definition: libmysql.cc:882
char * ssl_cert
Definition: mysql.h:228
void STDCALL mysql_thread_end(void)
Definition: libmysql.cc:212
unsigned long packet_length
Definition: mysql.h:306
int STDCALL mysql_session_track_get_next(MYSQL *mysql, enum enum_session_state_type type, const char **data, size_t *length)
Get the subsequent state change information received from the server.
Definition: client.cc:8072
LIST list
Definition: mysql.h:667
Definition: m_ctype.h:359
unsigned long max_allowed_packet
Definition: mysql.h:233
my_ulonglong affected_rows
Definition: mysql.h:302
int STDCALL mysql_query(MYSQL *mysql, const char *q)
Definition: libmysql.cc:602
MYSQL *STDCALL mysql_real_connect(MYSQL *mysql, const char *host, const char *user, const char *passwd, const char *db, unsigned int port, const char *unix_socket, unsigned long clientflag)
Definition: client.cc:5550
unsigned long max_length
Definition: mysql.h:130
struct MEM_ROOT * field_alloc
Definition: mysql.h:301
void * extension
Definition: mysql.h:350
bool send_types_to_server
Definition: mysql.h:697
enum net_async_status STDCALL mysql_store_result_nonblocking(MYSQL *mysql, MYSQL_RES **result)
This API reads all result set sent by server in an asynchronous way.
Definition: client.cc:7211
char * host
Definition: mysql.h:224
Definition: mysql.h:723
static const char * key
Definition: suite_stubs.c:14
Definition: sql_common.h:117
unsigned int current_field
Definition: mysql.h:345
struct MEM_ROOT * alloc
Definition: mysql.h:165
Definition: mysql.h:163
bool STDCALL mysql_more_results(MYSQL *mysql)
Definition: libmysql.cc:4509
enum net_async_status STDCALL mysql_send_query_nonblocking(MYSQL *mysql, const char *query, unsigned long length)
Executes the SQL statement pointed by query.
Definition: client.cc:7044
unsigned char * connector_fd
Definition: mysql.h:296
Definition: mysql.h:171
Definition: mysql.h:269
int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option, const void *arg)
Definition: client.cc:7466
bool unbuffered_fetch_cancelled
Definition: mysql.h:348
const char * dir
Definition: mysql.h:286
MYSQL_FIELD_OFFSET STDCALL mysql_field_tell(MYSQL_RES *res)
Definition: libmysql.cc:862
unsigned int STDCALL mysql_stmt_field_count(MYSQL_STMT *stmt)
Definition: libmysql.cc:2441
int(* local_infile_init)(void **, const char *, void *)
Definition: mysql.h:243
struct MYSQL_RPL MYSQL_RPL
Struct for information about a replication stream.
unsigned int decimals
Definition: mysql.h:139
void * local_infile_userdata
Definition: mysql.h:247
char * ssl_key
Definition: mysql.h:227
unsigned int org_table_length
Definition: mysql.h:134
unsigned int warning_count
Definition: mysql.h:313
my_ulonglong row_count
Definition: mysql.h:335
Definition: mysql.h:185
unsigned char bind_result_done
Definition: mysql.h:699
enum_session_state_type
Type of state change information that the server can include in the Ok packet.
Definition: mysql_com.h:967
MYSQL_ROW current_row
Definition: mysql.h:343
unsigned long *STDCALL mysql_fetch_lengths(MYSQL_RES *result)
Definition: client.cc:7457
bool report_data_truncation
Definition: mysql.h:240
void * extension
Definition: mysql.h:659
bool STDCALL mysql_rollback(MYSQL *mysql)
Definition: libmysql.cc:4483
int type
Definition: http_common.h:411
unsigned long client_flag
Definition: mysql.h:223
my_ulonglong STDCALL mysql_stmt_affected_rows(MYSQL_STMT *stmt)
Definition: libmysql.cc:2432
unsigned int STDCALL mysql_stmt_errno(MYSQL_STMT *stmt)
Definition: libmysql.cc:4447
char * table
Definition: mysql.h:124
unsigned long prefetch_rows
Definition: mysql.h:684
char * ssl_cipher
Definition: mysql.h:231
Definition: mysql.h:210
MYSQL_STMT *STDCALL mysql_stmt_init(MYSQL *mysql)
Definition: libmysql.cc:1371
Definition: mysql.h:198
void STDCALL mysql_get_character_set_info(MYSQL *mysql, MY_CHARSET_INFO *charset)
Definition: libmysql.cc:913
unsigned int STDCALL mysql_num_fields(MYSQL_RES *res)
Definition: client.cc:8000
MYSQL_FIELD *STDCALL mysql_fetch_field_direct(MYSQL_RES *res, unsigned int fieldnr)
Definition: libmysql.cc:849
Definition: mysql.h:206
void(* fix_gtid_set)(struct MYSQL_RPL *rpl, unsigned char *packet_gtid_set)
Callback function which is called.
Definition: mysql.h:384
bool STDCALL mysql_stmt_attr_set(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, const void *attr)
Definition: libmysql.cc:2239
Definition: my_list.h:41
int STDCALL mysql_set_character_set(MYSQL *mysql, const char *csname)
Definition: client.cc:8131
int my_socket
Definition: mysql.h:65
void * thd
Definition: mysql.h:325
bool STDCALL mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *bnd)
Definition: libmysql.cc:3819
int STDCALL mysql_real_query(MYSQL *mysql, const char *q, unsigned long length)
Definition: client.cc:7065
unsigned int server_id
Position in the binary log to.
Definition: mysql.h:375
Definition: mysql.h:270
Definition: mysql.h:190
Time declarations shared between the server and client API: you should not add anything to this heade...
unsigned long length
Definition: mysql.h:156
Definition: mysql.h:189
char ** MYSQL_ROW
Definition: mysql.h:145
unsigned int STDCALL mysql_thread_safe(void)
Definition: libmysql.cc:929
int STDCALL mysql_get_option(MYSQL *mysql, enum mysql_option option, const void *arg)
Return the current values for the options settable through mysql_options()
Definition: client.cc:7748
const char *STDCALL mysql_get_host_info(MYSQL *mysql)
Definition: libmysql.cc:835
static MYSQL mysql
Definition: mysql.cc:150
struct MEM_ROOT * mem_root
Definition: mysql.h:666
Definition: mysql.h:203
char * user
Definition: mysql.h:224
MYSQL_ROWS * data
Definition: mysql.h:164
mysql_ssl_fips_mode
Definition: mysql.h:274
bool long_data_used
Definition: mysql.h:657
unsigned int charsetnr
Definition: mysql.h:140
Definition: mysql.h:569
Definition: mysql.h:263
int STDCALL mysql_binlog_open(MYSQL *mysql, MYSQL_RPL *rpl)
Open a new replication stream.
Definition: client.cc:6488
unsigned long STDCALL mysql_thread_id(MYSQL *mysql)
Definition: libmysql.cc:899
char * passwd
Definition: mysql.h:297
int STDCALL mysql_shutdown(MYSQL *mysql, enum mysql_enum_shutdown_level shutdown_level)
Definition: libmysql.cc:756
Error messages for MySQL clients.
unsigned int catalog_length
Definition: mysql.h:136
Definition: mysql.h:262
char * user
Definition: mysql.h:297
struct MYSQL_FIELD MYSQL_FIELD
bool STDCALL mysql_stmt_send_long_data(MYSQL_STMT *stmt, unsigned int param_number, const char *data, unsigned long length)
Definition: libmysql.cc:2789
struct MEM_ROOT * field_alloc
Definition: mysql.h:344
enum enum_field_types type
Definition: mysql.h:141
struct MYSQL_STMT_EXT * extension
Definition: mysql.h:707
char * org_name
Definition: mysql.h:123
const char *STDCALL mysql_info(MYSQL *mysql)
Definition: libmysql.cc:888
Definition: mysql.h:294
struct st_mysql_options options
Definition: mysql.h:314
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:77
MYSQL_FIELD *STDCALL mysql_fetch_field(MYSQL_RES *result)
Definition: libmysql.cc:610
void * extension
Definition: mysql.h:331
const char * file_name
Length of the &#39;file_name&#39; or 0.
Definition: mysql.h:372
MYSQL_RES *STDCALL mysql_list_processes(MYSQL *mysql)
Definition: libmysql.cc:739
char * def
Definition: mysql.h:128
int STDCALL mysql_select_db(MYSQL *mysql, const char *db)
Definition: client.cc:6672
unsigned int server_language
Definition: mysql.h:312
enum enum_resultset_metadata metadata
Definition: mysql.h:349
unsigned long buffer_length
Definition: mysql.h:649
bool bind_param_done
Definition: mysql.h:698
Definition: mysql.h:277
struct MYSQL_BIND MYSQL_BIND
unsigned long STDCALL mysql_hex_string(char *to, const char *from, unsigned long from_length)
Definition: libmysql.cc:976
Definition: mysql.h:188
MYSQL * mysql
Definition: mysql.h:668
bool eof
Definition: mysql.h:346
enum net_async_status STDCALL mysql_real_connect_nonblocking(MYSQL *mysql, const char *host, const char *user, const char *passwd, const char *db, unsigned int port, const char *unix_socket, unsigned long clientflag)
This API attempts to initialize all the context needed to make an asynchronous connection followed by...
Definition: client.cc:5611
MYSQL_ROW_OFFSET STDCALL mysql_row_seek(MYSQL_RES *result, MYSQL_ROW_OFFSET offset)
Definition: libmysql.cc:636
int STDCALL mysql_options4(MYSQL *mysql, enum mysql_option option, const void *arg1, const void *arg2)
Definition: client.cc:7928
struct MYSQL_RES MYSQL_RES
Definition: mysql.h:186
Definition: mysql.h:665
MYSQL_FIELD_OFFSET STDCALL mysql_field_seek(MYSQL_RES *result, MYSQL_FIELD_OFFSET offset)
Definition: libmysql.cc:644
void STDCALL myodbc_remove_escape(MYSQL *mysql, char *name)
Definition: libmysql.cc:1074
int STDCALL mysql_dump_debug_info(MYSQL *mysql)
Definition: libmysql.cc:796
void STDCALL mysql_free_result(MYSQL_RES *result)
Definition: client.cc:1859
bool STDCALL mysql_autocommit(MYSQL *mysql, bool auto_mode)
Definition: libmysql.cc:4492
int STDCALL mysql_binlog_fetch(MYSQL *mysql, MYSQL_RPL *rpl)
Fetch one event from the server.
Definition: client.cc:6615
size_t gtid_set_encoded_size
Flags, e.g.
Definition: mysql.h:380
char * info
Definition: mysql.h:298
char * ssl_capath
Definition: mysql.h:230
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:75
unsigned long stmt_id
Definition: mysql.h:682
struct MYSQL_STMT MYSQL_STMT
Definition: mysql.h:255
Definition: mysql_com.h:829
char * server_version
Definition: mysql.h:297
bool STDCALL mysql_stmt_reset(MYSQL_STMT *stmt)
Definition: libmysql.cc:4430
Definition: mysql.h:196
enum enum_resultset_metadata resultset_metadata
Definition: mysql.h:316
Definition: mysql.h:200
void STDCALL mysql_debug(const char *debug)
Definition: libmysql.cc:237
const struct MYSQL_METHODS * methods
Definition: mysql.h:324
enum_mysql_set_option
options for mysql_options()
Definition: mysql_com.h:954
unsigned long server_capabilities
Definition: mysql.h:308
const char *STDCALL mysql_get_ssl_cipher(MYSQL *mysql)
Definition: client.cc:3308
int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt)
Definition: libmysql.cc:2395
unsigned int server_status
Definition: mysql.h:689
enum_mysql_stmt_state
Definition: mysql.h:568
Definition: sql_common.h:135
const unsigned char * buffer
Size of the packet returned by.
Definition: mysql.h:390
char * mysql_unix_port
Definition: client.cc:195
bool STDCALL mysql_ssl_set(MYSQL *mysql, const char *key, const char *cert, const char *ca, const char *capath, const char *cipher)
Definition: client.cc:3234
MYSQL_DATA result
Definition: mysql.h:672
Log error(cerr, "ERROR")