diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/m_string.h | 1 | ||||
-rw-r--r-- | include/my_getopt.h | 4 | ||||
-rw-r--r-- | include/mysql_com.h | 34 | ||||
-rw-r--r-- | include/mysql_embed.h | 1 | ||||
-rw-r--r-- | include/mysql_h.ic | 10 | ||||
-rw-r--r-- | include/queues.h | 6 |
6 files changed, 30 insertions, 26 deletions
diff --git a/include/m_string.h b/include/m_string.h index 00fb4cb0656..9d2a30917bd 100644 --- a/include/m_string.h +++ b/include/m_string.h @@ -200,6 +200,7 @@ double my_strtod(const char *str, char **end, int *error); double my_atof(const char *nptr); extern char *llstr(longlong value,char *buff); +extern char *ullstr(longlong value,char *buff); #ifndef HAVE_STRTOUL extern long strtol(const char *str, char **ptr, int base); extern ulong strtoul(const char *str, char **ptr, int base); diff --git a/include/my_getopt.h b/include/my_getopt.h index 30c2eb9531a..14f8e6df95b 100644 --- a/include/my_getopt.h +++ b/include/my_getopt.h @@ -74,7 +74,9 @@ extern void my_print_variables(const struct my_option *options); extern void my_getopt_register_get_addr(uchar ** (*func_addr)(const char *, uint, const struct my_option *)); -ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp); +ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp, + bool *fix); +longlong getopt_ll_limit_value(longlong, const struct my_option *,bool *fix); my_bool getopt_compare_strings(const char *s, const char *t, uint length); C_MODE_END diff --git a/include/mysql_com.h b/include/mysql_com.h index 4ae7f66060f..7eefad44716 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -203,14 +203,10 @@ typedef struct st_net { 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 unused0; /* Please remove with the next incompatible ABI change. */ my_bool unused; /* Please remove with the next incompatible ABI change */ my_bool compress; - /* - Set if OK packet is already sent, and we do not need to send error - messages - */ - my_bool no_send_error; + my_bool unused1; /* Please remove with the next incompatible ABI change. */ /* Pointer to query object in query cache, do not equal NULL (0) for queries in cache that have not stored its results yet @@ -221,11 +217,14 @@ typedef struct st_net { 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) */ + unsigned int client_last_errno; + unsigned char error; + my_bool unused2; /* Please remove with the next incompatible ABI change. */ my_bool return_errno; - char last_error[MYSQL_ERRMSG_SIZE], sqlstate[SQLSTATE_LENGTH+1]; + /** Client library error message buffer. Actually belongs to struct MYSQL. */ + char client_last_error[MYSQL_ERRMSG_SIZE]; + /** Client library sqlstate buffer. Set along with the error message. */ + char sqlstate[SQLSTATE_LENGTH+1]; void *extension; } NET; @@ -397,14 +396,17 @@ typedef struct st_udf_args typedef struct st_udf_init { - my_bool maybe_null; /* 1 if function can return NULL */ - unsigned int decimals; /* for real functions */ - unsigned long max_length; /* For string functions */ - char *ptr; /* free pointer for function data */ - /* 0 if result is independent of arguments */ - my_bool const_item; + my_bool maybe_null; /* 1 if function can return NULL */ + unsigned int decimals; /* for real functions */ + unsigned long max_length; /* For string functions */ + char *ptr; /* free pointer for function data */ + my_bool const_item; /* 1 if function always returns the same value */ void *extension; } UDF_INIT; +/* + TODO: add a notion for determinism of the UDF. + See Item_udf_func::update_used_tables () +*/ /* Constants when using compression */ #define NET_HEADER_SIZE 4 /* standard header size */ diff --git a/include/mysql_embed.h b/include/mysql_embed.h index 7416283d83d..4a7fd3ef63c 100644 --- a/include/mysql_embed.h +++ b/include/mysql_embed.h @@ -21,7 +21,6 @@ /* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */ #undef HAVE_PSTACK /* No stacktrace */ -#undef HAVE_DLOPEN /* No udf functions */ #undef HAVE_OPENSSL #undef HAVE_SMEM /* No shared memory */ #undef HAVE_NDBCLUSTER_DB /* No NDB cluster */ diff --git a/include/mysql_h.ic b/include/mysql_h.ic index 4bedb9e8050..4f138d9a229 100644 --- a/include/mysql_h.ic +++ b/include/mysql_h.ic @@ -537,16 +537,16 @@ struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned unsigned int * return_status; unsigned char reading_or_writing; char save_char; - my_bool no_send_ok; + my_bool unused0; my_bool unused; my_bool compress; - my_bool no_send_error; + my_bool unused1; unsigned char * query_cache_query; - unsigned int last_errno; + unsigned int client_last_errno; unsigned char error; - my_bool report_error; + my_bool unused2; my_bool return_errno; - char last_error[512]; + char client_last_error[512]; char sqlstate[(5 + 1)]; void * extension; }; diff --git a/include/queues.h b/include/queues.h index 4fd0f72484e..d01b73ba999 100644 --- a/include/queues.h +++ b/include/queues.h @@ -31,8 +31,8 @@ typedef struct st_queue { void *first_cmp_arg; uint elements; uint max_elements; - uint offset_to_key; /* compare is done on element+offset */ - int max_at_top; /* Set if queue_top gives max */ + uint offset_to_key; /* compare is done on element+offset */ + int max_at_top; /* Normally 1, set to -1 if queue_top gives max */ int (*compare)(void *, uchar *,uchar *); uint auto_extent; } QUEUE; @@ -43,7 +43,7 @@ typedef struct st_queue { #define queue_replaced(queue) _downheap(queue,1) #define queue_set_cmp_arg(queue, set_arg) (queue)->first_cmp_arg= set_arg #define queue_set_max_at_top(queue, set_arg) \ - (queue)->max_at_top= set_arg ? (-1 ^ 1) : 0 + (queue)->max_at_top= set_arg ? -1 : 1 typedef int (*queue_compare)(void *,uchar *, uchar *); int init_queue(QUEUE *queue,uint max_elements,uint offset_to_key, |