1 /*
2  * Copyright (c) 2015, 2021, Oracle and/or its affiliates.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License, version 2.0,
6  * as published by the Free Software Foundation.
7  *
8  * This program is also distributed with certain software (including
9  * but not limited to OpenSSL) that is licensed under separate terms,
10  * as designated in a particular file or component or in included license
11  * documentation.  The authors of MySQL hereby grant you an additional
12  * permission to link the program and your derivative works with the
13  * separately licensed software that they have included with MySQL.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License, version 2.0, for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
23  * 02110-1301  USA
24  */
25 
26 #include "mysqlx/mysql.h"
27 #include "mysqld_error.h"
28 #include "ngs_common/protocol_protobuf.h"
29 
30 class Mysqlx_test_connector;
31 
32 struct st_mysql_priv
33 {
34   Mysqlx_test_connector *impl;
35 };
36 
37 typedef st_mysql_priv MYSQL;
38 
39 
40 typedef struct st_mysql
41 {
42   struct st_mysql_priv *impl;
43   int last_error_no;
44   char *last_error;
45 
46   my_bool free_me;		/* If free in mysql_close */
47 #if 0
48   NET		net;			/* Communication parameters */
49   unsigned char	*connector_fd;		/* ConnectorFd for SSL */
50   char		*host,*user,*passwd,*unix_socket,*server_version,*host_info;
51   char          *info, *db;
52   struct charset_info_st *charset;
53   MYSQL_FIELD	*fields;
54   MEM_ROOT	field_alloc;
55   my_ulonglong affected_rows;
56   my_ulonglong insert_id;		/* id if insert on table with NEXTNR */
57   my_ulonglong extra_info;		/* Not used */
58   unsigned long thread_id;		/* Id for connection in server */
59   unsigned long packet_length;
60   unsigned int	port;
61   unsigned long client_flag,server_capabilities;
62   unsigned int	protocol_version;
63   unsigned int	field_count;
64   unsigned int 	server_status;
65   unsigned int  server_language;
66   unsigned int	warning_count;
67   struct st_mysql_options options;
68   enum mysql_status status;
69 
70   my_bool	reconnect;		/* set to 1 if automatic reconnect */
71 
72 
73   LIST  *stmts;                     /* list of all statements */
74   const struct st_mysql_methods *methods;
75   void *thd;
76   /*
77    Points to boolean flag in MYSQL_RES  or MYSQL_STMT. We set this flag
78    from mysql_stmt_close if close had to cancel result set of this object.
79    */
80   my_bool *unbuffered_fetch_owner;
81   /* needed for embedded server - no net buffer to store the 'info' */
82   char *info_buffer;
83   void *extension;
84 #endif
85 } MYSQL;
86 
87 
88 
89 
90