mirror of
https://github.com/MariaDB/server.git
synced 2025-01-28 17:54:16 +01:00
Applied Antony T Curtis patch for declaring many CHARSET objects as const
Removed compiler warnings extra/libevent/epoll.c: Removed compiler warnings extra/libevent/evbuffer.c: Removed compiler warnings extra/libevent/event.c: Removed compiler warnings extra/libevent/select.c: Removed compiler warnings extra/libevent/signal.c: Removed compiler warnings include/m_ctype.h: Define CHARSET_INFO, MY_CHARSET_HANDLER, MY_COLLATION_HANDLER, MY_UNICASE_INFO, MY_UNI_CTYPE and MY_UNI_IDX as const structures. Declare that pointers point to const data include/m_string.h: Declare that pointers point to const data include/my_sys.h: Redefine variables and function prototypes include/mysql.h: Declare charset as const include/mysql.h.pp: Declare charset as const include/mysql/plugin.h: Declare charset as const include/mysql/plugin.h.pp: Declare charset as const mysys/charset-def.c: Charset can't be of type CHARSET_INFO as they are changed when they are initialized. mysys/charset.c: Functions that change CHARSET_INFO must use 'struct charset_info_st' Add temporary variables to not have to change all_charsets[] (Which now is const) sql-common/client.c: Added cast to const sql/item_cmpfunc.h: Added cast to avoid compiler error. sql/sql_class.cc: Added cast to const sql/sql_lex.cc: Added cast to const storage/maria/ma_ft_boolean_search.c: Added cast to avoid compiler error. storage/maria/ma_ft_parser.c: Added cast to avoid compiler error. storage/maria/ma_search.c: Added cast to const storage/myisam/ft_boolean_search.c: Added cast to avoid compiler error storage/myisam/ft_parser.c: Added cast to avoid compiler error storage/myisam/mi_search.c: Added cast to const storage/pbxt/src/datadic_xt.cc: Added cast to const storage/pbxt/src/ha_pbxt.cc: Added cast to const Removed compiler warning by changing prototype of XTThreadPtr() storage/pbxt/src/myxt_xt.h: Character sets should be const storage/pbxt/src/xt_defs.h: Character sets should be const storage/xtradb/btr/btr0cur.c: Removed compiler warning strings/conf_to_src.c: Added const Functions that change CHARSET_INFO must use 'struct charset_info_st' strings/ctype-big5.c: Made arrays const strings/ctype-bin.c: Made arrays const strings/ctype-cp932.c: Made arrays const strings/ctype-czech.c: Made arrays const strings/ctype-euc_kr.c: Made arrays const strings/ctype-eucjpms.c: Made arrays const strings/ctype-extra.c: Made arrays const strings/ctype-gb2312.c: Made arrays const strings/ctype-gbk.c: Made arrays const strings/ctype-latin1.c: Made arrays const strings/ctype-mb.c: Made arrays const strings/ctype-simple.c: Made arrays const strings/ctype-sjis.c: Made arrays const strings/ctype-tis620.c: Made arrays const strings/ctype-uca.c: Made arrays const strings/ctype-ucs2.c: Made arrays const strings/ctype-ujis.c: Made arrays const strings/ctype-utf8.c: Made arrays const strings/ctype-win1250ch.c: Made arrays const strings/ctype.c: Made arrays const Added cast to const Functions that change CHARSET_INFO must use 'struct charset_info_st' strings/int2str.c: Added cast to const
This commit is contained in:
parent
43ddd3b89f
commit
f83113df07
52 changed files with 1476 additions and 1458 deletions
|
@ -155,7 +155,8 @@ epoll_init(struct event_base *base)
|
|||
}
|
||||
|
||||
static int
|
||||
epoll_recalc(struct event_base *base, void *arg, int max)
|
||||
epoll_recalc(struct event_base *base __attribute__((unused)),
|
||||
void *arg, int max)
|
||||
{
|
||||
struct epollop *epollop = arg;
|
||||
|
||||
|
|
|
@ -75,7 +75,8 @@ bufferevent_add(struct event *ev, int timeout)
|
|||
*/
|
||||
|
||||
void
|
||||
bufferevent_read_pressure_cb(struct evbuffer *buf, size_t old, size_t now,
|
||||
bufferevent_read_pressure_cb(struct evbuffer *buf,
|
||||
size_t old __attribute__((unused)), size_t now,
|
||||
void *arg) {
|
||||
struct bufferevent *bufev = arg;
|
||||
/*
|
||||
|
|
|
@ -394,7 +394,8 @@ event_base_get_method(struct event_base *base)
|
|||
}
|
||||
|
||||
static void
|
||||
event_loopexit_cb(int fd, short what, void *arg)
|
||||
event_loopexit_cb(int fd __attribute__((unused)),
|
||||
short what __attribute__((unused)), void *arg)
|
||||
{
|
||||
struct event_base *base = arg;
|
||||
base->event_gotterm = 1;
|
||||
|
|
|
@ -266,7 +266,7 @@ select_add(void *arg, struct event *ev)
|
|||
* of the fd_sets for select(2)
|
||||
*/
|
||||
if (sop->event_fds < ev->ev_fd) {
|
||||
int fdsz = sop->event_fdsz;
|
||||
unsigned int fdsz = sop->event_fdsz;
|
||||
|
||||
if (fdsz < sizeof(fd_mask))
|
||||
fdsz = sizeof(fd_mask);
|
||||
|
@ -275,7 +275,7 @@ select_add(void *arg, struct event *ev)
|
|||
(howmany(ev->ev_fd + 1, NFDBITS) * sizeof(fd_mask)))
|
||||
fdsz *= 2;
|
||||
|
||||
if (fdsz != sop->event_fdsz) {
|
||||
if (fdsz != (unsigned int) sop->event_fdsz) {
|
||||
if (select_resize(sop, fdsz)) {
|
||||
check_selectop(sop);
|
||||
return (-1);
|
||||
|
|
|
@ -69,7 +69,7 @@ static void evsignal_handler(int sig);
|
|||
|
||||
/* Callback for when the signal handler write a byte to our signaling socket */
|
||||
static void
|
||||
evsignal_cb(int fd, short what, void *arg)
|
||||
evsignal_cb(int fd, short what __attribute((unused)), void *arg __attribute((unused)))
|
||||
{
|
||||
static char signals[100];
|
||||
#ifdef WIN32
|
||||
|
|
|
@ -38,16 +38,23 @@ extern "C" {
|
|||
|
||||
#define my_wc_t ulong
|
||||
|
||||
typedef struct unicase_info_st
|
||||
typedef const struct charset_info_st CHARSET_INFO;
|
||||
typedef const struct my_charset_handler_st MY_CHARSET_HANDLER;
|
||||
typedef const struct my_collation_handler_st MY_COLLATION_HANDLER;
|
||||
|
||||
typedef const struct unicase_info_st MY_UNICASE_INFO;
|
||||
typedef const struct uni_ctype_st MY_UNI_CTYPE;
|
||||
typedef const struct my_uni_idx_st MY_UNI_IDX;
|
||||
|
||||
struct unicase_info_st
|
||||
{
|
||||
uint16 toupper;
|
||||
uint16 tolower;
|
||||
uint16 sort;
|
||||
} MY_UNICASE_INFO;
|
||||
};
|
||||
|
||||
|
||||
extern MY_UNICASE_INFO *my_unicase_default[256];
|
||||
extern MY_UNICASE_INFO *my_unicase_turkish[256];
|
||||
extern MY_UNICASE_INFO *const my_unicase_default[256];
|
||||
extern MY_UNICASE_INFO *const my_unicase_turkish[256];
|
||||
|
||||
#define MY_UCA_MAX_CONTRACTION 4
|
||||
#define MY_UCA_MAX_WEIGHT_SIZE 8
|
||||
|
@ -67,11 +74,11 @@ typedef struct my_contraction_list_t
|
|||
} MY_CONTRACTIONS;
|
||||
|
||||
|
||||
typedef struct uni_ctype_st
|
||||
struct uni_ctype_st
|
||||
{
|
||||
uchar pctype;
|
||||
uchar *ctype;
|
||||
} MY_UNI_CTYPE;
|
||||
const uchar *ctype;
|
||||
};
|
||||
|
||||
extern MY_UNI_CTYPE my_uni_ctype[256];
|
||||
|
||||
|
@ -114,12 +121,12 @@ extern MY_UNI_CTYPE my_uni_ctype[256];
|
|||
#define MY_REPERTOIRE_UNICODE30 3 /* ASCII | EXTENDED: U+0000..U+FFFF */
|
||||
|
||||
|
||||
typedef struct my_uni_idx_st
|
||||
struct my_uni_idx_st
|
||||
{
|
||||
uint16 from;
|
||||
uint16 to;
|
||||
uchar *tab;
|
||||
} MY_UNI_IDX;
|
||||
const uchar *tab;
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -148,41 +155,41 @@ struct charset_info_st;
|
|||
|
||||
|
||||
/* See strings/CHARSET_INFO.txt for information about this structure */
|
||||
typedef struct my_collation_handler_st
|
||||
struct my_collation_handler_st
|
||||
{
|
||||
my_bool (*init)(struct charset_info_st *, void *(*alloc)(size_t));
|
||||
/* Collation routines */
|
||||
int (*strnncoll)(struct charset_info_st *,
|
||||
int (*strnncoll)(CHARSET_INFO *,
|
||||
const uchar *, size_t, const uchar *, size_t, my_bool);
|
||||
int (*strnncollsp)(struct charset_info_st *,
|
||||
int (*strnncollsp)(CHARSET_INFO *,
|
||||
const uchar *, size_t, const uchar *, size_t,
|
||||
my_bool diff_if_only_endspace_difference);
|
||||
size_t (*strnxfrm)(struct charset_info_st *,
|
||||
size_t (*strnxfrm)(CHARSET_INFO *,
|
||||
uchar *, size_t, const uchar *, size_t);
|
||||
size_t (*strnxfrmlen)(struct charset_info_st *, size_t);
|
||||
my_bool (*like_range)(struct charset_info_st *,
|
||||
size_t (*strnxfrmlen)(CHARSET_INFO *, size_t);
|
||||
my_bool (*like_range)(CHARSET_INFO *,
|
||||
const char *s, size_t s_length,
|
||||
pchar w_prefix, pchar w_one, pchar w_many,
|
||||
size_t res_length,
|
||||
char *min_str, char *max_str,
|
||||
size_t *min_len, size_t *max_len);
|
||||
int (*wildcmp)(struct charset_info_st *,
|
||||
int (*wildcmp)(CHARSET_INFO *,
|
||||
const char *str,const char *str_end,
|
||||
const char *wildstr,const char *wildend,
|
||||
int escape,int w_one, int w_many);
|
||||
|
||||
int (*strcasecmp)(struct charset_info_st *, const char *, const char *);
|
||||
int (*strcasecmp)(CHARSET_INFO *, const char *, const char *);
|
||||
|
||||
uint (*instr)(struct charset_info_st *,
|
||||
uint (*instr)(CHARSET_INFO *,
|
||||
const char *b, size_t b_length,
|
||||
const char *s, size_t s_length,
|
||||
my_match_t *match, uint nmatch);
|
||||
|
||||
/* Hash calculation */
|
||||
void (*hash_sort)(struct charset_info_st *cs, const uchar *key, size_t len,
|
||||
void (*hash_sort)(CHARSET_INFO *cs, const uchar *key, size_t len,
|
||||
ulong *nr1, ulong *nr2);
|
||||
my_bool (*propagate)(struct charset_info_st *cs, const uchar *str, size_t len);
|
||||
} MY_COLLATION_HANDLER;
|
||||
my_bool (*propagate)(CHARSET_INFO *cs, const uchar *str, size_t len);
|
||||
};
|
||||
|
||||
extern MY_COLLATION_HANDLER my_collation_mb_bin_handler;
|
||||
extern MY_COLLATION_HANDLER my_collation_8bit_bin_handler;
|
||||
|
@ -190,83 +197,83 @@ extern MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler;
|
|||
extern MY_COLLATION_HANDLER my_collation_ucs2_uca_handler;
|
||||
|
||||
/* Some typedef to make it easy for C++ to make function pointers */
|
||||
typedef int (*my_charset_conv_mb_wc)(struct charset_info_st *, my_wc_t *,
|
||||
typedef int (*my_charset_conv_mb_wc)(CHARSET_INFO *, my_wc_t *,
|
||||
const uchar *, const uchar *);
|
||||
typedef int (*my_charset_conv_wc_mb)(struct charset_info_st *, my_wc_t,
|
||||
typedef int (*my_charset_conv_wc_mb)(CHARSET_INFO *, my_wc_t,
|
||||
uchar *, uchar *);
|
||||
typedef size_t (*my_charset_conv_case)(struct charset_info_st *,
|
||||
typedef size_t (*my_charset_conv_case)(CHARSET_INFO *,
|
||||
char *, size_t, char *, size_t);
|
||||
|
||||
|
||||
/* See strings/CHARSET_INFO.txt about information on this structure */
|
||||
typedef struct my_charset_handler_st
|
||||
struct my_charset_handler_st
|
||||
{
|
||||
my_bool (*init)(struct charset_info_st *, void *(*alloc)(size_t));
|
||||
/* Multibyte routines */
|
||||
uint (*ismbchar)(struct charset_info_st *, const char *, const char *);
|
||||
uint (*mbcharlen)(struct charset_info_st *, uint c);
|
||||
size_t (*numchars)(struct charset_info_st *, const char *b, const char *e);
|
||||
size_t (*charpos)(struct charset_info_st *, const char *b, const char *e,
|
||||
uint (*ismbchar)(CHARSET_INFO *, const char *, const char *);
|
||||
uint (*mbcharlen)(CHARSET_INFO *, uint c);
|
||||
size_t (*numchars)(CHARSET_INFO *, const char *b, const char *e);
|
||||
size_t (*charpos)(CHARSET_INFO *, const char *b, const char *e,
|
||||
size_t pos);
|
||||
size_t (*well_formed_len)(struct charset_info_st *,
|
||||
size_t (*well_formed_len)(CHARSET_INFO *,
|
||||
const char *b,const char *e,
|
||||
size_t nchars, int *error);
|
||||
size_t (*lengthsp)(struct charset_info_st *, const char *ptr, size_t length);
|
||||
size_t (*numcells)(struct charset_info_st *, const char *b, const char *e);
|
||||
size_t (*lengthsp)(CHARSET_INFO *, const char *ptr, size_t length);
|
||||
size_t (*numcells)(CHARSET_INFO *, const char *b, const char *e);
|
||||
|
||||
/* Unicode conversion */
|
||||
my_charset_conv_mb_wc mb_wc;
|
||||
my_charset_conv_wc_mb wc_mb;
|
||||
|
||||
/* CTYPE scanner */
|
||||
int (*ctype)(struct charset_info_st *cs, int *ctype,
|
||||
int (*ctype)(CHARSET_INFO *cs, int *ctype,
|
||||
const uchar *s, const uchar *e);
|
||||
|
||||
/* Functions for case and sort conversion */
|
||||
size_t (*caseup_str)(struct charset_info_st *, char *);
|
||||
size_t (*casedn_str)(struct charset_info_st *, char *);
|
||||
size_t (*caseup_str)(CHARSET_INFO *, char *);
|
||||
size_t (*casedn_str)(CHARSET_INFO *, char *);
|
||||
|
||||
my_charset_conv_case caseup;
|
||||
my_charset_conv_case casedn;
|
||||
|
||||
/* Charset dependant snprintf() */
|
||||
size_t (*snprintf)(struct charset_info_st *, char *to, size_t n,
|
||||
size_t (*snprintf)(CHARSET_INFO *, char *to, size_t n,
|
||||
const char *fmt,
|
||||
...) ATTRIBUTE_FORMAT_FPTR(printf, 4, 5);
|
||||
size_t (*long10_to_str)(struct charset_info_st *, char *to, size_t n,
|
||||
size_t (*long10_to_str)(CHARSET_INFO *, char *to, size_t n,
|
||||
int radix, long int val);
|
||||
size_t (*longlong10_to_str)(struct charset_info_st *, char *to, size_t n,
|
||||
size_t (*longlong10_to_str)(CHARSET_INFO *, char *to, size_t n,
|
||||
int radix, longlong val);
|
||||
|
||||
void (*fill)(struct charset_info_st *, char *to, size_t len, int fill);
|
||||
void (*fill)(CHARSET_INFO *, char *to, size_t len, int fill);
|
||||
|
||||
/* String-to-number conversion routines */
|
||||
long (*strntol)(struct charset_info_st *, const char *s, size_t l,
|
||||
long (*strntol)(CHARSET_INFO *, const char *s, size_t l,
|
||||
int base, char **e, int *err);
|
||||
ulong (*strntoul)(struct charset_info_st *, const char *s, size_t l,
|
||||
ulong (*strntoul)(CHARSET_INFO *, const char *s, size_t l,
|
||||
int base, char **e, int *err);
|
||||
longlong (*strntoll)(struct charset_info_st *, const char *s, size_t l,
|
||||
longlong (*strntoll)(CHARSET_INFO *, const char *s, size_t l,
|
||||
int base, char **e, int *err);
|
||||
ulonglong (*strntoull)(struct charset_info_st *, const char *s, size_t l,
|
||||
ulonglong (*strntoull)(CHARSET_INFO *, const char *s, size_t l,
|
||||
int base, char **e, int *err);
|
||||
double (*strntod)(struct charset_info_st *, char *s, size_t l, char **e,
|
||||
double (*strntod)(CHARSET_INFO *, char *s, size_t l, char **e,
|
||||
int *err);
|
||||
longlong (*strtoll10)(struct charset_info_st *cs,
|
||||
longlong (*strtoll10)(CHARSET_INFO *cs,
|
||||
const char *nptr, char **endptr, int *error);
|
||||
ulonglong (*strntoull10rnd)(struct charset_info_st *cs,
|
||||
ulonglong (*strntoull10rnd)(CHARSET_INFO *cs,
|
||||
const char *str, size_t length,
|
||||
int unsigned_fl,
|
||||
char **endptr, int *error);
|
||||
size_t (*scan)(struct charset_info_st *, const char *b, const char *e,
|
||||
size_t (*scan)(CHARSET_INFO *, const char *b, const char *e,
|
||||
int sq);
|
||||
} MY_CHARSET_HANDLER;
|
||||
};
|
||||
|
||||
extern MY_CHARSET_HANDLER my_charset_8bit_handler;
|
||||
extern MY_CHARSET_HANDLER my_charset_ucs2_handler;
|
||||
|
||||
|
||||
/* See strings/CHARSET_INFO.txt about information on this structure */
|
||||
typedef struct charset_info_st
|
||||
struct charset_info_st
|
||||
{
|
||||
uint number;
|
||||
uint primary_number;
|
||||
|
@ -276,17 +283,17 @@ typedef struct charset_info_st
|
|||
const char *name;
|
||||
const char *comment;
|
||||
const char *tailoring;
|
||||
uchar *ctype;
|
||||
uchar *to_lower;
|
||||
uchar *to_upper;
|
||||
uchar *sort_order;
|
||||
MY_CONTRACTIONS *contractions;
|
||||
uint16 **sort_order_big;
|
||||
uint16 *tab_to_uni;
|
||||
MY_UNI_IDX *tab_from_uni;
|
||||
MY_UNICASE_INFO **caseinfo;
|
||||
uchar *state_map;
|
||||
uchar *ident_map;
|
||||
const uchar *ctype;
|
||||
const uchar *to_lower;
|
||||
const uchar *to_upper;
|
||||
const uchar *sort_order;
|
||||
const MY_CONTRACTIONS *contractions;
|
||||
const uint16 *const *sort_order_big;
|
||||
const uint16 *tab_to_uni;
|
||||
MY_UNI_IDX *tab_from_uni;
|
||||
const MY_UNICASE_INFO *const *caseinfo;
|
||||
const uchar *state_map;
|
||||
const uchar *ident_map;
|
||||
uint strxfrm_multiply;
|
||||
uchar caseup_multiply;
|
||||
uchar casedn_multiply;
|
||||
|
@ -300,41 +307,41 @@ typedef struct charset_info_st
|
|||
MY_CHARSET_HANDLER *cset;
|
||||
MY_COLLATION_HANDLER *coll;
|
||||
|
||||
} CHARSET_INFO;
|
||||
};
|
||||
#define ILLEGAL_CHARSET_INFO_NUMBER (~0U)
|
||||
|
||||
|
||||
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_bin;
|
||||
extern CHARSET_INFO my_charset_big5_chinese_ci;
|
||||
extern CHARSET_INFO my_charset_big5_bin;
|
||||
extern CHARSET_INFO my_charset_cp932_japanese_ci;
|
||||
extern CHARSET_INFO my_charset_cp932_bin;
|
||||
extern CHARSET_INFO my_charset_eucjpms_japanese_ci;
|
||||
extern CHARSET_INFO my_charset_eucjpms_bin;
|
||||
extern CHARSET_INFO my_charset_euckr_korean_ci;
|
||||
extern CHARSET_INFO my_charset_euckr_bin;
|
||||
extern CHARSET_INFO my_charset_gb2312_chinese_ci;
|
||||
extern CHARSET_INFO my_charset_gb2312_bin;
|
||||
extern CHARSET_INFO my_charset_gbk_chinese_ci;
|
||||
extern CHARSET_INFO my_charset_gbk_bin;
|
||||
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_latin1;
|
||||
extern CHARSET_INFO my_charset_latin1_german2_ci;
|
||||
extern CHARSET_INFO my_charset_latin1_bin;
|
||||
extern CHARSET_INFO my_charset_latin2_czech_ci;
|
||||
extern CHARSET_INFO my_charset_sjis_japanese_ci;
|
||||
extern CHARSET_INFO my_charset_sjis_bin;
|
||||
extern CHARSET_INFO my_charset_tis620_thai_ci;
|
||||
extern CHARSET_INFO my_charset_tis620_bin;
|
||||
extern CHARSET_INFO my_charset_ucs2_general_ci;
|
||||
extern CHARSET_INFO my_charset_ucs2_bin;
|
||||
extern CHARSET_INFO my_charset_ucs2_unicode_ci;
|
||||
extern CHARSET_INFO my_charset_ujis_japanese_ci;
|
||||
extern CHARSET_INFO my_charset_ujis_bin;
|
||||
extern CHARSET_INFO my_charset_utf8_general_ci;
|
||||
extern CHARSET_INFO my_charset_utf8_unicode_ci;
|
||||
extern CHARSET_INFO my_charset_utf8_bin;
|
||||
extern CHARSET_INFO my_charset_cp1250_czech_ci;
|
||||
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_filename;
|
||||
extern MYSQL_PLUGIN_IMPORT struct charset_info_st my_charset_bin;
|
||||
extern struct charset_info_st my_charset_bin;
|
||||
extern struct charset_info_st my_charset_big5_chinese_ci;
|
||||
extern struct charset_info_st my_charset_big5_bin;
|
||||
extern struct charset_info_st my_charset_cp932_japanese_ci;
|
||||
extern struct charset_info_st my_charset_cp932_bin;
|
||||
extern struct charset_info_st my_charset_eucjpms_japanese_ci;
|
||||
extern struct charset_info_st my_charset_eucjpms_bin;
|
||||
extern struct charset_info_st my_charset_euckr_korean_ci;
|
||||
extern struct charset_info_st my_charset_euckr_bin;
|
||||
extern struct charset_info_st my_charset_gb2312_chinese_ci;
|
||||
extern struct charset_info_st my_charset_gb2312_bin;
|
||||
extern struct charset_info_st my_charset_gbk_chinese_ci;
|
||||
extern struct charset_info_st my_charset_gbk_bin;
|
||||
extern struct charset_info_st my_charset_latin1;
|
||||
extern struct charset_info_st my_charset_latin1_german2_ci;
|
||||
extern struct charset_info_st my_charset_latin1_bin;
|
||||
extern struct charset_info_st my_charset_latin2_czech_ci;
|
||||
extern struct charset_info_st my_charset_sjis_japanese_ci;
|
||||
extern struct charset_info_st my_charset_sjis_bin;
|
||||
extern struct charset_info_st my_charset_tis620_thai_ci;
|
||||
extern struct charset_info_st my_charset_tis620_bin;
|
||||
extern struct charset_info_st my_charset_ucs2_general_ci;
|
||||
extern struct charset_info_st my_charset_ucs2_bin;
|
||||
extern struct charset_info_st my_charset_ucs2_unicode_ci;
|
||||
extern struct charset_info_st my_charset_ujis_japanese_ci;
|
||||
extern struct charset_info_st my_charset_ujis_bin;
|
||||
extern struct charset_info_st my_charset_utf8_general_ci;
|
||||
extern struct charset_info_st my_charset_utf8_unicode_ci;
|
||||
extern struct charset_info_st my_charset_utf8_bin;
|
||||
extern struct charset_info_st my_charset_cp1250_czech_ci;
|
||||
extern struct charset_info_st my_charset_filename;
|
||||
|
||||
/* declarations for simple charsets */
|
||||
extern size_t my_strnxfrm_simple(CHARSET_INFO *, uchar *, size_t,
|
||||
|
@ -353,7 +360,7 @@ extern void my_hash_sort_simple(CHARSET_INFO *cs,
|
|||
|
||||
extern size_t my_lengthsp_8bit(CHARSET_INFO *cs, const char *ptr, size_t length);
|
||||
|
||||
extern uint my_instr_simple(struct charset_info_st *,
|
||||
extern uint my_instr_simple(CHARSET_INFO *,
|
||||
const char *b, size_t b_length,
|
||||
const char *s, size_t s_length,
|
||||
my_match_t *match, uint nmatch);
|
||||
|
@ -377,7 +384,7 @@ int my_mb_ctype_mb(CHARSET_INFO *,int *, const uchar *,const uchar *);
|
|||
|
||||
size_t my_scan_8bit(CHARSET_INFO *cs, const char *b, const char *e, int sq);
|
||||
|
||||
size_t my_snprintf_8bit(struct charset_info_st *, char *to, size_t n,
|
||||
size_t my_snprintf_8bit(CHARSET_INFO *, char *to, size_t n,
|
||||
const char *fmt, ...)
|
||||
ATTRIBUTE_FORMAT(printf, 4, 5);
|
||||
|
||||
|
@ -468,7 +475,7 @@ size_t my_numcells_mb(CHARSET_INFO *, const char *b, const char *e);
|
|||
size_t my_charpos_mb(CHARSET_INFO *, const char *b, const char *e, size_t pos);
|
||||
size_t my_well_formed_len_mb(CHARSET_INFO *, const char *b, const char *e,
|
||||
size_t pos, int *error);
|
||||
uint my_instr_mb(struct charset_info_st *,
|
||||
uint my_instr_mb(CHARSET_INFO *,
|
||||
const char *b, size_t b_length,
|
||||
const char *s, size_t s_length,
|
||||
my_match_t *match, uint nmatch);
|
||||
|
@ -477,10 +484,10 @@ int my_wildcmp_unicode(CHARSET_INFO *cs,
|
|||
const char *str, const char *str_end,
|
||||
const char *wildstr, const char *wildend,
|
||||
int escape, int w_one, int w_many,
|
||||
MY_UNICASE_INFO **weights);
|
||||
MY_UNICASE_INFO *const *weights);
|
||||
|
||||
extern my_bool my_parse_charset_xml(const char *bug, size_t len,
|
||||
int (*add)(CHARSET_INFO *cs));
|
||||
int (*add)(struct charset_info_st *cs));
|
||||
extern char *my_strchr(CHARSET_INFO *cs, const char *str, const char *end,
|
||||
pchar c);
|
||||
|
||||
|
@ -496,9 +503,8 @@ uint my_charset_repertoire(CHARSET_INFO *cs);
|
|||
my_bool my_uca_have_contractions(CHARSET_INFO *cs);
|
||||
my_bool my_uca_can_be_contraction_head(CHARSET_INFO *cs, my_wc_t wc);
|
||||
my_bool my_uca_can_be_contraction_tail(CHARSET_INFO *cs, my_wc_t wc);
|
||||
uint16 *my_uca_contraction2_weight(CHARSET_INFO *cs, my_wc_t wc1, my_wc_t wc2);
|
||||
|
||||
|
||||
const uint16 *my_uca_contraction2_weight(CHARSET_INFO *cs, my_wc_t wc1,
|
||||
my_wc_t wc2);
|
||||
|
||||
|
||||
#define _MY_U 01 /* Upper case */
|
||||
|
|
|
@ -89,8 +89,8 @@ extern char *stpcpy(char *, const char *); /* For AIX with gcc 2.95.3 */
|
|||
#endif
|
||||
|
||||
/* Declared in int2str() */
|
||||
extern char NEAR _dig_vec_upper[];
|
||||
extern char NEAR _dig_vec_lower[];
|
||||
extern const char NEAR _dig_vec_upper[];
|
||||
extern const char NEAR _dig_vec_lower[];
|
||||
|
||||
/* Defined in strtod.c */
|
||||
extern const double log_10[309];
|
||||
|
|
|
@ -242,7 +242,7 @@ extern uint my_large_page_size;
|
|||
/* charsets */
|
||||
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *default_charset_info;
|
||||
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *all_charsets[256];
|
||||
extern CHARSET_INFO compiled_charsets[];
|
||||
extern struct charset_info_st compiled_charsets[];
|
||||
|
||||
/* statistics */
|
||||
extern ulong my_file_opened,my_stream_opened, my_tmp_file_created;
|
||||
|
@ -1003,7 +1003,7 @@ extern void free_charsets(void);
|
|||
extern char *get_charsets_dir(char *buf);
|
||||
extern my_bool my_charset_same(CHARSET_INFO *cs1, CHARSET_INFO *cs2);
|
||||
extern my_bool init_compiled_charsets(myf flags);
|
||||
extern void add_compiled_collation(CHARSET_INFO *cs);
|
||||
extern void add_compiled_collation(struct charset_info_st *cs);
|
||||
extern size_t escape_string_for_mysql(CHARSET_INFO *charset_info,
|
||||
char *to, size_t to_length,
|
||||
const char *from, size_t length);
|
||||
|
|
|
@ -261,7 +261,7 @@ typedef struct st_mysql
|
|||
unsigned char *connector_fd; /* ConnectorFd for SSL */
|
||||
char *host,*user,*passwd,*unix_socket,*server_version,*host_info;
|
||||
char *info, *db;
|
||||
struct charset_info_st *charset;
|
||||
const struct charset_info_st *charset;
|
||||
MYSQL_FIELD *fields;
|
||||
MEM_ROOT field_alloc;
|
||||
my_ulonglong affected_rows;
|
||||
|
|
|
@ -323,7 +323,7 @@ typedef struct st_mysql
|
|||
unsigned char *connector_fd;
|
||||
char *host,*user,*passwd,*unix_socket,*server_version,*host_info;
|
||||
char *info, *db;
|
||||
struct charset_info_st *charset;
|
||||
const struct charset_info_st *charset;
|
||||
MYSQL_FIELD *fields;
|
||||
MEM_ROOT field_alloc;
|
||||
my_ulonglong affected_rows;
|
||||
|
|
|
@ -576,7 +576,7 @@ typedef struct st_mysql_ftparser_param
|
|||
MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info);
|
||||
void *ftparser_state;
|
||||
void *mysql_ftparam;
|
||||
struct charset_info_st *cs;
|
||||
const struct charset_info_st *cs;
|
||||
const unsigned char *doc;
|
||||
mysql_ft_size_t length;
|
||||
unsigned int flags;
|
||||
|
|
|
@ -80,7 +80,7 @@ typedef struct st_mysql_ftparser_param
|
|||
MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info);
|
||||
void *ftparser_state;
|
||||
void *mysql_ftparam;
|
||||
struct charset_info_st *cs;
|
||||
const struct charset_info_st *cs;
|
||||
const unsigned char *doc;
|
||||
mysql_ft_size_t length;
|
||||
unsigned int flags;
|
||||
|
|
|
@ -24,49 +24,49 @@
|
|||
#ifdef HAVE_UCA_COLLATIONS
|
||||
|
||||
#ifdef HAVE_CHARSET_ucs2
|
||||
extern CHARSET_INFO my_charset_ucs2_icelandic_uca_ci;
|
||||
extern CHARSET_INFO my_charset_ucs2_latvian_uca_ci;
|
||||
extern CHARSET_INFO my_charset_ucs2_romanian_uca_ci;
|
||||
extern CHARSET_INFO my_charset_ucs2_slovenian_uca_ci;
|
||||
extern CHARSET_INFO my_charset_ucs2_polish_uca_ci;
|
||||
extern CHARSET_INFO my_charset_ucs2_estonian_uca_ci;
|
||||
extern CHARSET_INFO my_charset_ucs2_spanish_uca_ci;
|
||||
extern CHARSET_INFO my_charset_ucs2_swedish_uca_ci;
|
||||
extern CHARSET_INFO my_charset_ucs2_turkish_uca_ci;
|
||||
extern CHARSET_INFO my_charset_ucs2_czech_uca_ci;
|
||||
extern CHARSET_INFO my_charset_ucs2_danish_uca_ci;
|
||||
extern CHARSET_INFO my_charset_ucs2_lithuanian_uca_ci;
|
||||
extern CHARSET_INFO my_charset_ucs2_slovak_uca_ci;
|
||||
extern CHARSET_INFO my_charset_ucs2_spanish2_uca_ci;
|
||||
extern CHARSET_INFO my_charset_ucs2_roman_uca_ci;
|
||||
extern CHARSET_INFO my_charset_ucs2_persian_uca_ci;
|
||||
extern CHARSET_INFO my_charset_ucs2_esperanto_uca_ci;
|
||||
extern CHARSET_INFO my_charset_ucs2_hungarian_uca_ci;
|
||||
extern CHARSET_INFO my_charset_ucs2_croatian_uca_ci;
|
||||
extern struct charset_info_st my_charset_ucs2_icelandic_uca_ci;
|
||||
extern struct charset_info_st my_charset_ucs2_latvian_uca_ci;
|
||||
extern struct charset_info_st my_charset_ucs2_romanian_uca_ci;
|
||||
extern struct charset_info_st my_charset_ucs2_slovenian_uca_ci;
|
||||
extern struct charset_info_st my_charset_ucs2_polish_uca_ci;
|
||||
extern struct charset_info_st my_charset_ucs2_estonian_uca_ci;
|
||||
extern struct charset_info_st my_charset_ucs2_spanish_uca_ci;
|
||||
extern struct charset_info_st my_charset_ucs2_swedish_uca_ci;
|
||||
extern struct charset_info_st my_charset_ucs2_turkish_uca_ci;
|
||||
extern struct charset_info_st my_charset_ucs2_czech_uca_ci;
|
||||
extern struct charset_info_st my_charset_ucs2_danish_uca_ci;
|
||||
extern struct charset_info_st my_charset_ucs2_lithuanian_uca_ci;
|
||||
extern struct charset_info_st my_charset_ucs2_slovak_uca_ci;
|
||||
extern struct charset_info_st my_charset_ucs2_spanish2_uca_ci;
|
||||
extern struct charset_info_st my_charset_ucs2_roman_uca_ci;
|
||||
extern struct charset_info_st my_charset_ucs2_persian_uca_ci;
|
||||
extern struct charset_info_st my_charset_ucs2_esperanto_uca_ci;
|
||||
extern struct charset_info_st my_charset_ucs2_hungarian_uca_ci;
|
||||
extern struct charset_info_st my_charset_ucs2_croatian_uca_ci;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CHARSET_utf8
|
||||
extern CHARSET_INFO my_charset_utf8_icelandic_uca_ci;
|
||||
extern CHARSET_INFO my_charset_utf8_latvian_uca_ci;
|
||||
extern CHARSET_INFO my_charset_utf8_romanian_uca_ci;
|
||||
extern CHARSET_INFO my_charset_utf8_slovenian_uca_ci;
|
||||
extern CHARSET_INFO my_charset_utf8_polish_uca_ci;
|
||||
extern CHARSET_INFO my_charset_utf8_estonian_uca_ci;
|
||||
extern CHARSET_INFO my_charset_utf8_spanish_uca_ci;
|
||||
extern CHARSET_INFO my_charset_utf8_swedish_uca_ci;
|
||||
extern CHARSET_INFO my_charset_utf8_turkish_uca_ci;
|
||||
extern CHARSET_INFO my_charset_utf8_czech_uca_ci;
|
||||
extern CHARSET_INFO my_charset_utf8_danish_uca_ci;
|
||||
extern CHARSET_INFO my_charset_utf8_lithuanian_uca_ci;
|
||||
extern CHARSET_INFO my_charset_utf8_slovak_uca_ci;
|
||||
extern CHARSET_INFO my_charset_utf8_spanish2_uca_ci;
|
||||
extern CHARSET_INFO my_charset_utf8_roman_uca_ci;
|
||||
extern CHARSET_INFO my_charset_utf8_persian_uca_ci;
|
||||
extern CHARSET_INFO my_charset_utf8_esperanto_uca_ci;
|
||||
extern CHARSET_INFO my_charset_utf8_hungarian_uca_ci;
|
||||
extern CHARSET_INFO my_charset_utf8_croatian_uca_ci;
|
||||
extern struct charset_info_st my_charset_utf8_icelandic_uca_ci;
|
||||
extern struct charset_info_st my_charset_utf8_latvian_uca_ci;
|
||||
extern struct charset_info_st my_charset_utf8_romanian_uca_ci;
|
||||
extern struct charset_info_st my_charset_utf8_slovenian_uca_ci;
|
||||
extern struct charset_info_st my_charset_utf8_polish_uca_ci;
|
||||
extern struct charset_info_st my_charset_utf8_estonian_uca_ci;
|
||||
extern struct charset_info_st my_charset_utf8_spanish_uca_ci;
|
||||
extern struct charset_info_st my_charset_utf8_swedish_uca_ci;
|
||||
extern struct charset_info_st my_charset_utf8_turkish_uca_ci;
|
||||
extern struct charset_info_st my_charset_utf8_czech_uca_ci;
|
||||
extern struct charset_info_st my_charset_utf8_danish_uca_ci;
|
||||
extern struct charset_info_st my_charset_utf8_lithuanian_uca_ci;
|
||||
extern struct charset_info_st my_charset_utf8_slovak_uca_ci;
|
||||
extern struct charset_info_st my_charset_utf8_spanish2_uca_ci;
|
||||
extern struct charset_info_st my_charset_utf8_roman_uca_ci;
|
||||
extern struct charset_info_st my_charset_utf8_persian_uca_ci;
|
||||
extern struct charset_info_st my_charset_utf8_esperanto_uca_ci;
|
||||
extern struct charset_info_st my_charset_utf8_hungarian_uca_ci;
|
||||
extern struct charset_info_st my_charset_utf8_croatian_uca_ci;
|
||||
#ifdef HAVE_UTF8_GENERAL_CS
|
||||
extern CHARSET_INFO my_charset_utf8_general_cs;
|
||||
extern struct charset_info_st my_charset_utf8_general_cs;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -195,7 +195,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
|
|||
|
||||
/* Copy compiled charsets */
|
||||
for (cs=compiled_charsets; cs->name; cs++)
|
||||
add_compiled_collation(cs);
|
||||
add_compiled_collation((struct charset_info_st *) cs);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -53,21 +53,18 @@ get_collation_number_internal(const char *name)
|
|||
}
|
||||
|
||||
|
||||
static my_bool init_state_maps(CHARSET_INFO *cs)
|
||||
static my_bool init_state_maps(struct charset_info_st *cs)
|
||||
{
|
||||
uint i;
|
||||
uchar *state_map;
|
||||
uchar *ident_map;
|
||||
|
||||
if (!(cs->state_map= (uchar*) my_once_alloc(256, MYF(MY_WME))))
|
||||
if (!(cs->state_map= state_map= (uchar*) my_once_alloc(256, MYF(MY_WME))))
|
||||
return 1;
|
||||
|
||||
if (!(cs->ident_map= (uchar*) my_once_alloc(256, MYF(MY_WME))))
|
||||
if (!(cs->ident_map= ident_map= (uchar*) my_once_alloc(256, MYF(MY_WME))))
|
||||
return 1;
|
||||
|
||||
state_map= cs->state_map;
|
||||
ident_map= cs->ident_map;
|
||||
|
||||
/* Fill state_map with states to get a faster parser */
|
||||
for (i=0; i < 256 ; i++)
|
||||
{
|
||||
|
@ -118,7 +115,7 @@ static my_bool init_state_maps(CHARSET_INFO *cs)
|
|||
}
|
||||
|
||||
|
||||
static void simple_cs_init_functions(CHARSET_INFO *cs)
|
||||
static void simple_cs_init_functions(struct charset_info_st *cs)
|
||||
{
|
||||
if (cs->state & MY_CS_BINSORT)
|
||||
cs->coll= &my_collation_8bit_bin_handler;
|
||||
|
@ -130,7 +127,7 @@ static void simple_cs_init_functions(CHARSET_INFO *cs)
|
|||
|
||||
|
||||
|
||||
static int cs_copy_data(CHARSET_INFO *to, CHARSET_INFO *from)
|
||||
static int cs_copy_data(struct charset_info_st *to, CHARSET_INFO *from)
|
||||
{
|
||||
to->number= from->number ? from->number : to->number;
|
||||
|
||||
|
@ -203,7 +200,7 @@ static my_bool simple_cs_is_full(CHARSET_INFO *cs)
|
|||
|
||||
|
||||
static void
|
||||
copy_uca_collation(CHARSET_INFO *to, CHARSET_INFO *from)
|
||||
copy_uca_collation(struct charset_info_st *to, CHARSET_INFO *from)
|
||||
{
|
||||
to->cset= from->cset;
|
||||
to->coll= from->coll;
|
||||
|
@ -217,17 +214,18 @@ copy_uca_collation(CHARSET_INFO *to, CHARSET_INFO *from)
|
|||
}
|
||||
|
||||
|
||||
static int add_collation(CHARSET_INFO *cs)
|
||||
static int add_collation(struct charset_info_st *cs)
|
||||
{
|
||||
if (cs->name && (cs->number ||
|
||||
(cs->number=get_collation_number_internal(cs->name))))
|
||||
{
|
||||
if (!all_charsets[cs->number])
|
||||
struct charset_info_st *newcs;
|
||||
if (!(newcs= (struct charset_info_st*) all_charsets[cs->number]))
|
||||
{
|
||||
if (!(all_charsets[cs->number]=
|
||||
(CHARSET_INFO*) my_once_alloc(sizeof(CHARSET_INFO),MYF(0))))
|
||||
if (!(all_charsets[cs->number]= newcs=
|
||||
(struct charset_info_st*) my_once_alloc(sizeof(CHARSET_INFO),MYF(0))))
|
||||
return MY_XML_ERROR;
|
||||
bzero((void*)all_charsets[cs->number],sizeof(CHARSET_INFO));
|
||||
bzero(newcs,sizeof(CHARSET_INFO));
|
||||
}
|
||||
|
||||
if (cs->primary_number == cs->number)
|
||||
|
@ -236,12 +234,11 @@ static int add_collation(CHARSET_INFO *cs)
|
|||
if (cs->binary_number == cs->number)
|
||||
cs->state |= MY_CS_BINSORT;
|
||||
|
||||
all_charsets[cs->number]->state|= cs->state;
|
||||
newcs->state|= cs->state;
|
||||
|
||||
if (!(all_charsets[cs->number]->state & MY_CS_COMPILED))
|
||||
if (!(newcs->state & MY_CS_COMPILED))
|
||||
{
|
||||
CHARSET_INFO *newcs= all_charsets[cs->number];
|
||||
if (cs_copy_data(all_charsets[cs->number],cs))
|
||||
if (cs_copy_data(newcs,cs))
|
||||
return MY_XML_ERROR;
|
||||
|
||||
if (!strcmp(cs->csname,"ucs2") )
|
||||
|
@ -259,15 +256,15 @@ static int add_collation(CHARSET_INFO *cs)
|
|||
}
|
||||
else
|
||||
{
|
||||
uchar *sort_order= all_charsets[cs->number]->sort_order;
|
||||
simple_cs_init_functions(all_charsets[cs->number]);
|
||||
const uchar *sort_order= newcs->sort_order;
|
||||
simple_cs_init_functions(newcs);
|
||||
newcs->mbminlen= 1;
|
||||
newcs->mbmaxlen= 1;
|
||||
if (simple_cs_is_full(all_charsets[cs->number]))
|
||||
if (simple_cs_is_full(newcs))
|
||||
{
|
||||
all_charsets[cs->number]->state |= MY_CS_LOADED;
|
||||
newcs->state |= MY_CS_LOADED;
|
||||
}
|
||||
all_charsets[cs->number]->state|= MY_CS_AVAILABLE;
|
||||
newcs->state|= MY_CS_AVAILABLE;
|
||||
|
||||
/*
|
||||
Check if case sensitive sort order: A < a < B.
|
||||
|
@ -277,12 +274,12 @@ static int add_collation(CHARSET_INFO *cs)
|
|||
*/
|
||||
if (sort_order && sort_order['A'] < sort_order['a'] &&
|
||||
sort_order['a'] < sort_order['B'])
|
||||
all_charsets[cs->number]->state|= MY_CS_CSSORT;
|
||||
newcs->state|= MY_CS_CSSORT;
|
||||
|
||||
if (my_charset_is_8bit_pure_ascii(all_charsets[cs->number]))
|
||||
all_charsets[cs->number]->state|= MY_CS_PUREASCII;
|
||||
if (my_charset_is_8bit_pure_ascii(newcs))
|
||||
newcs->state|= MY_CS_PUREASCII;
|
||||
if (!my_charset_is_ascii_compatible(cs))
|
||||
all_charsets[cs->number]->state|= MY_CS_NONASCII;
|
||||
newcs->state|= MY_CS_NONASCII;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -296,16 +293,15 @@ static int add_collation(CHARSET_INFO *cs)
|
|||
If a character set was compiled, this information
|
||||
will get lost and overwritten in add_compiled_collation().
|
||||
*/
|
||||
CHARSET_INFO *dst= all_charsets[cs->number];
|
||||
dst->number= cs->number;
|
||||
newcs->number= cs->number;
|
||||
if (cs->comment)
|
||||
if (!(dst->comment= my_once_strdup(cs->comment,MYF(MY_WME))))
|
||||
if (!(newcs->comment= my_once_strdup(cs->comment,MYF(MY_WME))))
|
||||
return MY_XML_ERROR;
|
||||
if (cs->csname)
|
||||
if (!(dst->csname= my_once_strdup(cs->csname,MYF(MY_WME))))
|
||||
if (!(newcs->csname= my_once_strdup(cs->csname,MYF(MY_WME))))
|
||||
return MY_XML_ERROR;
|
||||
if (cs->name)
|
||||
if (!(dst->name= my_once_strdup(cs->name,MYF(MY_WME))))
|
||||
if (!(newcs->name= my_once_strdup(cs->name,MYF(MY_WME))))
|
||||
return MY_XML_ERROR;
|
||||
}
|
||||
cs->number= 0;
|
||||
|
@ -390,7 +386,7 @@ char *get_charsets_dir(char *buf)
|
|||
CHARSET_INFO *all_charsets[256]={NULL};
|
||||
CHARSET_INFO *default_charset_info = &my_charset_latin1;
|
||||
|
||||
void add_compiled_collation(CHARSET_INFO *cs)
|
||||
void add_compiled_collation(struct charset_info_st *cs)
|
||||
{
|
||||
all_charsets[cs->number]= cs;
|
||||
cs->state|= MY_CS_AVAILABLE;
|
||||
|
@ -416,7 +412,7 @@ static my_bool init_available_charsets(myf myflags)
|
|||
*/
|
||||
if (!charset_initialized)
|
||||
{
|
||||
CHARSET_INFO **cs;
|
||||
struct charset_info_st **cs;
|
||||
/*
|
||||
To make things thread safe we are not allowing other threads to interfere
|
||||
while we may changing the cs_info_table
|
||||
|
@ -428,8 +424,9 @@ static my_bool init_available_charsets(myf myflags)
|
|||
init_compiled_charsets(myflags);
|
||||
|
||||
/* Copy compiled charsets */
|
||||
for (cs=all_charsets;
|
||||
cs < all_charsets+array_elements(all_charsets)-1 ;
|
||||
for (cs= (struct charset_info_st**) all_charsets;
|
||||
cs < (struct charset_info_st**) all_charsets +
|
||||
array_elements(all_charsets)-1 ;
|
||||
cs++)
|
||||
{
|
||||
if (*cs)
|
||||
|
@ -496,9 +493,9 @@ const char *get_charset_name(uint charset_number)
|
|||
static CHARSET_INFO *get_internal_charset(uint cs_number, myf flags)
|
||||
{
|
||||
char buf[FN_REFLEN];
|
||||
CHARSET_INFO *cs;
|
||||
struct charset_info_st *cs;
|
||||
|
||||
if ((cs= all_charsets[cs_number]))
|
||||
if ((cs= (struct charset_info_st*) all_charsets[cs_number]))
|
||||
{
|
||||
if (cs->state & MY_CS_READY) /* if CS is already initialized */
|
||||
return cs;
|
||||
|
|
|
@ -3241,7 +3241,7 @@ mysql_get_server_version(MYSQL *mysql)
|
|||
*/
|
||||
int STDCALL mysql_set_character_set(MYSQL *mysql, const char *cs_name)
|
||||
{
|
||||
struct charset_info_st *cs;
|
||||
CHARSET_INFO *cs;
|
||||
const char *save_csdir= charsets_dir;
|
||||
|
||||
if (mysql->options.charset_dir)
|
||||
|
|
|
@ -756,7 +756,7 @@ public:
|
|||
virtual uchar *get_value(Item *item)=0;
|
||||
void sort()
|
||||
{
|
||||
my_qsort2(base,used_count,size,compare,collation);
|
||||
my_qsort2(base,used_count,size,compare,(void*)collation);
|
||||
}
|
||||
int find(Item *item);
|
||||
|
||||
|
|
|
@ -3187,7 +3187,7 @@ extern "C" unsigned long thd_get_thread_id(const MYSQL_THD thd)
|
|||
|
||||
|
||||
#ifdef INNODB_COMPATIBILITY_HOOKS
|
||||
extern "C" struct charset_info_st *thd_charset(MYSQL_THD thd)
|
||||
extern "C" const struct charset_info_st *thd_charset(MYSQL_THD thd)
|
||||
{
|
||||
return(thd->charset());
|
||||
}
|
||||
|
|
|
@ -790,9 +790,9 @@ int MYSQLlex(void *arg, void *yythd)
|
|||
Lex_input_stream *lip= & thd->m_parser_state->m_lip;
|
||||
LEX *lex= thd->lex;
|
||||
YYSTYPE *yylval=(YYSTYPE*) arg;
|
||||
CHARSET_INFO *cs= thd->charset();
|
||||
uchar *state_map= cs->state_map;
|
||||
uchar *ident_map= cs->ident_map;
|
||||
CHARSET_INFO *const cs= thd->charset();
|
||||
const uchar *const state_map= cs->state_map;
|
||||
const uchar *const ident_map= cs->ident_map;
|
||||
|
||||
LINT_INIT(c);
|
||||
lip->yylval=yylval; // The global state
|
||||
|
|
|
@ -592,7 +592,7 @@ FT_INFO * maria_ft_init_boolean_search(MARIA_HA *info, uint keynr,
|
|||
sizeof(FTB_WORD *)*ftb->queue.elements);
|
||||
memcpy(ftb->list, ftb->queue.root+1, sizeof(FTB_WORD *)*ftb->queue.elements);
|
||||
my_qsort2(ftb->list, ftb->queue.elements, sizeof(FTB_WORD *),
|
||||
(qsort2_cmp)FTB_WORD_cmp_list, ftb->charset);
|
||||
(qsort2_cmp)FTB_WORD_cmp_list, (void*) ftb->charset);
|
||||
if (ftb->queue.elements<2) ftb->with_scan &= ~FTB_FLAG_TRUNC;
|
||||
ftb->state=READY;
|
||||
return ftb;
|
||||
|
|
|
@ -254,7 +254,8 @@ void maria_ft_parse_init(TREE *wtree, CHARSET_INFO *cs)
|
|||
{
|
||||
DBUG_ENTER("maria_ft_parse_init");
|
||||
if (!is_tree_inited(wtree))
|
||||
init_tree(wtree,0,0,sizeof(FT_WORD),(qsort_cmp2)&FT_WORD_cmp,0,NULL, cs);
|
||||
init_tree(wtree,0,0,sizeof(FT_WORD),(qsort_cmp2)&FT_WORD_cmp,0, NULL,
|
||||
(void*) cs);
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
|
|
@ -389,7 +389,7 @@ int _ma_prefix_search(const MARIA_KEY *key, const MARIA_PAGE *ma_page,
|
|||
uint length_pack;
|
||||
MARIA_KEYDEF *keyinfo= key->keyinfo;
|
||||
MARIA_SHARE *share= keyinfo->share;
|
||||
uchar *sort_order= keyinfo->seg->charset->sort_order;
|
||||
const uchar *sort_order= keyinfo->seg->charset->sort_order;
|
||||
DBUG_ENTER("_ma_prefix_search");
|
||||
|
||||
LINT_INIT(length);
|
||||
|
@ -1883,7 +1883,7 @@ _ma_calc_var_pack_key_length(const MARIA_KEY *int_key, uint nod_flag,
|
|||
uint key_length,ref_length,org_key_length=0,
|
||||
length_pack,new_key_length,diff_flag,pack_marker;
|
||||
const uchar *key, *start, *end, *key_end;
|
||||
uchar *sort_order;
|
||||
const uchar *sort_order;
|
||||
my_bool same_length;
|
||||
MARIA_KEYDEF *keyinfo= int_key->keyinfo;
|
||||
|
||||
|
|
|
@ -593,7 +593,7 @@ FT_INFO * ft_init_boolean_search(MI_INFO *info, uint keynr, uchar *query,
|
|||
sizeof(FTB_WORD *)*ftb->queue.elements);
|
||||
memcpy(ftb->list, ftb->queue.root+1, sizeof(FTB_WORD *)*ftb->queue.elements);
|
||||
my_qsort2(ftb->list, ftb->queue.elements, sizeof(FTB_WORD *),
|
||||
(qsort2_cmp)FTB_WORD_cmp_list, ftb->charset);
|
||||
(qsort2_cmp)FTB_WORD_cmp_list, (void*) ftb->charset);
|
||||
if (ftb->queue.elements<2) ftb->with_scan &= ~FTB_FLAG_TRUNC;
|
||||
ftb->state=READY;
|
||||
return ftb;
|
||||
|
|
|
@ -252,7 +252,8 @@ void ft_parse_init(TREE *wtree, CHARSET_INFO *cs)
|
|||
{
|
||||
DBUG_ENTER("ft_parse_init");
|
||||
if (!is_tree_inited(wtree))
|
||||
init_tree(wtree,0,0,sizeof(FT_WORD),(qsort_cmp2)&FT_WORD_cmp,0,NULL, cs);
|
||||
init_tree(wtree,0,0,sizeof(FT_WORD),(qsort_cmp2)&FT_WORD_cmp,0,NULL,
|
||||
(void*) cs);
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
|
|
@ -300,7 +300,7 @@ int _mi_prefix_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
|
|||
uint prefix_len,suffix_len;
|
||||
int key_len_skip, seg_len_pack, key_len_left;
|
||||
uchar *end, *kseg, *vseg;
|
||||
uchar *sort_order=keyinfo->seg->charset->sort_order;
|
||||
const uchar *sort_order= keyinfo->seg->charset->sort_order;
|
||||
uchar tt_buff[HA_MAX_KEY_BUFF+2], *t_buff=tt_buff+2;
|
||||
uchar *UNINIT_VAR(saved_from), *UNINIT_VAR(saved_to);
|
||||
uchar *UNINIT_VAR(saved_vseg);
|
||||
|
@ -1471,7 +1471,8 @@ _mi_calc_var_pack_key_length(MI_KEYDEF *keyinfo,uint nod_flag,uchar *next_key,
|
|||
int length;
|
||||
uint key_length,ref_length,org_key_length=0,
|
||||
length_pack,new_key_length,diff_flag,pack_marker;
|
||||
uchar *start,*end,*key_end,*sort_order;
|
||||
uchar *start,*end,*key_end;
|
||||
const uchar *sort_order;
|
||||
my_bool same_length;
|
||||
|
||||
length_pack=s_temp->ref_length=s_temp->n_ref_length=s_temp->n_length=0;
|
||||
|
|
|
@ -396,7 +396,7 @@ void XTToken::expectNumber(XTThreadPtr self)
|
|||
struct charset_info_st;
|
||||
|
||||
class XTTokenizer {
|
||||
struct charset_info_st *tkn_charset;
|
||||
const struct charset_info_st *tkn_charset;
|
||||
char *tkn_cstring;
|
||||
char *tkn_curr_pos;
|
||||
XTToken *tkn_current;
|
||||
|
@ -1324,7 +1324,7 @@ void XTParseTable::parseDropIndex(XTThreadPtr self)
|
|||
class XTCreateTable : public XTParseTable {
|
||||
public:
|
||||
bool ct_convert;
|
||||
struct charset_info_st *ct_charset;
|
||||
const struct charset_info_st *ct_charset;
|
||||
XTPathStrPtr ct_tab_path;
|
||||
u_int ct_contraint_no;
|
||||
XTDDTable *ct_curr_table;
|
||||
|
|
|
@ -1552,7 +1552,7 @@ static int pbxt_prepare(handlerton *hton, THD *thd, bool all)
|
|||
return err;
|
||||
}
|
||||
|
||||
static XTThreadPtr ha_temp_open_global_database(handlerton *hton, THD **ret_thd, int *temp_thread, char *thread_name, int *err)
|
||||
static XTThreadPtr ha_temp_open_global_database(handlerton *hton, THD **ret_thd, int *temp_thread, const char *thread_name, int *err)
|
||||
{
|
||||
THD *thd;
|
||||
XTThreadPtr self = NULL;
|
||||
|
@ -1947,7 +1947,7 @@ static int pbxt_statistics_fill_table(THD *thd, TABLE_LIST *tables, COND *cond)
|
|||
xt_ha_open_database_of_table(self, (XTPathStrPtr) NULL);
|
||||
}
|
||||
|
||||
err = myxt_statistics_fill_table(self, thd, tables, cond, system_charset_info);
|
||||
err = myxt_statistics_fill_table(self, thd, tables, cond, (void*) system_charset_info);
|
||||
}
|
||||
catch_(a) {
|
||||
err = xt_ha_pbxt_thread_error_for_mysql(thd, self, FALSE);
|
||||
|
|
|
@ -69,17 +69,17 @@ void myxt_free_dictionary(XTThreadPtr self, XTDictionary *dic);
|
|||
void myxt_move_dictionary(XTDictionaryPtr dic, XTDictionaryPtr source_dic);
|
||||
XTDDTable *myxt_create_table_from_table(XTThreadPtr self, STRUCT_TABLE *my_tab);
|
||||
|
||||
void myxt_static_convert_identifier(XTThreadPtr self, struct charset_info_st *cs, char *from, char *to, size_t to_len);
|
||||
char *myxt_convert_identifier(XTThreadPtr self, struct charset_info_st *cs, char *from);
|
||||
void myxt_static_convert_identifier(XTThreadPtr self, const struct charset_info_st *cs, char *from, char *to, size_t to_len);
|
||||
char *myxt_convert_identifier(XTThreadPtr self, const struct charset_info_st *cs, char *from);
|
||||
void myxt_static_convert_table_name(XTThreadPtr self, char *from, char *to, size_t to_len);
|
||||
void myxt_static_convert_file_name(char *from, char *to, size_t to_len);
|
||||
char *myxt_convert_table_name(XTThreadPtr self, char *from);
|
||||
int myxt_strcasecmp(char * a, char *b);
|
||||
int myxt_isspace(struct charset_info_st *cs, char a);
|
||||
int myxt_ispunct(struct charset_info_st *cs, char a);
|
||||
int myxt_isdigit(struct charset_info_st *cs, char a);
|
||||
int myxt_isspace(const struct charset_info_st *cs, char a);
|
||||
int myxt_ispunct(const struct charset_info_st *cs, char a);
|
||||
int myxt_isdigit(const struct charset_info_st *cs, char a);
|
||||
|
||||
struct charset_info_st *myxt_getcharset(bool convert);
|
||||
const struct charset_info_st *myxt_getcharset(bool convert);
|
||||
|
||||
void *myxt_create_thread();
|
||||
void myxt_destroy_thread(void *thread, xtBool end_threads);
|
||||
|
|
|
@ -774,7 +774,7 @@ extern xtBool pbxt_crash_debug;
|
|||
#define MX_ULONG_T uint32_t
|
||||
#define MX_ULONGLONG_T uint64_t
|
||||
#define MX_LONGLONG_T uint64_t
|
||||
#define MX_CHARSET_INFO struct charset_info_st
|
||||
#define MX_CHARSET_INFO const struct charset_info_st
|
||||
#define MX_CONST_CHARSET_INFO const struct charset_info_st
|
||||
#define MX_CONST const
|
||||
#define MX_BITMAP MyBitmap
|
||||
|
@ -865,7 +865,7 @@ extern "C" void session_mark_transaction_to_rollback(Session *session, bool all)
|
|||
#define MX_ULONGLONG_T ulonglong
|
||||
#define MX_LONGLONG_T longlong
|
||||
#define MX_CHARSET_INFO CHARSET_INFO
|
||||
#define MX_CONST_CHARSET_INFO struct charset_info_st
|
||||
#define MX_CONST_CHARSET_INFO const struct charset_info_st
|
||||
#define MX_CONST
|
||||
#define MX_BITMAP MY_BITMAP
|
||||
#define MX_BIT_SIZE() n_bits
|
||||
|
|
|
@ -3302,8 +3302,9 @@ btr_estimate_number_of_different_key_vals(
|
|||
n_recs++;
|
||||
for (j = 0; j <= n_cols; j++) {
|
||||
ulint f_len;
|
||||
rec_get_nth_field(rec, offsets_rec,
|
||||
j, &f_len);
|
||||
(void) rec_get_nth_field(rec,
|
||||
offsets_rec,
|
||||
j, &f_len);
|
||||
if (f_len == UNIV_SQL_NULL)
|
||||
break;
|
||||
|
||||
|
|
|
@ -3140,7 +3140,7 @@ skip_info:
|
|||
mach_write_to_4(page + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID, id);
|
||||
|
||||
for (i = 0; (ulint) i < n_index; i++) {
|
||||
if (offset / UNIV_PAGE_SIZE == root_page[i]) {
|
||||
if ((ulint) (offset / UNIV_PAGE_SIZE) == root_page[i]) {
|
||||
/* this is index root page */
|
||||
mach_write_to_4(page + FIL_PAGE_DATA + PAGE_BTR_SEG_LEAF
|
||||
+ FSEG_HDR_SPACE, id);
|
||||
|
|
|
@ -23,15 +23,15 @@
|
|||
#define ROW16_LEN 8
|
||||
#define MAX_BUF 64*1024
|
||||
|
||||
static CHARSET_INFO all_charsets[256];
|
||||
static struct charset_info_st all_charsets[256];
|
||||
|
||||
|
||||
void
|
||||
print_array(FILE *f, const char *set, const char *name, uchar *a, int n)
|
||||
print_array(FILE *f, const char *set, const char *name, const uchar *a, int n)
|
||||
{
|
||||
int i;
|
||||
|
||||
fprintf(f,"uchar %s_%s[] = {\n", name, set);
|
||||
fprintf(f,"static const uchar %s_%s[] = {\n", name, set);
|
||||
|
||||
for (i=0 ;i<n ; i++)
|
||||
{
|
||||
|
@ -44,11 +44,11 @@ print_array(FILE *f, const char *set, const char *name, uchar *a, int n)
|
|||
|
||||
|
||||
void
|
||||
print_array16(FILE *f, const char *set, const char *name, uint16 *a, int n)
|
||||
print_array16(FILE *f, const char *set, const char *name, const uint16 *a, int n)
|
||||
{
|
||||
int i;
|
||||
|
||||
fprintf(f,"uint16 %s_%s[] = {\n", name, set);
|
||||
fprintf(f,"static const uint16 %s_%s[] = {\n", name, set);
|
||||
|
||||
for (i=0 ;i<n ; i++)
|
||||
{
|
||||
|
@ -80,7 +80,7 @@ char *mdup(const char *src, uint len)
|
|||
return dst;
|
||||
}
|
||||
|
||||
static void simple_cs_copy_data(CHARSET_INFO *to, CHARSET_INFO *from)
|
||||
static void simple_cs_copy_data(struct charset_info_st *to, CHARSET_INFO *from)
|
||||
{
|
||||
to->number= from->number ? from->number : to->number;
|
||||
to->state|= from->state;
|
||||
|
@ -122,7 +122,7 @@ static my_bool simple_cs_is_full(CHARSET_INFO *cs)
|
|||
(cs->sort_order || (cs->state & MY_CS_BINSORT))));
|
||||
}
|
||||
|
||||
static int add_collation(CHARSET_INFO *cs)
|
||||
static int add_collation(struct charset_info_st *cs)
|
||||
{
|
||||
if (cs->name && (cs->number || (cs->number=get_charset_number(cs->name))))
|
||||
{
|
||||
|
@ -329,7 +329,7 @@ main(int argc, char **argv __attribute__((unused)))
|
|||
}
|
||||
}
|
||||
|
||||
fprintf(f,"CHARSET_INFO compiled_charsets[] = {\n");
|
||||
fprintf(f,"struct charset_info_st compiled_charsets[] = {\n");
|
||||
for (cs=all_charsets; cs < all_charsets+256; cs++)
|
||||
{
|
||||
if (simple_cs_is_full(cs))
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
#define big5head(e) ((uchar)(e>>8))
|
||||
#define big5tail(e) ((uchar)(e&0xff))
|
||||
|
||||
static uchar NEAR ctype_big5[257] =
|
||||
static const uchar NEAR ctype_big5[257] =
|
||||
{
|
||||
0, /* For standard library */
|
||||
32,32,32,32,32,32,32,32,32,40,40,40,40,40,32,32,
|
||||
|
@ -68,7 +68,7 @@ static uchar NEAR ctype_big5[257] =
|
|||
3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,
|
||||
};
|
||||
|
||||
static uchar NEAR to_lower_big5[]=
|
||||
static const uchar NEAR to_lower_big5[]=
|
||||
{
|
||||
'\000','\001','\002','\003','\004','\005','\006','\007',
|
||||
'\010','\011','\012','\013','\014','\015','\016','\017',
|
||||
|
@ -104,7 +104,7 @@ static uchar NEAR to_lower_big5[]=
|
|||
(uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377',
|
||||
};
|
||||
|
||||
static uchar NEAR to_upper_big5[]=
|
||||
static const uchar NEAR to_upper_big5[]=
|
||||
{
|
||||
'\000','\001','\002','\003','\004','\005','\006','\007',
|
||||
'\010','\011','\012','\013','\014','\015','\016','\017',
|
||||
|
@ -140,7 +140,7 @@ static uchar NEAR to_upper_big5[]=
|
|||
(uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377',
|
||||
};
|
||||
|
||||
static uchar NEAR sort_order_big5[]=
|
||||
static const uchar NEAR sort_order_big5[]=
|
||||
{
|
||||
'\000','\001','\002','\003','\004','\005','\006','\007',
|
||||
'\010','\011','\012','\013','\014','\015','\016','\017',
|
||||
|
@ -471,7 +471,7 @@ static uint mbcharlen_big5(CHARSET_INFO *cs __attribute__((unused)), uint c)
|
|||
|
||||
|
||||
/* page 0 0xA140-0xC7FC */
|
||||
static uint16 tab_big5_uni0[]={
|
||||
static const uint16 tab_big5_uni0[]={
|
||||
0x3000,0xFF0C,0x3001,0x3002,0xFF0E,0x2022,0xFF1B,0xFF1A,
|
||||
0xFF1F,0xFF01,0xFE30,0x2026,0x2025,0xFE50,0xFF64,0xFE52,
|
||||
0x00B7,0xFE54,0xFE55,0xFE56,0xFE57,0xFF5C,0x2013,0xFE31,
|
||||
|
@ -1714,7 +1714,7 @@ static uint16 tab_big5_uni0[]={
|
|||
0x2479,0x247A,0x247B,0x247C,0x247D};
|
||||
|
||||
/* page 1 0xC940-0xF9DC */
|
||||
static uint16 tab_big5_uni1[]={
|
||||
static const uint16 tab_big5_uni1[]={
|
||||
0x4E42,0x4E5C,0x51F5,0x531A,0x5382,0x4E07,0x4E0C,0x4E47,
|
||||
0x4E8D,0x56D7,0xFA0C,0x5C6E,0x5F73,0x4E0F,0x5187,0x4E0E,
|
||||
0x4E2E,0x4E93,0x4EC2,0x4EC9,0x4EC8,0x5198,0x52FC,0x536C,
|
||||
|
@ -3282,7 +3282,7 @@ static int func_big5_uni_onechar(int code){
|
|||
|
||||
|
||||
/* page 0 0x00A2-0x00F7 */
|
||||
static uint16 tab_uni_big50[]={
|
||||
static const uint16 tab_uni_big50[]={
|
||||
0xA246,0xA247, 0,0xA244, 0,0xA1B1, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,0xA258,0xA1D3,
|
||||
0, 0, 0, 0, 0,0xA150, 0, 0,
|
||||
|
@ -3296,7 +3296,7 @@ static uint16 tab_uni_big50[]={
|
|||
0, 0, 0, 0, 0,0xA1D2};
|
||||
|
||||
/* page 1 0x02C7-0x0451 */
|
||||
static uint16 tab_uni_big51[]={
|
||||
static const uint16 tab_uni_big51[]={
|
||||
0xA3BE, 0,0xA3BC,0xA3BD,0xA3BF, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0,0xA3BB, 0, 0, 0, 0, 0,
|
||||
|
@ -3349,7 +3349,7 @@ static uint16 tab_uni_big51[]={
|
|||
0xC7E8, 0,0xC7CE};
|
||||
|
||||
/* page 2 0x2013-0x22BF */
|
||||
static uint16 tab_uni_big52[]={
|
||||
static const uint16 tab_uni_big52[]={
|
||||
0xA156,0xA158, 0, 0, 0,0xA1A5,0xA1A6, 0,
|
||||
0,0xA1A7,0xA1A8, 0, 0, 0, 0,0xA145,
|
||||
0, 0,0xA14C,0xA14B, 0, 0, 0, 0,
|
||||
|
@ -3438,7 +3438,7 @@ static uint16 tab_uni_big52[]={
|
|||
0, 0, 0, 0,0xA1E9};
|
||||
|
||||
/* page 3 0x2460-0x2642 */
|
||||
static uint16 tab_uni_big53[]={
|
||||
static const uint16 tab_uni_big53[]={
|
||||
0xC7E9,0xC7EA,0xC7EB,0xC7EC,0xC7ED,0xC7EE,0xC7EF,0xC7F0,
|
||||
0xC7F1,0xC7F2, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0,0xC7F3,0xC7F4,0xC7F5,0xC7F6,
|
||||
|
@ -3502,7 +3502,7 @@ static uint16 tab_uni_big53[]={
|
|||
0xA1F0,0xA1F2,0xA1F1};
|
||||
|
||||
/* page 4 0x3000-0x3129 */
|
||||
static uint16 tab_uni_big54[]={
|
||||
static const uint16 tab_uni_big54[]={
|
||||
0xA140,0xA142,0xA143,0xA1B2, 0,0xC6A4, 0, 0,
|
||||
0xA171,0xA172,0xA16D,0xA16E,0xA175,0xA176,0xA179,0xA17A,
|
||||
0xA169,0xA16A,0xA245, 0,0xA165,0xA166, 0, 0,
|
||||
|
@ -3543,11 +3543,11 @@ static uint16 tab_uni_big54[]={
|
|||
0xA3B9,0xA3BA};
|
||||
|
||||
/* page 5 0x32A3-0x32A3 */
|
||||
static uint16 tab_uni_big55[]={
|
||||
static const uint16 tab_uni_big55[]={
|
||||
0xA1C0};
|
||||
|
||||
/* page 6 0x338E-0x33D5 */
|
||||
static uint16 tab_uni_big56[]={
|
||||
static const uint16 tab_uni_big56[]={
|
||||
0xA255,0xA256, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,0xA250,0xA251,
|
||||
0xA252, 0, 0,0xA254, 0, 0, 0, 0,
|
||||
|
@ -3560,7 +3560,7 @@ static uint16 tab_uni_big56[]={
|
|||
};
|
||||
|
||||
/* page 7 0x4E00-0x9483 */
|
||||
static uint16 tab_uni_big57[]={
|
||||
static const uint16 tab_uni_big57[]={
|
||||
0xA440,0xA442, 0,0xA443, 0, 0, 0,0xC945,
|
||||
0xA456,0xA454,0xA457,0xA455,0xC946,0xA4A3,0xC94F,0xC94D,
|
||||
0xA4A2,0xA4A1, 0, 0,0xA542,0xA541,0xA540, 0,
|
||||
|
@ -5820,7 +5820,7 @@ static uint16 tab_uni_big57[]={
|
|||
0xF9C0,0xF9C1,0xF9BF,0xF9C9};
|
||||
|
||||
/* page 8 0x9577-0x9FA4 */
|
||||
static uint16 tab_uni_big58[]={
|
||||
static const uint16 tab_uni_big58[]={
|
||||
0xAAF8, 0, 0,0xD844,0xDC78,0xE8A5,0xF376, 0,
|
||||
0,0xAAF9, 0,0xADAC,0xB07B, 0, 0,0xD845,
|
||||
0,0xD846,0xB3AC, 0,0xB67D,0xDC7A,0xDC79,0xB6A3,
|
||||
|
@ -6149,11 +6149,11 @@ static uint16 tab_uni_big58[]={
|
|||
0,0xEFB6, 0,0xF7CF, 0,0xF9A1};
|
||||
|
||||
/* page 9 0xFA0C-0xFA0D */
|
||||
static uint16 tab_uni_big59[]={
|
||||
static const uint16 tab_uni_big59[]={
|
||||
0xC94A,0xDDFC};
|
||||
|
||||
/* page 10 0xFE30-0xFFFD */
|
||||
static uint16 tab_uni_big510[]={
|
||||
static const uint16 tab_uni_big510[]={
|
||||
0xA14A,0xA157, 0,0xA159,0xA15B,0xA15F,0xA160,0xA163,
|
||||
0xA164,0xA167,0xA168,0xA16B,0xA16C,0xA16F,0xA170,0xA173,
|
||||
0xA174,0xA177,0xA178,0xA17B,0xA17C, 0, 0, 0,
|
||||
|
@ -6377,7 +6377,7 @@ static MY_CHARSET_HANDLER my_charset_big5_handler=
|
|||
my_scan_8bit
|
||||
};
|
||||
|
||||
CHARSET_INFO my_charset_big5_chinese_ci=
|
||||
struct charset_info_st my_charset_big5_chinese_ci=
|
||||
{
|
||||
1,0,0, /* number */
|
||||
MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM, /* state */
|
||||
|
@ -6410,7 +6410,7 @@ CHARSET_INFO my_charset_big5_chinese_ci=
|
|||
};
|
||||
|
||||
|
||||
CHARSET_INFO my_charset_big5_bin=
|
||||
struct charset_info_st my_charset_big5_bin=
|
||||
{
|
||||
84,0,0, /* number */
|
||||
MY_CS_COMPILED|MY_CS_BINSORT, /* state */
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "m_string.h"
|
||||
#include "m_ctype.h"
|
||||
|
||||
static uchar ctype_bin[]=
|
||||
static const uchar ctype_bin[]=
|
||||
{
|
||||
0,
|
||||
32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
|
||||
|
@ -46,7 +46,7 @@ static uchar ctype_bin[]=
|
|||
|
||||
/* Dummy array for toupper / tolower / sortorder */
|
||||
|
||||
static uchar bin_char_array[] =
|
||||
static const uchar bin_char_array[] =
|
||||
{
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
||||
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
||||
|
@ -68,7 +68,7 @@ static uchar bin_char_array[] =
|
|||
|
||||
|
||||
static my_bool
|
||||
my_coll_init_8bit_bin(CHARSET_INFO *cs,
|
||||
my_coll_init_8bit_bin(struct charset_info_st *cs,
|
||||
void *(*alloc)(size_t) __attribute__((unused)))
|
||||
{
|
||||
cs->max_sort_char=255;
|
||||
|
@ -549,7 +549,7 @@ static MY_CHARSET_HANDLER my_charset_handler=
|
|||
};
|
||||
|
||||
|
||||
CHARSET_INFO my_charset_bin =
|
||||
struct charset_info_st my_charset_bin =
|
||||
{
|
||||
63,0,0, /* number */
|
||||
MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_PRIMARY,/* state */
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* .configure. mbmaxlen_cp932=2
|
||||
*/
|
||||
|
||||
static uchar NEAR ctype_cp932[257] =
|
||||
static const uchar NEAR ctype_cp932[257] =
|
||||
{
|
||||
0, /* For standard library */
|
||||
0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, /* NUL ^A - ^G */
|
||||
|
@ -68,7 +68,7 @@ static uchar NEAR ctype_cp932[257] =
|
|||
0020, 0020, 0020, 0020, 0020, 0000, 0000, 0000
|
||||
};
|
||||
|
||||
static uchar NEAR to_lower_cp932[]=
|
||||
static const uchar NEAR to_lower_cp932[]=
|
||||
{
|
||||
'\000','\001','\002','\003','\004','\005','\006','\007',
|
||||
'\010','\011','\012','\013','\014','\015','\016','\017',
|
||||
|
@ -104,7 +104,7 @@ static uchar NEAR to_lower_cp932[]=
|
|||
(uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377'
|
||||
};
|
||||
|
||||
static uchar NEAR to_upper_cp932[]=
|
||||
static const uchar NEAR to_upper_cp932[]=
|
||||
{
|
||||
'\000','\001','\002','\003','\004','\005','\006','\007',
|
||||
'\010','\011','\012','\013','\014','\015','\016','\017',
|
||||
|
@ -140,7 +140,7 @@ static uchar NEAR to_upper_cp932[]=
|
|||
(uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377'
|
||||
};
|
||||
|
||||
static uchar NEAR sort_order_cp932[]=
|
||||
static const uchar NEAR sort_order_cp932[]=
|
||||
{
|
||||
'\000','\001','\002','\003','\004','\005','\006','\007',
|
||||
'\010','\011','\012','\013','\014','\015','\016','\017',
|
||||
|
@ -377,7 +377,7 @@ static my_bool my_like_range_cp932(CHARSET_INFO *cs __attribute__((unused)),
|
|||
}
|
||||
|
||||
/* page 0 0x00A1-0x00DF */
|
||||
static uint16 tab_cp932_uni0[]={
|
||||
static const uint16 tab_cp932_uni0[]={
|
||||
0xFF61,0xFF62,0xFF63,0xFF64,0xFF65,0xFF66,0xFF67,0xFF68,
|
||||
0xFF69,0xFF6A,0xFF6B,0xFF6C,0xFF6D,0xFF6E,0xFF6F,0xFF70,
|
||||
0xFF71,0xFF72,0xFF73,0xFF74,0xFF75,0xFF76,0xFF77,0xFF78,
|
||||
|
@ -388,7 +388,7 @@ static uint16 tab_cp932_uni0[]={
|
|||
0xFF99,0xFF9A,0xFF9B,0xFF9C,0xFF9D,0xFF9E,0xFF9F};
|
||||
|
||||
/* page 1 0x8140-0x84BE */
|
||||
static uint16 tab_cp932_uni1[]={
|
||||
static const uint16 tab_cp932_uni1[]={
|
||||
0x3000,0x3001,0x3002,0xFF0C,0xFF0E,0x30FB,0xFF1A,0xFF1B,
|
||||
0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,
|
||||
0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,
|
||||
|
@ -503,7 +503,7 @@ static uint16 tab_cp932_uni1[]={
|
|||
0x2537,0x253F,0x251D,0x2530,0x2525,0x2538,0x2542};
|
||||
|
||||
/* page 2 0x8740-0x879C - NEC Row 13 */
|
||||
static uint16 tab_cp932_uni2[]={
|
||||
static const uint16 tab_cp932_uni2[]={
|
||||
0x2460,0x2461,0x2462,0x2463,0x2464,0x2465,0x2466,0x2467,
|
||||
0x2468,0x2469,0x246A,0x246B,0x246C,0x246D,0x246E,0x246F,
|
||||
0x2470,0x2471,0x2472,0x2473,0x2160,0x2161,0x2162,0x2163,
|
||||
|
@ -518,7 +518,7 @@ static uint16 tab_cp932_uni2[]={
|
|||
0x221F,0x22BF,0x2235,0x2229,0x222A};
|
||||
|
||||
/* page 3 0x889F-0x9FFC */
|
||||
static uint16 tab_cp932_uni3[]={
|
||||
static const uint16 tab_cp932_uni3[]={
|
||||
0x4E9C,0x5516,0x5A03,0x963F,0x54C0,0x611B,0x6328,0x59F6,
|
||||
0x9022,0x8475,0x831C,0x7A50,0x60AA,0x63E1,0x6E25,0x65ED,
|
||||
0x8466,0x82A6,0x9BF5,0x6893,0x5727,0x65A1,0x6271,0x5B9B,
|
||||
|
@ -1269,7 +1269,7 @@ static uint16 tab_cp932_uni3[]={
|
|||
0x6F3F,0x6EF2,0x6F31,0x6EEF,0x6F32,0x6ECC};
|
||||
|
||||
/* page 4 0xE040-0xEAA4 */
|
||||
static uint16 tab_cp932_uni4[]={
|
||||
static const uint16 tab_cp932_uni4[]={
|
||||
0x6F3E,0x6F13,0x6EF7,0x6F86,0x6F7A,0x6F78,0x6F81,0x6F80,
|
||||
0x6F6F,0x6F5B,0x6FF3,0x6F6D,0x6F82,0x6F7C,0x6F58,0x6F8E,
|
||||
0x6F91,0x6FC2,0x6F66,0x6FB3,0x6FA3,0x6FA1,0x6FA4,0x6FB9,
|
||||
|
@ -1606,7 +1606,7 @@ static uint16 tab_cp932_uni4[]={
|
|||
|
||||
/* page 5 0xED40-0xEEFC -
|
||||
IBM Selected Kanji and Non-Kanji(NEC implementation) */
|
||||
static uint16 tab_cp932_uni5[]={
|
||||
static const uint16 tab_cp932_uni5[]={
|
||||
0x7E8A,0x891C,0x9348,0x9288,0x84DC,0x4FC9,0x70BB,0x6631,
|
||||
0x68C8,0x92F9,0x66FB,0x5F45,0x4E28,0x4EE1,0x4EFC,0x4F00,
|
||||
0x4F03,0x4F39,0x4F56,0x4F92,0x4F8A,0x4F9A,0x4F94,0x4FCD,
|
||||
|
@ -1665,7 +1665,7 @@ static uint16 tab_cp932_uni5[]={
|
|||
0x2179,0xFFE2,0xFFE4,0xFF07,0xFF02};
|
||||
|
||||
/* page 6 0xF040-0xF9FC - User defined characters */
|
||||
static uint16 tab_cp932_uni6[]={
|
||||
static const uint16 tab_cp932_uni6[]={
|
||||
0xE000,0xE001,0xE002,0xE003,0xE004,0xE005,0xE006,0xE007,
|
||||
0xE008,0xE009,0xE00A,0xE00B,0xE00C,0xE00D,0xE00E,0xE00F,
|
||||
0xE010,0xE011,0xE012,0xE013,0xE014,0xE015,0xE016,0xE017,
|
||||
|
@ -1981,7 +1981,7 @@ static uint16 tab_cp932_uni6[]={
|
|||
|
||||
/* page 7 0xFA40-0xFC4B -
|
||||
IBM Selected Kanji and Non-Kanji */
|
||||
static uint16 tab_cp932_uni7[]={
|
||||
static const uint16 tab_cp932_uni7[]={
|
||||
0x2170,0x2171,0x2172,0x2173,0x2174,0x2175,0x2176,0x2177,
|
||||
0x2178,0x2179,0x2160,0x2161,0x2162,0x2163,0x2164,0x2165,
|
||||
0x2166,0x2167,0x2168,0x2169,0xFFE2,0xFFE4,0xFF07,0xFF02,
|
||||
|
@ -2070,7 +2070,7 @@ static int func_cp932_uni_onechar(int code){
|
|||
}
|
||||
|
||||
/* page 0 0x005C-0x00F7 */
|
||||
static uint16 tab_uni_cp9320[]={
|
||||
static const uint16 tab_uni_cp9320[]={
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
@ -2093,7 +2093,7 @@ static uint16 tab_uni_cp9320[]={
|
|||
0, 0, 0,0x8180};
|
||||
|
||||
/* page 1 0x0391-0x0451 */
|
||||
static uint16 tab_uni_cp9321[]={
|
||||
static const uint16 tab_uni_cp9321[]={
|
||||
0x839F,0x83A0,0x83A1,0x83A2,0x83A3,0x83A4,0x83A5,0x83A6,
|
||||
0x83A7,0x83A8,0x83A9,0x83AA,0x83AB,0x83AC,0x83AD,0x83AE,
|
||||
0x83AF, 0,0x83B0,0x83B1,0x83B2,0x83B3,0x83B4,0x83B5,
|
||||
|
@ -2121,7 +2121,7 @@ static uint16 tab_uni_cp9321[]={
|
|||
0x8476};
|
||||
|
||||
/* page 2 0x2010-0x2473 */
|
||||
static uint16 tab_uni_cp9322[]={
|
||||
static const uint16 tab_uni_cp9322[]={
|
||||
0x815D, 0, 0, 0, 0,0x815C, 0, 0,
|
||||
0x8165,0x8166, 0, 0,0x8167,0x8168, 0, 0,
|
||||
0x81F5,0x81F6, 0, 0, 0,0x8164,0x8163, 0,
|
||||
|
@ -2265,7 +2265,7 @@ static uint16 tab_uni_cp9322[]={
|
|||
0x8750,0x8751,0x8752,0x8753};
|
||||
|
||||
/* page 3 0x2500-0x266F */
|
||||
static uint16 tab_uni_cp9323[]={
|
||||
static const uint16 tab_uni_cp9323[]={
|
||||
0x849F,0x84AA,0x84A0,0x84AB, 0, 0, 0, 0,
|
||||
0, 0, 0, 0,0x84A1, 0, 0,0x84AC,
|
||||
0x84A2, 0, 0,0x84AD,0x84A4, 0, 0,0x84AF,
|
||||
|
@ -2315,7 +2315,7 @@ static uint16 tab_uni_cp9323[]={
|
|||
};
|
||||
|
||||
/* page 4 0x3000-0x30FE */
|
||||
static uint16 tab_uni_cp9324[]={
|
||||
static const uint16 tab_uni_cp9324[]={
|
||||
0x8140,0x8141,0x8142,0x8156, 0,0x8158,0x8159,0x815A,
|
||||
0x8171,0x8172,0x8173,0x8174,0x8175,0x8176,0x8177,0x8178,
|
||||
0x8179,0x817A,0x81A7,0x81AC,0x816B,0x816C, 0, 0,
|
||||
|
@ -2350,7 +2350,7 @@ static uint16 tab_uni_cp9324[]={
|
|||
0, 0, 0,0x8145,0x815B,0x8152,0x8153};
|
||||
|
||||
/* page 5 0x3230-0x33CD */
|
||||
static uint16 tab_uni_cp9325[]={
|
||||
static const uint16 tab_uni_cp9325[]={
|
||||
0,0x878A,0x878B, 0, 0, 0, 0, 0,
|
||||
0,0x878C, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
@ -2405,7 +2405,7 @@ static uint16 tab_uni_cp9325[]={
|
|||
0, 0, 0, 0, 0,0x8783};
|
||||
|
||||
/* page 6 0x4E00-0x9481 */
|
||||
static uint16 tab_uni_cp9326[]={
|
||||
static const uint16 tab_uni_cp9326[]={
|
||||
0x88EA,0x929A, 0,0x8EB5, 0, 0, 0,0x969C,
|
||||
0x8FE4,0x8E4F,0x8FE3,0x89BA, 0,0x9573,0x975E, 0,
|
||||
0x98A0,0x894E, 0, 0,0x8A8E,0x98A1,0x90A2,0x99C0,
|
||||
|
@ -4665,7 +4665,7 @@ static uint16 tab_uni_cp9326[]={
|
|||
0,0xE876};
|
||||
|
||||
/* page 7 0x9577-0x9FA0 */
|
||||
static uint16 tab_uni_cp9327[]={
|
||||
static const uint16 tab_uni_cp9327[]={
|
||||
0x92B7, 0, 0, 0, 0, 0, 0, 0,
|
||||
0,0x96E5, 0,0xE878,0x914D, 0, 0, 0,
|
||||
0xE879, 0,0x95C2,0xE87A,0x8A4A, 0, 0, 0,
|
||||
|
@ -4994,7 +4994,7 @@ static uint16 tab_uni_cp9327[]={
|
|||
0,0xEA9E};
|
||||
|
||||
/* page 8 0xE000-0xE757 - User defined characters */
|
||||
static uint16 tab_uni_cp9328[]={
|
||||
static const uint16 tab_uni_cp9328[]={
|
||||
0xF040,0xF041,0xF042,0xF043,0xF044,0xF045,0xF046,0xF047,
|
||||
0xF048,0xF049,0xF04A,0xF04B,0xF04C,0xF04D,0xF04E,0xF04F,
|
||||
0xF050,0xF051,0xF052,0xF053,0xF054,0xF055,0xF056,0xF057,
|
||||
|
@ -5232,7 +5232,7 @@ static uint16 tab_uni_cp9328[]={
|
|||
0xF9F5,0xF9F6,0xF9F7,0xF9F8,0xF9F9,0xF9FA,0xF9FB,0xF9FC};
|
||||
|
||||
/* page 9 0xF920-0xFA2D */
|
||||
static uint16 tab_uni_cp9329[]={
|
||||
static const uint16 tab_uni_cp9329[]={
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0,0xFAE0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
@ -5269,7 +5269,7 @@ static uint16 tab_uni_cp9329[]={
|
|||
0xFBDA,0xFBEA,0xFBF6,0xFBF7,0xFBF9,0xFC49};
|
||||
|
||||
/* page 10 0xFF01-0xFFE5 */
|
||||
static uint16 tab_uni_cp93210[]={
|
||||
static const uint16 tab_uni_cp93210[]={
|
||||
0x8149,0xFA57,0x8194,0x8190,0x8193,0x8195,0xFA56,0x8169,
|
||||
0x816A,0x8196,0x817B,0x8143,0x817C,0x8144,0x815E,0x824F,
|
||||
0x8250,0x8251,0x8252,0x8253,0x8254,0x8255,0x8256,0x8257,
|
||||
|
@ -5508,7 +5508,7 @@ static MY_CHARSET_HANDLER my_charset_handler=
|
|||
};
|
||||
|
||||
|
||||
CHARSET_INFO my_charset_cp932_japanese_ci=
|
||||
struct charset_info_st my_charset_cp932_japanese_ci=
|
||||
{
|
||||
95,0,0, /* number */
|
||||
MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM, /* state */
|
||||
|
@ -5540,7 +5540,7 @@ CHARSET_INFO my_charset_cp932_japanese_ci=
|
|||
&my_collation_ci_handler
|
||||
};
|
||||
|
||||
CHARSET_INFO my_charset_cp932_bin=
|
||||
struct charset_info_st my_charset_cp932_bin=
|
||||
{
|
||||
96,0,0, /* number */
|
||||
MY_CS_COMPILED|MY_CS_BINSORT, /* state */
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
below for what are the "special values"
|
||||
*/
|
||||
|
||||
static uchar *CZ_SORT_TABLE[] = {
|
||||
static const uchar *const CZ_SORT_TABLE[] = {
|
||||
(uchar*) "\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\043\044\045\046\047\050\051\052\053\054\000\000\000\000\000\000\000\003\004\377\007\010\011\012\013\015\016\017\020\022\023\024\025\026\027\031\033\034\035\036\037\040\041\000\000\000\000\000\000\003\004\377\007\010\011\012\013\015\016\017\020\022\023\024\025\026\027\031\033\034\035\036\037\040\041\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\000\021\000\020\032\000\000\032\032\033\042\000\042\042\000\003\000\021\000\020\032\000\000\032\032\033\042\000\042\042\027\003\003\003\003\020\006\006\006\010\010\010\010\015\015\007\007\023\023\024\024\024\024\000\030\034\034\034\034\040\033\000\027\003\003\003\003\020\006\006\006\010\010\010\010\015\015\007\007\023\023\024\024\024\024\000\030\034\034\034\034\040\033\000",
|
||||
(uchar*) "\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\106\107\110\111\112\113\114\115\116\117\000\000\000\000\000\000\000\003\011\377\016\021\026\027\030\032\035\036\037\043\044\047\054\055\056\061\065\070\075\076\077\100\102\000\000\000\000\000\000\003\011\377\016\021\026\027\030\032\035\036\037\043\044\047\054\055\056\061\065\070\075\076\077\100\102\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\010\000\042\000\041\063\000\000\062\064\066\104\000\103\105\000\010\000\042\000\041\063\000\000\062\064\066\104\000\103\105\057\004\005\007\006\040\014\015\013\022\025\024\023\033\034\017\020\046\045\050\051\053\052\000\060\072\071\074\073\101\067\000\057\004\005\007\006\040\014\015\013\022\025\024\023\033\034\017\020\046\045\050\051\053\052\000\060\072\071\074\073\101\067\000",
|
||||
(uchar*) "\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\212\213\214\215\216\217\220\221\222\223\000\000\000\000\000\000\000\004\020\377\032\040\052\054\056\063\071\073\075\105\107\115\127\131\133\141\151\157\171\173\175\177\203\000\000\000\000\000\000\003\017\377\031\037\051\053\055\062\070\072\074\104\106\114\126\130\132\140\150\156\170\172\174\176\202\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\016\000\103\000\101\145\000\000\143\147\153\207\000\205\211\000\015\000\102\000\100\144\000\000\142\146\152\206\000\204\210\135\006\010\014\012\077\026\030\024\042\050\046\044\065\067\034\036\113\111\117\121\125\123\000\137\163\161\167\165\201\155\000\134\005\007\013\011\076\025\027\023\041\047\045\043\064\066\033\035\112\110\116\120\124\122\000\136\162\160\166\164\200\154\000",
|
||||
|
@ -99,14 +99,14 @@ static uchar *CZ_SORT_TABLE[] = {
|
|||
struct wordvalue
|
||||
{
|
||||
const char * word;
|
||||
uchar *outvalue;
|
||||
const uchar *outvalue;
|
||||
};
|
||||
static struct wordvalue doubles[] = {
|
||||
{ "ch", (uchar*) "\014\031\057\057" },
|
||||
{ "Ch", (uchar*) "\014\031\060\060" },
|
||||
{ "CH", (uchar*) "\014\031\061\061" },
|
||||
{ "c", (uchar*) "\005\012\021\021" },
|
||||
{ "C", (uchar*) "\005\012\022\022" },
|
||||
static const struct wordvalue doubles[] = {
|
||||
{ "ch", (const uchar*) "\014\031\057\057" },
|
||||
{ "Ch", (const uchar*) "\014\031\060\060" },
|
||||
{ "CH", (const uchar*) "\014\031\061\061" },
|
||||
{ "c", (const uchar*) "\005\012\021\021" },
|
||||
{ "C", (const uchar*) "\005\012\022\022" },
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -430,7 +430,7 @@ static my_bool my_like_range_czech(CHARSET_INFO *cs __attribute__((unused)),
|
|||
#include <my_global.h>
|
||||
#include "m_string.h"
|
||||
|
||||
static uchar NEAR ctype_czech[257] = {
|
||||
static const uchar NEAR ctype_czech[257] = {
|
||||
0,
|
||||
32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
|
||||
32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
|
||||
|
@ -450,7 +450,7 @@ static uchar NEAR ctype_czech[257] = {
|
|||
2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 16,
|
||||
};
|
||||
|
||||
static uchar NEAR to_lower_czech[] = {
|
||||
static const uchar NEAR to_lower_czech[] = {
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
||||
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
||||
|
@ -469,7 +469,7 @@ static uchar NEAR to_lower_czech[] = {
|
|||
240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,
|
||||
};
|
||||
|
||||
static uchar NEAR to_upper_czech[] = {
|
||||
static const uchar NEAR to_upper_czech[] = {
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
||||
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
||||
|
@ -488,7 +488,7 @@ static uchar NEAR to_upper_czech[] = {
|
|||
240,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255,
|
||||
};
|
||||
|
||||
static uchar NEAR sort_order_czech[] = {
|
||||
static const uchar NEAR sort_order_czech[] = {
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
||||
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
||||
|
@ -507,7 +507,7 @@ static uchar NEAR sort_order_czech[] = {
|
|||
255, 98, 99,101,102,103,104,255,109,119,118,120,121,126,116,255,
|
||||
};
|
||||
|
||||
static uint16 tab_8859_2_uni[256]={
|
||||
static const uint16 tab_8859_2_uni[256]={
|
||||
0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
|
||||
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
|
||||
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
|
||||
|
@ -544,7 +544,7 @@ static uint16 tab_8859_2_uni[256]={
|
|||
|
||||
|
||||
/* 0000-00FD , 254 chars */
|
||||
static uchar tab_uni_8859_2_plane00[]={
|
||||
static const uchar tab_uni_8859_2_plane00[]={
|
||||
0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
|
||||
0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
|
||||
0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
|
||||
|
@ -563,7 +563,7 @@ static uchar tab_uni_8859_2_plane00[]={
|
|||
0x00,0x00,0x00,0xF3,0xF4,0x00,0xF6,0xF7,0x00,0x00,0xFA,0x00,0xFC,0xFD};
|
||||
|
||||
/* 0102-017E , 125 chars */
|
||||
static uchar tab_uni_8859_2_plane01[]={
|
||||
static const uchar tab_uni_8859_2_plane01[]={
|
||||
0xC3,0xE3,0xA1,0xB1,0xC6,0xE6,0x00,0x00,0x00,0x00,0xC8,0xE8,0xCF,0xEF,0xD0,0xF0,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0xCA,0xEA,0xCC,0xEC,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
|
@ -574,7 +574,7 @@ static uchar tab_uni_8859_2_plane01[]={
|
|||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xAC,0xBC,0xAF,0xBF,0xAE,0xBE};
|
||||
|
||||
/* 02C7-02DD , 23 chars */
|
||||
static uchar tab_uni_8859_2_plane02[]={
|
||||
static const uchar tab_uni_8859_2_plane02[]={
|
||||
0xB7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0xA2,0xFF,0x00,0xB2,0x00,0xBD};
|
||||
|
||||
|
@ -601,7 +601,7 @@ static MY_COLLATION_HANDLER my_collation_latin2_czech_ci_handler =
|
|||
my_propagate_simple
|
||||
};
|
||||
|
||||
CHARSET_INFO my_charset_latin2_czech_ci =
|
||||
struct charset_info_st my_charset_latin2_czech_ci =
|
||||
{
|
||||
2,0,0, /* number */
|
||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_CSSORT, /* state */
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#ifdef HAVE_CHARSET_euckr
|
||||
|
||||
|
||||
static uchar NEAR ctype_euc_kr[257] =
|
||||
static const uchar NEAR ctype_euc_kr[257] =
|
||||
{
|
||||
0, /* For standard library */
|
||||
0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, /* NUL ^A - ^G */
|
||||
|
@ -69,7 +69,7 @@ static uchar NEAR ctype_euc_kr[257] =
|
|||
0020, 0020, 0020, 0020, 0020, 0020, 0020, 0000,
|
||||
};
|
||||
|
||||
static uchar NEAR to_lower_euc_kr[]=
|
||||
static const uchar NEAR to_lower_euc_kr[]=
|
||||
{
|
||||
'\000','\001','\002','\003','\004','\005','\006','\007',
|
||||
'\010','\011','\012','\013','\014','\015','\016','\017',
|
||||
|
@ -105,7 +105,7 @@ static uchar NEAR to_lower_euc_kr[]=
|
|||
(uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377',
|
||||
};
|
||||
|
||||
static uchar NEAR to_upper_euc_kr[]=
|
||||
static const uchar NEAR to_upper_euc_kr[]=
|
||||
{
|
||||
'\000','\001','\002','\003','\004','\005','\006','\007',
|
||||
'\010','\011','\012','\013','\014','\015','\016','\017',
|
||||
|
@ -141,7 +141,7 @@ static uchar NEAR to_upper_euc_kr[]=
|
|||
(uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377',
|
||||
};
|
||||
|
||||
static uchar NEAR sort_order_euc_kr[]=
|
||||
static const uchar NEAR sort_order_euc_kr[]=
|
||||
{
|
||||
'\000','\001','\002','\003','\004','\005','\006','\007',
|
||||
'\010','\011','\012','\013','\014','\015','\016','\017',
|
||||
|
@ -217,7 +217,7 @@ static uint mbcharlen_euc_kr(CHARSET_INFO *cs __attribute__((unused)),uint c)
|
|||
|
||||
|
||||
/* page 0 0x8141-0xC8FE */
|
||||
static uint16 tab_ksc5601_uni0[]={
|
||||
static const uint16 tab_ksc5601_uni0[]={
|
||||
0xAC02,0xAC03,0xAC05,0xAC06,0xAC0B,0xAC0C,0xAC0D,0xAC0E,
|
||||
0xAC0F,0xAC18,0xAC1E,0xAC1F,0xAC21,0xAC22,0xAC23,0xAC25,
|
||||
0xAC26,0xAC27,0xAC28,0xAC29,0xAC2A,0xAC2B,0xAC2E,0xAC32,
|
||||
|
@ -2516,7 +2516,7 @@ static uint16 tab_ksc5601_uni0[]={
|
|||
0xD78C,0xD790,0xD798,0xD799,0xD79B,0xD79D};
|
||||
|
||||
/* page 1 0xCAA1-0xFDFE */
|
||||
static uint16 tab_ksc5601_uni1[]={
|
||||
static const uint16 tab_ksc5601_uni1[]={
|
||||
0x4F3D,0x4F73,0x5047,0x50F9,0x52A0,0x53EF,0x5475,0x54E5,
|
||||
0x5609,0x5AC1,0x5BB6,0x6687,0x67B6,0x67B7,0x67EF,0x6B4C,
|
||||
0x73C2,0x75C2,0x7A3C,0x82DB,0x8304,0x8857,0x8888,0x8A36,
|
||||
|
@ -4170,7 +4170,7 @@ static int func_ksc5601_uni_onechar(int code){
|
|||
return(0);
|
||||
}
|
||||
/* page 0 0x00A1-0x0167 */
|
||||
static uint16 tab_uni_ksc56010[]={
|
||||
static const uint16 tab_uni_ksc56010[]={
|
||||
0xA2AE, 0, 0,0xA2B4, 0, 0,0xA1D7,0xA1A7,
|
||||
0,0xA8A3, 0, 0,0xA1A9,0xA2E7, 0,0xA1C6,
|
||||
0xA1BE,0xA9F7,0xA9F8,0xA2A5, 0,0xA2D2,0xA1A4,0xA2AC,
|
||||
|
@ -4198,7 +4198,7 @@ static uint16 tab_uni_ksc56010[]={
|
|||
0, 0, 0, 0, 0,0xA8AE,0xA9AE};
|
||||
|
||||
/* page 1 0x02C7-0x0451 */
|
||||
static uint16 tab_uni_ksc56011[]={
|
||||
static const uint16 tab_uni_ksc56011[]={
|
||||
0xA2A7, 0, 0, 0, 0, 0, 0, 0,
|
||||
0,0xA2B0, 0, 0, 0, 0, 0, 0,
|
||||
0,0xA2A8,0xA2AB,0xA2AA,0xA2AD, 0,0xA2A9, 0,
|
||||
|
@ -4251,7 +4251,7 @@ static uint16 tab_uni_ksc56011[]={
|
|||
0xACF1, 0,0xACD7};
|
||||
|
||||
/* page 2 0x2015-0x2312 */
|
||||
static uint16 tab_uni_ksc56012[]={
|
||||
static const uint16 tab_uni_ksc56012[]={
|
||||
0xA1AA, 0, 0,0xA1AE,0xA1AF, 0, 0,0xA1B0,
|
||||
0xA1B1, 0, 0,0xA2D3,0xA2D4, 0, 0, 0,
|
||||
0xA1A5,0xA1A6, 0, 0, 0, 0, 0, 0,
|
||||
|
@ -4350,7 +4350,7 @@ static uint16 tab_uni_ksc56012[]={
|
|||
0, 0, 0, 0, 0,0xA1D2};
|
||||
|
||||
/* page 3 0x2460-0x266D */
|
||||
static uint16 tab_uni_ksc56013[]={
|
||||
static const uint16 tab_uni_ksc56013[]={
|
||||
0xA8E7,0xA8E8,0xA8E9,0xA8EA,0xA8EB,0xA8EC,0xA8ED,0xA8EE,
|
||||
0xA8EF,0xA8F0,0xA8F1,0xA8F2,0xA8F3,0xA8F4,0xA8F5, 0,
|
||||
0, 0, 0, 0,0xA9E7,0xA9E8,0xA9E9,0xA9EA,
|
||||
|
@ -4419,7 +4419,7 @@ static uint16 tab_uni_ksc56013[]={
|
|||
0xA2CD,0xA2DB,0xA2DC, 0,0xA2DD,0xA2DA};
|
||||
|
||||
/* page 4 0x3000-0x327F */
|
||||
static uint16 tab_uni_ksc56014[]={
|
||||
static const uint16 tab_uni_ksc56014[]={
|
||||
0xA1A1,0xA1A2,0xA1A3,0xA1A8, 0, 0, 0, 0,
|
||||
0xA1B4,0xA1B5,0xA1B6,0xA1B7,0xA1B8,0xA1B9,0xA1BA,0xA1BB,
|
||||
0xA1BC,0xA1BD, 0,0xA1EB,0xA1B2,0xA1B3, 0, 0,
|
||||
|
@ -4503,7 +4503,7 @@ static uint16 tab_uni_ksc56014[]={
|
|||
};
|
||||
|
||||
/* page 5 0x3380-0x33DD */
|
||||
static uint16 tab_uni_ksc56015[]={
|
||||
static const uint16 tab_uni_ksc56015[]={
|
||||
0xA7C9,0xA7CA,0xA7CB,0xA7CC,0xA7CD, 0, 0, 0,
|
||||
0xA7BA,0xA7BB,0xA7DC,0xA7DD,0xA7DE,0xA7B6,0xA7B7,0xA7B8,
|
||||
0xA7D4,0xA7D5,0xA7D6,0xA7D7,0xA7D8,0xA7A1,0xA7A2,0xA7A3,
|
||||
|
@ -4518,7 +4518,7 @@ static uint16 tab_uni_ksc56015[]={
|
|||
0xA2E4, 0, 0,0xA7E4,0xA7EE,0xA7E9};
|
||||
|
||||
/* page 6 0x4E00-0x947F */
|
||||
static uint16 tab_uni_ksc56016[]={
|
||||
static const uint16 tab_uni_ksc56016[]={
|
||||
0xECE9,0xEFCB, 0,0xF6D2, 0, 0, 0,0xD8B2,
|
||||
0xEDDB,0xDFB2,0xDFBE,0xF9BB, 0,0xDCF4, 0, 0,
|
||||
0,0xF5E4, 0, 0,0xF3A6,0xDDE0,0xE1A6, 0,
|
||||
|
@ -6778,7 +6778,7 @@ static uint16 tab_uni_ksc56016[]={
|
|||
};
|
||||
|
||||
/* page 7 0x9577-0x9F9C */
|
||||
static uint16 tab_uni_ksc56017[]={
|
||||
static const uint16 tab_uni_ksc56017[]={
|
||||
0xEDFE, 0, 0, 0, 0, 0, 0, 0,
|
||||
0,0xDAA6, 0, 0,0xE0EC, 0, 0, 0,
|
||||
0, 0,0xF8CD, 0,0xCBD2, 0, 0, 0,
|
||||
|
@ -7106,7 +7106,7 @@ static uint16 tab_uni_ksc56017[]={
|
|||
0, 0, 0, 0, 0,0xCFCF};
|
||||
|
||||
/* page 8 0xAC00-0xD7A3 */
|
||||
static uint16 tab_uni_ksc56018[]={
|
||||
static const uint16 tab_uni_ksc56018[]={
|
||||
0xB0A1,0xB0A2,0x8141,0x8142,0xB0A3,0x8143,0x8144,0xB0A4,
|
||||
0xB0A5,0xB0A6,0xB0A7,0x8145,0x8146,0x8147,0x8148,0x8149,
|
||||
0xB0A8,0xB0A9,0xB0AA,0xB0AB,0xB0AC,0xB0AD,0xB0AE,0xB0AF,
|
||||
|
@ -8506,7 +8506,7 @@ static uint16 tab_uni_ksc56018[]={
|
|||
0xC64F,0xC650,0xC651,0xC652};
|
||||
|
||||
/* page 9 0xF900-0xFA0B */
|
||||
static uint16 tab_uni_ksc56019[]={
|
||||
static const uint16 tab_uni_ksc56019[]={
|
||||
0xCBD0,0xCBD6,0xCBE7,0xCDCF,0xCDE8,0xCEAD,0xCFFB,0xD0A2,
|
||||
0xD0B8,0xD0D0,0xD0DD,0xD1D4,0xD1D5,0xD1D8,0xD1DB,0xD1DC,
|
||||
0xD1DD,0xD1DE,0xD1DF,0xD1E0,0xD1E2,0xD1E3,0xD1E4,0xD1E5,
|
||||
|
@ -8543,7 +8543,7 @@ static uint16 tab_uni_ksc56019[]={
|
|||
0xFAA1,0xFAA2,0xFAE6,0xFCA9};
|
||||
|
||||
/* page 10 0xFF01-0xFFE6 */
|
||||
static uint16 tab_uni_ksc560110[]={
|
||||
static const uint16 tab_uni_ksc560110[]={
|
||||
0xA3A1,0xA3A2,0xA3A3,0xA3A4,0xA3A5,0xA3A6,0xA3A7,0xA3A8,
|
||||
0xA3A9,0xA3AA,0xA3AB,0xA3AC,0xA3AD,0xA3AE,0xA3AF,0xA3B0,
|
||||
0xA3B1,0xA3B2,0xA3B3,0xA3B4,0xA3B5,0xA3B6,0xA3B7,0xA3B8,
|
||||
|
@ -8737,7 +8737,7 @@ static MY_CHARSET_HANDLER my_charset_handler=
|
|||
};
|
||||
|
||||
|
||||
CHARSET_INFO my_charset_euckr_korean_ci=
|
||||
struct charset_info_st my_charset_euckr_korean_ci=
|
||||
{
|
||||
19,0,0, /* number */
|
||||
MY_CS_COMPILED|MY_CS_PRIMARY, /* state */
|
||||
|
@ -8770,7 +8770,7 @@ CHARSET_INFO my_charset_euckr_korean_ci=
|
|||
};
|
||||
|
||||
|
||||
CHARSET_INFO my_charset_euckr_bin=
|
||||
struct charset_info_st my_charset_euckr_bin=
|
||||
{
|
||||
85,0,0, /* number */
|
||||
MY_CS_COMPILED|MY_CS_BINSORT, /* state */
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -29,7 +29,7 @@
|
|||
|
||||
#ifdef HAVE_CHARSET_gb2312
|
||||
|
||||
static uchar NEAR ctype_gb2312[257] =
|
||||
static const uchar NEAR ctype_gb2312[257] =
|
||||
{
|
||||
0, /* For standard library */
|
||||
32,32,32,32,32,32,32,32,32,40,40,40,40,40,32,32,
|
||||
|
@ -50,7 +50,7 @@ static uchar NEAR ctype_gb2312[257] =
|
|||
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,
|
||||
};
|
||||
|
||||
static uchar NEAR to_lower_gb2312[]=
|
||||
static const uchar NEAR to_lower_gb2312[]=
|
||||
{
|
||||
'\000','\001','\002','\003','\004','\005','\006','\007',
|
||||
'\010','\011','\012','\013','\014','\015','\016','\017',
|
||||
|
@ -86,7 +86,7 @@ static uchar NEAR to_lower_gb2312[]=
|
|||
(uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377',
|
||||
};
|
||||
|
||||
static uchar NEAR to_upper_gb2312[]=
|
||||
static const uchar NEAR to_upper_gb2312[]=
|
||||
{
|
||||
'\000','\001','\002','\003','\004','\005','\006','\007',
|
||||
'\010','\011','\012','\013','\014','\015','\016','\017',
|
||||
|
@ -122,7 +122,7 @@ static uchar NEAR to_upper_gb2312[]=
|
|||
(uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377',
|
||||
};
|
||||
|
||||
static uchar NEAR sort_order_gb2312[]=
|
||||
static const uchar NEAR sort_order_gb2312[]=
|
||||
{
|
||||
'\000','\001','\002','\003','\004','\005','\006','\007',
|
||||
'\010','\011','\012','\013','\014','\015','\016','\017',
|
||||
|
@ -178,7 +178,7 @@ static uint mbcharlen_gb2312(CHARSET_INFO *cs __attribute__((unused)),uint c)
|
|||
|
||||
|
||||
/* page 0 0x2121-0x2658 */
|
||||
static uint16 tab_gb2312_uni0[]={
|
||||
static const uint16 tab_gb2312_uni0[]={
|
||||
0x3000,0x3001,0x3002,0x30FB,0x02C9,0x02C7,0x00A8,0x3003,
|
||||
0x3005,0x2015,0xFF5E,0x2016,0x2026,0x2018,0x2019,0x201C,
|
||||
0x201D,0x3014,0x3015,0x3008,0x3009,0x300A,0x300B,0x300C,
|
||||
|
@ -349,7 +349,7 @@ static uint16 tab_gb2312_uni0[]={
|
|||
};
|
||||
|
||||
/* page 1 0x2721-0x296F */
|
||||
static uint16 tab_gb2312_uni1[]={
|
||||
static const uint16 tab_gb2312_uni1[]={
|
||||
0x0410,0x0411,0x0412,0x0413,0x0414,0x0415,0x0401,0x0416,
|
||||
0x0417,0x0418,0x0419,0x041A,0x041B,0x041C,0x041D,0x041E,
|
||||
0x041F,0x0420,0x0421,0x0422,0x0423,0x0424,0x0425,0x0426,
|
||||
|
@ -426,7 +426,7 @@ static uint16 tab_gb2312_uni1[]={
|
|||
0x2545,0x2546,0x2547,0x2548,0x2549,0x254A,0x254B};
|
||||
|
||||
/* page 2 0x3021-0x777E */
|
||||
static uint16 tab_gb2312_uni2[]={
|
||||
static const uint16 tab_gb2312_uni2[]={
|
||||
0x554A,0x963F,0x57C3,0x6328,0x54CE,0x5509,0x54C0,0x7691,
|
||||
0x764C,0x853C,0x77EE,0x827E,0x788D,0x7231,0x9698,0x978D,
|
||||
0x6C28,0x5B89,0x4FFA,0x6309,0x6697,0x5CB8,0x80FA,0x6848,
|
||||
|
@ -2724,7 +2724,7 @@ static int func_gb2312_uni_onechar(int code){
|
|||
|
||||
|
||||
/* page 0 0x00A4-0x01DC */
|
||||
static uint16 tab_uni_gb23120[]={
|
||||
static const uint16 tab_uni_gb23120[]={
|
||||
0x2168, 0, 0,0x216C,0x2127, 0, 0, 0,
|
||||
0, 0, 0, 0,0x2163,0x2140, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
@ -2767,7 +2767,7 @@ static uint16 tab_uni_gb23120[]={
|
|||
0x2838};
|
||||
|
||||
/* page 1 0x02C7-0x0451 */
|
||||
static uint16 tab_uni_gb23121[]={
|
||||
static const uint16 tab_uni_gb23121[]={
|
||||
0x2126, 0,0x2125, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
@ -2820,7 +2820,7 @@ static uint16 tab_uni_gb23121[]={
|
|||
0x2771, 0,0x2757};
|
||||
|
||||
/* page 2 0x2015-0x2312 */
|
||||
static uint16 tab_uni_gb23122[]={
|
||||
static const uint16 tab_uni_gb23122[]={
|
||||
0x212A,0x212C, 0,0x212E,0x212F, 0, 0,0x2130,
|
||||
0x2131, 0, 0, 0, 0, 0, 0, 0,
|
||||
0,0x212D, 0, 0, 0, 0, 0, 0,
|
||||
|
@ -2919,7 +2919,7 @@ static uint16 tab_uni_gb23122[]={
|
|||
0, 0, 0, 0, 0,0x2150};
|
||||
|
||||
/* page 3 0x2460-0x2642 */
|
||||
static uint16 tab_uni_gb23123[]={
|
||||
static const uint16 tab_uni_gb23123[]={
|
||||
0x2259,0x225A,0x225B,0x225C,0x225D,0x225E,0x225F,0x2260,
|
||||
0x2261,0x2262, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0,0x2245,0x2246,0x2247,0x2248,
|
||||
|
@ -2983,7 +2983,7 @@ static uint16 tab_uni_gb23123[]={
|
|||
0x2162, 0,0x2161};
|
||||
|
||||
/* page 4 0x3000-0x3129 */
|
||||
static uint16 tab_uni_gb23124[]={
|
||||
static const uint16 tab_uni_gb23124[]={
|
||||
0x2121,0x2122,0x2123,0x2128, 0,0x2129, 0, 0,
|
||||
0x2134,0x2135,0x2136,0x2137,0x2138,0x2139,0x213A,0x213B,
|
||||
0x213E,0x213F, 0,0x217E,0x2132,0x2133,0x213C,0x213D,
|
||||
|
@ -3024,12 +3024,12 @@ static uint16 tab_uni_gb23124[]={
|
|||
0x2868,0x2869};
|
||||
|
||||
/* page 5 0x3220-0x3229 */
|
||||
static uint16 tab_uni_gb23125[]={
|
||||
static const uint16 tab_uni_gb23125[]={
|
||||
0x2265,0x2266,0x2267,0x2268,0x2269,0x226A,0x226B,0x226C,
|
||||
0x226D,0x226E};
|
||||
|
||||
/* page 6 0x4E00-0x9B54 */
|
||||
static uint16 tab_uni_gb23126[]={
|
||||
static const uint16 tab_uni_gb23126[]={
|
||||
0x523B,0x3621, 0,0x465F, 0, 0, 0,0x4D72,
|
||||
0x5549,0x487D,0x494F,0x4F42,0x5822,0x323B,0x536B, 0,
|
||||
0x5824,0x3373, 0,0x5728,0x4752,0x5827,0x4A40, 0,
|
||||
|
@ -5507,7 +5507,7 @@ static uint16 tab_uni_gb23126[]={
|
|||
0,0x774E, 0, 0,0x4427};
|
||||
|
||||
/* page 7 0x9C7C-0x9CE2 */
|
||||
static uint16 tab_uni_gb23127[]={
|
||||
static const uint16 tab_uni_gb23127[]={
|
||||
0x5363, 0, 0,0x764F, 0,0x4233,0x7650, 0,
|
||||
0,0x7651,0x7652,0x7653,0x7654, 0, 0,0x7656,
|
||||
0,0x312B,0x7657, 0,0x7658,0x7659,0x765A, 0,
|
||||
|
@ -5523,7 +5523,7 @@ static uint16 tab_uni_gb23127[]={
|
|||
0x772C,0x772D,0x415B,0x772E, 0, 0,0x772F};
|
||||
|
||||
/* page 8 0x9E1F-0x9FA0 */
|
||||
static uint16 tab_uni_gb23128[]={
|
||||
static const uint16 tab_uni_gb23128[]={
|
||||
0x4471,0x702F,0x3C26,0x7030,0x4379, 0,0x4538,0x513B,
|
||||
0,0x7031,0x7032,0x7033,0x7034,0x7035,0x513C, 0,
|
||||
0x516C, 0,0x7037,0x7036,0x5427, 0,0x4D52,0x7038,
|
||||
|
@ -5575,7 +5575,7 @@ static uint16 tab_uni_gb23128[]={
|
|||
0x396A,0x595F};
|
||||
|
||||
/* page 9 0xFF01-0xFFE5 */
|
||||
static uint16 tab_uni_gb23129[]={
|
||||
static const uint16 tab_uni_gb23129[]={
|
||||
0x2321,0x2322,0x2323,0x2167,0x2325,0x2326,0x2327,0x2328,
|
||||
0x2329,0x232A,0x232B,0x232C,0x232D,0x232E,0x232F,0x2330,
|
||||
0x2331,0x2332,0x2333,0x2334,0x2335,0x2336,0x2337,0x2338,
|
||||
|
@ -5765,7 +5765,7 @@ static MY_CHARSET_HANDLER my_charset_handler=
|
|||
};
|
||||
|
||||
|
||||
CHARSET_INFO my_charset_gb2312_chinese_ci=
|
||||
struct charset_info_st my_charset_gb2312_chinese_ci=
|
||||
{
|
||||
24,0,0, /* number */
|
||||
MY_CS_COMPILED|MY_CS_PRIMARY, /* state */
|
||||
|
@ -5797,7 +5797,7 @@ CHARSET_INFO my_charset_gb2312_chinese_ci=
|
|||
&my_collation_ci_handler
|
||||
};
|
||||
|
||||
CHARSET_INFO my_charset_gb2312_bin=
|
||||
struct charset_info_st my_charset_gb2312_bin=
|
||||
{
|
||||
86,0,0, /* number */
|
||||
MY_CS_COMPILED|MY_CS_BINSORT, /* state */
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
* .configure. mbmaxlen_gbk=2
|
||||
*/
|
||||
|
||||
|
||||
#include <my_global.h>
|
||||
#include "m_string.h"
|
||||
#include "m_ctype.h"
|
||||
|
@ -44,7 +43,7 @@
|
|||
#define gbkhead(e) ((uchar)(e>>8))
|
||||
#define gbktail(e) ((uchar)(e&0xff))
|
||||
|
||||
static uchar NEAR ctype_gbk[257] =
|
||||
static const uchar NEAR ctype_gbk[257] =
|
||||
{
|
||||
0, /* For standard library */
|
||||
32,32,32,32,32,32,32,32,32,40,40,40,40,40,32,32,
|
||||
|
@ -65,7 +64,7 @@ static uchar NEAR ctype_gbk[257] =
|
|||
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,
|
||||
};
|
||||
|
||||
static uchar NEAR to_lower_gbk[]=
|
||||
static const uchar NEAR to_lower_gbk[]=
|
||||
{
|
||||
'\000','\001','\002','\003','\004','\005','\006','\007',
|
||||
'\010','\011','\012','\013','\014','\015','\016','\017',
|
||||
|
@ -101,7 +100,7 @@ static uchar NEAR to_lower_gbk[]=
|
|||
(uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377',
|
||||
};
|
||||
|
||||
static uchar NEAR to_upper_gbk[]=
|
||||
static const uchar NEAR to_upper_gbk[]=
|
||||
{
|
||||
'\000','\001','\002','\003','\004','\005','\006','\007',
|
||||
'\010','\011','\012','\013','\014','\015','\016','\017',
|
||||
|
@ -137,7 +136,7 @@ static uchar NEAR to_upper_gbk[]=
|
|||
(uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377',
|
||||
};
|
||||
|
||||
static uchar NEAR sort_order_gbk[]=
|
||||
static const uchar NEAR sort_order_gbk[]=
|
||||
{
|
||||
'\000','\001','\002','\003','\004','\005','\006','\007',
|
||||
'\010','\011','\012','\013','\014','\015','\016','\017',
|
||||
|
@ -173,7 +172,7 @@ static uchar NEAR sort_order_gbk[]=
|
|||
(uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377',
|
||||
};
|
||||
|
||||
static uint16 NEAR gbk_order[]=
|
||||
static const uint16 NEAR gbk_order[]=
|
||||
{
|
||||
8653,14277,17116,11482,11160,2751,14613,3913,13337,9827,
|
||||
19496,1759,8105,7103,7836,5638,2223,21433,5878,8006,
|
||||
|
@ -2782,7 +2781,7 @@ static uint mbcharlen_gbk(CHARSET_INFO *cs __attribute__((unused)),uint c)
|
|||
}
|
||||
|
||||
/* page 0 0x8140-0xFE4F */
|
||||
static uint16 tab_gbk_uni0[]={
|
||||
static const uint16 tab_gbk_uni0[]={
|
||||
0x4E02,0x4E04,0x4E05,0x4E06,0x4E0F,0x4E12,0x4E17,0x4E1F,
|
||||
0x4E20,0x4E21,0x4E23,0x4E26,0x4E29,0x4E2E,0x4E2F,0x4E31,
|
||||
0x4E33,0x4E35,0x4E37,0x4E3C,0x4E40,0x4E41,0x4E42,0x4E44,
|
||||
|
@ -6796,7 +6795,7 @@ static int func_gbk_uni_onechar(int code){
|
|||
|
||||
|
||||
/* page 0 0x00A4-0x0451 */
|
||||
static uint16 tab_uni_gbk0[]={
|
||||
static const uint16 tab_uni_gbk0[]={
|
||||
0xA1E8, 0, 0,0xA1EC,0xA1A7, 0, 0, 0,
|
||||
0, 0, 0, 0,0xA1E3,0xA1C0, 0, 0,
|
||||
0, 0, 0,0xA1A4, 0, 0, 0, 0,
|
||||
|
@ -6917,7 +6916,7 @@ static uint16 tab_uni_gbk0[]={
|
|||
0xA7EE,0xA7EF,0xA7F0,0xA7F1, 0,0xA7D7};
|
||||
|
||||
/* page 1 0x2010-0x2312 */
|
||||
static uint16 tab_uni_gbk1[]={
|
||||
static const uint16 tab_uni_gbk1[]={
|
||||
0xA95C, 0, 0,0xA843,0xA1AA,0xA844,0xA1AC, 0,
|
||||
0xA1AE,0xA1AF, 0, 0,0xA1B0,0xA1B1, 0, 0,
|
||||
0, 0, 0, 0, 0,0xA845,0xA1AD, 0,
|
||||
|
@ -7017,7 +7016,7 @@ static uint16 tab_uni_gbk1[]={
|
|||
0, 0,0xA1D0};
|
||||
|
||||
/* page 2 0x2460-0x2642 */
|
||||
static uint16 tab_uni_gbk2[]={
|
||||
static const uint16 tab_uni_gbk2[]={
|
||||
0xA2D9,0xA2DA,0xA2DB,0xA2DC,0xA2DD,0xA2DE,0xA2DF,0xA2E0,
|
||||
0xA2E1,0xA2E2, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0,0xA2C5,0xA2C6,0xA2C7,0xA2C8,
|
||||
|
@ -7081,7 +7080,7 @@ static uint16 tab_uni_gbk2[]={
|
|||
0xA1E2, 0,0xA1E1};
|
||||
|
||||
/* page 3 0x3000-0x3129 */
|
||||
static uint16 tab_uni_gbk3[]={
|
||||
static const uint16 tab_uni_gbk3[]={
|
||||
0xA1A1,0xA1A2,0xA1A3,0xA1A8, 0,0xA1A9,0xA965,0xA996,
|
||||
0xA1B4,0xA1B5,0xA1B6,0xA1B7,0xA1B8,0xA1B9,0xA1BA,0xA1BB,
|
||||
0xA1BE,0xA1BF,0xA893,0xA1FE,0xA1B2,0xA1B3,0xA1BC,0xA1BD,
|
||||
|
@ -7122,7 +7121,7 @@ static uint16 tab_uni_gbk3[]={
|
|||
0xA8E8,0xA8E9};
|
||||
|
||||
/* page 4 0x3220-0x32A3 */
|
||||
static uint16 tab_uni_gbk4[]={
|
||||
static const uint16 tab_uni_gbk4[]={
|
||||
0xA2E5,0xA2E6,0xA2E7,0xA2E8,0xA2E9,0xA2EA,0xA2EB,0xA2EC,
|
||||
0xA2ED,0xA2EE, 0, 0, 0, 0, 0, 0,
|
||||
0,0xA95A, 0, 0, 0, 0, 0, 0,
|
||||
|
@ -7142,7 +7141,7 @@ static uint16 tab_uni_gbk4[]={
|
|||
0, 0, 0,0xA949};
|
||||
|
||||
/* page 5 0x338E-0x33D5 */
|
||||
static uint16 tab_uni_gbk5[]={
|
||||
static const uint16 tab_uni_gbk5[]={
|
||||
0xA94A,0xA94B, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,0xA94C,0xA94D,
|
||||
0xA94E, 0, 0,0xA94F, 0, 0, 0, 0,
|
||||
|
@ -7155,7 +7154,7 @@ static uint16 tab_uni_gbk5[]={
|
|||
};
|
||||
|
||||
/* page 6 0x4E00-0x9FA5 */
|
||||
static uint16 tab_uni_gbk6[]={
|
||||
static const uint16 tab_uni_gbk6[]={
|
||||
0xD2BB,0xB6A1,0x8140,0xC6DF,0x8141,0x8142,0x8143,0xCDF2,
|
||||
0xD5C9,0xC8FD,0xC9CF,0xCFC2,0xD8A2,0xB2BB,0xD3EB,0x8144,
|
||||
0xD8A4,0xB3F3,0x8145,0xD7A8,0xC7D2,0xD8A7,0xCAC0,0x8146,
|
||||
|
@ -9771,7 +9770,7 @@ static uint16 tab_uni_gbk6[]={
|
|||
0xD9DF,0xFD97,0xFD98,0xFD99,0xFD9A,0xFD9B};
|
||||
|
||||
/* page 7 0xF92C-0xFA29 */
|
||||
static uint16 tab_uni_gbk7[]={
|
||||
static const uint16 tab_uni_gbk7[]={
|
||||
0xFD9C, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
@ -9806,7 +9805,7 @@ static uint16 tab_uni_gbk7[]={
|
|||
0xFE4C, 0, 0,0xFE4D,0xFE4E,0xFE4F};
|
||||
|
||||
/* page 8 0xFE30-0xFFE5 */
|
||||
static uint16 tab_uni_gbk8[]={
|
||||
static const uint16 tab_uni_gbk8[]={
|
||||
0xA955,0xA6F2, 0,0xA6F4,0xA6F5,0xA6E0,0xA6E1,0xA6F0,
|
||||
0xA6F1,0xA6E2,0xA6E3,0xA6EE,0xA6EF,0xA6E6,0xA6E7,0xA6E4,
|
||||
0xA6E5,0xA6E8,0xA6E9,0xA6EA,0xA6EB, 0, 0, 0,
|
||||
|
@ -10023,7 +10022,7 @@ static MY_CHARSET_HANDLER my_charset_handler=
|
|||
};
|
||||
|
||||
|
||||
CHARSET_INFO my_charset_gbk_chinese_ci=
|
||||
struct charset_info_st my_charset_gbk_chinese_ci=
|
||||
{
|
||||
28,0,0, /* number */
|
||||
MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM, /* state */
|
||||
|
@ -10055,7 +10054,7 @@ CHARSET_INFO my_charset_gbk_chinese_ci=
|
|||
&my_collation_ci_handler
|
||||
};
|
||||
|
||||
CHARSET_INFO my_charset_gbk_bin=
|
||||
struct charset_info_st my_charset_gbk_bin=
|
||||
{
|
||||
87,0,0, /* number */
|
||||
MY_CS_COMPILED|MY_CS_BINSORT, /* state */
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include "m_string.h"
|
||||
#include "m_ctype.h"
|
||||
|
||||
static uchar ctype_latin1[] = {
|
||||
static const uchar ctype_latin1[] = {
|
||||
0,
|
||||
32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
|
||||
32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
|
||||
|
@ -37,7 +37,7 @@ static uchar ctype_latin1[] = {
|
|||
2, 2, 2, 2, 2, 2, 2, 16, 2, 2, 2, 2, 2, 2, 2, 2
|
||||
};
|
||||
|
||||
static uchar to_lower_latin1[] = {
|
||||
static const uchar to_lower_latin1[] = {
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
||||
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
||||
|
@ -56,7 +56,7 @@ static uchar to_lower_latin1[] = {
|
|||
240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
|
||||
};
|
||||
|
||||
static uchar to_upper_latin1[] = {
|
||||
static const uchar to_upper_latin1[] = {
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
||||
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
||||
|
@ -75,7 +75,7 @@ static uchar to_upper_latin1[] = {
|
|||
208,209,210,211,212,213,214,247,216,217,218,219,220,221,222,255
|
||||
};
|
||||
|
||||
static uchar sort_order_latin1[] = {
|
||||
static const uchar sort_order_latin1[] = {
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
||||
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
||||
|
@ -116,7 +116,7 @@ static uchar sort_order_latin1[] = {
|
|||
output doesn't reproduce these undefined characters.
|
||||
*/
|
||||
|
||||
unsigned short cs_to_uni[256]={
|
||||
static unsigned const short cs_to_uni[256]={
|
||||
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
|
||||
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
|
||||
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
|
||||
|
@ -150,7 +150,7 @@ unsigned short cs_to_uni[256]={
|
|||
0x00F0,0x00F1,0x00F2,0x00F3,0x00F4,0x00F5,0x00F6,0x00F7,
|
||||
0x00F8,0x00F9,0x00FA,0x00FB,0x00FC,0x00FD,0x00FE,0x00FF
|
||||
};
|
||||
uchar pl00[256]={
|
||||
static const uchar pl00[256]={
|
||||
0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
|
||||
0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
|
||||
0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,
|
||||
|
@ -184,7 +184,7 @@ uchar pl00[256]={
|
|||
0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,
|
||||
0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF
|
||||
};
|
||||
uchar pl01[256]={
|
||||
static const uchar pl01[256]={
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
|
@ -218,7 +218,7 @@ uchar pl01[256]={
|
|||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
|
||||
};
|
||||
uchar pl02[256]={
|
||||
static const uchar pl02[256]={
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
|
@ -252,7 +252,7 @@ uchar pl02[256]={
|
|||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
|
||||
};
|
||||
uchar pl20[256]={
|
||||
static const uchar pl20[256]={
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x96,0x97,0x00,0x00,0x00,
|
||||
|
@ -286,7 +286,7 @@ uchar pl20[256]={
|
|||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
|
||||
};
|
||||
uchar pl21[256]={
|
||||
static const uchar pl21[256]={
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
|
@ -320,7 +320,7 @@ uchar pl21[256]={
|
|||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
|
||||
};
|
||||
uchar *uni_to_cs[256]={
|
||||
static const uchar *const uni_to_cs[256]={
|
||||
pl00,pl01,pl02,NULL,NULL,NULL,NULL,NULL,
|
||||
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
|
||||
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
|
||||
|
@ -374,7 +374,7 @@ int my_wc_mb_latin1(CHARSET_INFO *cs __attribute__((unused)),
|
|||
uchar *str,
|
||||
uchar *end __attribute__((unused)))
|
||||
{
|
||||
uchar *pl;
|
||||
const uchar *pl;
|
||||
|
||||
if (str >= end)
|
||||
return MY_CS_TOOSMALL;
|
||||
|
@ -416,7 +416,7 @@ static MY_CHARSET_HANDLER my_charset_handler=
|
|||
};
|
||||
|
||||
|
||||
CHARSET_INFO my_charset_latin1=
|
||||
struct charset_info_st my_charset_latin1=
|
||||
{
|
||||
8,0,0, /* number */
|
||||
MY_CS_COMPILED | MY_CS_PRIMARY, /* state */
|
||||
|
@ -471,7 +471,7 @@ CHARSET_INFO my_charset_latin1=
|
|||
* Ü, ü, Ö, ö, Ä, ä
|
||||
*/
|
||||
|
||||
static uchar sort_order_latin1_de[] = {
|
||||
static const uchar sort_order_latin1_de[] = {
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
||||
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
||||
|
@ -495,7 +495,7 @@ static uchar sort_order_latin1_de[] = {
|
|||
same as sort_order_latin_de, but maps ALL accented chars to unaccented ones
|
||||
*/
|
||||
|
||||
uchar combo1map[]={
|
||||
static const uchar combo1map[]={
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
||||
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
||||
|
@ -514,7 +514,7 @@ uchar combo1map[]={
|
|||
68, 78, 79, 79, 79, 79, 79,247,216, 85, 85, 85, 85, 89,222, 89
|
||||
};
|
||||
|
||||
uchar combo2map[]={
|
||||
static const uchar combo2map[]={
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
@ -716,7 +716,7 @@ static MY_COLLATION_HANDLER my_collation_german2_ci_handler=
|
|||
};
|
||||
|
||||
|
||||
CHARSET_INFO my_charset_latin1_german2_ci=
|
||||
struct charset_info_st my_charset_latin1_german2_ci=
|
||||
{
|
||||
31,0,0, /* number */
|
||||
MY_CS_COMPILED|MY_CS_STRNXFRM, /* state */
|
||||
|
@ -749,7 +749,7 @@ CHARSET_INFO my_charset_latin1_german2_ci=
|
|||
};
|
||||
|
||||
|
||||
CHARSET_INFO my_charset_latin1_bin=
|
||||
struct charset_info_st my_charset_latin1_bin=
|
||||
{
|
||||
47,0,0, /* number */
|
||||
MY_CS_COMPILED|MY_CS_BINSORT, /* state */
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
size_t my_caseup_str_mb(CHARSET_INFO * cs, char *str)
|
||||
{
|
||||
register uint32 l;
|
||||
register uchar *map= cs->to_upper;
|
||||
register const uchar *map= cs->to_upper;
|
||||
char *str_orig= str;
|
||||
|
||||
while (*str)
|
||||
|
@ -44,7 +44,7 @@ size_t my_caseup_str_mb(CHARSET_INFO * cs, char *str)
|
|||
size_t my_casedn_str_mb(CHARSET_INFO * cs, char *str)
|
||||
{
|
||||
register uint32 l;
|
||||
register uchar *map= cs->to_lower;
|
||||
register const uchar *map= cs->to_lower;
|
||||
char *str_orig= str;
|
||||
|
||||
while (*str)
|
||||
|
@ -68,7 +68,7 @@ size_t my_caseup_mb(CHARSET_INFO * cs, char *src, size_t srclen,
|
|||
{
|
||||
register uint32 l;
|
||||
register char *srcend= src + srclen;
|
||||
register uchar *map= cs->to_upper;
|
||||
register const uchar *map= cs->to_upper;
|
||||
|
||||
DBUG_ASSERT(src == dst && srclen == dstlen);
|
||||
while (src < srcend)
|
||||
|
@ -91,7 +91,7 @@ size_t my_casedn_mb(CHARSET_INFO * cs, char *src, size_t srclen,
|
|||
{
|
||||
register uint32 l;
|
||||
register char *srcend= src + srclen;
|
||||
register uchar *map=cs->to_lower;
|
||||
register const uchar *map=cs->to_lower;
|
||||
|
||||
DBUG_ASSERT(src == dst && srclen == dstlen);
|
||||
while (src < srcend)
|
||||
|
@ -115,7 +115,7 @@ size_t my_casedn_mb(CHARSET_INFO * cs, char *src, size_t srclen,
|
|||
int my_strcasecmp_mb(CHARSET_INFO * cs,const char *s, const char *t)
|
||||
{
|
||||
register uint32 l;
|
||||
register uchar *map=cs->to_upper;
|
||||
register const uchar *map=cs->to_upper;
|
||||
|
||||
while (*s && *t)
|
||||
{
|
||||
|
@ -794,7 +794,7 @@ static int my_wildcmp_mb_bin(CHARSET_INFO *cs,
|
|||
Data was produced from EastAsianWidth.txt
|
||||
using utt11-dump utility.
|
||||
*/
|
||||
static char pg11[256]=
|
||||
static const char pg11[256]=
|
||||
{
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
|
@ -806,7 +806,7 @@ static char pg11[256]=
|
|||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
};
|
||||
|
||||
static char pg23[256]=
|
||||
static const char pg23[256]=
|
||||
{
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
|
@ -818,7 +818,7 @@ static char pg23[256]=
|
|||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
};
|
||||
|
||||
static char pg2E[256]=
|
||||
static const char pg2E[256]=
|
||||
{
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
|
@ -830,7 +830,7 @@ static char pg2E[256]=
|
|||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
};
|
||||
|
||||
static char pg2F[256]=
|
||||
static const char pg2F[256]=
|
||||
{
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
|
@ -842,7 +842,7 @@ static char pg2F[256]=
|
|||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0
|
||||
};
|
||||
|
||||
static char pg30[256]=
|
||||
static const char pg30[256]=
|
||||
{
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,
|
||||
|
@ -854,7 +854,7 @@ static char pg30[256]=
|
|||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
|
||||
};
|
||||
|
||||
static char pg31[256]=
|
||||
static const char pg31[256]=
|
||||
{
|
||||
0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
|
@ -866,7 +866,7 @@ static char pg31[256]=
|
|||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
|
||||
};
|
||||
|
||||
static char pg32[256]=
|
||||
static const char pg32[256]=
|
||||
{
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
|
@ -878,7 +878,7 @@ static char pg32[256]=
|
|||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0
|
||||
};
|
||||
|
||||
static char pg4D[256]=
|
||||
static const char pg4D[256]=
|
||||
{
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
|
@ -890,7 +890,7 @@ static char pg4D[256]=
|
|||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
};
|
||||
|
||||
static char pg9F[256]=
|
||||
static const char pg9F[256]=
|
||||
{
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
|
@ -902,7 +902,7 @@ static char pg9F[256]=
|
|||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
};
|
||||
|
||||
static char pgA4[256]=
|
||||
static const char pgA4[256]=
|
||||
{
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
|
@ -914,7 +914,7 @@ static char pgA4[256]=
|
|||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
};
|
||||
|
||||
static char pgD7[256]=
|
||||
static const char pgD7[256]=
|
||||
{
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
|
@ -926,7 +926,7 @@ static char pgD7[256]=
|
|||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
};
|
||||
|
||||
static char pgFA[256]=
|
||||
static const char pgFA[256]=
|
||||
{
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
|
@ -938,7 +938,7 @@ static char pgFA[256]=
|
|||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
};
|
||||
|
||||
static char pgFE[256]=
|
||||
static const char pgFE[256]=
|
||||
{
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
|
@ -950,7 +950,7 @@ static char pgFE[256]=
|
|||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
};
|
||||
|
||||
static char pgFF[256]=
|
||||
static const char pgFF[256]=
|
||||
{
|
||||
0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
|
@ -962,7 +962,7 @@ static char pgFF[256]=
|
|||
1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||
};
|
||||
|
||||
static struct {int page; char *p;} utr11_data[256]=
|
||||
static const struct {int page; const char *p;} utr11_data[256]=
|
||||
{
|
||||
{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},
|
||||
{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},{0,NULL},
|
||||
|
|
|
@ -75,7 +75,7 @@ size_t my_strnxfrm_simple(CHARSET_INFO * cs,
|
|||
uchar *dest, size_t len,
|
||||
const uchar *src, size_t srclen)
|
||||
{
|
||||
uchar *map= cs->sort_order;
|
||||
const uchar *map= cs->sort_order;
|
||||
size_t dstlen= len;
|
||||
set_if_smaller(len, srclen);
|
||||
if (dest != src)
|
||||
|
@ -101,7 +101,7 @@ int my_strnncoll_simple(CHARSET_INFO * cs, const uchar *s, size_t slen,
|
|||
my_bool t_is_prefix)
|
||||
{
|
||||
size_t len = ( slen > tlen ) ? tlen : slen;
|
||||
uchar *map= cs->sort_order;
|
||||
const uchar *map= cs->sort_order;
|
||||
if (t_is_prefix && slen > tlen)
|
||||
slen=tlen;
|
||||
while (len--)
|
||||
|
@ -195,7 +195,7 @@ int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, size_t a_length,
|
|||
|
||||
size_t my_caseup_str_8bit(CHARSET_INFO * cs,char *str)
|
||||
{
|
||||
register uchar *map= cs->to_upper;
|
||||
register const uchar *map= cs->to_upper;
|
||||
char *str_orig= str;
|
||||
while ((*str= (char) map[(uchar) *str]) != 0)
|
||||
str++;
|
||||
|
@ -205,7 +205,7 @@ size_t my_caseup_str_8bit(CHARSET_INFO * cs,char *str)
|
|||
|
||||
size_t my_casedn_str_8bit(CHARSET_INFO * cs,char *str)
|
||||
{
|
||||
register uchar *map= cs->to_lower;
|
||||
register const uchar *map= cs->to_lower;
|
||||
char *str_orig= str;
|
||||
while ((*str= (char) map[(uchar) *str]) != 0)
|
||||
str++;
|
||||
|
@ -218,7 +218,7 @@ size_t my_caseup_8bit(CHARSET_INFO * cs, char *src, size_t srclen,
|
|||
size_t dstlen __attribute__((unused)))
|
||||
{
|
||||
char *end= src + srclen;
|
||||
register uchar *map= cs->to_upper;
|
||||
register const uchar *map= cs->to_upper;
|
||||
DBUG_ASSERT(src == dst && srclen == dstlen);
|
||||
for ( ; src != end ; src++)
|
||||
*src= (char) map[(uchar) *src];
|
||||
|
@ -231,7 +231,7 @@ size_t my_casedn_8bit(CHARSET_INFO * cs, char *src, size_t srclen,
|
|||
size_t dstlen __attribute__((unused)))
|
||||
{
|
||||
char *end= src + srclen;
|
||||
register uchar *map=cs->to_lower;
|
||||
register const uchar *map=cs->to_lower;
|
||||
DBUG_ASSERT(src == dst && srclen == dstlen);
|
||||
for ( ; src != end ; src++)
|
||||
*src= (char) map[(uchar) *src];
|
||||
|
@ -240,7 +240,7 @@ size_t my_casedn_8bit(CHARSET_INFO * cs, char *src, size_t srclen,
|
|||
|
||||
int my_strcasecmp_8bit(CHARSET_INFO * cs,const char *s, const char *t)
|
||||
{
|
||||
register uchar *map=cs->to_upper;
|
||||
register const uchar *map=cs->to_upper;
|
||||
while (map[(uchar) *s] == map[(uchar) *t++])
|
||||
if (!*s++) return 0;
|
||||
return ((int) map[(uchar) s[0]] - (int) map[(uchar) t[-1]]);
|
||||
|
@ -303,7 +303,7 @@ void my_hash_sort_simple(CHARSET_INFO *cs,
|
|||
const uchar *key, size_t len,
|
||||
ulong *nr1, ulong *nr2)
|
||||
{
|
||||
register uchar *sort_order=cs->sort_order;
|
||||
register const uchar *sort_order=cs->sort_order;
|
||||
const uchar *end= key + len;
|
||||
|
||||
/*
|
||||
|
@ -1235,7 +1235,7 @@ skip:
|
|||
typedef struct
|
||||
{
|
||||
int nchars;
|
||||
MY_UNI_IDX uidx;
|
||||
struct my_uni_idx_st uidx;
|
||||
} uni_idx;
|
||||
|
||||
#define PLANE_SIZE 0x100
|
||||
|
@ -1253,10 +1253,12 @@ static int pcmp(const void * f, const void * s)
|
|||
return res;
|
||||
}
|
||||
|
||||
static my_bool create_fromuni(CHARSET_INFO *cs, void *(*alloc)(size_t))
|
||||
static my_bool create_fromuni(struct charset_info_st *cs,
|
||||
void *(*alloc)(size_t))
|
||||
{
|
||||
uni_idx idx[PLANE_NUM];
|
||||
int i,n;
|
||||
struct my_uni_idx_st *tab_from_uni;
|
||||
|
||||
/*
|
||||
Check that Unicode map is loaded.
|
||||
|
@ -1297,16 +1299,18 @@ static my_bool create_fromuni(CHARSET_INFO *cs, void *(*alloc)(size_t))
|
|||
for (i=0; i < PLANE_NUM; i++)
|
||||
{
|
||||
int ch,numchars;
|
||||
uchar *tab;
|
||||
|
||||
/* Skip empty plane */
|
||||
if (!idx[i].nchars)
|
||||
break;
|
||||
|
||||
numchars=idx[i].uidx.to-idx[i].uidx.from+1;
|
||||
if (!(idx[i].uidx.tab=(uchar*) alloc(numchars * sizeof(*idx[i].uidx.tab))))
|
||||
if (!(idx[i].uidx.tab= tab= (uchar*)
|
||||
alloc(numchars * sizeof(*idx[i].uidx.tab))))
|
||||
return TRUE;
|
||||
|
||||
bzero(idx[i].uidx.tab,numchars*sizeof(*idx[i].uidx.tab));
|
||||
bzero(tab,numchars*sizeof(*tab));
|
||||
|
||||
for (ch=1; ch < PLANE_SIZE; ch++)
|
||||
{
|
||||
|
@ -1314,25 +1318,27 @@ static my_bool create_fromuni(CHARSET_INFO *cs, void *(*alloc)(size_t))
|
|||
if (wc >= idx[i].uidx.from && wc <= idx[i].uidx.to && wc)
|
||||
{
|
||||
int ofs= wc - idx[i].uidx.from;
|
||||
idx[i].uidx.tab[ofs]= ch;
|
||||
tab[ofs]= ch;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Allocate and fill reverse table for each plane */
|
||||
n=i;
|
||||
if (!(cs->tab_from_uni= (MY_UNI_IDX*) alloc(sizeof(MY_UNI_IDX)*(n+1))))
|
||||
if (!(cs->tab_from_uni= tab_from_uni= (struct my_uni_idx_st*)
|
||||
alloc(sizeof(MY_UNI_IDX)*(n+1))))
|
||||
return TRUE;
|
||||
|
||||
for (i=0; i< n; i++)
|
||||
cs->tab_from_uni[i]= idx[i].uidx;
|
||||
tab_from_uni[i]= idx[i].uidx;
|
||||
|
||||
/* Set end-of-list marker */
|
||||
bzero(&cs->tab_from_uni[i],sizeof(MY_UNI_IDX));
|
||||
bzero(&tab_from_uni[i],sizeof(MY_UNI_IDX));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static my_bool my_cset_init_8bit(CHARSET_INFO *cs, void *(*alloc)(size_t))
|
||||
static my_bool my_cset_init_8bit(struct charset_info_st *cs,
|
||||
void *(*alloc)(size_t))
|
||||
{
|
||||
cs->caseup_multiply= 1;
|
||||
cs->casedn_multiply= 1;
|
||||
|
@ -1340,7 +1346,7 @@ static my_bool my_cset_init_8bit(CHARSET_INFO *cs, void *(*alloc)(size_t))
|
|||
return create_fromuni(cs, alloc);
|
||||
}
|
||||
|
||||
static void set_max_sort_char(CHARSET_INFO *cs)
|
||||
static void set_max_sort_char(struct charset_info_st *cs)
|
||||
{
|
||||
uchar max_char;
|
||||
uint i;
|
||||
|
@ -1359,7 +1365,7 @@ static void set_max_sort_char(CHARSET_INFO *cs)
|
|||
}
|
||||
}
|
||||
|
||||
static my_bool my_coll_init_simple(CHARSET_INFO *cs,
|
||||
static my_bool my_coll_init_simple(struct charset_info_st *cs,
|
||||
void *(*alloc)(size_t) __attribute__((unused)))
|
||||
{
|
||||
set_max_sort_char(cs);
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* .configure. mbmaxlen_sjis=2
|
||||
*/
|
||||
|
||||
static uchar NEAR ctype_sjis[257] =
|
||||
static const uchar NEAR ctype_sjis[257] =
|
||||
{
|
||||
0, /* For standard library */
|
||||
0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, /* NUL ^A - ^G */
|
||||
|
@ -68,7 +68,7 @@ static uchar NEAR ctype_sjis[257] =
|
|||
0020, 0020, 0020, 0020, 0020, 0000, 0000, 0000
|
||||
};
|
||||
|
||||
static uchar NEAR to_lower_sjis[]=
|
||||
static const uchar NEAR to_lower_sjis[]=
|
||||
{
|
||||
'\000','\001','\002','\003','\004','\005','\006','\007',
|
||||
'\010','\011','\012','\013','\014','\015','\016','\017',
|
||||
|
@ -104,7 +104,7 @@ static uchar NEAR to_lower_sjis[]=
|
|||
(uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377'
|
||||
};
|
||||
|
||||
static uchar NEAR to_upper_sjis[]=
|
||||
static const uchar NEAR to_upper_sjis[]=
|
||||
{
|
||||
'\000','\001','\002','\003','\004','\005','\006','\007',
|
||||
'\010','\011','\012','\013','\014','\015','\016','\017',
|
||||
|
@ -140,7 +140,7 @@ static uchar NEAR to_upper_sjis[]=
|
|||
(uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377'
|
||||
};
|
||||
|
||||
static uchar NEAR sort_order_sjis[]=
|
||||
static const uchar NEAR sort_order_sjis[]=
|
||||
{
|
||||
'\000','\001','\002','\003','\004','\005','\006','\007',
|
||||
'\010','\011','\012','\013','\014','\015','\016','\017',
|
||||
|
@ -384,7 +384,7 @@ static my_bool my_like_range_sjis(CHARSET_INFO *cs __attribute__((unused)),
|
|||
}
|
||||
|
||||
/* page 0 0x00A1-0x00DF */
|
||||
static uint16 tab_sjis_uni0[]={
|
||||
static const uint16 tab_sjis_uni0[]={
|
||||
0xFF61,0xFF62,0xFF63,0xFF64,0xFF65,0xFF66,0xFF67,0xFF68,
|
||||
0xFF69,0xFF6A,0xFF6B,0xFF6C,0xFF6D,0xFF6E,0xFF6F,0xFF70,
|
||||
0xFF71,0xFF72,0xFF73,0xFF74,0xFF75,0xFF76,0xFF77,0xFF78,
|
||||
|
@ -395,7 +395,7 @@ static uint16 tab_sjis_uni0[]={
|
|||
0xFF99,0xFF9A,0xFF9B,0xFF9C,0xFF9D,0xFF9E,0xFF9F};
|
||||
|
||||
/* page 1 0x8140-0x84BE */
|
||||
static uint16 tab_sjis_uni1[]={
|
||||
static const uint16 tab_sjis_uni1[]={
|
||||
0x3000,0x3001,0x3002,0xFF0C,0xFF0E,0x30FB,0xFF1A,0xFF1B,
|
||||
0xFF1F,0xFF01,0x309B,0x309C,0x00B4,0xFF40,0x00A8,0xFF3E,
|
||||
0xFFE3,0xFF3F,0x30FD,0x30FE,0x309D,0x309E,0x3003,0x4EDD,
|
||||
|
@ -510,7 +510,7 @@ static uint16 tab_sjis_uni1[]={
|
|||
0x2537,0x253F,0x251D,0x2530,0x2525,0x2538,0x2542};
|
||||
|
||||
/* page 2 0x889F-0x9FFC */
|
||||
static uint16 tab_sjis_uni2[]={
|
||||
static const uint16 tab_sjis_uni2[]={
|
||||
0x4E9C,0x5516,0x5A03,0x963F,0x54C0,0x611B,0x6328,0x59F6,
|
||||
0x9022,0x8475,0x831C,0x7A50,0x60AA,0x63E1,0x6E25,0x65ED,
|
||||
0x8466,0x82A6,0x9BF5,0x6893,0x5727,0x65A1,0x6271,0x5B9B,
|
||||
|
@ -1261,7 +1261,7 @@ static uint16 tab_sjis_uni2[]={
|
|||
0x6F3F,0x6EF2,0x6F31,0x6EEF,0x6F32,0x6ECC};
|
||||
|
||||
/* page 3 0xE040-0xEAA4 */
|
||||
static uint16 tab_sjis_uni3[]={
|
||||
static const uint16 tab_sjis_uni3[]={
|
||||
0x6F3E,0x6F13,0x6EF7,0x6F86,0x6F7A,0x6F78,0x6F81,0x6F80,
|
||||
0x6F6F,0x6F5B,0x6FF3,0x6F6D,0x6F82,0x6F7C,0x6F58,0x6F8E,
|
||||
0x6F91,0x6FC2,0x6F66,0x6FB3,0x6FA3,0x6FA1,0x6FA4,0x6FB9,
|
||||
|
@ -1608,7 +1608,7 @@ static int func_sjis_uni_onechar(int code){
|
|||
return(0);
|
||||
}
|
||||
/* page 0 0x005C-0x00F7 */
|
||||
static uint16 tab_uni_sjis0[]={
|
||||
static const uint16 tab_uni_sjis0[]={
|
||||
0x815F, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
@ -1631,7 +1631,7 @@ static uint16 tab_uni_sjis0[]={
|
|||
0, 0, 0,0x8180};
|
||||
|
||||
/* page 1 0x0391-0x0451 */
|
||||
static uint16 tab_uni_sjis1[]={
|
||||
static const uint16 tab_uni_sjis1[]={
|
||||
0x839F,0x83A0,0x83A1,0x83A2,0x83A3,0x83A4,0x83A5,0x83A6,
|
||||
0x83A7,0x83A8,0x83A9,0x83AA,0x83AB,0x83AC,0x83AD,0x83AE,
|
||||
0x83AF, 0,0x83B0,0x83B1,0x83B2,0x83B3,0x83B4,0x83B5,
|
||||
|
@ -1659,7 +1659,7 @@ static uint16 tab_uni_sjis1[]={
|
|||
0x8476};
|
||||
|
||||
/* page 2 0x2010-0x2312 */
|
||||
static uint16 tab_uni_sjis2[]={
|
||||
static const uint16 tab_uni_sjis2[]={
|
||||
0x815D, 0, 0, 0, 0,0x815C,0x8161, 0,
|
||||
0x8165,0x8166, 0, 0,0x8167,0x8168, 0, 0,
|
||||
0x81F5,0x81F6, 0, 0, 0,0x8164,0x8163, 0,
|
||||
|
@ -1759,7 +1759,7 @@ static uint16 tab_uni_sjis2[]={
|
|||
0, 0,0x81DC};
|
||||
|
||||
/* page 3 0x2500-0x266F */
|
||||
static uint16 tab_uni_sjis3[]={
|
||||
static const uint16 tab_uni_sjis3[]={
|
||||
0x849F,0x84AA,0x84A0,0x84AB, 0, 0, 0, 0,
|
||||
0, 0, 0, 0,0x84A1, 0, 0,0x84AC,
|
||||
0x84A2, 0, 0,0x84AD,0x84A4, 0, 0,0x84AF,
|
||||
|
@ -1809,7 +1809,7 @@ static uint16 tab_uni_sjis3[]={
|
|||
};
|
||||
|
||||
/* page 4 0x3000-0x30FE */
|
||||
static uint16 tab_uni_sjis4[]={
|
||||
static const uint16 tab_uni_sjis4[]={
|
||||
0x8140,0x8141,0x8142,0x8156, 0,0x8158,0x8159,0x815A,
|
||||
0x8171,0x8172,0x8173,0x8174,0x8175,0x8176,0x8177,0x8178,
|
||||
0x8179,0x817A,0x81A7,0x81AC,0x816B,0x816C, 0, 0,
|
||||
|
@ -1844,7 +1844,7 @@ static uint16 tab_uni_sjis4[]={
|
|||
0, 0, 0,0x8145,0x815B,0x8152,0x8153};
|
||||
|
||||
/* page 5 0x4E00-0x9481 */
|
||||
static uint16 tab_uni_sjis5[]={
|
||||
static const uint16 tab_uni_sjis5[]={
|
||||
0x88EA,0x929A, 0,0x8EB5, 0, 0, 0,0x969C,
|
||||
0x8FE4,0x8E4F,0x8FE3,0x89BA, 0,0x9573,0x975E, 0,
|
||||
0x98A0,0x894E, 0, 0,0x8A8E,0x98A1,0x90A2,0x99C0,
|
||||
|
@ -4104,7 +4104,7 @@ static uint16 tab_uni_sjis5[]={
|
|||
0,0xE876};
|
||||
|
||||
/* page 6 0x9577-0x9FA0 */
|
||||
static uint16 tab_uni_sjis6[]={
|
||||
static const uint16 tab_uni_sjis6[]={
|
||||
0x92B7, 0, 0, 0, 0, 0, 0, 0,
|
||||
0,0x96E5, 0,0xE878,0x914D, 0, 0, 0,
|
||||
0xE879, 0,0x95C2,0xE87A,0x8A4A, 0, 0, 0,
|
||||
|
@ -4433,7 +4433,7 @@ static uint16 tab_uni_sjis6[]={
|
|||
0,0xEA9E};
|
||||
|
||||
/* page 7 0xFF01-0xFFE5 */
|
||||
static uint16 tab_uni_sjis7[]={
|
||||
static const uint16 tab_uni_sjis7[]={
|
||||
0x8149, 0,0x8194,0x8190,0x8193,0x8195, 0,0x8169,
|
||||
0x816A,0x8196,0x817B,0x8143, 0,0x8144,0x815E,0x824F,
|
||||
0x8250,0x8251,0x8252,0x8253,0x8254,0x8255,0x8256,0x8257,
|
||||
|
@ -4669,7 +4669,7 @@ static MY_CHARSET_HANDLER my_charset_handler=
|
|||
};
|
||||
|
||||
|
||||
CHARSET_INFO my_charset_sjis_japanese_ci=
|
||||
struct charset_info_st my_charset_sjis_japanese_ci=
|
||||
{
|
||||
13,0,0, /* number */
|
||||
MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM|MY_CS_NONASCII, /* state */
|
||||
|
@ -4701,7 +4701,7 @@ CHARSET_INFO my_charset_sjis_japanese_ci=
|
|||
&my_collation_ci_handler
|
||||
};
|
||||
|
||||
CHARSET_INFO my_charset_sjis_bin=
|
||||
struct charset_info_st my_charset_sjis_bin=
|
||||
{
|
||||
88,0,0, /* number */
|
||||
MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_NONASCII, /* state */
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
#define X L_MIDDLE
|
||||
|
||||
|
||||
static int t_ctype[][TOT_LEVELS] = {
|
||||
static const int t_ctype[][TOT_LEVELS] = {
|
||||
/*0x00*/ { IGNORE, IGNORE, IGNORE, IGNORE, X },
|
||||
/*0x01*/ { IGNORE, IGNORE, IGNORE, IGNORE, X },
|
||||
/*0x02*/ { IGNORE, IGNORE, IGNORE, IGNORE, X },
|
||||
|
@ -416,7 +416,7 @@ static uchar NEAR to_upper_tis620[]=
|
|||
(uchar) '\370',(uchar) '\371',(uchar) '\372',(uchar) '\373',(uchar) '\374',(uchar) '\375',(uchar) '\376',(uchar) '\377',
|
||||
};
|
||||
|
||||
static uchar NEAR sort_order_tis620[]=
|
||||
static const uchar NEAR sort_order_tis620[]=
|
||||
{
|
||||
'\000','\001','\002','\003','\004','\005','\006','\007',
|
||||
'\010','\011','\012','\013','\014','\015','\016','\017',
|
||||
|
@ -476,7 +476,7 @@ static size_t thai2sortable(uchar *tstr, size_t len)
|
|||
|
||||
if (isthai(c))
|
||||
{
|
||||
int *t_ctype0= t_ctype[c];
|
||||
const int *t_ctype0= t_ctype[c];
|
||||
|
||||
if (isconsnt(c))
|
||||
l2bias -= 8;
|
||||
|
@ -647,7 +647,7 @@ size_t my_strnxfrm_tis620(CHARSET_INFO *cs __attribute__((unused)),
|
|||
}
|
||||
|
||||
|
||||
static unsigned short cs_to_uni[256]={
|
||||
static const unsigned short cs_to_uni[256]={
|
||||
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
|
||||
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
|
||||
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
|
||||
|
@ -681,7 +681,7 @@ static unsigned short cs_to_uni[256]={
|
|||
0x0E50,0x0E51,0x0E52,0x0E53,0x0E54,0x0E55,0x0E56,0x0E57,
|
||||
0x0E58,0x0E59,0x0E5A,0x0E5B,0xFFFD,0xFFFD,0xFFFD,0xFFFD
|
||||
};
|
||||
static uchar pl00[256]={
|
||||
static const uchar pl00[256]={
|
||||
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
|
||||
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
|
||||
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
|
||||
|
@ -715,7 +715,7 @@ static uchar pl00[256]={
|
|||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
|
||||
};
|
||||
static uchar pl0E[256]={
|
||||
static const uchar pl0E[256]={
|
||||
0x0000,0x00A1,0x00A2,0x00A3,0x00A4,0x00A5,0x00A6,0x00A7,
|
||||
0x00A8,0x00A9,0x00AA,0x00AB,0x00AC,0x00AD,0x00AE,0x00AF,
|
||||
0x00B0,0x00B1,0x00B2,0x00B3,0x00B4,0x00B5,0x00B6,0x00B7,
|
||||
|
@ -749,7 +749,7 @@ static uchar pl0E[256]={
|
|||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
|
||||
};
|
||||
static uchar plFF[256]={
|
||||
static const uchar plFF[256]={
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
|
@ -783,7 +783,7 @@ static uchar plFF[256]={
|
|||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x00FF,0x0000,0x0000
|
||||
};
|
||||
static uchar *uni_to_cs[256]={
|
||||
static const uchar *const uni_to_cs[256]={
|
||||
pl00,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
|
||||
NULL,NULL,NULL,NULL,NULL,NULL,pl0E,NULL,
|
||||
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
|
||||
|
@ -838,7 +838,7 @@ int my_wc_mb_tis620(CHARSET_INFO *cs __attribute__((unused)),
|
|||
uchar *str,
|
||||
uchar *end __attribute__((unused)))
|
||||
{
|
||||
uchar *pl;
|
||||
const uchar *pl;
|
||||
|
||||
if (str >= end)
|
||||
return MY_CS_TOOSMALL;
|
||||
|
@ -897,7 +897,7 @@ static MY_CHARSET_HANDLER my_charset_handler=
|
|||
|
||||
|
||||
|
||||
CHARSET_INFO my_charset_tis620_thai_ci=
|
||||
struct charset_info_st my_charset_tis620_thai_ci=
|
||||
{
|
||||
18,0,0, /* number */
|
||||
MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM, /* state */
|
||||
|
@ -929,7 +929,7 @@ CHARSET_INFO my_charset_tis620_thai_ci=
|
|||
&my_collation_ci_handler
|
||||
};
|
||||
|
||||
CHARSET_INFO my_charset_tis620_bin=
|
||||
struct charset_info_st my_charset_tis620_bin=
|
||||
{
|
||||
89,0,0, /* number */
|
||||
MY_CS_COMPILED|MY_CS_BINSORT, /* state */
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -32,7 +32,7 @@
|
|||
#endif
|
||||
|
||||
|
||||
static uchar ctype_ucs2[] = {
|
||||
static const uchar ctype_ucs2[] = {
|
||||
0,
|
||||
32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
|
||||
32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
|
||||
|
@ -52,7 +52,7 @@ static uchar ctype_ucs2[] = {
|
|||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
};
|
||||
|
||||
static uchar to_lower_ucs2[] = {
|
||||
static const uchar to_lower_ucs2[] = {
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
||||
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
||||
|
@ -71,7 +71,7 @@ static uchar to_lower_ucs2[] = {
|
|||
240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
|
||||
};
|
||||
|
||||
static uchar to_upper_ucs2[] = {
|
||||
static const uchar to_upper_ucs2[] = {
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
||||
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
||||
|
@ -120,7 +120,7 @@ static size_t my_caseup_ucs2(CHARSET_INFO *cs, char *src, size_t srclen,
|
|||
my_wc_t wc;
|
||||
int res;
|
||||
char *srcend= src + srclen;
|
||||
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
|
||||
MY_UNICASE_INFO *const *uni_plane= cs->caseinfo;
|
||||
DBUG_ASSERT(src == dst && srclen == dstlen);
|
||||
|
||||
while ((src < srcend) &&
|
||||
|
@ -142,7 +142,7 @@ static void my_hash_sort_ucs2(CHARSET_INFO *cs, const uchar *s, size_t slen,
|
|||
my_wc_t wc;
|
||||
int res;
|
||||
const uchar *e=s+slen;
|
||||
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
|
||||
MY_UNICASE_INFO *const *uni_plane= cs->caseinfo;
|
||||
|
||||
while (e > s+1 && e[-1] == ' ' && e[-2] == '\0')
|
||||
e-= 2;
|
||||
|
@ -174,7 +174,7 @@ static size_t my_casedn_ucs2(CHARSET_INFO *cs, char *src, size_t srclen,
|
|||
my_wc_t wc;
|
||||
int res;
|
||||
char *srcend= src + srclen;
|
||||
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
|
||||
MY_UNICASE_INFO *const *uni_plane= cs->caseinfo;
|
||||
DBUG_ASSERT(src == dst && srclen == dstlen);
|
||||
|
||||
while ((src < srcend) &&
|
||||
|
@ -206,7 +206,7 @@ static int my_strnncoll_ucs2(CHARSET_INFO *cs,
|
|||
my_wc_t UNINIT_VAR(s_wc),t_wc;
|
||||
const uchar *se=s+slen;
|
||||
const uchar *te=t+tlen;
|
||||
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
|
||||
MY_UNICASE_INFO *const *uni_plane= cs->caseinfo;
|
||||
|
||||
while ( s < se && t < te )
|
||||
{
|
||||
|
@ -270,7 +270,7 @@ static int my_strnncollsp_ucs2(CHARSET_INFO *cs __attribute__((unused)),
|
|||
{
|
||||
const uchar *se, *te;
|
||||
size_t minlen;
|
||||
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
|
||||
MY_UNICASE_INFO *const *uni_plane= cs->caseinfo;
|
||||
|
||||
/* extra safety to make sure the lengths are even numbers */
|
||||
slen&= ~1;
|
||||
|
@ -320,7 +320,7 @@ static int my_strncasecmp_ucs2(CHARSET_INFO *cs,
|
|||
my_wc_t UNINIT_VAR(s_wc),t_wc;
|
||||
const char *se=s+len;
|
||||
const char *te=t+len;
|
||||
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
|
||||
MY_UNICASE_INFO *const *uni_plane= cs->caseinfo;
|
||||
|
||||
while ( s < se && t < te )
|
||||
{
|
||||
|
@ -369,7 +369,7 @@ static size_t my_strnxfrm_ucs2(CHARSET_INFO *cs,
|
|||
int plane;
|
||||
uchar *de = dst + dstlen;
|
||||
const uchar *se = src + srclen;
|
||||
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
|
||||
MY_UNICASE_INFO *const *uni_plane= cs->caseinfo;
|
||||
|
||||
while( src < se && dst < de )
|
||||
{
|
||||
|
@ -1360,7 +1360,7 @@ int my_wildcmp_ucs2_ci(CHARSET_INFO *cs,
|
|||
const char *wildstr,const char *wildend,
|
||||
int escape, int w_one, int w_many)
|
||||
{
|
||||
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
|
||||
MY_UNICASE_INFO *const *uni_plane= cs->caseinfo;
|
||||
return my_wildcmp_unicode(cs,str,str_end,wildstr,wildend,
|
||||
escape,w_one,w_many,uni_plane);
|
||||
}
|
||||
|
@ -1718,7 +1718,7 @@ MY_CHARSET_HANDLER my_charset_ucs2_handler=
|
|||
};
|
||||
|
||||
|
||||
CHARSET_INFO my_charset_ucs2_general_ci=
|
||||
struct charset_info_st my_charset_ucs2_general_ci=
|
||||
{
|
||||
35,0,0, /* number */
|
||||
MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII,
|
||||
|
@ -1750,7 +1750,7 @@ CHARSET_INFO my_charset_ucs2_general_ci=
|
|||
&my_collation_ucs2_general_ci_handler
|
||||
};
|
||||
|
||||
CHARSET_INFO my_charset_ucs2_bin=
|
||||
struct charset_info_st my_charset_ucs2_bin=
|
||||
{
|
||||
90,0,0, /* number */
|
||||
MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_UNICODE|MY_CS_NONASCII,
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1486,7 +1486,7 @@ static MY_UNICASE_INFO planeFF[]={
|
|||
{0xFFFE,0xFFFE,0xFFFE}, {0xFFFF,0xFFFF,0xFFFF}
|
||||
};
|
||||
|
||||
MY_UNICASE_INFO *my_unicase_default[256]={
|
||||
MY_UNICASE_INFO *const my_unicase_default[256]={
|
||||
plane00, plane01, plane02, plane03, plane04, plane05, NULL, NULL,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
|
@ -1665,7 +1665,7 @@ static MY_UNICASE_INFO turk00[]=
|
|||
|
||||
|
||||
|
||||
MY_UNICASE_INFO *my_unicase_turkish[256]=
|
||||
MY_UNICASE_INFO *const my_unicase_turkish[256]=
|
||||
{
|
||||
turk00, plane01, plane02, plane03, plane04, plane05, NULL, NULL,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
|
@ -1716,14 +1716,12 @@ int my_wildcmp_unicode(CHARSET_INFO *cs,
|
|||
const char *str,const char *str_end,
|
||||
const char *wildstr,const char *wildend,
|
||||
int escape, int w_one, int w_many,
|
||||
MY_UNICASE_INFO **weights)
|
||||
MY_UNICASE_INFO *const *weights)
|
||||
{
|
||||
int result= -1; /* Not found, using wildcards */
|
||||
my_wc_t s_wc, w_wc;
|
||||
int scan, plane;
|
||||
int (*mb_wc)(struct charset_info_st *, my_wc_t *,
|
||||
const uchar *, const uchar *);
|
||||
mb_wc= cs->cset->mb_wc;
|
||||
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
|
||||
|
||||
while (wildstr != wildend)
|
||||
{
|
||||
|
@ -1873,7 +1871,7 @@ int my_wildcmp_unicode(CHARSET_INFO *cs,
|
|||
expressions. Note, there is no need to mark byte 255 as a
|
||||
letter, it is illegal byte in UTF8.
|
||||
*/
|
||||
static uchar ctype_utf8[] = {
|
||||
static const uchar ctype_utf8[] = {
|
||||
0,
|
||||
32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32,
|
||||
32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
|
||||
|
@ -1895,7 +1893,7 @@ static uchar ctype_utf8[] = {
|
|||
|
||||
/* The below are taken from usa7 implementation */
|
||||
|
||||
static uchar to_lower_utf8[] = {
|
||||
static const uchar to_lower_utf8[] = {
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
||||
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
||||
|
@ -1914,7 +1912,7 @@ static uchar to_lower_utf8[] = {
|
|||
240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
|
||||
};
|
||||
|
||||
static uchar to_upper_utf8[] = {
|
||||
static const uchar to_upper_utf8[] = {
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
||||
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
||||
|
@ -2174,7 +2172,7 @@ static size_t my_caseup_utf8(CHARSET_INFO *cs, char *src, size_t srclen,
|
|||
my_wc_t wc;
|
||||
int srcres, dstres;
|
||||
char *srcend= src + srclen, *dstend= dst + dstlen, *dst0= dst;
|
||||
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
|
||||
MY_UNICASE_INFO *const *uni_plane= cs->caseinfo;
|
||||
DBUG_ASSERT(src != dst || cs->caseup_multiply == 1);
|
||||
|
||||
while ((src < srcend) &&
|
||||
|
@ -2197,7 +2195,7 @@ static void my_hash_sort_utf8(CHARSET_INFO *cs, const uchar *s, size_t slen,
|
|||
my_wc_t wc;
|
||||
int res;
|
||||
const uchar *e=s+slen;
|
||||
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
|
||||
MY_UNICASE_INFO *const *uni_plane= cs->caseinfo;
|
||||
|
||||
/*
|
||||
Remove end space. We have to do this to be able to compare
|
||||
|
@ -2224,7 +2222,7 @@ static size_t my_caseup_str_utf8(CHARSET_INFO *cs, char *src)
|
|||
my_wc_t wc;
|
||||
int srcres, dstres;
|
||||
char *dst= src, *dst0= src;
|
||||
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
|
||||
MY_UNICASE_INFO *const *uni_plane= cs->caseinfo;
|
||||
DBUG_ASSERT(cs->caseup_multiply == 1);
|
||||
|
||||
while (*src &&
|
||||
|
@ -2248,7 +2246,7 @@ static size_t my_casedn_utf8(CHARSET_INFO *cs, char *src, size_t srclen,
|
|||
my_wc_t wc;
|
||||
int srcres, dstres;
|
||||
char *srcend= src + srclen, *dstend= dst + dstlen, *dst0= dst;
|
||||
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
|
||||
MY_UNICASE_INFO *const *uni_plane= cs->caseinfo;
|
||||
DBUG_ASSERT(src != dst || cs->casedn_multiply == 1);
|
||||
|
||||
while ((src < srcend) &&
|
||||
|
@ -2270,7 +2268,7 @@ static size_t my_casedn_str_utf8(CHARSET_INFO *cs, char *src)
|
|||
my_wc_t wc;
|
||||
int srcres, dstres;
|
||||
char *dst= src, *dst0= src;
|
||||
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
|
||||
MY_UNICASE_INFO *const *uni_plane= cs->caseinfo;
|
||||
DBUG_ASSERT(cs->casedn_multiply == 1);
|
||||
|
||||
while (*src &&
|
||||
|
@ -2313,7 +2311,7 @@ static int my_strnncoll_utf8(CHARSET_INFO *cs,
|
|||
my_wc_t UNINIT_VAR(s_wc), t_wc;
|
||||
const uchar *se=s+slen;
|
||||
const uchar *te=t+tlen;
|
||||
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
|
||||
MY_UNICASE_INFO *const *uni_plane= cs->caseinfo;
|
||||
|
||||
while ( s < se && t < te )
|
||||
{
|
||||
|
@ -2382,7 +2380,7 @@ static int my_strnncollsp_utf8(CHARSET_INFO *cs,
|
|||
int s_res, t_res, res;
|
||||
my_wc_t UNINIT_VAR(s_wc),t_wc;
|
||||
const uchar *se= s+slen, *te= t+tlen;
|
||||
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
|
||||
MY_UNICASE_INFO *const *uni_plane= cs->caseinfo;
|
||||
|
||||
#ifndef VARCHAR_WITH_DIFF_ENDSPACE_ARE_DIFFERENT_FOR_UNIQUE
|
||||
diff_if_only_endspace_difference= 0;
|
||||
|
@ -2470,7 +2468,7 @@ static int my_strnncollsp_utf8(CHARSET_INFO *cs,
|
|||
static
|
||||
int my_strcasecmp_utf8(CHARSET_INFO *cs, const char *s, const char *t)
|
||||
{
|
||||
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
|
||||
MY_UNICASE_INFO *const *uni_plane= cs->caseinfo;
|
||||
while (s[0] && t[0])
|
||||
{
|
||||
my_wc_t s_wc,t_wc;
|
||||
|
@ -2555,7 +2553,7 @@ int my_wildcmp_utf8(CHARSET_INFO *cs,
|
|||
const char *wildstr,const char *wildend,
|
||||
int escape, int w_one, int w_many)
|
||||
{
|
||||
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
|
||||
MY_UNICASE_INFO *const *uni_plane= cs->caseinfo;
|
||||
return my_wildcmp_unicode(cs,str,str_end,wildstr,wildend,
|
||||
escape,w_one,w_many,uni_plane);
|
||||
}
|
||||
|
@ -2579,7 +2577,7 @@ static size_t my_strnxfrm_utf8(CHARSET_INFO *cs,
|
|||
uchar *de= dst + dstlen;
|
||||
uchar *de_beg= de - 1;
|
||||
const uchar *se = src + srclen;
|
||||
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
|
||||
MY_UNICASE_INFO *const *uni_plane= cs->caseinfo;
|
||||
|
||||
while (dst < de_beg)
|
||||
{
|
||||
|
@ -2685,7 +2683,7 @@ MY_CHARSET_HANDLER my_charset_utf8_handler=
|
|||
|
||||
|
||||
|
||||
CHARSET_INFO my_charset_utf8_general_ci=
|
||||
struct charset_info_st my_charset_utf8_general_ci=
|
||||
{
|
||||
33,0,0, /* number */
|
||||
MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM|MY_CS_UNICODE, /* state */
|
||||
|
@ -2718,7 +2716,7 @@ CHARSET_INFO my_charset_utf8_general_ci=
|
|||
};
|
||||
|
||||
|
||||
CHARSET_INFO my_charset_utf8_bin=
|
||||
struct charset_info_st my_charset_utf8_bin=
|
||||
{
|
||||
83,0,0, /* number */
|
||||
MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_UNICODE, /* state */
|
||||
|
@ -2770,7 +2768,7 @@ static int my_strnncoll_utf8_cs(CHARSET_INFO *cs,
|
|||
const uchar *te=t+tlen;
|
||||
int save_diff = 0;
|
||||
int diff;
|
||||
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
|
||||
MY_UNICASE_INFO *const *uni_plane= cs->caseinfo;
|
||||
|
||||
while ( s < se && t < te )
|
||||
{
|
||||
|
@ -2815,7 +2813,7 @@ static int my_strnncollsp_utf8_cs(CHARSET_INFO *cs,
|
|||
const uchar *se= s + slen;
|
||||
const uchar *te= t + tlen;
|
||||
int save_diff= 0;
|
||||
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
|
||||
MY_UNICASE_INFO *const *uni_plane= cs->caseinfo;
|
||||
|
||||
#ifndef VARCHAR_WITH_DIFF_ENDSPACE_ARE_DIFFERENT_FOR_UNIQUE
|
||||
diff_if_only_endspace_difference= 0;
|
||||
|
@ -2901,7 +2899,7 @@ static MY_COLLATION_HANDLER my_collation_cs_handler =
|
|||
my_propagate_simple
|
||||
};
|
||||
|
||||
CHARSET_INFO my_charset_utf8_general_cs=
|
||||
struct charset_info_st my_charset_utf8_general_cs=
|
||||
{
|
||||
254,0,0, /* number */
|
||||
MY_CS_COMPILED|MY_CS_UNICODE, /* state */
|
||||
|
@ -2959,7 +2957,7 @@ All other characters are encoded using five bytes:
|
|||
*/
|
||||
|
||||
|
||||
static uint16 touni[5994]=
|
||||
static const uint16 touni[5994]=
|
||||
{
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
|
||||
|
@ -3715,7 +3713,7 @@ static uint16 touni[5994]=
|
|||
|
||||
|
||||
/* 00C0-05FF */
|
||||
static uint16 uni_0C00_05FF[1344]=
|
||||
static const uint16 uni_0C00_05FF[1344]=
|
||||
{
|
||||
0x0017,0x0018,0x0019,0x001A,0x001B,0x001C,0x001D,0x001E,
|
||||
0x001F,0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,
|
||||
|
@ -3959,7 +3957,7 @@ static uint16 uni_1E00_1FFF[512]=
|
|||
|
||||
|
||||
/* 2160-217F */
|
||||
static uint16 uni_2160_217F[32]=
|
||||
static const uint16 uni_2160_217F[32]=
|
||||
{
|
||||
0x0739,0x0789,0x07D9,0x0829,0x0879,0x08C9,0x0919,0x0969,
|
||||
0x09B9,0x0A09,0x0A59,0x0AA9,0x0AF9,0x0B49,0x0B99,0x0BE9,
|
||||
|
@ -3969,7 +3967,7 @@ static uint16 uni_2160_217F[32]=
|
|||
|
||||
|
||||
/* 24B0-24EF */
|
||||
static uint16 uni_24B0_24EF[64]=
|
||||
static const uint16 uni_24B0_24EF[64]=
|
||||
{
|
||||
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0511,0x0512,
|
||||
0x0513,0x0514,0x0515,0x0516,0x0517,0x0518,0x0519,0x051A,
|
||||
|
@ -3983,7 +3981,7 @@ static uint16 uni_24B0_24EF[64]=
|
|||
|
||||
|
||||
/* FF20-FF5F */
|
||||
static uint16 uni_FF20_FF5F[64]=
|
||||
static const uint16 uni_FF20_FF5F[64]=
|
||||
{
|
||||
0x0000,0x0560,0x05B0,0x0600,0x0650,0x06A0,0x06F0,0x0740,
|
||||
0x0790,0x07E0,0x0830,0x0880,0x08D0,0x0920,0x0970,0x09C0,
|
||||
|
@ -4007,7 +4005,7 @@ static uint16 uni_FF20_FF5F[64]=
|
|||
|
||||
static int hexlo(int x)
|
||||
{
|
||||
static char hex_lo_digit[256]=
|
||||
static const char hex_lo_digit[256]=
|
||||
{
|
||||
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
|
||||
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */
|
||||
|
@ -4038,7 +4036,7 @@ static int hexlo(int x)
|
|||
0..9 digits
|
||||
_ underscore
|
||||
*/
|
||||
static char filename_safe_char[128]=
|
||||
static const char filename_safe_char[128]=
|
||||
{
|
||||
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ................ */
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ................ */
|
||||
|
@ -4197,7 +4195,7 @@ static MY_CHARSET_HANDLER my_charset_filename_handler=
|
|||
|
||||
|
||||
|
||||
CHARSET_INFO my_charset_filename=
|
||||
struct charset_info_st my_charset_filename=
|
||||
{
|
||||
17,0,0, /* number */
|
||||
MY_CS_COMPILED|MY_CS_PRIMARY|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_HIDDEN|MY_CS_NONASCII,
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
#ifdef HAVE_CHARSET_cp1250
|
||||
|
||||
|
||||
static uint16 tab_cp1250_uni[256]={
|
||||
static const uint16 tab_cp1250_uni[256]={
|
||||
0,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,
|
||||
0x0008,0x0009,0x000A,0x000B,0x000C,0x000D,0x000E,0x000F,
|
||||
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,
|
||||
|
@ -90,7 +90,7 @@ static uint16 tab_cp1250_uni[256]={
|
|||
|
||||
|
||||
/* 0000-00FD , 254 chars */
|
||||
static uchar tab_uni_cp1250_plane00[]={
|
||||
static const uchar tab_uni_cp1250_plane00[]={
|
||||
0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F,
|
||||
0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,
|
||||
0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,0x2C,0x2D,0x2E,0x2F,
|
||||
|
@ -109,7 +109,7 @@ static uchar tab_uni_cp1250_plane00[]={
|
|||
0x00,0x00,0x00,0xF3,0xF4,0x00,0xF6,0xF7,0x00,0x00,0xFA,0x00,0xFC,0xFD};
|
||||
|
||||
/* 0102-017E , 125 chars */
|
||||
static uchar tab_uni_cp1250_plane01[]={
|
||||
static const uchar tab_uni_cp1250_plane01[]={
|
||||
0xC3,0xE3,0xA5,0xB9,0xC6,0xE6,0x00,0x00,0x00,0x00,0xC8,0xE8,0xCF,0xEF,0xD0,0xF0,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0xCA,0xEA,0xCC,0xEC,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
|
@ -120,7 +120,7 @@ static uchar tab_uni_cp1250_plane01[]={
|
|||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8F,0x9F,0xAF,0xBF,0x8E,0x9E};
|
||||
|
||||
/* 2013-20AC , 154 chars */
|
||||
static uchar tab_uni_cp1250_plane20[]={
|
||||
static const uchar tab_uni_cp1250_plane20[]={
|
||||
0x96,0x97,0x00,0x00,0x00,0x91,0x92,0x82,0x00,0x93,0x94,0x84,0x00,0x86,0x87,0x95,
|
||||
0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x89,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x8B,0x9B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
|
@ -133,12 +133,12 @@ static uchar tab_uni_cp1250_plane20[]={
|
|||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80};
|
||||
|
||||
/* 02C7-02DD , 23 chars */
|
||||
static uchar tab_uni_cp1250_plane02[]={
|
||||
static const uchar tab_uni_cp1250_plane02[]={
|
||||
0xA1,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0xA2,0xFF,0x00,0xB2,0x00,0xBD};
|
||||
|
||||
/* 2122-2122 , 1 chars */
|
||||
static uchar tab_uni_cp1250_plane21[]={
|
||||
static const uchar tab_uni_cp1250_plane21[]={
|
||||
0x99};
|
||||
|
||||
|
||||
|
@ -152,7 +152,7 @@ static MY_UNI_IDX idx_uni_cp1250[]={
|
|||
};
|
||||
|
||||
|
||||
static uchar NEAR ctype_win1250ch[] = {
|
||||
static const uchar NEAR ctype_win1250ch[] = {
|
||||
0x00,
|
||||
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
|
||||
0x20, 0x28, 0x28, 0x28, 0x28, 0x28, 0x20, 0x20,
|
||||
|
@ -188,7 +188,7 @@ static uchar NEAR ctype_win1250ch[] = {
|
|||
0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x10
|
||||
};
|
||||
|
||||
static uchar NEAR to_lower_win1250ch[] = {
|
||||
static const uchar NEAR to_lower_win1250ch[] = {
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
|
||||
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
|
||||
|
@ -223,7 +223,7 @@ static uchar NEAR to_lower_win1250ch[] = {
|
|||
0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
|
||||
};
|
||||
|
||||
static uchar NEAR to_upper_win1250ch[] = {
|
||||
static const uchar NEAR to_upper_win1250ch[] = {
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
|
||||
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
|
||||
|
@ -260,7 +260,7 @@ static uchar NEAR to_upper_win1250ch[] = {
|
|||
|
||||
|
||||
|
||||
static uchar NEAR sort_order_win1250ch[] = {
|
||||
static const uchar NEAR sort_order_win1250ch[] = {
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
|
||||
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
||||
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
|
||||
|
@ -279,7 +279,7 @@ static uchar NEAR sort_order_win1250ch[] = {
|
|||
240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255
|
||||
};
|
||||
|
||||
static uchar NEAR _sort_order_win1250ch1[] = {
|
||||
static const uchar NEAR _sort_order_win1250ch1[] = {
|
||||
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
|
||||
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
|
||||
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81,
|
||||
|
@ -404,7 +404,7 @@ struct wordvalue {
|
|||
uchar pass1;
|
||||
uchar pass2;
|
||||
};
|
||||
static struct wordvalue doubles[] = {
|
||||
static const struct wordvalue doubles[] = {
|
||||
{ (uchar*) "ch", 0xad, 0x03 },
|
||||
{ (uchar*) "c", 0xa6, 0x02 },
|
||||
{ (uchar*) "Ch", 0xad, 0x02 },
|
||||
|
@ -513,7 +513,7 @@ static size_t my_strnxfrm_win1250ch(CHARSET_INFO * cs __attribute__((unused)),
|
|||
|
||||
#ifdef REAL_MYSQL
|
||||
|
||||
static uchar NEAR like_range_prefix_min_win1250ch[]=
|
||||
static const uchar NEAR like_range_prefix_min_win1250ch[]=
|
||||
{
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
|
||||
0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
|
||||
|
@ -677,7 +677,7 @@ static MY_COLLATION_HANDLER my_collation_czech_ci_handler =
|
|||
};
|
||||
|
||||
|
||||
CHARSET_INFO my_charset_cp1250_czech_ci =
|
||||
struct charset_info_st my_charset_cp1250_czech_ci =
|
||||
{
|
||||
34,0,0, /* number */
|
||||
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_CSSORT, /* state */
|
||||
|
|
|
@ -76,7 +76,7 @@ struct my_cs_file_section_st
|
|||
#define _CS_DIFF3 21
|
||||
|
||||
|
||||
static struct my_cs_file_section_st sec[] =
|
||||
static const struct my_cs_file_section_st sec[] =
|
||||
{
|
||||
{_CS_MISC, "xml"},
|
||||
{_CS_MISC, "xml/version"},
|
||||
|
@ -111,9 +111,10 @@ static struct my_cs_file_section_st sec[] =
|
|||
{0, NULL}
|
||||
};
|
||||
|
||||
static struct my_cs_file_section_st * cs_file_sec(const char *attr, size_t len)
|
||||
static const struct my_cs_file_section_st
|
||||
*cs_file_sec(const char *attr, size_t len)
|
||||
{
|
||||
struct my_cs_file_section_st *s;
|
||||
const struct my_cs_file_section_st *s;
|
||||
for (s=sec; s->str; s++)
|
||||
{
|
||||
if (!strncmp(attr,s->str,len))
|
||||
|
@ -137,8 +138,8 @@ typedef struct my_cs_file_info
|
|||
char comment[MY_CS_CSDESCR_SIZE];
|
||||
char tailoring[MY_CS_TAILORING_SIZE];
|
||||
size_t tailoring_length;
|
||||
CHARSET_INFO cs;
|
||||
int (*add_collation)(CHARSET_INFO *cs);
|
||||
struct charset_info_st cs;
|
||||
int (*add_collation)(struct charset_info_st *cs);
|
||||
} MY_CHARSET_LOADER;
|
||||
|
||||
|
||||
|
@ -181,7 +182,7 @@ static int fill_uint16(uint16 *a,uint size,const char *str, size_t len)
|
|||
static int cs_enter(MY_XML_PARSER *st,const char *attr, size_t len)
|
||||
{
|
||||
struct my_cs_file_info *i= (struct my_cs_file_info *)st->user_data;
|
||||
struct my_cs_file_section_st *s= cs_file_sec(attr,len);
|
||||
const struct my_cs_file_section_st *s= cs_file_sec(attr,len);
|
||||
|
||||
if ( s && (s->state == _CS_CHARSET))
|
||||
bzero(&i->cs,sizeof(i->cs));
|
||||
|
@ -196,7 +197,7 @@ static int cs_enter(MY_XML_PARSER *st,const char *attr, size_t len)
|
|||
static int cs_leave(MY_XML_PARSER *st,const char *attr, size_t len)
|
||||
{
|
||||
struct my_cs_file_info *i= (struct my_cs_file_info *)st->user_data;
|
||||
struct my_cs_file_section_st *s= cs_file_sec(attr,len);
|
||||
const struct my_cs_file_section_st *s= cs_file_sec(attr,len);
|
||||
int state= s ? s->state : 0;
|
||||
int rc;
|
||||
|
||||
|
@ -214,9 +215,9 @@ static int cs_leave(MY_XML_PARSER *st,const char *attr, size_t len)
|
|||
static int cs_value(MY_XML_PARSER *st,const char *attr, size_t len)
|
||||
{
|
||||
struct my_cs_file_info *i= (struct my_cs_file_info *)st->user_data;
|
||||
struct my_cs_file_section_st *s;
|
||||
int state= (int)((s=cs_file_sec(st->attr, strlen(st->attr))) ? s->state :
|
||||
0);
|
||||
const struct my_cs_file_section_st *s;
|
||||
int state= (int)((s= cs_file_sec(st->attr, strlen(st->attr))) ? s->state :
|
||||
0);
|
||||
|
||||
switch (state) {
|
||||
case _CS_ID:
|
||||
|
@ -291,7 +292,7 @@ static int cs_value(MY_XML_PARSER *st,const char *attr, size_t len)
|
|||
|
||||
|
||||
my_bool my_parse_charset_xml(const char *buf, size_t len,
|
||||
int (*add_collation)(CHARSET_INFO *cs))
|
||||
int (*add_collation)(struct charset_info_st *cs))
|
||||
{
|
||||
MY_XML_PARSER p;
|
||||
struct my_cs_file_info i;
|
||||
|
|
|
@ -19,9 +19,9 @@
|
|||
/*
|
||||
_dig_vec arrays are public because they are used in several outer places.
|
||||
*/
|
||||
char NEAR _dig_vec_upper[] =
|
||||
const char NEAR _dig_vec_upper[] =
|
||||
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
char NEAR _dig_vec_lower[] =
|
||||
const char NEAR _dig_vec_lower[] =
|
||||
"0123456789abcdefghijklmnopqrstuvwxyz";
|
||||
|
||||
|
||||
|
@ -56,7 +56,7 @@ int2str(register long int val, register char *dst, register int radix,
|
|||
char buffer[65];
|
||||
register char *p;
|
||||
long int new_val;
|
||||
char *dig_vec= upcase ? _dig_vec_upper : _dig_vec_lower;
|
||||
const char *dig_vec= upcase ? _dig_vec_upper : _dig_vec_lower;
|
||||
ulong uval= (ulong) val;
|
||||
|
||||
if (radix < 0)
|
||||
|
|
Loading…
Add table
Reference in a new issue