diff options
author | unknown <peter@mysql.com> | 2002-11-29 22:03:14 +0300 |
---|---|---|
committer | unknown <peter@mysql.com> | 2002-11-29 22:03:14 +0300 |
commit | 14754ce141aa6a061a94fa668094b0602edd69c5 (patch) | |
tree | 09b5a48a4fb2649410bee507206bcfc49ee4c806 /include | |
parent | c1403e17a8a663fb9621d64bcb82602eb27a0716 (diff) | |
parent | 1d418357ed693231066aeda713617b5e19e68a85 (diff) | |
download | mariadb-git-14754ce141aa6a061a94fa668094b0602edd69c5.tar.gz |
Merging....
BitKeeper/etc/logging_ok:
auto-union
client/insert_test.c:
Auto merged
client/select_test.c:
Auto merged
include/mysql.h:
Auto merged
include/mysql_com.h:
Auto merged
libmysql/libmysql.c:
Auto merged
sql/item_create.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/lex.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/sql_parse.cc:
Manual merge
Diffstat (limited to 'include')
-rw-r--r-- | include/m_ctype.h | 30 | ||||
-rw-r--r-- | include/my_list.h | 2 | ||||
-rw-r--r-- | include/myisam.h | 27 | ||||
-rw-r--r-- | include/myisammrg.h | 1 | ||||
-rw-r--r-- | include/mysql.h | 13 | ||||
-rw-r--r-- | include/mysql_com.h | 2 | ||||
-rw-r--r-- | include/mysqld_error.h | 5 |
7 files changed, 30 insertions, 50 deletions
diff --git a/include/m_ctype.h b/include/m_ctype.h index b16db5cde97..4af23bb3ab5 100644 --- a/include/m_ctype.h +++ b/include/m_ctype.h @@ -125,11 +125,11 @@ typedef struct charset_info_st /* Charset dependant snprintf() */ int (*snprintf)(struct charset_info_st *, char *to, uint n, const char *fmt, ...); - long (*strtol)(struct charset_info_st *, const char *s, char **e, int base); - ulong (*strtoul)(struct charset_info_st *, const char *s, char **e, int base); - longlong (*strtoll)(struct charset_info_st *, const char *s, char **e, int base); - ulonglong (*strtoull)(struct charset_info_st *, const char *s, char **e, int base); - double (*strtod)(struct charset_info_st *, const char *s, char **e); + 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 *, const char *s, uint l, char **e); } CHARSET_INFO; @@ -169,11 +169,11 @@ int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc, uchar *s, uchar *e); int my_snprintf_8bit(struct charset_info_st *, char *to, uint n, const char *fmt, ...); -long my_strtol_8bit(CHARSET_INFO *, const char *s, char **e, int base); -ulong my_strtoul_8bit(CHARSET_INFO *, const char *s, char **e, int base); -longlong my_strtoll_8bit(CHARSET_INFO *, const char *s, char **e, int base); -ulonglong my_strtoull_8bit(CHARSET_INFO *, const char *s, char **e, int base); -double my_strtod_8bit(CHARSET_INFO *, const char *s, char **e); +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 *, const char *s, uint l,char **e); my_bool my_like_range_simple(CHARSET_INFO *cs, const char *ptr, uint ptr_length, @@ -257,11 +257,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_strtol(s, a, b, c) ((s)->strtol((s),(a),(b),(c))) -#define my_strtoul(s, a, b, c) ((s)->strtoul((s),(a),(b),(c))) -#define my_strtoll(s, a, b, c) ((s)->strtoll((s),(a),(b),(c))) -#define my_strtoull(s, a, b, c) ((s)->strtoull((s),(a),(b),(c))) -#define my_strtod(s, a, b) ((s)->strtod((s),(a),(b))) +#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))) /* XXX: still need to take care of this one */ diff --git a/include/my_list.h b/include/my_list.h index 0f56d4c532b..056e1f13b36 100644 --- a/include/my_list.h +++ b/include/my_list.h @@ -32,7 +32,7 @@ extern LIST *list_add(LIST *root,LIST *element); extern LIST *list_delete(LIST *root,LIST *element); extern LIST *list_cons(void *data,LIST *root); extern LIST *list_reverse(LIST *root); -extern void list_free(LIST *root,pbool free_data); +extern void list_free(LIST *root,uint free_data); extern uint list_length(LIST *list); extern int list_walk(LIST *list,list_walk_action action,gptr argument); diff --git a/include/myisam.h b/include/myisam.h index f11b18824d5..4f8fc149ba1 100644 --- a/include/myisam.h +++ b/include/myisam.h @@ -360,31 +360,6 @@ typedef struct st_sort_info pthread_cond_t cond; } SORT_INFO; - -typedef struct st_mi_sort_param -{ - pthread_t thr; - IO_CACHE read_cache, tempfile, tempfile_for_exceptions; - DYNAMIC_ARRAY buffpek; - ulonglong unique[MI_MAX_KEY_SEG+1]; - my_off_t pos,max_pos,filepos,start_recpos; - uint key, key_length,real_key_length,sortbuff_size; - uint maxbuffers, keys, find_length, sort_keys_length; - my_bool fix_datafile, master; - MI_KEYDEF *keyinfo; - SORT_INFO *sort_info; - uchar **sort_keys; - byte *rec_buff; - void *wordlist, *wordptr; - char *record; - MY_TMPDIR *tmpdir; - int (*key_cmp)(struct st_mi_sort_param *, const void *, const void *); - int (*key_read)(struct st_mi_sort_param *,void *); - int (*key_write)(struct st_mi_sort_param *, const void *); - void (*lock_in_memory)(MI_CHECK *); -} MI_SORT_PARAM; - - /* functions in mi_check */ void myisamchk_init(MI_CHECK *param); int chk_status(MI_CHECK *param, MI_INFO *info); @@ -415,9 +390,7 @@ int filecopy(MI_CHECK *param, File to,File from,my_off_t start, my_off_t length, const char *type); int movepoint(MI_INFO *info,byte *record,my_off_t oldpos, my_off_t newpos, uint prot_key); -int sort_write_record(MI_SORT_PARAM *sort_param); int write_data_suffix(SORT_INFO *sort_info, my_bool fix_datafile); -int _create_index_by_sort(MI_SORT_PARAM *info,my_bool no_messages, ulong); int test_if_almost_full(MI_INFO *info); int recreate_table(MI_CHECK *param, MI_INFO **org_info, char *filename); void mi_disable_non_unique_index(MI_INFO *info, ha_rows rows); diff --git a/include/myisammrg.h b/include/myisammrg.h index c3b3b39424b..16d3528717b 100644 --- a/include/myisammrg.h +++ b/include/myisammrg.h @@ -84,6 +84,7 @@ extern int myrg_rfirst(MYRG_INFO *file,byte *buf,int inx); extern int myrg_rlast(MYRG_INFO *file,byte *buf,int inx); extern int myrg_rnext(MYRG_INFO *file,byte *buf,int inx); extern int myrg_rprev(MYRG_INFO *file,byte *buf,int inx); +extern int myrg_rnext_same(MYRG_INFO *file,byte *buf); extern int myrg_rkey(MYRG_INFO *file,byte *buf,int inx,const byte *key, uint key_len, enum ha_rkey_function search_flag); extern int myrg_rrnd(MYRG_INFO *file,byte *buf,ulonglong pos); diff --git a/include/mysql.h b/include/mysql.h index b76fa4530aa..1d4b923f4f2 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -61,6 +61,8 @@ typedef int my_socket; #define CHECK_EXTRA_ARGUMENTS #endif +#include "my_list.h" /* for LISTs used in 'MYSQL' and 'MYSQL_STMT' */ + extern unsigned int mysql_port; extern char *mysql_unix_port; @@ -213,6 +215,8 @@ typedef struct st_mysql struct st_mysql* last_used_slave; /* needed for round-robin slave pick */ /* needed for send/read/store/use result to work correctly with replication */ struct st_mysql* last_used_con; + + LIST *stmts; /* list of all statements */ } MYSQL; @@ -457,6 +461,7 @@ typedef struct st_mysql_stmt MYSQL_RES *result; /* resultset */ MYSQL_BIND *bind; /* row binding */ MYSQL_FIELD *fields; /* prepare meta info */ + LIST list; /* list to keep track of all stmts */ char *query; /* query buffer */ MEM_ROOT mem_root; /* root allocations */ MYSQL_RES tmp_result; /* Used by mysql_prepare_result */ @@ -469,8 +474,8 @@ typedef struct st_mysql_stmt char last_error[MYSQL_ERRMSG_SIZE]; /* error message */ my_bool long_alloced; /* flag to indicate long alloced */ 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 result bound buffers */ + my_bool param_buffers; /* to indicate the param bound buffers */ + my_bool res_buffers; /* to indicate the output bound buffers */ } MYSQL_STMT; @@ -478,8 +483,8 @@ MYSQL_STMT * STDCALL mysql_prepare(MYSQL * mysql, const char *query, unsigned long length); int STDCALL mysql_execute(MYSQL_STMT * stmt); unsigned long STDCALL mysql_param_count(MYSQL_STMT * stmt); -my_bool STDCALL mysql_bind_param(MYSQL_STMT * stmt, MYSQL_BIND * bind); -my_bool STDCALL mysql_bind_result(MYSQL_STMT * stmt, MYSQL_BIND * bind); +my_bool STDCALL mysql_bind_param(MYSQL_STMT * stmt, MYSQL_BIND * bnd); +my_bool STDCALL mysql_bind_result(MYSQL_STMT * stmt, MYSQL_BIND * bnd); my_bool STDCALL mysql_stmt_close(MYSQL_STMT * stmt); unsigned int STDCALL mysql_stmt_errno(MYSQL_STMT * stmt); const char *STDCALL mysql_stmt_error(MYSQL_STMT * stmt); diff --git a/include/mysql_com.h b/include/mysql_com.h index 68ea550c768..b8e78ee8f60 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -242,7 +242,7 @@ struct rand_struct { /* The following is for user defined functions */ -enum Item_result {STRING_RESULT,REAL_RESULT,INT_RESULT}; +enum Item_result {STRING_RESULT, REAL_RESULT, INT_RESULT, ROW_RESULT}; typedef struct st_udf_args { diff --git a/include/mysqld_error.h b/include/mysqld_error.h index ed83c5e57a8..d0b3cc9aa4a 100644 --- a/include/mysqld_error.h +++ b/include/mysqld_error.h @@ -255,11 +255,12 @@ #define ER_MASTER_FATAL_ERROR_READING_BINLOG 1236 #define ER_WRONG_FK_DEF 1237 #define ER_KEY_REF_DO_NOT_MATCH_TABLE_REF 1238 -#define ER_SUBSELECT_NO_1_COL 1239 +#define ER_CARDINALITY_COL 1239 #define ER_SUBSELECT_NO_1_ROW 1240 #define ER_UNKNOWN_STMT_HANDLER 1241 #define ER_CORRUPT_HELP_DB 1242 #define ER_CYCLIC_REFERENCE 1243 #define ER_AUTO_CONVERT 1244 #define ER_ILLEGAL_REFERENCE 1245 -#define ER_ERROR_MESSAGES 246 +#define ER_SELECT_REDUCED 1246 +#define ER_ERROR_MESSAGES 247 |