summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorunknown <serg@janus.mylan>2007-12-20 22:11:37 +0100
committerunknown <serg@janus.mylan>2007-12-20 22:11:37 +0100
commit295732b580716b6b5a48a4a2ceb112b432c96551 (patch)
tree8e1c37da4cf89e91d901badb1c2e5f100be39ec1 /include
parent3ab83a2e5efdb64b068243d11b6230ae5b11df29 (diff)
parent9bf488563d948ddc86ccef87ddaebc7d15afe1a4 (diff)
downloadmariadb-git-295732b580716b6b5a48a4a2ceb112b432c96551.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into janus.mylan:/usr/home/serg/Abk/mysql-5.1 configure.in: Auto merged libmysql/CMakeLists.txt: Auto merged libmysqld/lib_sql.cc: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/information_schema.result: Auto merged mysql-test/t/information_schema.test: Auto merged sql/Makefile.am: Auto merged sql/field.cc: Auto merged sql/handler.cc: Auto merged sql/item.cc: Auto merged sql/item_func.cc: Auto merged sql/item_geofunc.cc: Auto merged sql/item_subselect.cc: Auto merged sql/key.cc: Auto merged sql/lock.cc: Auto merged sql/log.cc: Auto merged sql/log_event.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/net_serv.cc: Auto merged sql/opt_sum.cc: Auto merged sql/protocol.h: Auto merged sql/repl_failsafe.cc: Auto merged sql/set_var.cc: Auto merged sql/set_var.h: Auto merged sql/sp_head.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_cache.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_delete.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_select.h: Auto merged sql/sql_show.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_update.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/table.h: Auto merged storage/archive/ha_archive.cc: Auto merged storage/innobase/buf/buf0buf.c: Auto merged storage/innobase/buf/buf0flu.c: Auto merged storage/innobase/buf/buf0lru.c: Auto merged storage/innobase/include/buf0buf.h: Auto merged storage/innobase/include/buf0buf.ic: Auto merged storage/innobase/include/sync0arr.h: Auto merged storage/innobase/include/sync0rw.h: Auto merged storage/innobase/include/sync0rw.ic: Auto merged storage/innobase/include/sync0sync.h: Auto merged storage/innobase/os/os0sync.c: Auto merged storage/innobase/sync/sync0arr.c: Auto merged storage/innobase/sync/sync0rw.c: Auto merged storage/innobase/sync/sync0sync.c: Auto merged storage/myisam/ha_myisam.cc: Auto merged storage/myisam/mi_open.c: Auto merged storage/myisammrg/ha_myisammrg.cc: Auto merged sql/ha_ndbcluster.cc: merged sql/item_cmpfunc.cc: merged sql/protocol.cc: merged sql/slave.cc: merged sql/sql_class.h: merged sql/sql_parse.cc: merged
Diffstat (limited to 'include')
-rw-r--r--include/m_string.h1
-rw-r--r--include/my_getopt.h4
-rw-r--r--include/my_global.h55
-rw-r--r--include/myisammrg.h1
-rw-r--r--include/mysql_com.h34
-rw-r--r--include/mysql_embed.h1
-rw-r--r--include/mysql_h.ic10
-rw-r--r--include/queues.h6
8 files changed, 56 insertions, 56 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/my_global.h b/include/my_global.h
index ce76aeaec20..4b0786aa826 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -116,36 +116,31 @@
The macros below are used to allow build of Universal/fat binaries of
MySQL and MySQL applications under darwin.
*/
-#ifdef TARGET_FAT_BINARY
-# undef SIZEOF_CHARP
-# undef SIZEOF_INT
-# undef SIZEOF_LONG
-# undef SIZEOF_LONG_LONG
-# undef SIZEOF_OFF_T
-# undef SIZEOF_SHORT
-
-#if defined(__i386__)
-# undef WORDS_BIGENDIAN
-# define SIZEOF_CHARP 4
-# define SIZEOF_INT 4
-# define SIZEOF_LONG 4
-# define SIZEOF_LONG_LONG 8
-# define SIZEOF_OFF_T 8
-# define SIZEOF_SHORT 2
-
-#elif defined(__ppc__)
-# define WORDS_BIGENDIAN
-# define SIZEOF_CHARP 4
-# define SIZEOF_INT 4
-# define SIZEOF_LONG 4
-# define SIZEOF_LONG_LONG 8
-# define SIZEOF_OFF_T 8
-# define SIZEOF_SHORT 2
-
-#else
-# error Building FAT binary for an unknown architecture.
-#endif
-#endif /* TARGET_FAT_BINARY */
+#if defined(__APPLE__) && defined(__MACH__)
+# undef SIZEOF_CHARP
+# undef SIZEOF_SHORT
+# undef SIZEOF_INT
+# undef SIZEOF_LONG
+# undef SIZEOF_LONG_LONG
+# undef SIZEOF_OFF_T
+# undef WORDS_BIGENDIAN
+# define SIZEOF_SHORT 2
+# define SIZEOF_INT 4
+# define SIZEOF_LONG_LONG 8
+# define SIZEOF_OFF_T 8
+# if defined(__i386__) || defined(__ppc__)
+# define SIZEOF_CHARP 4
+# define SIZEOF_LONG 4
+# elif defined(__x86_64__) || defined(__ppc64__)
+# define SIZEOF_CHARP 8
+# define SIZEOF_LONG 8
+# else
+# error Building FAT binary for an unknown architecture.
+# endif
+# if defined(__ppc__) || defined(__ppc64__)
+# define WORDS_BIGENDIAN
+# endif
+#endif /* defined(__APPLE__) && defined(__MACH__) */
/*
diff --git a/include/myisammrg.h b/include/myisammrg.h
index 0cf3aa222b3..cc6e6aac6cd 100644
--- a/include/myisammrg.h
+++ b/include/myisammrg.h
@@ -74,6 +74,7 @@ typedef struct st_myrg_info
LIST open_list;
QUEUE by_key;
ulong *rec_per_key_part; /* for sql optimizing */
+ pthread_mutex_t mutex;
} MYRG_INFO;
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,