MySQL  8.0.23
Source Code Documentation
mysql.h
Go to the documentation of this file.
1 /* Copyright (c) 2000, 2020, 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 <stdint.h>
46 #include <sys/types.h>
47 #endif
48 
49 // Legacy definition for the benefit of old code. Use uint64_t in new code.
50 // If you get warnings from printf, use the PRIu64 macro, or, if you need
51 // compatibility with older versions of the client library, cast
52 // before printing.
53 typedef uint64_t my_ulonglong;
54 
55 #ifndef my_socket_defined
56 #define my_socket_defined
57 #ifdef _WIN32
58 #include <windows.h>
59 #ifdef WIN32_LEAN_AND_MEAN
60 #include <winsock2.h>
61 #endif
62 #define my_socket SOCKET
63 #else
64 typedef int my_socket;
65 #endif /* _WIN32 */
66 #endif /* my_socket_defined */
67 
68 // Small extra definition to avoid pulling in my_compiler.h in client code.
69 // IWYU pragma: no_include "my_compiler.h"
70 #ifndef MY_COMPILER_INCLUDED
71 #if !defined(_WIN32)
72 #define STDCALL
73 #else
74 #define STDCALL __stdcall
75 #endif
76 #endif /* MY_COMPILER_INCLUDED */
77 
78 #include "field_types.h"
79 #include "my_list.h"
80 #include "mysql_com.h"
81 
82 /* Include declarations of plug-in API */
83 #include "mysql/client_plugin.h" // IWYU pragma: keep
84 
85 /*
86  The client should be able to know which version it is compiled against,
87  even if mysql.h doesn't use this information directly.
88 */
89 #include "mysql_version.h" // IWYU pragma: keep
90 
91 // MYSQL_TIME is part of our public API.
92 #include "mysql_time.h" // IWYU pragma: keep
93 
94 // The error messages are part of our public API.
95 #include "errmsg.h" // IWYU pragma: keep
96 
97 #ifdef __cplusplus
98 extern "C" {
99 #endif
100 
101 extern unsigned int mysql_port;
102 extern char *mysql_unix_port;
103 
104 #define CLIENT_NET_RETRY_COUNT 1 /* Retry count */
105 #define CLIENT_NET_READ_TIMEOUT 365 * 24 * 3600 /* Timeout on read */
106 #define CLIENT_NET_WRITE_TIMEOUT 365 * 24 * 3600 /* Timeout on write */
107 
108 #define IS_PRI_KEY(n) ((n)&PRI_KEY_FLAG)
109 #define IS_NOT_NULL(n) ((n)&NOT_NULL_FLAG)
110 #define IS_BLOB(n) ((n)&BLOB_FLAG)
111 /**
112  Returns true if the value is a number which does not need quotes for
113  the sql_lex.cc parser to parse correctly.
114 */
115 #define IS_NUM(t) \
116  (((t) <= MYSQL_TYPE_INT24 && (t) != MYSQL_TYPE_TIMESTAMP) || \
117  (t) == MYSQL_TYPE_YEAR || (t) == MYSQL_TYPE_NEWDECIMAL)
118 #define IS_LONGDATA(t) ((t) >= MYSQL_TYPE_TINY_BLOB && (t) <= MYSQL_TYPE_STRING)
119 
120 typedef struct MYSQL_FIELD {
121  char *name; /* Name of column */
122  char *org_name; /* Original column name, if an alias */
123  char *table; /* Table of column if column was a field */
124  char *org_table; /* Org table name, if table was an alias */
125  char *db; /* Database for table */
126  char *catalog; /* Catalog for table */
127  char *def; /* Default value (set by mysql_list_fields) */
128  unsigned long length; /* Width of column (create length) */
129  unsigned long max_length; /* Max width for selected set */
130  unsigned int name_length;
131  unsigned int org_name_length;
132  unsigned int table_length;
133  unsigned int org_table_length;
134  unsigned int db_length;
135  unsigned int catalog_length;
136  unsigned int def_length;
137  unsigned int flags; /* Div flags */
138  unsigned int decimals; /* Number of decimals in field */
139  unsigned int charsetnr; /* Character set */
140  enum enum_field_types type; /* Type of field. See mysql_com.h for types */
141  void *extension;
143 
144 typedef char **MYSQL_ROW; /* return data as array of strings */
145 typedef unsigned int MYSQL_FIELD_OFFSET; /* offset to current field */
146 
147 #define MYSQL_COUNT_ERROR (~(uint64_t)0)
148 
149 /* backward compatibility define - to be removed eventually */
150 #define ER_WARN_DATA_TRUNCATED WARN_DATA_TRUNCATED
151 
152 typedef struct MYSQL_ROWS {
153  struct MYSQL_ROWS *next; /* list of rows */
155  unsigned long length;
157 
158 typedef MYSQL_ROWS *MYSQL_ROW_OFFSET; /* offset to current row */
159 
160 struct MEM_ROOT;
161 
162 typedef struct MYSQL_DATA {
164  struct MEM_ROOT *alloc;
165  uint64_t rows;
166  unsigned int fields;
168 
214 };
215 
216 /**
217  @todo remove the "extension", move st_mysql_options completely
218  out of mysql.h
219 */
221 
224  unsigned int port, protocol;
225  unsigned long client_flag;
226  char *host, *user, *password, *unix_socket, *db;
229  char *ssl_key; /* PEM key file */
230  char *ssl_cert; /* PEM cert file */
231  char *ssl_ca; /* PEM CA file */
232  char *ssl_capath; /* PEM directory of CA-s? */
233  char *ssl_cipher; /* cipher to use */
235  unsigned long max_allowed_packet;
237  /**
238  The local address to bind when connecting to remote server.
239  */
241  /* 0 - never report, 1 - always report (default) */
243 
244  /* function pointers for local infile support */
245  int (*local_infile_init)(void **, const char *, void *);
246  int (*local_infile_read)(void *, char *, unsigned int);
247  void (*local_infile_end)(void *);
248  int (*local_infile_error)(void *, char *, unsigned int);
251 };
252 
258 };
259 
266 };
267 
274 };
275 
280 };
281 
282 typedef struct character_set {
283  unsigned int number; /* character set number */
284  unsigned int state; /* character set state */
285  const char *csname; /* collation name */
286  const char *name; /* character set name */
287  const char *comment; /* comment */
288  const char *dir; /* character set directory */
289  unsigned int mbminlen; /* min. length for multibyte strings */
290  unsigned int mbmaxlen; /* max. length for multibyte strings */
292 
293 struct MYSQL_METHODS;
294 struct MYSQL_STMT;
295 
296 typedef struct MYSQL {
297  NET net; /* Communication parameters */
298  unsigned char *connector_fd; /* ConnectorFd for SSL */
300  char *info, *db;
304  uint64_t affected_rows;
305  uint64_t insert_id; /* id if insert on table with NEXTNR */
306  uint64_t extra_info; /* Not used */
307  unsigned long thread_id; /* Id for connection in server */
308  unsigned long packet_length;
309  unsigned int port;
311  unsigned int protocol_version;
312  unsigned int field_count;
313  unsigned int server_status;
314  unsigned int server_language;
315  unsigned int warning_count;
316  struct st_mysql_options options;
317  enum mysql_status status;
319  bool free_me; /* If free in mysql_close */
320  bool reconnect; /* set to 1 if automatic reconnect */
321 
322  /* session-wide random string */
324 
325  LIST *stmts; /* list of all statements */
326  const struct MYSQL_METHODS *methods;
327  void *thd;
328  /*
329  Points to boolean flag in MYSQL_RES or MYSQL_STMT. We set this flag
330  from mysql_stmt_close if close had to cancel result set of this object.
331  */
333  void *extension;
335 
336 typedef struct MYSQL_RES {
337  uint64_t row_count;
339  struct MYSQL_DATA *data;
341  unsigned long *lengths; /* column lengths of current row */
342  MYSQL *handle; /* for unbuffered reads */
343  const struct MYSQL_METHODS *methods;
344  MYSQL_ROW row; /* If unbuffered read */
345  MYSQL_ROW current_row; /* buffer to current row */
347  unsigned int field_count, current_field;
348  bool eof; /* Used by mysql_fetch_row */
349  /* mysql_stmt_close() had to cancel this result */
352  void *extension;
354 
355 /**
356  Flag to indicate that COM_BINLOG_DUMP_GTID should
357  be used rather than COM_BINLOG_DUMP in the @sa mysql_binlog_open().
358 */
359 #define MYSQL_RPL_GTID (1 << 16)
360 /**
361  Skip HEARBEAT events in the @sa mysql_binlog_fetch().
362 */
363 #define MYSQL_RPL_SKIP_HEARTBEAT (1 << 17)
364 
365 /**
366  Struct for information about a replication stream.
367 
368  @sa mysql_binlog_open()
369  @sa mysql_binlog_fetch()
370  @sa mysql_binlog_close()
371 */
372 typedef struct MYSQL_RPL {
373  size_t file_name_length; /** Length of the 'file_name' or 0 */
374  const char *file_name; /** Filename of the binary log to read */
375  uint64_t start_position; /** Position in the binary log to */
376  /* start reading from */
377  unsigned int server_id; /** Server ID to use when identifying */
378  /* with the master */
379  unsigned int flags; /** Flags, e.g. MYSQL_RPL_GTID */
380 
381  /** Size of gtid set data */
383  /** Callback function which is called */
384  /* from @sa mysql_binlog_open() to */
385  /* fill command packet gtid set */
386  void (*fix_gtid_set)(struct MYSQL_RPL *rpl, unsigned char *packet_gtid_set);
387  void *gtid_set_arg; /** GTID set data or an argument for */
388  /* fix_gtid_set() callback function */
389 
390  unsigned long size; /** Size of the packet returned by */
391  /* mysql_binlog_fetch() */
392  const unsigned char *buffer; /** Pointer to returned data */
394 
395 /*
396  Set up and bring down the server; to ensure that applications will
397  work when linked against either the standard client library or the
398  embedded server library, these functions should be called.
399 */
400 int STDCALL mysql_server_init(int argc, char **argv, char **groups);
401 void STDCALL mysql_server_end(void);
402 
403 /*
404  mysql_server_init/end need to be called when using libmysqld or
405  libmysqlclient (exactly, mysql_server_init() is called by mysql_init() so
406  you don't need to call it explicitely; but you need to call
407  mysql_server_end() to free memory). The names are a bit misleading
408  (mysql_SERVER* to be used when using libmysqlCLIENT). So we add more general
409  names which suit well whether you're using libmysqld or libmysqlclient. We
410  intend to promote these aliases over the mysql_server* ones.
411 */
412 #define mysql_library_init mysql_server_init
413 #define mysql_library_end mysql_server_end
414 
415 /*
416  Set up and bring down a thread; these function should be called
417  for each thread in an application which opens at least one MySQL
418  connection. All uses of the connection(s) should be between these
419  function calls.
420 */
421 bool STDCALL mysql_thread_init(void);
422 void STDCALL mysql_thread_end(void);
423 
424 /*
425  Functions to get information from the MYSQL and MYSQL_RES structures
426  Should definitely be used if one uses shared libraries.
427 */
428 
429 uint64_t STDCALL mysql_num_rows(MYSQL_RES *res);
430 unsigned int STDCALL mysql_num_fields(MYSQL_RES *res);
431 bool STDCALL mysql_eof(MYSQL_RES *res);
433  unsigned int fieldnr);
438 
439 unsigned int STDCALL mysql_field_count(MYSQL *mysql);
442 unsigned int STDCALL mysql_errno(MYSQL *mysql);
443 const char *STDCALL mysql_error(MYSQL *mysql);
444 const char *STDCALL mysql_sqlstate(MYSQL *mysql);
445 unsigned int STDCALL mysql_warning_count(MYSQL *mysql);
446 const char *STDCALL mysql_info(MYSQL *mysql);
447 unsigned long STDCALL mysql_thread_id(MYSQL *mysql);
449 int STDCALL mysql_set_character_set(MYSQL *mysql, const char *csname);
450 
452 bool STDCALL mysql_ssl_set(MYSQL *mysql, const char *key, const char *cert,
453  const char *ca, const char *capath,
454  const char *cipher);
456 bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
457  const char *passwd, const char *db);
459  const char *user, const char *passwd,
460  const char *db, unsigned int port,
461  const char *unix_socket,
462  unsigned long clientflag);
463 int STDCALL mysql_select_db(MYSQL *mysql, const char *db);
464 int STDCALL mysql_query(MYSQL *mysql, const char *q);
465 int STDCALL mysql_send_query(MYSQL *mysql, const char *q, unsigned long length);
466 int STDCALL mysql_real_query(MYSQL *mysql, const char *q, unsigned long length);
469 
471  MYSQL *mysql, const char *host, const char *user, const char *passwd,
472  const char *db, unsigned int port, const char *unix_socket,
473  unsigned long clientflag);
475  MYSQL *mysql, const char *query, unsigned long length);
477  MYSQL *mysql, const char *query, unsigned long length);
482  const char *db,
483  bool *error);
486 
489  const char **data, size_t *length);
492  const char **data, size_t *length);
493 /* local infile support */
494 
495 #define LOCAL_INFILE_ERROR_LEN 512
496 
498  MYSQL *mysql, int (*local_infile_init)(void **, const char *, void *),
499  int (*local_infile_read)(void *, char *, unsigned int),
500  void (*local_infile_end)(void *),
501  int (*local_infile_error)(void *, char *, unsigned int), void *);
502 
505  enum mysql_enum_shutdown_level shutdown_level);
507 int STDCALL mysql_refresh(MYSQL *mysql, unsigned int refresh_options);
508 int STDCALL mysql_kill(MYSQL *mysql, unsigned long pid);
510  enum enum_mysql_set_option option);
512 const char *STDCALL mysql_stat(MYSQL *mysql);
514 const char *STDCALL mysql_get_client_info(void);
515 unsigned long STDCALL mysql_get_client_version(void);
516 const char *STDCALL mysql_get_host_info(MYSQL *mysql);
518 unsigned int STDCALL mysql_get_proto_info(MYSQL *mysql);
519 MYSQL_RES *STDCALL mysql_list_dbs(MYSQL *mysql, const char *wild);
520 MYSQL_RES *STDCALL mysql_list_tables(MYSQL *mysql, const char *wild);
522 int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option,
523  const void *arg);
524 int STDCALL mysql_options4(MYSQL *mysql, enum mysql_option option,
525  const void *arg1, const void *arg2);
527  const void *arg);
530 void STDCALL mysql_data_seek(MYSQL_RES *result, uint64_t offset);
532  MYSQL_ROW_OFFSET offset);
534  MYSQL_FIELD_OFFSET offset);
537  MYSQL_ROW *row);
538 
541 MYSQL_RES *STDCALL mysql_list_fields(MYSQL *mysql, const char *table,
542  const char *wild);
543 unsigned long STDCALL mysql_escape_string(char *to, const char *from,
544  unsigned long from_length);
545 unsigned long STDCALL mysql_hex_string(char *to, const char *from,
546  unsigned long from_length);
547 unsigned long STDCALL mysql_real_escape_string(MYSQL *mysql, char *to,
548  const char *from,
549  unsigned long length);
551  const char *from,
552  unsigned long length,
553  char quote);
554 void STDCALL mysql_debug(const char *debug);
556 unsigned int STDCALL mysql_thread_safe(void);
559 
563 
564 /*
565  The following definitions are added for the enhanced
566  client-server protocol
567 */
568 
569 /* statement state */
575 };
576 
577 /*
578  This structure is used to define bind information, and
579  internally by the client library.
580  Public members with their descriptions are listed below
581  (conventionally `On input' refers to the binds given to
582  mysql_stmt_bind_param, `On output' refers to the binds given
583  to mysql_stmt_bind_result):
584 
585  buffer_type - One of the MYSQL_* types, used to describe
586  the host language type of buffer.
587  On output: if column type is different from
588  buffer_type, column value is automatically converted
589  to buffer_type before it is stored in the buffer.
590  buffer - On input: points to the buffer with input data.
591  On output: points to the buffer capable to store
592  output data.
593  The type of memory pointed by buffer must correspond
594  to buffer_type. See the correspondence table in
595  the comment to mysql_stmt_bind_param.
596 
597  The two above members are mandatory for any kind of bind.
598 
599  buffer_length - the length of the buffer. You don't have to set
600  it for any fixed length buffer: float, double,
601  int, etc. It must be set however for variable-length
602  types, such as BLOBs or STRINGs.
603 
604  length - On input: in case when lengths of input values
605  are different for each execute, you can set this to
606  point at a variable containining value length. This
607  way the value length can be different in each execute.
608  If length is not NULL, buffer_length is not used.
609  Note, length can even point at buffer_length if
610  you keep bind structures around while fetching:
611  this way you can change buffer_length before
612  each execution, everything will work ok.
613  On output: if length is set, mysql_stmt_fetch will
614  write column length into it.
615 
616  is_null - On input: points to a boolean variable that should
617  be set to TRUE for NULL values.
618  This member is useful only if your data may be
619  NULL in some but not all cases.
620  If your data is never NULL, is_null should be set to 0.
621  If your data is always NULL, set buffer_type
622  to MYSQL_TYPE_NULL, and is_null will not be used.
623 
624  is_unsigned - On input: used to signify that values provided for one
625  of numeric types are unsigned.
626  On output describes signedness of the output buffer.
627  If, taking into account is_unsigned flag, column data
628  is out of range of the output buffer, data for this column
629  is regarded truncated. Note that this has no correspondence
630  to the sign of result set column, if you need to find it out
631  use mysql_stmt_result_metadata.
632  error - where to write a truncation error if it is present.
633  possible error value is:
634  0 no truncation
635  1 value is out of range or buffer is too small
636 
637  Please note that MYSQL_BIND also has internals members.
638 */
639 
640 typedef struct MYSQL_BIND {
641  unsigned long *length; /* output length pointer */
642  bool *is_null; /* Pointer to null indicator */
643  void *buffer; /* buffer to get/put data */
644  /* set this if you want to track data truncations happened during fetch */
645  bool *error;
646  unsigned char *row_ptr; /* for the current data position */
647  void (*store_param_func)(NET *net, struct MYSQL_BIND *param);
648  void (*fetch_result)(struct MYSQL_BIND *, MYSQL_FIELD *, unsigned char **row);
649  void (*skip_result)(struct MYSQL_BIND *, MYSQL_FIELD *, unsigned char **row);
650  /* output buffer length, must be set when fetching str/binary */
651  unsigned long buffer_length;
652  unsigned long offset; /* offset position for char/binary fetch */
653  unsigned long length_value; /* Used if length is 0 */
654  unsigned int param_number; /* For null count and error messages */
655  unsigned int pack_length; /* Internal length for packed data */
656  enum enum_field_types buffer_type; /* buffer type */
657  bool error_value; /* used if error is 0 */
658  bool is_unsigned; /* set if integer type is unsigned */
659  bool long_data_used; /* If used with mysql_send_long_data */
660  bool is_null_value; /* Used if is_null is 0 */
661  void *extension;
663 
664 struct MYSQL_STMT_EXT;
665 
666 /* statement handler */
667 typedef struct MYSQL_STMT {
668  struct MEM_ROOT *mem_root; /* root allocations */
669  LIST list; /* list to keep track of all stmts */
670  MYSQL *mysql; /* connection handle */
671  MYSQL_BIND *params; /* input parameters */
672  MYSQL_BIND *bind; /* output parameters */
673  MYSQL_FIELD *fields; /* result set metadata */
674  MYSQL_DATA result; /* cached result set */
675  MYSQL_ROWS *data_cursor; /* current row in cached result */
676  /*
677  mysql_stmt_fetch() calls this function to fetch one row (it's different
678  for buffered, unbuffered and cursor fetch).
679  */
680  int (*read_row_func)(struct MYSQL_STMT *stmt, unsigned char **row);
681  /* copy of mysql->affected_rows after statement execution */
682  uint64_t affected_rows;
683  uint64_t insert_id; /* copy of mysql->insert_id */
684  unsigned long stmt_id; /* Id for prepared statement */
685  unsigned long flags; /* i.e. type of cursor to open */
686  unsigned long prefetch_rows; /* number of rows per one COM_FETCH */
687  /*
688  Copied from mysql->server_status after execute/fetch to know
689  server-side cursor status for this statement.
690  */
691  unsigned int server_status;
692  unsigned int last_errno; /* error code */
693  unsigned int param_count; /* input parameter count */
694  unsigned int field_count; /* number of columns in result set */
695  enum enum_mysql_stmt_state state; /* statement state */
696  char last_error[MYSQL_ERRMSG_SIZE]; /* error message */
698  /* Types of input parameters should be sent to server */
700  bool bind_param_done; /* input buffers were supplied */
701  unsigned char bind_result_done; /* output buffers were supplied */
702  /* mysql_stmt_close() had to cancel this result */
704  /*
705  Is set to true if we need to calculate field->max_length for
706  metadata fields when doing mysql_stmt_store_result.
707  */
711 
713  /*
714  When doing mysql_stmt_store_result calculate max_length attribute
715  of statement metadata. This is to be consistent with the old API,
716  where this was done automatically.
717  In the new API we do that only by request because it slows down
718  mysql_stmt_store_result sufficiently.
719  */
721  /*
722  unsigned long with combination of cursor flags (read only, for update,
723  etc)
724  */
726  /*
727  Amount of rows to retrieve from server per one fetch if using cursors.
728  Accepts unsigned long attribute in the range 1 - ulong_max
729  */
731 };
732 
733 bool STDCALL mysql_bind_param(MYSQL *mysql, unsigned n_params,
734  MYSQL_BIND *binds, const char **names);
735 
738  unsigned long length);
742  unsigned int column, unsigned long offset);
744 unsigned long STDCALL mysql_stmt_param_count(MYSQL_STMT *stmt);
746  enum enum_stmt_attr_type attr_type,
747  const void *attr);
749  enum enum_stmt_attr_type attr_type,
750  void *attr);
757  unsigned int param_number,
758  const char *data, unsigned long length);
761 unsigned int STDCALL mysql_stmt_errno(MYSQL_STMT *stmt);
762 const char *STDCALL mysql_stmt_error(MYSQL_STMT *stmt);
763 const char *STDCALL mysql_stmt_sqlstate(MYSQL_STMT *stmt);
765  MYSQL_ROW_OFFSET offset);
767 void STDCALL mysql_stmt_data_seek(MYSQL_STMT *stmt, uint64_t offset);
768 uint64_t STDCALL mysql_stmt_num_rows(MYSQL_STMT *stmt);
770 uint64_t STDCALL mysql_stmt_insert_id(MYSQL_STMT *stmt);
771 unsigned int STDCALL mysql_stmt_field_count(MYSQL_STMT *stmt);
772 
775 bool STDCALL mysql_autocommit(MYSQL *mysql, bool auto_mode);
780 
781 /* Public key reset */
783 
784 /* status return codes */
785 #define MYSQL_NO_DATA 100
786 #define MYSQL_DATA_TRUNCATED 101
787 
788 #define mysql_reload(mysql) mysql_refresh((mysql), REFRESH_GRANT)
789 
790 #define HAVE_MYSQL_REAL_CONNECT
791 
793  const char *dns_srv_name,
794  const char *user, const char *passwd,
795  const char *db,
796  unsigned long client_flag);
797 
798 #ifdef __cplusplus
799 }
800 #endif
801 
802 #endif /* _mysql_h */
MYSQL_BIND::length
unsigned long * length
Definition: mysql.h:641
st_mysql_options_extention
Definition: sql_common.h:134
mysql_thread_init
bool STDCALL mysql_thread_init(void)
Definition: libmysql.cc:211
MYSQL_RPL::file_name
const char * file_name
Length of the 'file_name' or 0
Definition: mysql.h:374
st_mysql_options::protocol
unsigned int protocol
Definition: mysql.h:224
mysql_stmt_sqlstate
const char *STDCALL mysql_stmt_sqlstate(MYSQL_STMT *stmt)
Definition: libmysql.cc:4227
MYSQL_STMT::last_error
char last_error[MYSQL_ERRMSG_SIZE]
Definition: mysql.h:696
mysql_errno
unsigned int STDCALL mysql_errno(MYSQL *mysql)
Definition: client.cc:8438
MYSQL_RES::row_count
uint64_t row_count
Definition: mysql.h:337
MYSQL_STMT::bind
MYSQL_BIND * bind
Definition: mysql.h:672
mysql_set_server_option
int STDCALL mysql_set_server_option(MYSQL *mysql, enum enum_mysql_set_option option)
Definition: libmysql.cc:844
mysql_enum_shutdown_level
mysql_enum_shutdown_level
We want levels to be in growing order of hardness (because we use number comparisons).
Definition: mysql_com.h:970
mysql_free_result
void STDCALL mysql_free_result(MYSQL_RES *result)
Definition: client.cc:1866
MYSQL_READ_DEFAULT_FILE
@ MYSQL_READ_DEFAULT_FILE
Definition: mysql.h:174
MYSQL_STMT_INIT_DONE
@ MYSQL_STMT_INIT_DONE
Definition: mysql.h:571
MYSQL::server_capabilities
unsigned long server_capabilities
Definition: mysql.h:310
field_types.h
This file contains the field type.
mysql_set_character_set
int STDCALL mysql_set_character_set(MYSQL *mysql, const char *csname)
Definition: client.cc:8565
MYSQL_OPT_ZSTD_COMPRESSION_LEVEL
@ MYSQL_OPT_ZSTD_COMPRESSION_LEVEL
Definition: mysql.h:212
MYSQL::user
char * user
Definition: mysql.h:299
st_mysql_options::user
char * user
Definition: mysql.h:226
MYSQL_OPT_NET_BUFFER_LENGTH
@ MYSQL_OPT_NET_BUFFER_LENGTH
Definition: mysql.h:203
MYSQL_STMT::bind_result_done
unsigned char bind_result_done
Definition: mysql.h:701
MYSQL::unix_socket
char * unix_socket
Definition: mysql.h:299
st_mysql_options::bind_address
char * bind_address
The local address to bind when connecting to remote server.
Definition: mysql.h:240
MYSQL_STMT::state
enum enum_mysql_stmt_state state
Definition: mysql.h:695
mysql_stmt_send_long_data
bool STDCALL mysql_stmt_send_long_data(MYSQL_STMT *stmt, unsigned int param_number, const char *data, unsigned long length)
mysql_get_character_set_info
void STDCALL mysql_get_character_set_info(MYSQL *mysql, MY_CHARSET_INFO *charset)
Definition: libmysql.cc:969
SSL_FIPS_MODE_STRICT
@ SSL_FIPS_MODE_STRICT
Definition: mysql.h:279
MYSQL_SET_CHARSET_DIR
@ MYSQL_SET_CHARSET_DIR
Definition: mysql.h:176
MYSQL_FIELD::catalog_length
unsigned int catalog_length
Definition: mysql.h:135
mysql_get_client_version
unsigned long STDCALL mysql_get_client_version(void)
Definition: libmysql.cc:901
character_set::state
unsigned int state
Definition: mysql.h:284
MYSQL::passwd
char * passwd
Definition: mysql.h:299
MYSQL_RPL::size
unsigned long size
GTID set data or an argument for
Definition: mysql.h:390
enum_session_state_type
enum_session_state_type
Type of state change information that the server can include in the Ok packet.
Definition: mysql_com.h:1017
MYSQL_FIELD
Definition: mysql.h:120
mysql_ssl_set
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:3255
mysql_get_proto_info
unsigned int STDCALL mysql_get_proto_info(MYSQL *mysql)
Definition: libmysql.cc:895
mysql_commit
bool STDCALL mysql_commit(MYSQL *mysql)
Definition: libmysql.cc:4249
MYSQL_SHARED_MEMORY_BASE_NAME
@ MYSQL_SHARED_MEMORY_BASE_NAME
Definition: mysql.h:180
mysql_stmt_bind_result
bool STDCALL mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *bnd)
Definition: libmysql.cc:3594
st_mysql_options::read_timeout
unsigned int read_timeout
Definition: mysql.h:223
MYSQL_OPT_TLS_CIPHERSUITES
@ MYSQL_OPT_TLS_CIPHERSUITES
Definition: mysql.h:210
mysql_init
MYSQL *STDCALL mysql_init(MYSQL *mysql)
Definition: client.cc:3116
q
synode_no q[FIFO_SIZE]
Definition: xcom_base.cc:3018
MYSQL_BIND::store_param_func
void(* store_param_func)(NET *net, struct MYSQL_BIND *param)
Definition: mysql.h:647
MYSQL_FIELD::charsetnr
unsigned int charsetnr
Definition: mysql.h:139
mysql_stmt_next_result
int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt)
Definition: libmysql.cc:4352
MYSQL_OPT_LOCAL_INFILE
@ MYSQL_OPT_LOCAL_INFILE
Definition: mysql.h:178
MYSQL::extension
void * extension
Definition: mysql.h:333
MYSQL_ROW
char ** MYSQL_ROW
Definition: mysql.h:144
CHARSET_INFO
Definition: m_ctype.h:354
mysql_insert_id
uint64_t STDCALL mysql_insert_id(MYSQL *mysql)
Definition: libmysql.cc:936
MYSQL_FIELD::flags
unsigned int flags
Definition: mysql.h:137
mysql_list_tables
MYSQL_RES *STDCALL mysql_list_tables(MYSQL *mysql, const char *wild)
Definition: libmysql.cc:724
MYSQL_BIND::buffer
void * buffer
Definition: mysql.h:643
MYSQL::net
NET net
Definition: mysql.h:297
st_mysql_options::ssl_cert
char * ssl_cert
Definition: mysql.h:230
MYSQL::server_version
char * server_version
Definition: mysql.h:299
MYSQL_BIND::buffer_type
enum enum_field_types buffer_type
Definition: mysql.h:656
MYSQL_METHODS
Definition: sql_common.h:157
MYSQL_FIELD::def_length
unsigned int def_length
Definition: mysql.h:136
MYSQL_FIELD::type
enum enum_field_types type
Definition: mysql.h:140
MYSQL::host_info
char * host_info
Definition: mysql.h:299
mysql_use_result
MYSQL_RES *STDCALL mysql_use_result(MYSQL *mysql)
Definition: libmysql.cc:4387
st_mysql_options::ssl_capath
char * ssl_capath
Definition: mysql.h:232
MYSQL_STMT::update_max_length
bool update_max_length
Definition: mysql.h:708
mysql_real_query_nonblocking
enum net_async_status STDCALL mysql_real_query_nonblocking(MYSQL *mysql, const char *query, unsigned long length)
mysql_stmt_bind_param
bool STDCALL mysql_stmt_bind_param(MYSQL_STMT *stmt, MYSQL_BIND *bnd)
Definition: libmysql.cc:2423
MYSQL_RES::handle
MYSQL * handle
Definition: mysql.h:342
MYSQL_STMT::list
LIST list
Definition: mysql.h:669
mysql_eof
bool STDCALL mysql_eof(MYSQL_RES *res)
Definition: libmysql.cc:903
mysql_status
mysql_status
Definition: mysql.h:253
mysql_num_fields
unsigned int STDCALL mysql_num_fields(MYSQL_RES *res)
Definition: client.cc:8434
MYSQL_BIND::fetch_result
void(* fetch_result)(struct MYSQL_BIND *, MYSQL_FIELD *, unsigned char **row)
Definition: mysql.h:648
mysql_shutdown
int STDCALL mysql_shutdown(MYSQL *mysql, enum mysql_enum_shutdown_level shutdown_level)
Definition: libmysql.cc:812
MYSQL::free_me
bool free_me
Definition: mysql.h:319
MYSQL_DATA::rows
uint64_t rows
Definition: mysql.h:165
MYSQL_RPL::gtid_set_arg
void * gtid_set_arg
Definition: mysql.h:387
MYSQL_BIND
struct MYSQL_BIND MYSQL_BIND
MYSQL_RES
Definition: mysql.h:336
mysql_ssl_mode
mysql_ssl_mode
Definition: mysql.h:268
MYSQL_FIELD::table
char * table
Definition: mysql.h:123
MYSQL::status
enum mysql_status status
Definition: mysql.h:317
MYSQL_STMT_EXECUTE_DONE
@ MYSQL_STMT_EXECUTE_DONE
Definition: mysql.h:573
mysql_character_set_name
const char *STDCALL mysql_character_set_name(MYSQL *mysql)
Definition: libmysql.cc:965
SSL_FIPS_MODE_OFF
@ SSL_FIPS_MODE_OFF
Definition: mysql.h:277
SSL_MODE_VERIFY_IDENTITY
@ SSL_MODE_VERIFY_IDENTITY
Definition: mysql.h:273
result
Definition: result.h:29
mysql_stmt_init
MYSQL_STMT *STDCALL mysql_stmt_init(MYSQL *mysql)
Definition: libmysql.cc:1368
MYSQL_STMT::result
MYSQL_DATA result
Definition: mysql.h:674
MYSQL_STMT::data_cursor
MYSQL_ROWS * data_cursor
Definition: mysql.h:675
mysql_hex_string
unsigned long STDCALL mysql_hex_string(char *to, const char *from, unsigned long from_length)
MYSQL::fields
MYSQL_FIELD * fields
Definition: mysql.h:302
mysql_stmt_row_tell
MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_tell(MYSQL_STMT *stmt)
Definition: libmysql.cc:4028
MYSQL_OPT_LOAD_DATA_LOCAL_DIR
@ MYSQL_OPT_LOAD_DATA_LOCAL_DIR
Definition: mysql.h:213
mysql_set_local_infile_handler
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:633
st_mysql_options::host
char * host
Definition: mysql.h:226
MYSQL_FIELD::org_name_length
unsigned int org_name_length
Definition: mysql.h:131
mysql_next_result_nonblocking
enum net_async_status STDCALL mysql_next_result_nonblocking(MYSQL *mysql)
Definition: libmysql.cc:4332
mysql_stmt_error
const char *STDCALL mysql_stmt_error(MYSQL_STMT *stmt)
Definition: libmysql.cc:4236
MYSQL_BIND::error_value
bool error_value
Definition: mysql.h:657
mysql_stmt_fetch_column
int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind_arg, unsigned int column, unsigned long offset)
MYSQL_BIND::length_value
unsigned long length_value
Definition: mysql.h:653
mysql_sqlstate
const char *STDCALL mysql_sqlstate(MYSQL *mysql)
Definition: libmysql.cc:938
MYSQL_PROTOCOL_TCP
@ MYSQL_PROTOCOL_TCP
Definition: mysql.h:262
MYSQL_FIELD::name_length
unsigned int name_length
Definition: mysql.h:130
mysql_refresh
int STDCALL mysql_refresh(MYSQL *mysql, unsigned int refresh_options)
Definition: libmysql.cc:821
enum_resultset_metadata
enum_resultset_metadata
Definition: mysql_com.h:989
name
case opt name
Definition: sslopt-case.h:32
st_mysql_options::ssl_cipher
char * ssl_cipher
Definition: mysql.h:233
st_mysql_options::local_infile_userdata
void * local_infile_userdata
Definition: mysql.h:249
MYSQL_BIND::is_null
bool * is_null
Definition: mysql.h:642
mysql_autocommit
bool STDCALL mysql_autocommit(MYSQL *mysql, bool auto_mode)
Definition: libmysql.cc:4267
mysql_warning_count
unsigned int STDCALL mysql_warning_count(MYSQL *mysql)
Definition: libmysql.cc:942
mysql_real_connect
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)
MYSQL_STMT_FETCH_DONE
@ MYSQL_STMT_FETCH_DONE
Definition: mysql.h:574
MYSQL::unbuffered_fetch_owner
bool * unbuffered_fetch_owner
Definition: mysql.h:332
MYSQL_REPORT_DATA_TRUNCATION
@ MYSQL_REPORT_DATA_TRUNCATION
Definition: mysql.h:184
MYSQL_FIELD::db
char * db
Definition: mysql.h:125
MYSQL_DEFAULT_AUTH
@ MYSQL_DEFAULT_AUTH
Definition: mysql.h:187
st_mysql_options::max_allowed_packet
unsigned long max_allowed_packet
Definition: mysql.h:235
MYSQL_OPT_RETRY_COUNT
@ MYSQL_OPT_RETRY_COUNT
Definition: mysql.h:207
MYSQL_ERRMSG_SIZE
#define MYSQL_ERRMSG_SIZE
Max length of a error message.
Definition: mysql_com.h:852
mysql_stmt_num_rows
uint64_t STDCALL mysql_stmt_num_rows(MYSQL_STMT *stmt)
Definition: libmysql.cc:4057
MYSQL::field_count
unsigned int field_count
Definition: mysql.h:312
MYSQL_BIND::is_unsigned
bool is_unsigned
Definition: mysql.h:658
myodbc_remove_escape
void STDCALL myodbc_remove_escape(MYSQL *mysql, char *name)
Definition: libmysql.cc:1130
MYSQL_FIELD::org_table
char * org_table
Definition: mysql.h:124
mysql_stmt_prepare
int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, unsigned long length)
MYSQL_OPT_SSL_CA
@ MYSQL_OPT_SSL_CA
Definition: mysql.h:191
key
static const char * key
Definition: suite_stubs.c:14
MYSQL_FIELD::db_length
unsigned int db_length
Definition: mysql.h:134
mysql_info
const char *STDCALL mysql_info(MYSQL *mysql)
Definition: libmysql.cc:944
st_mysql_options::charset_name
char * charset_name
Definition: mysql.h:228
MYSQL_FIELD::max_length
unsigned long max_length
Definition: mysql.h:129
st_mysql_options::local_infile_end
void(* local_infile_end)(void *)
Definition: mysql.h:247
mysql_thread_safe
unsigned int STDCALL mysql_thread_safe(void)
Definition: libmysql.cc:985
SCRAMBLE_LENGTH
#define SCRAMBLE_LENGTH
Length of random string sent by server on handshake; this is also length of obfuscated password,...
Definition: mysql_com.h:116
MY_CHARSET_INFO
struct character_set MY_CHARSET_INFO
MYSQL_FIELD::extension
void * extension
Definition: mysql.h:141
st_mysql_options::init_commands
struct Init_commands_array * init_commands
Definition: mysql.h:227
st_mysql_options::charset_dir
char * charset_dir
Definition: mysql.h:228
mysql_session_track_get_first
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:8479
MYSQL_DATA::data
MYSQL_ROWS * data
Definition: mysql.h:163
mysql_send_query_nonblocking
enum net_async_status STDCALL mysql_send_query_nonblocking(MYSQL *mysql, const char *query, unsigned long length)
MYSQL_RES::fields
MYSQL_FIELD * fields
Definition: mysql.h:338
MYSQL
struct MYSQL MYSQL
MYSQL_STATUS_STATEMENT_GET_RESULT
@ MYSQL_STATUS_STATEMENT_GET_RESULT
Definition: mysql.h:257
MYSQL_BIND::extension
void * extension
Definition: mysql.h:661
st_mysql_options::local_infile_init
int(* local_infile_init)(void **, const char *, void *)
Definition: mysql.h:245
MYSQL_ENABLE_CLEARTEXT_PLUGIN
@ MYSQL_ENABLE_CLEARTEXT_PLUGIN
Definition: mysql.h:200
mysql_real_query
int STDCALL mysql_real_query(MYSQL *mysql, const char *q, unsigned long length)
host
const char * host
Definition: mysqladmin.cc:58
MYSQL_SERVER_PUBLIC_KEY
@ MYSQL_SERVER_PUBLIC_KEY
Definition: mysql.h:199
mysql
static MYSQL mysql
Definition: mysql.cc:153
consts::charset
const std::string charset("charset")
mysql_stmt_affected_rows
uint64_t STDCALL mysql_stmt_affected_rows(MYSQL_STMT *stmt)
Definition: libmysql.cc:2221
my_list.h
MYSQL::extra_info
uint64_t extra_info
Definition: mysql.h:306
MYSQL_RES::methods
const struct MYSQL_METHODS * methods
Definition: mysql.h:343
mysql_get_client_info
const char *STDCALL mysql_get_client_info(void)
Definition: libmysql.cc:899
MYSQL_STMT::bind_param_done
bool bind_param_done
Definition: mysql.h:700
MYSQL::charset
struct CHARSET_INFO * charset
Definition: mysql.h:301
mysql_binlog_fetch
int STDCALL mysql_binlog_fetch(MYSQL *mysql, MYSQL_RPL *rpl)
Fetch one event from the server.
Definition: client.cc:6775
MYSQL_OPT_READ_TIMEOUT
@ MYSQL_OPT_READ_TIMEOUT
Definition: mysql.h:181
MYSQL_STATUS_USE_RESULT
@ MYSQL_STATUS_USE_RESULT
Definition: mysql.h:256
mysql_free_result_nonblocking
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:1837
MYSQL_STATUS_GET_RESULT
@ MYSQL_STATUS_GET_RESULT
Definition: mysql.h:255
MYSQL_STMT::mysql
MYSQL * mysql
Definition: mysql.h:670
MYSQL_OPT_WRITE_TIMEOUT
@ MYSQL_OPT_WRITE_TIMEOUT
Definition: mysql.h:182
MYSQL_DATA
Definition: mysql.h:162
mysql_stmt_field_count
unsigned int STDCALL mysql_stmt_field_count(MYSQL_STMT *stmt)
Definition: libmysql.cc:2230
MYSQL_STMT::prefetch_rows
unsigned long prefetch_rows
Definition: mysql.h:686
MYSQL_OPT_CONNECT_ATTR_DELETE
@ MYSQL_OPT_CONNECT_ATTR_DELETE
Definition: mysql.h:198
MYSQL_RES::data_cursor
MYSQL_ROWS * data_cursor
Definition: mysql.h:340
STMT_ATTR_UPDATE_MAX_LENGTH
@ STMT_ATTR_UPDATE_MAX_LENGTH
Definition: mysql.h:720
MYSQL_FIELD::org_table_length
unsigned int org_table_length
Definition: mysql.h:133
mysql_server_end
void STDCALL mysql_server_end(void)
Definition: libmysql.cc:193
mysql_stmt_fetch
int STDCALL mysql_stmt_fetch(MYSQL_STMT *stmt)
Definition: libmysql.cc:3735
MYSQL::scramble
char scramble[SCRAMBLE_LENGTH+1]
Definition: mysql.h:323
MYSQL_ROWS
Definition: mysql.h:152
MYSQL_OPT_CONNECT_TIMEOUT
@ MYSQL_OPT_CONNECT_TIMEOUT
Definition: mysql.h:170
MYSQL_FIELD_OFFSET
unsigned int MYSQL_FIELD_OFFSET
Definition: mysql.h:145
MYSQL_OPT_SSL_KEY
@ MYSQL_OPT_SSL_KEY
Definition: mysql.h:189
net
Definition: buffer.h:39
MYSQL_RES::data
struct MYSQL_DATA * data
Definition: mysql.h:339
MYSQL_FIELD::name
char * name
Definition: mysql.h:121
mysql_stmt_attr_get
bool STDCALL mysql_stmt_attr_get(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, void *attr)
Definition: libmysql.cc:2059
MYSQL_RES::field_count
unsigned int field_count
Definition: mysql.h:347
MYSQL_OPT_MAX_ALLOWED_PACKET
@ MYSQL_OPT_MAX_ALLOWED_PACKET
Definition: mysql.h:202
MYSQL_RES::lengths
unsigned long * lengths
Definition: mysql.h:341
MYSQL_STMT::affected_rows
uint64_t affected_rows
Definition: mysql.h:682
mysql_fetch_row
MYSQL_ROW STDCALL mysql_fetch_row(MYSQL_RES *result)
Definition: client.cc:7682
enum_stmt_attr_type
enum_stmt_attr_type
Definition: mysql.h:712
character_set::comment
const char * comment
Definition: mysql.h:287
MYSQL_DATA::alloc
struct MEM_ROOT * alloc
Definition: mysql.h:164
MYSQL_DATA::fields
unsigned int fields
Definition: mysql.h:166
mysql_select_db
int STDCALL mysql_select_db(MYSQL *mysql, const char *db)
Definition: client.cc:6830
MYSQL_PROTOCOL_SOCKET
@ MYSQL_PROTOCOL_SOCKET
Definition: mysql.h:263
argc
get_options & argc
Definition: do_ctype.cc:51
MEM_ROOT
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:77
MYSQL_SET_CHARSET_NAME
@ MYSQL_SET_CHARSET_NAME
Definition: mysql.h:177
character_set::mbminlen
unsigned int mbminlen
Definition: mysql.h:289
MYSQL_OPT_SSL_CRL
@ MYSQL_OPT_SSL_CRL
Definition: mysql.h:194
st_mysql_options::local_infile_error
int(* local_infile_error)(void *, char *, unsigned int)
Definition: mysql.h:248
mysql_stmt_result_metadata
MYSQL_RES *STDCALL mysql_stmt_result_metadata(MYSQL_STMT *stmt)
Definition: libmysql.cc:1658
MYSQL_STMT::send_types_to_server
bool send_types_to_server
Definition: mysql.h:699
mysql_option
mysql_option
Definition: mysql.h:169
MYSQL_OPT_SSL_CRLPATH
@ MYSQL_OPT_SSL_CRLPATH
Definition: mysql.h:195
character_set::mbmaxlen
unsigned int mbmaxlen
Definition: mysql.h:290
mysql_get_ssl_cipher
const char *STDCALL mysql_get_ssl_cipher(MYSQL *mysql)
Definition: client.cc:3321
MYSQL_STMT
Definition: mysql.h:667
mysql_data_seek
void STDCALL mysql_data_seek(MYSQL_RES *result, uint64_t offset)
Definition: libmysql.cc:675
MYSQL_RPL
struct MYSQL_RPL MYSQL_RPL
Struct for information about a replication stream.
MYSQL_RPL::file_name_length
size_t file_name_length
Definition: mysql.h:373
character_set::csname
const char * csname
Definition: mysql.h:285
MYSQL_OPT_SSL_FIPS_MODE
@ MYSQL_OPT_SSL_FIPS_MODE
Definition: mysql.h:209
MYSQL_STMT::params
MYSQL_BIND * params
Definition: mysql.h:671
MYSQL_OPT_CONNECT_ATTR_RESET
@ MYSQL_OPT_CONNECT_ATTR_RESET
Definition: mysql.h:196
enum_field_types
enum_field_types
Column types for MySQL.
Definition: field_types.h:57
mysql_unix_port
char * mysql_unix_port
Definition: client.cc:198
errmsg.h
MYSQL_ROWS::next
struct MYSQL_ROWS * next
Definition: mysql.h:153
mysql_thread_end
void STDCALL mysql_thread_end(void)
Definition: libmysql.cc:213
mysql_com.h
Init_commands_array
Definition: init_commands_array.h:25
MYSQL_STMT_PREPARE_DONE
@ MYSQL_STMT_PREPARE_DONE
Definition: mysql.h:572
MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS
@ MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS
Definition: mysql.h:201
MYSQL::packet_length
unsigned long packet_length
Definition: mysql.h:308
MYSQL_OPT_CONNECT_ATTR_ADD
@ MYSQL_OPT_CONNECT_ATTR_ADD
Definition: mysql.h:197
mysql_store_result_nonblocking
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:7550
mysql_fetch_field
MYSQL_FIELD *STDCALL mysql_fetch_field(MYSQL_RES *result)
Definition: libmysql.cc:665
mysql_stmt_execute
int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt)
Definition: libmysql.cc:2185
MYSQL::client_flag
unsigned long client_flag
Definition: mysql.h:310
port
static in_port_t port
Definition: testapp.c:33
mysql_close
void STDCALL mysql_close(MYSQL *sock)
Definition: client.cc:6987
mysql_fetch_row_nonblocking
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:7732
MYSQL_RPL::flags
unsigned int flags
Server ID to use when identifying
Definition: mysql.h:379
MYSQL_STMT::field_count
unsigned int field_count
Definition: mysql.h:694
SSL_MODE_VERIFY_CA
@ SSL_MODE_VERIFY_CA
Definition: mysql.h:272
STMT_ATTR_PREFETCH_ROWS
@ STMT_ATTR_PREFETCH_ROWS
Definition: mysql.h:730
mysql_send_query
int STDCALL mysql_send_query(MYSQL *mysql, const char *q, unsigned long length)
NET
Definition: mysql_com.h:879
MYSQL::server_status
unsigned int server_status
Definition: mysql.h:313
mysql_real_escape_string_quote
unsigned long STDCALL mysql_real_escape_string_quote(MYSQL *mysql, char *to, const char *from, unsigned long length, char quote)
mysql_options
int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option, const void *arg)
Definition: client.cc:7853
MYSQL::protocol_version
unsigned int protocol_version
Definition: mysql.h:311
MYSQL_FIELD::length
unsigned long length
Definition: mysql.h:128
character_set::dir
const char * dir
Definition: mysql.h:288
MYSQL_STMT::unbuffered_fetch_cancelled
bool unbuffered_fetch_cancelled
Definition: mysql.h:703
MYSQL_PROTOCOL_MEMORY
@ MYSQL_PROTOCOL_MEMORY
Definition: mysql.h:265
MYSQL_OPT_SSL_MODE
@ MYSQL_OPT_SSL_MODE
Definition: mysql.h:205
MYSQL_STMT::server_status
unsigned int server_status
Definition: mysql.h:691
MYSQL_RES::unbuffered_fetch_cancelled
bool unbuffered_fetch_cancelled
Definition: mysql.h:350
MYSQL_STMT
struct MYSQL_STMT MYSQL_STMT
st_mysql_options::write_timeout
unsigned int write_timeout
Definition: mysql.h:223
MYSQL_ROWS::length
unsigned long length
Definition: mysql.h:155
MYSQL_BIND::row_ptr
unsigned char * row_ptr
Definition: mysql.h:646
MYSQL_ROW_OFFSET
MYSQL_ROWS * MYSQL_ROW_OFFSET
Definition: mysql.h:158
user
char * user
Definition: mysqladmin.cc:59
mysql_select_db_nonblocking
enum net_async_status STDCALL mysql_select_db_nonblocking(MYSQL *mysql, const char *db, bool *error)
st_mysql_options::client_flag
unsigned long client_flag
Definition: mysql.h:225
mysql_kill
int STDCALL mysql_kill(MYSQL *mysql, unsigned long pid)
MYSQL_OPT_PROTOCOL
@ MYSQL_OPT_PROTOCOL
Definition: mysql.h:179
LIST
Definition: my_list.h:35
st_mysql_options::extension
struct st_mysql_options_extention * extension
Definition: mysql.h:250
st_mysql_options::named_pipe
bool named_pipe
Definition: mysql.h:236
st_mysql_options::compress
bool compress
Definition: mysql.h:236
enum_mysql_stmt_state
enum_mysql_stmt_state
Definition: mysql.h:570
MYSQL_OPT_OPTIONAL_RESULTSET_METADATA
@ MYSQL_OPT_OPTIONAL_RESULTSET_METADATA
Definition: mysql.h:208
mysql_get_server_info
const char *STDCALL mysql_get_server_info(MYSQL *mysql)
Definition: libmysql.cc:887
SSL_FIPS_MODE_ON
@ SSL_FIPS_MODE_ON
Definition: mysql.h:278
MYSQL_OPT_BIND
@ MYSQL_OPT_BIND
Definition: mysql.h:188
MYSQL_ROWS::data
MYSQL_ROW data
Definition: mysql.h:154
mysql_next_result
int STDCALL mysql_next_result(MYSQL *mysql)
Definition: libmysql.cc:4296
MYSQL_STMT::insert_id
uint64_t insert_id
Definition: mysql.h:683
MYSQL_FIELD
struct MYSQL_FIELD MYSQL_FIELD
mysql_stmt_errno
unsigned int STDCALL mysql_stmt_errno(MYSQL_STMT *stmt)
Definition: libmysql.cc:4222
query
static char * query
Definition: myisam_ftdump.cc:44
MYSQL::field_alloc
struct MEM_ROOT * field_alloc
Definition: mysql.h:303
MYSQL_STMT::fields
MYSQL_FIELD * fields
Definition: mysql.h:673
MYSQL::affected_rows
uint64_t affected_rows
Definition: mysql.h:304
MYSQL_RPL::server_id
unsigned int server_id
Position in the binary log to
Definition: mysql.h:377
MYSQL_RES::current_row
MYSQL_ROW current_row
Definition: mysql.h:345
MYSQL_RES
struct MYSQL_RES MYSQL_RES
MYSQL_BIND::param_number
unsigned int param_number
Definition: mysql.h:654
mysql_set_local_infile_default
void mysql_set_local_infile_default(MYSQL *mysql)
Definition: libmysql.cc:645
MYSQL::thread_id
unsigned long thread_id
Definition: mysql.h:307
my_ulonglong
uint64_t my_ulonglong
Definition: mysql.h:53
mysql_port
unsigned int mysql_port
Definition: client.cc:197
mysql_rollback
bool STDCALL mysql_rollback(MYSQL *mysql)
Definition: libmysql.cc:4258
MYSQL::host
char * host
Definition: mysql.h:299
mysql_binlog_close
void STDCALL mysql_binlog_close(MYSQL *mysql, MYSQL_RPL *rpl)
Close replication stream.
Definition: client.cc:6815
st_mysql_options::port
unsigned int port
Definition: mysql.h:224
mysql_store_result
MYSQL_RES *STDCALL mysql_store_result(MYSQL *mysql)
Definition: client.cc:7491
mysql_fetch_fields
MYSQL_FIELD *STDCALL mysql_fetch_fields(MYSQL_RES *res)
Definition: libmysql.cc:910
mysql_ssl_fips_mode
mysql_ssl_fips_mode
Definition: mysql.h:276
MYSQL
Definition: mysql.h:296
mysql_stmt_param_count
unsigned long STDCALL mysql_stmt_param_count(MYSQL_STMT *stmt)
Definition: libmysql.cc:2212
MYSQL::reconnect
bool reconnect
Definition: mysql.h:320
mysql_real_escape_string
unsigned long STDCALL mysql_real_escape_string(MYSQL *mysql, char *to, const char *from, unsigned long length)
mysql_escape_string
unsigned long STDCALL mysql_escape_string(char *to, const char *from, unsigned long from_length)
MYSQL_OPT_RECONNECT
@ MYSQL_OPT_RECONNECT
Definition: mysql.h:185
mysql_read_query_result
bool STDCALL mysql_read_query_result(MYSQL *mysql)
Definition: libmysql.cc:4391
MYSQL::info
char * info
Definition: mysql.h:300
mysql_stmt_row_seek
MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_seek(MYSQL_STMT *stmt, MYSQL_ROW_OFFSET offset)
Definition: libmysql.cc:4015
st_mysql_options::report_data_truncation
bool report_data_truncation
Definition: mysql.h:242
character_set
Definition: mysql.h:282
MYSQL::thd
void * thd
Definition: mysql.h:327
mysql_stat
const char *STDCALL mysql_stat(MYSQL *mysql)
Definition: libmysql.cc:871
MYSQL_PROTOCOL_DEFAULT
@ MYSQL_PROTOCOL_DEFAULT
Definition: mysql.h:261
my_socket
int my_socket
Definition: mysql.h:64
mysql_reset_connection
int STDCALL mysql_reset_connection(MYSQL *mysql)
Definition: libmysql.cc:4395
mysql_row_seek
MYSQL_ROW_OFFSET STDCALL mysql_row_seek(MYSQL_RES *result, MYSQL_ROW_OFFSET offset)
Definition: libmysql.cc:691
MYSQL_OPT_NAMED_PIPE
@ MYSQL_OPT_NAMED_PIPE
Definition: mysql.h:172
MYSQL_PLUGIN_DIR
@ MYSQL_PLUGIN_DIR
Definition: mysql.h:186
MYSQL_BIND::long_data_used
bool long_data_used
Definition: mysql.h:659
MYSQL_INIT_COMMAND
@ MYSQL_INIT_COMMAND
Definition: mysql.h:173
MYSQL::stmts
LIST * stmts
Definition: mysql.h:325
mysql_thread_id
unsigned long STDCALL mysql_thread_id(MYSQL *mysql)
Definition: libmysql.cc:955
mysql_stmt_data_seek
void STDCALL mysql_stmt_data_seek(MYSQL_STMT *stmt, uint64_t offset)
Definition: libmysql.cc:4038
MYSQL_BIND::skip_result
void(* skip_result)(struct MYSQL_BIND *, MYSQL_FIELD *, unsigned char **row)
Definition: mysql.h:649
MYSQL_RES::current_field
unsigned int current_field
Definition: mysql.h:347
MYSQL_FIELD::table_length
unsigned int table_length
Definition: mysql.h:132
mysql_session_track_get_next
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:8506
mysql_field_tell
MYSQL_FIELD_OFFSET STDCALL mysql_field_tell(MYSQL_RES *res)
Definition: libmysql.cc:918
MYSQL::connector_fd
unsigned char * connector_fd
Definition: mysql.h:298
net_async_status
net_async_status
Definition: plugin_auth_common.h:130
st_mysql_options::connect_timeout
unsigned int connect_timeout
Definition: mysql.h:223
SQLSTATE_LENGTH
#define SQLSTATE_LENGTH
Definition: mysql_com.h:74
MYSQL_RES::extension
void * extension
Definition: mysql.h:352
MYSQL::insert_id
uint64_t insert_id
Definition: mysql.h:305
mysql_affected_rows
uint64_t STDCALL mysql_affected_rows(MYSQL *mysql)
Definition: libmysql.cc:932
error
Log error(cerr, "ERROR")
MYSQL_OPT_COMPRESSION_ALGORITHMS
@ MYSQL_OPT_COMPRESSION_ALGORITHMS
Definition: mysql.h:211
MYSQL_FIELD::def
char * def
Definition: mysql.h:127
MYSQL_RES::metadata
enum enum_resultset_metadata metadata
Definition: mysql.h:351
MYSQL_BIND::pack_length
unsigned int pack_length
Definition: mysql.h:655
SSL_MODE_PREFERRED
@ SSL_MODE_PREFERRED
Definition: mysql.h:270
MYSQL::warning_count
unsigned int warning_count
Definition: mysql.h:315
MYSQL_RES::field_alloc
struct MEM_ROOT * field_alloc
Definition: mysql.h:346
MYSQL_STMT::sqlstate
char sqlstate[SQLSTATE_LENGTH+1]
Definition: mysql.h:697
mysql_stmt_insert_id
uint64_t STDCALL mysql_stmt_insert_id(MYSQL_STMT *stmt)
Definition: libmysql.cc:2250
MYSQL_STMT::last_errno
unsigned int last_errno
Definition: mysql.h:692
MYSQL_OPT_SSL_CIPHER
@ MYSQL_OPT_SSL_CIPHER
Definition: mysql.h:193
SSL_MODE_DISABLED
@ SSL_MODE_DISABLED
Definition: mysql.h:269
MYSQL_RES::eof
bool eof
Definition: mysql.h:348
mysql_list_processes
MYSQL_RES *STDCALL mysql_list_processes(MYSQL *mysql)
Definition: libmysql.cc:795
st_mysql_options::shared_memory_base_name
char * shared_memory_base_name
Definition: mysql.h:234
mysql_bind_param
bool STDCALL mysql_bind_param(MYSQL *mysql, unsigned n_params, MYSQL_BIND *binds, const char **names)
Definition: libmysql.cc:2456
gis::length
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
mysql_stmt_store_result
int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt)
Definition: libmysql.cc:3918
mysql_server_init
int STDCALL mysql_server_init(int argc, char **argv, char **groups)
Definition: libmysql.cc:128
st_mysql_options::unix_socket
char * unix_socket
Definition: mysql.h:226
mysql_fetch_lengths
unsigned long *STDCALL mysql_fetch_lengths(MYSQL_RES *result)
Definition: client.cc:7807
mysql_debug
void STDCALL mysql_debug(const char *debug)
Definition: libmysql.cc:238
mysql_field_seek
MYSQL_FIELD_OFFSET STDCALL mysql_field_seek(MYSQL_RES *result, MYSQL_FIELD_OFFSET offset)
Definition: libmysql.cc:699
mysql_num_rows
uint64_t STDCALL mysql_num_rows(MYSQL_RES *res)
Definition: client.cc:8432
st_mysql_options::ssl_key
char * ssl_key
Definition: mysql.h:229
mysql_change_user
bool STDCALL mysql_change_user(MYSQL *mysql, const char *user, const char *passwd, const char *db)
Definition: libmysql.cc:266
mysql_dump_debug_info
int STDCALL mysql_dump_debug_info(MYSQL *mysql)
Definition: libmysql.cc:852
STMT_ATTR_CURSOR_TYPE
@ STMT_ATTR_CURSOR_TYPE
Definition: mysql.h:725
MYSQL_PROTOCOL_PIPE
@ MYSQL_PROTOCOL_PIPE
Definition: mysql.h:264
MYSQL_DATA
struct MYSQL_DATA MYSQL_DATA
MYSQL_OPT_TLS_VERSION
@ MYSQL_OPT_TLS_VERSION
Definition: mysql.h:204
MYSQL_STATUS_READY
@ MYSQL_STATUS_READY
Definition: mysql.h:254
sock
static MYSQL * sock
Definition: mysqlcheck.cc:55
st_mysql_options::db
char * db
Definition: mysql.h:226
MYSQL_STMT::read_row_func
int(* read_row_func)(struct MYSQL_STMT *stmt, unsigned char **row)
Definition: mysql.h:680
mysql_stmt_param_metadata
MYSQL_RES *STDCALL mysql_stmt_param_metadata(MYSQL_STMT *stmt)
Definition: libmysql.cc:1700
MYSQL_READ_DEFAULT_GROUP
@ MYSQL_READ_DEFAULT_GROUP
Definition: mysql.h:175
MYSQL_RPL::gtid_set_encoded_size
size_t gtid_set_encoded_size
Flags, e.g.
Definition: mysql.h:382
mysql_version.h
MYSQL::db
char * db
Definition: mysql.h:300
mysql_stmt_reset
bool STDCALL mysql_stmt_reset(MYSQL_STMT *stmt)
Definition: libmysql.cc:4205
st_mysql_options
Definition: mysql.h:222
mysql_get_host_info
const char *STDCALL mysql_get_host_info(MYSQL *mysql)
Definition: libmysql.cc:891
MYSQL_OPT_GET_SERVER_PUBLIC_KEY
@ MYSQL_OPT_GET_SERVER_PUBLIC_KEY
Definition: mysql.h:206
MYSQL_RPL::fix_gtid_set
void(* fix_gtid_set)(struct MYSQL_RPL *rpl, unsigned char *packet_gtid_set)
Callback function which is called
Definition: mysql.h:386
MYSQL_STMT::mem_root
struct MEM_ROOT * mem_root
Definition: mysql.h:668
SSL_MODE_REQUIRED
@ SSL_MODE_REQUIRED
Definition: mysql.h:271
MYSQL_STMT::param_count
unsigned int param_count
Definition: mysql.h:693
MYSQL_OPT_SSL_CAPATH
@ MYSQL_OPT_SSL_CAPATH
Definition: mysql.h:192
MYSQL::resultset_metadata
enum enum_resultset_metadata resultset_metadata
Definition: mysql.h:318
mysql_field_count
unsigned int STDCALL mysql_field_count(MYSQL *mysql)
Definition: libmysql.cc:928
st_mysql_options::local_infile_read
int(* local_infile_read)(void *, char *, unsigned int)
Definition: mysql.h:246
MYSQL_BIND::error
bool * error
Definition: mysql.h:645
MYSQL_BIND::offset
unsigned long offset
Definition: mysql.h:652
mysql_get_option
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:8177
MYSQL_FIELD::org_name
char * org_name
Definition: mysql.h:122
mysql_fetch_field_direct
MYSQL_FIELD *STDCALL mysql_fetch_field_direct(MYSQL_RES *res, unsigned int fieldnr)
Definition: libmysql.cc:905
MYSQL_RPL::buffer
const unsigned char * buffer
Size of the packet returned by
Definition: mysql.h:392
mysql_stmt_attr_set
bool STDCALL mysql_stmt_attr_set(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, const void *attr)
Definition: libmysql.cc:2029
STDCALL
#define STDCALL
Definition: mysql.h:72
mysql_protocol_type
mysql_protocol_type
Definition: mysql.h:260
enum_mysql_set_option
enum_mysql_set_option
options for mysql_options()
Definition: mysql_com.h:1004
MYSQL::server_language
unsigned int server_language
Definition: mysql.h:314
binary_log::transaction::compression::type
type
Definition: base.h:36
MYSQL_BIND::buffer_length
unsigned long buffer_length
Definition: mysql.h:651
mysql_list_dbs
MYSQL_RES *STDCALL mysql_list_dbs(MYSQL *mysql, const char *wild)
Definition: libmysql.cc:710
mysql_binlog_open
int STDCALL mysql_binlog_open(MYSQL *mysql, MYSQL_RPL *rpl)
Open a new replication stream.
Definition: client.cc:6648
client_plugin.h
MYSQL_STMT::extension
struct MYSQL_STMT_EXT * extension
Definition: mysql.h:709
MYSQL_STMT::stmt_id
unsigned long stmt_id
Definition: mysql.h:684
character_set::number
unsigned int number
Definition: mysql.h:283
st_mysql_options::password
char * password
Definition: mysql.h:226
mysql_list_fields
MYSQL_RES *STDCALL mysql_list_fields(MYSQL *mysql, const char *table, const char *wild)
Definition: libmysql.cc:758
mysql_query
int STDCALL mysql_query(MYSQL *mysql, const char *q)
Definition: libmysql.cc:657
st_mysql_options::my_cnf_file
char * my_cnf_file
Definition: mysql.h:228
MYSQL_FIELD::catalog
char * catalog
Definition: mysql.h:126
MYSQL::options
struct st_mysql_options options
Definition: mysql.h:316
MYSQL::methods
const struct MYSQL_METHODS * methods
Definition: mysql.h:326
MYSQL_ROWS
struct MYSQL_ROWS MYSQL_ROWS
MYSQL_RPL
Struct for information about a replication stream.
Definition: mysql.h:372
st_mysql_options::my_cnf_group
char * my_cnf_group
Definition: mysql.h:228
mysql_time.h
MYSQL_STMT::flags
unsigned long flags
Definition: mysql.h:685
MYSQL_RES::row
MYSQL_ROW row
Definition: mysql.h:344
MYSQL_OPT_USE_RESULT
@ MYSQL_OPT_USE_RESULT
Definition: mysql.h:183
MYSQL_BIND
Definition: mysql.h:640
mysql_result_metadata
enum enum_resultset_metadata STDCALL mysql_result_metadata(MYSQL_RES *result)
Definition: libmysql.cc:922
mysql_stmt_free_result
bool STDCALL mysql_stmt_free_result(MYSQL_STMT *stmt)
Definition: libmysql.cc:4126
MYSQL_OPT_COMPRESS
@ MYSQL_OPT_COMPRESS
Definition: mysql.h:171
st_mysql_options::ssl_ca
char * ssl_ca
Definition: mysql.h:231
MYSQL_OPT_SSL_CERT
@ MYSQL_OPT_SSL_CERT
Definition: mysql.h:190
MYSQL::port
unsigned int port
Definition: mysql.h:309
MYSQL_STMT_EXT
Definition: libmysql.cc:106
mysql_stmt_close
bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt)
Definition: libmysql.cc:4150
mysql_reset_server_public_key
void STDCALL mysql_reset_server_public_key(void)
Definition: client_authentication.cc:844
character_set::name
const char * name
Definition: mysql.h:286
MYSQL_BIND::is_null_value
bool is_null_value
Definition: mysql.h:660
argv
char * argv[]
Definition: do_ctype.cc:45
mysql_get_server_version
unsigned long STDCALL mysql_get_server_version(MYSQL *mysql)
Definition: client.cc:8542
mysql_row_tell
MYSQL_ROW_OFFSET STDCALL mysql_row_tell(MYSQL_RES *res)
Definition: libmysql.cc:914
dns_srv_name
static char * dns_srv_name
Definition: mysql.cc:183
mysql_options4
int STDCALL mysql_options4(MYSQL *mysql, enum mysql_option option, const void *arg1, const void *arg2)
Definition: client.cc:8362
MYSQL_RPL::start_position
uint64_t start_position
Filename of the binary log to read.
Definition: mysql.h:375
mysql_real_connect_dns_srv
MYSQL *STDCALL mysql_real_connect_dns_srv(MYSQL *mysql, const char *dns_srv_name, const char *user, const char *passwd, const char *db, unsigned long client_flag)
Connect to a server using a DNS SRV name.
Definition: dns_srv.cc:161
mysql_more_results
bool STDCALL mysql_more_results(MYSQL *mysql)
Definition: libmysql.cc:4284
mysql_ping
int STDCALL mysql_ping(MYSQL *mysql)
Definition: libmysql.cc:878
MYSQL_FIELD::decimals
unsigned int decimals
Definition: mysql.h:138
mysql_error
const char *STDCALL mysql_error(MYSQL *mysql)
Definition: client.cc:8442
mysql_real_connect_nonblocking
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)