summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorunknown <hf@deer.mysql.r18.ru>2002-12-16 17:33:29 +0400
committerunknown <hf@deer.mysql.r18.ru>2002-12-16 17:33:29 +0400
commit632717fd8d70ff187621df8a0839678ceae19ab5 (patch)
treeac62ff3cde5a13932e6d512787093827232af630 /include
parente9525947d4eaf19e2edb17d8c688fe6ffba02502 (diff)
downloadmariadb-git-632717fd8d70ff187621df8a0839678ceae19ab5.tar.gz
Big purge about embedded library (scrum)
client/mysql.cc: #ifdef EMBEDDED_LIBRARY added client/mysqltest.c: #ifdef EMBEDDED_LIBRARY added include/mysql.h: MYSQL structure changed for embedded case include/mysql_com.h: NET structure changed for embedded case include/violite.h: no need to special vio types libmysqld/embedded_priv.h: superfluous functions removed libmysqld/lib_sql.cc: several modifications libmysqld/lib_vio.c: file should be removed libmysqld/libmysqld.c: several modifications sql/ha_berkeley.cc: modification for embedded case sql/ha_innodb.cc: modifications for embedded case sql/ha_myisam.cc: modifications for embedded case sql/item_func.cc: modifications for embedded case sql/log.cc: #ifdef-ed parts of file which don't work in embedded case sql/log_event.cc: #ifdef-ed parts of file which don't work in embedded case sql/log_event.h: #ifdef-ed parts of file which don't work in embedded case sql/mf_iocache.cc: file doesn't work in embedded case sql/mini_client.cc: file should be removed from embedded library sql/mysqld.cc: several modifications sql/net_pkg.cc: #ifdef-ed functions which can't work in embedded case sql/net_serv.cc: file doesn't work in embedded case sql/repl_failsafe.cc: no replication in embedded case sql/repl_failsafe.h: no replication in embedded case sql/set_var.cc: #ifdef-ed variables which have no sense in embedded library sql/set_var.h: #ifdef-ed variables which have no sense in embedded library sql/slave.cc: no replication in embedded library sql/slave.h: no replication in embedded library sql/sql_acl.cc: modifications for embedded case sql/sql_cache.cc: modifications for embedded case sql/sql_class.cc: modifications for embedded case sql/sql_class.h: THD structure modified for embedded case sql/sql_db.cc: modification for embedded case sql/sql_error.cc: modification for embedded case sql/sql_help.cc: modification for embedded case sql/sql_load.cc: #ifdef-ed code which doesn't work in embedded case sql/sql_parse.cc: #ifdef-ed code which doesn't work in embedded case sql/sql_prepare.cc: #ifdef-ed code which doesn't work in embedded case sql/sql_repl.cc: no replication in embedded library sql/sql_repl.h: no replication in embedded library sql/sql_select.cc: query cache don't work now in embedded library sql/sql_show.cc: modifications for embedded case
Diffstat (limited to 'include')
-rw-r--r--include/mysql.h34
-rw-r--r--include/mysql_com.h14
-rw-r--r--include/violite.h6
3 files changed, 35 insertions, 19 deletions
diff --git a/include/mysql.h b/include/mysql.h
index 16cb90105c9..e43be1561ef 100644
--- a/include/mysql.h
+++ b/include/mysql.h
@@ -183,18 +183,14 @@ enum mysql_rpl_type
MYSQL_RPL_MASTER, MYSQL_RPL_SLAVE, MYSQL_RPL_ADMIN
};
-struct st_mysql_res;
+
+#ifndef EMBEDDED_LIBRARY
typedef struct st_mysql
{
NET net; /* Communication parameters */
gptr connector_fd; /* ConnectorFd for SSL */
-#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;
@@ -234,11 +230,31 @@ 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;
-typedef struct st_mysql_res {
-#ifdef EMBEDDED_LIBRARY
- const char *query_str;
#endif
+
+typedef struct st_mysql_res {
my_ulonglong row_count;
MYSQL_FIELD *fields;
MYSQL_DATA *data;
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 573297c2dcc..18fa90fbd40 100644
--- a/include/violite.h
+++ b/include/violite.h
@@ -32,11 +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
-#ifdef EMBEDDED_LIBRARY
- , VIO_TYPE_BUFFER
-#endif
-};
+ VIO_TYPE_NAMEDPIPE, VIO_TYPE_SSL };
#ifndef __WIN__
#define HANDLE void *