diff options
author | monty@mysql.com/nosik.monty.fi <> | 2007-07-30 06:22:25 +0300 |
---|---|---|
committer | monty@mysql.com/nosik.monty.fi <> | 2007-07-30 06:22:25 +0300 |
commit | a33c863ffd1e0de7bf72a590a90ee5c50180a677 (patch) | |
tree | d59655d294b62c70e27c7cc696625eebce0f52b3 /include/mysql_com.h | |
parent | dd81895e4544a9b33beb73370781b35c0bf934de (diff) | |
download | mariadb-git-a33c863ffd1e0de7bf72a590a90ee5c50180a677.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.
Diffstat (limited to 'include/mysql_com.h')
-rw-r--r-- | include/mysql_com.h | 27 |
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 */ |