summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2002-11-14 14:42:18 +0200
committerunknown <bell@sanja.is.com.ua>2002-11-14 14:42:18 +0200
commitf4503f5bc4ed5d395b460a5511de98952dd1d663 (patch)
treee780e0d65bb3fc6bdb70c14bd4af75f7fa93f4ae /include
parent7b97a7a41aaed30aff2a85c8ebe7b87e53d3105b (diff)
parente7bbe3aa0b2f9dda5f6883a3e1998377a9071db5 (diff)
downloadmariadb-git-f4503f5bc4ed5d395b460a5511de98952dd1d663.tar.gz
Merge sanja.is.com.ua:/home/bell/mysql/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/work-4.1 sql/sql_select.cc: Auto merged
Diffstat (limited to 'include')
-rw-r--r--include/m_ctype.h49
-rw-r--r--include/my_tree.h2
-rw-r--r--include/myisampack.h4
-rw-r--r--include/mysqld_error.h3
4 files changed, 49 insertions, 9 deletions
diff --git a/include/m_ctype.h b/include/m_ctype.h
index 029a1a5db39..414bd86a412 100644
--- a/include/m_ctype.h
+++ b/include/m_ctype.h
@@ -83,19 +83,23 @@ typedef struct charset_info_st
my_bool (*like_range)(struct charset_info_st *,
const char *, uint, pchar, uint,
char *, char *, uint *, uint *);
-
+ int (*wildcmp)(struct charset_info_st *,
+ const char *str,const char *str_end,
+ const char *wildstr,const char *wildend,
+ int escape,int w_one, int w_many);
+
/* Multibyte routines */
uint mbmaxlen;
int (*ismbchar)(struct charset_info_st *, const char *, const char *);
my_bool (*ismbhead)(struct charset_info_st *, uint);
int (*mbcharlen)(struct charset_info_st *, uint);
-
+
/* Unicode convertion */
int (*mb_wc)(struct charset_info_st *cs,my_wc_t *wc,
const unsigned char *s,const unsigned char *e);
int (*wc_mb)(struct charset_info_st *cs,my_wc_t wc,
unsigned char *s,unsigned char *e);
-
+
/* Functions for case and sort convertion */
void (*caseup_str)(struct charset_info_st *, char *);
void (*casedn_str)(struct charset_info_st *, char *);
@@ -107,13 +111,23 @@ typedef struct charset_info_st
int (*strcasecmp)(struct charset_info_st *, const char *, const char *);
int (*strncasecmp)(struct charset_info_st *, const char *, const char *,
uint);
-
+
/* Hash calculation */
uint (*hash_caseup)(struct charset_info_st *cs, const byte *key, uint len);
void (*hash_sort)(struct charset_info_st *cs, const uchar *key, uint len,
ulong *nr1, ulong *nr2);
-
+
char max_sort_char; /* For LIKE optimization */
+
+ /* 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);
+
} CHARSET_INFO;
@@ -150,6 +164,20 @@ 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);
+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);
+
+
+int my_wildcmp_8bit(CHARSET_INFO *,
+ const char *str,const char *str_end,
+ const char *wildstr,const char *wildend,
+ int escape, int w_one, int w_many);
+
#ifdef USE_MB
/* Functions for multibyte charsets */
@@ -159,6 +187,10 @@ extern void my_caseup_mb(CHARSET_INFO *, char *, uint);
extern void my_casedn_mb(CHARSET_INFO *, char *, uint);
extern int my_strcasecmp_mb(CHARSET_INFO * cs,const char *, const char *);
extern int my_strncasecmp_mb(CHARSET_INFO * cs,const char *, const char *t, uint);
+int my_wildcmp_mb(CHARSET_INFO *,
+ const char *str,const char *str_end,
+ const char *wildstr,const char *wildend,
+ int escape, int w_one, int w_many);
#endif
@@ -200,6 +232,7 @@ extern int my_strncasecmp_mb(CHARSET_INFO * cs,const char *, const char *t, uint
#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) \
((s)->like_range((s), (a), (b), (c), (d), (e), (f), (g), (h)))
+#define my_wildcmp(cs,s,se,w,we,e,o,m) ((cs)->wildcmp,(s),(se),(w),(we),(e),(o),(m))
#define use_mb(s) ((s)->ismbchar != NULL)
#define my_ismbchar(s, a, b) ((s)->ismbchar((s), (a), (b)))
@@ -214,6 +247,12 @@ extern int my_strncasecmp_mb(CHARSET_INFO * cs,const char *, const char *t, uint
#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)))
+
/* XXX: still need to take care of this one */
#ifdef MY_CHARSET_TIS620
diff --git a/include/my_tree.h b/include/my_tree.h
index 05e93df8593..99194907ef9 100644
--- a/include/my_tree.h
+++ b/include/my_tree.h
@@ -91,7 +91,7 @@ void *tree_search_edge(TREE *tree, TREE_ELEMENT **parents,
TREE_ELEMENT ***last_pos, int child_offs);
void *tree_search_next(TREE *tree, TREE_ELEMENT ***last_pos, int l_offs,
int r_offs);
-uint tree_record_pos(TREE *tree, const void *key,
+ha_rows tree_record_pos(TREE *tree, const void *key,
enum ha_rkey_function search_flag, void *custom_arg);
#ifdef __cplusplus
}
diff --git a/include/myisampack.h b/include/myisampack.h
index 31666bb184c..51c9876c246 100644
--- a/include/myisampack.h
+++ b/include/myisampack.h
@@ -212,9 +212,9 @@
/* Fix to avoid warnings when sizeof(ha_rows) == sizeof(long) */
-#ifdef BIG_TABLE
+#ifdef BIG_TABLES
#define mi_rowstore(T,A) mi_int8store(T,A)
-#define mi_rowkorr(T,A) mi_uint8korr(T)
+#define mi_rowkorr(T) mi_uint8korr(T)
#else
#define mi_rowstore(T,A) { mi_int4store(T,0); mi_int4store(((T)+4),A); }
#define mi_rowkorr(T) mi_uint4korr((T)+4)
diff --git a/include/mysqld_error.h b/include/mysqld_error.h
index 125059af7fd..456d675a045 100644
--- a/include/mysqld_error.h
+++ b/include/mysqld_error.h
@@ -259,4 +259,5 @@
#define ER_SUBSELECT_NO_1_ROW 1240
#define ER_UNKNOWN_STMT_HANDLER 1241
#define ER_CORRUPT_HELP_DB 1242
-#define ER_ERROR_MESSAGES 243
+#define ER_CYCLIC_REFERENCE 1243
+#define ER_ERROR_MESSAGES 244