summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/mysql.h38
-rw-r--r--include/mysql_com.h14
-rw-r--r--include/violite.h2
3 files changed, 46 insertions, 8 deletions
diff --git a/include/mysql.h b/include/mysql.h
index 1d4b923f4f2..e43be1561ef 100644
--- a/include/mysql.h
+++ b/include/mysql.h
@@ -114,6 +114,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 {
@@ -143,6 +146,9 @@ struct st_mysql_options {
a read that is replication-aware
*/
my_bool no_master_reads;
+#ifdef EMBEDDED_LIBRARY
+ my_bool separate_thread;
+#endif
char *shared_memory_base_name;
unsigned int protocol;
};
@@ -152,6 +158,9 @@ 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_PROTOCOL, MYSQL_SHARED_MEMORY_BASE_NAME
+#ifdef EMBEDDED_LIBRARY
+ , MYSQL_OPT_USE_RESULT
+#endif
};
enum mysql_status
@@ -175,12 +184,14 @@ enum mysql_rpl_type
};
+#ifndef EMBEDDED_LIBRARY
+
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;
+ char *host,*user,*passwd,*unix_socket,*server_version,*host_info,*info;
+ char *db;
struct charset_info_st *charset;
MYSQL_FIELD *fields;
MEM_ROOT field_alloc;
@@ -219,6 +230,29 @@ typedef struct st_mysql
LIST *stmts; /* list of all statements */
} MYSQL;
+#else
+
+struct st_mysql_res;
+
+typedef struct st_mysql
+{
+ struct st_mysql_res *result;
+ void *thd;
+ struct charset_info_st *charset;
+ unsigned int server_language;
+ MYSQL_FIELD *fields;
+ MEM_ROOT field_alloc;
+ my_ulonglong affected_rows;
+ unsigned int field_count;
+ struct st_mysql_options options;
+ enum mysql_status status;
+ my_bool free_me; /* If free in mysql_close */
+ my_ulonglong insert_id; /* id if insert on table with NEXTNR */
+ unsigned int last_errno;
+ char *last_error;
+} MYSQL;
+
+#endif
typedef struct st_mysql_res {
my_ulonglong row_count;
diff --git a/include/mysql_com.h b/include/mysql_com.h
index d5cd722a05a..f97ca8bd252 100644
--- a/include/mysql_com.h
+++ b/include/mysql_com.h
@@ -121,16 +121,15 @@ typedef struct st_vio Vio;
#define MAX_BLOB_WIDTH 8192 /* Default width for blob */
typedef struct st_net {
+#ifndef EMBEDDED_LIBRARY
Vio* vio;
unsigned char *buff,*buff_end,*write_pos,*read_pos;
my_socket fd; /* For Perl DBI/dbd */
unsigned long max_packet,max_packet_size;
- unsigned int last_errno,pkt_nr,compress_pkt_nr;
+ unsigned int pkt_nr,compress_pkt_nr;
unsigned int write_timeout, read_timeout, retry_count;
int fcntl;
- char last_error[MYSQL_ERRMSG_SIZE];
- unsigned char error;
- my_bool return_errno,compress;
+ my_bool compress;
/*
The following variable is set if we are doing several queries in one
command ( as in LOAD TABLE ... FROM MASTER ),
@@ -140,13 +139,18 @@ typedef struct st_net {
unsigned int *return_status;
unsigned char reading_or_writing;
char save_char;
- my_bool report_error; /* We should report error (we have unreported error) */
my_bool no_send_ok;
/*
Pointer to query object in query cache, do not equal NULL (0) for
queries in cache that have not stored its results yet
*/
+#endif
+ char last_error[MYSQL_ERRMSG_SIZE];
+ unsigned int last_errno;
+ unsigned char error;
gptr query_cache_query;
+ my_bool report_error; /* We should report error (we have unreported error) */
+ my_bool return_errno;
} NET;
#define packet_error (~(unsigned long) 0)
diff --git a/include/violite.h b/include/violite.h
index b8bfb2183a2..18fa90fbd40 100644
--- a/include/violite.h
+++ b/include/violite.h
@@ -32,7 +32,7 @@ extern "C" {
#endif /* __cplusplus */
enum enum_vio_type { VIO_CLOSED, VIO_TYPE_TCPIP, VIO_TYPE_SOCKET,
- VIO_TYPE_NAMEDPIPE, VIO_TYPE_SSL,VIO_TYPE_SHARED_MEMORY};
+ VIO_TYPE_NAMEDPIPE, VIO_TYPE_SSL };
#ifndef __WIN__
#define HANDLE void *