1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-24 19:42:23 +03:00

Removing net emulation out of embedded library

This commit is contained in:
hf@bison.(none)
2002-06-17 16:24:51 +05:00
parent 4375d827db
commit ede6ba5621
16 changed files with 623 additions and 304 deletions

View File

@ -123,6 +123,9 @@ typedef struct st_mysql_data {
unsigned int fields;
MYSQL_ROWS *data;
MEM_ROOT alloc;
#ifdef EMBEDDED_LIBRARY
MYSQL_ROWS **prev_ptr;
#endif
} MYSQL_DATA;
struct st_mysql_options {
@ -152,13 +155,20 @@ struct st_mysql_options {
a read that is replication-aware
*/
my_bool no_master_reads;
#ifdef EMBEDDED_LIBRARY
my_bool separate_thread;
#endif
};
enum mysql_option { MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_COMPRESS,
MYSQL_OPT_NAMED_PIPE, MYSQL_INIT_COMMAND,
MYSQL_READ_DEFAULT_FILE, MYSQL_READ_DEFAULT_GROUP,
MYSQL_SET_CHARSET_DIR, MYSQL_SET_CHARSET_NAME,
MYSQL_OPT_LOCAL_INFILE};
MYSQL_OPT_LOCAL_INFILE,
#ifdef EMBEDDED_LIBRARY
MYSQL_OPT_USE_RESULT
#endif
};
enum mysql_status { MYSQL_STATUS_READY,MYSQL_STATUS_GET_RESULT,
MYSQL_STATUS_USE_RESULT};
@ -171,12 +181,18 @@ enum mysql_status { MYSQL_STATUS_READY,MYSQL_STATUS_GET_RESULT,
enum mysql_rpl_type { MYSQL_RPL_MASTER, MYSQL_RPL_SLAVE,
MYSQL_RPL_ADMIN };
struct st_mysql_res;
typedef struct st_mysql {
NET net; /* Communication parameters */
gptr connector_fd; /* ConnectorFd for SSL */
char *host,*user,*passwd,*unix_socket,*server_version,*host_info,
*info,*db;
#ifndef _0EMBEDDED_LIBRARY
char *host,*user,*passwd,*unix_socket,*server_version,*host_info,*info;
#endif
#ifdef EMBEDDED_LIBRARY
struct st_mysql_res *result;
#endif
char *db;
struct charset_info_st *charset;
MYSQL_FIELD *fields;
MEM_ROOT field_alloc;
@ -212,6 +228,9 @@ typedef struct st_mysql {
typedef struct st_mysql_res {
#ifdef EMBEDDED_LIBRARY
const char *query_str;
#endif
my_ulonglong row_count;
MYSQL_FIELD *fields;
MYSQL_DATA *data;