summaryrefslogtreecommitdiff
path: root/include/mysql_com.h
diff options
context:
space:
mode:
authorunknown <monty@mysql.com/nosik.monty.fi>2007-07-30 06:22:25 +0300
committerunknown <monty@mysql.com/nosik.monty.fi>2007-07-30 06:22:25 +0300
commitae8d075508dd1e942ee15ef4194c525f31e36098 (patch)
treed59655d294b62c70e27c7cc696625eebce0f52b3 /include/mysql_com.h
parent08dd5dcf168bbc1e1bf6e8bab784fdde58068daa (diff)
downloadmariadb-git-ae8d075508dd1e942ee15ef4194c525f31e36098.tar.gz
Add 'extension' field to all client library structures to make them extensible
Reorder structure elements to make structures smaller and faster on 64 bit systems This is a first step in cleaning up the client include files (but should be enough to allow us to do future fixes without breaking the library) This change is part of WL#2872, Make client library extensible. configure.in: Increased shared library version of client library Detect gethrtime (for future) include/mysql.h: Add 'extension' field to all structures to make them extensible Reorder structure elements to make structures smaller and faster on 64 bit systems Removed an old define that is not needed for MySQL 5.1 include/mysql_com.h: Add 'extension' field to all structures to make them extensible Reorder structure elements to make structures smaller and faster on 64 bit systems
Diffstat (limited to 'include/mysql_com.h')
-rw-r--r--include/mysql_com.h27
1 files changed, 15 insertions, 12 deletions
diff --git a/include/mysql_com.h b/include/mysql_com.h
index ae57e84a696..5850d48fbf5 100644
--- a/include/mysql_com.h
+++ b/include/mysql_com.h
@@ -186,25 +186,25 @@ typedef struct st_vio Vio;
typedef struct st_net {
#if !defined(CHECK_EMBEDDED_DIFFERENCES) || !defined(EMBEDDED_LIBRARY)
- Vio* vio;
+ 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 pkt_nr,compress_pkt_nr;
- unsigned int write_timeout, read_timeout, retry_count;
- int fcntl;
- my_bool compress;
/*
The following variable is set if we are doing several queries in one
command ( as in LOAD TABLE ... FROM MASTER ),
and do not want to confuse the client with OK at the wrong time
*/
unsigned long remain_in_buf,length, buf_length, where_b;
+ unsigned long max_packet,max_packet_size;
+ unsigned int pkt_nr,compress_pkt_nr;
+ unsigned int write_timeout, read_timeout, retry_count;
+ int fcntl;
unsigned int *return_status;
unsigned char reading_or_writing;
char save_char;
my_bool no_send_ok; /* For SPs and other things that do multiple stmts */
my_bool no_send_eof; /* For SPs' first version read-only cursors */
+ my_bool compress;
/*
Set if OK packet is already sent, and we do not need to send error
messages
@@ -215,20 +215,20 @@ typedef struct st_net {
queries in cache that have not stored its results yet
*/
#endif
- char last_error[MYSQL_ERRMSG_SIZE], sqlstate[SQLSTATE_LENGTH+1];
- unsigned int last_errno;
- unsigned char error;
-
/*
'query_cache_query' should be accessed only via query cache
functions and methods to maintain proper locking.
*/
unsigned char *query_cache_query;
-
+ unsigned int last_errno;
+ unsigned char error;
my_bool report_error; /* We should report error (we have unreported error) */
my_bool return_errno;
+ char last_error[MYSQL_ERRMSG_SIZE], sqlstate[SQLSTATE_LENGTH+1];
+ void *extension;
} NET;
+
#define packet_error (~(unsigned long) 0)
enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY,
@@ -389,6 +389,7 @@ typedef struct st_udf_args
char *maybe_null; /* Set to 1 for all maybe_null args */
char **attributes; /* Pointer to attribute name */
unsigned long *attribute_lengths; /* Length of attribute arguments */
+ void *extension;
} UDF_ARGS;
/* This holds information about the result */
@@ -399,7 +400,9 @@ typedef struct st_udf_init
unsigned int decimals; /* for real functions */
unsigned long max_length; /* For string functions */
char *ptr; /* free pointer for function data */
- my_bool const_item; /* 0 if result is independent of arguments */
+ /* 0 if result is independent of arguments */
+ my_bool const_item;
+ void *extension;
} UDF_INIT;
/* Constants when using compression */