diff options
author | unknown <hf@deer.mysql.r18.ru> | 2003-01-20 18:59:45 +0400 |
---|---|---|
committer | unknown <hf@deer.mysql.r18.ru> | 2003-01-20 18:59:45 +0400 |
commit | 5217653283a342cbbf0c0fb61d633d58372a97ee (patch) | |
tree | 26bff9a8e2da794ce9796009e2fbd0d050252445 /include | |
parent | f9dff9748e65288aa1c420f52452e61a5aef0594 (diff) | |
parent | f993a29ef1069dc841e3f74d4227672cc2c90c55 (diff) | |
download | mariadb-git-5217653283a342cbbf0c0fb61d633d58372a97ee.tar.gz |
Conflicts resolving
BitKeeper/etc/logging_ok:
auto-union
client/mysql.cc:
Auto merged
client/mysqltest.c:
Auto merged
include/my_global.h:
Auto merged
include/mysql.h:
Auto merged
include/mysql_com.h:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/log.cc:
Auto merged
sql/log_event.cc:
Auto merged
sql/log_event.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/net_serv.cc:
Auto merged
sql/protocol.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/set_var.h:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_db.cc:
Auto merged
sql/sql_handler.cc:
Auto merged
sql/sql_load.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
libmysqld/libmysqld.c:
conflicts resolving
Diffstat (limited to 'include')
-rw-r--r-- | include/Makefile.am | 9 | ||||
-rw-r--r-- | include/config-win.h | 7 | ||||
-rw-r--r-- | include/m_ctype.h | 48 | ||||
-rw-r--r-- | include/my_global.h | 7 | ||||
-rw-r--r-- | include/my_pthread.h | 8 | ||||
-rw-r--r-- | include/mysql.h | 14 | ||||
-rw-r--r-- | include/mysql_com.h | 2 | ||||
-rw-r--r-- | include/typelib.h | 62 |
8 files changed, 96 insertions, 61 deletions
diff --git a/include/Makefile.am b/include/Makefile.am index 652278e8a80..e197cee4cde 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -37,16 +37,25 @@ SUPERCLEANFILES = mysql_version.h my_config.h # Some include files that may be moved and patched by configure DISTCLEANFILES = sched.h +clean: + $(RM) -f readline/* +distclean: + $(RM) -f readline/* + all-local: my_config.h # Since we include my_config.h it better exist from the beginning link_sources: $(CP) ../config.h my_config.h + $(RM) -f readline/* + @readline_h_ln_cmd@ # Keep automake happy my_config.h: ../config.h $(CP) ../config.h my_config.h + $(RM) -f readline/* + @readline_h_ln_cmd@ # These files should not be included in distributions since they are # generated by configure from the .h.in files diff --git a/include/config-win.h b/include/config-win.h index 9c1c1ae4830..dce543cd2b0 100644 --- a/include/config-win.h +++ b/include/config-win.h @@ -152,7 +152,9 @@ typedef uint rf_SetTimer; #define access(A,B) _access(A,B) #endif -#if defined(__cplusplus) +#if !defined(__cplusplus) +#define inline __inline +#endif /* __cplusplus */ inline double rint(double nr) { @@ -175,9 +177,6 @@ inline double ulonglong2double(ulonglong value) } #define my_off_t2double(A) ulonglong2double(A) #endif /* _WIN64 */ -#else -#define inline __inline -#endif /* __cplusplus */ #if SIZEOF_OFF_T > 4 #define lseek(A,B,C) _lseeki64((A),(longlong) (B),(C)) diff --git a/include/m_ctype.h b/include/m_ctype.h index d99fda8d2b9..ee6a50e6b8d 100644 --- a/include/m_ctype.h +++ b/include/m_ctype.h @@ -49,6 +49,9 @@ typedef struct unicase_info_st { #define MY_CS_TOOSMALL -1 #define MY_CS_TOOFEW(n) (-1-(n)) +#define MY_SEQ_INTTAIL 1 +#define MY_SEQ_SPACES 2 + /* My charsets_list flags */ #define MY_NO_SETS 0 #define MY_CS_COMPILED 1 /* compiled-in sets */ @@ -57,6 +60,7 @@ typedef struct unicase_info_st { #define MY_CS_LOADED 8 /* sets that are currently loaded */ #define MY_CS_BINSORT 16 /* if binary sort order */ #define MY_CS_PRIMARY 32 /* if primary collation */ +#define MY_CS_STRNXFRM 64 /* if strnxfrm is used for sort */ #define MY_CHARSET_UNDEFINED 0 #define MY_CHARSET_CURRENT (default_charset_info->number) @@ -133,15 +137,17 @@ typedef struct charset_info_st /* Charset dependant snprintf() */ int (*snprintf)(struct charset_info_st *, char *to, uint n, const char *fmt, ...); - int (*l10tostr)(struct charset_info_st *, char *to, uint n, int radix, long int val); - int (*ll10tostr)(struct charset_info_st *, char *to, uint n, int radix, longlong val); + int (*long10_to_str)(struct charset_info_st *, char *to, uint n, int radix, long int val); + int (*longlong10_to_str)(struct charset_info_st *, char *to, uint n, int radix, longlong val); /* String-to-number convertion routines */ - long (*strntol)(struct charset_info_st *, const char *s, uint l,char **e, int base); - ulong (*strntoul)(struct charset_info_st *, const char *s, uint l, char **e, int base); - longlong (*strntoll)(struct charset_info_st *, const char *s, uint l, char **e, int base); - ulonglong (*strntoull)(struct charset_info_st *, const char *s, uint l, char **e, int base); - double (*strntod)(struct charset_info_st *, char *s, uint l, char **e); + long (*strntol)(struct charset_info_st *, const char *s, uint l, int base, char **e, int *err); + ulong (*strntoul)(struct charset_info_st *, const char *s, uint l, int base, char **e, int *err); + longlong (*strntoll)(struct charset_info_st *, const char *s, uint l, int base, char **e, int *err); + ulonglong (*strntoull)(struct charset_info_st *, const char *s, uint l, int base, char **e, int *err); + double (*strntod)(struct charset_info_st *, char *s, uint l, char **e, int *err); + + ulong (*scan)(struct charset_info_st *, const char *b, const char *e, int sq); } CHARSET_INFO; @@ -180,16 +186,18 @@ extern int my_strncasecmp_8bit(CHARSET_INFO * cs, const char *, const char *, ui int my_mb_wc_8bit(CHARSET_INFO *cs,my_wc_t *wc, const uchar *s,const uchar *e); int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc, uchar *s, uchar *e); +ulong my_scan_8bit(CHARSET_INFO *cs, const char *b, const char *e, int sq); + int my_snprintf_8bit(struct charset_info_st *, char *to, uint n, const char *fmt, ...); -long my_strntol_8bit(CHARSET_INFO *, const char *s, uint l,char **e, int base); -ulong my_strntoul_8bit(CHARSET_INFO *, const char *s, uint l,char **e, int base); -longlong my_strntoll_8bit(CHARSET_INFO *, const char *s, uint l,char **e, int base); -ulonglong my_strntoull_8bit(CHARSET_INFO *, const char *s, uint l,char **e, int base); -double my_strntod_8bit(CHARSET_INFO *, char *s, uint l,char **e); +long my_strntol_8bit(CHARSET_INFO *, const char *s, uint l, int base, char **e, int *err); +ulong my_strntoul_8bit(CHARSET_INFO *, const char *s, uint l, int base, char **e, int *err); +longlong my_strntoll_8bit(CHARSET_INFO *, const char *s, uint l, int base, char **e, int *err); +ulonglong my_strntoull_8bit(CHARSET_INFO *, const char *s, uint l, int base, char **e, int *err); +double my_strntod_8bit(CHARSET_INFO *, char *s, uint l,char **e, int *err); -int my_l10tostr_8bit(CHARSET_INFO *, char *to, uint l, int radix, long int val); -int my_ll10tostr_8bit(CHARSET_INFO *, char *to, uint l, int radix, longlong val); +int my_long10_to_str_8bit(CHARSET_INFO *, char *to, uint l, int radix, long int val); +int my_longlong10_to_str_8bit(CHARSET_INFO *, char *to, uint l, int radix, longlong val); my_bool my_like_range_simple(CHARSET_INFO *cs, const char *ptr, uint ptr_length, @@ -253,7 +261,7 @@ int my_wildcmp_mb(CHARSET_INFO *, #define my_isvar(s,c) (my_isalnum(s,c) || (c) == '_') #define my_isvar_start(s,c) (my_isalpha(s,c) || (c) == '_') -#define use_strnxfrm(s) ((s)->strnxfrm != NULL) +#define use_strnxfrm(s) ((s)->state & MY_CS_STRNXFRM) #define my_strnxfrm(s, a, b, c, d) ((s)->strnxfrm((s), (a), (b), (c), (d))) #define my_strnncoll(s, a, b, c, d) ((s)->strnncoll((s), (a), (b), (c), (d))) #define my_like_range(s, a, b, c, d, e, f, g, h, i, j) \ @@ -273,11 +281,11 @@ int my_wildcmp_mb(CHARSET_INFO *, #define my_strcasecmp(s, a, b) ((s)->strcasecmp((s), (a), (b))) #define my_strncasecmp(s, a, b, l) ((s)->strncasecmp((s), (a), (b), (l))) -#define my_strntol(s, a, b, c, d) ((s)->strntol((s),(a),(b),(c),(d))) -#define my_strntoul(s, a, b, c, d) ((s)->strntoul((s),(a),(b),(c),(d))) -#define my_strntoll(s, a, b, c, d) ((s)->strntoll((s),(a),(b),(c),(d))) -#define my_strntoull(s, a, b, c,d) ((s)->strntoull((s),(a),(b),(c),(d))) -#define my_strntod(s, a, b, c ) ((s)->strntod((s),(a),(b),(c))) +#define my_strntol(s, a, b, c, d, e) ((s)->strntol((s),(a),(b),(c),(d),(e))) +#define my_strntoul(s, a, b, c, d, e) ((s)->strntoul((s),(a),(b),(c),(d),(e))) +#define my_strntoll(s, a, b, c, d, e) ((s)->strntoll((s),(a),(b),(c),(d),(e))) +#define my_strntoull(s, a, b, c,d, e) ((s)->strntoull((s),(a),(b),(c),(d),(e))) +#define my_strntod(s, a, b, c, d) ((s)->strntod((s),(a),(b),(c),(d))) /* XXX: still need to take care of this one */ diff --git a/include/my_global.h b/include/my_global.h index 9a60a6a0598..e2b59dc220f 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -158,6 +158,13 @@ C_MODE_END #undef HAVE_INITGROUPS #endif +/* gcc/egcs issues */ + +#if defined(__GNUC) && defined(__EXCEPTIONS) +#error "Please add -fno-exceptions to CXXFLAGS and reconfigure/recompile" +#endif + + /* Fix a bug in gcc 2.8.0 on IRIX 6.2 */ #if SIZEOF_LONG == 4 && defined(__LONG_MAX__) #undef __LONG_MAX__ /* Is a longlong value in gcc 2.8.0 ??? */ diff --git a/include/my_pthread.h b/include/my_pthread.h index f75ca8f601a..e0394bc978a 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -581,9 +581,13 @@ extern int pthread_dummy(int); #define THREAD_NAME_SIZE 10 #if defined(__ia64__) -#define DEFAULT_THREAD_STACK (128*1024) +/* + MySQL can survive with 32K, but some glibc libraries require > 128K stack + To resolve hostnames +*/ +#define DEFAULT_THREAD_STACK (192*1024L) #else -#define DEFAULT_THREAD_STACK (64*1024) +#define DEFAULT_THREAD_STACK (192*1024L) #endif struct st_my_thread_var diff --git a/include/mysql.h b/include/mysql.h index acf0618c8e8..2dbe338354b 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -120,7 +120,8 @@ typedef struct st_mysql_data { } MYSQL_DATA; struct st_mysql_options { - unsigned int connect_timeout,client_flag; + unsigned int connect_timeout; + unsigned long client_flag; unsigned int port; char *host,*user,*password,*unix_socket,*db; struct st_dynamic_array *init_commands; @@ -202,7 +203,8 @@ typedef struct st_mysql my_ulonglong extra_info; /* Used by mysqlshow */ unsigned long thread_id; /* Id for connection in server */ unsigned long packet_length; - unsigned int port,client_flag,server_capabilities; + unsigned int port; + unsigned long client_flag,server_capabilities; unsigned int protocol_version; unsigned int field_count; unsigned int server_status; @@ -348,7 +350,7 @@ MYSQL * STDCALL mysql_real_connect(MYSQL *mysql, const char *host, const char *db, unsigned int port, const char *unix_socket, - unsigned int clientflag); + unsigned long clientflag); void STDCALL mysql_close(MYSQL *sock); int STDCALL mysql_select_db(MYSQL *mysql, const char *db); int STDCALL mysql_query(MYSQL *mysql, const char *q); @@ -510,6 +512,7 @@ typedef struct st_mysql_stmt my_bool send_types_to_server; /* to indicate types supply to server */ my_bool param_buffers; /* to indicate the param bound buffers */ my_bool res_buffers; /* to indicate the output bound buffers */ + my_bool result_buffered; /* to indicate the results buffered */ } MYSQL_STMT; @@ -533,9 +536,12 @@ my_bool STDCALL mysql_send_long_data(MYSQL_STMT *stmt, my_bool last_data); int STDCALL mysql_multi_query(MYSQL *mysql,const char *query, unsigned long len); -MYSQL_RES *STDCALL mysql_next_result(MYSQL *mysql); MYSQL_RES *STDCALL mysql_prepare_result(MYSQL_STMT *stmt); my_ulonglong STDCALL mysql_stmt_affected_rows(MYSQL_STMT *stmt); +int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt); +my_bool STDCALL mysql_more_results(MYSQL *mysql); +my_bool STDCALL mysql_next_result(MYSQL *mysql); + /* new status messages */ diff --git a/include/mysql_com.h b/include/mysql_com.h index 64cf31d59b4..2e8c3f265b8 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -106,10 +106,12 @@ enum enum_server_command #define CLIENT_TRANSACTIONS 8192 /* Client knows about transactions */ #define CLIENT_PROTOCOL_41 16384 /* New 4.1 protocol */ #define CLIENT_SECURE_CONNECTION 32768 /* New 4.1 authentication */ +#define CLIENT_MULTI_QUERIES 65536 /* Enable/disable multi query support */ #define SERVER_STATUS_IN_TRANS 1 /* Transaction has started */ #define SERVER_STATUS_AUTOCOMMIT 2 /* Server in auto_commit mode */ #define SERVER_STATUS_MORE_RESULTS 4 /* More results on server */ +#define SERVER_MORE_RESULTS_EXISTS 8 /* Multi query - next query exists */ #define MYSQL_ERRMSG_SIZE 200 #define NET_READ_TIMEOUT 30 /* Timeout on read */ diff --git a/include/typelib.h b/include/typelib.h index 8de94aba553..1b049d19a11 100644 --- a/include/typelib.h +++ b/include/typelib.h @@ -1,33 +1,33 @@ -/* Copyright (C) 2000 MySQL AB
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-
-
-#ifndef _typelib_h
-#define _typelib_h
- -typedef struct st_typelib { /* Different types saved here */
- uint count; /* How many types */
- const char *name; /* Name of typelib */
- const char **type_names;
-} TYPELIB;
- -extern int find_type(char *x,TYPELIB *typelib,uint full_name);
-extern void make_type(char *to,uint nr,TYPELIB *typelib);
-extern const char *get_type(TYPELIB *typelib,uint nr);
- -extern TYPELIB sql_protocol_typelib;
+/* Copyright (C) 2000 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + + +#ifndef _typelib_h +#define _typelib_h + +typedef struct st_typelib { /* Different types saved here */ + unsigned int count; /* How many types */ + const char *name; /* Name of typelib */ + const char **type_names; +} TYPELIB; + +extern int find_type(char *x,TYPELIB *typelib,unsigned int full_name); +extern void make_type(char *to,unsigned int nr,TYPELIB *typelib); +extern const char *get_type(TYPELIB *typelib,unsigned int nr); + +extern TYPELIB sql_protocol_typelib; #endif /* _typelib_h */ |