MySQL  8.0.18
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 <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;
142 } MYSQL_FIELD;
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;
156 } MYSQL_ROWS;
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;
167 } MYSQL_DATA;
168 
213 };
214 
215 /**
216  @todo remove the "extension", move st_mysql_options completely
217  out of mysql.h
218 */
220 
223  unsigned int port, protocol;
224  unsigned long client_flag;
225  char *host, *user, *password, *unix_socket, *db;
228  char *ssl_key; /* PEM key file */
229  char *ssl_cert; /* PEM cert file */
230  char *ssl_ca; /* PEM CA file */
231  char *ssl_capath; /* PEM directory of CA-s? */
232  char *ssl_cipher; /* cipher to use */
234  unsigned long max_allowed_packet;
236  /**
237  The local address to bind when connecting to remote server.
238  */
240  /* 0 - never report, 1 - always report (default) */
242 
243  /* function pointers for local infile support */
244  int (*local_infile_init)(void **, const char *, void *);
245  int (*local_infile_read)(void *, char *, unsigned int);
246  void (*local_infile_end)(void *);
247  int (*local_infile_error)(void *, char *, unsigned int);
250 };
251 
257 };
258 
265 };
266 
273 };
274 
279 };
280 
281 typedef struct character_set {
282  unsigned int number; /* character set number */
283  unsigned int state; /* character set state */
284  const char *csname; /* collation name */
285  const char *name; /* character set name */
286  const char *comment; /* comment */
287  const char *dir; /* character set directory */
288  unsigned int mbminlen; /* min. length for multibyte strings */
289  unsigned int mbmaxlen; /* max. length for multibyte strings */
291 
292 struct MYSQL_METHODS;
293 struct MYSQL_STMT;
294 
295 typedef struct MYSQL {
296  NET net; /* Communication parameters */
297  unsigned char *connector_fd; /* ConnectorFd for SSL */
299  char *info, *db;
303  uint64_t affected_rows;
304  uint64_t insert_id; /* id if insert on table with NEXTNR */
305  uint64_t extra_info; /* Not used */
306  unsigned long thread_id; /* Id for connection in server */
307  unsigned long packet_length;
308  unsigned int port;
310  unsigned int protocol_version;
311  unsigned int field_count;
312  unsigned int server_status;
313  unsigned int server_language;
314  unsigned int warning_count;
318  bool free_me; /* If free in mysql_close */
319  bool reconnect; /* set to 1 if automatic reconnect */
320 
321  /* session-wide random string */
323 
324  LIST *stmts; /* list of all statements */
325  const struct MYSQL_METHODS *methods;
326  void *thd;
327  /*
328  Points to boolean flag in MYSQL_RES or MYSQL_STMT. We set this flag
329  from mysql_stmt_close if close had to cancel result set of this object.
330  */
332  void *extension;
333 } MYSQL;
334 
335 typedef struct MYSQL_RES {
336  uint64_t row_count;
338  struct MYSQL_DATA *data;
340  unsigned long *lengths; /* column lengths of current row */
341  MYSQL *handle; /* for unbuffered reads */
342  const struct MYSQL_METHODS *methods;
343  MYSQL_ROW row; /* If unbuffered read */
344  MYSQL_ROW current_row; /* buffer to current row */
346  unsigned int field_count, current_field;
347  bool eof; /* Used by mysql_fetch_row */
348  /* mysql_stmt_close() had to cancel this result */
351  void *extension;
352 } MYSQL_RES;
353 
354 /**
355  Flag to indicate that COM_BINLOG_DUMP_GTID should
356  be used rather than COM_BINLOG_DUMP in the @sa mysql_binlog_open().
357 */
358 #define MYSQL_RPL_GTID (1 << 16)
359 /**
360  Skip HEARBEAT events in the @sa mysql_binlog_fetch().
361 */
362 #define MYSQL_RPL_SKIP_HEARTBEAT (1 << 17)
363 
364 /**
365  Struct for information about a replication stream.
366 
367  @sa mysql_binlog_open()
368  @sa mysql_binlog_fetch()
369  @sa mysql_binlog_close()
370 */
371 typedef struct MYSQL_RPL {
372  size_t file_name_length; /** Length of the 'file_name' or 0 */
373  const char *file_name; /** Filename of the binary log to read */
374  uint64_t start_position; /** Position in the binary log to */
375  /* start reading from */
376  unsigned int server_id; /** Server ID to use when identifying */
377  /* with the master */
378  unsigned int flags; /** Flags, e.g. MYSQL_RPL_GTID */
379 
380  /** Size of gtid set data */
382  /** Callback function which is called */
383  /* from @sa mysql_binlog_open() to */
384  /* fill command packet gtid set */
385  void (*fix_gtid_set)(struct MYSQL_RPL *rpl, unsigned char *packet_gtid_set);
386  void *gtid_set_arg; /** GTID set data or an argument for */
387  /* fix_gtid_set() callback function */
388 
389  unsigned long size; /** Size of the packet returned by */
390  /* mysql_binlog_fetch() */
391  const unsigned char *buffer; /** Pointer to returned data */
392 } MYSQL_RPL;
393 
394 /*
395  Set up and bring down the server; to ensure that applications will
396  work when linked against either the standard client library or the
397  embedded server library, these functions should be called.
398 */
399 int STDCALL mysql_server_init(int argc, char **argv, char **groups);
400 void STDCALL mysql_server_end(void);
401 
402 /*
403  mysql_server_init/end need to be called when using libmysqld or
404  libmysqlclient (exactly, mysql_server_init() is called by mysql_init() so
405  you don't need to call it explicitely; but you need to call
406  mysql_server_end() to free memory). The names are a bit misleading
407  (mysql_SERVER* to be used when using libmysqlCLIENT). So we add more general
408  names which suit well whether you're using libmysqld or libmysqlclient. We
409  intend to promote these aliases over the mysql_server* ones.
410 */
411 #define mysql_library_init mysql_server_init
412 #define mysql_library_end mysql_server_end
413 
414 /*
415  Set up and bring down a thread; these function should be called
416  for each thread in an application which opens at least one MySQL
417  connection. All uses of the connection(s) should be between these
418  function calls.
419 */
420 bool STDCALL mysql_thread_init(void);
421 void STDCALL mysql_thread_end(void);
422 
423 /*
424  Functions to get information from the MYSQL and MYSQL_RES structures
425  Should definitely be used if one uses shared libraries.
426 */
427 
428 uint64_t STDCALL mysql_num_rows(MYSQL_RES *res);
429 unsigned int STDCALL mysql_num_fields(MYSQL_RES *res);
430 bool STDCALL mysql_eof(MYSQL_RES *res);
432  unsigned int fieldnr);
437 
438 unsigned int STDCALL mysql_field_count(MYSQL *mysql);
441 unsigned int STDCALL mysql_errno(MYSQL *mysql);
442 const char *STDCALL mysql_error(MYSQL *mysql);
443 const char *STDCALL mysql_sqlstate(MYSQL *mysql);
444 unsigned int STDCALL mysql_warning_count(MYSQL *mysql);
445 const char *STDCALL mysql_info(MYSQL *mysql);
446 unsigned long STDCALL mysql_thread_id(MYSQL *mysql);
448 int STDCALL mysql_set_character_set(MYSQL *mysql, const char *csname);
449 
451 bool STDCALL mysql_ssl_set(MYSQL *mysql, const char *key, const char *cert,
452  const char *ca, const char *capath,
453  const char *cipher);
455 bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
456  const char *passwd, const char *db);
458  const char *user, const char *passwd,
459  const char *db, unsigned int port,
460  const char *unix_socket,
461  unsigned long clientflag);
462 int STDCALL mysql_select_db(MYSQL *mysql, const char *db);
463 int STDCALL mysql_query(MYSQL *mysql, const char *q);
464 int STDCALL mysql_send_query(MYSQL *mysql, const char *q, unsigned long length);
465 int STDCALL mysql_real_query(MYSQL *mysql, const char *q, unsigned long length);
468 
470  MYSQL *mysql, const char *host, const char *user, const char *passwd,
471  const char *db, unsigned int port, const char *unix_socket,
472  unsigned long clientflag);
474  MYSQL *mysql, const char *query, unsigned long length);
476  MYSQL *mysql, const char *query, unsigned long length);
481  const char *db,
482  bool *error);
484  MY_CHARSET_INFO *charset);
485 
488  const char **data, size_t *length);
491  const char **data, size_t *length);
492 /* local infile support */
493 
494 #define LOCAL_INFILE_ERROR_LEN 512
495 
497  MYSQL *mysql, int (*local_infile_init)(void **, const char *, void *),
498  int (*local_infile_read)(void *, char *, unsigned int),
499  void (*local_infile_end)(void *),
500  int (*local_infile_error)(void *, char *, unsigned int), void *);
501 
504  enum mysql_enum_shutdown_level shutdown_level);
506 int STDCALL mysql_refresh(MYSQL *mysql, unsigned int refresh_options);
507 int STDCALL mysql_kill(MYSQL *mysql, unsigned long pid);
511 const char *STDCALL mysql_stat(MYSQL *mysql);
513 const char *STDCALL mysql_get_client_info(void);
514 unsigned long STDCALL mysql_get_client_version(void);
515 const char *STDCALL mysql_get_host_info(MYSQL *mysql);
517 unsigned int STDCALL mysql_get_proto_info(MYSQL *mysql);
518 MYSQL_RES *STDCALL mysql_list_dbs(MYSQL *mysql, const char *wild);
519 MYSQL_RES *STDCALL mysql_list_tables(MYSQL *mysql, const char *wild);
522  const void *arg);
524  const void *arg1, const void *arg2);
526  const void *arg);
529 void STDCALL mysql_data_seek(MYSQL_RES *result, uint64_t offset);
531  MYSQL_ROW_OFFSET offset);
533  MYSQL_FIELD_OFFSET offset);
536  MYSQL_ROW *row);
537 
540 MYSQL_RES *STDCALL mysql_list_fields(MYSQL *mysql, const char *table,
541  const char *wild);
542 unsigned long STDCALL mysql_escape_string(char *to, const char *from,
543  unsigned long from_length);
544 unsigned long STDCALL mysql_hex_string(char *to, const char *from,
545  unsigned long from_length);
546 unsigned long STDCALL mysql_real_escape_string(MYSQL *mysql, char *to,
547  const char *from,
548  unsigned long length);
549 unsigned long STDCALL mysql_real_escape_string_quote(MYSQL *mysql, char *to,
550  const char *from,
551  unsigned long length,
552  char quote);
553 void STDCALL mysql_debug(const char *debug);
555 unsigned int STDCALL mysql_thread_safe(void);
558 
562 
563 /*
564  The following definitions are added for the enhanced
565  client-server protocol
566 */
567 
568 /* statement state */
574 };
575 
576 /*
577  This structure is used to define bind information, and
578  internally by the client library.
579  Public members with their descriptions are listed below
580  (conventionally `On input' refers to the binds given to
581  mysql_stmt_bind_param, `On output' refers to the binds given
582  to mysql_stmt_bind_result):
583 
584  buffer_type - One of the MYSQL_* types, used to describe
585  the host language type of buffer.
586  On output: if column type is different from
587  buffer_type, column value is automatically converted
588  to buffer_type before it is stored in the buffer.
589  buffer - On input: points to the buffer with input data.
590  On output: points to the buffer capable to store
591  output data.
592  The type of memory pointed by buffer must correspond
593  to buffer_type. See the correspondence table in
594  the comment to mysql_stmt_bind_param.
595 
596  The two above members are mandatory for any kind of bind.
597 
598  buffer_length - the length of the buffer. You don't have to set
599  it for any fixed length buffer: float, double,
600  int, etc. It must be set however for variable-length
601  types, such as BLOBs or STRINGs.
602 
603  length - On input: in case when lengths of input values
604  are different for each execute, you can set this to
605  point at a variable containining value length. This
606  way the value length can be different in each execute.
607  If length is not NULL, buffer_length is not used.
608  Note, length can even point at buffer_length if
609  you keep bind structures around while fetching:
610  this way you can change buffer_length before
611  each execution, everything will work ok.
612  On output: if length is set, mysql_stmt_fetch will
613  write column length into it.
614 
615  is_null - On input: points to a boolean variable that should
616  be set to TRUE for NULL values.
617  This member is useful only if your data may be
618  NULL in some but not all cases.
619  If your data is never NULL, is_null should be set to 0.
620  If your data is always NULL, set buffer_type
621  to MYSQL_TYPE_NULL, and is_null will not be used.
622 
623  is_unsigned - On input: used to signify that values provided for one
624  of numeric types are unsigned.
625  On output describes signedness of the output buffer.
626  If, taking into account is_unsigned flag, column data
627  is out of range of the output buffer, data for this column
628  is regarded truncated. Note that this has no correspondence
629  to the sign of result set column, if you need to find it out
630  use mysql_stmt_result_metadata.
631  error - where to write a truncation error if it is present.
632  possible error value is:
633  0 no truncation
634  1 value is out of range or buffer is too small
635 
636  Please note that MYSQL_BIND also has internals members.
637 */
638 
639 typedef struct MYSQL_BIND {
640  unsigned long *length; /* output length pointer */
641  bool *is_null; /* Pointer to null indicator */
642  void *buffer; /* buffer to get/put data */
643  /* set this if you want to track data truncations happened during fetch */
644  bool *error;
645  unsigned char *row_ptr; /* for the current data position */
646  void (*store_param_func)(NET *net, struct MYSQL_BIND *param);
647  void (*fetch_result)(struct MYSQL_BIND *, MYSQL_FIELD *, unsigned char **row);
648  void (*skip_result)(struct MYSQL_BIND *, MYSQL_FIELD *, unsigned char **row);
649  /* output buffer length, must be set when fetching str/binary */
650  unsigned long buffer_length;
651  unsigned long offset; /* offset position for char/binary fetch */
652  unsigned long length_value; /* Used if length is 0 */
653  unsigned int param_number; /* For null count and error messages */
654  unsigned int pack_length; /* Internal length for packed data */
655  enum enum_field_types buffer_type; /* buffer type */
656  bool error_value; /* used if error is 0 */
657  bool is_unsigned; /* set if integer type is unsigned */
658  bool long_data_used; /* If used with mysql_send_long_data */
659  bool is_null_value; /* Used if is_null is 0 */
660  void *extension;
661 } MYSQL_BIND;
662 
663 struct MYSQL_STMT_EXT;
664 
665 /* statement handler */
666 typedef struct MYSQL_STMT {
667  struct MEM_ROOT *mem_root; /* root allocations */
668  LIST list; /* list to keep track of all stmts */
669  MYSQL *mysql; /* connection handle */
670  MYSQL_BIND *params; /* input parameters */
671  MYSQL_BIND *bind; /* output parameters */
672  MYSQL_FIELD *fields; /* result set metadata */
673  MYSQL_DATA result; /* cached result set */
674  MYSQL_ROWS *data_cursor; /* current row in cached result */
675  /*
676  mysql_stmt_fetch() calls this function to fetch one row (it's different
677  for buffered, unbuffered and cursor fetch).
678  */
679  int (*read_row_func)(struct MYSQL_STMT *stmt, unsigned char **row);
680  /* copy of mysql->affected_rows after statement execution */
681  uint64_t affected_rows;
682  uint64_t insert_id; /* copy of mysql->insert_id */
683  unsigned long stmt_id; /* Id for prepared statement */
684  unsigned long flags; /* i.e. type of cursor to open */
685  unsigned long prefetch_rows; /* number of rows per one COM_FETCH */
686  /*
687  Copied from mysql->server_status after execute/fetch to know
688  server-side cursor status for this statement.
689  */
690  unsigned int server_status;
691  unsigned int last_errno; /* error code */
692  unsigned int param_count; /* input parameter count */
693  unsigned int field_count; /* number of columns in result set */
694  enum enum_mysql_stmt_state state; /* statement state */
695  char last_error[MYSQL_ERRMSG_SIZE]; /* error message */
697  /* Types of input parameters should be sent to server */
699  bool bind_param_done; /* input buffers were supplied */
700  unsigned char bind_result_done; /* output buffers were supplied */
701  /* mysql_stmt_close() had to cancel this result */
703  /*
704  Is set to true if we need to calculate field->max_length for
705  metadata fields when doing mysql_stmt_store_result.
706  */
709 } MYSQL_STMT;
710 
712  /*
713  When doing mysql_stmt_store_result calculate max_length attribute
714  of statement metadata. This is to be consistent with the old API,
715  where this was done automatically.
716  In the new API we do that only by request because it slows down
717  mysql_stmt_store_result sufficiently.
718  */
720  /*
721  unsigned long with combination of cursor flags (read only, for update,
722  etc)
723  */
725  /*
726  Amount of rows to retrieve from server per one fetch if using cursors.
727  Accepts unsigned long attribute in the range 1 - ulong_max
728  */
730 };
731 
733 int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query,
734  unsigned long length);
738  unsigned int column, unsigned long offset);
740 unsigned long STDCALL mysql_stmt_param_count(MYSQL_STMT *stmt);
742  enum enum_stmt_attr_type attr_type,
743  const void *attr);
745  enum enum_stmt_attr_type attr_type,
746  void *attr);
753  unsigned int param_number,
754  const char *data, unsigned long length);
757 unsigned int STDCALL mysql_stmt_errno(MYSQL_STMT *stmt);
758 const char *STDCALL mysql_stmt_error(MYSQL_STMT *stmt);
759 const char *STDCALL mysql_stmt_sqlstate(MYSQL_STMT *stmt);
761  MYSQL_ROW_OFFSET offset);
763 void STDCALL mysql_stmt_data_seek(MYSQL_STMT *stmt, uint64_t offset);
764 uint64_t STDCALL mysql_stmt_num_rows(MYSQL_STMT *stmt);
766 uint64_t STDCALL mysql_stmt_insert_id(MYSQL_STMT *stmt);
767 unsigned int STDCALL mysql_stmt_field_count(MYSQL_STMT *stmt);
768 
771 bool STDCALL mysql_autocommit(MYSQL *mysql, bool auto_mode);
776 
777 /* Public key reset */
779 
780 /* status return codes */
781 #define MYSQL_NO_DATA 100
782 #define MYSQL_DATA_TRUNCATED 101
783 
784 #define mysql_reload(mysql) mysql_refresh((mysql), REFRESH_GRANT)
785 
786 #define HAVE_MYSQL_REAL_CONNECT
787 
788 #ifdef __cplusplus
789 }
790 #endif
791 
792 #endif /* _mysql_h */
Definition: mysql.h:182
const char * comment
Definition: mysql.h:286
unsigned int write_timeout
Definition: mysql.h:222
const char *STDCALL mysql_get_client_info(void)
Definition: libmysql.cc:842
Struct for information about a replication stream.
Definition: mysql.h:371
MYSQL_RES *STDCALL mysql_list_fields(MYSQL *mysql, const char *table, const char *wild)
Definition: libmysql.cc:701
unsigned int STDCALL mysql_get_proto_info(MYSQL *mysql)
Definition: libmysql.cc:838
Definition: result.h:33
unsigned long size
GTID set data or an argument for.
Definition: mysql.h:389
bool * error
Definition: mysql.h:644
mysql_protocol_type
Definition: mysql.h:259
bool named_pipe
Definition: mysql.h:235
unsigned long STDCALL mysql_escape_string(char *to, const char *from, unsigned long from_length)
Definition: libmysql.cc:993
unsigned int fields
Definition: mysql.h:166
unsigned long STDCALL mysql_get_client_version(void)
Definition: libmysql.cc:844
synode_no q[FIFO_SIZE]
Definition: xcom_base.c:2941
unsigned long offset
Definition: mysql.h:651
Definition: mysql.h:179
Definition: mysql.h:204
unsigned long * length
Definition: mysql.h:640
This file contains the field type.
unsigned int mbminlen
Definition: mysql.h:288
Definition: mysql.h:268
uint64_t insert_id
Definition: mysql.h:682
unsigned int protocol
Definition: mysql.h:223
char * charset_name
Definition: mysql.h:227
MYSQL_FIELD *STDCALL mysql_fetch_fields(MYSQL_RES *res)
Definition: libmysql.cc:853
void(* fetch_result)(struct MYSQL_BIND *, MYSQL_FIELD *, unsigned char **row)
Definition: mysql.h:647
MYSQL_ROW row
Definition: mysql.h:343
MYSQL_ROWS * MYSQL_ROW_OFFSET
Definition: mysql.h:158
const char *STDCALL mysql_stmt_error(MYSQL_STMT *stmt)
Definition: libmysql.cc:4452
Definition: mysql.h:176
int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind_arg, unsigned int column, unsigned long offset)
Definition: libmysql.cc:3985
struct character_set MY_CHARSET_INFO
unsigned int mbmaxlen
Definition: mysql.h:289
bool update_max_length
Definition: mysql.h:707
char * db
Definition: mysql.h:225
MYSQL_RES *STDCALL mysql_list_tables(MYSQL *mysql, const char *wild)
Definition: libmysql.cc:668
get_options & argc
Definition: do_ctype.cc:51
unsigned long STDCALL mysql_get_server_version(MYSQL *mysql)
Definition: client.cc:8263
char * user
Definition: mysqladmin.cc:59
MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_tell(MYSQL_STMT *stmt)
Definition: libmysql.cc:4245
MYSQL_RES *STDCALL mysql_stmt_result_metadata(MYSQL_STMT *stmt)
Definition: libmysql.cc:1654
unsigned int param_number
Definition: mysql.h:653
struct Init_commands_array * init_commands
Definition: mysql.h:226
MYSQL_ROW STDCALL mysql_fetch_row(MYSQL_RES *result)
Definition: client.cc:7455
unsigned long flags
Definition: mysql.h:684
mysql_option
Definition: mysql.h:169
void STDCALL mysql_stmt_data_seek(MYSQL_STMT *stmt, uint64_t offset)
Definition: libmysql.cc:4255
Definition: mysql.h:120
MYSQL * handle
Definition: mysql.h:341
static char * query
Definition: myisam_ftdump.cc:44
Definition: mysql.h:206
void STDCALL mysql_reset_server_public_key(void)
Definition: mysql.h:261
Definition: mysql.h:207
const string name("\ame\)
void(* store_param_func)(NET *net, struct MYSQL_BIND *param)
Definition: mysql.h:646
Definition: mysql.h:573
MYSQL_ROWS * data_cursor
Definition: mysql.h:674
char * db
Definition: mysql.h:299
bool STDCALL mysql_eof(MYSQL_RES *res)
Definition: libmysql.cc:846
char * my_cnf_file
Definition: mysql.h:227
unsigned int read_timeout
Definition: mysql.h:222
int STDCALL mysql_set_server_option(MYSQL *mysql, enum enum_mysql_set_option option)
Definition: libmysql.cc:787
NET net
Definition: mysql.h:296
bool error_value
Definition: mysql.h:656
int(* local_infile_read)(void *, char *, unsigned int)
Definition: mysql.h:245
Definition: mysql.h:181
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:577
unsigned int name_length
Definition: mysql.h:130
int(* read_row_func)(struct MYSQL_STMT *stmt, unsigned char **row)
Definition: mysql.h:679
char * host_info
Definition: mysql.h:298
const char *STDCALL mysql_stmt_sqlstate(MYSQL_STMT *stmt)
Definition: libmysql.cc:4443
Definition: mysql.h:178
unsigned long length_value
Definition: mysql.h:652
char * org_table
Definition: mysql.h:124
Definition: mysql.h:171
MYSQL_RES *STDCALL mysql_store_result(MYSQL *mysql)
Definition: client.cc:7265
mysql_enum_shutdown_level
We want levels to be in growing order of hardness (because we use number comparisons).
Definition: mysql_com.h:949
bool STDCALL mysql_thread_init(void)
Definition: libmysql.cc:210
Definition: mysql.h:277
Definition: mysql.h:193
unsigned int port
Definition: mysql.h:308
char * ssl_ca
Definition: mysql.h:230
unsigned char * row_ptr
Definition: mysql.h:645
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:764
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:153
Definition: mysql.h:719
enum enum_mysql_stmt_state state
Definition: mysql.h:694
enum net_async_status STDCALL mysql_next_result_nonblocking(MYSQL *mysql)
Definition: libmysql.cc:4548
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:7505
enum enum_field_types buffer_type
Definition: mysql.h:655
static MYSQL * sock
Definition: mysqlcheck.cc:55
enum mysql_status status
Definition: mysql.h:316
const char * host
Definition: mysqladmin.cc:58
char scramble[SCRAMBLE_LENGTH+1]
Definition: mysql.h:322
int STDCALL mysql_kill(MYSQL *mysql, unsigned long pid)
Definition: libmysql.cc:771
Definition: mysql.h:190
MYSQL *STDCALL mysql_init(MYSQL *mysql)
Definition: client.cc:3147
Definition: mysql.h:272
char sqlstate[SQLSTATE_LENGTH+1]
Definition: mysql.h:696
MYSQL_FIELD * fields
Definition: mysql.h:337
const char * csname
Definition: mysql.h:284
bool compress
Definition: mysql.h:235
bool STDCALL mysql_commit(MYSQL *mysql)
Definition: libmysql.cc:4465
int STDCALL mysql_send_query(MYSQL *mysql, const char *q, unsigned long length)
Definition: client.cc:7133
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:4512
#define STDCALL
Definition: mysql.h:72
char * argv[]
Definition: do_ctype.cc:45
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:8200
Definition: mysql.h:729
int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, unsigned long length)
Definition: libmysql.cc:1436
Definition: mysql.h:177
bool unbuffered_fetch_cancelled
Definition: mysql.h:702
Definition: mysql.h:262
enum enum_resultset_metadata STDCALL mysql_result_metadata(MYSQL_RES *result)
Definition: libmysql.cc:865
unsigned int table_length
Definition: mysql.h:132
void mysql_set_local_infile_default(MYSQL *mysql)
Definition: libmysql.cc:589
char * catalog
Definition: mysql.h:126
Definition: mysql.h:174
enum_resultset_metadata
Definition: mysql_com.h:968
Definition: init_commands_array.h:25
char * charset_dir
Definition: mysql.h:227
Definition: mysql.h:335
char * unix_socket
Definition: mysql.h:298
bool free_me
Definition: mysql.h:318
unsigned int field_count
Definition: mysql.h:311
char * unix_socket
Definition: mysql.h:225
char * name
Definition: mysql.h:121
unsigned long STDCALL mysql_stmt_param_count(MYSQL_STMT *stmt)
Definition: libmysql.cc:2415
MYSQL_RES *STDCALL mysql_list_dbs(MYSQL *mysql, const char *wild)
Definition: libmysql.cc:654
unsigned long length
Definition: mysql.h:128
void * gtid_set_arg
Definition: mysql.h:386
net_async_status
Definition: plugin_auth_common.h:130
Definition: mysql.h:210
struct MYSQL_DATA * data
Definition: mysql.h:338
void * extension
Definition: mysql.h:141
int STDCALL mysql_server_init(int argc, char **argv, char **groups)
Definition: libmysql.cc:125
unsigned int flags
Definition: mysql.h:137
Definition: mysql.h:173
int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt)
Definition: libmysql.cc:4568
struct MYSQL_ROWS MYSQL_ROWS
Definition: mysql.h:269
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:7209
void STDCALL mysql_server_end(void)
Definition: libmysql.cc:192
int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt)
Definition: libmysql.cc:4135
unsigned int server_status
Definition: mysql.h:312
MYSQL_ROW data
Definition: mysql.h:154
unsigned int number
Definition: mysql.h:282
bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt)
Definition: libmysql.cc:4366
const char *STDCALL mysql_error(MYSQL *mysql)
Definition: client.cc:8163
int STDCALL mysql_stmt_fetch(MYSQL_STMT *stmt)
Definition: libmysql.cc:3952
Common definition between mysql server & client.
int STDCALL mysql_reset_connection(MYSQL *mysql)
Definition: libmysql.cc:4611
Definition: mysql.h:255
const char *STDCALL mysql_character_set_name(MYSQL *mysql)
Definition: libmysql.cc:908
unsigned long * lengths
Definition: mysql.h:340
unsigned int STDCALL mysql_warning_count(MYSQL *mysql)
Definition: libmysql.cc:885
unsigned int port
Definition: mysql.h:223
size_t file_name_length
Definition: mysql.h:372
struct st_mysql_options_extention * extension
Definition: mysql.h:249
unsigned int org_name_length
Definition: mysql.h:131
Definition: mysql.h:198
void STDCALL mysql_close(MYSQL *sock)
Definition: client.cc:6938
uint64_t STDCALL mysql_stmt_num_rows(MYSQL_STMT *stmt)
Definition: libmysql.cc:4274
Definition: mysql.h:183
Definition: mysql.h:203
void * buffer
Definition: mysql.h:642
Definition: mysql.h:639
#define SQLSTATE_LENGTH
Definition: mysql_com.h:75
bool STDCALL mysql_read_query_result(MYSQL *mysql)
Definition: libmysql.cc:4607
Definition: mysql.h:152
bool is_null_value
Definition: mysql.h:659
Definition: mysql.h:572
unsigned int def_length
Definition: mysql.h:136
char * host
Definition: mysql.h:298
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:267
Definition: mysql.h:254
unsigned int db_length
Definition: mysql.h:134
bool * is_null
Definition: mysql.h:641
MYSQL_FIELD * fields
Definition: mysql.h:301
int STDCALL mysql_ping(MYSQL *mysql)
Definition: libmysql.cc:821
char last_error[MYSQL_ERRMSG_SIZE]
Definition: mysql.h:695
MYSQL_BIND * bind
Definition: mysql.h:671
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:1064
MYSQL_RES *STDCALL mysql_use_result(MYSQL *mysql)
Definition: libmysql.cc:4603
bool is_unsigned
Definition: mysql.h:657
char * my_cnf_group
Definition: mysql.h:227
Definition: mysql.h:194
Definition: mysql.h:192
int(* local_infile_error)(void *, char *, unsigned int)
Definition: mysql.h:247
Definition: mysql.h:196
char * bind_address
The local address to bind when connecting to remote server.
Definition: mysql.h:239
unsigned long client_flag
Definition: mysql.h:309
MYSQL_ROWS * data_cursor
Definition: mysql.h:339
char * shared_memory_base_name
Definition: mysql.h:233
bool reconnect
Definition: mysql.h:319
const char *STDCALL mysql_get_server_info(MYSQL *mysql)
Definition: libmysql.cc:830
unsigned int pack_length
Definition: mysql.h:654
bool STDCALL mysql_stmt_free_result(MYSQL_STMT *stmt)
Definition: libmysql.cc:4342
MYSQL_FIELD * fields
Definition: mysql.h:672
Definition: mysql.h:276
Definition: mysql.h:175
unsigned int flags
Server ID to use when identifying.
Definition: mysql.h:378
Definition: mysql.h:186
void(* skip_result)(struct MYSQL_BIND *, MYSQL_FIELD *, unsigned char **row)
Definition: mysql.h:648
unsigned int param_count
Definition: mysql.h:692
Definition: mysql.h:571
bool STDCALL mysql_stmt_attr_get(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, void *attr)
Definition: libmysql.cc:2262
unsigned int MYSQL_FIELD_OFFSET
Definition: mysql.h:145
Definition: mysql.h:191
const struct MYSQL_METHODS * methods
Definition: mysql.h:342
unsigned int connect_timeout
Definition: mysql.h:222
uint64_t STDCALL mysql_num_rows(MYSQL_RES *res)
Definition: client.cc:8153
MYSQL_ROW_OFFSET STDCALL mysql_row_tell(MYSQL_RES *res)
Definition: libmysql.cc:857
uint64_t affected_rows
Definition: mysql.h:681
unsigned int field_count
Definition: mysql.h:346
LIST * stmts
Definition: mysql.h:324
Definition: mysql.h:260
uint64_t my_ulonglong
Definition: mysql.h:53
unsigned int STDCALL mysql_field_count(MYSQL *mysql)
Definition: libmysql.cc:871
MYSQL_BIND * params
Definition: mysql.h:670
Definition: mysql.h:221
MYSQL_RES *STDCALL mysql_stmt_param_metadata(MYSQL_STMT *stmt)
Definition: libmysql.cc:1696
#define SCRAMBLE_LENGTH
Length of random string sent by server on handshake; this is also length of obfuscated password...
Definition: mysql_com.h:117
Definition: libmysql.cc:103
bool * unbuffered_fetch_owner
Definition: mysql.h:331
Definition: mysql.h:172
const char * name
Definition: mysql.h:285
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:6762
Definition: mysql.h:180
unsigned int STDCALL mysql_errno(MYSQL *mysql)
Definition: client.cc:8159
char * password
Definition: mysql.h:225
unsigned int last_errno
Definition: mysql.h:691
#define MYSQL_ERRMSG_SIZE
Max length of a error message.
Definition: mysql_com.h:833
struct MYSQL MYSQL
MySQL Client Plugin API.
const char *STDCALL mysql_stat(MYSQL *mysql)
Definition: libmysql.cc:814
enum_stmt_attr_type
Definition: mysql.h:711
unsigned int mysql_port
Definition: client.cc:196
unsigned int protocol_version
Definition: mysql.h:310
uint64_t extra_info
Definition: mysql.h:305
void(* local_infile_end)(void *)
Definition: mysql.h:246
mysql_status
Definition: mysql.h:252
Definition: mysql.h:200
Definition: mysql.h:281
struct MYSQL_DATA MYSQL_DATA
unsigned int state
Definition: mysql.h:283
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:1025
struct CHARSET_INFO * charset
Definition: mysql.h:300
Definition: mysql.h:253
bool STDCALL mysql_stmt_bind_param(MYSQL_STMT *stmt, MYSQL_BIND *bnd)
Definition: libmysql.cc:2629
unsigned long thread_id
Definition: mysql.h:306
char * db
Definition: mysql.h:125
void STDCALL mysql_data_seek(MYSQL_RES *result, uint64_t offset)
Definition: libmysql.cc:619
unsigned int field_count
Definition: mysql.h:693
MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_seek(MYSQL_STMT *stmt, MYSQL_ROW_OFFSET offset)
Definition: libmysql.cc:4232
const char *STDCALL mysql_sqlstate(MYSQL *mysql)
Definition: libmysql.cc:881
char * ssl_cert
Definition: mysql.h:229
void STDCALL mysql_thread_end(void)
Definition: libmysql.cc:212
unsigned long packet_length
Definition: mysql.h:307
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:8227
LIST list
Definition: mysql.h:668
Definition: m_ctype.h:359
unsigned long max_allowed_packet
Definition: mysql.h:234
int STDCALL mysql_query(MYSQL *mysql, const char *q)
Definition: libmysql.cc:601
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:5628
unsigned long max_length
Definition: mysql.h:129
struct MEM_ROOT * field_alloc
Definition: mysql.h:302
uint64_t STDCALL mysql_insert_id(MYSQL *mysql)
Definition: libmysql.cc:879
void * extension
Definition: mysql.h:351
Definition: mysql.h:212
Definition: mysql.h:211
bool send_types_to_server
Definition: mysql.h:698
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:7324
char * host
Definition: mysql.h:225
Definition: mysql.h:724
static const char * key
Definition: suite_stubs.c:14
Definition: sql_common.h:127
unsigned int current_field
Definition: mysql.h:346
struct MEM_ROOT * alloc
Definition: mysql.h:164
Definition: mysql.h:162
bool STDCALL mysql_more_results(MYSQL *mysql)
Definition: libmysql.cc:4500
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:7157
unsigned char * connector_fd
Definition: mysql.h:297
Definition: mysql.h:170
Definition: mysql.h:270
int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option, const void *arg)
Definition: client.cc:7579
bool unbuffered_fetch_cancelled
Definition: mysql.h:349
const char * dir
Definition: mysql.h:287
MYSQL_FIELD_OFFSET STDCALL mysql_field_tell(MYSQL_RES *res)
Definition: libmysql.cc:861
unsigned int STDCALL mysql_stmt_field_count(MYSQL_STMT *stmt)
Definition: libmysql.cc:2433
int(* local_infile_init)(void **, const char *, void *)
Definition: mysql.h:244
uint64_t STDCALL mysql_stmt_affected_rows(MYSQL_STMT *stmt)
Definition: libmysql.cc:2424
struct MYSQL_RPL MYSQL_RPL
Struct for information about a replication stream.
unsigned int decimals
Definition: mysql.h:138
void * local_infile_userdata
Definition: mysql.h:248
char * ssl_key
Definition: mysql.h:228
unsigned int org_table_length
Definition: mysql.h:133
unsigned int warning_count
Definition: mysql.h:314
Definition: mysql.h:184
uint64_t affected_rows
Definition: mysql.h:303
unsigned char bind_result_done
Definition: mysql.h:700
enum_session_state_type
Type of state change information that the server can include in the Ok packet.
Definition: mysql_com.h:996
MYSQL_ROW current_row
Definition: mysql.h:344
unsigned long *STDCALL mysql_fetch_lengths(MYSQL_RES *result)
Definition: client.cc:7570
bool report_data_truncation
Definition: mysql.h:241
void * extension
Definition: mysql.h:660
bool STDCALL mysql_rollback(MYSQL *mysql)
Definition: libmysql.cc:4474
int type
Definition: http_common.h:411
unsigned long client_flag
Definition: mysql.h:224
unsigned int STDCALL mysql_stmt_errno(MYSQL_STMT *stmt)
Definition: libmysql.cc:4438
char * table
Definition: mysql.h:123
unsigned long prefetch_rows
Definition: mysql.h:685
char * ssl_cipher
Definition: mysql.h:232
Definition: mysql.h:209
MYSQL_STMT *STDCALL mysql_stmt_init(MYSQL *mysql)
Definition: libmysql.cc:1365
Definition: mysql.h:197
void STDCALL mysql_get_character_set_info(MYSQL *mysql, MY_CHARSET_INFO *charset)
Definition: libmysql.cc:912
unsigned int STDCALL mysql_num_fields(MYSQL_RES *res)
Definition: client.cc:8155
MYSQL_FIELD *STDCALL mysql_fetch_field_direct(MYSQL_RES *res, unsigned int fieldnr)
Definition: libmysql.cc:848
Definition: mysql.h:205
void(* fix_gtid_set)(struct MYSQL_RPL *rpl, unsigned char *packet_gtid_set)
Callback function which is called.
Definition: mysql.h:385
bool STDCALL mysql_stmt_attr_set(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, const void *attr)
Definition: libmysql.cc:2232
Definition: my_list.h:41
int STDCALL mysql_set_character_set(MYSQL *mysql, const char *csname)
Definition: client.cc:8286
int my_socket
Definition: mysql.h:64
void * thd
Definition: mysql.h:326
bool STDCALL mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *bnd)
Definition: libmysql.cc:3811
int STDCALL mysql_real_query(MYSQL *mysql, const char *q, unsigned long length)
Definition: client.cc:7178
unsigned int server_id
Position in the binary log to.
Definition: mysql.h:376
Definition: mysql.h:271
Definition: mysql.h:189
Time declarations shared between the server and client API: you should not add anything to this heade...
unsigned long length
Definition: mysql.h:155
Definition: mysql.h:188
char ** MYSQL_ROW
Definition: mysql.h:144
unsigned int STDCALL mysql_thread_safe(void)
Definition: libmysql.cc:928
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:7903
const char *STDCALL mysql_get_host_info(MYSQL *mysql)
Definition: libmysql.cc:834
static MYSQL mysql
Definition: mysql.cc:152
struct MEM_ROOT * mem_root
Definition: mysql.h:667
Definition: mysql.h:202
char * user
Definition: mysql.h:225
MYSQL_ROWS * data
Definition: mysql.h:163
mysql_ssl_fips_mode
Definition: mysql.h:275
bool long_data_used
Definition: mysql.h:658
uint64_t STDCALL mysql_affected_rows(MYSQL *mysql)
Definition: libmysql.cc:875
unsigned int charsetnr
Definition: mysql.h:139
Definition: mysql.h:570
Definition: mysql.h:264
int STDCALL mysql_binlog_open(MYSQL *mysql, MYSQL_RPL *rpl)
Open a new replication stream.
Definition: client.cc:6595
unsigned long STDCALL mysql_thread_id(MYSQL *mysql)
Definition: libmysql.cc:898
char * passwd
Definition: mysql.h:298
int STDCALL mysql_shutdown(MYSQL *mysql, enum mysql_enum_shutdown_level shutdown_level)
Definition: libmysql.cc:755
Error messages for MySQL clients.
unsigned int catalog_length
Definition: mysql.h:135
Definition: mysql.h:263
char * user
Definition: mysql.h:298
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:2781
struct MEM_ROOT * field_alloc
Definition: mysql.h:345
enum enum_field_types type
Definition: mysql.h:140
struct MYSQL_STMT_EXT * extension
Definition: mysql.h:708
char * org_name
Definition: mysql.h:122
uint64_t rows
Definition: mysql.h:165
const char *STDCALL mysql_info(MYSQL *mysql)
Definition: libmysql.cc:887
Definition: mysql.h:295
struct st_mysql_options options
Definition: mysql.h:315
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:609
void * extension
Definition: mysql.h:332
const char * file_name
Length of the &#39;file_name&#39; or 0.
Definition: mysql.h:373
MYSQL_RES *STDCALL mysql_list_processes(MYSQL *mysql)
Definition: libmysql.cc:738
char * def
Definition: mysql.h:127
int STDCALL mysql_select_db(MYSQL *mysql, const char *db)
Definition: client.cc:6777
uint64_t row_count
Definition: mysql.h:336
unsigned int server_language
Definition: mysql.h:313
enum enum_resultset_metadata metadata
Definition: mysql.h:350
unsigned long buffer_length
Definition: mysql.h:650
bool bind_param_done
Definition: mysql.h:699
Definition: mysql.h:278
struct MYSQL_BIND MYSQL_BIND
uint64_t start_position
Filename of the binary log to read.
Definition: mysql.h:374
unsigned long STDCALL mysql_hex_string(char *to, const char *from, unsigned long from_length)
Definition: libmysql.cc:975
Definition: mysql.h:187
MYSQL * mysql
Definition: mysql.h:669
bool eof
Definition: mysql.h:347
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:5689
MYSQL_ROW_OFFSET STDCALL mysql_row_seek(MYSQL_RES *result, MYSQL_ROW_OFFSET offset)
Definition: libmysql.cc:635
int STDCALL mysql_options4(MYSQL *mysql, enum mysql_option option, const void *arg1, const void *arg2)
Definition: client.cc:8083
struct MYSQL_RES MYSQL_RES
Definition: mysql.h:185
Definition: mysql.h:666
MYSQL_FIELD_OFFSET STDCALL mysql_field_seek(MYSQL_RES *result, MYSQL_FIELD_OFFSET offset)
Definition: libmysql.cc:643
uint64_t STDCALL mysql_stmt_insert_id(MYSQL_STMT *stmt)
Definition: libmysql.cc:2453
void STDCALL myodbc_remove_escape(MYSQL *mysql, char *name)
Definition: libmysql.cc:1073
int STDCALL mysql_dump_debug_info(MYSQL *mysql)
Definition: libmysql.cc:795
void STDCALL mysql_free_result(MYSQL_RES *result)
Definition: client.cc:1859
bool STDCALL mysql_autocommit(MYSQL *mysql, bool auto_mode)
Definition: libmysql.cc:4483
int STDCALL mysql_binlog_fetch(MYSQL *mysql, MYSQL_RPL *rpl)
Fetch one event from the server.
Definition: client.cc:6722
size_t gtid_set_encoded_size
Flags, e.g.
Definition: mysql.h:381
char * info
Definition: mysql.h:299
char * ssl_capath
Definition: mysql.h:231
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:683
struct MYSQL_STMT MYSQL_STMT
Definition: mysql.h:256
Definition: mysql_com.h:858
char * server_version
Definition: mysql.h:298
bool STDCALL mysql_stmt_reset(MYSQL_STMT *stmt)
Definition: libmysql.cc:4421
Definition: mysql.h:195
uint64_t insert_id
Definition: mysql.h:304
enum enum_resultset_metadata resultset_metadata
Definition: mysql.h:317
Definition: mysql.h:199
void STDCALL mysql_debug(const char *debug)
Definition: libmysql.cc:237
const struct MYSQL_METHODS * methods
Definition: mysql.h:325
enum_mysql_set_option
options for mysql_options()
Definition: mysql_com.h:983
unsigned long server_capabilities
Definition: mysql.h:309
const char *STDCALL mysql_get_ssl_cipher(MYSQL *mysql)
Definition: client.cc:3325
int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt)
Definition: libmysql.cc:2388
unsigned int server_status
Definition: mysql.h:690
enum_mysql_stmt_state
Definition: mysql.h:569
Definition: sql_common.h:149
const unsigned char * buffer
Size of the packet returned by.
Definition: mysql.h:391
char * mysql_unix_port
Definition: client.cc:197
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_DATA result
Definition: mysql.h:673
Log error(cerr, "ERROR")